/* ===== PLAN-D Prototype Landing Page ===== */
/* Brand: Navy #1B2A4A + Gold #C9A84C + White */

:root {
    --navy: #1B2A4A;
    --navy-dark: #0F1A2E;
    --navy-light: #2A3F6B;
    --gold: #C9A84C;
    --gold-hover: #D4B85E;
    --white: #FFFFFF;
    --light-gray: #F8F9FA;
    --gray: #6C757D;
    --border: #E2E8F0;
    --shadow: 0 4px 20px rgba(27, 42, 74, 0.1);
    --shadow-lg: 0 10px 40px rgba(27, 42, 74, 0.15);
    --radius: 16px;
    --radius-sm: 10px;
    --transition: all 0.3s ease;
}

*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    scroll-padding-top: 80px;
}

body {
    font-family: 'Noto Sans Thai', 'Inter', sans-serif;
    color: var(--navy);
    line-height: 1.7;
    background: var(--white);
    overflow-x: hidden;
    font-size: 18px;
}

.container {
    max-width: 900px;
    margin: 0 auto;
    padding: 0 20px;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

a {
    text-decoration: none;
    color: inherit;
}

ul { list-style: none; }

/* ===== Navbar ===== */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: var(--navy);
    padding: 12px 0;
    box-shadow: var(--shadow-lg);
}

.nav-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.logo-img {
    height: 38px;
    width: auto;
}

.nav-cta {
    padding: 10px 24px;
    font-size: 0.9rem;
}

/* ===== Buttons ===== */
.btn {
    display: inline-block;
    padding: 16px 36px;
    border-radius: 50px;
    font-weight: 700;
    font-size: 1.1rem;
    text-align: center;
    transition: var(--transition);
    cursor: pointer;
    border: 2px solid transparent;
    font-family: inherit;
}

.btn-gold {
    background: var(--gold);
    color: var(--white);
    border-color: var(--gold);
}

.btn-gold:hover {
    background: var(--gold-hover);
    border-color: var(--gold-hover);
    transform: translateY(-2px) scale(1.03);
    box-shadow: 0 8px 30px rgba(201, 168, 76, 0.5), 0 0 15px rgba(201, 168, 76, 0.3);
}

.btn-lg {
    padding: 20px 48px;
    font-size: 1.3rem;
}

.btn-outline-gold {
    background: transparent;
    color: var(--gold);
    border-color: var(--gold);
}

.btn-outline-gold:hover {
    background: var(--gold);
    color: var(--white);
}

.btn-white {
    background: var(--white);
    color: var(--navy);
    border-color: var(--white);
}

/* Pulse animation for CTA */
.pulse {
    animation: pulse-glow 2s infinite;
}

@keyframes pulse-glow {
    0% { box-shadow: 0 0 0 0 rgba(201, 168, 76, 0.6); }
    70% { box-shadow: 0 0 0 15px rgba(201, 168, 76, 0); }
    100% { box-shadow: 0 0 0 0 rgba(201, 168, 76, 0); }
}

/* ===== Back Button ===== */
.back-btn-wrapper {
    padding: 72px 20px 8px;
    max-width: 900px;
    margin: 0 auto;
}

.btn-back-nav {
    background: transparent;
    border: 2px solid var(--gold);
    color: var(--gold);
    padding: 8px 20px;
    border-radius: 50px;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    font-family: inherit;
    transition: var(--transition);
}

.btn-back-nav:hover {
    background: var(--gold);
    color: var(--white);
}

/* ===== Hero — FIX: proper spacing below fixed navbar ===== */
.hero {
    position: relative;
    background: var(--navy-dark);
    padding: 10px 20px;
}

.hero-banner {
    width: 90%;
    max-width: 700px;
    display: block;
    object-fit: contain;
    margin: 0 auto;
    border-radius: var(--radius);
}

.hero-overlay {
    display: none;
}

/* ===== Ready Section ===== */
.ready-section {
    padding: 80px 0;
    background: var(--navy);
    text-align: center;
}

.ready-card {
    max-width: 700px;
    margin: 0 auto;
}

.ready-card h2 {
    font-size: 1.4rem;
    color: rgba(255, 255, 255, 0.7);
    margin-bottom: 10px;
    font-weight: 400;
}

.ready-main {
    font-size: clamp(1.5rem, 4vw, 2.2rem);
    font-weight: 700;
    color: var(--white);
    margin-bottom: 15px;
    line-height: 1.4;
}

.ready-highlight {
    font-size: clamp(1.3rem, 3.5vw, 1.8rem);
    font-weight: 700;
    color: var(--gold);
    margin-bottom: 20px;
}

.ready-note {
    font-size: 1.1rem;
    color: rgba(255, 255, 255, 0.75);
    margin-bottom: 35px;
}

/* ===== Packages ===== */
.packages-section {
    padding: 70px 0 100px;
    background: var(--light-gray);
}

.section-title {
    font-size: clamp(1.6rem, 4vw, 2.2rem);
    font-weight: 700;
    text-align: center;
    margin-bottom: 10px;
    color: var(--navy);
    word-break: keep-all;
}

.section-subtitle {
    text-align: center;
    color: var(--gray);
    font-size: 1.15rem;
    margin-bottom: 40px;
    word-break: keep-all;
}

.package-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    align-items: stretch;
}

.pkg-card {
    background: var(--white);
    border: 2px solid var(--border);
    border-radius: var(--radius);
    padding: 28px 20px 20px;
    text-align: center;
    position: relative;
    transition: var(--transition);
    display: flex;
    flex-direction: column;
}

.pkg-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

/* PLAN-D Lite — highlighted */
.pkg-card.pkg-lite {
    border-color: var(--gold);
    border-width: 3px;
    box-shadow: 0 5px 30px rgba(201, 168, 76, 0.25);
    z-index: 2;
}

.pkg-badge {
    position: absolute;
    top: -14px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--gold);
    color: var(--white);
    padding: 5px 20px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 700;
    white-space: nowrap;
}

/* ===== RED Glossy Speech Balloon ===== */
.pkg-balloon {
    position: absolute;
    top: -55px;
    left: -145px;
    z-index: 10;
}

.balloon-bubble {
    background: radial-gradient(ellipse at 30% 20%, #FF3B3B, #CC0000 70%);
    color: #FFFFFF;
    padding: 16px 22px;
    border-radius: 50% 50% 50% 20%;
    font-size: 0.85rem;
    line-height: 1.4;
    text-align: center;
    box-shadow: 
        0 6px 20px rgba(204, 0, 0, 0.45),
        inset 0 -3px 8px rgba(0, 0, 0, 0.15),
        inset 0 2px 4px rgba(255, 255, 255, 0.3);
    position: relative;
    min-width: 140px;
    animation: balloon-bob 2.5s ease-in-out infinite;
}

.balloon-bubble::after {
    content: '';
    position: absolute;
    bottom: -14px;
    right: 10px;
    width: 0;
    height: 0;
    border-left: 14px solid transparent;
    border-top: 16px solid #CC0000;
    transform: rotate(15deg);
}

/* Glossy highlight */
.balloon-bubble::before {
    content: '';
    position: absolute;
    top: 6px;
    left: 14px;
    width: 30px;
    height: 14px;
    background: rgba(255, 255, 255, 0.35);
    border-radius: 50%;
}

@keyframes balloon-bob {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-6px); }
}

.balloon-bubble strong {
    display: block;
    font-size: 1rem;
    font-weight: 800;
    margin-bottom: 3px;
    color: #FFFFFF;
}

.balloon-bubble span {
    display: block;
    font-weight: 600;
    font-size: 0.82rem;
    color: #FFFFFF;
}

.pkg-card h3 {
    font-size: 1rem;
    color: var(--navy);
    margin-top: 10px;
    margin-bottom: 8px;
}

.pkg-price {
    font-size: 2rem;
    font-weight: 800;
    color: var(--gold);
    margin-bottom: 18px;
}

.pkg-price span {
    font-size: 0.9rem;
    font-weight: 400;
}

/* ===== 999 Price Glow Animation ===== */
.pkg-price-glow {
    display: inline-block;
    padding: 8px 20px;
    border-radius: 12px;
    background: rgba(201, 168, 76, 0.08);
    border: 2px solid var(--gold);
    animation: price-blink 1.8s ease-in-out infinite;
}

@keyframes price-blink {
    0% {
        box-shadow: 0 0 5px rgba(201, 168, 76, 0.3);
    }
    50% {
        box-shadow: 0 0 20px rgba(201, 168, 76, 0.6), 0 0 40px rgba(201, 168, 76, 0.2);
    }
    100% {
        box-shadow: 0 0 5px rgba(201, 168, 76, 0.3);
    }
}

.pkg-features {
    flex: 1;
    margin-bottom: 15px;
}

.pkg-features li {
    font-size: 0.85rem;
    padding: 4px 0;
    color: var(--navy);
}

.pkg-features li::before {
    content: "✓ ";
    color: var(--gold);
    font-weight: 700;
}

/* Payment Notices */
.pkg-notice {
    padding: 8px 12px;
    border-radius: 8px;
    font-size: 0.8rem;
    font-weight: 700;
    margin-bottom: 12px;
    text-align: center;
}

.pkg-notice-green {
    background: #ECFDF5;
    color: #059669;
    border: 1px solid #A7F3D0;
}

.pkg-notice-red {
    background: #FEF2F2;
    color: #DC2626;
    border: 1px solid #FECACA;
}

.pkg-btn {
    padding: 12px 20px;
    font-size: 0.9rem;
    width: 100%;
    margin-top: auto;
}

/* ===== Form Section ===== */
.form-section {
    padding: 80px 0;
    background: var(--navy-dark);
}

.form-section .section-title {
    color: var(--white);
}

.form-section .section-subtitle {
    color: rgba(255, 255, 255, 0.7);
    margin-bottom: 40px;
}

.proto-form {
    max-width: 650px;
    margin: 0 auto;
    background: var(--white);
    border-radius: var(--radius);
    padding: 40px;
    box-shadow: var(--shadow-lg);
}

.form-group {
    margin-bottom: 22px;
}

.form-group label {
    display: block;
    font-weight: 600;
    margin-bottom: 8px;
    font-size: 1rem;
    color: var(--navy);
}

.form-group input[type="text"],
.form-group input[type="email"],
.form-group input[type="tel"],
.form-group textarea {
    width: 100%;
    padding: 14px 18px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    font-size: 1.05rem;
    font-family: inherit;
    transition: var(--transition);
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--gold);
    box-shadow: 0 0 0 3px rgba(201, 168, 76, 0.15);
}

.form-group input[type="file"] {
    width: 100%;
    padding: 12px;
    border: 2px dashed var(--border);
    border-radius: var(--radius-sm);
    cursor: pointer;
    font-size: 0.95rem;
}

.form-group input[type="file"]:hover {
    border-color: var(--gold);
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

/* Form Package Selection */
.form-packages {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.form-pkg-option {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 18px;
    border: 2px solid var(--border);
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: var(--transition);
}

.form-pkg-option:hover {
    border-color: var(--gold);
    background: rgba(201, 168, 76, 0.03);
}

.form-pkg-option.recommended {
    border-color: var(--gold);
    background: rgba(201, 168, 76, 0.06);
    position: relative;
}

.form-pkg-option input[type="radio"] {
    width: 20px;
    height: 20px;
    accent-color: var(--gold);
    flex-shrink: 0;
}

.form-pkg-content {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    flex: 1;
}

.form-pkg-content strong {
    font-size: 1rem;
}

.form-pkg-price {
    color: var(--gold);
    font-weight: 700;
    font-size: 1rem;
}

.form-pkg-badge {
    background: var(--gold);
    color: var(--white);
    padding: 2px 10px;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 600;
}

/* Consent */
.consent {
    background: var(--light-gray);
    padding: 18px;
    border-radius: var(--radius-sm);
}

.checkbox-label {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    cursor: pointer;
    font-size: 0.9rem;
    line-height: 1.5;
}

.checkbox-label input {
    width: 20px;
    height: 20px;
    accent-color: var(--gold);
    flex-shrink: 0;
    margin-top: 2px;
}

.btn-submit {
    width: 100%;
    padding: 18px;
    font-size: 1.2rem;
    margin-top: 10px;
}

/* ===== Floating PLAN-D Home Button ===== */
.floating-home {
    position: fixed;
    bottom: 80px;
    right: 20px;
    z-index: 998;
    width: 56px;
    height: 56px;
    background: var(--white);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
    border: 2px solid var(--gold);
    transition: var(--transition);
}

.floating-home:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 25px rgba(201, 168, 76, 0.4);
}

.floating-home img {
    width: 36px;
    height: 36px;
    object-fit: contain;
}

/* ===== Footer ===== */
.footer {
    padding: 40px 0 20px;
    background: var(--navy);
    text-align: center;
    color: rgba(255, 255, 255, 0.6);
}

.footer-logo {
    height: 32px;
    margin: 0 auto 10px;
}

.footer p {
    font-size: 0.95rem;
    margin-bottom: 5px;
}

.footer-copy {
    font-size: 0.8rem;
    margin-top: 15px;
}

/* ===== Sticky CTA ===== */
.sticky-cta {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 999;
    padding: 12px 20px;
    background: var(--navy-dark);
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.3);
    text-align: center;
    display: none;
}

.sticky-btn {
    width: 100%;
    max-width: 400px;
    padding: 14px;
    font-size: 1.1rem;
}

/* ===== Modal ===== */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 2000;
    background: rgba(0, 0, 0, 0.6);
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.modal.active {
    display: flex;
}

.modal-content {
    background: var(--white);
    padding: 50px 40px;
    border-radius: var(--radius);
    text-align: center;
    max-width: 420px;
    width: 100%;
    animation: modalIn 0.3s ease;
}

@keyframes modalIn {
    from { transform: scale(0.9); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}

.modal-icon {
    width: 70px;
    height: 70px;
    background: var(--gold);
    color: var(--white);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    font-weight: 700;
    margin: 0 auto 20px;
}

.modal-content h3 {
    font-size: 1.6rem;
    margin-bottom: 12px;
    color: var(--navy);
}

.modal-content p {
    color: var(--gray);
    margin-bottom: 25px;
    font-size: 1rem;
    line-height: 1.7;
}

/* ===== Responsive — Mobile Fixes ===== */
@media (max-width: 768px) {
    .navbar {
        padding: 10px 0;
    }

    .nav-cta {
        padding: 8px 16px;
        font-size: 0.8rem;
    }

    .logo-img {
        height: 32px;
    }

    /* Hero fix — ensure image is fully visible below navbar */
    .hero {
        margin-top: 52px;
        padding: 8px 12px;
    }

    .hero-banner {
        width: 100%;
        max-width: 100%;
        height: auto;
        object-fit: contain;
        border-radius: var(--radius-sm);
    }

    /* Packages — single column on mobile */
    .package-grid {
        grid-template-columns: 1fr;
        max-width: 360px;
        margin: 0 auto;
        gap: 30px;
        padding-top: 70px;
    }

    .pkg-card.pkg-lite {
        order: -1;
    }

    /* Balloon reposition for mobile */
    .pkg-balloon {
        top: -60px;
        left: 50%;
        transform: translateX(-50%);
    }

    .form-row {
        grid-template-columns: 1fr;
    }

    .proto-form {
        padding: 28px 20px;
    }

    .btn-lg {
        padding: 16px 32px;
        font-size: 1.1rem;
    }

    .ready-section {
        padding: 60px 0;
    }

    .sticky-cta {
        display: block;
    }

    body {
        padding-bottom: 75px;
    }

    /* Fix mobile text wrapping */
    .section-title,
    .section-subtitle,
    .ready-main,
    .ready-highlight,
    .ready-note {
        word-break: keep-all;
        overflow-wrap: normal;
    }

    .form-pkg-content {
        flex-direction: column;
        align-items: flex-start;
        gap: 4px;
    }

    /* Ensure packages not hidden by sticky CTA */
    .packages-section {
        padding-bottom: 120px;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 16px;
    }

    body {
        font-size: 16px;
    }

    .hero {
        margin-top: 50px;
    }

    .btn {
        padding: 14px 28px;
        font-size: 1rem;
    }

    .btn-lg {
        padding: 14px 28px;
        font-size: 1rem;
        width: 100%;
    }

    .package-grid {
        max-width: 100%;
        padding-top: 60px;
    }

    .pkg-balloon {
        top: -60px;
        left: 50%;
        transform: translateX(-50%);
        right: auto;
    }
}
