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


/* === Sitewide sticky footer (prevents overlap) === */
html, body { height: 100%; }
body { min-height: 100vh; display: flex; flex-direction: column; }
.site-main { flex: 1 0 auto; }
.footer { margin-top: auto; }
/* Safety buffer if any footer is fixed */
body { padding-bottom: 80px; }
@media (min-width: 992px) { body { padding-bottom: 96px; } }

/* === Products page: two-column layout === */
/* Grid wrapper for detailed product cards */
.products-list {
  display: grid;
  grid-template-columns: 1fr; /* mobile: single column */
  gap: 2rem;
}
@media (min-width: 768px) {
  .products-list { grid-template-columns: 1fr 1fr; } /* two columns on tablet+ */
}

/* Ensure product detail cards behave like cards and stretch evenly */
.product-detail-card {
  background-color: hsl(0, 0%, 100%);
  border: 1px solid hsl(214, 31%, 91%);
  border-radius: 0.5rem;
  padding: 1.5rem;
  transition: box-shadow 0.3s;
  height: 100%;
  display: flex;
  flex-direction: column;
}
.product-detail-card:hover { box-shadow: 0 4px 12px -2px hsl(206, 20%, 50%, 0.15); }
.product-header-detail { display: flex; align-items: center; margin-bottom: 1rem; }
.product-actions { margin-top: 1rem; display: flex; gap: 0.5rem; flex-wrap: wrap; }
body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    line-height: 1.6;
    color: hsl(210, 24%, 16%);
    background-color: hsl(0, 0%, 100%);
}

.container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 1rem;
}

/* Button Styles */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 0.375rem;
    font-size: 0.875rem;
    font-weight: 500;
    transition: all 0.2s;
    border: none;
    cursor: pointer;
    text-decoration: none;
    white-space: nowrap;
}

.btn-primary {
    background-color: hsl(206, 78%, 28%);
    color: hsl(0, 0%, 98%);
    padding: 0.5rem 1rem;
}

.btn-primary:hover {
    background-color: hsl(206, 78%, 25%);
}

.btn-secondary {
    background-color: hsl(206, 15%, 95%);
    color: hsl(206, 78%, 28%);
    padding: 0.5rem 1rem;
}

.btn-secondary:hover {
    background-color: hsl(206, 15%, 90%);
}

.btn-outline {
    background-color: transparent;
    color: hsl(206, 78%, 28%);
    border: 1px solid hsl(206, 78%, 28%);
    padding: 0.5rem 1rem;
}

.btn-outline:hover {
    background-color: hsl(206, 78%, 28%);
    color: hsl(0, 0%, 98%);
}

.btn-sm {
    padding: 0.375rem 0.75rem;
    font-size: 0.8rem;
}

.btn-lg {
    padding: 0.75rem 2rem;
    font-size: 1.125rem;
}

.btn-full {
    width: 100%;
}
/* Diagram*/
.diagram{
display: flex;
justify-content: center;
align-items: center;
margin: 2rem 0;
}




/* Navigation */
.navbar {
    background-color: hsl(0, 0%, 100%);
    border-bottom: 1px solid hsl(214, 31%, 91%);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    position: sticky;
    top: 0;
    z-index: 50;
}

.nav-container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 1rem;
}

.nav-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 4rem;
}

.logo {
    display: flex;
    align-items: center;
    text-decoration: none;
    color: inherit;
}

.logo-text {
    font-size: 1.5rem;
    font-weight: bold;
    color: hsl(206, 78%, 28%);
}

.logo-subtitle {
    font-size: 0.875rem;
    color: hsl(206, 10%, 45%);
    margin-left: 0.5rem;
}

.nav-menu {
    display: flex;
    align-items: center;
    gap: 2rem;
}

.nav-link {
    color: hsl(206, 10%, 45%);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s;
    padding: 0.5rem 0;
    position: relative;
}

.nav-link:hover,
.nav-link.active {
    color: hsl(206, 78%, 28%);
}

.nav-link.active::after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 0;
    right: 0;
    height: 2px;
    background-color: hsl(206, 78%, 28%);
}

.mobile-menu-btn {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
}

.hamburger {
    display: block;
    width: 20px;
    height: 2px;
    background-color: hsl(206, 78%, 28%);
    position: relative;
}

.hamburger::before,
.hamburger::after {
    content: '';
    position: absolute;
    width: 20px;
    height: 2px;
    background-color: hsl(206, 78%, 28%);
    transition: 0.3s;
}

.hamburger::before {
    top: -6px;
}

.hamburger::after {
    top: 6px;
}

/* Hero Section */
.hero {
    position: relative;
    height: 600px;
    display: flex;
    align-items: center;
    overflow: hidden;
}

.hero-background {
    position: absolute;
    inset: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1920 1080"><rect width="1920" height="1080" fill="%23f0f7ff"/><g opacity="0.1"><circle cx="400" cy="200" r="100" fill="%23206b8d"/><circle cx="800" cy="300" r="80" fill="%236aa49a"/><circle cx="1200" cy="250" r="120" fill="%23206b8d"/><circle cx="1600" cy="400" r="90" fill="%236aa49a"/><rect x="200" y="600" width="200" height="100" rx="10" fill="%23206b8d"/><rect x="600" y="650" width="150" height="80" rx="8" fill="%236aa49a"/><rect x="1000" y="620" width="180" height="90" rx="10" fill="%23206b8d"/></g></svg>') center/cover;
}

.hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, hsl(206, 78%, 28%, 0.8), hsl(168, 60%, 40%, 0.8));
}

.hero-content {
    position: relative;
    z-index: 10;
    width: 100%;
}

.hero-title {
    font-size: clamp(2.5rem, 6vw, 4rem);
    font-weight: bold;
    color: hsl(0, 0%, 98%);
    margin-bottom: 1.5rem;
    line-height: 1.1;
}

.hero-subtitle {
    font-size: clamp(1.125rem, 2.5vw, 1.5rem);
    color: hsl(0, 0%, 98%, 0.9);
    margin-bottom: 2rem;
    line-height: 1.5;
    max-width: 48rem;
}

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

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

.section-header h2 {
    font-size: clamp(2rem, 4vw, 2.5rem);
    font-weight: bold;
    color: hsl(210, 24%, 16%);
    margin-bottom: 1rem;
}

.section-header p {
    font-size: 1.25rem;
    color: hsl(206, 10%, 45%);
    max-width: 48rem;
    margin: 0 auto;
    line-height: 1.6;
}

.section-footer {
    text-align: center;
    margin-top: 3rem;
}

/* Value Section */
.value-section {
    padding: 4rem 0;
    background-color: hsl(0, 0%, 100%);
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    max-width: 1200px;
    margin: 0 auto;
}

.feature-card {
    text-align: center;
    padding: 2rem 1.5rem;
    background-color: hsl(0, 0%, 100%);
    border: 1px solid hsl(214, 31%, 91%);
    border-radius: 0.5rem;
    transition: box-shadow 0.3s;
}

.feature-card:hover {
    box-shadow: 0 4px 20px -4px hsl(206, 78%, 28%, 0.15);
}

.feature-icon {
    display: flex;
    justify-content: center;
    margin-bottom: 1rem;
}

.feature-icon svg {
    color: hsl(168, 60%, 40%);
}

.feature-card h3 {
    font-size: 1.25rem;
    font-weight: 600;
    color: hsl(210, 24%, 16%);
    margin-bottom: 0.75rem;
}

.feature-card p {
    color: hsl(206, 10%, 45%);
    line-height: 1.5;
}

/* Products Section */
.products-section {
    padding: 4rem 0;
    background-color: hsl(206, 15%, 98%);
}

.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 1.5rem;
}

.product-card {
    background-color: hsl(0, 0%, 100%);
    border: 1px solid hsl(214, 31%, 91%);
    border-radius: 0.5rem;
    padding: 1.5rem;
    transition: box-shadow 0.3s;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.product-card:hover {
    box-shadow: 0 4px 12px -2px hsl(206, 20%, 50%, 0.15);
}

.product-header {
    display: flex;
    align-items: center;
    margin-bottom: 1rem;
}

.product-icon {
    padding: 0.5rem;
    background-color: hsl(206, 78%, 28%, 0.1);
    border-radius: 0.5rem;
    margin-right: 0.75rem;
}

.product-icon svg {
    color: hsl(206, 78%, 28%);
}

.product-card h3 {
    font-size: 1.25rem;
    font-weight: 600;
    color: hsl(210, 24%, 16%);
}

.product-card > p {
    color: hsl(206, 10%, 45%);
    margin-bottom: 1rem;
    line-height: 1.5;
    flex-grow: 1;
}

.product-benefits {
    margin-bottom: 1.5rem;
}

.benefit {
    font-size: 0.875rem;
    color: hsl(206, 10%, 45%);
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
}

.benefit::before {
    content: '→';
    color: hsl(168, 60%, 40%);
    margin-right: 0.5rem;
    font-weight: bold;
}

/* Footer */
.footer {
    background-color: hsl(206, 78%, 28%);
    color: hsl(0, 0%, 98%);
    padding: 3rem 0 1.5rem;
}

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

.footer-section h3 {
    font-size: 1.5rem;
    font-weight: bold;
    margin-bottom: 1rem;
}

.footer-section h4 {
    font-size: 1.125rem;
    font-weight: 600;
    margin-bottom: 1rem;
}

.footer-section p {
    color: hsl(0, 0%, 98%, 0.8);
    line-height: 1.5;
    margin-bottom: 1rem;
}

.location {
    display: flex;
    align-items: center;
    font-size: 0.875rem;
    color: hsl(0, 0%, 98%, 0.8);
}

.location svg {
    margin-right: 0.5rem;
}

.footer-links {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.footer-links a {
    color: hsl(0, 0%, 98%, 0.8);
    text-decoration: none;
    transition: color 0.2s;
}

.footer-links a:hover {
    color: hsl(0, 0%, 98%);
}

.contact-info {
    font-size: 0.875rem;
}

.contact-item {
    display: flex;
    align-items: center;
    color: hsl(0, 0%, 98%, 0.8);
    margin-bottom: 0.5rem;
}

.contact-item svg {
    margin-right: 0.5rem;
}

.footer-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 2rem;
    border-top: 1px solid hsl(0, 0%, 98%, 0.2);
    font-size: 0.875rem;
    color: hsl(0, 0%, 98%, 0.8);
}

/* Card Styles */
.card {
    background-color: hsl(0, 0%, 100%);
    border: 1px solid hsl(214, 31%, 91%);
    border-radius: 0.5rem;
    overflow: hidden;
}

.card-header {
    padding: 1.5rem 1.5rem 0;
}

.card-content {
    padding: 1.5rem;
}

.card-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: hsl(210, 24%, 16%);
    margin-bottom: 0.5rem;
}

.card-description {
    color: hsl(206, 10%, 45%);
    line-height: 1.5;
}

/* Form Styles */
.form-group {
    margin-bottom: 1.5rem;
}

.form-label {
    display: block;
    font-size: 0.875rem;
    font-weight: 500;
    color: hsl(210, 24%, 16%);
    margin-bottom: 0.5rem;
}

.form-input,
.form-textarea,
.form-select {
    width: 100%;
    padding: 0.5rem 0.75rem;
    border: 1px solid hsl(214, 31%, 91%);
    border-radius: 0.375rem;
    font-size: 0.875rem;
    transition: border-color 0.2s, box-shadow 0.2s;
    background-color: hsl(0, 0%, 100%);
}

.form-input:focus,
.form-textarea:focus,
.form-select:focus {
    outline: none;
    border-color: hsl(206, 78%, 28%);
    box-shadow: 0 0 0 3px hsl(206, 78%, 28%, 0.1);
}

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

/* Badge */
.badge {
    display: inline-flex;
    align-items: center;
    padding: 0.25rem 0.5rem;
    font-size: 0.75rem;
    font-weight: 500;
    border-radius: 0.25rem;
    background-color: hsl(206, 15%, 95%);
    color: hsl(206, 78%, 28%);
    border: 1px solid hsl(214, 31%, 91%);
}

/* Responsive Design */
@media (max-width: 768px) {
    .nav-menu {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background-color: hsl(0, 0%, 100%);
        border-top: 1px solid hsl(214, 31%, 91%);
        flex-direction: column;
        padding: 1rem;
        gap: 1rem;
    }

    .nav-menu.active {
        display: flex;
    }

    .mobile-menu-btn {
        display: block;
    }

    .logo-subtitle {
        display: none;
    }

    .hero-buttons {
        flex-direction: column;
        align-items: stretch;
    }

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

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

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

@media (max-width: 640px) {
    .container {
        padding: 0 0.75rem;
    }

    .hero {
        height: 500px;
    }

    .section-header h2 {
        font-size: 1.875rem;
    }

    .section-header p {
        font-size: 1.125rem;
    }
}




/* === Products list: lock to two columns on tablet+ (never three) === */
.products-list.products-grid {
  grid-template-columns: 1fr; /* mobile: single column */
}
@media (min-width: 768px) {
  .products-list.products-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }
}


/* === Products page: center content inside product detail cards === */
.product-detail-card {
  text-align: center;
}
.product-header-detail {
  justify-content: center; /* center title + (optional) icon row */
}
.product-actions {
  justify-content: center; /* center the buttons row */
}
.benefit {
  justify-content: center; /* center each benefit line with its arrow */
}
.section { padding: 4rem 0; background-color: hsl(0, 0%, 100%); }

/* Ensure h1 inside section headers matches the visual weight of h2 on other pages */
.section-header h1 {
  font-size: clamp(2rem, 4vw, 2.5rem);
  font-weight: bold;
  color: hsl(210, 24%, 16%);
  margin-bottom: 1rem;
}

/* Product card images (used on pictures.html image tiles) */
.product-card img { width: 100%; height: auto; display: block; border-radius: 0.375rem; }

/* === Images page: zoom modal (shared) === */
.zoom-modal { position: fixed; inset: 0; background: rgba(0,0,0,0.7); display: none; align-items: center; justify-content: center; z-index: 9999; }
.zoom-modal.open { display: flex; }
.zoom-stage { position: relative; width: min(95vw, 1400px); height: min(85vh, 900px); background: #111; overflow: hidden; border-radius: 8px; box-shadow: 0 10px 40px rgba(0,0,0,0.4); }
#zoomImg { position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%) scale(1); cursor: grab; user-select: none; will-change: transform; }
.zoom-close { position: absolute; top: 12px; right: 16px; font-size: 28px; line-height: 1; border: 0; background: transparent; color: #fff; cursor: pointer; }
.zoom-caption { position: absolute; left: 16px; bottom: 12px; color: #fff; font-size: 0.95rem; opacity: 0.9; }

/* Stack the two tiles vertically on small screens if not already */
@media (max-width: 800px) {
  .products-grid { grid-template-columns: 1fr; }
}


/* === Pictures page: paired carousel controls === */
.carousel-controls {
  display: flex;
  justify-content: center; /* center the arrows horizontally */
  align-items: center;      /* keep them on the same vertical line */
  gap: 1.5rem;
  margin-bottom: 1.25rem;
  width: 100%;
}

.image-pair-carousel .carousel-btn {
  border: 0;
  background: var(--btn-bg, #f1f1f1);
  padding: 1.25rem 1.5rem; /* larger hit area */
  min-width: 72px;
  min-height: 72px;
  border-radius: 9999px;   /* circular buttons */
  cursor: pointer;
  font-size: 4rem;         /* bigger arrow glyphs */
  line-height: 1;
  box-shadow: 0 1px 4px rgba(0,0,0,0.08);
}

.image-pair-carousel .carousel-btn:hover { filter: brightness(0.96); }
.image-pair-carousel .carousel-btn:active { transform: scale(0.98); }
.image-pair-carousel .carousel-btn:focus-visible { outline: 3px solid rgba(0,0,0,0.5); outline-offset: 3px; }

@media (max-width: 900px) {
  .carousel-controls { gap: 1rem; }
  .image-pair-carousel .carousel-btn { font-size: 3rem; min-width: 60px; min-height: 60px; }
}
.pair-caption { text-align: center; margin: 0.5rem 0 1rem; }
.pair-caption .pair-title { margin: 0; font-size: clamp(1rem, 2.5vw, 1.25rem); font-weight: 600; }
.pair-caption .pair-ref { margin: 0.25rem 0 0; font-size: 0.9rem; opacity: 0.8; font-style: italic; }
.product-card .product-header { justify-content: center; }
.product-card .product-header h3 { text-align: center; width: 100%; }
.pair-caption .pair-hef {font-size: 0.9rem; opacity: 0.8; font-style: italic; }

.hypo-controls {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin: 0.5rem 0 1rem;
}
/* Buttons themselves already use .btn .btn-secondary in the HTML */

/* === Safety: ensure Hypotonic Solutions buttons are always clickable === */
.hypo-controls { position: relative; z-index: 1; }
.hypo-controls .btn { pointer-events: auto; }
.hypo-area { position: relative; z-index: 0; }

/* === Hypotonic Solutions: panel visibility + active button styles === */
.hypo-panel { display: block; }
.hypo-panel.is-hidden { display: none; }

/* Active toggle button state (works regardless of btn-primary/secondary) */
.hypo-controls .btn[aria-pressed="true"] {
  background-color: hsl(206, 78%, 28%);
  color: hsl(0, 0%, 98%);
  border-color: hsl(206, 78%, 28%);
  box-shadow: 0 0 0 3px hsl(206, 78%, 28%, 0.15);
}
.hypo-controls .btn[aria-pressed="true"]:hover {
  filter: brightness(0.95);
}