/* Forest Flow Architecture Studio - CSS */

/* Reset and Base Styles */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --primary-color: #2C5F41;
  --secondary-color: #7BB3A3;
  --accent-color: #A8D5BA;
  --text-dark: #1a4332;
  --text-light: #6B7280;
  --bg-light: #F8FAF9;
  --bg-white: #FFFFFF;
  --success-color: #059669;
  --warning-color: #D97706;
  --error-color: #DC2626;
  --border-light: #E5E7EB;
  --shadow-light: rgba(44, 95, 65, 0.1);
  --shadow-medium: rgba(44, 95, 65, 0.2);
  --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  line-height: 1.6;
  color: var(--text-dark);
  background-color: var(--bg-white);
  font-size: 16px;
}

html {
  scroll-behavior: smooth;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
  font-weight: 600;
  line-height: 1.2;
  color: var(--text-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, 2rem);
}

p {
  margin-bottom: 1rem;
  color: var(--text-light);
}

a {
  text-decoration: none;
  color: var(--primary-color);
  transition: var(--transition);
}

a:hover {
  color: var(--secondary-color);
}

/* Bootstrap 5 Overrides */
.container-fluid {
  max-width: 1400px;
}

.btn {
  border-radius: 8px;
  font-weight: 500;
  padding: 0.75rem 2rem;
  text-transform: none;
  letter-spacing: 0.5px;
  transition: var(--transition);
  border: 2px solid transparent;
}

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

.btn-primary:hover {
  background-color: var(--text-dark);
  border-color: var(--text-dark);
  color: white;
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(44, 95, 65, 0.3);
}

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

.btn-outline-primary:hover {
  background-color: var(--primary-color);
  border-color: var(--primary-color);
  color: white;
  transform: translateY(-2px);
}

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

.btn-secondary:hover {
  background-color: var(--accent-color);
  border-color: var(--accent-color);
  color: var(--text-dark);
  transform: translateY(-2px);
}

/* Header & Navigation */
.navbar {
  background-color: rgba(248, 250, 249, 0.95);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border-light);
  padding: 1rem 0;
  transition: var(--transition);
}

.navbar.scrolled {
  background-color: rgba(255, 255, 255, 0.98);
  box-shadow: 0 4px 20px var(--shadow-light);
  padding: 0.5rem 0;
}

.navbar-brand {
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--primary-color);
  letter-spacing: -0.5px;
}

.navbar-brand:hover {
  color: var(--secondary-color);
}

.navbar-nav .nav-link {
  color: var(--text-dark);
  font-weight: 500;
  margin: 0 0.5rem;
  padding: 0.5rem 1rem;
  border-radius: 6px;
  transition: var(--transition);
  position: relative;
}

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

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

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

.navbar-toggler-icon {
  background-image: none;
  width: 24px;
  height: 18px;
  position: relative;
  transition: var(--transition);
}

.navbar-toggler-icon::before,
.navbar-toggler-icon::after,
.navbar-toggler-icon {
  background-color: var(--primary-color);
}

.navbar-toggler-icon::before,
.navbar-toggler-icon::after {
  content: '';
  position: absolute;
  width: 100%;
  height: 2px;
  left: 0;
  transition: var(--transition);
}

.navbar-toggler-icon::before {
  top: -6px;
}

.navbar-toggler-icon::after {
  bottom: -6px;
}

.navbar-toggler-icon {
  height: 2px;
  background-color: var(--primary-color);
}

/* Hero Section */
.hero {
  min-height: 100vh;
  background: linear-gradient(135deg, var(--bg-light) 0%, rgba(123, 179, 163, 0.1) 100%);
  display: flex;
  align-items: center;
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -50%;
  width: 100%;
  height: 200%;
  background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="grain" width="100" height="100" patternUnits="userSpaceOnUse"><circle cx="20" cy="20" r="1" fill="%232C5F41" opacity="0.1"/><circle cx="80" cy="80" r="1" fill="%237BB3A3" opacity="0.1"/><circle cx="40" cy="60" r="1" fill="%232C5F41" opacity="0.08"/></pattern></defs><rect width="100" height="100" fill="url(%23grain)"/></svg>') repeat;
  animation: float 20s ease-in-out infinite;
  opacity: 0.5;
}

@keyframes float {
  0%, 100% { transform: translateY(0px) rotate(0deg); }
  50% { transform: translateY(-20px) rotate(180deg); }
}

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

.hero h1 {
  background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
  background-clip: text;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  margin-bottom: 1.5rem;
}

.hero p {
  font-size: 1.25rem;
  margin-bottom: 2rem;
  color: var(--text-light);
}

.hero-buttons {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

/* Cards */
.card {
  border: none;
  border-radius: 16px;
  box-shadow: 0 4px 20px var(--shadow-light);
  transition: var(--transition);
  overflow: hidden;
  background-color: var(--bg-white);
}

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

.card-img-top {
  transition: var(--transition);
  height: 250px;
  object-fit: cover;
}

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

.card-body {
  padding: 2rem;
}

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

.card-text {
  color: var(--text-light);
  line-height: 1.6;
}

/* Sections */
.section {
  padding: 5rem 0;
}

.section-alt {
  background-color: var(--bg-light);
}

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

.section-title::after {
  content: '';
  position: absolute;
  bottom: -1rem;
  left: 50%;
  transform: translateX(-50%);
  width: 80px;
  height: 3px;
  background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
  border-radius: 3px;
}

/* Forms */
.form-control {
  border: 2px solid var(--border-light);
  border-radius: 8px;
  padding: 0.75rem 1rem;
  transition: var(--transition);
  background-color: var(--bg-white);
}

.form-control:focus {
  border-color: var(--secondary-color);
  box-shadow: 0 0 0 0.2rem rgba(123, 179, 163, 0.25);
  background-color: var(--bg-white);
}

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

.form-floating {
  position: relative;
}

.form-floating > .form-control {
  height: calc(3.5rem + 2px);
  padding: 1rem 0.75rem;
}

.form-floating > label {
  position: absolute;
  top: 0;
  left: 0;
  height: 100%;
  padding: 1rem 0.75rem;
  pointer-events: none;
  border: 1px solid transparent;
  transform-origin: 0 0;
  transition: opacity 0.1s ease-in-out, transform 0.1s ease-in-out;
  color: var(--text-light);
}

/* Form Validation */
.is-valid {
  border-color: var(--success-color);
}

.is-invalid {
  border-color: var(--error-color);
}

.valid-feedback {
  color: var(--success-color);
  font-size: 0.875rem;
  margin-top: 0.25rem;
}

.invalid-feedback {
  color: var(--error-color);
  font-size: 0.875rem;
  margin-top: 0.25rem;
}

/* Gallery */
.gallery-item {
  position: relative;
  overflow: hidden;
  border-radius: 12px;
  cursor: pointer;
  transition: var(--transition);
}

.gallery-item::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(45deg, rgba(44, 95, 65, 0.8), rgba(123, 179, 163, 0.8));
  opacity: 0;
  transition: var(--transition);
  z-index: 2;
}

.gallery-item:hover::before {
  opacity: 1;
}

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

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

.gallery-overlay {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  text-align: center;
  color: white;
  opacity: 0;
  transition: var(--transition);
  z-index: 3;
}

.gallery-item:hover .gallery-overlay {
  opacity: 1;
  transform: translate(-50%, -50%) translateY(-10px);
}

/* Timeline */
.timeline {
  position: relative;
  padding: 2rem 0;
}

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

.timeline-item {
  position: relative;
  margin: 2rem 0;
}

.timeline-content {
  background: var(--bg-white);
  border-radius: 12px;
  padding: 2rem;
  box-shadow: 0 4px 20px var(--shadow-light);
  position: relative;
  width: 45%;
  transition: var(--transition);
}

.timeline-item:nth-child(odd) .timeline-content {
  margin-left: auto;
  margin-right: 55%;
}

.timeline-item:nth-child(even) .timeline-content {
  margin-left: 55%;
  margin-right: auto;
}

.timeline-content:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 30px var(--shadow-medium);
}

.timeline-marker {
  position: absolute;
  left: 50%;
  top: 2rem;
  width: 16px;
  height: 16px;
  background-color: var(--secondary-color);
  border: 4px solid var(--bg-white);
  border-radius: 50%;
  transform: translateX(-50%);
  z-index: 2;
}

/* Footer */
.footer {
  background: linear-gradient(135deg, var(--primary-color) 0%, var(--text-dark) 100%);
  color: white;
  padding: 3rem 0 1rem;
}

.footer h5 {
  color: var(--accent-color);
  margin-bottom: 1rem;
  font-weight: 600;
}

.footer a {
  color: rgba(255, 255, 255, 0.8);
  transition: var(--transition);
}

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

.footer-divider {
  height: 1px;
  background: rgba(255, 255, 255, 0.2);
  margin: 2rem 0 1rem;
}

.footer-bottom {
  text-align: center;
  color: rgba(255, 255, 255, 0.6);
  font-size: 0.9rem;
}

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

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

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

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

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

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

/* Loading Animation */
.loading {
  position: relative;
  pointer-events: none;
}

.loading::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 20px;
  height: 20px;
  margin: -10px 0 0 -10px;
  border: 2px solid transparent;
  border-top: 2px solid var(--primary-color);
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* Back to Top Button */
.back-to-top {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  width: 50px;
  height: 50px;
  background: var(--primary-color);
  color: white;
  border: none;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  opacity: 0;
  visibility: hidden;
  transition: var(--transition);
  z-index: 1000;
  box-shadow: 0 4px 20px var(--shadow-medium);
}

.back-to-top.show {
  opacity: 1;
  visibility: visible;
}

.back-to-top:hover {
  background: var(--secondary-color);
  transform: translateY(-3px);
  color: var(--text-dark);
}

/* Responsive Design */
@media (max-width: 991.98px) {
  .navbar-collapse {
    background-color: rgba(255, 255, 255, 0.98);
    border-radius: 12px;
    padding: 1rem;
    margin-top: 1rem;
    box-shadow: 0 4px 20px var(--shadow-light);
  }
  
  .hero {
    text-align: center;
    padding: 2rem 0;
  }
  
  .hero-buttons {
    justify-content: center;
  }
  
  .timeline::before {
    left: 20px;
  }
  
  .timeline-content {
    width: calc(100% - 60px);
    margin-left: 60px;
    margin-right: 0;
  }
  
  .timeline-item:nth-child(odd) .timeline-content,
  .timeline-item:nth-child(even) .timeline-content {
    margin-left: 60px;
    margin-right: 0;
  }
  
  .timeline-marker {
    left: 20px;
  }
}

@media (max-width: 767.98px) {
  .section {
    padding: 3rem 0;
  }
  
  .card-body {
    padding: 1.5rem;
  }
  
  .btn {
    padding: 0.625rem 1.5rem;
  }
  
  .hero-buttons {
    flex-direction: column;
    align-items: center;
  }
  
  .hero-buttons .btn {
    width: 100%;
    max-width: 300px;
  }
  
  .back-to-top {
    bottom: 1rem;
    right: 1rem;
    width: 45px;
    height: 45px;
  }
}

@media (max-width: 575.98px) {
  .container-fluid {
    padding-left: 1rem;
    padding-right: 1rem;
  }
  
  .hero {
    min-height: 80vh;
  }
  
  .timeline-content {
    width: calc(100% - 40px);
    margin-left: 40px;
    padding: 1.5rem;
  }
  
  .timeline-item:nth-child(odd) .timeline-content,
  .timeline-item:nth-child(even) .timeline-content {
    margin-left: 40px;
  }
  
  .timeline::before {
    left: 15px;
  }
  
  .timeline-marker {
    left: 15px;
    width: 12px;
    height: 12px;
  }
}

/* Print Styles */
@media print {
  .navbar,
  .back-to-top,
  .hero-buttons {
    display: none;
  }
  
  body {
    font-size: 12pt;
    line-height: 1.4;
  }
  
  .section {
    page-break-inside: avoid;
    padding: 1rem 0;
  }
}