/* Forest Contemporary Architecture Studio Theme CSS */

/* ===================================
   ROOT VARIABLES & BASE STYLES
   =================================== */
:root {
  --primary-color: #2C5530;
  --secondary-color: #A8C090;
  --dark-forest: #1a3a1e;
  --light-sage: #d4e5ce;
  --cream: #f8f9f5;
  --white: #ffffff;
  --shadow-sm: 0 2px 4px rgba(44, 85, 48, 0.08);
  --shadow-md: 0 4px 12px rgba(44, 85, 48, 0.15);
  --shadow-lg: 0 8px 24px rgba(44, 85, 48, 0.2);
  --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

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

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
  color: var(--dark-forest);
  line-height: 1.6;
  background-color: var(--cream);
  overflow-x: hidden;
}

html {
  scroll-behavior: smooth;
}

/* ===================================
   TYPOGRAPHY
   =================================== */
h1, h2, h3, h4, h5, h6 {
  font-weight: 700;
  line-height: 1.2;
  color: var(--primary-color);
}

.display-3, .display-4, .display-5, .display-6 {
  font-weight: 800;
  letter-spacing: -0.02em;
}

.lead {
  font-size: 1.25rem;
  font-weight: 400;
  color: var(--dark-forest);
  opacity: 0.9;
}

/* ===================================
   HERO SECTION
   =================================== */
.hero-section {
  background: linear-gradient(135deg, var(--primary-color) 0%, var(--dark-forest) 100%);
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  color: var(--white) !important;
}

.hero-section::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-image: 
    url('data:image/svg+xml,<svg width="100" height="100" xmlns="http://www.w3.org/2000/svg"><defs><pattern id="grid" width="100" height="100" patternUnits="userSpaceOnUse"><path d="M 100 0 L 0 0 0 100" fill="none" stroke="rgba(255,255,255,0.05)" stroke-width="1"/></pattern></defs><rect width="100%" height="100%" fill="url(%23grid)" /></svg>');
  opacity: 0.3;
  z-index: 1;
}

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

.hero-content h1 {
  color: var(--white) !important;
  text-shadow: 0 2px 20px rgba(0, 0, 0, 0.3);
  animation: fadeInUp 1s ease-out;
}

.hero-content p {
  color: var(--light-sage) !important;
  text-shadow: 0 1px 10px rgba(0, 0, 0, 0.2);
  animation: fadeInUp 1.2s ease-out;
}

.hero-content .btn {
  animation: fadeInUp 1.4s ease-out;
}

/* ===================================
   NAVIGATION
   =================================== */
.navbar {
  padding: 1.5rem 0;
  transition: var(--transition);
  background-color: transparent !important;
}

.navbar.sticky-top {
  background-color: rgba(44, 85, 48, 0.95) !important;
  backdrop-filter: blur(10px);
  box-shadow: var(--shadow-md);
  padding: 1rem 0;
}

.navbar-brand {
  font-size: 1.5rem !important;
  font-weight: 700 !important;
  color: var(--white) !important;
  letter-spacing: -0.02em;
  transition: var(--transition);
}

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

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

.navbar-nav .nav-link:hover,
.navbar-nav .nav-link.active {
  color: var(--white) !important;
  background-color: rgba(168, 192, 144, 0.2) !important;
  transform: translateY(-2px);
}

.navbar-nav .nav-link.active::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 30px;
  height: 3px;
  background-color: var(--secondary-color);
  border-radius: 2px;
}

.navbar-toggler {
  border: 2px solid var(--white) !important;
  padding: 0.5rem 0.75rem;
  border-radius: 8px;
}

.navbar-toggler:focus {
  box-shadow: 0 0 0 0.25rem rgba(168, 192, 144, 0.3) !important;
}

.navbar-light .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(44, 85, 48, 1)' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e") !important;
}

/* ===================================
   BUTTONS
   =================================== */
.btn {
  border-radius: 12px;
  font-weight: 600 !important;
  padding: 0.75rem 2rem;
  transition: var(--transition);
  border: 2px solid transparent;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  font-size: 0.95rem;
}

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

.btn-light:hover {
  background-color: var(--secondary-color) !important;
  color: var(--primary-color) !important;
  border-color: var(--secondary-color) !important;
  transform: translateY(-3px);
  box-shadow: var(--shadow-lg);
}

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

.btn-outline-light:hover {
  background-color: var(--white) !important;
  color: var(--primary-color) !important;
  border-color: var(--white) !important;
  transform: translateY(-3px);
  box-shadow: var(--shadow-lg);
}

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

.btn-outline-success:hover {
  background-color: var(--primary-color) !important;
  color: var(--white) !important;
  border-color: var(--primary-color) !important;
  transform: translateY(-3px);
  box-shadow: var(--shadow-lg);
}

.btn-lg {
  padding: 1rem 2.5rem !important;
  font-size: 1rem !important;
  border-radius: 14px !important;
}

.btn-sm {
  padding: 0.5rem 1.5rem !important;
  font-size: 0.875rem !important;
  border-radius: 10px !important;
}

/* ===================================
   BADGES
   =================================== */
.badge {
  background-color: var(--secondary-color) !important;
  color: var(--primary-color) !important;
  font-weight: 600 !important;
  padding: 0.5rem 1rem !important;
  border-radius: 8px !important;
  font-size: 0.875rem !important;
  letter-spacing: 0.5px;
  text-transform: uppercase;
}

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

/* ===================================
   CARDS
   =================================== */
.card {
  border: none !important;
  border-radius: 16px !important;
  overflow: hidden;
  transition: var(--transition);
  background-color: var(--white);
}

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

.card-body {
  padding: 2rem;
}

.service-card {
  background-color: var(--white);
  border-radius: 16px;
  padding: 2rem;
  transition: var(--transition);
  border: 2px solid transparent;
  position: relative;
  overflow: hidden;
}

.service-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 4px;
  background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
  transform: scaleX(0);
  transform-origin: left;
  transition: var(--transition);
}

.service-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-lg);
  border-color: var(--secondary-color);
}

.service-card:hover::before {
  transform: scaleX(1);
}

.cert-card {
  background-color: var(--white);
  border-radius: 12px;
  padding: 1.5rem;
  border: 2px solid var(--light-sage);
  transition: var(--transition);
}

.cert-card:hover {
  border-color: var(--primary-color);
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
}

/* ===================================
   PORTFOLIO SECTION
   =================================== */
.portfolio-hero {
  background: linear-gradient(135deg, var(--primary-color) 0%, var(--dark-forest) 100%);
  padding: 6rem 0 4rem;
  color: var(--white) !important;
}

.portfolio-hero h1,
.portfolio-hero h2 {
  color: var(--white) !important;
}

.filter-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  justify-content: center;
  margin: 2rem 0;
}

.filter-btn {
  padding: 0.75rem 1.5rem;
  background-color: var(--white);
  color: var(--primary-color) !important;
  border: 2px solid var(--secondary-color);
  border-radius: 10px;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
  text-transform: uppercase;
  font-size: 0.875rem;
  letter-spacing: 0.5px;
}

.filter-btn:hover,
.filter-btn.active {
  background-color: var(--primary-color) !important;
  color: var(--white) !important;
  border-color: var(--primary-color);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.portfolio-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
  gap: 2rem;
  padding: 2rem 0;
}

.portfolio-item {
  position: relative;
  border-radius: 16px;
  overflow: hidden;
  cursor: pointer;
  transition: var(--transition);
  aspect-ratio: 4/3;
  background-color: var(--light-sage);
}

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

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

.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) 50%, transparent 100%);
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 2rem;
  opacity: 0;
  transition: var(--transition);
}

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

.project-category {
  color: var(--secondary-color) !important;
  font-size: 0.875rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 0.5rem;
}

.project-title {
  color: var(--white) !important;
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
}

.project-description {
  color: var(--light-sage) !important;
  font-size: 0.95rem;
  margin-bottom: 1rem;
}

.project-meta {
  display: flex;
  gap: 1.5rem;
  flex-wrap: wrap;
}

.meta-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--white) !important;
  font-size: 0.875rem;
}

/* ===================================
   STATS SECTION
   =================================== */
.stats-section {
  background: linear-gradient(135deg, var(--primary-color) 0%, var(--dark-forest) 100%);
  padding: 4rem 0;
  color: var(--white);
}

.stat-box {
  text-align: center;
  padding: 2rem;
  transition: var(--transition);
}

.stat-box:hover {
  transform: translateY(-5px);
}

.stat-number {
  font-size: 3rem;
  font-weight: 800;
  color: var(--white) !important;
  line-height: 1;
  margin-bottom: 0.5rem;
  display: block;
}

.stat-label {
  color: var(--secondary-color) !important;
  font-size: 1rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
}

/* ===================================
   TIMELINE
   =================================== */
.timeline-item {
  position: relative;
  padding-left: 3rem;
  margin-bottom: 3rem;
}

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

.timeline-item::after {
  content: '';
  position: absolute;
  left: 7px;
  top: 16px;
  width: 2px;
  height: calc(100% + 2rem);
  background-color: var(--light-sage);
}

.timeline-item:last-child::after {
  display: none;
}

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

.form-control,
.form-select {
  border: 2px solid var(--light-sage) !important;
  border-radius: 10px !important;
  padding: 0.75rem 1rem !important;
  transition: var(--transition);
  background-color: var(--white) !important;
  color: var(--dark-forest) !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;
  outline: none;
}

.form-control-lg,
.form-select-lg {
  padding: 1rem 1.25rem !important;
  font-size: 1rem !important;
  border-radius: 12px !important;
}

.form-check-input {
  width: 1.5rem;
  height: 1.5rem;
  border: 2px solid var(--primary-color) !important;
  cursor: pointer;
}

.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, 85, 48, 0.15) !important;
}

.form-check-label {
  color: var(--dark-forest) !important;
  cursor: pointer;
  margin-left: 0.5rem;
}

/* ===================================
   LIGHTBOX
   =================================== */
.lightbox {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(26, 58, 30, 0.95);
  z-index: 9999;
  display: none;
  align-items: center;
  justify-content: center;
  backdrop-filter: blur(10px);
}

.lightbox.active {
  display: flex;
}

.lightbox-content {
  position: relative;
  max-width: 90%;
  max-height: 90%;
  animation: zoomIn 0.3s ease-out;
}

.lightbox-image {
  max-width: 100%;
  max-height: 90vh;
  border-radius: 16px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}

.lightbox-close {
  position: absolute;
  top: -50px;
  right: 0;
  background-color: var(--white);
  color: var(--primary-color) !important;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 1.5rem;
  font-weight: 700;
  transition: var(--transition);
  border: none;
}

.lightbox-close:hover {
  background-color: var(--secondary-color);
  transform: rotate(90deg);
}

.lightbox-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background-color: var(--white);
  color: var(--primary-color) !important;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 1.5rem;
  transition: var(--transition);
  border: none;
}

.lightbox-nav:hover {
  background-color: var(--secondary-color);
  transform: translateY(-50%) scale(1.1);
}

.lightbox-prev {
  left: 2rem;
}

.lightbox-next {
  right: 2rem;
}

/* ===================================
   PROGRESS BARS
   =================================== */
.progress {
  height: 12px;
  border-radius: 10px;
  background-color: var(--light-sage) !important;
  overflow: hidden;
}

.progress-bar {
  background: linear-gradient(90deg, var(--primary-color), var(--secondary-color)) !important;
  transition: width 1.5s ease-out;
  border-radius: 10px;
}

/* ===================================
   IMAGES
   =================================== */
.img-fluid {
  border-radius: 16px;
  transition: var(--transition);
}

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

.rounded-start {
  border-top-left-radius: 16px !important;
  border-bottom-left-radius: 16px !important;
}

.rounded-end {
  border-top-right-radius: 16px !important;
  border-bottom-right-radius: 16px !important;
}

.rounded-circle {
  border-radius: 50% !important;
}

.shadow {
  box-shadow: var(--shadow-md) !important;
}

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

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

/* ===================================
   ICONS
   =================================== */
.bi {
  vertical-align: middle;
}

.d-inline-flex .bi {
  flex-shrink: 0;
}

/* Icon backgrounds */
.icon-wrapper {
  width: 60px;
  height: 60px;
  background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  color: var(--white) !important;
  margin-bottom: 1rem;
  transition: var(--transition);
}

.icon-wrapper:hover {
  transform: rotate(5deg) scale(1.1);
}

/* ===================================
   BLUEPRINT CORNER DECORATION
   =================================== */
.blueprint-corner {
  position: relative;
}

.blueprint-corner::before,
.blueprint-corner::after {
  content: '';
  position: absolute;
  width: 20px;
  height: 20px;
  border: 2px solid var(--secondary-color);
}

.blueprint-corner::before {
  top: 0;
  left: 0;
  border-right: none;
  border-bottom: none;
}

.blueprint-corner::after {
  bottom: 0;
  right: 0;
  border-left: none;
  border-top: none;
}

/* ===================================
   UTILITIES
   =================================== */
.text-primary {
  color: var(--primary-color) !important;
}

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

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

.text-muted {
  color: rgba(44, 85, 48, 0.6) !important;
}

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

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

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

.opacity-25 {
  opacity: 0.25 !important;
}

.opacity-75 {
  opacity: 0.75 !important;
}

.opacity-90 {
  opacity: 0.9 !important;
}

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

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

@keyframes zoomIn {
  from {
    opacity: 0;
    transform: scale(0.8);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

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

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

.fade-in {
  animation: fadeIn 0.6s ease-out;
}

.zoom-in {
  animation: zoomIn 0.5s ease-out;
}

/* Scroll animations */
.scroll-animate {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

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

/* ===================================
   RESPONSIVE DESIGN
   =================================== */
@media (max-width: 991.98px) {
  .portfolio-grid {
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.5rem;
  }
  
  .hero-section {
    min-height: 80vh;
  }
  
  .display-3 {
    font-size: 2.5rem !important;
  }
  
  .display-4 {
    font-size: 2rem !important;
  }
  
  .navbar-collapse {
    background-color: rgba(44, 85, 48, 0.98);
    margin-top: 1rem;
    padding: 1.5rem;
    border-radius: 12px;
  }
  
  .navbar-nav .nav-link {
    padding: 0.75rem 1rem !important;
    margin: 0.25rem 0;
  }
  
  .lightbox-nav {
    width: 40px;
    height: 40px;
    font-size: 1.2rem;
  }
  
  .lightbox-prev {
    left: 1rem;
  }
  
  .lightbox-next {
    right: 1rem;
  }
  
  .stat-number {
    font-size: 2.5rem;
  }
  
  .service-card {
    padding: 1.5rem;
  }
}

@media (max-width: 767.98px) {
  .portfolio-grid {
    grid-template-columns: 1fr;
  }
  
  .filter-buttons {
    gap: 0.5rem;
  }
  
  .filter-btn {
    padding: 0.6rem 1rem;
    font-size: 0.8rem;
  }
  
  .btn-lg {
    padding: 0.875rem 2rem !important;
    font-size: 0.95rem !important;
  }
  
  .lead {
    font-size: 1.1rem;
  }
  
  .card-body {
    padding: 1.5rem;
  }
  
  .timeline-item {
    padding-left: 2rem;
  }
  
  .stat-box {
    padding: 1.5rem 1rem;
  }
  
  .project-meta {
    gap: 1rem;
  }
}

@media (max-width: 575.98px) {
  .container-fluid {
    padding-left: 1rem !important;
    padding-right: 1rem !important;
  }
  
  .display-3 {
    font-size: 2rem !important;
  }
  
  .stat-number {
    font-size: 2rem;
  }
  
  .lightbox-content {
    max-width: 95%;
  }
  
  .lightbox-close {
    top: -40px;
    width: 35px;
    height: 35px;
    font-size: 1.2rem;
  }
  
  .portfolio-overlay {
    padding: 1.5rem;
  }
  
  .project-title {
    font-size: 1.25rem;
  }
}

/* ===================================
   PRINT STYLES
   =================================== */
@media print {
  .navbar,
  .btn,
  .filter-buttons,
  .lightbox {
    display: none !important;
  }
  
  body {
    background-color: white !important;
  }
  
  .card {
    break-inside: avoid;
  }
}

/* ===================================
   ACCESSIBILITY
   =================================== */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border-width: 0;
}

*:focus-visible {
  outline: 3px solid var(--secondary-color);
  outline-offset: 2px;
}

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

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}