/* Forest Storm Architecture Studio Theme */
/* Author: Professional CSS Framework */
/* Primary: #2C5F41 (Forest Green) | Secondary: #F4A460 (Sandy Brown) */

/* ===========================
   CSS CUSTOM PROPERTIES
   =========================== */
:root {
  --primary-color: #2C5F41;
  --primary-dark: #1f4230;
  --primary-light: #3a7a54;
  --secondary-color: #F4A460;
  --secondary-dark: #e8934a;
  --secondary-light: #f7b67d;
  --dark-bg: #1a1a1a;
  --light-bg: #f8f9fa;
  --white: #ffffff;
  --text-dark: #2d2d2d;
  --text-light: #6c757d;
  --border-color: #e0e0e0;
  --shadow-sm: 0 2px 4px rgba(44, 95, 65, 0.1);
  --shadow-md: 0 4px 12px rgba(44, 95, 65, 0.15);
  --shadow-lg: 0 8px 24px rgba(44, 95, 65, 0.2);
  --transition-base: all 0.3s ease;
  --transition-fast: all 0.2s ease;
  --font-primary: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-heading: 'Playfair Display', Georgia, serif;
}

/* ===========================
   BASE STYLES
   =========================== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  font-family: var(--font-primary);
  font-size: 1rem;
  line-height: 1.7;
  color: var(--text-dark);
  background-color: var(--white);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* ===========================
   TYPOGRAPHY
   =========================== */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  font-weight: 700;
  line-height: 1.3;
  color: var(--primary-color);
  margin-bottom: 1rem;
}

h1 {
  font-size: clamp(2.5rem, 5vw, 4rem);
  letter-spacing: -0.02em;
}

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

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

h4 {
  font-size: clamp(1.25rem, 2.5vw, 1.5rem);
}

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

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

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

/* ===========================
   BOOTSTRAP 5 OVERRIDES
   =========================== */
.container {
  max-width: 1320px;
}

/* Buttons */
.btn {
  padding: 0.875rem 2rem;
  font-size: 1rem;
  font-weight: 600;
  border-radius: 0;
  border: none;
  transition: var(--transition-base);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  position: relative;
  overflow: hidden;
}

.btn::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: rgba(255, 255, 255, 0.1);
  transition: var(--transition-base);
}

.btn:hover::before {
  left: 100%;
}

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

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

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

.btn-secondary:hover,
.btn-secondary:focus,
.btn-secondary:active {
  background-color: var(--secondary-dark);
  border-color: var(--secondary-dark);
  color: var(--white);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

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

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

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

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

/* Cards */
.card {
  border: none;
  border-radius: 0;
  box-shadow: var(--shadow-sm);
  transition: var(--transition-base);
  overflow: hidden;
}

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

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

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

/* Forms */
.form-control,
.form-select {
  padding: 0.875rem 1rem;
  border: 2px solid var(--border-color);
  border-radius: 0;
  transition: var(--transition-fast);
  color: var(--text-dark);
}

.form-control:focus,
.form-select:focus {
  border-color: var(--primary-color);
  box-shadow: 0 0 0 0.2rem rgba(44, 95, 65, 0.15);
  outline: none;
}

.form-control.is-invalid {
  border-color: #dc3545;
}

.form-control.is-valid {
  border-color: var(--primary-color);
}

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

.invalid-feedback,
.valid-feedback {
  font-size: 0.875rem;
  margin-top: 0.25rem;
}

/* Navbar */
.navbar {
  padding: 1.5rem 0;
  transition: var(--transition-base);
  background-color: transparent;
}

.navbar.scrolled {
  padding: 1rem 0;
  background-color: rgba(44, 95, 65, 0.98);
  box-shadow: var(--shadow-md);
}

.navbar-brand {
  font-family: var(--font-heading);
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--white);
  letter-spacing: 1px;
}

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

.navbar-nav .nav-link {
  color: rgba(255, 255, 255, 0.9);
  font-weight: 500;
  padding: 0.5rem 1.25rem;
  position: relative;
  text-transform: uppercase;
  font-size: 0.9rem;
  letter-spacing: 0.5px;
}

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

.navbar-nav .nav-link:hover,
.navbar-nav .nav-link.active {
  color: var(--white);
}

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

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

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

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

.hero::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-image: url('data:image/svg+xml,%3Csvg width="100" height="100" xmlns="http://www.w3.org/2000/svg"%3E%3Cpath d="M0 0h50v50H0z" fill="%23000" fill-opacity=".03"/%3E%3C/svg%3E');
  opacity: 0.5;
}

.hero-content {
  position: relative;
  z-index: 2;
  text-align: center;
  color: var(--white);
  padding: 2rem;
}

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

.hero-content p {
  color: rgba(255, 255, 255, 0.9);
  font-size: 1.25rem;
  max-width: 600px;
  margin: 0 auto 2rem;
  animation: fadeInUp 1s ease-out 0.2s both;
}

.hero-buttons {
  animation: fadeInUp 1s ease-out 0.4s both;
}

.hero-buttons .btn {
  margin: 0.5rem;
}

/* Storm Effect */
.storm-effect {
  position: absolute;
  width: 100%;
  height: 100%;
  top: 0;
  left: 0;
  overflow: hidden;
  z-index: 1;
}

.leaf {
  position: absolute;
  background: var(--secondary-color);
  opacity: 0.3;
  animation: fall linear infinite;
}

.leaf:nth-child(1) { left: 10%; width: 8px; height: 8px; animation-duration: 15s; animation-delay: 0s; }
.leaf:nth-child(2) { left: 20%; width: 6px; height: 6px; animation-duration: 18s; animation-delay: 2s; }
.leaf:nth-child(3) { left: 30%; width: 10px; height: 10px; animation-duration: 20s; animation-delay: 4s; }
.leaf:nth-child(4) { left: 40%; width: 7px; height: 7px; animation-duration: 16s; animation-delay: 6s; }
.leaf:nth-child(5) { left: 50%; width: 9px; height: 9px; animation-duration: 19s; animation-delay: 1s; }
.leaf:nth-child(6) { left: 60%; width: 8px; height: 8px; animation-duration: 17s; animation-delay: 3s; }
.leaf:nth-child(7) { left: 70%; width: 6px; height: 6px; animation-duration: 21s; animation-delay: 5s; }
.leaf:nth-child(8) { left: 80%; width: 10px; height: 10px; animation-duration: 15s; animation-delay: 7s; }
.leaf:nth-child(9) { left: 90%; width: 7px; height: 7px; animation-duration: 18s; animation-delay: 2s; }
.leaf:nth-child(10) { left: 95%; width: 9px; height: 9px; animation-duration: 16s; animation-delay: 4s; }

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

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

.section-title h2 {
  display: inline-block;
  position: relative;
  padding-bottom: 1rem;
}

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

.section-subtitle {
  color: var(--text-light);
  font-size: 1.1rem;
  max-width: 700px;
  margin: 1rem auto 0;
  text-align: center;
}

/* Alternate Section Backgrounds */
.section-alt {
  background-color: var(--light-bg);
}

.section-dark {
  background-color: var(--primary-dark);
  color: var(--white);
}

.section-dark h2,
.section-dark h3,
.section-dark h4 {
  color: var(--white);
}

.section-dark p {
  color: rgba(255, 255, 255, 0.9);
}

/* ===========================
   PORTFOLIO/PROJECTS
   =========================== */
.project-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 2rem;
  margin-top: 3rem;
}

.project-item {
  position: relative;
  overflow: hidden;
  cursor: pointer;
  aspect-ratio: 4/3;
  border-radius: 0;
}

.project-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: var(--transition-base);
}

.project-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(to top, rgba(44, 95, 65, 0.95), rgba(44, 95, 65, 0.5));
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 2rem;
  opacity: 0;
  transition: var(--transition-base);
}

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

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

.project-title {
  color: var(--white);
  font-size: 1.5rem;
  margin-bottom: 0.5rem;
  transform: translateY(20px);
  transition: var(--transition-base);
}

.project-category {
  color: var(--secondary-color);
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  transform: translateY(20px);
  transition: var(--transition-base) 0.1s;
}

.project-item:hover .project-title,
.project-item:hover .project-category {
  transform: translateY(0);
}

/* ===========================
   SERVICES
   =========================== */
.service-card {
  background: var(--white);
  padding: 2.5rem;
  text-align: center;
  transition: var(--transition-base);
  border: 2px solid transparent;
  height: 100%;
}

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

.service-icon {
  width: 80px;
  height: 80px;
  margin: 0 auto 1.5rem;
  background: linear-gradient(135deg, var(--primary-color), var(--primary-light));
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  color: var(--white);
  transition: var(--transition-base);
}

.service-card:hover .service-icon {
  background: linear-gradient(135deg, var(--secondary-color), var(--secondary-light));
  transform: rotateY(360deg);
}

.service-title {
  font-size: 1.5rem;
  margin-bottom: 1rem;
  color: var(--primary-color);
}

.service-description {
  color: var(--text-light);
  line-height: 1.8;
}

/* ===========================
   TESTIMONIALS
   =========================== */
.testimonial-card {
  background: var(--white);
  padding: 2.5rem;
  box-shadow: var(--shadow-md);
  position: relative;
  margin: 1rem;
}

.testimonial-card::before {
  content: '"';
  position: absolute;
  top: -20px;
  left: 20px;
  font-size: 6rem;
  color: var(--secondary-color);
  opacity: 0.2;
  font-family: Georgia, serif;
  line-height: 1;
}

.testimonial-text {
  font-size: 1.1rem;
  font-style: italic;
  color: var(--text-dark);
  margin-bottom: 1.5rem;
  position: relative;
  z-index: 1;
}

.testimonial-author {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.author-image {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid var(--secondary-color);
}

.author-info h5 {
  color: var(--primary-color);
  margin-bottom: 0.25rem;
  font-size: 1rem;
}

.author-info p {
  color: var(--text-light);
  font-size: 0.9rem;
  margin-bottom: 0;
}

/* ===========================
   CONTACT FORM
   =========================== */
.contact-form {
  background: var(--white);
  padding: 3rem;
  box-shadow: var(--shadow-lg);
}

.contact-info {
  background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
  padding: 3rem;
  color: var(--white);
  height: 100%;
}

.contact-info h3 {
  color: var(--white);
  margin-bottom: 2rem;
}

.contact-item {
  display: flex;
  align-items: start;
  margin-bottom: 2rem;
  gap: 1rem;
}

.contact-icon {
  width: 45px;
  height: 45px;
  background: var(--secondary-color);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-size: 1.25rem;
}

.contact-details h5 {
  color: var(--white);
  font-size: 1rem;
  margin-bottom: 0.5rem;
}

.contact-details p {
  color: rgba(255, 255, 255, 0.9);
  margin-bottom: 0;
}

.contact-details a {
  color: rgba(255, 255, 255, 0.9);
}

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

/* ===========================
   FOOTER
   =========================== */
footer {
  background-color: var(--dark-bg);
  color: rgba(255, 255, 255, 0.8);
  padding: 4rem 0 2rem;
}

.footer-content {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 3rem;
  margin-bottom: 3rem;
}

.footer-section h4 {
  color: var(--white);
  margin-bottom: 1.5rem;
  font-size: 1.25rem;
}

.footer-section p,
.footer-section a {
  color: rgba(255, 255, 255, 0.7);
  line-height: 2;
}

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

.footer-links {
  list-style: none;
}

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

.footer-links a {
  display: inline-block;
  transition: var(--transition-fast);
}

.social-links {
  display: flex;
  gap: 1rem;
  margin-top: 1.5rem;
}

.social-icon {
  width: 45px;
  height: 45px;
  background: var(--primary-color);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--white);
  transition: var(--transition-base);
  font-size: 1.25rem;
}

.social-icon:hover {
  background: var(--secondary-color);
  transform: translateY(-5px);
  color: var(--white);
}

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding-top: 2rem;
  text-align: center;
}

.footer-bottom p {
  color: rgba(255, 255, 255, 0.6);
  margin-bottom: 0;
}

/* ===========================
   BACK TO TOP BUTTON
   =========================== */
.back-to-top {
  position: fixed;
  bottom: 30px;
  right: 30px;
  width: 50px;
  height: 50px;
  background: var(--secondary-color);
  color: var(--white);
  border: none;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  transition: var(--transition-base);
  z-index: 1000;
  box-shadow: var(--shadow-md);
  font-size: 1.5rem;
}

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

.back-to-top:hover {
  background: var(--primary-color);
  transform: translateY(-5px);
}

/* ===========================
   LOADING ANIMATION
   =========================== */
.loading-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: var(--primary-dark);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  transition: opacity 0.5s, visibility 0.5s;
}

.loading-overlay.hidden {
  opacity: 0;
  visibility: hidden;
}

.spinner {
  width: 60px;
  height: 60px;
  border: 4px solid rgba(255, 255, 255, 0.2);
  border-top-color: var(--secondary-color);
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

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

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

@keyframes fall {
  0% {
    top: -10%;
    transform: translateX(0) rotate(0deg);
  }
  100% {
    top: 110%;
    transform: translateX(100px) rotate(360deg);
  }
}

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

@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);
  }
}

/* Scroll Animations */
.fade-in {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

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

.slide-in-left {
  opacity: 0;
  transform: translateX(-50px);
  transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

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

.slide-in-right {
  opacity: 0;
  transform: translateX(50px);
  transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

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

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

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

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

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

.overlay {
  position: relative;
}

.overlay::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(44, 95, 65, 0.7);
  z-index: 1;
}

.overlay > * {
  position: relative;
  z-index: 2;
}

/* ===========================
   RESPONSIVE DESIGN
   =========================== */
@media (max-width: 991px) {
  .navbar-collapse {
    background-color: rgba(44, 95, 65, 0.98);
    padding: 1rem;
    margin-top: 1rem;
    box-shadow: var(--shadow-md);
  }
  
  .navbar-nav .nav-link {
    padding: 0.75rem 1rem;
  }
  
  .navbar-nav .nav-link::after {
    display: none;
  }
  
  section {
    padding: 3rem 0;
  }
  
  .contact-form,
  .contact-info {
    padding: 2rem;
  }
}

@media (max-width: 768px) {
  h1 {
    font-size: 2.5rem;
  }
  
  h2 {
    font-size: 2rem;
  }
  
  .hero-content p {
    font-size: 1.1rem;
  }
  
  .btn {
    padding: 0.75rem 1.5rem;
    font-size: 0.9rem;
  }
  
  .project-grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }
  
  .service-card {
    padding: 2rem;
  }
  
  .footer-content {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
  
  .back-to-top {
    bottom: 20px;
    right: 20px;
    width: 45px;
    height: 45px;
  }
}

@media (max-width: 576px) {
  html {
    font-size: 14px;
  }
  
  .container {
    padding-left: 1rem;
    padding-right: 1rem;
  }
  
  section {
    padding: 2rem 0;
  }
  
  .section-title {
    margin-bottom: 2rem;
  }
  
  .hero {
    min-height: 100svh;
  }
  
  .hero-buttons .btn {
    display: block;
    width: 100%;
    margin: 0.5rem 0;
  }
  
  .testimonial-card {
    padding: 1.5rem;
  }
  
  .contact-form {
    padding: 1.5rem;
  }
  
  .contact-info {
    padding: 2rem 1.5rem;
  }
}

/* ===========================
   PRINT STYLES
   =========================== */
@media print {
  .navbar,
  .back-to-top,
  .storm-effect,
  footer {
    display: none;
  }
  
  body {
    font-size: 12pt;
    line-height: 1.5;
    color: #000;
  }
  
  a {
    text-decoration: underline;
  }
}