@import url('https://fonts.googleapis.com/css2?family=Sarabun:wght@300;400;500;600;700&family=Outfit:wght@300;400;500;600;700&display=swap');

:root {
    /* Theme: Orange, Black, White, Yellow, Gray */
    --bg-calendar: #ffffff;
    --bg-page: #f3f4f6;

    --primary: #f97316;
    --primary-hover: #ea580c;

    --accent-yellow: #facc15;
    --accent-black: #171717;

    --text-main: #000000;
    --text-muted: #4b5563;

    --border-color: #e5e7eb;

    --holiday: #ef4444;
    --bigben-bg: #fff7ed;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: 'Sarabun', 'Outfit', sans-serif;
    background-color: var(--bg-page);
    color: var(--text-main);
    min-height: 100vh;
}

.main-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 2rem;
}

/* Header Layout */
header {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-bottom: 2rem;
    padding-top: 1rem;
    position: relative;
    gap: 1.5rem;
}

.header-branding {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    text-align: center;
}

.title-group {
    display: flex;
    flex-direction: column;
    align-items: center;
}

/* Helper class for explicit centering */
.centered {
    text-align: center;
    align-items: center;
    justify-content: center;
}

.app-logo {
    position: absolute;
    top: 50%;
    /* Center vertically */
    left: 50%;
    transform: translate(-50%, -50%);
    height: 100px;
    width: auto;
    object-fit: contain;
    mix-blend-mode: normal;
    /* Normal for header/footer placement */
    border-radius: 50%;
    border: 4px solid white;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
    background: white;
    z-index: 10;
}

h1 {
    font-size: 2.2rem;
    color: var(--primary);
    margin: 0;
    font-weight: 700;
    line-height: 1.2;
}

.subtitle {
    font-size: 1.25rem;
    color: var(--text-muted);
    font-weight: 500;
}

/* Grid Layouts */
/* Grid Layouts - Horizontal Slider */
.months-grid,
.months-grid.two-col,
.months-grid.one-col {
    display: flex;
    gap: 1.5rem;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    padding-bottom: 1.5rem;
    /* Space for scrollbar */
    margin: 0 -1rem;
    /* Negative margin to touch edges on mobile */
    padding-left: 1rem;
    padding-right: 1rem;
    max-width: 100% !important;
    scrollbar-width: thin;
    /* Firefox */
    scrollbar-color: var(--primary) transparent;
}

/* Scrollbar styling for Webkit */
.months-grid::-webkit-scrollbar {
    height: 8px;
}

.months-grid::-webkit-scrollbar-track {
    background: transparent;
}

.months-grid::-webkit-scrollbar-thumb {
    background-color: #cbd5e1;
    border-radius: 4px;
}

.months-grid::-webkit-scrollbar-thumb:hover {
    background-color: var(--primary);
}

@media (max-width: 900px) {
    header {
        flex-direction: column;
        text-align: center;
        gap: 1.5rem;
    }

    .header-branding {
        flex-direction: column;
        text-align: center;
        gap: 1rem;
    }
}

/* Card Styling */
.month-card {
    background: #ffffff;
    /* Light Theme: White */
    border-radius: 1.5rem;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    padding: 1.5rem;
    padding-bottom: 0;
    border: 2px solid #e2e8f0;
    /* Soft border */
    display: flex;
    flex-direction: column;

    /* Slider props */
    min-width: 320px;
    /* Base Width */
    flex: 0 0 auto;
    scroll-snap-align: center;
    width: 100%;
    max-width: 400px;
    /* Max width for single card */
}

.month-title {
    text-align: center;
    font-size: 1.6rem;
    font-weight: 700;
    color: #1e3a8a;
    /* Dark Blue Title for contrast */
    margin-bottom: 1rem;
}

.calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    font-size: 0.95rem;
    margin-bottom: 1rem;
}

.day-header {
    text-align: center;
    font-weight: 700;
    color: #64748b;
    /* Slate 500 */
    font-size: 0.9rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid #e2e8f0;
    margin-bottom: 0.5rem;
}

.day-header.weekend {
    color: var(--holiday);
}

.day-cell {
    min-height: 70px;
    border-radius: 8px;
    padding: 4px;
    position: relative;
    transition: background 0.1s;

    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    text-align: center;
}

.day-cell:hover {
    background: #fffbeb;
}

/* Circle Highlight Logic */
.day-cell.course-day::after {
    content: '';
    position: absolute;
    top: 18px;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 44px;
    height: 44px;
    border: 2px solid #ef4444;
    /* Thin Red Line */
    border-radius: 50%;
    pointer-events: none;
    z-index: 10;
}

.date-number {
    font-weight: 600;
    width: 28px;
    height: 28px;
    line-height: 28px;
    text-align: center;
    border-radius: 50%;
    margin-bottom: 4px;
    color: #334155;
    /* Dark Slate for numbers */
    color: var(--text-main);
    z-index: 5;
}

/* Section Title for Calendar */
.calendar-section-title {
    text-align: center;
    font-size: 2.5rem;
    font-family: 'Kanit', sans-serif;
    font-weight: 700;
    color: #1e3a8a;
    /* Matched to Footer Blue */
    margin: 2rem 0 1rem;
    text-shadow: none;
    background: none;
    -webkit-background-clip: unset;
    -webkit-text-fill-color: initial;
}

.weekend .date-number {
    color: var(--holiday);
}

.current-day .date-number {
    background: var(--primary);
    color: white !important;
}

/* Big Ben Label in Cells */
.bigben-label {
    font-size: 0.75rem;
    color: black;
    background: var(--accent-yellow);
    border-radius: 4px;
    padding: 2px 8px;
    line-height: 1.2;
    font-weight: 600;
    margin-top: 2px;
    display: inline-block;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
    z-index: 11;
}

/* Footer Summary */
.bigben-footer {
    margin: 0 -1.5rem;
    padding: 0.75rem 1.5rem;
    margin-top: auto;
    font-size: 0.9rem;
    text-align: center;
    font-weight: 600;
    background-color: #ffedd5;
    color: black;
    border-top: 1px solid #fed7aa;
}

.bigben-footer.has-events,
.bigben-footer.no-events,
.bigben-footer.no-data {
    background-color: #ffedd5;
    color: black;
}

/* Pricing Section */
.pricing-section {
    margin-top: 4rem;
    padding: 2rem 0;
    font-family: 'Sarabun', sans-serif;
}

.section-title {
    text-align: center;
    font-size: 2rem;
    font-weight: 700;
    color: #1e3a8a;
    /* Matched to Footer Blue */
    margin-bottom: 2rem;
}

.pricing-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    max-width: 900px;
    margin: 0 auto 3rem;
}

/* Pricing Card */
.pricing-card {
    background: white;
    border-radius: 1.5rem;
    border: 1px solid var(--border-color);
    padding: 2rem;
    display: flex;
    flex-direction: column;
    position: relative;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
    transition: transform 0.2s, box-shadow 0.2s;
}

.pricing-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
}

/* Best Value Highlight */
.pricing-card.best-value {
    border: 2px solid #fbbf24;
    background: linear-gradient(to bottom, #fff, #fffbeb);
    transform: scale(1.05);
    z-index: 10;
    box-shadow: 0 10px 25px -5px rgba(249, 115, 22, 0.2);
}

.pricing-card.best-value:hover {
    transform: scale(1.05) translateY(-5px);
}

.badge-best {
    position: absolute;
    top: -12px;
    left: 50%;
    transform: translateX(-50%);
    background: #f97316;
    color: white;
    padding: 0.25rem 1rem;
    border-radius: 999px;
    font-size: 0.9rem;
    font-weight: 700;
    box-shadow: 0 4px 6px rgba(249, 115, 22, 0.3);
}

/* Card Content */
.card-header {
    text-align: center;
    margin-bottom: 1.5rem;
    border-bottom: 1px solid #e5e7eb;
    padding-bottom: 1rem;
}

.card-header h3 {
    margin: 0;
    font-size: 1.5rem;
    color: var(--text-main);
    font-weight: 700;
}

.card-header p {
    margin: 0.5rem 0 0;
    color: var(--text-muted);
    font-size: 0.95rem;
}

.price-box {
    text-align: center;
    margin-bottom: 2rem;
    color: var(--primary);
}

.currency {
    font-size: 1rem;
    font-weight: 600;
    vertical-align: top;
    margin-top: 5px;
    display: inline-block;
}

.amount {
    font-size: 3rem;
    font-weight: 800;
    font-family: 'Outfit', sans-serif;
    line-height: 1;
}

.period {
    font-size: 0.9rem;
    color: var(--text-muted);
    font-weight: 500;
}

/* Features List */
.features-list {
    list-style: none;
    padding: 0;
    margin: 0 0 2rem;
    flex-grow: 1;
}

.features-list li {
    padding: 0.75rem 0;
    border-bottom: 1px dashed #e5e7eb;
    font-size: 1rem;
    color: var(--text-main);
}

.features-list li:last-child {
    border-bottom: none;
}

.features-list li.highlight {
    color: #f97316;
    font-weight: 700;
    background: #fff7ed;
    margin: 0 -1rem;
    padding: 0.75rem 1rem;
    border-radius: 0.5rem;
    text-align: center;
}

/* Summary Footer */
.total-summary {
    text-align: center;
    font-size: 0.95rem;
    color: var(--text-muted);
    margin-top: auto;
    padding-top: 1rem;
    border-top: 1px solid #e5e7eb;
    font-weight: 500;
}

.total-summary.discount .strike {
    text-decoration: line-through;
    opacity: 0.6;
}

/* Contact Footer */
.contact-footer {
    background: #1e3a8a;
    color: white;
    border-radius: 1rem;
    padding: 1.5rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1.5rem;
    position: relative;
    /* For logo positioning */
    margin-top: 60px;
    /* Space for logo overlap */
}

.line-qr {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.line-qr p {
    margin: 0;
    font-size: 1.2rem;
    font-weight: 700;
}

.line-qr img {
    width: 60px;
    height: 60px;
    border-radius: 8px;
    background: white;
    padding: 4px;
}

.phone-contact {
    font-size: 1.5rem;
    font-weight: 800;
    font-family: 'Outfit', sans-serif;
}

/* =========================================
   HTML POSTER STYLES (Dynamic Promo)
   ========================================= */
.poster-html {
    width: 100%;
    max-width: 794px;
    /* A4 Width at ~96dpi */
    aspect-ratio: 210/297;
    /* A4 Aspect Ratio */
    margin: 0 auto;
    border-radius: 20px;
    overflow: hidden;
    background: linear-gradient(180deg, #0f172a 0%, #1e3a8a 100%);
    position: relative;
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.3);
    font-family: 'Kanit', sans-serif;
    color: white;
}

/* Diagonal Pattern Overlay */
.poster-html::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: repeating-linear-gradient(45deg,
            transparent,
            transparent 30px,
            rgba(255, 255, 255, 0.03) 30px,
            rgba(255, 255, 255, 0.03) 32px);
    pointer-events: none;
}

.poster-content {
    padding: 3rem 4rem 4rem;
    /* Increased side/bottom padding */
    position: relative;
    z-index: 2;
    text-align: center;
    height: 100%;
    /* Fill A4 Height */
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    /* Distribute vertically */
}

/* Header */
/* Header */
.poster-title {
    font-size: 5rem;
    /* Fallback */
    font-size: clamp(3rem, 12vw, 6rem);
    /* Adjusted for single line */
    font-weight: 800;
    color: #FFAB40;
    text-shadow: 0 4px 15px rgba(255, 171, 64, 0.4);
    margin: 0;
    line-height: 1;
    /* Reset line height */
    text-transform: uppercase;
    letter-spacing: -2px;
    white-space: nowrap;
    /* Force single line */
}

.title-line {
    width: 70%;
    height: 6px;
    background: #FFAB40;
    margin: 1rem auto;
    border-radius: 4px;
}

.poster-subtitle {
    font-size: 2.5rem;
    /* Fallback */
    font-size: clamp(1.8rem, 6vw, 3rem);
    /* Larger Subtitle */
    font-weight: 700;
    margin: 0;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
    color: #cbd5e1;
}

/* Hook Box */
.hook-box {
    background: rgba(255, 255, 255, 0.1);
    border: 3px solid rgba(255, 171, 64, 0.5);
    border-radius: 25px;
    padding: 2.5rem 1.5rem;
    margin: 1rem 0;
    backdrop-filter: blur(8px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
}

.hook-title {
    font-size: 3.5rem;
    /* Massive Hook */
    font-weight: 800;
    color: #FFAB40;
    margin-bottom: 0.5rem;
    line-height: 1;
    letter-spacing: -1px;
}

.hook-desc {
    font-size: 3rem;
    font-weight: 700;
    color: white;
    line-height: 1.1;
}

@media (max-width: 600px) {

    .hook-title,
    .hook-desc {
        font-size: 1.2rem;
    }
}

/* Feature Bullets */
.feature-bullets {
    display: flex;
    flex-direction: column;
    gap: 1.8rem;
    /* More breathing room */
    margin: 1rem 0;
}

.bullet-item {
    background: white;
    border-radius: 20px;
    padding: 1.2rem 2rem;
    /* Larger padding */
    display: flex;
    align-items: center;
    gap: 1.5rem;
    color: #0f172a;
    text-align: left;
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.2);
    transition: transform 0.2s;
}

.icon-circle {
    background: #1e3a8a;
    color: white;
    width: 80px;
    /* Larger Icon */
    height: 80px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.5rem;
    flex-shrink: 0;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.bullet-text h3 {
    margin: 0;
    font-size: 1.8rem;
    /* Reduced from 2.4rem to fit single line */
    font-weight: 800;
    color: #0f172a;
    line-height: 1.2;
    margin-bottom: 0.2rem;
    white-space: nowrap;
    /* Force single line if possible, or let it shrink */
}

.bullet-text p {
    margin: 0;
    font-size: 1.6rem;
    /* Readable text */
    color: #475569;
    font-weight: 600;
}

/* Condition */
.condition-box {
    margin: 1rem 0;
    padding: 1.5rem;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 15px;
}

.cond-main {
    font-size: 3rem;
    /* Massive */
    font-weight: 900;
    color: #FFAB40;
    text-shadow: 0 4px 15px rgba(255, 171, 64, 0.5);
    margin-bottom: 0.5rem;
    line-height: 1;
}

.cond-sub {
    font-size: 1.4rem;
    color: #e2e8f0;
    font-weight: 500;
}

/* Syllabus Footer */
.poster-syllabus {
    background: linear-gradient(to bottom, #FFAB40, #FF8F00);
    padding: 1.5rem 2rem 2rem;
    position: relative;
    color: #0f172a;
    flex-grow: 1;
    /* Fill remaining space */
    display: flex;
    flex-direction: column;
}

.syllabus-header {
    text-align: center;
    font-size: 2rem;
    font-weight: 800;
    color: #0f172a;
    margin: 0 0 1.5rem;
    line-height: 1.2;
}

.syllabus-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.8rem 1.5rem;
}

.syllabus-item {
    background: #fffbeb;
    /* Creamy white */
    color: #0f172a;
    font-size: 1.2rem;
    font-weight: 700;
    padding: 0.6rem 1rem;
    border-radius: 10px;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.syllabus-item::before {
    /* content: '✅';  Moved to HTML for reliable rendering or use CSS icon */
    /* If using text in HTML, this is not needed. */
    /* Styling specifically for the green check visual from image */
    color: #10b981;
    /* Green */
}

@media (max-width: 650px) {
    .syllabus-grid {
        grid-template-columns: 1fr;
        gap: 0.5rem;
    }

    .poster-footer {
        /* Keep safe fallback */

        flex-direction: column;
        gap: 2rem;
    }

    .poster-footer::after {
        display: none;
    }

    .price {
        font-size: 3rem;
    }

    .bullet-item {
        flex-direction: column;
        text-align: center;
        gap: 0.5rem;
    }
}

/* =========================================
   CARD SLIDER STYLES (Syllabus)
   ========================================= */
.slider-section {
    width: 100%;
    margin-top: 3rem;
    position: relative;
    /* Optional: Ensure it has contrasting bg if needed, or transparent */
}

.slider-wrapper {
    position: relative;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem 0;
}

.cards-container {
    display: flex;
    gap: 25px;
    padding: 40px 50px;
    /* Padding to avoid shadow clipping */
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    width: 100%;
    max-width: 100vw;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
}

.cards-container::-webkit-scrollbar {
    display: none;
}

/* --- SQUARE CARD DESIGN --- */
.card {
    flex: 0 0 auto;
    width: 320px;
    height: 320px;
    background: white;
    border-radius: 30px;
    overflow: hidden;
    scroll-snap-align: center;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.4);
    /* Shadow adapted */
    display: flex;
    flex-direction: column;
    position: relative;
    transition: transform 0.3s ease;
}

.card:hover {
    transform: scale(1.02);
}

/* Header (Orange Part) */
.card-header {
    background: #FFAB40;
    /* Updated to Gold to match Title */
    height: 35%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 0 20px;
    position: relative;
}

.chapter-tag {
    background: rgba(255, 255, 255, 0.2);
    color: white;
    font-size: 0.8rem;
    padding: 4px 10px;
    border-radius: 20px;
    width: fit-content;
    margin-bottom: 5px;
}

.card-title {
    color: white;
    font-size: 1.5rem;
    font-weight: 800;
    line-height: 1.1;
}

/* Body (White Part) */
.card-body {
    height: 65%;
    padding: 20px;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
}

.card-body ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.card-body li {
    color: #333;
    font-size: 1rem;
    font-weight: 400;
    margin-bottom: 12px;
    padding-left: 20px;
    position: relative;
    line-height: 1.4;
}

.card-body li::before {
    content: "✔";
    color: #16a34a;
    position: absolute;
    left: 0;
    font-weight: bold;
}

.deco-circle {
    position: absolute;
    top: -20px;
    right: -20px;
    width: 80px;
    height: 80px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
}

/* Navigation Arrows */
.nav-btn {
    background: rgba(255, 255, 255, 0.1);
    /* Glassy button */
    backdrop-filter: blur(5px);
    border: 2px solid rgba(255, 255, 255, 0.3);
    color: white;
    /* Changed to white for dark bg or orange for light */
    width: 50px;
    height: 50px;
    border-radius: 50%;
    font-size: 24px;
    cursor: pointer;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    position: absolute;
}

.nav-btn:hover {
    background: #F37021;
    border-color: #F37021;
    transform: scale(1.1);
    color: white;
}

.prev-btn {
    left: 20px;
}

.next-btn {
    right: 20px;
}

@media (max-width: 768px) {
    .nav-btn {
        display: none;
    }

    /* Hide arrows on mobile */
    .cards-container {
        padding: 40px 20px;
    }
}

/* Pricing Groups */
.pricing-group {
    background: white;
    padding: 2rem;
    border-radius: 20px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
    margin-bottom: 2rem;
    max-width: 900px;
    margin-left: auto;
    margin-right: auto;
    border: 1px solid #e2e8f0;
}

.group-title {
    font-size: 1.8rem;
    font-weight: 800;
    color: #1e3a8a;
    /* Footer Blue */
    margin: 0 0 0.5rem;
    text-align: center;
}

.group-desc {
    text-align: center;
    color: #64748b;
    margin-bottom: 2rem;
    font-size: 1.1rem;
}

/* =========================================
   DETAIL PAGE STYLES (Grid Layout)
   ========================================= */
.detail-page {
    background: #f8fafc;
    font-family: 'Kanit', sans-serif;
    min-height: 100vh;
    padding: 60px 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.detail-header {
    text-align: center;
    margin-bottom: 50px;
}

.main-title {
    font-size: 3.5rem;
    font-weight: 800;
    color: #1e3a8a;
    /* Blue header */
    margin: 0;
    line-height: 1.2;
    text-shadow: 0 4px 10px rgba(30, 58, 138, 0.1);
}

.title-underline {
    width: 120px;
    height: 8px;
    background: #FFAB40;
    margin: 15px auto 0;
    border-radius: 4px;
}

.content-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
    max-width: 1200px;
    width: 100%;
}

/* Override .card for grid usage */
/* Override .card for grid usage */
.content-grid .card {
    width: 100% !important;
    /* Force full width in grid */
    height: auto;
    /* Allow height to fit content */
    min-height: unset;
    /* Remove large min-height */
    flex: none;
    scroll-snap-align: none;
    margin: 0;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
    /* Softer shadow */
}

.content-grid .card .card-header {
    height: auto;
    /* Compact header */
    padding: 15px 20px;
    /* Reduced padding */
    min-height: unset;
}

.content-grid .card .card-body {
    height: auto;
    padding: 20px 20px 10px 20px;
    /* Reduced bottom padding */
    flex: 1;
}

/* Responsive */
@media (max-width: 1024px) {
    .content-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 650px) {
    .content-grid {
        grid-template-columns: 1fr;
    }

    .main-title {
        font-size: 2.5rem;
    }
}