/* ==========================================================================
   1. SYSTEM VARIABLES & DESIGN SYSTEM (CSS TOKENS)
   ========================================================================== */
:root {
    /* Brand Colors */
    --primary-color: #0d9488;          /* Vibrant Dermatology Teal */
    --primary-hover: #0f766e;          /* Darker Teal */
    --primary-light: #ccfbf1;          /* Soft Teal Tint */
    --accent-color: #f43f5e;           /* Rose Pink Accent */
    --whatsapp-color: #25d366;         /* Official WhatsApp Green */
    
    /* Light Mode Palette */
    --bg-main: #f8fafc;                /* Light Slate Background */
    --bg-surface: #ffffff;             /* Surface Card White */
    --text-dark: #0f172a;              /* Slate 900 Heading Text */
    --text-muted: #64748b;             /* Slate 500 Subtitle/Body Text */
    --border-color: #e2e8f0;           /* Border Light Gray */
    --input-bg: #ffffff;
    
    /* Typography */
    --font-heading: 'Poppins', sans-serif;
    --font-body: 'Inter', sans-serif;
    
    /* Elevation & Shadows */
    --shadow-sm: 0 1px 3px rgba(0,0,0,0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.08), 0 2px 4px -1px rgba(0, 0, 0, 0.04);
    --shadow-lg: 0 10px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    --shadow-hover: 0 20px 25px -5px rgba(13, 148, 136, 0.18), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    
    /* Glassmorphism Effect */
    --glass-bg: rgba(255, 255, 255, 0.88);
    --glass-border: rgba(255, 255, 255, 0.3);
    
    /* Radii & Transitions */
    --radius-sm: 8px;
    --radius-md: 16px;
    --radius-lg: 24px;
    --radius-full: 9999px;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Auto Dark Mode Overrides */
@media (prefers-color-scheme: dark) {
    :root {
        --bg-main: #0f172a;
        --bg-surface: #1e293b;
        --text-dark: #f8fafc;
        --text-muted: #94a3b8;
        --border-color: #334155;
        --input-bg: #0f172a;
        --glass-bg: rgba(30, 41, 59, 0.88);
    }
}

/* ==========================================================================
   2. GLOBAL RESETS & BASE STYLES
   ========================================================================== */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    font-family: var(--font-body);
    background-color: var(--bg-main);
    color: var(--text-dark);
    line-height: 1.6;
    overflow-x: hidden;
}

h1, h2, h3, h4, .brand-logo {
    font-family: var(--font-heading);
    font-weight: 700;
    line-height: 1.25;
    color: var(--text-dark);
}

a {
    text-decoration: none;
    color: inherit;
    transition: var(--transition);
}

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

.container {
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 8px;
}
::-webkit-scrollbar-track {
    background: var(--bg-main);
}
::-webkit-scrollbar-thumb {
    background: var(--primary-color);
    border-radius: var(--radius-full);
}

/* ==========================================================================
   3. REUSABLE UI ELEMENTS & BUTTONS
   ========================================================================== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.6rem;
    padding: 0.85rem 1.8rem;
    font-family: var(--font-heading);
    font-weight: 600;
    font-size: 0.95rem;
    border-radius: var(--radius-sm);
    border: 2px solid transparent;
    cursor: pointer;
    transition: var(--transition);
}

.btn-primary {
    background-color: var(--primary-color);
    color: #ffffff;
    box-shadow: 0 4px 14px rgba(13, 148, 136, 0.35);
}

.btn-primary:hover {
    background-color: var(--primary-hover);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(13, 148, 136, 0.45);
}

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

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

.btn-white {
    border-color: #ffffff;
    color: #ffffff;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(4px);
}

.btn-white:hover {
    background: #ffffff;
    color: var(--text-dark);
    transform: translateY(-2px);
}

.brand-highlight, .gradient-text {
    background: linear-gradient(135deg, var(--primary-color), #2dd4bf);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.section-title {
    font-size: 2.25rem;
    text-align: center;
    margin-bottom: 0.5rem;
}

.section-subtitle {
    text-align: center;
    color: var(--text-muted);
    margin-bottom: 3rem;
    font-size: 1.05rem;
}

/* ==========================================================================
   4. STICKY NAVIGATION BAR
   ========================================================================== */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    background: var(--glass-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border-color);
    padding: 1rem 0;
    transition: var(--transition);
}

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

.brand-logo {
    font-size: 1.5rem;
    color: var(--text-dark);
    display: flex;
    align-items: center;
    gap: 0.5rem;
    letter-spacing: 0.5px;
}

.logo-leaf {
    color: var(--primary-color);
}

.logo-derma {
    color: var(--primary-color);
}

.nav-links {
    display: flex;
    gap: 2rem;
}

.nav-link {
    font-weight: 500;
    color: var(--text-muted);
    position: relative;
    padding: 0.2rem 0;
}

.nav-link:hover, .nav-link.active {
    color: var(--primary-color);
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--primary-color);
    transition: var(--transition);
}

.nav-link:hover::after, .nav-link.active::after {
    width: 100%;
}

.nav-actions {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.btn-whatsapp-nav {
    background-color: var(--whatsapp-color);
    color: #ffffff;
    padding: 0.5rem 1.25rem;
    border-radius: var(--radius-full);
    font-weight: 600;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.btn-whatsapp-nav:hover {
    box-shadow: 0 4px 12px rgba(37, 211, 102, 0.4);
    transform: translateY(-2px);
}

.hamburger {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    flex-direction: column;
    gap: 5px;
    padding: 5px;
}

.hamburger .bar {
    width: 25px;
    height: 3px;
    background-color: var(--text-dark);
    border-radius: 2px;
    transition: var(--transition);
}

/* Animated Hamburger Cross State */
.hamburger.active .bar:nth-child(1) {
    transform: translateY(8px) rotate(45deg);
}
.hamburger.active .bar:nth-child(2) {
    opacity: 0;
}
.hamburger.active .bar:nth-child(3) {
    transform: translateY(-8px) rotate(-45deg);
}

/* ==========================================================================
   5. HERO SECTION
   ========================================================================== */
.hero-fullpage {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    padding-top: 80px;
    overflow: hidden;
}

.hero-fullpage-bg {
    position: absolute;
    inset: 0;
    z-index: -1;
}

.hero-fullpage-bg img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.hero-overlay-full {
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, rgba(15, 23, 42, 0.88) 0%, rgba(15, 23, 42, 0.45) 100%);
}

.hero-fullpage-content {
    color: #ffffff;
    max-width: 650px;
    padding: 2rem 0;
    z-index: 1;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(8px);
    padding: 0.4rem 1.2rem;
    border-radius: var(--radius-full);
    font-size: 0.8rem;
    letter-spacing: 1px;
    margin-bottom: 1.5rem;
    border: 1px solid rgba(255, 255, 255, 0.2);
    font-weight: 600;
}

.hero-title {
    font-size: 3.5rem;
    margin-bottom: 1.25rem;
    color: #ffffff;
}

.hero-description {
    font-size: 1.15rem;
    margin-bottom: 2rem;
    color: rgba(255, 255, 255, 0.88);
}

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

/* ==========================================================================
   6. TRUST / BRAND HIGHLIGHTS STRIP
   ========================================================================== */
.trust-strip {
    background: var(--bg-surface);
    border-bottom: 1px solid var(--border-color);
    padding: 2rem 0;
}

.trust-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1.5rem;
    text-align: center;
}

.trust-item {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    font-weight: 600;
    color: var(--text-dark);
}

.trust-icon {
    font-size: 1.25rem;
    color: var(--primary-color);
    background: var(--primary-light);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* ==========================================================================
   7. ABOUT SECTION
   ========================================================================== */
.about {
    padding: 6rem 0;
}

.about-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
}

.about-text h2 {
    font-size: 2.25rem;
    margin-bottom: 1.5rem;
}

.about-text p {
    color: var(--text-muted);
    margin-bottom: 1.25rem;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
    margin-top: 2rem;
}

.stat {
    background: var(--bg-surface);
    padding: 1.25rem;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border-color);
    text-align: center;
    box-shadow: var(--shadow-sm);
}

.stat strong {
    display: block;
    font-size: 1.75rem;
    color: var(--primary-color);
}

.stat span {
    font-size: 0.85rem;
    color: var(--text-muted);
}

.about-image img {
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    width: 100%;
    object-fit: cover;
}

/* ==========================================================================
   8. WHY CHOOSE FRILL DERMA
   ========================================================================== */
.why-choose {
    padding: 6rem 0;
    background-color: var(--bg-surface);
}

.why-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
}

.why-card {
    background: var(--bg-main);
    padding: 2rem;
    border-radius: var(--radius-md);
    border: 1px solid var(--border-color);
    transition: var(--transition);
}

.why-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-md);
    border-color: var(--primary-color);
}

.why-icon {
    width: 50px;
    height: 50px;
    background: var(--primary-light);
    color: var(--primary-color);
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    margin-bottom: 1.25rem;
}

.why-card h3 {
    font-size: 1.2rem;
    margin-bottom: 0.5rem;
}

.why-card p {
    color: var(--text-muted);
    font-size: 0.95rem;
}

/* ==========================================================================
   9. FILTERABLE PRODUCTS GALLERY (6 PRODUCTS)
   ========================================================================== */
.products {
    padding: 6rem 0;
}

.filter-bar {
    display: flex;
    justify-content: center;
    gap: 0.75rem;
    margin-bottom: 3rem;
    flex-wrap: wrap;
}

.filter-btn {
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    color: var(--text-muted);
    padding: 0.6rem 1.4rem;
    border-radius: var(--radius-full);
    font-family: var(--font-heading);
    font-weight: 500;
    font-size: 0.9rem;
    cursor: pointer;
    transition: var(--transition);
}

.filter-btn:hover, .filter-btn.active {
    background-color: var(--primary-color);
    color: #ffffff;
    border-color: var(--primary-color);
    box-shadow: 0 4px 12px rgba(13, 148, 136, 0.25);
}

.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.product-card {
    background: var(--bg-surface);
    border-radius: var(--radius-md);
    border: 1px solid var(--border-color);
    overflow: hidden;
    transition: var(--transition);
    display: flex;
    flex-direction: column;
}

.product-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-hover);
    border-color: var(--primary-light);
}

.product-img {
    height: 280px;
    overflow: hidden;
    position: relative;
    background-color: #f1f5f9;
}

.product-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.product-card:hover .product-img img {
    transform: scale(1.08);
}

.product-info {
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.product-info h3 {
    font-size: 1.2rem;
    margin-bottom: 0.5rem;
}

.product-info p {
    color: var(--text-muted);
    font-size: 0.9rem;
    margin-bottom: 1.5rem;
    flex-grow: 1;
}

/* ==========================================================================
   10. ROUTINE & VIDEO GUIDES (6 VIDEOS)
   ========================================================================== */
.routine {
    padding: 6rem 0;
    background-color: var(--bg-surface);
}

.routine-video-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.video-card {
    background: var(--bg-main);
    border-radius: var(--radius-md);
    border: 1px solid var(--border-color);
    padding: 1.25rem;
    transition: var(--transition);
}

.video-card:hover {
    box-shadow: var(--shadow-md);
    border-color: var(--primary-color);
}

.video-thumb {
    position: relative;
    border-radius: var(--radius-sm);
    overflow: hidden;
    height: 200px;
    margin-bottom: 1rem;
}

.video-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.play-btn {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 55px;
    height: 55px;
    background: var(--primary-color);
    color: #ffffff;
    border: none;
    border-radius: 50%;
    font-size: 1.2rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 15px rgba(0,0,0,0.3);
    transition: var(--transition);
}

.play-btn:hover {
    transform: translate(-50%, -50%) scale(1.15);
    background: var(--primary-hover);
}

.video-card h4 {
    font-size: 1rem;
}

.routine-note {
    text-align: center;
    margin-top: 2.5rem;
    color: var(--text-muted);
    font-size: 0.9rem;
}

.routine-note i {
    color: var(--primary-color);
    margin-right: 0.3rem;
}

/* ==========================================================================
   11. INGREDIENTS SECTION
   ========================================================================== */
.ingredients {
    padding: 6rem 0;
}

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

.ingredient-card {
    background: var(--bg-surface);
    padding: 1.75rem;
    border-radius: var(--radius-md);
    border: 1px solid var(--border-color);
    text-align: center;
    transition: var(--transition);
}

.ingredient-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-md);
}

.ingredient-card i {
    font-size: 2rem;
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.ingredient-card h3 {
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
}

.ingredient-card p {
    color: var(--text-muted);
    font-size: 0.88rem;
}

/* ==========================================================================
   12. CONTACT SECTION & MAP
   ========================================================================== */
.contact {
    padding: 6rem 0;
    background: var(--bg-surface);
}

.contact-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
}

.contact-info h2 {
    font-size: 2.25rem;
    margin-bottom: 1rem;
}

.contact-whatsapp {
    font-size: 1.1rem;
    margin: 1.5rem 0;
    color: var(--whatsapp-color);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.map-wrapper {
    margin-top: 2rem;
}

.map-wrapper h3 {
    font-size: 1.2rem;
    margin-bottom: 0.5rem;
}

.map-wrapper p {
    color: var(--text-muted);
    margin-bottom: 1rem;
}

.contact-form-wrapper {
    background: var(--bg-main);
    padding: 2.5rem;
    border-radius: var(--radius-md);
    border: 1px solid var(--border-color);
}

.form-group {
    margin-bottom: 1.25rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
}

.form-group input, .form-group textarea {
    width: 100%;
    padding: 0.8rem 1rem;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border-color);
    background: var(--input-bg);
    color: var(--text-dark);
    font-family: inherit;
    transition: var(--transition);
}

.form-group input:focus, .form-group textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(13, 148, 136, 0.15);
}

.form-feedback {
    margin-top: 1rem;
    font-size: 0.9rem;
    font-weight: 500;
}

.form-feedback.success {
    color: #10b981;
}

.form-feedback.error {
    color: var(--accent-color);
}

/* ==========================================================================
   13. FOOTER
   ========================================================================== */
.footer {
    background-color: #0b1329;
    color: #94a3b8;
    padding: 4rem 0 2rem;
}

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

.footer-col h4 {
    color: #ffffff;
    margin-bottom: 1.2rem;
    font-size: 1.1rem;
}

.footer-col p {
    font-size: 0.9rem;
    margin-bottom: 0.6rem;
}

.footer-col a {
    display: block;
    margin-bottom: 0.6rem;
    color: #94a3b8;
    font-size: 0.9rem;
}

.footer-col a:hover {
    color: var(--primary-color);
}

.social-links {
    display: flex;
    gap: 1rem;
    margin-top: 1rem;
}

.social-links a {
    width: 38px;
    height: 38px;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    transition: var(--transition);
}

.social-links a:hover {
    background: var(--primary-color);
    transform: translateY(-3px);
}

.footer-bottom {
    text-align: center;
    border-top: 1px solid #1e293b;
    padding-top: 2rem;
    font-size: 0.85rem;
}

/* ==========================================================================
   14. FLOATING BUTTONS & TOAST NOTIFICATION
   ========================================================================== */
.float-whatsapp {
    position: fixed;
    bottom: 25px;
    right: 25px;
    background-color: var(--whatsapp-color);
    color: #ffffff;
    width: 55px;
    height: 55px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.75rem;
    box-shadow: 0 4px 15px rgba(37, 211, 102, 0.4);
    z-index: 99;
}

.float-whatsapp:hover {
    transform: scale(1.1);
}

.back-to-top {
    position: fixed;
    bottom: 90px;
    right: 25px;
    background-color: var(--bg-surface);
    color: var(--text-dark);
    width: 45px;
    height: 45px;
    border-radius: 50%;
    border: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: var(--shadow-md);
    z-index: 99;
    opacity: 0;
    pointer-events: none;
    transition: var(--transition);
}

.back-to-top.show {
    opacity: 1;
    pointer-events: auto;
}

.back-to-top:hover {
    background: var(--primary-color);
    color: #ffffff;
}

.toast {
    position: fixed;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%) translateY(100px);
    background: var(--text-dark);
    color: #ffffff;
    padding: 0.8rem 1.75rem;
    border-radius: var(--radius-full);
    font-size: 0.9rem;
    box-shadow: var(--shadow-lg);
    z-index: 3000;
    transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.toast.show {
    transform: translateX(-50%) translateY(0);
}

/* ==========================================================================
   15. MODALS (PRODUCT & VIDEO POPUPS)
   ========================================================================== */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.75);
    backdrop-filter: blur(6px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2000;
    opacity: 0;
    pointer-events: none;
    transition: var(--transition);
}

.modal-overlay.active {
    opacity: 1;
    pointer-events: auto;
}

.modal-content {
    background: var(--bg-surface);
    width: 90%;
    max-width: 600px;
    border-radius: var(--radius-md);
    padding: 2.5rem;
    position: relative;
    transform: translateY(20px);
    transition: var(--transition);
    max-height: 90vh;
    overflow-y: auto;
}

.modal-overlay.active .modal-content {
    transform: translateY(0);
}

.modal-video {
    max-width: 850px;
    padding: 1rem;
    background: #000000;
}

.modal-close {
    position: absolute;
    top: 15px;
    right: 15px;
    background: none;
    border: none;
    font-size: 1.75rem;
    color: var(--text-muted);
    cursor: pointer;
    line-height: 1;
}

.modal-close:hover {
    color: var(--text-dark);
}

/* ==========================================================================
   16. MEDIA QUERIES (RESPONSIVE BREAKPOINTS)
   ========================================================================== */
@media (max-width: 992px) {
    .about-grid, .contact-grid {
        grid-template-columns: 1fr;
        gap: 3rem;
    }
    
    .hero-title {
        font-size: 2.75rem;
    }
    
    .stats-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 768px) {
    .nav-links {
        position: fixed;
        top: 70px;
        left: 0;
        width: 100%;
        background: var(--bg-surface);
        flex-direction: column;
        padding: 2rem;
        gap: 1.5rem;
        border-bottom: 1px solid var(--border-color);
        transform: translateY(-150%);
        transition: var(--transition);
        box-shadow: var(--shadow-lg);
    }

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

    .hamburger {
        display: flex;
    }

    .hero-title {
        font-size: 2.25rem;
    }

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

    .filter-bar {
        gap: 0.5rem;
    }

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

@media (max-width: 480px) {
    .hero-cta {
        flex-direction: column;
    }
    
    .btn {
        width: 100%;
    }
    
    .btn-whatsapp-nav span {
        display: none;
    }
}

/* =========================
   NAVBAR LOGO
========================= */

.logo-wrapper {
    display: flex;
    align-items: center;
    flex-shrink: 0;
}

.brand-logo {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    height: 64px;
    white-space: nowrap;
}

/* Logo Image */
.logo-image {
    width: 46px;
    height: 46px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    overflow: hidden;
    border-radius: 50%;
}

.logo-image img {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: contain;
}

/* Brand Text */
.logo-text {
    font-size: 21px;
    font-weight: 700;
    letter-spacing: 1px;
    line-height: 1;
    color: #222;
}

.logo-derma {
    color: #5c8d69;
    font-weight: 800;
}

/* Hover */
.brand-logo:hover .logo-text {
    color: #5c8d69;
}

.brand-logo:hover .logo-derma {
    color: #222;
}


/* =========================
   MOBILE
========================= */

@media (max-width: 768px) {

    .brand-logo {
        height: 58px;
        gap: 8px;
    }

    .logo-image {
        width: 40px;
        height: 40px;
    }

    .logo-text {
        font-size: 18px;
        letter-spacing: 0.7px;
    }
}

@media (max-width: 420px) {

    .logo-image {
        width: 36px;
        height: 36px;
    }

    .logo-text {
        font-size: 16px;
    }

    .brand-logo {
        gap: 7px;
    }
}
.modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.85);
    z-index: 9999;
    justify-content: center;
    align-items: center;
}

.modal-overlay.active {
    display: flex;
}
/* ============================================
   ROUTINE VIDEOS SECTION - ADVANCED CSS
   ============================================ */

.routine {
    padding: 80px 0;
    background: var(--cream);
}

.routine-video-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
    margin: 40px 0 30px;
}

/* Video Card Styles */
.video-card {
    background: var(--white);
    border-radius: var(--radius-md);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
    cursor: pointer;
    position: relative;
}

.video-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-lg);
}

.video-thumb {
    position: relative;
    width: 100%;
    padding-top: 56.25%; /* 16:9 Aspect Ratio */
    background: var(--text-dark);
    overflow: hidden;
}

.video-thumb video {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    background: var(--text-dark);
}

/* Play Button Overlay */
.play-btn {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 70px;
    height: 70px;
    background: rgba(42, 99, 12, 0.9);
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    color: white;
    font-size: 1.8rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
    z-index: 10;
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
}

.play-btn:hover {
    transform: translate(-50%, -50%) scale(1.12);
    background: var(--primary);
    border-color: white;
    box-shadow: 0 0 40px rgba(42, 99, 12, 0.4);
}

.play-btn i {
    margin-left: 4px;
}

/* Video Thumbnail Overlay Gradient */
.video-thumb::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, 
        rgba(0, 0, 0, 0.6) 0%, 
        rgba(0, 0, 0, 0.2) 40%, 
        transparent 70%
    );
    opacity: 0;
    transition: var(--transition);
    z-index: 2;
}

.video-card:hover .video-thumb::after {
    opacity: 1;
}

/* Video Duration Badge */
.video-duration {
    position: absolute;
    bottom: 12px;
    right: 12px;
    background: rgba(0, 0, 0, 0.75);
    color: white;
    padding: 4px 10px;
    border-radius: var(--radius-sm);
    font-size: 0.75rem;
    font-weight: 500;
    z-index: 5;
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
}

/* Video Title */
.video-card h4 {
    padding: 16px 20px;
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-dark);
    transition: var(--transition);
    display: flex;
    align-items: center;
    gap: 8px;
}

.video-card:hover h4 {
    color: var(--primary);
}

.video-card h4::before {
    content: '';
    width: 4px;
    height: 20px;
    background: var(--primary);
    border-radius: 2px;
    opacity: 0;
    transition: var(--transition);
}

.video-card:hover h4::before {
    opacity: 1;
}

/* Video Play Animation */
@keyframes pulse-play {
    0% {
        box-shadow: 0 0 0 0 rgba(42, 99, 12, 0.4);
    }
    70% {
        box-shadow: 0 0 0 20px rgba(42, 99, 12, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(42, 99, 12, 0);
    }
}

.play-btn.pulse {
    animation: pulse-play 1.5s ease-out infinite;
}

/* Video Modal */
.modal-video {
    max-width: 900px !important;
    padding: 20px !important;
    background: rgba(0, 0, 0, 0.92) !important;
    border-radius: var(--radius-lg) !important;
}

.modal-video .modal-close {
    color: rgba(255, 255, 255, 0.7) !important;
    font-size: 2rem !important;
    top: 12px !important;
    right: 18px !important;
    z-index: 20 !important;
    transition: var(--transition);
}

.modal-video .modal-close:hover {
    color: white !important;
    transform: rotate(90deg) scale(1.1);
}

.modal-video video {
    border-radius: var(--radius-sm);
    background: #000;
    width: 100%;
    height: auto;
    max-height: 80vh;
    display: block;
}

/* Video Controls Customization */
.modal-video video::-webkit-media-controls-panel {
    background: linear-gradient(to top, rgba(0, 0, 0, 0.8), transparent);
}

/* Video Card Loading State */
.video-thumb .loading-spinner {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 40px;
    height: 40px;
    border: 4px solid rgba(255, 255, 255, 0.1);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    z-index: 1;
    display: none;
}

.video-thumb.loading .loading-spinner {
    display: block;
}

@keyframes spin {
    to { transform: translate(-50%, -50%) rotate(360deg); }
}

/* ============================================
   RESPONSIVE DESIGN FOR VIDEOS
   ============================================ */

@media (max-width: 1024px) {
    .routine-video-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 24px;
    }
}

@media (max-width: 768px) {
    .routine-video-grid {
        grid-template-columns: 1fr 1fr;
        gap: 16px;
    }
    
    .play-btn {
        width: 54px;
        height: 54px;
        font-size: 1.4rem;
    }
    
    .video-card h4 {
        font-size: 0.85rem;
        padding: 12px 14px;
    }
    
    .modal-video {
        padding: 12px !important;
        margin: 12px;
    }
    
    .modal-video .modal-close {
        font-size: 1.6rem !important;
        top: 8px !important;
        right: 14px !important;
    }
}

@media (max-width: 480px) {
    .routine-video-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .play-btn {
        width: 50px;
        height: 50px;
        font-size: 1.2rem;
    }
    
    .video-card h4 {
        font-size: 0.9rem;
        padding: 14px 16px;
    }
    
    .modal-video {
        padding: 8px !important;
        margin: 8px;
        border-radius: var(--radius-sm) !important;
    }
    
    .modal-video .modal-close {
        font-size: 1.4rem !important;
        top: 6px !important;
        right: 10px !important;
    }
}

/* ============================================
   REDUCED MOTION PREFERENCE
   ============================================ */
@media (prefers-reduced-motion: reduce) {
    .video-card {
        transition: none !important;
    }
    
    .play-btn {
        transition: none !important;
    }
    
    .play-btn.pulse {
        animation: none !important;
    }
    
    .video-thumb::after {
        transition: none !important;
    }
    
    .video-card h4::before {
        transition: none !important;
    }
}

/* ============================================
   DARK MODE SUPPORT (Optional)
   ============================================ */
@media (prefers-color-scheme: dark) {
    .video-card {
        background: #1a1a1a;
    }
    
    .video-card h4 {
        color: #e8e8e8;
    }
    
    .video-card:hover h4 {
        color: #7cb84a;
    }
}

