/* ============================================
   IMBLER RURAL FIRE DEPARTMENT — STYLES
   Palette: Charcoal (#1A2332 / #2C3E50) + Coral (#E85D4A / #F0706A)
   Fonts: Outfit (headings) + Inter (body)
============================================ */

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

:root {
  --charcoal: #1A2332;
  --charcoal-light: #2C3E50;
  --charcoal-soft: #3D4F63;
  --coral: #E85D4A;
  --coral-light: #F0706A;
  --coral-dark: #C94A38;
  --off-white: #F7F8FA;
  --white: #FFFFFF;
  --gray-100: #F0F2F5;
  --gray-200: #E2E6EB;
  --gray-400: #9AA3AF;
  --gray-600: #6B7A8D;
  --gray-800: #3A4A5C;
  --nav-height: 72px;
  --radius: 10px;
  --radius-lg: 16px;
  --shadow-sm: 0 1px 3px rgba(26, 35, 50, 0.08);
  --shadow-md: 0 4px 16px rgba(26, 35, 50, 0.10);
  --shadow-lg: 0 8px 32px rgba(26, 35, 50, 0.14);
  --transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: var(--nav-height);
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  color: var(--charcoal);
  background: var(--white);
  line-height: 1.6;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4 {
  font-family: 'Outfit', sans-serif;
  line-height: 1.2;
  font-weight: 700;
}

a {
  color: inherit;
  text-decoration: none;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}

/* ============================================
   NAVBAR
============================================ */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--nav-height);
  background: rgba(26, 35, 50, 0.95);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  z-index: 1000;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  transition: background var(--transition);
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
}

.nav-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
}

.nav-brand-text {
  font-family: 'Outfit', sans-serif;
  font-size: 13px;
  font-weight: 700;
  color: var(--white);
  letter-spacing: 0.06em;
  line-height: 1.3;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 32px;
}

.nav-links a:not(.nav-cta) {
  font-size: 14px;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.72);
  transition: color var(--transition);
  position: relative;
}

.nav-links a:not(.nav-cta):hover {
  color: var(--white);
}

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

.nav-links a:not(.nav-cta):hover::after {
  width: 100%;
}

.nav-cta {
  display: flex;
  align-items: center;
  gap: 6px;
  background: var(--coral);
  color: var(--white) !important;
  font-size: 14px;
  font-weight: 600;
  padding: 9px 18px;
  border-radius: 50px;
  transition: background var(--transition), transform var(--transition);
}

.nav-cta:hover {
  background: var(--coral-dark);
  transform: translateY(-1px);
}

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

/* Mobile toggle */
.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
}

.hamburger {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--white);
  border-radius: 2px;
  transition: var(--transition);
  transform-origin: center;
}

.nav-toggle[aria-expanded="true"] .hamburger:nth-child(1) {
  transform: rotate(45deg) translate(5px, 5px);
}
.nav-toggle[aria-expanded="true"] .hamburger:nth-child(2) {
  opacity: 0;
}
.nav-toggle[aria-expanded="true"] .hamburger:nth-child(3) {
  transform: rotate(-45deg) translate(5px, -5px);
}

/* ============================================
   HERO
============================================ */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: calc(var(--nav-height) + 40px) 24px 60px;
  overflow: hidden;
}

.hero-bg {
  position: absolute;
  inset: 0;
  background:
    url('https://images.pexels.com/photos/36866655/pexels-photo-36866655.jpeg?auto=compress&cs=tinysrgb&fit=crop&w=1920&h=1080')
    center center / cover no-repeat;
  z-index: 0;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    135deg,
    rgba(26, 35, 50, 0.92) 0%,
    rgba(44, 62, 80, 0.85) 50%,
    rgba(232, 93, 74, 0.60) 100%
  );
  z-index: 1;
}

.hero-content {
  position: relative;
  z-index: 2;
  text-align: center;
  max-width: 820px;
  padding-top: 20px;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(232, 93, 74, 0.18);
  border: 1px solid rgba(232, 93, 74, 0.4);
  color: var(--coral-light);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 8px 18px;
  border-radius: 50px;
  margin-bottom: 28px;
}

.hero-headline {
  font-size: clamp(2.4rem, 5.5vw, 4.2rem);
  color: var(--white);
  font-weight: 800;
  margin-bottom: 24px;
  letter-spacing: -0.02em;
  line-height: 1.1;
}

.hero-headline em {
  font-style: normal;
  color: var(--coral-light);
}

.hero-sub {
  font-size: clamp(1rem, 1.8vw, 1.2rem);
  color: rgba(255, 255, 255, 0.78);
  max-width: 620px;
  margin: 0 auto 40px;
  line-height: 1.7;
}

.hero-actions {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 56px;
}

.hero-stats {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 40px;
  flex-wrap: wrap;
}

.stat {
  text-align: center;
}

.stat-num {
  display: block;
  font-family: 'Outfit', sans-serif;
  font-size: 2rem;
  font-weight: 800;
  color: var(--white);
  line-height: 1;
  margin-bottom: 6px;
}

.stat-label {
  font-size: 13px;
  color: rgba(255, 255, 255, 0.55);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 500;
}

.stat-divider {
  width: 1px;
  height: 40px;
  background: rgba(255, 255, 255, 0.15);
}

/* ============================================
   BUTTONS
============================================ */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: 'Outfit', sans-serif;
  font-size: 15px;
  font-weight: 600;
  padding: 14px 28px;
  border-radius: 50px;
  border: 2px solid transparent;
  cursor: pointer;
  transition: all var(--transition);
  text-decoration: none;
}

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

.btn-primary:hover {
  background: var(--coral-dark);
  border-color: var(--coral-dark);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(232, 93, 74, 0.35);
}

.btn-outline-light {
  background: transparent;
  color: var(--white);
  border-color: rgba(255, 255, 255, 0.4);
}

.btn-outline-light:hover {
  border-color: var(--white);
  background: rgba(255, 255, 255, 0.08);
  transform: translateY(-2px);
}

.btn-full {
  width: 100%;
  justify-content: center;
}

/* ============================================
   SECTIONS
============================================ */
.section {
  padding: 100px 0;
}

.section-header {
  text-align: center;
  max-width: 680px;
  margin: 0 auto 64px;
}

.section-tag {
  display: inline-block;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--coral);
  margin-bottom: 14px;
}

.section-title {
  font-size: clamp(1.8rem, 3.5vw, 2.8rem);
  color: var(--charcoal);
  margin-bottom: 18px;
  letter-spacing: -0.02em;
}

.section-desc {
  font-size: 1.05rem;
  color: var(--gray-600);
  line-height: 1.7;
}

/* ============================================
   SERVICES
============================================ */
.services {
  background: var(--off-white);
}

.services-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.service-card {
  background: var(--white);
  border-radius: var(--radius-lg);
  padding: 36px 28px;
  border: 1px solid var(--gray-200);
  transition: all var(--transition);
}

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

.service-icon {
  width: 56px;
  height: 56px;
  background: rgba(232, 93, 74, 0.10);
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 20px;
}

.service-card h3 {
  font-size: 1.2rem;
  color: var(--charcoal);
  margin-bottom: 12px;
}

.service-card p {
  font-size: 0.95rem;
  color: var(--gray-600);
  line-height: 1.65;
}

/* ============================================
   ABOUT
============================================ */
.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 64px;
  align-items: center;
}

.about-images {
  position: relative;
  min-height: 480px;
}

.about-img-main {
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
}

.about-img-main img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.about-img-float {
  position: absolute;
  bottom: -32px;
  right: -24px;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
  border: 4px solid var(--white);
}

.about-img-float img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.about-experience {
  position: absolute;
  top: -20px;
  left: -20px;
  background: var(--charcoal);
  color: var(--white);
  border-radius: var(--radius);
  padding: 20px 24px;
  text-align: center;
  box-shadow: var(--shadow-lg);
}

.about-experience .exp-num {
  display: block;
  font-family: 'Outfit', sans-serif;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--coral-light);
  margin-bottom: 4px;
}

.about-experience .exp-label {
  font-family: 'Outfit', sans-serif;
  font-size: 1rem;
  font-weight: 700;
  line-height: 1.3;
}

.about-content .section-tag {
  text-align: left;
}

.about-content .section-title {
  text-align: left;
  margin-bottom: 20px;
}

.about-text {
  font-size: 1rem;
  color: var(--gray-600);
  line-height: 1.75;
  margin-bottom: 16px;
}

.about-features {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin-top: 28px;
}

.about-feature {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--charcoal);
}

.about-feature svg {
  flex-shrink: 0;
}

/* ============================================
   COMMUNITY / CTA
============================================ */
.community {
  background: var(--charcoal);
  padding: 100px 0;
}

.community-inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 64px;
  align-items: center;
}

.community-content .section-tag {
  text-align: left;
}

.community-content .section-title {
  text-align: left;
  color: var(--white);
  margin-bottom: 20px;
}

.community-text {
  font-size: 1rem;
  color: rgba(255, 255, 255, 0.68);
  line-height: 1.75;
  margin-bottom: 32px;
}

.community-actions {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}

.community-image {
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
}

.community-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  min-height: 380px;
}

/* ============================================
   CONTACT
============================================ */
.contact {
  background: var(--off-white);
}

.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 64px;
  align-items: start;
}

.contact-info .section-tag {
  text-align: left;
}

.contact-info .section-title {
  text-align: left;
  margin-bottom: 16px;
}

.contact-text {
  font-size: 1rem;
  color: var(--gray-600);
  line-height: 1.75;
  margin-bottom: 32px;
}

.contact-details {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.contact-item {
  display: flex;
  align-items: flex-start;
  gap: 16px;
}

.ci-icon {
  width: 48px;
  height: 48px;
  background: rgba(232, 93, 74, 0.10);
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.contact-item strong {
  display: block;
  font-family: 'Outfit', sans-serif;
  font-size: 0.85rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--charcoal);
  margin-bottom: 4px;
}

.contact-item span,
.contact-item a {
  font-size: 0.95rem;
  color: var(--gray-600);
  line-height: 1.5;
}

.contact-item a:hover {
  color: var(--coral);
}

/* Form */
.contact-form-wrap {
  background: var(--white);
  border-radius: var(--radius-lg);
  padding: 40px;
  box-shadow: var(--shadow-md);
  border: 1px solid var(--gray-200);
}

.form-title {
  font-size: 1.4rem;
  color: var(--charcoal);
  margin-bottom: 28px;
}

.form-group {
  margin-bottom: 20px;
}

.form-group label {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--charcoal);
  margin-bottom: 6px;
  letter-spacing: 0.02em;
}

.form-group input,
.form-group textarea {
  width: 100%;
  padding: 12px 16px;
  border: 1.5px solid var(--gray-200);
  border-radius: var(--radius);
  font-family: 'Inter', sans-serif;
  font-size: 15px;
  color: var(--charcoal);
  background: var(--off-white);
  transition: border-color var(--transition), box-shadow var(--transition);
  outline: none;
}

.form-group input:focus,
.form-group textarea:focus {
  border-color: var(--coral);
  box-shadow: 0 0 0 3px rgba(232, 93, 74, 0.12);
  background: var(--white);
}

.form-group input::placeholder,
.form-group textarea::placeholder {
  color: var(--gray-400);
}

.form-group textarea {
  resize: vertical;
  min-height: 100px;
}

.form-success {
  display: none;
  align-items: center;
  gap: 10px;
  background: rgba(232, 93, 74, 0.08);
  border: 1px solid rgba(232, 93, 74, 0.25);
  color: var(--coral-dark);
  padding: 14px 18px;
  border-radius: var(--radius);
  font-size: 0.95rem;
  font-weight: 500;
  margin-top: 16px;
}

.form-success.show {
  display: flex;
}

/* ============================================
   MAP
============================================ */
.map-section {
  background: var(--gray-200);
}

.map-section iframe {
  width: 100%;
  height: 320px;
  display: block;
  filter: saturate(0.7) contrast(1.05);
}

/* ============================================
   FOOTER
============================================ */
.footer {
  background: var(--charcoal);
  color: rgba(255, 255, 255, 0.65);
  padding: 72px 0 0;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 48px;
  padding-bottom: 56px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.footer-brand p {
  margin-top: 16px;
  font-size: 0.9rem;
  line-height: 1.7;
  max-width: 280px;
}

.footer-col h4 {
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--white);
  margin-bottom: 20px;
}

.footer-col ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.footer-col ul li a {
  font-size: 0.9rem;
  color: rgba(255, 255, 255, 0.55);
  transition: color var(--transition);
}

.footer-col ul li a:hover {
  color: var(--coral-light);
}

.footer-col ul li:not(:has(a)) {
  font-size: 0.9rem;
}

.footer-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
  padding: 28px 0;
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.38);
}

.footer-bottom strong {
  color: var(--coral-light);
}

/* ============================================
   REVEAL ANIMATIONS (progressive enhancement)
============================================ */
@media (prefers-reduced-motion: no-preference) {
  .reveal {
    opacity: 0;
    transform: translateY(24px);
    transition: opacity 0.6s cubic-bezier(0.4, 0, 0.2, 1),
                transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
  }

  .reveal.visible {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Default visible state for no-JS */
.reveal {
  opacity: 1;
  transform: none;
}

/* ============================================
   RESPONSIVE
============================================ */
@media (max-width: 1024px) {
  .services-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .about-grid,
  .community-inner,
  .contact-grid {
    grid-template-columns: 1fr;
    gap: 48px;
  }

  .about-images {
    min-height: 360px;
    order: -1;
  }

  .footer-grid {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 768px) {
  :root {
    --nav-height: 64px;
  }

  .nav-links {
    position: fixed;
    top: var(--nav-height);
    left: 0;
    right: 0;
    background: rgba(26, 35, 50, 0.98);
    backdrop-filter: blur(12px);
    flex-direction: column;
    align-items: stretch;
    padding: 24px;
    gap: 0;
    transform: translateY(-120%);
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  }

  .nav-links.open {
    transform: translateY(0);
  }

  .nav-links a:not(.nav-cta) {
    padding: 14px 0;
    font-size: 16px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  }

  .nav-links a:not(.nav-cta)::after {
    display: none;
  }

  .nav-cta {
    justify-content: center;
    margin-top: 16px;
  }

  .nav-toggle {
    display: flex;
  }

  .hero {
    min-height: auto;
    padding-top: calc(var(--nav-height) + 60px);
    padding-bottom: 80px;
  }

  .hero-headline {
    font-size: clamp(1.8rem, 8vw, 2.6rem);
  }

  .hero-stats {
    gap: 24px;
  }

  .stat-num {
    font-size: 1.5rem;
  }

  .services-grid {
    grid-template-columns: 1fr;
  }

  .about-images {
    min-height: 280px;
  }

  .about-img-float {
    right: 12px;
    bottom: -20px;
  }

  .about-experience {
    left: 12px;
    top: -12px;
  }

  .about-features {
    grid-template-columns: 1fr;
  }

  .community-inner {
    gap: 40px;
  }

  .contact-grid {
    gap: 40px;
  }

  .contact-form-wrap {
    padding: 28px 20px;
  }

  .footer-grid {
    grid-template-columns: 1fr;
    gap: 36px;
  }

  .footer-bottom {
    flex-direction: column;
    text-align: center;
  }

  .section {
    padding: 72px 0;
  }
}

@media (max-width: 480px) {
  .hero-actions {
    flex-direction: column;
    width: 100%;
  }

  .hero-actions .btn {
    width: 100%;
    justify-content: center;
  }

  .hero-stats {
    flex-direction: column;
    gap: 20px;
  }

  .stat-divider {
    width: 40px;
    height: 1px;
  }

  .community-actions {
    flex-direction: column;
  }

  .community-actions .btn {
    width: 100%;
    justify-content: center;
  }
}
