/* Forest Zenith Architecture Studio - Custom Styles */

/* CSS Custom Properties */
:root {
  --primary-color: #2C5F41;
  --secondary-color: #7FB069;
  --primary-light: #3A7A54;
  --primary-dark: #1E4029;
  --secondary-light: #9BC97D;
  --secondary-dark: #6B9C57;
  --accent-color: #A8D8A8;
  --text-dark: #1A2E1A;
  --text-light: #F8FBF8;
  --text-muted: #5A6B5A;
  --background-light: #FAFCFA;
  --background-neutral: #F0F5F0;
  --shadow-light: rgba(44, 95, 65, 0.1);
  --shadow-medium: rgba(44, 95, 65, 0.2);
  --shadow-heavy: rgba(44, 95, 65, 0.3);
  --gradient-primary: linear-gradient(135deg, var(--primary-color), var(--primary-light));
  --gradient-secondary: linear-gradient(135deg, var(--secondary-color), var(--secondary-light));
  --transition-fast: 0.2s ease-in-out;
  --transition-medium: 0.3s ease-in-out;
  --transition-slow: 0.5s ease-in-out;
  --border-radius-sm: 4px;
  --border-radius-md: 8px;
  --border-radius-lg: 16px;
}

/* Base Styles */
* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Inter', 'Segoe UI', system-ui, sans-serif;
  line-height: 1.6;
  color: var(--text-dark);
  background-color: var(--background-light);
  overflow-x: hidden;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
  font-family: 'Playfair Display', serif;
  font-weight: 600;
  line-height: 1.2;
  color: var(--primary-dark);
  margin-bottom: 1rem;
}

h1 {
  font-size: clamp(2.5rem, 5vw, 4rem);
  font-weight: 700;
}

h2 {
  font-size: clamp(2rem, 4vw, 3rem);
}

h3 {
  font-size: clamp(1.5rem, 3vw, 2.2rem);
}

p {
  margin-bottom: 1.25rem;
  color: var(--text-muted);
  font-size: 1.1rem;
}

.lead {
  font-size: 1.3rem;
  font-weight: 300;
  color: var(--text-muted);
}

/* Bootstrap Component Overrides */
.btn {
  border-radius: var(--border-radius-md);
  font-weight: 500;
  padding: 0.75rem 2rem;
  transition: all var(--transition-medium);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  font-size: 0.9rem;
  position: relative;
  overflow: hidden;
}

.btn-primary {
  background: var(--gradient-primary);
  border: 2px solid var(--primary-color);
  color: var(--text-light);
}

.btn-primary:hover {
  background: var(--primary-dark);
  border-color: var(--primary-dark);
  transform: translateY(-2px);
  box-shadow: 0 8px 25px var(--shadow-medium);
  color: var(--text-light);
}

.btn-primary:focus {
  box-shadow: 0 0 0 0.25rem rgba(44, 95, 65, 0.25);
  color: var(--text-light);
}

.btn-outline-primary {
  border: 2px solid var(--primary-color);
  color: var(--primary-color);
  background: transparent;
}

.btn-outline-primary:hover {
  background: var(--primary-color);
  border-color: var(--primary-color);
  color: var(--text-light);
  transform: translateY(-2px);
  box-shadow: 0 8px 25px var(--shadow-medium);
}

.btn-secondary {
  background: var(--gradient-secondary);
  border: 2px solid var(--secondary-color);
  color: var(--text-dark);
}

.btn-secondary:hover {
  background: var(--secondary-dark);
  border-color: var(--secondary-dark);
  color: var(--text-light);
  transform: translateY(-2px);
  box-shadow: 0 8px 25px var(--shadow-medium);
}

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

/* Card Components */
.card {
  border: none;
  border-radius: var(--border-radius-lg);
  box-shadow: 0 4px 20px var(--shadow-light);
  transition: all var(--transition-medium);
  overflow: hidden;
}

.card:hover {
  transform: translateY(-8px);
  box-shadow: 0 12px 40px var(--shadow-medium);
}

.card-img-top {
  transition: transform var(--transition-slow);
}

.card:hover .card-img-top {
  transform: scale(1.05);
}

.card-body {
  padding: 2rem;
}

.card-title {
  color: var(--primary-dark);
  font-size: 1.4rem;
  margin-bottom: 1rem;
}

.card-text {
  color: var(--text-muted);
  line-height: 1.7;
}

/* Navigation */
.navbar {
  background: rgba(248, 251, 248, 0.95) !important;
  backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(44, 95, 65, 0.1);
  transition: all var(--transition-medium);
  padding: 1rem 0;
}

.navbar.scrolled {
  background: rgba(248, 251, 248, 0.98) !important;
  box-shadow: 0 2px 20px var(--shadow-light);
  padding: 0.5rem 0;
}

.navbar-brand {
  font-family: 'Playfair Display', serif;
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--primary-color) !important;
  transition: color var(--transition-fast);
}

.navbar-brand:hover {
  color: var(--primary-dark) !important;
}

.navbar-nav .nav-link {
  color: var(--text-dark) !important;
  font-weight: 500;
  margin: 0 0.5rem;
  padding: 0.75rem 1rem !important;
  border-radius: var(--border-radius-md);
  transition: all var(--transition-fast);
  position: relative;
}

.navbar-nav .nav-link:hover,
.navbar-nav .nav-link.active {
  color: var(--primary-color) !important;
  background-color: rgba(44, 95, 65, 0.1);
}

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

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

.navbar-toggler {
  border: none;
  padding: 0.25rem 0.5rem;
}

.navbar-toggler:focus {
  box-shadow: none;
}

.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='%232C5F41' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='m4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e");
}

/* Hero Section */
.hero {
  min-height: 100vh;
  background: linear-gradient(135deg, rgba(44, 95, 65, 0.1), rgba(127, 176, 105, 0.1)),
              url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1000 1000"><defs><pattern id="forest" patternUnits="userSpaceOnUse" width="100" height="100"><circle cx="25" cy="25" r="2" fill="%232C5F41" opacity="0.1"/><circle cx="75" cy="75" r="1.5" fill="%237FB069" opacity="0.1"/></pattern></defs><rect width="100%" height="100%" fill="url(%23forest)"/></svg>');
  display: flex;
  align-items: center;
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(45deg, transparent 40%, rgba(127, 176, 105, 0.05) 50%, transparent 60%);
  animation: shimmer 8s ease-in-out infinite;
}

@keyframes shimmer {
  0%, 100% {
    transform: translateX(-100%);
  }
  50% {
    transform: translateX(100%);
  }
}

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

.hero h1 {
  color: var(--primary-dark);
  margin-bottom: 1.5rem;
  animation: fadeInUp 1s ease-out;
}

.hero .lead {
  animation: fadeInUp 1s ease-out 0.3s both;
}

.hero .btn {
  animation: fadeInUp 1s ease-out 0.6s both;
}

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

/* Section Spacing */
section {
  padding: 5rem 0;
}

.section-title {
  text-align: center;
  margin-bottom: 3rem;
  position: relative;
}

.section-title::after {
  content: '';
  position: absolute;
  bottom: -1rem;
  left: 50%;
  transform: translateX(-50%);
  width: 60px;
  height: 3px;
  background: var(--gradient-secondary);
  border-radius: 2px;
}

/* Project Gallery */
.project-item {
  position: relative;
  overflow: hidden;
  border-radius: var(--border-radius-lg);
  margin-bottom: 2rem;
  cursor: pointer;
}

.project-item img {
  width: 100%;
  height: 300px;
  object-fit: cover;
  transition: transform var(--transition-slow);
}

.project-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(135deg, rgba(44, 95, 65, 0.8), rgba(127, 176, 105, 0.8));
  color: var(--text-light);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  opacity: 0;
  transition: all var(--transition-medium);
  text-align: center;
  padding: 2rem;
}

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

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

.project-overlay h4 {
  color: var(--text-light);
  margin-bottom: 1rem;
}

.project-overlay p {
  color: rgba(248, 251, 248, 0.9);
  margin-bottom: 0;
}

/* Services Section */
.service-card {
  text-align: center;
  padding: 2.5rem 2rem;
  border-radius: var(--border-radius-lg);
  background: var(--background-light);
  border: 2px solid transparent;
  transition: all var(--transition-medium);
  height: 100%;
}

.service-card:hover {
  border-color: var(--secondary-color);
  background: var(--background-neutral);
  transform: translateY(-5px);
}

.service-icon {
  width: 80px;
  height: 80px;
  background: var(--gradient-secondary);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1.5rem;
  font-size: 2rem;
  color: var(--text-dark);
  transition: transform var(--transition-medium);
}

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

/* Contact Form */
.form-control {
  border: 2px solid rgba(44, 95, 65, 0.2);
  border-radius: var(--border-radius-md);
  padding: 0.75rem 1rem;
  font-size: 1rem;
  transition: all var(--transition-fast);
  background-color: var(--background-light);
}

.form-control:focus {
  border-color: var(--secondary-color);
  box-shadow: 0 0 0 0.25rem rgba(127, 176, 105, 0.25);
  background-color: var(--background-light);
}

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

.form-floating > .form-control {
  padding: 1rem 1rem 0.5rem;
}

.form-floating > label {
  padding: 1rem;
  color: var(--text-muted);
}

/* Footer */
.footer {
  background: var(--gradient-primary);
  color: var(--text-light);
  padding: 3rem 0 2rem;
  margin-top: 5rem;
}

.footer h5 {
  color: var(--text-light);
  margin-bottom: 1.5rem;
}

.footer p,
.footer a {
  color: rgba(248, 251, 248, 0.8);
  text-decoration: none;
  transition: color var(--transition-fast);
}

.footer a:hover {
  color: var(--accent-color);
}

.footer-bottom {
  border-top: 1px solid rgba(248, 251, 248, 0.2);
  margin-top: 2rem;
  padding-top: 2rem;
  text-align: center;
  color: rgba(248, 251, 248, 0.7);
}

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

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

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

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

/* Animation Classes */
.fade-in {
  opacity: 0;
  transform: translateY(30px);
  transition: all var(--transition-slow);
}

.fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}

.slide-in-left {
  opacity: 0;
  transform: translateX(-50px);
  transition: all var(--transition-slow);
}

.slide-in-left.visible {
  opacity: 1;
  transform: translateX(0);
}

.slide-in-right {
  opacity: 0;
  transform: translateX(50px);
  transition: all var(--transition-slow);
}

.slide-in-right.visible {
  opacity: 1;
  transform: translateX(0);
}

/* Loading Animation */
.loading {
  display: inline-block;
  width: 20px;
  height: 20px;
  border: 3px solid rgba(248, 251, 248, 0.3);
  border-radius: 50%;
  border-top-color: var(--text-light);
  animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

/* Responsive Design */
@media (max-width: 768px) {
  .hero {
    min-height: 80vh;
    text-align: center;
  }
  
  section {
    padding: 3rem 0;
  }
  
  .navbar-nav {
    background: var(--background-light);
    border-radius: var(--border-radius-md);
    margin-top: 1rem;
    padding: 1rem;
    box-shadow: 0 4px 20px var(--shadow-light);
  }
  
  .navbar-nav .nav-link {
    margin: 0.25rem 0;
  }
  
  .btn {
    padding: 0.75rem 1.5rem;
    font-size: 0.9rem;
  }
  
  .btn-lg {
    padding: 1rem 2rem;
  }
  
  .card-body {
    padding: 1.5rem;
  }
  
  .service-card {
    padding: 2rem 1.5rem;
    margin-bottom: 2rem;
  }
}

@media (max-width: 576px) {
  .container {
    padding-left: 1rem;
    padding-right: 1rem;
  }
  
  h1 {
    font-size: 2.5rem;
  }
  
  h2 {
    font-size: 2rem;
  }
  
  .service-icon {
    width: 60px;
    height: 60px;
    font-size: 1.5rem;
  }
  
  .project-item img {
    height: 250px;
  }
}

/* High contrast mode support */
@media (prefers-contrast: high) {
  :root {
    --shadow-light: rgba(0, 0, 0, 0.3);
    --shadow-medium: rgba(0, 0, 0, 0.5);
    --shadow-heavy: rgba(0, 0, 0, 0.7);
  }
  
  .btn {
    border-width: 3px;
  }
  
  .form-control {
    border-width: 3px;
  }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
  * {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  
  html {
    scroll-behavior: auto;
  }
}