/* Forest Heritage Architecture Studio - Custom Styles */

/* ============================================
   ROOT VARIABLES & BASE STYLES
   ============================================ */
:root {
  --primary-color: #2C5F41;
  --secondary-color: #E8D5B7;
  --text-dark: #1a1a1a;
  --text-light: #ffffff;
  --overlay-dark: rgba(44, 95, 65, 0.85);
  --overlay-light: rgba(232, 213, 183, 0.9);
  --transition-smooth: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  --shadow-soft: 0 10px 40px rgba(0, 0, 0, 0.1);
  --shadow-hover: 0 20px 60px rgba(0, 0, 0, 0.15);
}

* {
  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;
  background-color: #fafafa;
  overflow-x: hidden;
}

/* ============================================
   NAVIGATION STYLES
   ============================================ */
.navbar {
  background-color: var(--primary-color) !important;
  padding: 1rem 0;
  transition: var(--transition-smooth);
  box-shadow: 0 2px 20px rgba(0, 0, 0, 0.1);
  z-index: 1000;
}

.navbar.scrolled {
  padding: 0.5rem 0;
  background-color: rgba(44, 95, 65, 0.98) !important;
}

.navbar-brand {
  color: var(--text-light) !important;
  font-size: 1.5rem;
  letter-spacing: 1px;
  transition: var(--transition-smooth);
}

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

.navbar-dark .navbar-nav .nav-link {
  color: rgba(255, 255, 255, 0.9) !important;
  padding: 0.5rem 1.2rem !important;
  margin: 0 0.3rem;
  border-radius: 6px;
  transition: var(--transition-smooth);
  font-weight: 500;
  position: relative;
}

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

.navbar-dark .navbar-nav .nav-link:hover::after,
.navbar-dark .navbar-nav .nav-link.active::after {
  transform: translateX(-50%) scaleX(1);
}

.navbar-dark .navbar-nav .nav-link:hover,
.navbar-dark .navbar-nav .nav-link.active {
  color: var(--secondary-color) !important;
  background-color: rgba(232, 213, 183, 0.1) !important;
}

.navbar-toggler {
  border-color: var(--secondary-color) !important;
  padding: 0.5rem 0.75rem;
}

.navbar-toggler:focus {
  box-shadow: 0 0 0 0.25rem rgba(232, 213, 183, 0.25) !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='%23E8D5B7' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e") !important;
}

/* ============================================
   HERO SECTION
   ============================================ */
.hero-section {
  min-height: 100vh;
  position: relative;
  display: flex;
  align-items: center;
  background: linear-gradient(135deg, var(--primary-color) 0%, #1a3d2a 100%);
  overflow: hidden;
  margin-top: 76px;
}

.hero-section::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: url('data:image/svg+xml,%3Csvg width="60" height="60" viewBox="0 0 60 60" xmlns="http://www.w3.org/2000/svg"%%3E%3Cg fill="none" fill-rule="evenodd"%3E%3Cg fill="%23E8D5B7" fill-opacity="0.05"%3E%3Cpath d="M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z"/%3E%3C/g%3E%3C/g%3E%3C/svg%3E');
  opacity: 0.4;
}

.hero-section .object-fit-cover {
  width: 100%;
  height: 100%;
  object-fit: cover;
  position: absolute;
  top: 0;
  left: 0;
  opacity: 0.15;
  filter: brightness(0.7);
}

.hero-section .container {
  position: relative;
  z-index: 2;
}

.hero-section .display-2 {
  font-weight: 700;
  color: var(--text-light) !important;
  text-shadow: 2px 4px 8px rgba(0, 0, 0, 0.3);
  line-height: 1.2;
  animation: fadeInUp 1s ease-out;
}

.hero-section .fs-4 {
  color: var(--secondary-color) !important;
  font-weight: 400;
  text-shadow: 1px 2px 4px rgba(0, 0, 0, 0.3);
  animation: fadeInUp 1.2s ease-out;
}

.hero-section .text-uppercase {
  color: var(--secondary-color) !important;
  letter-spacing: 3px;
  font-size: 0.9rem;
  animation: fadeInUp 0.8s ease-out;
}

/* ============================================
   BUTTONS
   ============================================ */
.btn {
  border-radius: 8px;
  font-weight: 600;
  letter-spacing: 0.5px;
  transition: var(--transition-smooth);
  border-width: 2px;
  position: relative;
  overflow: hidden;
  z-index: 1;
}

.btn::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  border-radius: 50%;
  background-color: 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-primary {
  background-color: var(--primary-color) !important;
  border-color: var(--primary-color) !important;
  color: var(--text-light) !important;
}

.btn-primary:hover {
  background-color: #1a3d2a !important;
  border-color: #1a3d2a !important;
  color: var(--text-light) !important;
  transform: translateY(-3px);
  box-shadow: 0 10px 25px rgba(44, 95, 65, 0.4) !important;
}

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

.btn-outline-light:hover {
  background-color: var(--text-light) !important;
  border-color: var(--text-light) !important;
  color: var(--primary-color) !important;
  transform: translateY(-3px);
  box-shadow: 0 10px 25px rgba(255, 255, 255, 0.3) !important;
}

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

.btn-outline-secondary:hover,
.btn-outline-secondary.active {
  background-color: var(--secondary-color) !important;
  border-color: var(--secondary-color) !important;
  color: var(--primary-color) !important;
  transform: translateY(-2px);
}

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

.btn-outline-dark:hover {
  background-color: var(--primary-color) !important;
  border-color: var(--primary-color) !important;
  color: var(--text-light) !important;
  transform: translateY(-2px);
}

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

/* ============================================
   PROJECT CARDS & PORTFOLIO
   ============================================ */
.project-card {
  position: relative;
  overflow: hidden;
  border-radius: 12px;
  height: 400px;
  cursor: pointer;
  transition: var(--transition-smooth);
}

.project-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(to top, rgba(44, 95, 65, 0.95) 0%, transparent 100%);
  z-index: 1;
  transition: var(--transition-smooth);
}

.project-card:hover::before {
  background: linear-gradient(to top, rgba(44, 95, 65, 0.8) 0%, rgba(44, 95, 65, 0.3) 100%);
}

.project-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: var(--transition-smooth);
}

.project-card:hover img {
  transform: scale(1.1);
}

.project-card .position-absolute {
  z-index: 2;
  transition: var(--transition-smooth);
}

.project-card:hover .position-absolute {
  transform: translateY(-10px);
}

.project-card .h4 {
  color: var(--text-light) !important;
  font-weight: 700;
}

.project-card .mb-0 {
  color: var(--secondary-color) !important;
  font-weight: 500;
}

/* Portfolio Grid */
.portfolio-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
  gap: 2rem;
  margin-top: 2rem;
}

.portfolio-item {
  position: relative;
  overflow: hidden;
  border-radius: 12px;
  height: 350px;
  transition: var(--transition-smooth);
  opacity: 1;
  transform: scale(1);
}

.portfolio-item.hidden {
  opacity: 0;
  transform: scale(0.8);
  height: 0;
  margin: 0;
  overflow: hidden;
}

.portfolio-item.large {
  grid-column: span 2;
  height: 450px;
}

.portfolio-card {
  width: 100%;
  height: 100%;
  position: relative;
  overflow: hidden;
}

.portfolio-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: var(--transition-smooth);
}

.portfolio-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(to top, var(--overlay-dark) 0%, transparent 70%);
  opacity: 0;
  transition: var(--transition-smooth);
  display: flex;
  align-items: flex-end;
  padding: 2rem;
}

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

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

.portfolio-content {
  color: var(--text-light) !important;
  transform: translateY(20px);
  transition: var(--transition-smooth);
}

.portfolio-item:hover .portfolio-content {
  transform: translateY(0);
}

.portfolio-content .h5 {
  color: var(--text-light) !important;
  font-weight: 700;
  margin-bottom: 0.5rem;
}

.portfolio-content p {
  color: var(--secondary-color) !important;
  margin-bottom: 0.8rem;
}

.badge {
  background-color: var(--secondary-color) !important;
  color: var(--primary-color) !important;
  padding: 0.4rem 0.8rem;
  font-weight: 600;
  border-radius: 6px;
}

/* Filter Buttons */
.filter-btn {
  margin: 0.3rem;
  padding: 0.6rem 1.5rem;
  transition: var(--transition-smooth);
}

/* ============================================
   TIMELINE STYLES
   ============================================ */
.timeline-wrapper {
  position: relative;
  padding: 2rem 0;
}

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

.timeline-item {
  margin-bottom: 3rem;
  animation: fadeInTimeline 0.8s ease-out;
}

.timeline-marker {
  width: 50px;
  height: 50px;
  background-color: var(--primary-color);
  border: 4px solid var(--secondary-color);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-light) !important;
  font-weight: 700;
  box-shadow: 0 4px 15px rgba(44, 95, 65, 0.3);
  z-index: 2;
  position: relative;
}

.timeline-content {
  background-color: #ffffff;
  padding: 1.5rem;
  border-radius: 12px;
  box-shadow: var(--shadow-soft);
  transition: var(--transition-smooth);
}

.timeline-item:hover .timeline-content {
  transform: translateY(-5px);
  box-shadow: var(--shadow-hover);
}

.timeline-content .h5 {
  color: var(--primary-color) !important;
  font-weight: 700;
}

/* ============================================
   FORMS
   ============================================ */
.form-control,
.form-select {
  border: 2px solid #e0e0e0;
  border-radius: 8px;
  padding: 0.75rem 1rem;
  transition: var(--transition-smooth);
  background-color: #ffffff;
  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, 95, 65, 0.15) !important;
  background-color: #ffffff !important;
}

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

.form-check-input {
  border: 2px solid var(--primary-color);
  border-radius: 4px;
}

.form-check-input:checked {
  background-color: var(--primary-color) !important;
  border-color: var(--primary-color) !important;
}

.form-check-input:focus {
  box-shadow: 0 0 0 0.25rem rgba(44, 95, 65, 0.15) !important;
}

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

.invalid-feedback {
  color: #dc3545 !important;
  font-weight: 500;
}

.form-control.is-invalid,
.form-select.is-invalid {
  border-color: #dc3545 !important;
}

/* ============================================
   CARDS
   ============================================ */
.card {
  border: none;
  border-radius: 12px;
  overflow: hidden;
  transition: var(--transition-smooth);
  background-color: #ffffff;
}

.card:hover {
  transform: translateY(-10px);
  box-shadow: var(--shadow-hover) !important;
}

.card-body {
  padding: 2rem;
}

.shadow,
.shadow-lg,
.shadow-sm {
  box-shadow: var(--shadow-soft) !important;
}

.shadow:hover,
.shadow-lg:hover {
  box-shadow: var(--shadow-hover) !important;
}

/* ============================================
   MODAL STYLES
   ============================================ */
.modal-content {
  border-radius: 16px;
  border: none;
  overflow: hidden;
}

.modal-header {
  background-color: var(--primary-color);
  border-bottom: none;
  padding: 1.5rem 2rem;
}

.modal-title {
  color: var(--text-light) !important;
  font-weight: 700;
}

.btn-close {
  filter: brightness(0) invert(1);
  opacity: 1;
}

.modal-body {
  padding: 2rem;
}

/* ============================================
   UTILITY CLASSES
   ============================================ */
.bg-light {
  background-color: #f8f9fa !important;
}

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

.text-muted {
  color: #6c757d !important;
}

.display-2,
.display-3,
.display-4,
.display-5,
.display-6 {
  font-weight: 700;
  color: var(--primary-color);
  line-height: 1.2;
}

.lead {
  font-size: 1.25rem;
  font-weight: 400;
  color: #495057;
}

.text-decoration-none {
  text-decoration: none !important;
}

.text-decoration-none:hover {
  text-decoration: underline !important;
}

/* Icons */
.bi {
  vertical-align: middle;
  transition: var(--transition-smooth);
}

[class*="bi-"] {
  line-height: 1;
}

/* Social Media Links */
a[class*="bi-instagram"],
a[class*="bi-linkedin"],
a[class*="bi-facebook"],
a[class*="bi-telephone"],
a[class*="bi-envelope"] {
  color: var(--primary-color) !important;
  transition: var(--transition-smooth);
}

a[class*="bi-"]:hover {
  color: var(--secondary-color) !important;
  transform: scale(1.2);
}

/* ============================================
   SECTION STYLES
   ============================================ */
section {
  padding: 5rem 0;
  position: relative;
}

section .display-4,
section .display-5,
section .display-6 {
  margin-bottom: 1rem;
  animation: fadeInUp 0.8s ease-out;
}

section .lead {
  animation: fadeInUp 1s ease-out;
}

.py-5 {
  padding-top: 4rem !important;
  padding-bottom: 4rem !important;
}

.my-5 {
  margin-top: 4rem !important;
  margin-bottom: 4rem !important;
}

/* ============================================
   IMAGE STYLES
   ============================================ */
.img-fluid {
  max-width: 100%;
  height: auto;
  border-radius: 12px;
  transition: var(--transition-smooth);
}

.img-fluid:hover {
  transform: scale(1.02);
  box-shadow: var(--shadow-hover);
}

.rounded {
  border-radius: 12px !important;
}

/* ============================================
   FOOTER STYLES
   ============================================ */
footer {
  background-color: var(--primary-color);
  color: var(--text-light) !important;
  padding: 3rem 0 1rem;
  margin-top: 5rem;
}

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

footer p,
footer a {
  color: rgba(255, 255, 255, 0.8) !important;
  transition: var(--transition-smooth);
}

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

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

footer .small {
  color: rgba(255, 255, 255, 0.6) !important;
}

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

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

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

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

.animate-on-scroll {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.animate-on-scroll.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ============================================
   RESPONSIVE DESIGN
   ============================================ */
@media (max-width: 991.98px) {
  .hero-section {
    margin-top: 66px;
    min-height: 90vh;
  }
  
  .display-2 {
    font-size: 2.5rem !important;
  }
  
  .display-3 {
    font-size: 2.2rem !important;
  }
  
  .display-4 {
    font-size: 2rem !important;
  }
  
  .navbar-collapse {
    background-color: rgba(44, 95, 65, 0.98);
    padding: 1rem;
    border-radius: 8px;
    margin-top: 1rem;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
  }
  
  .navbar-nav .nav-link {
    padding: 0.8rem 1rem !important;
  }
  
  .timeline-wrapper::before {
    left: 25px;
  }
  
  .timeline-item .flex-row-reverse {
    flex-direction: row !important;
  }
  
  .timeline-content {
    margin-left: 1rem;
  }
  
  .portfolio-grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }
  
  .portfolio-item.large {
    grid-column: span 1;
    height: 350px;
  }
  
  section {
    padding: 3rem 0;
  }
}

@media (max-width: 767.98px) {
  .hero-section {
    min-height: 80vh;
  }
  
  .display-2 {
    font-size: 2rem !important;
  }
  
  .btn-lg {
    padding: 0.8rem 1.5rem !important;
    font-size: 1rem;
  }
  
  .project-card {
    height: 300px;
  }
  
  .portfolio-item {
    height: 300px;
  }
  
  .card-body {
    padding: 1.5rem;
  }
  
  .modal-body {
    padding: 1.5rem;
  }
  
  footer {
    text-align: center;
  }
  
  footer .text-lg-end,
  footer .text-md-end {
    text-align: center !important;
    margin-top: 1rem;
  }
}

@media (max-width: 575.98px) {
  .container-fluid {
    padding-left: 1rem !important;
    padding-right: 1rem !important;
  }
  
  .display-2 {
    font-size: 1.75rem !important;
  }
  
  .fs-4 {
    font-size: 1rem !important;
  }
  
  .portfolio-grid {
    gap: 1rem;
  }
  
  .timeline-marker {
    width: 40px;
    height: 40px;
    font-size: 0.9rem;
  }
  
  section {
    padding: 2rem 0;
  }
  
  .py-5 {
    padding-top: 2rem !important;
    padding-bottom: 2rem !important;
  }
}

/* ============================================
   LOADING & TRANSITIONS
   ============================================ */
.page-transition {
  opacity: 0;
  animation: fadeInUp 0.6s ease forwards;
}

/* ============================================
   ACCESSIBILITY
   ============================================ */
.btn:focus,
.form-control:focus,
.form-select:focus,
.form-check-input:focus {
  outline: 2px solid var(--primary-color);
  outline-offset: 2px;
}

/* ============================================
   PRINT STYLES
   ============================================ */
@media print {
  .navbar,
  .btn,
  footer {
    display: none !important;
  }
  
  body {
    background-color: white;
    color: black;
  }
}

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

::-webkit-scrollbar-track {
  background: #f1f1f1;
}

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

::-webkit-scrollbar-thumb:hover {
  background: #1a3d2a;
}

/* ============================================
   CONTACT & LOCATION INFO
   ============================================ */
.bi-geo-alt-fill,
.bi-telephone-fill,
.bi-envelope-fill,
.bi-geo-alt,
.bi-telephone,
.bi-envelope {
  color: var(--primary-color) !important;
  margin-right: 0.5rem;
}

/* ============================================
   SPECIAL EFFECTS
   ============================================ */
.hover-lift {
  transition: var(--transition-smooth);
}

.hover-lift:hover {
  transform: translateY(-10px);
  box-shadow: var(--shadow-hover);
}

.hover-zoom {
  overflow: hidden;
}

.hover-zoom img {
  transition: var(--transition-smooth);
}

.hover-zoom:hover img {
  transform: scale(1.1);
}

/* Background Patterns */
.bg-pattern {
  background-image: url('data:image/svg+xml,%3Csvg width="60" height="60" viewBox="0 0 60 60" xmlns="http://www.w3.org/2000/svg"%3E%3Cg fill="none" fill-rule="evenodd"%3E%3Cg fill="%232C5F41" fill-opacity="0.05"%3E%3Cpath d="M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z"/%3E%3C/g%3E%3C/g%3E%3C/svg%3E');
}

/* Text Highlights */
.text-highlight {
  position: relative;
  display: inline-block;
}

.text-highlight::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 10px;
  background-color: var(--secondary-color);
  opacity: 0.3;
  z-index: -1;
}

/* Sticky Elements */
.sticky-top {
  top: 90px;
  z-index: 100;
}

/* ============================================
   CONTRAST & READABILITY IMPROVEMENTS
   ============================================ */
.text-white,
.text-light {
  color: #ffffff !important;
  text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.5);
}

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

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

/* Ensure all interactive elements have sufficient contrast */
a,
button,
.btn,
.nav-link {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

/* High contrast mode support */
@media (prefers-contrast: high) {
  .btn,
  .form-control,
  .card {
    border-width: 3px !important;
  }
  
  .text-muted {
    color: #495057 !important;
  }
}