/* ============================================
   Bolanos Complete Exteriors LLC
   Utah Mountain Aesthetic - Warm & Welcoming
   ============================================ */

:root {
  /* Utah Mountain Palette */
  --pine: #2d4a3e;
  --pine-light: #3d6b5a;
  --slate: #4a6fa5;
  --slate-light: #6b8fc4;
  --sandstone: #c4a574;
  --sandstone-light: #e8d4b8;
  --snow: #f8f6f3;
  --charcoal: #2c2c2c;
  --warm-white: #faf8f5;
  --accent-warm: #b8860b;
  --accent-warm-hover: #d4a017;
  
  /* Typography */
  --font-heading: 'Playfair Display', Georgia, serif;
  --font-body: 'Source Sans 3', 'Segoe UI', sans-serif;
  
  /* Spacing */
  --section-padding: 4rem 2rem;
  --container-max: 1200px;
  
  /* Transitions */
  --transition: 0.3s ease;
}

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-body);
  color: var(--charcoal);
  background: var(--warm-white);
  line-height: 1.6;
  overflow-x: hidden;
  -webkit-text-size-adjust: 100%;
}


/* Typography */
h1, h2, h3, h4 {
  font-family: var(--font-heading);
  font-weight: 600;
  line-height: 1.2;
}

h1 { font-size: clamp(2rem, 5vw, 3.5rem); }
h2 { font-size: clamp(1.75rem, 4vw, 2.5rem); }
h3 { font-size: clamp(1.25rem, 3vw, 1.5rem); }

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

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

/* Header & Navigation */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  background: rgba(248, 246, 243, 0.97);
  backdrop-filter: blur(10px);
  box-shadow: 0 2px 20px rgba(45, 74, 62, 0.08);
  transition: all var(--transition);
}

.site-header.scrolled {
  box-shadow: 0 4px 30px rgba(45, 74, 62, 0.12);
}

.nav-container {
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 1rem 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo {
  font-family: var(--font-heading);
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--pine);
}

.logo span {
  color: var(--accent-warm);
}

.nav-links {
  display: flex;
  gap: 2rem;
  list-style: none;
}

.nav-links a {
  font-weight: 500;
  color: var(--charcoal);
  position: relative;
}

.nav-links a::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--accent-warm);
  transition: width var(--transition);
}

.nav-links a:hover::after,
.nav-links a.active::after {
  width: 100%;
}

.nav-cta {
  background: var(--pine);
  color: white !important;
  padding: 0.6rem 1.5rem;
  border-radius: 8px;
}

.nav-cta:hover {
  background: var(--pine-light);
}

.nav-cta::after {
  display: none !important;
}

/* Mobile Menu */
.menu-toggle {
  display: none;
  background: none;
  border: none;
  font-size: 1.5rem;
  cursor: pointer;
  color: var(--pine);
}

/* Hero Sections */
.hero {
  min-height: 85vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 6rem 2rem 4rem;
  background: linear-gradient(135deg, var(--snow) 0%, var(--sandstone-light) 50%, var(--slate-light) 100%);
  background-size: 400% 400%;
  animation: gradientShift 15s ease infinite;
  position: relative;
  overflow: hidden;
}

.hero::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='%232d4a3e' fill-opacity='0.03'%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.5;
}

@keyframes gradientShift {
  0%, 100% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
}

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

.hero h1 {
  color: var(--pine);
  margin-bottom: 1rem;
  text-shadow: 0 2px 4px rgba(255,255,255,0.5);
}

.hero .tagline {
  font-size: 1.25rem;
  color: var(--charcoal);
  margin-bottom: 2rem;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}

.hero-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  justify-content: center;
  margin-bottom: 2rem;
}

.badge {
  background: rgba(255,255,255,0.9);
  padding: 0.5rem 1rem;
  border-radius: 50px;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--pine);
  box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

/* Buttons */
.btn {
  display: inline-block;
  padding: 1rem 2rem;
  font-weight: 600;
  border-radius: 8px;
  transition: all var(--transition);
  cursor: pointer;
  border: none;
  font-size: 1rem;
}

.btn-primary {
  background: var(--pine);
  color: white;
  box-shadow: 0 4px 15px rgba(45, 74, 62, 0.3);
}

.btn-primary:hover {
  background: var(--pine-light);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(45, 74, 62, 0.4);
}

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

.btn-secondary:hover {
  background: var(--pine);
  color: white;
}

.btn-accent {
  background: var(--accent-warm);
  color: white;
}

.btn-accent:hover {
  background: var(--accent-warm-hover);
  transform: translateY(-2px);
}

/* Sections */
section {
  padding: var(--section-padding);
  max-width: var(--container-max);
  margin: 0 auto;
  width: 100%;
}

.section-header {
  text-align: center;
  margin-bottom: 3rem;
}

.section-header h2 {
  color: var(--pine);
  margin-bottom: 0.5rem;
}

.section-header p {
  color: #666;
  font-size: 1.1rem;
}

/* Services Grid */
.services-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 2rem;
}

.service-card {
  background: white;
  padding: 2rem;
  border-radius: 12px;
  box-shadow: 0 4px 20px rgba(0,0,0,0.06);
  transition: all var(--transition);
  border: 1px solid rgba(45, 74, 62, 0.08);
}

.service-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 12px 40px rgba(45, 74, 62, 0.12);
}

.service-card .icon {
  font-size: 2.5rem;
  margin-bottom: 1rem;
  color: var(--accent-warm);
}

.service-card h3 {
  color: var(--pine);
  margin-bottom: 0.5rem;
}

/* Gallery / Projects */
.projects-filter {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  justify-content: center;
  margin-bottom: 2rem;
}

.filter-btn {
  padding: 0.5rem 1.25rem;
  border: 2px solid var(--pine);
  background: white;
  color: var(--pine);
  border-radius: 50px;
  cursor: pointer;
  font-weight: 600;
  transition: all var(--transition);
}

.filter-btn:hover,
.filter-btn.active {
  background: var(--pine);
  color: white;
}

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

.project-card {
  background: white;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 4px 20px rgba(0,0,0,0.06);
  transition: all var(--transition);
}

.project-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 12px 40px rgba(0,0,0,0.1);
}

.project-card img,
.project-card video {
  width: 100%;
  aspect-ratio: 4/3;
  min-height: 200px;
  object-fit: contain;
  display: block;
  background: #e8e6e3;
}

.project-card .content {
  padding: 1.5rem;
}

.project-card h3 {
  color: var(--pine);
  margin-bottom: 0.5rem;
}

.project-card .meta {
  font-size: 0.85rem;
  color: var(--accent-warm);
  font-weight: 600;
  margin-bottom: 0.5rem;
}


/* Contact */
.contact-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
}

.contact-info-card {
  background: white;
  padding: 2rem;
  border-radius: 12px;
  box-shadow: 0 4px 20px rgba(0,0,0,0.06);
}

.contact-info-card h3 {
  color: var(--pine);
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.contact-form input,
.contact-form textarea {
  width: 100%;
  padding: 1rem;
  margin-bottom: 1rem;
  border: 2px solid #e0e0e0;
  border-radius: 8px;
  font-family: inherit;
  transition: border-color var(--transition);
}

.contact-form input:focus,
.contact-form textarea:focus {
  outline: none;
  border-color: var(--pine);
}

.contact-form textarea {
  min-height: 150px;
  resize: vertical;
}

.contact-form .form-file-upload {
  margin-bottom: 1rem;
}
.contact-form .form-file-upload label {
  display: block;
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--charcoal);
  margin-bottom: 0.5rem;
}
.contact-form .form-file-upload input[type="file"] {
  width: 100%;
  padding: 0.75rem;
  font-size: 0.95rem;
  border: 2px solid #e0e0e0;
  border-radius: 8px;
  background: #fafafa;
  cursor: pointer;
}
.contact-form .form-file-upload input[type="file"]:focus {
  outline: none;
  border-color: var(--pine);
}
.contact-form .form-file-upload .file-hint {
  display: block;
  font-size: 0.85rem;
  color: #666;
  margin-top: 0.5rem;
}

/* Footer */
.site-footer {
  background: var(--pine);
  color: white;
  padding: 3rem 2rem 1.5rem;
  margin-top: 4rem;
}

.footer-content {
  max-width: var(--container-max);
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 2rem;
  margin-bottom: 2rem;
}

.footer-content h4 {
  color: var(--sandstone-light);
  margin-bottom: 1rem;
  font-size: 1rem;
}

.footer-content a {
  color: rgba(255,255,255,0.9);
}

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

.footer-bottom {
  text-align: center;
  padding-top: 1.5rem;
  border-top: 1px solid rgba(255,255,255,0.2);
  font-size: 0.9rem;
  opacity: 0.9;
}

.footer-bottom a {
  color: var(--sandstone-light);
}

/* Cookie Banner */
.cookie-banner {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: var(--charcoal);
  color: white;
  padding: 1.5rem 2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
  z-index: 9999;
  box-shadow: 0 -4px 20px rgba(0,0,0,0.2);
  transform: translateY(100%);
  transition: transform 0.4s ease;
}

.cookie-banner.show {
  transform: translateY(0);
}

.cookie-banner p {
  flex: 1;
  min-width: 250px;
}

.cookie-banner .btn {
  flex-shrink: 0;
}

/* Page-specific */
.page-hero {
  min-height: 40vh;
  padding: 8rem 2rem 4rem;
}

.contact-hero {
  padding-top: 14rem;
}

.license-badge {
  display: inline-block;
  background: var(--sandstone-light);
  color: var(--pine);
  padding: 0.5rem 1rem;
  border-radius: 8px;
  font-size: 0.9rem;
  font-weight: 600;
  margin-top: 1rem;
}

/* Video in gallery */
.project-card video {
  background: #000;
}

/* Gallery - Tabbed Layout */
.gallery-tabs {
  display: flex;
  justify-content: center;
  gap: 0;
  margin-bottom: 2rem;
  border-bottom: 2px solid #e0e0e0;
}

.gallery-tab {
  padding: 1rem 2rem;
  font-size: 1rem;
  font-weight: 600;
  color: #666;
  background: none;
  border: none;
  border-bottom: 3px solid transparent;
  margin-bottom: -2px;
  cursor: pointer;
  transition: all var(--transition);
}

.gallery-tab:hover {
  color: var(--pine);
}

.gallery-tab.active {
  color: var(--pine);
  border-bottom-color: var(--accent-warm);
}

.gallery-panel {
  display: none;
}

.gallery-panel.active {
  display: block;
}

.gallery-panel-title {
  font-family: var(--font-heading);
  font-size: 1.25rem;
  color: var(--pine);
  margin: 2rem 0 1rem;
}

.before-after-block {
  margin-bottom: 2rem;
  padding-bottom: 2rem;
  border-bottom: 1px solid #eee;
}

.before-after-block h3 {
  font-family: var(--font-heading);
  font-size: 1.25rem;
  color: var(--pine);
  margin-bottom: 0.25rem;
}

.before-after-block p {
  color: #666;
  font-size: 0.95rem;
  margin-bottom: 1rem;
}

.before-after-pair {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  border-radius: 12px;
  overflow: hidden;
}

.ba-cell {
  position: relative;
  background: #e8e6e3;
  border-radius: 8px;
  overflow: hidden;
}

.ba-cell img {
  width: 100%;
  aspect-ratio: 4/3;
  object-fit: contain;
  display: block;
}

.ba-label {
  position: absolute;
  bottom: 8px;
  padding: 0.25rem 0.75rem;
  background: rgba(45, 74, 62, 0.9);
  color: white;
  font-size: 0.8rem;
  font-weight: 600;
  border-radius: 4px;
}

.ba-cell:first-child .ba-label { left: 8px; }
.ba-cell:last-child .ba-label { right: 8px; left: auto; }

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 1.25rem;
}

.gallery-item {
  background: white;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 2px 10px rgba(0,0,0,0.06);
  transition: transform var(--transition), box-shadow var(--transition);
}

.gallery-item:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0,0,0,0.08);
}

.gallery-item img,
.gallery-item video {
  width: 100%;
  aspect-ratio: 4/3;
  min-height: 160px;
  object-fit: contain;
  display: block;
  background: #e8e6e3;
  cursor: pointer;
}

.gallery-item video {
  background: #1a1a1a;
  cursor: default;
}

.gallery-item .caption {
  padding: 0.75rem 1rem;
  font-size: 0.9rem;
  color: var(--charcoal);
}

.gallery-grid-no-captions .gallery-item .caption {
  display: none;
}

.gallery-cta {
  text-align: center;
  margin-top: 2.5rem;
}

/* SEO Content Blocks */
.seo-intro {
  max-width: 800px;
  margin: 0 auto 2rem;
  text-align: center;
}

.seo-intro h2 {
  font-size: 1.5rem;
  color: var(--pine);
  margin-bottom: 1rem;
}

.seo-intro p {
  color: #555;
  line-height: 1.7;
}

.seo-block {
  margin-bottom: 1.5rem;
}

.seo-block h2 {
  font-size: 1.25rem;
  color: var(--pine);
  margin-bottom: 0.5rem;
}

.seo-block p {
  color: #555;
  font-size: 0.95rem;
  line-height: 1.6;
}

.seo-block a {
  color: var(--slate);
  font-weight: 500;
}

.video-notice {
  margin-top: 1rem;
  padding: 1rem;
  background: var(--sandstone-light);
  border-radius: 8px;
}

.video-cta-card {
  text-align: center;
  padding: 2rem;
  background: var(--snow);
  border-radius: 12px;
  margin-top: 1rem;
}

.video-cta-card p {
  margin-bottom: 1rem;
  color: #555;
}

.seo-cta-block {
  text-align: center;
  padding: 2rem;
  background: var(--snow);
  border-radius: 12px;
  margin-top: 2rem;
}

.seo-cta-block h2 {
  margin-bottom: 0.75rem;
}

.seo-cta-block p {
  margin: 0 auto 1rem;
  max-width: 600px;
}

/* Inline Subscribe Form (within page content) */
.subscribe-inline {
  background: var(--snow);
  border-radius: 16px;
  padding: 2.5rem 2rem;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 1.5rem;
}

.subscribe-inline .subscribe-inline-text {
  flex: 1;
  min-width: 250px;
}

.subscribe-inline h3 {
  color: var(--pine);
  margin-bottom: 0.5rem;
}

.subscribe-inline p {
  color: #555;
  line-height: 1.7;
}

.subscribe-inline-form {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  align-items: center;
}

.subscribe-inline-form input {
  padding: 0.75rem 1rem;
  border: 2px solid #e0e0e0;
  border-radius: 8px;
  font-family: inherit;
  font-size: 1rem;
  min-width: 180px;
}

.subscribe-inline-form input:focus {
  outline: none;
  border-color: var(--pine);
}

.subscribe-inline-form .btn {
  padding: 0.75rem 1.5rem;
}

.subscribe-inline .subscribe-success-msg {
  display: none;
  color: var(--pine);
  font-weight: 600;
}

.subscribe-inline.subscribed .subscribe-inline-form {
  display: none;
}

.subscribe-inline.subscribed .subscribe-success-msg {
  display: block;
}

@media (max-width: 600px) {
  .subscribe-inline-form {
    flex-direction: column;
    width: 100%;
  }
  .subscribe-inline-form input {
    width: 100%;
    min-width: 0;
  }
  .subscribe-inline-form .btn {
    width: 100%;
  }
}

/* Work Slideshow */
.slideshow-wrapper {
  width: 100%;
  margin-bottom: 2rem;
}

.work-slideshow {
  position: relative;
  width: 640px;
  max-width: calc(100% - 2rem);
  margin-left: 50%;
  transform: translateX(-50%);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 4px 24px rgba(0,0,0,0.1);
  background: #e8e6e3;
}

.slideshow-inner {
  position: relative;
  aspect-ratio: 2/1;
  width: 100%;
  background: #e8e6e3;
}

.slideshow-inner .slide {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center center;
  opacity: 0;
  transition: opacity 0.5s ease;
  background: #e8e6e3;
  display: block;
  border: none;
  outline: none;
}

.slideshow-inner .slide.active {
  opacity: 1;
  z-index: 1;
}

.slide-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 44px;
  height: 44px;
  border: none;
  background: rgba(45, 74, 62, 0.85);
  color: white;
  font-size: 1.5rem;
  cursor: pointer;
  z-index: 2;
  transition: background var(--transition);
}

.slide-btn:hover {
  background: var(--pine);
}

.slide-prev { left: 0; }
.slide-next { right: 0; }

.slide-dots {
  position: absolute;
  bottom: 12px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 8px;
  z-index: 2;
}

.slide-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: rgba(255,255,255,0.5);
  border: none;
  cursor: pointer;
  padding: 0;
  transition: background var(--transition);
}

.slide-dot.active {
  background: white;
}

@media (max-width: 600px) {
  .work-slideshow {
    max-width: 100%;
  }
  
  .slide-btn {
    width: 36px;
    height: 36px;
    font-size: 1.25rem;
  }
  
  .before-after-pair {
    grid-template-columns: 1fr;
  }
  
  .gallery-tabs {
    flex-wrap: wrap;
    justify-content: stretch;
  }
  
  .gallery-tab {
    flex: 1;
    min-width: 0;
    padding: 0.875rem 0.5rem;
    font-size: 0.9rem;
  }
  
  .gallery-grid {
    grid-template-columns: 1fr;
  }
}

/* Lightbox */
.lightbox {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0,0,0,0.9);
  z-index: 10000;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

.lightbox.active {
  display: flex;
}

.lightbox img {
  max-width: 95%;
  max-height: 95vh;
  object-fit: contain;
}

.lightbox-close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  background: white;
  border: none;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  font-size: 1.5rem;
  cursor: pointer;
  line-height: 1;
}

/* Responsive - Mobile First Enhancements */
@media (max-width: 768px) {
  .nav-links {
    display: none;
  }
  
  .menu-toggle {
    display: block;
    padding: 0.5rem;
    min-width: 44px;
    min-height: 44px;
  }
  
  .nav-links.mobile-open {
    display: flex;
    flex-direction: column;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    padding: 1.5rem;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    gap: 0.5rem;
  }
  
  .nav-links a {
    padding: 0.75rem;
    min-height: 44px;
    display: flex;
    align-items: center;
  }
  
  .nav-container {
    padding: 0.75rem 1rem;
  }
  
  .logo {
    font-size: 1.1rem;
  }
  
  section {
    padding: 2rem 1rem;
  }
  
  .hero {
    padding: 5rem 1rem 3rem;
    min-height: 70vh;
  }
  
  .page-hero {
    padding: 6rem 1rem 3rem;
    min-height: 30vh;
  }
  
  .hero .tagline {
    font-size: 1rem;
  }
  
  .hero-badges {
    gap: 0.5rem;
  }
  
  .badge {
    font-size: 0.8rem;
    padding: 0.4rem 0.8rem;
  }
  
  .btn {
    padding: 0.875rem 1.5rem;
    font-size: 0.95rem;
    min-height: 44px;
  }
  
  .before-after-pair {
    grid-template-columns: 1fr;
  }
  
  .projects-grid {
    grid-template-columns: 1fr;
    gap: 1rem;
  }
  
  .gallery-grid {
    grid-template-columns: 1fr;
    gap: 1rem;
  }
  
  .service-card {
    padding: 1.5rem;
  }
  
  .contact-form input,
  .contact-form textarea {
    padding: 0.875rem;
    font-size: 16px; /* Prevents zoom on iOS */
  }
  
  .cookie-banner {
    padding: 1rem;
    flex-direction: column;
    text-align: center;
  }
  
  .cookie-banner .btn {
    width: 100%;
    min-height: 44px;
  }
  
  .footer-content {
    gap: 1.5rem;
    text-align: center;
  }
  
  .filter-btn {
    padding: 0.6rem 1rem;
    min-height: 44px;
    font-size: 0.9rem;
  }
}

/* Newsletter Subscribe Popup (Blog) */
.newsletter-popup-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: 10001;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

.newsletter-popup-overlay.show {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.newsletter-popup {
  background: white;
  border-radius: 16px;
  padding: 2rem;
  max-width: 420px;
  max-height: 90vh;
  overflow-y: auto;
  width: 100%;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.2);
  position: relative;
  transform: scale(0.95);
  transition: transform 0.3s ease;
}

.newsletter-popup-overlay.show .newsletter-popup {
  transform: scale(1);
}

.newsletter-popup-close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  background: none;
  border: none;
  font-size: 1.5rem;
  cursor: pointer;
  color: #666;
  line-height: 1;
  padding: 0.25rem;
  transition: color var(--transition);
}

.newsletter-popup-close:hover {
  color: var(--pine);
}

.newsletter-popup h3 {
  color: var(--pine);
  font-size: 1.5rem;
  margin-bottom: 0.5rem;
  padding-right: 2rem;
}

.newsletter-popup p {
  color: #555;
  font-size: 0.95rem;
  margin-bottom: 1.5rem;
  line-height: 1.6;
}

.newsletter-popup .form-row {
  margin-bottom: 0;
  margin-top: 0.5rem;
}

.newsletter-popup input[type="text"],
.newsletter-popup input[type="email"],
.newsletter-popup input[type="tel"] {
  width: 100%;
  padding: 0.75rem 1rem;
  margin-bottom: 0.5rem;
  border: 2px solid #e0e0e0;
  border-radius: 8px;
  font-family: inherit;
  font-size: 0.95rem;
  transition: border-color var(--transition);
}

.newsletter-popup input:focus {
  outline: none;
  border-color: var(--pine);
}

.newsletter-popup .btn-subscribe {
  padding: 0.875rem 1.5rem;
  background: var(--pine);
  color: white;
  border: none;
  border-radius: 8px;
  font-weight: 600;
  font-size: 1rem;
  cursor: pointer;
  white-space: nowrap;
  transition: background var(--transition);
}

.newsletter-popup .btn-subscribe:hover {
  background: var(--pine-light);
}

.newsletter-popup .success-message {
  display: none;
  color: var(--pine);
  font-weight: 600;
  margin-top: 1rem;
}

.newsletter-popup.subscribed input,
.newsletter-popup.subscribed .form-row,
.newsletter-popup.subscribed .btn-subscribe {
  display: none;
}

.newsletter-popup.subscribed .success-message {
  display: block;
}

@media (max-width: 480px) {
  .nav-container {
    padding: 0.5rem 0.75rem;
  }
  
  .logo {
    font-size: 1rem;
  }
  
  section {
    padding: 1.5rem 0.75rem;
  }
}

/* Blog Styles */
.blog-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 2rem;
}

.blog-card {
  background: white;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 4px 20px rgba(0,0,0,0.06);
  transition: all var(--transition);
  border: 1px solid rgba(45, 74, 62, 0.08);
}

.blog-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 12px 40px rgba(45, 74, 62, 0.12);
}

.blog-card img {
  width: 100%;
  aspect-ratio: 16/10;
  object-fit: cover;
  display: block;
}

.blog-card .content {
  padding: 1.5rem;
}

.blog-card .meta {
  font-size: 0.85rem;
  color: var(--accent-warm);
  font-weight: 600;
  margin-bottom: 0.5rem;
}

.blog-card h3 {
  color: var(--pine);
  margin-bottom: 0.75rem;
  font-size: 1.2rem;
  line-height: 1.3;
}

.blog-card p {
  color: #555;
  font-size: 0.95rem;
  line-height: 1.6;
}

.blog-card .read-more {
  display: inline-block;
  margin-top: 1rem;
  font-weight: 600;
  color: var(--slate);
}

.blog-card .read-more:hover {
  color: var(--accent-warm);
}

/* Blog Post Single */
.blog-post {
  max-width: 800px;
  margin: 0 auto;
}

.blog-post .featured-image {
  width: 100%;
  border-radius: 12px;
  overflow: hidden;
  margin-bottom: 2rem;
  box-shadow: 0 4px 24px rgba(0,0,0,0.1);
}

.blog-post .featured-image img {
  width: 100%;
  display: block;
  aspect-ratio: 16/9;
  object-fit: cover;
}

.blog-post .post-meta {
  font-size: 0.9rem;
  color: #666;
  margin-bottom: 1.5rem;
}

.blog-post h1 {
  color: var(--pine);
  margin-bottom: 1.5rem;
  font-size: clamp(1.75rem, 4vw, 2.5rem);
}

.blog-post .content h2 {
  color: var(--pine);
  font-size: 1.5rem;
  margin: 2.5rem 0 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 2px solid var(--sandstone-light);
}

.blog-post .content h3 {
  color: var(--pine);
  font-size: 1.2rem;
  margin: 1.5rem 0 0.75rem;
}

.blog-post .content p {
  margin-bottom: 1.25rem;
  line-height: 1.8;
  color: #444;
}

.blog-post .content ul, .blog-post .content ol {
  margin: 1rem 0 1.5rem 1.5rem;
  line-height: 1.8;
}

.blog-post .content li {
  margin-bottom: 0.5rem;
}

.blog-post .content img {
  max-width: 100%;
  height: auto;
  border-radius: 8px;
  margin: 1.5rem 0;
  box-shadow: 0 2px 12px rgba(0,0,0,0.08);
}

.blog-post .cta-box {
  background: linear-gradient(135deg, var(--pine) 0%, var(--pine-light) 100%);
  color: white;
  padding: 2rem;
  border-radius: 12px;
  margin: 2.5rem 0;
  text-align: center;
}

.blog-post .cta-box h3 {
  color: white;
  margin-bottom: 0.75rem;
}

.blog-post .cta-box p {
  color: rgba(255,255,255,0.95);
  margin-bottom: 1rem;
}

.blog-post .cta-box .btn {
  background: var(--accent-warm);
  color: white;
}

.blog-post .cta-box .btn:hover {
  background: var(--accent-warm-hover);
}

.blog-post .back-link {
  display: inline-block;
  margin-bottom: 1.5rem;
  color: var(--slate);
  font-weight: 500;
}

.blog-post .back-link:hover {
  color: var(--accent-warm);
}
