/* rjt1020/2b1-production/src/main/resources/static/style.css */

/* --- VARIABLES --- */
:root {
    --primary: #C92A2A; /* Red */
    --primary-dark: #961b1b;
    --gold: #D4AF37;
    --dark: #111827;
    --gray: #6B7280;
    --bg-light: #FFFCFA;
    --white: #ffffff;
    
    /* Cover Match Colors */
    --cover-blue: #154c79; /* Royal Blue from 'QUESTIONS' */
    --cover-green: #2e5c3e; /* Forest Green from 'To Ask Before' */
    
    --font-head: 'Playfair Display', serif;
    --font-body: 'Lato', sans-serif;
    --font-elegant: 'Great Vibes', cursive;
    
    /* Effects */
    --shadow-sm: 0 4px 6px -1px rgba(0,0,0,0.05);
    --shadow-lg: 0 25px 50px -12px rgba(0,0,0,0.15);
    --shadow-glow: 0 20px 60px -10px rgba(201, 42, 42, 0.25);
    --glass: rgba(255, 255, 255, 0.95);
    --ease-elastic: cubic-bezier(0.34, 1.56, 0.64, 1);
    --ease-smooth: cubic-bezier(0.4, 0, 0.2, 1);
    
    /* Spacing & Layout */
    --header-height: 70px;
    --safe-top: env(safe-area-inset-top, 0px);
    --safe-bottom: env(safe-area-inset-bottom, 20px);
    --section-spacing: clamp(50px, 8vw, 100px);
}

* { margin: 0; padding: 0; box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html { 
    scroll-behavior: smooth; 
    scroll-padding-top: calc(var(--header-height) + 20px);
}
body { 
    font-family: var(--font-body); 
    color: var(--dark); 
    background: var(--bg-light); 
    line-height: 1.6; 
    overflow-x: hidden; 
}

/* --- TYPOGRAPHY & FLUID SCALING --- */
h1, h2, h3, h4 { font-family: var(--font-head); font-weight: 700; line-height: 1.2; }
/* REFINED: H1 size reduced for 1920x1200 precision */
h1 { font-size: clamp(2.2rem, 5.5vw, 4rem); letter-spacing: -0.02em; } 
h2 { font-size: clamp(1.8rem, 4vw, 2.8rem); }
h3 { font-size: clamp(1.4rem, 3vw, 2rem); }
p { font-size: clamp(1rem, 1.1vw, 1.125rem); }

img { max-width: 100%; height: auto; display: block; }
.highlight-text { color: var(--primary); }
.highlight-gold { color: var(--gold); font-weight: 700; font-style: italic; }
.text-center { text-align: center; }
.text-white { color: white !important; }
.text-white-70 { color: rgba(255, 255, 255, 0.8) !important; }
.text-white-shadow { text-shadow: 0 2px 10px rgba(0,0,0,0.5); }

/* === TITLE STYLING (MATCHING BOOK COVER) === */
.hero-title {
    display: flex;
    flex-direction: column;
    align-items: flex-start; /* Desktop default: Left Align */
}

/* "Important" - Red */
.title-important {
    color: var(--primary);
    display: block;
    line-height: 0.9;
    font-weight: 700;
}

/* "Questions" - Blue */
.title-questions {
    color: var(--cover-blue);
    display: block;
    line-height: 0.9;
    font-weight: 700;
    margin-bottom: 5px;
}

/* "To Ask Before" - Readable Stylized Font */
.title-ask {
    color: var(--cover-green);
    font-family: var(--font-head);
    font-size: 0.6em; 
    display: block;
    line-height: 1.2;
    font-weight: 600;
    font-style: italic;
    letter-spacing: 0.05em;
}

/* "Getting Married" - White on Red Ribbon */
.title-married {
    font-family: var(--font-body);
    font-size: 0.5em; 
    color: white;
    background-color: var(--primary); 
    padding: 6px 20px;
    border-radius: 4px; 
    box-shadow: 0 4px 15px rgba(201, 42, 42, 0.4); 
    text-transform: uppercase;
    font-weight: 800;
    letter-spacing: 1.5px;
    display: inline-block;
    margin-top: 5px;
}

/* === ANIMATED GRADIENT TEXT === */
.highlight-price {
    font-family: var(--font-body);
    font-weight: 900;
    font-size: clamp(2.8rem, 5vw, 3.8rem);
    line-height: 1;
    background: linear-gradient(135deg, #D90429, #EF233C, #FFD700, #D90429);
    background-size: 300% 300%;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    filter: drop-shadow(0 2px 4px rgba(217, 4, 41, 0.2));
    display: inline-block;
    animation: gradientFlow 6s ease infinite;
}

.offer-label {
    font-size: 0.75rem; 
    text-transform: uppercase; 
    background-color: #FFD700;
    padding: 3px 10px;
    border-radius: 4px;
    font-weight: 800; 
    letter-spacing: 1px;
    margin-bottom: 4px;
    display: inline-block;
}

/* Texture Overlay */
.texture-overlay {
    position: fixed; inset: 0; pointer-events: none; z-index: 0; opacity: 0.03;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.65' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)' opacity='1'/%3E%3C/svg%3E");
}

/* --- NAVBAR --- */
.navbar {
    position: fixed; top: 0; width: 100%; z-index: 1000;
    height: calc(var(--header-height) + var(--safe-top));
    padding-top: var(--safe-top);
    background: rgba(255,255,255,0.85);
    backdrop-filter: blur(16px); 
    border-bottom: 1px solid rgba(255,255,255,0.3);
    transition: 0.3s;
    display: flex; align-items: center;
}
.container { 
    width: 100%; max-width: 1200px; margin: 0 auto; padding: 0 24px; position: relative; z-index: 2; 
}
.nav-inner { display: flex; justify-content: space-between; align-items: center; width: 100%; }

/* --- LOGO STYLING --- */
.logo { font-family: var(--font-head); font-size: 1.6rem; font-weight: 800; color: var(--primary); text-decoration: none; letter-spacing: -0.5px; display: flex; align-items: baseline; gap: 4px; white-space: nowrap; }
.logo-dot { color: var(--gold); }

.tm-mark {
    font-size: 0.4em;
    top: -0.7em;
    position: relative;
    color: var(--gold); 
    font-weight: 700;
    text-transform: uppercase;
}
.logo-divider {
    font-weight: 300;
    opacity: 0.5;
    margin: 0 2px;
    color: var(--dark);
    font-size: 0.8em;
}
.logo-tagline {
    font-size: 0.55em;
    font-weight: 400;
    letter-spacing: 0.5px;
    opacity: 1; 
    font-family: var(--font-body);
    text-transform: uppercase;
    color: var(--primary); 
}

.nav-links { display: flex; gap: 28px; align-items: center; }
.nav-links a { text-decoration: none; color: var(--dark); font-weight: 600; font-size: 0.95rem; transition: 0.2s; position: relative; }
.nav-links a:active { color: var(--primary); transform: scale(0.96); } 
.nav-links a::after {
    content: ''; position: absolute; width: 0; height: 2px; bottom: -2px; left: 0; 
    background: var(--primary); transition: width 0.3s var(--ease-smooth);
}
@media (hover: hover) { .nav-links a:hover::after { width: 100%; } }

.hamburger { display: none; font-size: 2rem; cursor: pointer; color: var(--dark); padding: 5px; }

/* --- HERO SECTION --- */
.hero {
    position: relative; min-height: 100dvh; 
    padding-top: calc(var(--header-height) + var(--safe-top));
    display: flex; align-items: center;
    background: radial-gradient(circle at 70% 30%, #FFF0F0, transparent 60%);
    overflow: hidden;
}
.hero-bg-glow {
    position: absolute; top: -20%; right: -10%; width: 60vw; height: 60vw;
    background: radial-gradient(circle, rgba(212,175,55,0.12) 0%, transparent 70%);
    filter: blur(100px); z-index: 0;
    animation: breathe 8s ease-in-out infinite;
}

.hero-grid { display: grid; grid-template-columns: 1fr 1fr; align-items: center; gap: 40px; height: 100%; }
/* REFINED: Tightened H1 Margin */
.hero-text h1 { margin: 5px 0 10px; line-height: 1.1; }
/* -- CONTENT VISIBILITY CONTROLS -- */
.desktop-hero-content { display: block; }
.mobile-hero-content { display: none; }
/* REFINED: Tightened subtext margin */
.hero-sub { color: var(--gray); margin-bottom: 15px; max-width: 95%; line-height: 1.6; }
.badge-pill { 
    display: inline-flex; align-items: center; gap: 6px; 
    padding: 6px 14px; background: rgba(201,42,42,0.08); 
    color: var(--primary); border-radius: 50px; font-weight: 700; font-size: 0.8rem;
    border: 1px solid rgba(201,42,42,0.1);
}

/* REFINED: Tightened signature block margin */
.author-signature-block { border-left: 3px solid var(--gold); padding-left: 15px; margin-bottom: 20px; }
.auth-label { display: block; font-size: 0.75rem; text-transform: uppercase; letter-spacing: 2px; color: #888; margin-bottom: 2px; }
/* REFINED: Auth font size scaled for high-res precision */
.auth-names { font-family: var(--font-elegant); font-size: clamp(2rem, 2.5vw, 2.3rem); color: var(--primary); line-height: 1; font-weight: 400; }
.amp { color: var(--gold); font-family: var(--font-head); font-style: italic; font-size: 1.5rem; margin: 0 5px; }

/* REFINED: Tightened action wrapper margin */
.action-wrapper { display: flex; align-items: center; gap: 20px; margin-top: -40px; flex-wrap: wrap; }
.price-box { display: flex; flex-direction: column; justify-content: center; }

.hero-visual { display: flex; justify-content: center; position: relative; perspective: 1000px; }

/* UPDATED: BOOK IMAGE SIZING - 精确调整 for 1920x1200 balance */
.book-stage { 
    position: relative; 
    width: 100%; 
    max-width: 500px; 
} 

.book-stage::after {
    content: ''; position: absolute; top: 50%; left: 50%; width: 80%; height: 80%;
    background: rgba(201, 42, 42, 0.3); transform: translate(-50%, -50%);
    filter: blur(50px); z-index: -1; animation: breathe 6s ease-in-out infinite alternate;
}
.book-img { 
    width: 100%; border-radius: 12px; 
    box-shadow: -20px 30px 60px rgba(0,0,0,0.25);
    transform: rotateY(-12deg) rotateX(5deg);
    transition: transform 0.5s var(--ease-smooth);
    animation: float 6s ease-in-out infinite;
}

.float-badge {
    position: absolute; background: var(--white); padding: 8px 16px;
    border-radius: 50px; box-shadow: var(--shadow-lg);
    display: flex; align-items: center; gap: 8px; font-weight: 700; font-size: 0.85rem;
    animation: float 7s ease-in-out infinite reverse; 
    border: 1px solid rgba(0,0,0,0.05);
    white-space: nowrap; z-index: 5;
}

.icon-box-sm { 
    width: 26px; height: 26px; background: rgba(212,175,55,0.15); border-radius: 50%; 
    display: flex; align-items: center; justify-content: center; color: var(--primary); 
}
/* --- DESKTOP: Organic/Random positions --- */

/* 1. Top Left - High up, pushed slightly out */
.top-left { 
    top: 5%; 
    left: -35px; 
}

/* 2. Top Right - Sits lower than top-left to break symmetry */
.top-right { 
    top: 25%;         /* Not at the very top */
    right: -45px;     /* Pushed far right */
    animation-delay: 0.5s; 
}

/* 3. Bottom Right - Very low, tucked near the corner */
.bottom-right { 
    bottom: 8%; 
    right: -30px; 
    animation-delay: 1.5s; 
}

/* 4. Bottom Left (If you add a 4th badge) - Sits higher up from bottom */
.bottom-left {
    bottom: 30%;      /* High up from bottom */
    left: -40px;
    animation-delay: 1.0s;
}

/* --- MOBILE: Safe Layout (Reset to neat corners) --- */
@media (max-width: 768px) {
    /* On mobile, random positions look messy/broken. 
       We snap them back to safe corners inside the image. */
    
    .float-badge {
        transform: scale(0.85); /* Shrink badges slightly */
        z-index: 20;
    }

    .top-left {
        top: 10px;
        left: 0;
    }

    .top-right {
        top: 10px;
        right: 0;
    }

    .bottom-right {
        bottom: 10px;
        right: 0;
    }
    
    .bottom-left {
        bottom: 10px;
        left: 0;
    }
}

/* --- SECTIONS --- */
.section { padding: var(--section-spacing) 0; }
.section-header { max-width: 700px; margin: 0 auto clamp(40px, 8vw, 70px); }
.section-title { margin-bottom: 15px; position: relative; display: inline-block; }
.section-subtitle { font-size: clamp(1.1rem, 2vw, 1.3rem); color: var(--black); font-weight: 300; }

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

/* --- PHILOSOPHY SECTION WITH BG IMAGE 1 --- */
.philosophy-bg {
    position: relative;
    background-image: url('assets/1.png');
    background-attachment: fixed; 
    background-position: center;
    background-repeat: no-repeat;
    background-size: cover;
    color: white;
}
.philosophy-overlay {
    position: absolute; inset: 0;
    background: linear-gradient(to bottom, rgba(0,0,0,0.7), rgba(0,0,0,0.4));
    z-index: 1;
}
.relative-z { position: relative; z-index: 2; }

/* Modified Pillar Card for Dark BG */
.pillar-card {
    background: var(--white); padding: 40px 30px; border-radius: 20px;
    box-shadow: var(--shadow-sm); text-align: center; border: 1px solid rgba(0,0,0,0.03);
    transition: transform 0.4s var(--ease-elastic), box-shadow 0.4s ease;
    position: relative; overflow: hidden;
}
.glass-effect {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    box-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.37);
}
.pillar-card::before {
    content: ''; position: absolute; top: 0; left: 0; width: 100%; height: 5px;
    background: var(--gold); transform: scaleX(0); transition: transform 0.5s var(--ease-smooth);
}
.pillar-card:active, .pillar-card:hover { transform: translateY(-8px); box-shadow: var(--shadow-glow); border-color: rgba(201,42,42,0.1); }
.pillar-card:active::before, .pillar-card:hover::before { transform: scaleX(1); }

.icon-circle { 
    width: 70px; height: 70px; background: #f0f0f0; border-radius: 50%;
    display: flex; align-items: center; justify-content: center; margin: 0 auto 20px;
    color: var(--primary); font-size: 3rem; transition: 0.5s var(--ease-elastic);
}
.pillar-card:hover .icon-circle { background: var(--primary); color: white; transform: rotate(15deg) scale(1.1); }

/* --- NEW FONTS FOR PILLAR SECTION --- */
.pillar-title {
    color: var(--cover-blue) !important; 
    margin-bottom: 5px;
}
.pillar-subtitle {
    display: block;
    color: var(--cover-green) !important; 
    font-weight: 700;
    font-size: 1.1rem;
    margin-bottom: 10px;
    text-transform: uppercase;
    letter-spacing: 1px;
}
.pillar-quote {
    color: var(--primary) !important; 
    font-weight: 500;
    font-style: italic;
}

.bg-warm { background: #FFF5F5; }

/* --- FULL WIDTH IMAGE CARDS (IMAGES 2 & 3) --- */
.split-layout { 
    display: grid; 
    grid-template-columns: 1fr 1fr; 
    gap: 40px; 
    align-items: stretch; 
}

/* Base card style */
.audience-card, .learn-card {
    background: var(--white);
    border-radius: 24px;
    box-shadow: var(--shadow-lg);
    border: 1px solid rgba(0,0,0,0.03);
    overflow: hidden; 
    display: flex;
    flex-direction: column;
    height: 100%;
}

/* Remove internal padding for image container */
.no-padding-img { padding: 0; }

.card-visual-full {
    width: 100%;
    height: 350px; 
    position: relative;
    overflow: hidden;
}

.img-full-cover {
    width: 100%;
    height: 100%;
    object-fit: cover; 
    display: block;
    transition: transform 0.8s ease;
}

/* Zoom effect on hover */
.audience-card:hover .img-full-cover,
.learn-card:hover .img-full-cover {
    transform: scale(1.08);
}

.card-content-pad {
    padding: 30px;
    flex-grow: 1;
}

/* Check lists */
.check-list li, .learn-list li { display: flex; gap: 15px; margin-bottom: 25px; align-items: flex-start; }
.check-icon-box { 
    width: 32px; height: 32px; background: rgba(201,42,42,0.1); border-radius: 8px;
    display: flex; align-items: center; justify-content: center; color: var(--primary); font-size: 1.1rem; flex-shrink: 0; margin-top: 3px;
}
.learn-icon-box {
    width: 32px; height: 32px; background: rgba(212,175,55,0.1); border-radius: 8px;
    display: flex; align-items: center; justify-content: center; color: var(--gold); font-size: 1.1rem; flex-shrink: 0; margin-top: 3px;
}
.learn-list { list-style: none; padding: 0; }


/* --- INSIDE GLIMPSE (IMAGES 4 & 5) --- */
.gallery-grid-full {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 0; 
    gap: 30px;
    margin-top: 30px;
}

.gallery-item-full {
    border-radius: 16px;
    overflow: hidden;
    box-shadow: var(--shadow-lg);
    position: relative;
    aspect-ratio: 16/9; 
    cursor: zoom-in; 
}

.gallery-img-full {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.6s ease;
}

.gallery-item-full:hover .gallery-img-full {
    transform: scale(1.03); 
}

/* Hover hint */
.zoom-hint {
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 700;
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: 2;
    gap: 10px;
    backdrop-filter: blur(2px);
}

.gallery-item-full:hover .zoom-hint {
    opacity: 1;
}

/* --- LIGHTBOX STYLES --- */
.lightbox-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.95);
    z-index: 3000;
    align-items: center;
    justify-content: center;
    padding: 20px;
    cursor: zoom-out;
}

.lightbox-img {
    max-width: 95vw;
    max-height: 95vh;
    box-shadow: 0 0 50px rgba(0,0,0,0.8);
    border-radius: 4px;
    animation: zoomIn 0.3s ease;
}

.lightbox-close {
    position: absolute;
    top: 20px;
    right: 20px;
    color: white;
    font-size: 2rem;
    cursor: pointer;
    background: rgba(255,255,255,0.1);
    border-radius: 50%;
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: 0.2s;
}
.lightbox-close:hover { background: var(--primary); }

@keyframes zoomIn { from { transform: scale(0.9); opacity: 0; } to { transform: scale(1); opacity: 1; } }

/* --- NEW HOW-TO SECTION STYLES --- */
.howto-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    margin-top: 30px;
}

.howto-card {
    background: var(--white);
    padding: 35px 25px;
    border-radius: 20px;
    box-shadow: var(--shadow-sm);
    border: 1px solid rgba(0,0,0,0.03);
    text-align: left;
    transition: 0.3s;
    position: relative;
    overflow: hidden;
}

.howto-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-lg);
    border-color: rgba(212,175,55,0.3);
}

/* CENTERED LAST CARD (ODD ITEM) */
.howto-card:last-child {
    grid-column: 1 / -1; 
    width: 100%;
    max-width: 600px; 
    margin-left: auto;
    margin-right: auto; 
}

/* Number Badge */
.step-badge {
    position: absolute;
    top: 20px;
    right: 20px;
    font-family: var(--font-head);
    font-size: 3rem;
    font-weight: 800;
    color: rgba(212,175,55,0.15); 
    line-height: 1;
}

.howto-card h4 {
    font-size: 1.3rem;
    color: var(--primary);
    margin-bottom: 15px;
    position: relative;
    text-align: center; 
}

.howto-card p {
    font-size: 0.95rem;
    color: #555;
    line-height: 1.7;
}

/* Remember Note Banner */
.remember-note {
    background: #FFF9E5; 
    border-left: 5px solid var(--gold);
    padding: 25px;
    margin-top: 50px;
    border-radius: 12px;
    display: flex;
    gap: 20px;
    align-items: center;
    box-shadow: var(--shadow-sm);
}

.remember-note i {
    font-size: 2rem;
    color: var(--primary);
    flex-shrink: 0;
}

.remember-note p {
    margin: 0;
    font-size: 1.05rem;
    color: var(--dark);
}

/* --- END HOW-TO SECTION --- */

.image-frame-styled { position: relative; padding: 15px; perspective: 1000px; }
.img-responsive { 
    border-radius: 15px; border: 4px solid white; box-shadow: var(--shadow-lg); position: relative; z-index: 2; 
    transition: transform 0.5s var(--ease-smooth);
}
.frame-border { 
    position: absolute; inset: 0; border: 3px solid var(--gold); z-index: 1; 
    transform: translate(15px, 15px); border-radius: 15px; transition: transform 0.5s var(--ease-smooth);
}
@media (hover: hover) {
    .image-frame-styled:hover .img-responsive { transform: translateY(-10px); }
    .image-frame-styled:hover .frame-border { transform: translate(10px, 10px); }
}

.bg-dark { background: #1a1a1a; color: white; }

/* --- NEW COUNSELING SECTION WITH BG IMAGE 1 --- */
.counseling-bg {
    position: relative;
    background-image: url('assets/1.png');
    background-attachment: fixed; 
    background-position: center;
    background-repeat: no-repeat;
    background-size: cover;
    color: var(--dark); 
}
.counseling-overlay {
    position: absolute; inset: 0;
    background: rgba(255, 255, 255, 0.7); 
    z-index: 1;
}

.relative-z { position: relative; z-index: 2; }

/* --- UPDATED COUNSELING CARD STYLES --- */
.counsel-card {
    background: var(--white);
    padding: 30px 20px; border-radius: 15px;
    border: 1px solid rgba(255,255,255,0.1); text-align: center; cursor: pointer; touch-action: manipulation;
    transition: 0.3s; backdrop-filter: blur(5px);
    display: flex; flex-direction: column; align-items: center;
}
.counsel-card:active, .counsel-card:hover { background: #fdfdfd; transform: scale(0.98); border-color: var(--primary); box-shadow: var(--shadow-lg); }
.c-icon { font-size: 3rem; color: var(--gold); margin-bottom: 15px; transition: 0.3s; }
.counsel-card:hover .c-icon { transform: scale(1.1); color: var(--primary); }

.counsel-card h4 {
    color: var(--cover-blue); 
    margin-bottom: 10px;
    font-size: 1.4rem;
}
.counsel-card p {
    color: var(--cover-green); 
    font-size: 0.95rem;
    opacity: 1; 
    line-height: 1.5;
    margin: 10px 0 20px;
    min-height: 3em;
}
.counsel-card .btn-primary {
    margin-top: auto;
}

.btn-primary {
    background: var(--primary); color: white; border: none;
    padding: 14px 32px; border-radius: 50px; font-weight: 700; cursor: pointer;
    transition: 0.2s; box-shadow: 0 8px 16px rgba(201,42,42,0.3);
    white-space: nowrap; font-size: 1rem;
    min-height: 48px; display: inline-flex; justify-content: center; align-items: center;
    position: relative; overflow: hidden;
}
.btn-primary::after {
    content: ''; position: absolute; top: 0; left: -100%;
    width: 50%; height: 100%;
    background: linear-gradient(120deg, transparent, rgba(255,255,255,0.3), transparent);
    transform: skewX(-25deg);
    animation: shine 4s infinite;
}
.btn-primary:active { background: var(--primary-dark); transform: scale(0.96); box-shadow: 0 2px 4px rgba(0,0,0,0.2); }

/* REFINED: BTN-XL scaled for better 1920x1200 precision */
.btn-xl { padding: 12px 32px; font-size: 1rem; width: auto; }
.btn-sm { padding: 10px 24px; font-size: 0.9rem; min-height: 40px; }
.pulse-effect { animation: pulse 2s infinite; }

/* --- PROFESSIONAL FOOTER --- */
footer { 
    background: var(--dark); 
    color: #f3f4f6; 
    padding: 80px 0 calc(20px + var(--safe-bottom)); 
    font-size: 0.95rem;
}

.footer-main-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 50px;
    margin-bottom: 60px;
}

.footer-brand .logo {
    margin-bottom: 16px;
}

.footer-tagline {
    color: #9ca3af;
    line-height: 1.7;
    max-width: 320px;
}

.footer-col h5 {
    color: var(--gold);
    font-size: 1.1rem;
    margin-bottom: 25px;
    letter-spacing: 0.5px;
}

.footer-col p {
    color: #9ca3af;
    line-height: 1.7;
    margin-bottom: 15px;
}

.footer-links {
    list-style: none;
    padding: 0;
}

.footer-links li {
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.footer-links a {
    color: #d1d5db;
    text-decoration: none;
    transition: all 0.2s ease;
}

.footer-links a:hover {
    color: var(--gold);
    transform: translateX(4px);
}

.footer-time {
    color: #9ca3af;
    margin-top: 10px;
}

.footer-bottom-bar {
    border-top: 1px solid rgba(255,255,255,0.1);
    padding-top: 30px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
    text-align: center;
    color: #6b7280;
    font-size: 0.85rem;
}

.social-icons {
    display: flex;
    gap: 15px;
    margin-top: 15px;
}

.social-link {
    width: 36px; height: 36px;
    background: rgba(255,255,255,0.1);
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    color: white; text-decoration: none;
    transition: 0.3s;
}
.social-link:hover { background: var(--primary); transform: translateY(-3px); }


/* --- POLICY PAGES NAV --- */
.policy-header {
    background: var(--dark); color: white;
    padding: calc(100px + var(--safe-top)) 0 60px;
    text-align: center;
}
.policy-nav-wrapper {
    background: white; position: sticky; 
    top: calc(var(--header-height) + var(--safe-top)); 
    z-index: 900;
    border-bottom: 1px solid #eee;
    box-shadow: 0 4px 6px -1px rgba(0,0,0,0.05);
}
.policy-nav-ul {
    display: flex; justify-content: center; list-style: none; padding: 0; margin: 0;
    overflow-x: auto; white-space: nowrap; -webkit-overflow-scrolling: touch; scrollbar-width: none;
}
.policy-nav-ul::-webkit-scrollbar { display: none; }
.policy-nav-ul a {
    display: block; padding: 20px 25px; color: #666; text-decoration: none;
    font-weight: 700; font-size: 0.9rem; border-bottom: 3px solid transparent; transition: 0.3s;
}
.policy-nav-ul a:active, .policy-nav-ul a:hover { color: var(--primary); border-bottom-color: var(--primary); background: #FFF5F5; }
.policy-content { max-width: 800px; margin: 60px auto; padding: 0 24px; }
.policy-section { margin-bottom: 60px; scroll-margin-top: 180px; border-bottom: 1px solid #eee; padding-bottom: 40px; }
.policy-section:last-child { border: none; }
.policy-section h2 { color: var(--primary); margin-bottom: 20px; display: flex; align-items: center; gap: 10px; }
.policy-section h3 { font-size: 1.2rem; margin: 25px 0 10px; color: var(--dark); }
.policy-section p, .policy-section li { color: #555; margin-bottom: 15px; line-height: 1.8; }
.policy-section ul { padding-left: 20px; margin-bottom: 20px; }

/* --- MODAL (Existing Counseling Modal + New Status Modal) --- */
.modal-overlay { 
    display: none; position: fixed; inset: 0; 
    background: rgba(0,0,0,0.85); z-index: 2000; 
    align-items: center; justify-content: center; backdrop-filter: blur(5px); padding: 20px;
}
.modal-overlay.show { display: flex; }
.modal-container { 
    background: white; padding: 25px; border-radius: 20px; width: 100%; max-width: 420px; 
    position: relative; box-shadow: var(--shadow-lg); max-height: 90vh; overflow-y: auto;
}
.modal-close { position: absolute; top: 15px; right: 15px; background: none; border: none; font-size: 1.5rem; padding: 10px; cursor: pointer; }
.modal-container input, .modal-container select { 
    width: 100%; padding: 14px; margin: 10px 0; border: 1px solid #ddd; border-radius: 10px; font-size: 16px; appearance: none;
}
.btn-full { width: 100%; margin-top: 10px; }

/* --- RESPONSIVE MEDIA QUERIES --- */
.mobile-fab { display: none; }
.mobile-author-display { display: none; } 

@media (min-width: 900px) {
    .footer-bottom-bar { flex-direction: row; justify-content: space-between; text-align: left; }
}

@media (max-width: 900px) {
/* Toggle Mobile Content */
    .desktop-hero-content { display: none; }
    .mobile-hero-content { display: block; }
    
    .nav-links { 
        position: fixed; top: 0; right: 0; width: 80%; max-width: 300px; height: 100dvh;
        background: var(--white); flex-direction: column; justify-content: flex-start;
        padding: calc(var(--safe-top) + 60px) 24px 40px;
        box-shadow: -10px 0 30px rgba(0,0,0,0.1); transform: translateX(100%); transition: transform 0.3s var(--ease-smooth);
        z-index: 1001;
    }
    .nav-links.active { transform: translateX(0); }
    .nav-links a { 
        font-size: 1.1rem; 
        padding: 20px 0; 
        border-bottom: 1px solid #f0f0f0; 
        width: 100%; 
        display: block; 
    }
    .nav-btn { width: 100%; margin-top: 20px; }
    .menu-overlay { position: fixed; inset: 0; background: rgba(0,0,0,0.5); z-index: 1000; opacity: 0; pointer-events: none; transition: 0.3s; }
    .menu-overlay.active { opacity: 1; pointer-events: auto; }
    .hamburger { display: block; z-index: 1002; position: relative; }
    
    .hero { min-height: auto; padding-bottom: 40px; padding-top: calc(var(--header-height) + var(--safe-top) + 10px); }
    .hero-grid { grid-template-columns: 1fr; text-align: center; gap: 20px; }
    .hero-text { order: 2; }
    
    /* Hero Title Alignment & Spacing */
    .hero-title { 
        align-items: center; 
        margin-bottom: 25px; 
    }
    .title-married {
        transform: none; 
    }
    
    .action-wrapper { display: flex; align-items: center; gap: 20px; margin-top: 0px; flex-wrap: wrap; }
    .hero-visual { order: 1; margin-bottom: 20px; }
    .action-wrapper { justify-content: center; flex-direction: column; width: 100%; }
    .btn-xl { width: 100%; max-width: 100%; padding: 16px 40px; font-size: 1.1rem; }
    .author-signature-block { border-left: none; border-bottom: 2px solid var(--gold); padding-bottom: 10px; padding-left: 0; margin: 0 auto 30px; display: inline-block; }
    
    .split-layout { grid-template-columns: 1fr; gap: 40px; }
    
    #audience .split-image { display: none; } 
    
    .footer-main-grid { text-align: center; gap: 40px; }
    .social-icons { justify-content: center; }

    .footer-brand .logo {
        justify-content: center;
    }

    .footer-tagline {
        display: none;
    }
    
    .policy-nav-ul { justify-content: flex-start; padding: 0 10px; scroll-snap-type: x mandatory; }
    .policy-nav-ul a { scroll-snap-align: start; padding: 15px 20px; font-size: 0.85rem; }

    /* Floating Button for Mobile */
    .mobile-fab {
        display: flex; align-items: center; justify-content: center;
        position: fixed; 
        bottom: 30px; 
        right: 25px;
        width: 60px; height: 60px;
        background: var(--primary); color: white;
        border-radius: 50%; border: none;
        box-shadow: 0 4px 15px rgba(201, 42, 42, 0.5);
        z-index: 1000; font-size: 1.8rem;
        cursor: pointer;
        animation: pulse 2s infinite;
    }

    /* UPDATED: MOBILE SIZING FOR BOOK IMAGE */
    .book-stage { 
        max-width: 300px; 
        margin: 0 auto; 
    }
    
    .card-visual-full {
        height: 250px; 
    }
    
    .gallery-grid-full {
        gap: 20px;
    }
    
    .book-img {
        width: 100%;
        height: auto;
        max-height: 320px;
        object-fit: contain;
        display: block;
        margin-top: 20px; /* ADDED: Small top margin for the image specifically */
    }
    
    .delivery-ribbon{
    	margin-top: 20px;transform: scale(0.8); /* Shrink ribbon slightly for mobile */
        right: -15px; /* Adjust position */
    }
}

@media (max-width: 480px) {
	.action-wrapper { display: flex; align-items: center; gap: 20px; margin-top: 0px; flex-wrap: wrap; }
    .container { padding: 0 20px; }
    .hero-bg-glow { opacity: 0.6; animation: none; }
    .pillar-card { padding: 30px 20px; }
    .step-card { padding: 25px 20px; }
    .float-badge { font-size: 0.75rem; padding: 6px 12px; }
    .top-left { left: -30px; }
    .bottom-right { right: -30px; }
    
    .status-modal .modal-container {
        padding: 30px 20px;
    }

    h1 {
        font-size: 2.2rem; 
    }
    
    .hero-sub {
        font-size: 1rem; 
    }
}

/* --- ANIMATIONS DEFINITIONS --- */
@keyframes float { 0%, 100% { transform: translateY(0) rotateY(-10deg); } 50% { transform: translateY(-15px) rotateY(-10deg); } }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 rgba(201, 42, 42, 0.4); } 70% { box-shadow: 0 0 0 15px rgba(201, 42, 42, 0); } 100% { box-shadow: 0 0 0 0 rgba(201, 42, 42, 0); } }
@keyframes shine { 0% { left: -100%; } 20% { left: 100%; } 100% { left: 100%; } }
@keyframes gradientFlow { 0% { background-position: 0% 50%; } 50% { background-position: 100% 50%; } 100% { background-position: 0% 50%; } }
@keyframes breathe { 0%, 100% { transform: translate(-50%, -50%) scale(1); opacity: 0.3; } 50% { transform: translate(-50%, -50%) scale(1.1); opacity: 0.5; } }
@keyframes fadeIn { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: translateY(0); } }

.reveal { opacity: 0; transform: translateY(30px); transition: 0.8s var(--ease-smooth); }
.reveal.active { opacity: 1; transform: translateY(0); }
.stagger-1 { transition-delay: 0.1s; }
.stagger-2 { transition-delay: 0.2s; }
.stagger-3 { transition-delay: 0.3s; }
.stagger-4 { transition-delay: 0.4s; }
.stagger-5 { transition-delay: 0.5s; }

.grid-2 { 
    display: grid; 
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); 
    gap: 30px; 
    margin-top: 30px; 
    max-width: 900px;
    margin-left: auto;
    margin-right: auto;
}

.counseling-highlight {
    display: inline-block;
    background: linear-gradient(135deg, var(--gold), #FFD700);
    color: var(--dark);
    padding: 8px 20px;
    border-radius: 4px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 20px;
    box-shadow: 0 4px 15px rgba(212, 175, 55, 0.3);
    font-size: 0.9rem;
    animation: pulseGlow 3s infinite;
}

@keyframes pulseGlow {
    0% { transform: scale(1); box-shadow: 0 4px 15px rgba(212, 175, 55, 0.3); }
    50% { transform: scale(1.03); box-shadow: 0 4px 25px rgba(212, 175, 55, 0.5); }
    100% { transform: scale(1); box-shadow: 0 4px 15px rgba(212, 175, 55, 0.3); }
}

.policy-header .container {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.back-home-mobile-btn {
    display: none; 
}

@media (max-width: 900px) {
    .back-home-mobile-btn {
        display: inline-flex;
        align-items: center;
        gap: 8px;
        padding: 10px 24px;
        background: var(--primary);
        color: white;
        text-decoration: none;
        border-radius: 50px;
        font-weight: 700;
        font-size: 0.95rem;
        margin-bottom: 25px;
        box-shadow: 0 4px 15px rgba(201, 42, 42, 0.3);
        transition: 0.3s ease;
    }
    
    .back-home-mobile-btn:active {
        transform: scale(0.95);
    }
}
.dev-credit { 
    font-family: var(--font-body); /* Ensures consistent font across devices */
    font-size: 0.85rem; 
    color: var(--gray); 
    text-decoration: none;
    font-weight: 600;
    transition: color 0.3s ease;
}
.dev-credit:hover {
    color: var(--primary);
}

/* ==========================================================================
   DARK MODE ADDITIONS (Paste at the end of style.css)
   ========================================================================== */

/* Toggle Button Styling */
.theme-toggle-btn {
    background: transparent;
    border: 2px solid var(--gold);
    color: var(--gold);
    padding: 8px 18px;
    border-radius: 50px;
    cursor: pointer;
    font-weight: 700;
    font-size: 0.85rem;
    font-family: var(--font-body);
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin: 10px 0;
}
.theme-toggle-btn:hover {
    background: var(--gold);
    color: #000;
    transform: translateY(-2px);
}
.theme-toggle-btn i {
    font-size: 1.1rem;
}

/* Dark Mode Variable Overrides */
body.dark-mode {
    --bg-light: #000000;       /* Solid Black */
    --bg-warm: #0a0a0a;        /* Deep Gray/Black */
    --white: #121212;          /* Card BG */
    --dark: #f3f4f6;           /* Main Text (Light) */
    --gray: #9ca3af;           /* Secondary Text */
    
    --cover-blue: #60a5fa;     
    --cover-green: #4ade80;    
    
    --shadow-sm: 0 4px 6px -1px rgba(0,0,0,0.5);
    --shadow-lg: 0 25px 50px -12px rgba(0,0,0,0.7);
    --glass: rgba(18, 18, 18, 0.95);
}

/* Smooth Transitions */
body { transition: background-color 0.3s ease, color 0.3s ease; }

/* UI Refinements for Dark Mode */
body.dark-mode .navbar { background: rgba(0, 0, 0, 0.85); border-bottom-color: rgba(255,255,255,0.1); }
body.dark-mode .nav-links { background: #000000; }
body.dark-mode .nav-links a { color: var(--dark); }

/* Force Section Subtitles (like 'Your journey, your pace') to be visible */
body.dark-mode .section-subtitle { color: #d1d5db !important; } 

body.dark-mode .pillar-card,
body.dark-mode .audience-card,
body.dark-mode .learn-card,
body.dark-mode .howto-card,
body.dark-mode .counsel-card {
    background: var(--white);
    border: 1px solid rgba(255,255,255,0.1);
}
body.dark-mode .pillar-card:hover,
body.dark-mode .howto-card:hover,
body.dark-mode .counsel-card:hover {
    background: #1a1a1a;
    border-color: var(--gold);
}
body.dark-mode footer { background: #000; border-top: 1px solid rgba(255,255,255,0.1); }
body.dark-mode .philosophy-bg, 
body.dark-mode .counseling-bg { background-blend-mode: overlay; background-color: #000; }
body.dark-mode .philosophy-overlay, 
body.dark-mode .counseling-overlay { background: rgba(0,0,0,0.85); }
body.dark-mode .hero { background: radial-gradient(circle at 70% 30%, #1a0505, #000000 60%); }
body.dark-mode .remember-note { background: #1a1a1a; border-left-color: var(--gold); }
body.dark-mode .remember-note p { color: #f3f4f6; }
body.dark-mode .modal-container { background: #121212; color: white; }
body.dark-mode .modal-container input, 
body.dark-mode .modal-container select { background: #1f1f1f; color: white; border-color: #333; }
body.dark-mode .modal-close { color: white; }
body.dark-mode .section-title { color: slategray; }

/* Heart element styling */
.heart-fall {
    position: fixed;
    top: -50px; /* Start above screen */
    z-index: 9999;
    color: #ff0000; /* Pink color */
    font-size: 24px;
    animation: fall linear forwards;
    pointer-events: none;
    text-shadow: 0 0 5px rgba(233, 30, 99, 0.4);
}

@keyframes fall {
    to {
        transform: translateY(110vh) rotate(360deg);
    }
}

/* --- STATIC FREE DELIVERY BADGE (BELOW PRICE) --- */

.delivery-static {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-top: 5px;       /* Space between Price and Badge */
    margin-bottom: 15px;   /* Space between Badge and Description */
    padding: 6px 14px;
    
    background: rgba(255, 255, 255, 0.05); /* Very subtle background */
    border: 1px solid rgba(255, 140, 0, 0.3); /* Light Orange Border */
    border-radius: 50px;   /* Pill Shape */
    
    color: darkorange;     /* Text Color */
    font-size: 0.9rem;
    font-weight: 600;
    cursor: help;          /* Shows '?' cursor on hover */
    position: relative;    /* Needed for tooltip positioning */
    width: fit-content;
}

/* Icon Style */
.delivery-static i {
    font-size: 1.1rem;
}

/* --- HOVER POPUP (TOOLTIP) --- */
.delivery-static::after {
    content: "Free Delivery across India.\A Nominal charges for delivery outside India.";
    white-space: pre-wrap; 
    visibility: hidden;
    opacity: 0;
    position: absolute;
    
    /* Position: ABOVE the badge */
    bottom: 130%; 
    left: 50%;
    transform: translateX(-50%) translateY(10px); 
    
    width: 220px;
    background: rgba(17, 24, 39, 0.95); 
    color: #fff;
    padding: 12px 15px;
    border-radius: 8px;
    font-size: 0.8rem;
    line-height: 1.5;
    text-align: center; /* Center text for this one */
    box-shadow: 0 10px 25px rgba(0,0,0,0.3);
    border-bottom: 3px solid var(--gold); /* Gold accent at bottom */
    
    transition: all 0.3s cubic-bezier(0.165, 0.84, 0.44, 1);
    z-index: 100;
    pointer-events: none;
}

/* Show message on hover */
.delivery-static:hover::after {
    visibility: visible;
    opacity: 1;
    transform: translateX(-50%) translateY(0); 
}

/* Mobile Adjustment: Center the badge if text is centered */
@media (max-width: 900px) {
    .delivery-static {
        margin-left: auto;
        margin-right: auto;
    }
}

/* FIXED DELIVERY TEXT */
.delivery-text {
    /* Layout: Use inline-flex to keep alignment AND fit content */
    display: inline-flex; 
    align-items: center;
    gap: 6px;
    justify-content: flex-start;
    
    /* Spacing */
    margin-top: 5px !important;
    margin-bottom: 0 !important;
    width: fit-content;
    
    /* Gradient Text Effect */
    background: linear-gradient(135deg, #D90429, #EF233C, #FFD700, #D90429);
    background-size: 300% 300%;
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    color: transparent; /* Fallback */
    
    /* Font Styling */
    font-size: 0.9rem; /* Slightly larger for readability */
    font-weight: 800;  /* Gradient needs thick text to look good */
    filter: drop-shadow(0 2px 4px rgba(217, 4, 41, 0.1));
    
    /* Interaction */
    cursor: help;
    position: relative;
    animation: gradientFlow 6s ease infinite;
}

/* Ensure the icon takes the gradient too */
.delivery-text i {
    font-size: 1.1rem;
    /* Remove any specific color overrides on the icon so it inherits the gradient */
    color: inherit; 
    -webkit-text-fill-color: inherit;
}

/* --- 1. The Tooltip Box (::after) --- */
.delivery-text::after {
    content: "A nominal charge for delivery outside India.";
    
    /* Position: ABOVE */
    position: absolute;
    bottom: 100%;       /* Anchors the bottom of the tooltip to the top of the text */
    left: 0;
    margin-bottom: 10px; /* Pushes it up slightly to make room for the arrow */
    
    /* Appearance */
    visibility: hidden;
    opacity: 0;
    width: 200px;
    background: rgba(17, 24, 39, 0.95);
    color: #fff;
    -webkit-text-fill-color: #fff;
    padding: 8px 12px;
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 400;
    line-height: 1.4;
    z-index: 100;
    border-left: 3px solid darkorange;
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);

    /* Animation: Slides UP into place */
    transition: opacity 0.3s ease, transform 0.3s ease;
    transform: translateY(5px);
    pointer-events: none;
}

/* --- 2. The Arrow (::before) --- */
.delivery-text::before {
    content: "";
    
    /* Position: ABOVE */
    position: absolute;
    bottom: 100%;       /* Anchors to top of text */
    left: 20px;         /* Horizontal position of the arrow */
    margin-bottom: 4px; /* Sits exactly between the text and the box */

    /* Triangle Shape (Pointing DOWN) */
    border-width: 6px;
    border-style: solid;
    /* Top border gets color (points down), others transparent */
    border-color: rgba(17, 24, 39, 0.95) transparent transparent transparent;
    
    /* Appearance */
    visibility: hidden;
    opacity: 0;
    z-index: 100;

    /* Animation: Slides UP into place */
    transition: opacity 0.3s ease, transform 0.3s ease;
    transform: translateY(5px);
    pointer-events: none;
}

/* --- 3. Hover Interaction --- */
.delivery-text:hover::after,
.delivery-text:hover::before {
    visibility: visible;
    opacity: 1;
    transform: translateY(0);
}

/* --- MODAL / POPUP STYLES --- */
.modal-overlay {
    display: none; /* Hidden by default */
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6); /* Dark background */
    z-index: 1000;
    justify-content: center;
    align-items: center;
    backdrop-filter: blur(4px); /* Nice blur effect */
}

.modal-container {
    background: white;
    padding: 30px;
    border-radius: 16px;
    width: 90%;
    max-width: 400px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.3);
    position: relative;
    animation: slideUp 0.3s ease-out;
}

.modal-close {
    position: absolute;
    top: 15px;
    right: 20px;
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: #555;
}

/* Form Styles inside Modal */
.modal-container h3 {
    margin-top: 0;
    color: #C92A2A;
    display: flex;
    align-items: center;
    gap: 10px;
}

.modal-container input, 
.modal-container textarea {
    width: 100%;
    padding: 12px;
    margin-bottom: 12px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 14px;
    box-sizing: border-box; /* Prevents padding from breaking layout */
}

.modal-container input:focus, 
.modal-container textarea:focus {
    border-color: #C92A2A;
    outline: none;
}

/* Animation */
@keyframes slideUp {
    from { transform: translateY(50px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

/* --- ADMIN & DASHBOARD STYLES (Added Phase 3) --- */
.admin-container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}
.login-card {
    background: var(--white);
    padding: 40px 30px;
    border-radius: 20px;
    box-shadow: var(--shadow-lg);
    width: 100%;
    max-width: 400px;
}
.table-responsive {
    overflow-x: auto;
}
.coupon-table {
    width: 100%;
    border-collapse: collapse;
    min-width: 500px; /* Force scroll on small mobile */
}
.coupon-table th, .coupon-table td {
    padding: 15px;
    text-align: left;
    border-bottom: 1px solid #eee;
}
.coupon-table th {
    color: var(--primary);
    font-family: var(--font-head);
    font-size: 1.1rem;
}
.coupon-table tr:last-child td { border-bottom: none; }
.btn-danger {
    background: #ff4444;
    color: white;
    border: none;
    padding: 6px 12px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.85rem;
}
.btn-danger:hover { background: #cc0000; }

/* ==========================================================================
   FINAL MODERN MODAL STYLES (Compact Desktop + Polished Mobile)
   ========================================================================== */

/* 1. Modal Container & Scrolling Fixes */
.modal-overlay {
    align-items: flex-start; /* Crucial for scrolling on overflow */
    padding-top: 20px;
    padding-bottom: 20px;
    overflow-y: auto; 
    -webkit-overflow-scrolling: touch; /* Smooth scroll on iOS */
}

.modern-modal {
    padding: 20px 25px;
    max-width: 480px;
    width: 95%;
    margin: 0 auto;
    border-radius: 20px;
    background: #fff;
    overflow: visible; 
    position: relative;
    box-shadow: 0 15px 50px rgba(0,0,0,0.3);
}

/* 2. Header & Price Badge (Desktop Layout) */
.modal-header-modern {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}
.header-text h3 {
    color: var(--dark);
    margin-bottom: 4px;
    font-size: 1.3rem;
    line-height: 1.2;
}
.header-text p {
    color: var(--gray);
    font-size: 0.85rem;
    margin: 0;
}

.modal-header-modern .delivery-text {
    font-size: 1.5rem; /* Bigger than H3 (1.3rem) */
}
.modal-header-modern .delivery-text i {
    font-size: 1.6rem; /* Scale icon to match */
}

.price-badge-floating {
    background: #FFF5F5;
    color: var(--primary);
    padding: 8px 16px;
    border-radius: 12px;
    text-align: center;
    border: 1px solid rgba(201, 42, 42, 0.1);
    white-space: nowrap;
    margin: auto;
}
.price-badge-floating .label {
    display: block;
    font-size: 0.65rem;
    text-transform: uppercase;
    color: #888;
    margin-bottom: 2px;
    line-height: 1;
}
.price-badge-floating .amount {
    font-size: 1.3rem;
    font-weight: 800;
    line-height: 1;
}

/* 3. Form Layouts */
.form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
}
.form-group-modern {
    position: relative;
    margin-bottom: 12px;
}

/* 4. Icons inside inputs */
.input-icon {
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--gray);
    font-size: 1.2rem;
    pointer-events: none;
    z-index: 5;
}

.form-group-modern input,
.form-group-modern textarea {
    width: 100%;
    padding: 12px 12px 12px 48px;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    font-size: 0.95rem;
    transition: all 0.3s ease;
    background: #fdfdfd;
    outline: none;
    font-family: var(--font-body);
}
.form-group-modern textarea { resize: none; }
.form-group-modern input:focus, .form-group-modern textarea:focus {
    border-color: var(--primary);
    background: #fff;
    box-shadow: 0 0 0 4px rgba(201, 42, 42, 0.05);
}

/* 5. Modern Coupon Section */
.coupon-section-modern {
    margin-top: 10px;
    background: linear-gradient(135deg, #f9fafb 0%, #f3f4f6 100%);
    padding: 10px;
    border-radius: 12px;
    border: 1px dashed #d1d5db;
}
.coupon-input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}
.coupon-input-wrapper input {
    width: 100%;
    padding: 11px 90px 11px 55px; /* Right padding for button space */
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    text-transform: uppercase;
    font-weight: 700;
    letter-spacing: 1px;
    font-size: 0.9rem;
    height: 46px;
}
.coupon-input-wrapper .input-icon {
    left: 15px;
    color: var(--dark);
}
.btn-apply {
    position: absolute;
    right: 5px;
    top: 5px;
    bottom: 5px;
    background: var(--dark);
    color: white;
    border: none;
    padding: 0 16px;
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 700;
    cursor: pointer;
    transition: 0.3s;
    letter-spacing: 0.5px;
}
.coupon-msg {
    margin-top: 5px;
    font-size: 0.8rem;
    font-weight: 600;
    display: none;
    padding-left: 5px;
}

/* 6. Secure Note & Buttons */
.secure-note {
    text-align: center;
    font-size: 0.75rem;
    color: var(--gray);
    margin-top: 15px;
    margin-bottom: 0;
}
.btn-primary.btn-full {
    margin-top: 20px !important;
    padding: 14px 20px !important;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-radius: 50px;
}

/* --- MOBILE SPECIFIC OVERRIDES (Full Screen Mode) --- */
@media (max-width: 480px) {
    /* 1. Full Screen Overlay */
    .modal-overlay {
        padding: 0;
        align-items: flex-start;
        background: #fff; /* White background for full immersion */
        z-index: 3000; /* Ensure it sits ABOVE the floating cart icon */
    }

    /* 2. Full Screen Card */
    .modern-modal {
        width: 100%;
        max-width: 100%;
        min-height: 100vh; /* Take full height */
        margin: 0;
        border-radius: 0; /* No rounded corners */
        box-shadow: none; /* Flat look */
        padding: 20px 20px 80px; /* Extra bottom padding for scrolling past button */
    }
    
    /* 3. Close Button: Top Right Fixed */
    .modal-close {
        position: fixed; /* Keep it visible while scrolling */
        top: 15px;
        right: 15px;
        z-index: 3001;
        background: #f3f4f6;
        border-radius: 50%;
        width: 40px;
        height: 40px;
        display: flex;
        align-items: center;
        justify-content: center;
        font-size: 1.2rem;
        color: #333;
        box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    }
    
    /* 4. Header: Pushed down */
    .modal-header-modern {
        flex-direction: column;
        align-items: center;
        text-align: center;
        gap: 15px;
        margin-top: 50px; /* Clear the fixed close button */
        margin-bottom: 25px;
    }
    
    .modal-header-modern .header-text {
        text-align: center;
        width: 100%;
        display: flex;       /* Ensures flex children (like delivery-text) center too */
        flex-direction: column;
        align-items: center;
    }
    
    /* 5. Price Badge: Prominent */
    .price-badge-floating {
        width: 100%;
        order: -1; 
        background: #fff;
        border: 2px dashed rgba(201, 42, 42, 0.15);
        padding: 10px;
        margin-bottom: 10px;
    }
    .price-badge-floating .amount {
        font-size: 1.8rem; /* Big impact font */
        color: var(--primary);
    }
    .price-badge-floating .label { display: none; }

    /* 6. Form: Stacked */
    .form-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }

    /* 7. Inputs: Larger for Touch */
    .form-group-modern input,
    .form-group-modern textarea {
        padding: 16px 16px 16px 50px; 
        font-size: 16px; 
        background: #f9fafb;
    }
    
    /* 8. Main Button: Fixed to Bottom (Optional) or Floating */
    .btn-primary.btn-full {
        padding: 18px 20px !important;
        font-size: 1.1rem;
        margin-top: 30px !important;
    }
}

/* Simple Spinner */
.spinner {
    border: 4px solid #f3f3f3;
    border-top: 4px solid var(--primary);
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
    margin: 0 auto;
}
@keyframes spin { 0% { transform: rotate(0deg); } 100% { transform: rotate(360deg); } }

/* ... [Previous CSS Content] ... */

/* --- ADMIN UTILITIES (Added for Phase 4) --- */
.btn-dark {
    background: var(--dark);
    color: white;
    box-shadow: none;
    transition: all 0.2s ease;
}
.btn-dark:hover {
    background: #000;
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
    transform: translateY(-2px);
}

/* ... Previous content ... */

/* --- PAGINATION BUTTONS --- */
.btn-secondary {
    background: #f3f4f6;
    color: var(--dark);
    border: 1px solid #e5e7eb;
    padding: 8px 16px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.85rem;
    font-weight: 600;
    transition: all 0.2s ease;
}

.btn-secondary:hover:not(:disabled) {
    background: #e5e7eb;
    transform: translateY(-1px);
}

.btn-secondary:disabled {
    cursor: not-allowed;
    background: #f9fafb;
}

/* ... [Existing Content] ... */

/* --- SORTABLE HEADERS --- */
th.sort-header {
    cursor: pointer;
    user-select: none;
    position: relative;
    transition: background 0.2s;
}
th.sort-header:hover {
    background: #f0f0f0;
}
th.sort-header i {
    margin-left: 5px;
    font-size: 0.8rem;
    color: var(--gray);
    opacity: 0.5;
}
th.sort-header:hover i {
    opacity: 1;
}

/* --- STATIC FREE DELIVERY BADGE (BELOW PRICE) --- */

.delivery-text {
    /* Layout: Use inline-flex to keep alignment AND fit content */
    display: inline-flex; 
    align-items: center;
    gap: 6px;
    
    /* Spacing */
    margin-top: 5px !important;
    margin-bottom: 0 !important;
    width: fit-content;
    
    /* Gradient Text Effect */
    background: linear-gradient(135deg, #D90429, #EF233C, #FFD700, #D90429);
    background-size: 300% 300%;
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    color: transparent; /* Fallback */
    
    /* Font Styling */
    font-size: 0.9rem; 
    font-weight: 800;  
    filter: drop-shadow(0 2px 4px rgba(217, 4, 41, 0.1));
    
    /* Interaction */
    cursor: help;
    position: relative;
    animation: gradientFlow 6s ease infinite;
}

/* Ensure the icon takes the gradient too */
.delivery-text i {
    font-size: 1.1rem;
    color: inherit; 
    -webkit-text-fill-color: inherit;
}

/* --- TOOLTIP BOX (::after) --- */
.delivery-text::after {
    content: "A nominal charge for delivery outside India.";
    
    /* Position: ABOVE */
    position: absolute;
    bottom: 100%;       
    left: 0;
    margin-bottom: 10px; 
    
    /* Appearance */
    visibility: hidden;
    opacity: 0;
    width: max-content;
    max-width: 200px;
    background: rgba(17, 24, 39, 0.95);
    color: #fff;
    -webkit-text-fill-color: #fff; /* Reset text fill for white text */
    padding: 8px 12px;
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 400;
    line-height: 1.4;
    z-index: 100;
    border-left: 3px solid darkorange; /* Nice accent */
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);

    /* Animation */
    transition: all 0.3s ease;
    transform: translateY(5px);
    pointer-events: none;
}

/* --- TOOLTIP ARROW (::before) --- */
.delivery-text::before {
    content: "";
    position: absolute;
    bottom: 100%;       
    left: 20px;         
    margin-bottom: 4px; 

    /* Triangle Shape */
    border-width: 6px;
    border-style: solid;
    border-color: rgba(17, 24, 39, 0.95) transparent transparent transparent;
    
    visibility: hidden;
    opacity: 0;
    z-index: 100;
    transition: all 0.3s ease;
    transform: translateY(5px);
    pointer-events: none;
}

/* --- HOVER STATE --- */
.delivery-text:hover::after,
.delivery-text:hover::before {
    visibility: visible;
    opacity: 1;
    transform: translateY(0);
}

/* --- MOBILE ADJUSTMENTS --- */
@media (max-width: 480px) {
    /* Center the text on mobile since the modal header is centered */
    .delivery-text {
        margin-left: auto;
        margin-right: auto;
    }

    /* Center the tooltip on mobile */
    .delivery-text::after {
        left: 50%;
        transform: translateX(-50%) translateY(5px);
        text-align: center;
    }
    .delivery-text:hover::after {
        transform: translateX(-50%) translateY(0);
    }
    
    /* Center the arrow on mobile */
    .delivery-text::before {
        left: 50%;
        margin-left: -6px; /* Half of border width to center */
    }
}