﻿:root {
    --accent: #ffd600;
    --dark: #222;
    --muted-white-bg: rgba(255, 255, 255, 0.65);
}

/* Base */
body {
    font-family: Arial, Helvetica, sans-serif;
    margin: 0;
    color: var(--dark);
    background-image: url("cosmic_bgnd.png");
    background-repeat: no-repeat;
    background-size: cover;
    background-position: center;
    /* Mobile-friendly default: do not use fixed attachment on small screens */
    background-attachment: scroll;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Desktop only: restore fixed background for larger screens */
@media (min-width: 769px) {
    body {
        background-attachment: fixed;
    }
}

.hero-section {
    width: 100%;
    /* use min-height and let content flow on small screens */
    min-height: 320px;
    height: auto;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
    border-radius: 16px;
    padding: 0;
    margin: 0;
}

    .hero-section::before {
        content: "";
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background-image: url('cleanhero.png');
        background-size: cover;
        background-position: center;
        z-index: 1;
        opacity: 0.5;
    }

    /* Hero text: responsive sizes using clamp */
    .hero-inner,
    .hero-section > div {
        z-index: 3;
        text-align: center;
        width: 100%;
    }

        .hero-inner h1,
        .hero-section h1.outlined {
            color: var(--accent);
            font-weight: 700;
            /* scale between 1.6rem (mobile) and 3.2rem (desktop) */
            font-size: clamp(1.6rem, 4vw, 2.8rem);
            -webkit-text-stroke: 2px black;
            text-stroke: 2px black;
            text-shadow: 0 2px 8px rgba(0, 0, 0, 0.7);
            margin: 0.25rem 0;
        }

        .hero-inner h2,
        .hero-section h2.outlined {
            color: var(--accent);
            font-weight: 700;
            font-size: clamp(1.0rem, 2.6vw, 1.8rem);
            margin: 0.5rem 0;
            text-shadow: 0 2px 8px rgba(0, 0, 0, 0.7);
        }

    /* Video wrapper: fluid and maintain aspect ratio */
.video-wrapper {
    position: relative;
    width: 100%;
    max-width: 782px;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2;
    margin-left: 0;
}

    /* Make iframes responsive and override inline fixed width/height */
    .video-wrapper iframe,
    .text-center iframe,
    iframe.responsive-iframe {
        width: 100% !important;
        height: auto !important;
        max-width: 100%;
        border: 0;
        aspect-ratio: 16 / 9;
        border-radius: 8px;
        display: block;
    }

    /* Generic container iframe fallback */
    .container iframe,
    .text-center iframe,
    video,
    .video-wrapper video {
        max-width: 100%;
        width: 100%;
        height: auto;
    }

.hero-inner {
    padding: 16px 24px;
    border-radius: 8px;
    color: #fff;
    position: relative;
    text-align: center;
    z-index: 3;
}

footer {
    background: var(--dark);
    color: #ccc;
    text-align: center;
    padding: 20px;
}

/* Cards */
.energy-bg-card,
.sleep-bg-card,
.recovery-bg-card,
.comfort-bg-card {
    background-size: cover;
    background-position: center;
    color: var(--dark);
    position: relative;
}

    .energy-bg-card .card-body,
    .sleep-bg-card .card-body,
    .recovery-bg-card .card-body,
    .comfort-bg-card .card-body {
        background: var(--muted-white-bg);
        border-radius: 8px;
    }

.patch-bg-card {
    color: var(--dark);
    position: relative;
}

    .patch-bg-card .card-body {
        background: rgba(255, 255, 255, 0.5);
        border-radius: 8px;
    }

.card-title,
.card-body ul li {
    font-weight: 700;
}

.card-body p {
    font-weight: 700;
}

.highlight-block {
    background: #222e3a;
    color: var(--accent);
    padding: 20px 24px;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    margin: 0 auto;
}

/* Make card images fluid and avoid fixed 400px causing overflow */
.x39-card-img {
    width: 100%;
    max-width: 400px;
    height: auto;
    object-fit: cover;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.10);
    margin-bottom: 12px;
    display: block;
    margin-left: auto;
    margin-right: auto;
    transition: transform 0.3s cubic-bezier(.4, 1.5, .5, 1);
    position: relative;
    z-index: 1;
}

/* Disable large hover scaling on small screens to avoid overflow */
@media (max-width: 767px) {
    .x39-card-img:hover {
        transform: none;
        z-index: 1;
    }
}

/* Keep hover scaling on large screens */
@media (min-width: 768px) {
    .x39-card-img:hover {
        transform: scale(1.15);
        z-index: 10;
    }
}

.card-body {
    overflow: visible;
}

.outlined {
    color: var(--accent);
    -webkit-text-stroke: 2px black;
    text-stroke: 2px black;
    font-weight: bold;
}

/* Buttons: override inline widths on small screens */
.col-12.col-md-4 .btn {
    width: 320px;
    max-width: 100%;
}

/* Small-screen adjustments */
@media (max-width: 767px) {
    /* Make CTAs full-width and easier to tap */
    .col-12.col-md-4 .btn {
        width: 100% !important;
        font-size: 1.05rem !important;
        padding: 0.65rem 0.8rem;
    }

    /* Reduce hero spacing overflow */
    .hero-section {
        border-radius: 0;
    }

        /* Ensure hero text fits */
        .hero-section > div {
            padding: 1rem;
        }

    /* Prevent fixed-size image causing overflow in promotional section */
    section.py-5.text-center img {
        width: 100% !important;
        max-width: 422px;
        height: auto !important;
    }

    /* Adjust the circular CTA button placement to not overflow */
    section.py-5 .btn-circle {
        position: static !important;
        display: inline-block;
        margin-top: 12px;
        width: auto;
        height: auto;
        border-radius: 8px;
    }

    /* Ensure #3spots images match the video width on small screens.
       video-wrapper already uses width:100% and max-width:782px — match that max-width */
    #3spots .video-wrapper,
    #3spots .video-wrapper iframe {
        width: 100%;
        max-width: 782px;
    }

    /* Make the three images in #3spots match the same visual width as the video */
    #3spots img.img-fluid {
        width: 100% !important;
        max-width: 782px;
        margin-left: auto;
        margin-right: auto;
        height: auto !important;
    }
}

/* Utility: ensure images inside the three-column area are fluid even if inline styles exist */
.col-12.col-md-4 img,
.card img {
    width: 100% !important;
    max-width: 100% !important;
    height: auto !important;
    object-fit: cover;
}

