/* Forest Stone Architecture Studio - Custom Styles */

/* ============================================
   ROOT VARIABLES & BASE STYLES
   ============================================ */
:root {
  --primary-color: #2C5530;
  --secondary-color: #D4A574;
  --primary-dark: #1a3320;
  --primary-light: #3d7344;
  --secondary-dark: #b8885f;
  --secondary-light: #e6c299;
  --text-dark: #2a2a2a;
  --text-light: #ffffff;
  --bg-light: #f8f9fa;
  --stone-gray: #8a8a82;
  --forest-green: #2C5530;
  --transition-speed: 0.3s;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  overflow-x: hidden;
}

body {
  font-family: 'Inter', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  color: var(--text-dark);
  line-height: 1.7;
  overflow-x: hidden;
  background-color: #ffffff;
}

/* ============================================
   TYPOGRAPHY
   ============================================ */
.display-2,
.display-3,
.display-4,
.display-5 {
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--text-dark) !important;
  line-height: 1.2;
}

.lead {
  font-size: 1.15rem;
  color: var(--text-dark);
  font-weight: 400;
}

.fs-4,
.fs-5 {
  color: var(--text-dark);
}

/* ============================================
   NAVIGATION BAR
   ============================================ */
.navbar {
  background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%) !important;
  backdrop-filter: blur(10px);
  box-shadow: 0 4px 20px rgba(44, 85, 48, 0.15);
  transition: all var(--transition-speed) ease;
  padding: 1rem 0;
  z-index: 1050;
}

.navbar.fixed-top {
  border-bottom: 2px solid var(--secondary-color);
}

.navbar-brand {
  color: var(--text-light) !important;
  font-size: 1.75rem;
  font-weight: 700 !important;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  transition: all var(--transition-speed) ease;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

.navbar-brand:hover {
  color: var(--secondary-color) !important;
  transform: translateY(-2px);
}

.navbar-dark .navbar-nav .nav-link {
  color: rgba(255, 255, 255, 0.95) !important;
  font-weight: 500;
  padding: 0.5rem 1.25rem !important;
  margin: 0 0.25rem;
  border-radius: 6px;
  transition: all var(--transition-speed) ease;
  position: relative;
  text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.2);
}

.navbar-dark .navbar-nav .nav-link::before {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  width: 0;
  height: 2px;
  background: var(--secondary-color);
  transform: translateX(-50%);
  transition: width var(--transition-speed) ease;
}

.navbar-dark .navbar-nav .nav-link:hover,
.navbar-dark .navbar-nav .nav-link.active {
  color: var(--secondary-color) !important;
  background-color: rgba(212, 165, 116, 0.15);
  transform: translateY(-2px);
}

.navbar-dark .navbar-nav .nav-link:hover::before,
.navbar-dark .navbar-nav .nav-link.active::before {
  width: 80%;
}

.navbar-toggler {
  border: 2px solid rgba(255, 255, 255, 0.9) !important;
  padding: 0.5rem 0.75rem;
  background-color: rgba(255, 255, 255, 0.1) !important;
}

.navbar-toggler:focus {
  box-shadow: 0 0 0 0.25rem rgba(212, 165, 116, 0.5) !important;
}

.navbar-toggler-icon {
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='rgba%28255, 255, 255, 1%29' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2.5' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e") !important;
}

/* ============================================
   CAROUSEL / HERO SECTION
   ============================================ */
.carousel {
  height: 100vh;
  min-height: 600px;
}

.carousel-inner,
.carousel-item {
  height: 100%;
}

.carousel-item img {
  object-fit: cover;
  height: 100%;
  filter: brightness(0.6) contrast(1.1);
}

.carousel-fade .carousel-item {
  opacity: 0;
  transition: opacity 1.5s ease-in-out;
}

.carousel-fade .carousel-item.active {
  opacity: 1;
}

.carousel-caption {
  top: 0;
  bottom: 0;
  left: 0;
  right: 0;
  background: linear-gradient(to right, rgba(44, 85, 48, 0.85) 0%, rgba(44, 85, 48, 0.3) 100%);
  padding: 2rem;
  text-align: left;
}

.carousel-caption .display-2 {
  color: var(--text-light) !important;
  font-size: clamp(2rem, 5vw, 4rem);
  text-shadow: 3px 3px 6px rgba(0, 0, 0, 0.5);
  animation: slideInLeft 1s ease-out;
  margin-bottom: 1.5rem !important;
}

.carousel-caption .fs-4 {
  color: var(--secondary-light) !important;
  font-size: clamp(1rem, 2vw, 1.5rem);
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
  animation: slideInLeft 1s ease-out 0.3s backwards;
  margin-bottom: 2rem;
}

.carousel-indicators button {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  margin: 0 8px;
  background-color: var(--secondary-color) !important;
  border: 2px solid white !important;
  opacity: 0.6;
  transition: all var(--transition-speed) ease;
}

.carousel-indicators button.active {
  opacity: 1;
  transform: scale(1.3);
  background-color: var(--text-light) !important;
}

.carousel-control-prev-icon,
.carousel-control-next-icon {
  width: 3rem;
  height: 3rem;
  background-color: rgba(44, 85, 48, 0.7);
  border-radius: 50%;
  border: 2px solid var(--secondary-color);
  transition: all var(--transition-speed) ease;
}

.carousel-control-prev:hover .carousel-control-prev-icon,
.carousel-control-next:hover .carousel-control-next-icon {
  background-color: var(--primary-color);
  transform: scale(1.1);
}

/* ============================================
   BUTTONS
   ============================================ */
.btn {
  font-weight: 600;
  letter-spacing: 0.5px;
  border-radius: 8px;
  transition: all var(--transition-speed) ease;
  text-transform: uppercase;
  font-size: 0.95rem;
  border: 2px solid transparent;
  position: relative;
  overflow: hidden;
  z-index: 1;
}

.btn::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.2);
  transform: translate(-50%, -50%);
  transition: width 0.6s, height 0.6s;
  z-index: -1;
}

.btn:hover::before {
  width: 300px;
  height: 300px;
}

.btn-lg {
  padding: 1rem 2.5rem !important;
  font-size: 1.1rem;
}

.btn-primary {
  background-color: var(--primary-color) !important;
  border-color: var(--primary-color) !important;
  color: var(--text-light) !important;
}

.btn-primary:hover,
.btn-primary:focus {
  background-color: var(--primary-dark) !important;
  border-color: var(--primary-dark) !important;
  color: var(--text-light) !important;
  transform: translateY(-3px);
  box-shadow: 0 8px 25px rgba(44, 85, 48, 0.4) !important;
}

.btn-secondary {
  background-color: var(--secondary-color) !important;
  border-color: var(--secondary-color) !important;
  color: var(--text-dark) !important;
}

.btn-secondary:hover,
.btn-secondary:focus {
  background-color: var(--secondary-dark) !important;
  border-color: var(--secondary-dark) !important;
  color: var(--text-light) !important;
  transform: translateY(-3px);
  box-shadow: 0 8px 25px rgba(212, 165, 116, 0.4) !important;
}

.btn-outline-dark {
  border-color: var(--primary-color) !important;
  color: var(--primary-color) !important;
  border-width: 2px;
  background-color: transparent !important;
}

.btn-outline-dark:hover,
.btn-outline-dark:focus {
  background-color: var(--primary-color) !important;
  border-color: var(--primary-color) !important;
  color: var(--text-light) !important;
  transform: translateY(-3px);
  box-shadow: 0 8px 25px rgba(44, 85, 48, 0.3) !important;
}

.btn-outline-secondary {
  border-color: var(--secondary-color) !important;
  color: var(--secondary-color) !important;
  border-width: 2px;
  background-color: transparent !important;
}

.btn-outline-secondary:hover,
.btn-outline-secondary:focus {
  background-color: var(--secondary-color) !important;
  border-color: var(--secondary-color) !important;
  color: var(--text-dark) !important;
  transform: translateY(-3px);
}

.btn-light {
  background-color: var(--text-light) !important;
  border-color: var(--text-light) !important;
  color: var(--primary-color) !important;
}

.btn-light:hover {
  background-color: var(--secondary-light) !important;
  border-color: var(--secondary-light) !important;
  color: var(--primary-dark) !important;
}

.btn-outline-light {
  border-color: var(--text-light) !important;
  color: var(--text-light) !important;
  border-width: 2px;
}

.btn-outline-light:hover {
  background-color: var(--text-light) !important;
  color: var(--primary-color) !important;
}

/* ============================================
   CARDS
   ============================================ */
.card {
  border: none !important;
  border-radius: 12px;
  transition: all 0.4s ease;
  overflow: hidden;
  background-color: white;
}

.card:hover {
  transform: translateY(-10px);
  box-shadow: 0 15px 40px rgba(44, 85, 48, 0.2) !important;
}

.card-body {
  padding: 2rem !important;
}

.card-title {
  color: var(--primary-color) !important;
  font-weight: 600 !important;
  margin-bottom: 1rem;
}

.shadow-sm {
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08) !important;
}

.shadow {
  box-shadow: 0 6px 25px rgba(0, 0, 0, 0.12) !important;
}

.shadow-lg {
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15) !important;
}

/* ============================================
   PORTFOLIO SECTION
   ============================================ */
.filter-buttons {
  margin-bottom: 3rem;
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 1rem;
}

.filter-btn {
  padding: 0.75rem 2rem !important;
  border-radius: 50px !important;
  border: 2px solid var(--secondary-color) !important;
  background-color: transparent !important;
  color: var(--primary-color) !important;
  font-weight: 600;
  transition: all var(--transition-speed) ease;
}

.filter-btn:hover,
.filter-btn.active {
  background-color: var(--secondary-color) !important;
  color: var(--text-light) !important;
  transform: translateY(-3px);
  box-shadow: 0 6px 20px rgba(212, 165, 116, 0.3);
}

.masonry-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 2rem;
}

.masonry-item {
  opacity: 0;
  transform: translateY(30px);
  animation: fadeInUp 0.6s ease forwards;
}

.masonry-item:nth-child(1) { animation-delay: 0.1s; }
.masonry-item:nth-child(2) { animation-delay: 0.2s; }
.masonry-item:nth-child(3) { animation-delay: 0.3s; }
.masonry-item:nth-child(4) { animation-delay: 0.4s; }
.masonry-item:nth-child(5) { animation-delay: 0.5s; }
.masonry-item:nth-child(6) { animation-delay: 0.6s; }

.portfolio-card {
  position: relative;
  overflow: hidden;
  border-radius: 12px;
  cursor: pointer;
  height: 100%;
}

.portfolio-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s ease;
}

.portfolio-card:hover img {
  transform: scale(1.15);
}

.portfolio-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(to top, rgba(44, 85, 48, 0.95) 0%, rgba(44, 85, 48, 0.3) 60%, transparent 100%);
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 2rem;
  opacity: 0;
  transition: opacity 0.4s ease;
}

.portfolio-card:hover .portfolio-overlay {
  opacity: 1;
}

.portfolio-overlay h4 {
  color: var(--text-light) !important;
  margin-bottom: 0.5rem;
  transform: translateY(20px);
  transition: transform 0.4s ease 0.1s;
}

.portfolio-card:hover .portfolio-overlay h4 {
  transform: translateY(0);
}

.portfolio-overlay p {
  color: var(--secondary-light) !important;
  transform: translateY(20px);
  transition: transform 0.4s ease 0.2s;
}

.portfolio-card:hover .portfolio-overlay p {
  transform: translateY(0);
}

.badge {
  background-color: var(--secondary-color) !important;
  color: var(--text-dark) !important;
  padding: 0.5rem 1rem;
  font-weight: 600;
  border-radius: 20px;
}

/* ============================================
   GALLERY GRID
   ============================================ */
.gallery-grid {
  display: grid;
  gap: 1rem;
}

.gallery-stack {
  position: relative;
}

.gallery-grid img {
  width: 100%;
  height: 100%;
  border-radius: 8px;
  transition: all 0.4s ease;
}

.gallery-grid img:hover {
  transform: scale(1.05);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.object-fit-cover {
  object-fit: cover;
}

/* ============================================
   TEAM SECTION
   ============================================ */
.team-portraits {
  transition: all 0.4s ease;
}

.team-portraits:hover {
  transform: scale(1.05);
  box-shadow: 0 8px 25px rgba(44, 85, 48, 0.3);
}

.rounded-circle {
  border: 4px solid var(--secondary-color);
  padding: 3px;
  background-color: white;
}

/* ============================================
   TIMELINE SECTION
   ============================================ */
.timeline-section {
  position: relative;
  padding: 5rem 0;
}

.timeline-line {
  width: 4px;
  background: linear-gradient(to bottom, var(--primary-color), var(--secondary-color));
  position: absolute;
  left: 50%;
  top: 0;
  bottom: 0;
  transform: translateX(-50%);
}

.timeline-item {
  position: relative;
  margin-bottom: 3rem;
  opacity: 0;
  animation: fadeInUp 0.6s ease forwards;
}

.timeline-item::before {
  content: '';
  position: absolute;
  width: 20px;
  height: 20px;
  background-color: var(--secondary-color);
  border: 4px solid var(--primary-color);
  border-radius: 50%;
  left: 50%;
  transform: translateX(-50%);
  z-index: 2;
}

/* ============================================
   FORMS
   ============================================ */
.form-label {
  font-weight: 600;
  color: var(--primary-color) !important;
  margin-bottom: 0.5rem;
}

.form-control,
.form-select {
  border: 2px solid #e0e0e0 !important;
  border-radius: 8px !important;
  padding: 0.75rem 1rem !important;
  transition: all var(--transition-speed) ease;
  background-color: white !important;
  color: var(--text-dark) !important;
}

.form-control:focus,
.form-select:focus {
  border-color: var(--primary-color) !important;
  box-shadow: 0 0 0 0.25rem rgba(44, 85, 48, 0.15) !important;
  background-color: white !important;
}

.form-control::placeholder {
  color: var(--stone-gray) !important;
}

textarea.form-control {
  resize: vertical;
  min-height: 120px;
}

.text-muted {
  color: var(--stone-gray) !important;
}

/* ============================================
   BACKGROUND COLORS
   ============================================ */
.bg-light {
  background-color: #f8f9f5 !important;
}

.bg-primary {
  background-color: var(--primary-color) !important;
}

.bg-secondary {
  background-color: var(--secondary-color) !important;
}

/* ============================================
   TEXT COLORS
   ============================================ */
.text-white {
  color: var(--text-light) !important;
}

.text-white-50 {
  color: rgba(255, 255, 255, 0.6) !important;
}

.text-dark {
  color: var(--text-dark) !important;
}

.text-primary {
  color: var(--primary-color) !important;
}

.text-secondary {
  color: var(--secondary-color) !important;
}

/* ============================================
   ICONS
   ============================================ */
.bi {
  color: var(--primary-color);
  transition: all var(--transition-speed) ease;
}

.bi-telephone-fill,
.bi-envelope-fill,
.bi-geo-alt-fill {
  font-size: 2.5rem !important;
}

.card:hover .bi {
  color: var(--secondary-color);
  transform: scale(1.1) rotate(5deg);
}

/* ============================================
   FOOTER
   ============================================ */
footer {
  background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary-color) 100%);
  color: var(--text-light) !important;
  border-top: 3px solid var(--secondary-color);
}

footer h5 {
  color: var(--secondary-color) !important;
  font-weight: 700;
  margin-bottom: 1.5rem;
  text-transform: uppercase;
  letter-spacing: 1px;
}

footer .list-unstyled li {
  margin-bottom: 0.75rem;
}

footer a {
  color: rgba(255, 255, 255, 0.85) !important;
  text-decoration: none !important;
  transition: all var(--transition-speed) ease;
  display: inline-block;
}

footer a:hover {
  color: var(--secondary-color) !important;
  transform: translateX(5px);
}

.border-bottom {
  border-color: rgba(255, 255, 255, 0.2) !important;
}

/* ============================================
   UTILITY CLASSES
   ============================================ */
.min-vh-100 {
  min-height: 100vh;
}

.sticky-lg-top {
  position: sticky;
  top: 80px;
}

.overflow-hidden {
  overflow: hidden;
}

.position-relative {
  position: relative;
}

.position-absolute {
  position: absolute;
}

.lh-lg {
  line-height: 2 !important;
}

.rounded-pill {
  border-radius: 50rem !important;
}

.flex-shrink-0 {
  flex-shrink: 0;
}

.flex-grow-1 {
  flex-grow: 1;
}

/* ============================================
   ANIMATIONS
   ============================================ */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes slideInLeft {
  from {
    opacity: 0;
    transform: translateX(-50px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes slideInRight {
  from {
    opacity: 0;
    transform: translateX(50px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

.fade-in-up {
  animation: fadeInUp 0.8s ease-out forwards;
}

.slide-in-left {
  animation: slideInLeft 0.8s ease-out forwards;
}

.slide-in-right {
  animation: slideInRight 0.8s ease-out forwards;
}

/* ============================================
   RESPONSIVE DESIGN
   ============================================ */

/* Mobile First - Extra Small Devices */
@media (max-width: 575.98px) {
  .navbar-brand {
    font-size: 1.25rem;
  }
  
  .display-2 {
    font-size: 2rem !important;
  }
  
  .display-3 {
    font-size: 1.75rem !important;
  }
  
  .display-4 {
    font-size: 1.5rem !important;
  }
  
  .btn-lg {
    padding: 0.75rem 1.5rem !important;
    font-size: 1rem;
  }
  
  .carousel {
    height: 70vh;
    min-height: 500px;
  }
  
  .carousel-caption {
    padding: 1rem;
  }
  
  .masonry-grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }
  
  .card-body {
    padding: 1.5rem !important;
  }
  
  .px-4 {
    padding-left: 1rem !important;
    padding-right: 1rem !important;
  }
}

/* Small Devices */
@media (min-width: 576px) and (max-width: 767.98px) {
  .masonry-grid {
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  }
}

/* Medium Devices */
@media (min-width: 768px) and (max-width: 991.98px) {
  .masonry-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .timeline-line {
    left: 30px;
  }
  
  .timeline-item::before {
    left: 30px;
  }
}

/* Large Devices */
@media (min-width: 992px) {
  .navbar-nav {
    align-items: center;
  }
  
  .masonry-grid {
    grid-template-columns: repeat(3, 1fr);
  }
  
  .sticky-lg-top {
    position: sticky;
    top: 100px;
  }
}

/* Extra Large Devices */
@media (min-width: 1200px) {
  .container {
    max-width: 1200px;
  }
  
  .masonry-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 2.5rem;
  }
}

/* ============================================
   ACCESSIBILITY
   ============================================ */
:focus-visible {
  outline: 3px solid var(--secondary-color) !important;
  outline-offset: 3px;
}

.btn:focus-visible,
.nav-link:focus-visible {
  outline: 2px solid var(--secondary-color) !important;
  outline-offset: 2px;
}

/* ============================================
   PRINT STYLES
   ============================================ */
@media print {
  .navbar,
  .carousel-control-prev,
  .carousel-control-next,
  .carousel-indicators,
  footer {
    display: none !important;
  }
  
  body {
    font-size: 12pt;
    line-height: 1.5;
  }
  
  .container {
    width: 100%;
    max-width: none;
  }
}

/* ============================================
   SCROLLBAR STYLING
   ============================================ */
::-webkit-scrollbar {
  width: 12px;
}

::-webkit-scrollbar-track {
  background: var(--bg-light);
}

::-webkit-scrollbar-thumb {
  background: var(--primary-color);
  border-radius: 6px;
  border: 2px solid var(--bg-light);
}

::-webkit-scrollbar-thumb:hover {
  background: var(--primary-dark);
}

/* ============================================
   SELECTION STYLING
   ============================================ */
::selection {
  background-color: var(--secondary-color);
  color: var(--text-dark);
}

::-moz-selection {
  background-color: var(--secondary-color);
  color: var(--text-dark);
}

/* ============================================
   LOADING STATES
   ============================================ */
.loading {
  opacity: 0.6;
  pointer-events: none;
  position: relative;
}

.loading::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 30px;
  height: 30px;
  border: 3px solid var(--secondary-color);
  border-top-color: transparent;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  transform: translate(-50%, -50%);
}

@keyframes spin {
  to {
    transform: translate(-50%, -50%) rotate(360deg);
  }
}

/* ============================================
   HOVER EFFECTS FOR IMAGES
   ============================================ */
.img-fluid {
  transition: all 0.4s ease;
}

.img-fluid:hover {
  transform: scale(1.03);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

/* ============================================
   SMOOTH TRANSITIONS FOR ALL INTERACTIVE ELEMENTS
   ============================================ */
a, button, input, textarea, select {
  transition: all var(--transition-speed) ease;
}