/**
 * SleepCheck Website - Main Stylesheet
 * Brand Colors:
 * - Primary Green: #8DC63F
 * - Dark Grey: #4A4A4A
 * - White: #FFFFFF
 * - Light Grey: #F5F5F5
 */

/* ===== Global Styles ===== */
:root {
    --primary-green: #8DC63F;
    --primary-green-dark: #7AB635;
    --primary-green-light: #A8D96C;
    --dark-grey: #4A4A4A;
    --medium-grey: #6C6C6C;
    --light-grey: #F5F5F5;
    --lighter-grey: #FAFAFA;
    --text-color: #333333;
    --text-muted: #666666;
}

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

body {
    font-family: 'Segoe UI', 'Helvetica Neue', Arial, sans-serif;
    color: var(--text-color);
    line-height: 1.6;
    overflow-x: hidden;
    background-color: #ffffff;
}

/* Smooth Scroll */
html {
    scroll-behavior: smooth;
}

body {
    overflow-x: hidden;
    background-color: #ffffff;
}

/* ===== Typography ===== */
h1, h2, h3, h4, h5, h6 {
    font-weight: 700;
    color: var(--dark-grey);
    line-height: 1.2;
}

.text-success {
    color: var(--primary-green) !important;
}

.bg-success {
    background-color: var(--primary-green) !important;
}

.btn-success {
    background-color: var(--primary-green) !important;
    border-color: var(--primary-green) !important;
    color: white !important;
}

.btn-success:hover,
.btn-success:focus {
    background-color: var(--primary-green-dark) !important;
    border-color: var(--primary-green-dark) !important;
    color: white !important;
}

.btn-outline-success {
    color: var(--primary-green) !important;
    border-color: var(--primary-green) !important;
}

.btn-outline-success:hover {
    background-color: var(--primary-green) !important;
    border-color: var(--primary-green) !important;
    color: white !important;
}

/* ===== Sections ===== */
section {
    padding: 80px 0;
}

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

.section-title h2 {
    font-size: 3rem;
    font-weight: 700;
    margin-bottom: 1rem;
}

.section-title p {
    font-size: 1.2rem;
    color: #6c757d;
}

/* ===== Spacing Utilities ===== */
.py-section {
    padding-top: 5rem;
    padding-bottom: 5rem;
}

/* ===== Cards ===== */
.card {
    border: none;
    border-radius: 20px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
    transition: all 0.3s ease;
    overflow: hidden;
    background: #ffffff;
}

.card:hover {
    transform: translateY(-8px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.1);
}

/* ===== Images ===== */
img {
    max-width: 100%;
    height: auto;
}

/* ===== Buttons ===== */
.btn {
    font-weight: 600;
    border-radius: 30px;
    padding: 0.6rem 2rem;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-size: 0.9rem;
}

.btn-lg {
    padding: 1rem 3rem;
    font-size: 1.1rem;
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

/* ===== Forms ===== */
.form-control:focus,
.form-select:focus {
    border-color: var(--primary-green);
    box-shadow: 0 0 0 0.2rem rgba(141, 198, 63, 0.25);
}

.form-label {
    font-weight: 600;
    color: var(--dark-grey);
    margin-bottom: 0.5rem;
}

/* ===== Infographic Elements ===== */
.info-box {
    background: linear-gradient(135deg, #ffffff 0%, var(--light-grey) 100%);
    padding: 2rem;
    border-radius: 15px;
    border-left: 5px solid var(--primary-green);
    margin-bottom: 1.5rem;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

.info-box h4 {
    color: var(--primary-green);
    margin-bottom: 1rem;
}

.info-box p {
    margin-bottom: 0;
    color: var(--text-color);
}

/* Icon Boxes */
.icon-box {
    text-align: center;
    padding: 2rem;
    background: white;
    border-radius: 15px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
}

.icon-box:hover {
    transform: translateY(-10px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.12);
}

.icon-box i {
    font-size: 3rem;
    color: var(--primary-green);
    margin-bottom: 1rem;
}

.icon-box h5 {
    margin-bottom: 1rem;
    color: var(--dark-grey);
}

.icon-box p {
    color: #6c757d;
    margin-bottom: 0;
}

/* ===== Badges & Labels ===== */
.badge {
    font-weight: 600;
    padding: 0.5rem 1rem;
    border-radius: 20px;
}

.badge-success {
    background-color: var(--primary-green) !important;
}

/* ===== Animations ===== */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in-up {
    animation: fadeInUp 0.6s ease-out;
}

/* ===== Responsive Adjustments ===== */
@media (max-width: 768px) {
    section {
        padding: 60px 0;
    }

    .section-title h2 {
        font-size: 2rem;
    }

    .section-title p {
        font-size: 1rem;
    }

    .btn {
        padding: 0.5rem 1.5rem;
        font-size: 0.85rem;
    }

    .btn-lg {
        padding: 0.8rem 2rem;
        font-size: 1rem;
    }

    .icon-box {
        margin-bottom: 2rem;
    }
}

/* ===== Loading Spinner ===== */
.spinner-wrapper {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 200px;
}

.spinner-border-success {
    border-color: var(--primary-green);
    border-right-color: transparent;
}

/* ===== Utility Classes ===== */
.text-shadow {
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.box-shadow {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.box-shadow-lg {
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.rounded-lg {
    border-radius: 15px;
}

.border-success {
    border-color: var(--primary-green) !important;
}

/* ===== Back to Top Button ===== */
.back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    background-color: var(--primary-green);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: 1000;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.back-to-top.show {
    opacity: 1;
    visibility: visible;
}

.back-to-top:hover {
    background-color: var(--primary-green-dark);
    transform: translateY(-5px);
}

/* ===== Scroll Up Button (within sections) ===== */
.scroll-up-btn {
    position: absolute !important;
    right: 30px !important;
    bottom: 30px !important;
    top: auto !important;
    left: auto !important;
    transform: none !important;
    width: 50px !important;
    height: 50px !important;
    background: linear-gradient(135deg, var(--primary-green) 0%, var(--primary-green-dark) 100%) !important;
    border: 2px solid rgba(255, 255, 255, 0.8) !important;
    border-radius: 50% !important;
    color: white !important;
    font-size: 1.4rem !important;
    cursor: pointer !important;
    z-index: 999 !important;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15),
                0 2px 6px rgba(141, 198, 63, 0.25) !important;
    transition: all 0.3s ease !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
}

.scroll-up-btn:hover {
    background: linear-gradient(135deg, var(--primary-green-dark) 0%, #6AA525 100%) !important;
    transform: scale(1.1) !important;
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.2),
                0 3px 8px rgba(141, 198, 63, 0.35) !important;
}

@media (max-width: 768px) {
    .scroll-up-btn {
        right: 15px !important;
        bottom: 15px !important;
        width: 40px !important;
        height: 40px !important;
        font-size: 1.2rem !important;
    }
}

/* ===== Preloader (Optional) ===== */
.preloader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: white;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
}

.preloader.hidden {
    animation: fadeOut 0.5s;
    animation-fill-mode: forwards;
}

@keyframes fadeOut {
    to {
        opacity: 0;
        visibility: hidden;
    }
}

/* Green Accent Bar (like in your materials) */
.accent-bar {
    width: 60px;
    height: 4px;
    background: var(--primary-green);
    margin: 1rem auto;
    border-radius: 2px;
}

.accent-bar-left {
    margin: 1rem 0;
}

/* Rounded Image Containers (matching your product photos) */
.rounded-image-container {
    border-radius: 20px;
    overflow: hidden;
    border: 3px solid var(--primary-green);
    background: #ffffff;
    padding: 0.5rem;
}

.rounded-image-circle {
    border-radius: 50%;
    overflow: hidden;
    border: 4px solid var(--primary-green);
    background: #ffffff;
    padding: 0.5rem;
}

/* Section Styling Like Flyer */
.info-section {
    background: linear-gradient(135deg, #ffffff 0%, var(--lighter-grey) 100%);
    border-radius: 20px;
    padding: 3rem;
    position: relative;
    overflow: hidden;
}

.info-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 5px;
    height: 100%;
    background: linear-gradient(180deg, var(--primary-green) 0%, var(--primary-green-dark) 100%);
}

/* Typography - Script/Italic for taglines */
.script-text {
    font-style: italic;
    font-weight: 300;
    color: var(--medium-grey);
    font-family: 'Brush Script MT', cursive, 'Segoe UI', sans-serif;
}

/* Badge/Certification Styling */
.certification-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #ffffff;
    border: 2px solid var(--primary-green);
    border-radius: 12px;
    padding: 0.75rem 1.25rem;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
}

.certification-badge img {
    max-height: 50px;
    width: auto;
}

/* Product Grid Styling */
.product-grid-item {
    background: #ffffff;
    border-radius: 20px;
    padding: 1rem;
    border: 2px solid var(--light-grey);
    transition: all 0.3s ease;
}

.product-grid-item:hover {
    border-color: var(--primary-green);
    box-shadow: 0 4px 15px rgba(141, 198, 63, 0.2);
}

/* Print Styles */
@media print {
    .navbar,
    .footer,
    .btn,
    .back-to-top {
        display: none !important;
    }

    body {
        color: black;
        background: white;
    }

    a {
        text-decoration: underline;
    }
}
