/* Design System & Variables - Bangladeshi Flag Theme */
:root {
    --primary: #F42A41; /* Bangladeshi Flag Red */
    --primary-dark: #D01C31;
    --bg-dark: #006A4E; /* Bangladeshi Flag Bottle Green */
    --bg-card: #00543e; /* Darker Green for Cards */
    --bg-nav: rgba(0, 106, 78, 0.95);
    --text-pure: #FFFFFF;
    --text-body: #F0F0F0;
    --text-muted: #B0C4BE;
    --border: rgba(255, 255, 255, 0.1);
    --shadow-premium: 0 20px 40px rgba(0, 0, 0, 0.4);
    --glow-red: 0 0 25px rgba(244, 42, 65, 0.3);
    
    /* Spacing System */
    --section-py: 100px;
    --card-p: 40px;
}

@font-face {
    font-family: 'Kalpurush';
    src: url('https://cdn.jsdelivr.net/gh/atikhossain/kalpurush-web-font@master/fonts/Kalpurush.woff2') format('woff2');
}

html, body {
    overflow-x: hidden; /* Prevent horizontal scroll/blank panels */
    width: 100%;
}

body {
    font-family: 'Kalpurush', 'Inter', -apple-system, sans-serif;
    background-color: var(--bg-dark);
    color: var(--text-body);
    line-height: 1.8;
    -webkit-font-smoothing: antialiased;
}

/* Global Typography Hierarchy */
h1, h2, h3, h4, h5, h6 {
    color: var(--text-pure);
    font-weight: 700;
    margin-bottom: 1.5rem;
}

.section-title {
    font-size: 2.8rem;
    text-align: center;
    margin-bottom: 80px;
    position: relative;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -15px;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 4px;
    background: var(--primary);
    border-radius: 2px;
}

/* Perfect Spacing for Sections */
.section-padding {
    padding: var(--section-py) 0;
}

/* Sticky Navbar Refinement */
.glass-nav {
    background: var(--bg-nav);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border);
    padding: 18px 0;
    transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 1050;
}

.glass-nav.scrolled {
    padding: 12px 0;
    background: #000;
}

/* Hero Section Professionalism - FIXED OVERLAP */
.hero-section {
    padding-top: 160px; /* Increased padding to prevent overlap with fixed navbar */
    padding-bottom: 100px;
    background: radial-gradient(circle at 80% 20%, rgba(244, 42, 65, 0.1) 0%, transparent 50%);
}

.main-title {
    font-size: 4.2rem;
    font-weight: 900;
    line-height: 1.1;
}

.lead {
    font-size: 1.25rem;
    color: var(--text-body);
    max-width: 600px;
}

.floating-img {
    max-width: 320px;
    border-radius: 20px;
    box-shadow: 0 40px 80px rgba(0,0,0,0.8);
    transform: perspective(1200px) rotateY(-12deg) rotateX(8deg);
    transition: 0.8s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.floating-img:hover {
    transform: perspective(1200px) rotateY(0deg) rotateX(0deg) scale(1.05);
}

/* Professional Cards */
.glass-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 24px;
    padding: var(--card-p);
    height: 100%;
    transition: 0.4s ease;
}

.glass-card:hover {
    border-color: rgba(255, 0, 0, 0.5);
    transform: translateY(-10px);
    box-shadow: var(--glow-red);
}

/* PDF Viewer Pro UI */
.pdf-viewer-container {
    background: #111;
    border: 12px solid #222;
    border-radius: 30px;
    box-shadow: 0 60px 100px rgba(0,0,0,0.7);
    margin: 40px auto;
}

.pdf-iframe {
    width: 100%;
    height: 800px;
    border: none;
}

/* Pricing Section High-Contrast */
.pricing-card {
    background: #111;
    border: 2px solid var(--primary);
    padding: 60px 40px !important;
}

.pricing-card .price {
    margin: 30px 0;
}

/* Payment Section Grid Spacing - FIXED OVERLAP */
#order {
    position: relative;
    z-index: 1;
    overflow: hidden;
}

.payment-methods {
    display: grid;
    gap: 20px;
}

.payment-item {
    padding: 25px;
    display: flex;
    align-items: center;
}

/* Compact Payment Instruction Box */
.payment-instruction {
    padding: 15px 20px !important; /* Force minimal padding */
    margin-top: -10px !important;
}

.payment-instruction h6 {
    margin-bottom: 5px !important;
}

.payment-instruction .payment-steps p {
    margin-bottom: 2px !important;
    font-size: 0.85rem;
}

/* Countdown Timer - Visibility Fix */
.countdown-item {
    background: rgba(255, 255, 255, 0.1) !important;
    border: 1px solid rgba(255, 255, 255, 0.2) !important;
}

.countdown-item span {
    color: var(--text-pure) !important; /* Force pure white for numbers */
    font-weight: 800;
}

.countdown-item small {
    color: var(--text-body) !important; /* Light silver for labels */
}

/* FAQ Accordion Pro - THEMED VISIBILITY FIX */
#faq {
    background-color: var(--bg-dark) !important;
}

.accordion-item {
    background-color: var(--bg-card) !important;
    border: 1px solid var(--border) !important;
    margin-bottom: 15px;
    border-radius: 12px !important;
    overflow: hidden;
}

.accordion-button {
    background-color: var(--bg-card) !important;
    color: var(--text-pure) !important;
    font-weight: 600;
    padding: 22px 25px;
    box-shadow: none !important;
    border: none !important;
}

.accordion-button:not(.collapsed) {
    background-color: rgba(0, 0, 0, 0.1) !important;
    color: var(--primary) !important; /* Flag Red for active question */
}

.accordion-button::after {
    filter: invert(1) brightness(2); /* Force arrow to be white */
}

.accordion-body {
    background-color: rgba(0, 0, 0, 0.2);
    color: var(--text-body) !important;
    padding: 20px 25px 30px;
    font-size: 1rem;
    line-height: 1.8;
}

/* Footer Cleanliness */
footer {
    background: #050505;
    padding: 80px 0 30px;
}

.footer h6 {
    text-transform: uppercase;
    letter-spacing: 1px;
    font-size: 0.9rem;
}

.bg-light-red {
    background-color: rgba(255, 0, 0, 0.03);
}

.x-small {
    font-size: 0.75rem;
}

#current-page {
    color: var(--primary);
}

.prev-page, .next-page {
    transition: 0.3s;
}

.prev-page:hover, .next-page:hover {
    background-color: var(--primary) !important;
    color: white !important;
}

@media (max-width: 768px) {
    .reader-slider {
        height: 500px;
    }
    .reader-page {
        padding: 30px 20px !important;
        margin: 10px auto;
    }
}

/* Floating Buttons */
.floating-social-btns {
    position: fixed;
    right: 20px;
    bottom: 100px;
    z-index: 1000;
}

.whatsapp-btn, .messenger-btn {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    color: white;
    font-size: 1.5rem;
    text-decoration: none;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
    transition: 0.3s;
}

.whatsapp-btn { background: #25d366; }
.messenger-btn { background: #0084ff; }

.whatsapp-btn:hover, .messenger-btn:hover {
    transform: scale(1.1);
    color: white;
}

/* Sticky Buy Button */
.sticky-buy-btn {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    z-index: 999;
}

/* Sale Popup - ULTRA EYE-CATCHING & FIXED VISIBILITY */
#sale-popup {
    background: rgba(255, 255, 255, 0.98); /* Bright White to stand out against Green */
    color: #1a1a1a;
    box-shadow: 0 20px 50px rgba(0,0,0,0.4);
    border-left: 6px solid var(--primary);
    position: fixed;
    left: 20px;
    bottom: 100px; /* Above mobile button */
    width: 320px;
    z-index: 2000;
    transform: translateX(-450px);
    opacity: 0;
    visibility: hidden;
    transition: all 0.6s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    padding: 15px 20px;
    border-radius: 12px;
}

#sale-popup.active {
    transform: translateX(0);
    opacity: 1;
    visibility: visible;
}

.user-avatar {
    position: relative;
}

/* Eye-catching Ping Animation */
.user-avatar::after {
    content: '';
    position: absolute;
    top: -5px;
    right: -5px;
    width: 12px;
    height: 12px;
    background-color: var(--primary);
    border-radius: 50%;
    animation: ping 1.5s infinite;
}

@keyframes ping {
    0% { transform: scale(0.8); opacity: 1; }
    100% { transform: scale(2.5); opacity: 0; }
}

/* Typography Enhancements */
.typed-text {
    color: var(--primary);
    font-weight: 800;
    text-shadow: 0 0 10px rgba(244, 42, 65, 0.2);
}

.testimonial-card h5 {
    color: var(--primary) !important;
    font-weight: 700;
}

#sale-popup span {
    color: #000; /* Set to solid Black for maximum visibility on white background */
    font-weight: 800;
    font-size: 1.1rem;
}

#sale-popup p.x-small {
    color: #333;
    font-size: 0.85rem;
}

.bg-dark-grey {
    background-color: var(--bg-dark);
}

.rounded-20 {
    border-radius: 20px;
}

.border-danger-glow {
    border: 1px solid var(--primary);
    box-shadow: 0 0 15px rgba(255, 0, 0, 0.3);
}

/* Income Card */
.income-card {
    padding: 40px 30px;
}

.icon-box {
    width: 70px;
    height: 70px;
    background: rgba(255, 0, 0, 0.1);
    border-radius: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto;
    color: var(--primary);
    border: 1px solid rgba(255, 0, 0, 0.2);
}

/* Timeline */
.timeline {
    position: relative;
    max-width: 800px;
    margin: 0 auto;
}

.timeline::after {
    content: '';
    position: absolute;
    width: 2px;
    background: var(--border);
    top: 0;
    bottom: 0;
    left: 50%;
    margin-left: -1px;
}

.timeline-item {
    padding: 10px 40px;
    position: relative;
    background-color: inherit;
    width: 50%;
}

.timeline-item::after {
    content: '';
    position: absolute;
    width: 20px;
    height: 20px;
    right: -10px;
    background-color: var(--bg-dark);
    border: 3px solid var(--primary);
    top: 15px;
    border-radius: 50%;
    z-index: 1;
}

.timeline-item:nth-child(even) {
    left: 50%;
}

.timeline-item:nth-child(odd) {
    left: 0;
}

.timeline-item:nth-child(even)::after {
    left: -10px;
}

.timeline-content {
    padding: 20px 30px;
}

.chapter-num {
    color: var(--primary);
    font-weight: 700;
    font-size: 0.9rem;
    text-transform: uppercase;
    display: block;
    margin-bottom: 5px;
}

/* Swiper Slider */
.testimonial-slider {
    padding-bottom: 50px;
}

.swiper-pagination-bullet {
    background: var(--text-pure);
    opacity: 0.5;
}

.swiper-pagination-bullet-active {
    background: var(--primary);
    opacity: 1;
}

.ribbon {
    position: absolute;
    top: 0;
    right: 0;
    background: var(--primary);
    color: white;
    padding: 5px 30px;
    transform: rotate(45deg) translate(25px, -15px);
    font-weight: bold;
    font-size: 0.8rem;
    width: 150px;
    text-align: center;
}

.border-dashed {
    border: 1px dashed var(--border) !important;
}

/* Mobile Responsive Adjustments */
@media (max-width: 767px) {
    .timeline::after {
        left: 31px;
    }
    .timeline-item {
        width: 100%;
        padding-left: 70px;
        padding-right: 25px;
    }
    .timeline-item::after {
        left: 21px;
    }
    .timeline-item:nth-child(even) {
        left: 0%;
    }
    #sale-popup {
        width: calc(100% - 40px);
        bottom: 85px;
    }
}
