/* ===================================================================
   FINAL, CORRECTED & CLEANED CSS (BASED ON YOUR STABLE VERSION)
   =================================================================== */

/* === 1. ROOT VARIABLES & GLOBAL STYLES === */
:root {
    --primary-blue: #0047AB;
    --dark-blue: #00337C;
    --accent-gold: #FFC300;
    --charcoal-gray: #333333;
    --medium-gray: #6c757d;
    --light-gray-bg: #F4F6F9;
    --white: #FFFFFF;
    --gradient-primary: linear-gradient(135deg, #0052CC 0%, #0047AB 100%);
    --shadow-light: 0 4px 15px rgba(0, 0, 0, 0.05);
    --shadow-medium: 0 8px 25px rgba(0, 0, 0, 0.1);
    --shadow-heavy: 0 10px 30px rgba(0, 71, 171, 0.2);
}

body {
    font-family: 'Open Sans', sans-serif;
    line-height: 1.6;
    color: var(--charcoal-gray);
    background-color: var(--white);
}

h1, h2, h3, h4, h5, h6 {
    font-family: 'Poppins', sans-serif;
    font-weight: 700;
    color: var(--dark-blue);
}

.section-title {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.section-subtitle {
    font-size: 1.1rem;
    color: var(--medium-gray);
    margin-bottom: 3rem;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

/* === 2. NAVIGATION === */
.navbar {
    transition: all 0.3s ease;
    padding: 1rem 0;
}

.navbar.scrolled {
    padding: 0.5rem 0;
    background-color: rgba(255, 255, 255, 0.98) !important;
    backdrop-filter: blur(10px);
    box-shadow: var(--shadow-light);
}

.navbar-brand img {
    transition: transform 0.3s ease;
}
.navbar-brand img:hover {
    transform: scale(1.05);
}

.brand-separator {
    font-size: 1.5rem;
    color: var(--accent-gold);
    font-weight: bold;
}

.navbar-nav .nav-link {
    font-weight: 600;
    color: var(--charcoal-gray) !important;
    transition: color 0.3s ease;
}

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

/* === 3. BUTTONS === */
.btn {
    border-radius: 50px;
    padding: 12px 30px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    transition: all 0.3s ease;
    box-shadow: var(--shadow-light);
}

.btn-primary {
    background: var(--gradient-primary);
    border: none;
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-medium);
}

.btn-outline-primary {
    border: 2px solid var(--white);
    color: var(--white);
}

.btn-outline-primary:hover {
    background: var(--white);
    color: var(--primary-blue);
    transform: translateY(-3px);
}

/* === 4. HERO SECTION === */
.hero-section {
    position: relative;
    min-height: 90vh;
    background: url('../assets/images/hero-background.png') no-repeat center center;
    background-size: cover;
    color: var(--white);
    display: flex;
    align-items: center;
    overflow: hidden;
}

.hero-section::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: linear-gradient(90deg, rgba(59, 89, 152, 0.6) 0%, rgba(59, 89, 152, 0.0) 100%);
    z-index: 1;
}

.hero-section .container {
    position: relative;
    z-index: 2;
}

.hero-title {
    font-size: 4.5rem;
    font-weight: 800;
    line-height: 1.1;
    color: var(--white);
    text-shadow: 1px 1px 15px rgba(0,0,0,0.2);
}

.hero-title .text-hoya-blue {
    color: var(--primary-blue);
}

.hero-subtitle {
    font-size: 1.2rem;
    color: var(--white);
    max-width: 500px;
    margin: 1.5rem 0 2.5rem 0;
}

.hero-cta .btn-outline-primary {
    border-color: var(--white);
    color: var(--white);
}
.hero-cta .btn-outline-primary:hover {
    background-color: var(--white);
    color: var(--primary-blue);
}

/* === PRIZE BADGE (RE-ENABLED) === */
.prize-badge-container {
    position: absolute;
    bottom: 5%;
    right: 8%;
    width: 220px;
    height: 220px;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 3;
}

.prize-badge-image {
    width: 100%;
    filter: drop-shadow(10px 10px 20px rgba(0,0,0,0.3));
    animation: pulse-badge 3s infinite ease-in-out;
}

@keyframes pulse-badge {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

/* === 5. CONTEST MECHANICS SECTION === */
.contest-section {
    padding: 80px 0;
    background-color: var(--light-gray-bg);
}

#contest .row.g-4 {
    align-items: center;
}

.contest-card {
    background: var(--white);
    border-radius: 20px;
    padding: 2.5rem;
    text-align: center;
    box-shadow: var(--shadow-medium);
    transition: all 0.3s ease;
    position: relative;
    border: 1px solid transparent;
    height: 100%;
}

.contest-card:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-heavy);
}

.card-icon {
    height: 120px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.5rem;
}

.card-icon img {
    max-width: 100%;
    max-height: 120px;
    height: auto;
    transition: transform 0.3s ease;
}

.contest-card:hover .card-icon img {
    transform: scale(1.05);
}

.contest-card h3 {
    font-family: 'Poppins', sans-serif;
    font-weight: 700;
    font-size: 1.5rem;
    margin-bottom: 1rem;
    color: var(--dark-blue);
}

.chances-badge {
    display: inline-block;
    border-radius: 20px;
    padding: 8px 25px;
    font-weight: 700;
    margin-bottom: 1.5rem;
    border: none;
    cursor: default;
}

.contest-card:not(.featured) .chances-badge {
    background-color: #EAEAEA;
    color: #555555;
}

.contest-card p {
    font-size: 0.9rem;
    color: var(--medium-gray);
    min-height: 54px;
}

.card-divider {
    border: 0;
    height: 1px;
    background-color: #eeeeee;
    margin: 1.5rem auto;
    width: 50%;
}

.benefits-list {
    list-style: none;
    padding: 0;
    margin: 0;
    text-align: center;
}

.benefits-list li {
    font-family: 'Poppins', sans-serif;
    font-weight: 600;
    color: var(--dark-blue);
    margin-bottom: 0.75rem;
    font-size: 1rem;
}

.contest-card.featured {
    background: var(--primary-blue);
    color: var(--white);
    border-radius: 25px;
    transform: scale(1.05);
}

.contest-card.featured h3, .contest-card.featured p, .contest-card.featured li {
    color: var(--white);
}

.contest-card.featured .chances-badge {
    background: var(--accent-gold);
    color: var(--dark-blue);
    font-size: 1.1rem;
}

.contest-card.featured .card-divider {
    background-color: rgba(255, 255, 255, 0.2);
}

.featured-badge {
    position: absolute;
    top: -15px;
    right: 20px;
    background: var(--accent-gold);
    color: var(--dark-blue);
    padding: 8px 15px;
    font-size: 0.8rem;
    font-weight: 700;
    transform: rotate(10deg);
    border-radius: 8px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
}

/* === 6. PRIZES SECTION === */
.prizes-section {
    padding: 80px 0;
    background-color: var(--primary-blue);
}

.prizes-section .section-title {
    color: var(--white);
}

.prizes-section .prize-card {
    background: var(--white);
    border-radius: 15px;
    padding: 2rem;
    text-align: center;
    box-shadow: var(--shadow-light);
    transition: all 0.3s ease;
    height: 100%;
}
.prizes-section .prize-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-medium);
}
.prizes-section .prize-icon {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: var(--accent-gold);
    color: var(--dark-blue);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1rem;
    font-size: 1.5rem;
}
.prizes-section .prize-value {
    font-size: 2rem;
    font-weight: 700;
    color: var(--primary-blue);
    margin: 0.5rem 0;
}
.prizes-section .prize-card p {
    color: var(--medium-gray);
}

/* === 7. HOW TO ENTER SECTION === */
.how-to-enter-section {
    padding: 80px 0;
    background-color: var(--white);
}

.steps-timeline {
    position: relative;
    padding-left: 45px;
}

.steps-timeline::before {
    content: '';
    position: absolute;
    left: 30px;
    top: 30px;
    bottom: 30px;
    width: 3px;
    background-color: #e0e6f3;
    border-radius: 2px;
    z-index: 1;
}

.step-item {
    display: flex;
    align-items: flex-start;
    position: relative;
    margin-bottom: 2.5rem;
}

.step-item:last-child {
    margin-bottom: 0;
}

.step-number {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: var(--gradient-primary);
    color: var(--white);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    font-weight: 700;
    position: absolute;
    left: -45px;
    top: 0;
    z-index: 2;
    box-shadow: 0 4px 10px rgba(59, 89, 152, 0.3);
}

.step-content {
    padding-left: 30px;
}

.step-content h4 {
    font-family: 'Poppins', sans-serif;
    font-weight: 700;
    font-size: 1.2rem;
    margin-bottom: 0.25rem;
    color: var(--dark-blue);
}

.step-content p {
    color: var(--medium-gray);
    font-size: 0.95rem;
    margin-bottom: 0;
}

.phone-mockup {
    text-align: center;
}

.phone-mockup img {
    max-width: 350px;
    width: 100%;
    filter: drop-shadow(20px 20px 30px rgba(0, 0, 0, 0.1));
}

/* === 8. ENTRY FORM SECTION === */
.entry-form-section {
    padding: 80px 0;
    background: linear-gradient(180deg, var(--white) 0%, #E6F0FF 100%);
}

.entry-form-card {
    background: var(--white);
    border-radius: 20px;
    padding: 3rem;
    box-shadow: var(--shadow-medium);
}

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

.form-control {
    border: 1px solid #ced4da;
    border-radius: 10px;
    padding: 12px 15px;
    font-size: 1rem;
    transition: all 0.3s ease;
}
.form-control:focus {
    border-color: var(--primary-blue);
    box-shadow: 0 0 0 0.25rem rgba(59, 89, 152, 0.25);
}

.purchase-options .form-check {
    border: 2px solid #e9ecef;
    border-radius: 10px;
    padding: 1rem;
    transition: all 0.3s ease;
    margin-bottom: 0.5rem;
}
.purchase-options .form-check:hover {
    border-color: var(--primary-blue);
}
.purchase-options .form-check-input:checked + .form-check-label {
    font-weight: 700;
}
.purchase-options .form-check-input:checked {
    background-color: var(--primary-blue);
    border-color: var(--primary-blue);
}
.purchase-options .form-check.featured {
    background-color: #e6f0ff;
    border-color: var(--primary-blue);
}

.upload-area {
    border: 2px dashed #ced4da;
    border-radius: 10px;
    padding: 2rem;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    background-color: var(--light-gray-bg);
}
.upload-area:hover {
    border-color: var(--primary-blue);
    background-color: #e6f0ff;
}
.upload-content i {
    font-size: 2.5rem;
    color: var(--primary-blue);
    margin-bottom: 1rem;
}

/* === 9. SLIDER CAPTCHA === */
.captcha-slider-container {
    padding: 1rem 0;
    user-select: none;
}
.slider-track {
    position: relative;
    width: 100%;
    height: 50px;
    background-color: #e9ecef;
    border-radius: 25px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    box-shadow: inset 0 2px 4px rgba(0,0,0,0.08);
}
.slider-progress {
    position: absolute;
    left: 0; top: 0; height: 100%; width: 0;
    background: var(--gradient-primary);
    border-radius: 25px;
}
.slider-handle {
    position: absolute;
    left: 0; top: 0; width: 50px; height: 50px;
    background-color: var(--white);
    border: 3px solid var(--primary-blue);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary-blue);
    cursor: grab;
    z-index: 2;
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
    transition: all 0.2s ease;
}
.slider-handle:hover { box-shadow: 0 4px 12px rgba(0, 102, 204, 0.3); }
.slider-handle i { font-size: 0.8rem; }
.slider-handle i:first-child { margin-right: -4px; }
.slider-text { color: var(--medium-gray); font-weight: 600; z-index: 1; transition: opacity 0.3s ease; }
.slider-handle.dragging { cursor: grabbing; }
.slider-track.verified .slider-text { opacity: 0; }
.slider-track.verified .slider-handle {
    background-color: #28a745;
    border-color: #28a745;
    color: var(--white);
    cursor: default;
}
#captcha-feedback.success { display: block; background-color: #d1e7dd; color: #0f5132; }

/* === 10. FOOTER === */
.footer {
    background: #4a4a4a !important;
    padding: 4rem 0 2rem 0;
}
.footer h5 { color: var(--white); margin-bottom: 1rem; }
.footer p { color: #ccc; }
.footer a { color: #ccc; text-decoration: none; transition: color 0.3s ease; }
.footer a:hover { color: var(--accent-gold); }
.footer .social-links a { font-size: 1.5rem; }

/* ===================================================================
   11. FINAL & CORRECTED RESPONSIVE STYLES
   =================================================================== */

/* --- Tablet View (991px and below) --- */
@media (max-width: 991px) {
    .how-to-enter-section .text-lg-start { text-align: center !important; }
    .steps-timeline { margin: 0 auto; max-width: 400px; }
    .phone-mockup { margin-top: 4rem; }

    #contest .row.g-4 {
        flex-direction: column;
        gap: 2rem;
    }
    .contest-card.featured {
        transform: none;
    }
}

/* --- Mobile View (768px and below) --- */
@media (max-width: 768px) {
    
    /* *** FINAL FIX: NAVIGATION BAR *** */
    .navbar-brand img[alt="HOYA"] {
        height: 40px;
    }
    .navbar-brand img[alt="Charmant"] {
        height: 20px;
    }
    .navbar-collapse {
        background-color: var(--white);
        padding: 1rem;
        margin-top: 0.5rem;
        border-radius: 10px;
        box-shadow: var(--shadow-medium);
    }

    /* *** FINAL FIX: HERO SECTION *** */
    .hero-section {
        /* *** THIS IS THE NEW RULE TO ALIGN TEXT LEFT ON MOBILE *** */
        text-align: left !important;
    }
    /* *** THIS IS THE NEW RULE TO CONTROL PADDING ON MOBILE *** */
    .hero-section .container {
        padding-left: 2rem;
        padding-right: 2rem;
    }
    .hero-title {
        font-size: 2.8rem;
        line-height: 1.2;
    }
    .hero-subtitle {
        font-size: 1rem;
        /* *** THIS IS THE NEW RULE TO REMOVE CENTERING ON MOBILE *** */
        margin-left: 0;
        margin-right: 0;
    }
    .hero-cta .btn {
        padding: 10px 24px;
        font-size: 0.9rem;
        width: 100%;
        margin-right: 0 !important;
        margin-bottom: 1rem;
    }
    .hero-cta .btn:last-child {
        margin-bottom: 0;
    }
    
    /* *** FINAL FIX: PRIZE BADGE *** */
    .prize-badge-container {
        width: 150px;
        height: 150px;
        bottom: 2%;
        right: 2%;
    }

    /* --- Other Mobile Fixes --- */
    .section-title { font-size: 2rem; }
    .entry-form-card { padding: 2rem; }

    /* *** FINAL FIX: HOW TO ENTER SECTION *** */
    .steps-timeline {
        padding-left: 0;
    }
    .steps-timeline::before {
        display: block;
        left: 50%;
        transform: translateX(-50%);
    }
    .step-item {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }
    .step-number {
        position: relative;
        left: auto;
        top: auto;
        margin-right: 0;
        margin-bottom: 1rem;
    }
    .step-content {
        padding-left: 0;
    }
}
/* ===================================================================
   DYNAMIC HIGHLIGHT FOR PURCHASE OPTIONS
   =================================================================== */

/* 
  This rule targets the .form-check container ONLY when the radio button
  inside it is checked. This creates the dynamic highlight effect.
*/
.purchase-options .form-check:has(input[type="radio"]:checked) {
    background-color: #e6f0ff; /* The light blue highlight color */
    border-color: var(--primary-blue); /* The dark blue border */
    border-width: 2px; /* Make the border slightly thicker to stand out */
}

/* Optional: Add a smooth transition for a nicer effect */
.purchase-options .form-check {
    transition: background-color 0.3s ease, border-color 0.3s ease;
}
