@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600&family=Poppins:wght@500;600;700;800&display=swap');

:root {
  /* Colors based on Brochure */
  --primary: #0f6d6d;
  --on-primary: #ffffff;
  --primary-light: #1f8a70;
  --accent: #6cc24a;
  --on-accent: #ffffff;
  
  --secondary: #1f8a70;
  --on-secondary: #ffffff;
  
  --background: #f8fafc; /* Very light neutral */
  --on-background: #334155;
  
  --surface: #ffffff;
  --on-surface: #1e293b;
  --surface-variant: #f1f5f9;
  --on-surface-variant: #475569;
  
  --outline: #cbd5e1;
  
  /* Typography */
  --font-h: 'Poppins', sans-serif;
  --font-body: 'Inter', sans-serif;

  /* Spacing */
  --section-padding: 80px;
  --container-max: 1200px;
  --gutter: 24px;
  
  /* Shapes & Shadows */
  --radius-sm: 0.5rem;
  --radius-md: 1rem;
  --radius-lg: 1.5rem;
  --radius-full: 9999px;
  --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
  --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
  --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: var(--font-body);
  background-color: var(--background);
  color: var(--on-background);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-h);
  color: var(--primary);
  margin-top: 0;
  line-height: 1.2;
}

h1 { font-size: 2.5rem; font-weight: 700; margin-bottom: 1rem; }
h2 { font-size: 2rem; font-weight: 600; margin-bottom: 1rem; }
h3 { font-size: 1.5rem; font-weight: 600; margin-bottom: 0.75rem; }

p { margin-top: 0; margin-bottom: 1rem; }

a { color: var(--primary); text-decoration: none; transition: color 0.2s; }
a:hover { color: var(--primary-light); }

.bg-background { background-color: var(--background); }
.text-on-background { color: var(--on-background); }
.bg-primary { background-color: var(--primary); color: var(--on-primary); }
.bg-surface { background-color: var(--surface); color: var(--on-surface); }
.text-primary { color: var(--primary); }
.text-accent { color: var(--accent); }

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.75rem 1.5rem;
  border-radius: var(--radius-full);
  font-family: var(--font-h);
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  border: none;
  text-decoration: none;
  font-size: 1rem;
}

.btn-primary {
  background-color: var(--primary);
  color: var(--on-primary);
  box-shadow: var(--shadow-md);
}

.btn-primary:hover {
  background-color: var(--primary-light);
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
  color: var(--on-primary);
}

.btn-accent {
  background-color: var(--accent);
  color: var(--on-accent);
  box-shadow: var(--shadow-md);
}

.btn-accent:hover {
  background-color: #5bb33b;
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
  color: var(--on-accent);
}

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

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

.container {
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

.section-py {
  padding-top: var(--section-padding);
  padding-bottom: var(--section-padding);
}

/* Material Symbols */
.material-symbols-outlined {
  font-variation-settings:
  'FILL' 0,
  'wght' 400,
  'GRAD' 0,
  'opsz' 24
}

/* Forms */
.form-control {
  width: 100%;
  padding: 0.875rem 1.25rem;
  border: 1px solid var(--outline);
  border-radius: var(--radius-md);
  font-family: var(--font-body);
  font-size: 1rem;
  transition: all 0.2s ease;
  background-color: var(--surface);
  color: var(--on-surface);
  margin-bottom: 1rem;
}

.form-control:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(15, 109, 109, 0.1);
}

/* Utilities */
.text-center { text-align: center; }
.mt-4 { margin-top: 1.5rem; }
.mb-4 { margin-bottom: 1.5rem; }
.mb-8 { margin-bottom: 3rem; }

/* Blazor Error UI */
#blazor-error-ui {
    background: lightyellow;
    bottom: 0;
    box-shadow: 0 -1px 2px rgba(0, 0, 0, 0.2);
    display: none;
    left: 0;
    padding: 0.6rem 1.25rem 0.7rem 1.25rem;
    position: fixed;
    width: 100%;
    z-index: 1000;
}

#blazor-error-ui .reload {
    margin-left: 0.5rem;
    font-weight: bold;
}

#blazor-error-ui .dismiss {
    cursor: pointer;
    position: absolute;
    right: 0.75rem;
    top: 0.5rem;
}

/* Missing Layout Structural Classes */
.page {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

main {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.content {
    flex: 1;
}

/* Responsive images — but NOT the navbar logo (logo uses explicit height) */
img:not(.logo-img) {
    max-width: 100%;
    height: auto;
}

/* ═══════════════════════════════════════════════════
   NAVBAR  –  global styles (not scoped, always apply)
═══════════════════════════════════════════════════ */

.navbar {
    background: #ffffff;
    position: sticky;
    top: 0;
    z-index: 1000;
    border-bottom: 3px solid #6cc24a;
    box-shadow: 0 2px 20px rgba(15,109,109,.09);
}

.navbar-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 84px;
    gap: 1rem;
}

/* Logo */
.logo-area {
    display: flex;
    align-items: center;
    text-decoration: none !important;
    flex-shrink: 0;
    transition: opacity .2s;
}
.logo-area:hover { opacity: .85; }

.logo-img {
    height: 68px !important;
    width: auto !important;
    max-width: 220px;
    object-fit: contain;
    display: block;
}

/* Desktop nav links container */
.nav-links {
    display: none;
    align-items: center;
    gap: 0.5rem;
    flex: 1;
    justify-content: center;
    list-style: none;
    margin: 0;
    padding: 0;
}

@media (min-width: 992px) {
    .nav-links { display: flex; }
}

/* Each desktop link — identical padding = equal visual spacing */
.nav-link {
    display: inline-block;
    color: #374151 !important;
    text-decoration: none !important;
    font-family: 'Poppins', sans-serif;
    font-weight: 500;
    font-size: 0.95rem;
    padding: 0.5rem 1.4rem;
    border-radius: 0.5rem;
    position: relative;
    white-space: nowrap;
    transition: color .2s, background-color .2s;
}

.nav-link:hover {
    color: #0f6d6d !important;
    background-color: rgba(15,109,109,.07);
    text-decoration: none !important;
}

/* ACTIVE — clearly highlighted (Blazor NavLink adds this class) */
.nav-link.active {
    color: #0f6d6d !important;
    font-weight: 700 !important;
    background-color: rgba(15,109,109,.11) !important;
    text-decoration: none !important;
}

.nav-link.active::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 24px;
    height: 3px;
    border-radius: 2px;
    background: #6cc24a;
}

/* CTA button — desktop only */
.nav-cta { display: none; flex-shrink: 0; }
@media (min-width: 992px) { .nav-cta { display: block; } }

.cta-btn {
    display: inline-block;
    padding: .62rem 1.5rem;
    font-family: 'Poppins', sans-serif;
    font-size: .9rem;
    font-weight: 600;
    border-radius: 2rem;
    background: linear-gradient(135deg, #0f6d6d 0%, #1f8a70 100%);
    color: #fff !important;
    text-decoration: none !important;
    box-shadow: 0 4px 14px rgba(15,109,109,.28);
    transition: transform .25s, box-shadow .25s;
    white-space: nowrap;
}
.cta-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 7px 22px rgba(15,109,109,.38);
    color: #fff !important;
}

/* Animated hamburger button — mobile only */
.hamburger {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 5px;
    width: 42px;
    height: 42px;
    background: rgba(15,109,109,.07);
    border: 1.5px solid rgba(15,109,109,.2);
    border-radius: .5rem;
    cursor: pointer;
    padding: 0;
    flex-shrink: 0;
    transition: background .2s;
}
.hamburger:hover { background: rgba(15,109,109,.15); }
@media (min-width: 992px) { .hamburger { display: none !important; } }

.bar {
    display: block;
    width: 22px;
    height: 2.5px;
    background: #0f6d6d;
    border-radius: 2px;
    transition: transform .3s ease, opacity .3s ease, width .3s ease;
    transform-origin: center;
}
.hamburger.open .bar-1 { transform: translateY(7.5px) rotate(45deg); }
.hamburger.open .bar-2 { opacity: 0; width: 0; }
.hamburger.open .bar-3 { transform: translateY(-7.5px) rotate(-45deg); }

/* Mobile slide-down drawer */
.mobile-drawer {
    background: #ffffff;
    border-top: 1px solid rgba(15,109,109,.12);
    overflow: hidden;
    max-height: 0;
    transition: max-height .35s cubic-bezier(.4,0,.2,1), box-shadow .35s ease;
}
.mobile-drawer.open {
    max-height: 500px;
    box-shadow: 0 8px 24px rgba(15,109,109,.12);
}
@media (min-width: 992px) { .mobile-drawer { display: none !important; } }

.mobile-nav {
    display: flex;
    flex-direction: column;
    padding: 0.75rem 1.25rem 1.25rem;
    gap: 0.25rem;
}

.mobile-link {
    display: flex;
    align-items: center;
    color: #374151 !important;
    text-decoration: none !important;
    font-family: 'Poppins', sans-serif;
    font-weight: 500;
    font-size: .95rem;
    padding: 0.75rem 1rem;
    border-radius: .6rem;
    border-left: 3px solid transparent;
    transition: background .2s, color .2s;
}
.mobile-link:hover {
    background: rgba(15,109,109,.07);
    color: #0f6d6d !important;
    text-decoration: none !important;
}
.mobile-link.active {
    color: #0f6d6d !important;
    font-weight: 700 !important;
    background: rgba(15,109,109,.1) !important;
    border-left-color: #6cc24a !important;
    text-decoration: none !important;
}

.mobile-cta {
    display: block;
    margin-top: 0.75rem;
    padding: 0.75rem 1rem;
    text-align: center;
    background: linear-gradient(135deg, #0f6d6d, #1f8a70);
    color: #fff !important;
    font-family: 'Poppins', sans-serif;
    font-weight: 600;
    font-size: .92rem;
    border-radius: 0.75rem;
    text-decoration: none !important;
    box-shadow: 0 4px 14px rgba(15,109,109,.25);
    transition: opacity .2s;
}
.mobile-cta:hover { opacity: .9; }

/* ═══════════════════════════════════════════════════
   SPLIT HERO  —  Text 60%  |  Carousel 40%
   (global so it always applies to Home.razor)
═══════════════════════════════════════════════════ */

.split-hero {
    background: linear-gradient(135deg, #f0faf8 0%, #ffffff 60%, #f5fff8 100%);
    position: relative;
    overflow: hidden;
}

/* ── Grid row ── */
.split-hero-inner {
    display: flex !important;
    flex-direction: row !important;
    align-items: stretch !important;
    gap: 2.5rem;
    min-height: 540px;
    padding: 0;
}

/* ── Left: text  60% ── */
.split-hero-text {
    flex: 0 0 60% !important;
    width: 60% !important;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 4rem 2rem 4rem 0;
    gap: 1.5rem;
}

/* ── Right: carousel  40% ── */
.split-hero-carousel {
    flex: 0 0 40% !important;
    width: 40% !important;
    position: relative;
    padding: 2rem 0;
}

.split-hero-carousel .carousel {
    position: relative !important;
    width: 100%;
    height: 100%;
    min-height: 460px;
    border-radius: 1.25rem;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(15,109,109,.2);
}

.split-hero-carousel .carousel-inner {
    height: 100%;
    min-height: 460px;
}

.split-hero-carousel .carousel-item {
    height: 100%;
    min-height: 460px;
}

.split-hero-carousel .carousel-item img {
    width: 100% !important;
    height: 100% !important;
    max-width: none !important;
    object-fit: cover;
    display: block;
}

/* ── Responsive: stack on mobile ── */
@media (max-width: 900px) {
    .split-hero-inner {
        flex-direction: column !important;
        min-height: auto;
        gap: 0;
    }

    .split-hero-text {
        flex: none !important;
        width: 100% !important;
        padding: 3rem 0 1.5rem;
        text-align: center;
        align-items: center;
    }

    .split-hero-carousel {
        flex: none !important;
        width: 100% !important;
        padding: 0 0 2rem;
    }

    .split-hero-carousel .carousel,
    .split-hero-carousel .carousel-inner,
    .split-hero-carousel .carousel-item {
        min-height: 300px;
        height: 300px;
    }
}