/* Modern Web Design System for Webinar Landing Page */

:root {
    --primary-color: #E50E1A;
    --primary-hover: #F22430;
    --primary-gradient: linear-gradient(135deg, #E50E1A 0%, #FF3D4A 100%);
    --primary-shadow: #A3060E;
    --text-dark: #1F1F1F;
    --text-medium: #4E4E4E;
    --text-light: #8A8A8A;
    --bg-page: #FCFAF7;
    --bg-card: #FFFFFF;
    --border-color: #EFECE6;
    --font-heading: 'Playfair Display', Georgia, serif;
    --font-body: 'Plus Jakarta Sans', system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
    --transition-smooth: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Global Reset & Base Styles */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: var(--font-body);
    background-color: #F8F9FA;
    color: var(--text-dark);
    line-height: 1.6;
    display: flex;
    justify-content: center;
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
}

/* Page Container (Max width for centered mobile-like experience on desktop) */
.page-container {
    width: 100%;
    max-width: 480px; /* Fits mobile screens perfectly, creates a clean vertical card on desktop */
    background: radial-gradient(circle at top, rgba(229, 14, 26, 0.03) 0%, rgba(252, 250, 247, 0) 80%), var(--bg-page);
    min-height: 100vh;
    box-shadow: 0 0 40px rgba(0, 0, 0, 0.03);
    position: relative;
    overflow-x: hidden;
}

.content-wrapper {
    padding: 32px 24px 60px 24px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

/* Badge Section */
.badge-container {
    margin-bottom: 20px;
    display: flex;
    justify-content: center;
}

.date-badge {
    font-family: var(--font-body);
    font-size: 13px;
    font-weight: 600;
    color: var(--primary-color);
    border: 1px solid rgba(229, 14, 26, 0.15);
    padding: 6px 18px;
    border-radius: 50px;
    background-color: rgba(229, 14, 26, 0.05);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    letter-spacing: 0.5px;
    text-transform: lowercase;
}

.date-badge::first-letter {
    text-transform: uppercase;
}

/* Subtitle */
.instructor-subtitle {
    font-size: 14px;
    font-weight: 500;
    color: var(--text-medium);
    margin-bottom: 12px;
    text-align: center;
    letter-spacing: -0.2px;
}

/* Main Heading */
.main-title {
    font-family: var(--font-heading);
    font-size: clamp(22px, 6vw, 32px);
    font-weight: 700;
    line-height: 1.3;
    color: var(--text-dark);
    text-align: center;
    margin-bottom: 20px;
    letter-spacing: -0.5px;
    word-break: break-word;
}

/* Detail Subtitle */
.detail-subtitle {
    font-size: clamp(13px, 3.8vw, 15px);
    font-weight: 400;
    color: var(--text-medium);
    text-align: center;
    width: 100%;
    max-width: 95%;
    margin-bottom: 28px;
    line-height: 1.6;
}

.highlight-red {
    color: var(--primary-color);
    font-weight: 700;
    background: rgba(229, 14, 26, 0.06);
    padding: 2px 8px;
    border-radius: 6px;
}

/* Avatar Section */
.avatar-container {
    width: 100%;
    display: flex;
    justify-content: center;
    margin-bottom: 30px;
}

.avatar-image {
    width: 100%;
    max-width: 320px;
    height: auto;
    object-fit: contain;
    /* Soft blending with background */
    filter: drop-shadow(0 15px 30px rgba(0, 0, 0, 0.08));
}

/* CTA Sections */
.cta-section {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-bottom: 40px;
    position: relative;
}

.lower-cta {
    margin-top: 24px;
    margin-bottom: 10px;
}

.cta-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    text-decoration: none;
    box-sizing: border-box;
    width: 100%;
    max-width: 340px;
    padding: clamp(14px, 4.5vw, 18px) clamp(16px, 5vw, 24px);
    font-family: var(--font-body);
    font-size: clamp(15px, 4.5vw, 18px);
    font-weight: 800;
    color: #FFFFFF;
    background: var(--primary-gradient);
    border: none;
    border-radius: 14px;
    cursor: pointer;
    letter-spacing: 0.5px;
    outline: none;
    position: relative;
    transform: translateY(0);
    transition: all 0.15s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    box-shadow: 0 6px 0 var(--primary-shadow), 0 12px 24px rgba(229, 14, 26, 0.3);
}

.cta-button:hover {
    filter: brightness(1.06);
    box-shadow: 0 6px 0 var(--primary-shadow), 0 16px 30px rgba(229, 14, 26, 0.35);
}

.cta-button:active {
    transform: translateY(4px);
    box-shadow: 0 2px 0 var(--primary-shadow), 0 6px 12px rgba(229, 14, 26, 0.25);
}

/* Curved Arrow and "BEPUL" Badge */
.arrow-container {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-top: 10px;
    position: relative;
    width: 100%;
    max-width: 160px;
    height: 40px;
}

.curved-arrow {
    position: absolute;
    left: 10px;
    top: -15px;
    opacity: 0.85;
}

.bepul-text {
    font-family: var(--font-body);
    font-size: 28px;
    font-weight: 800;
    color: var(--text-dark);
    letter-spacing: 1px;
    margin-left: 95px;
    margin-top: 10px;
}

/* Benefits Card */
.benefits-card {
    width: 100%;
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 28px;
    padding: clamp(20px, 6vw, 32px) clamp(16px, 5vw, 24px);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.03);
    margin-bottom: 24px;
}

.card-title {
    font-family: var(--font-body);
    font-size: 18px;
    font-weight: 700;
    color: var(--text-dark);
    text-align: center;
    margin-bottom: 24px;
}

.benefits-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.benefit-item {
    display: flex;
    align-items: flex-start;
    gap: 14px;
}

.benefit-icon {
    flex-shrink: 0;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-top: 2px;
}

.benefit-icon svg {
    width: 24px;
    height: 24px;
}

.benefit-text {
    font-size: 14px;
    font-weight: 500;
    color: var(--text-dark);
    line-height: 1.5;
}

/* Modal Styling */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(17, 17, 17, 0.6);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
    padding: 20px;
}

.modal-overlay.active {
    opacity: 1;
    pointer-events: auto;
}

.modal-dialog {
    background-color: var(--bg-card);
    width: 100%;
    max-width: 420px;
    border-radius: 24px;
    padding: 36px 28px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.15);
    position: relative;
    transform: translateY(30px);
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.modal-overlay.active .modal-dialog {
    transform: translateY(0);
}

.modal-close {
    position: absolute;
    top: 20px;
    right: 20px;
    background: none;
    border: none;
    font-size: 28px;
    line-height: 1;
    color: var(--text-light);
    cursor: pointer;
    transition: var(--transition-smooth);
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
}

.modal-close:hover {
    color: var(--text-dark);
    background-color: #F1F5F9;
}

.modal-state {
    display: flex;
    flex-direction: column;
}

.modal-state.hidden {
    display: none;
}

.modal-title {
    font-size: 20px;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 8px;
    text-align: center;
}

.modal-desc {
    font-size: 14px;
    color: var(--text-medium);
    margin-bottom: 24px;
    text-align: center;
    line-height: 1.5;
}

/* Form Styling */
.form-group {
    margin-bottom: 20px;
    display: flex;
    flex-direction: column;
}

.form-group label {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-medium);
    margin-bottom: 6px;
}

.form-group input {
    width: 100%;
    padding: 14px 16px;
    font-family: var(--font-body);
    font-size: 15px;
    border: 1.5px solid #E3DFD5;
    border-radius: 10px;
    outline: none;
    transition: var(--transition-smooth);
    background-color: #FAF9F6;
}

.form-group input:focus {
    border-color: var(--primary-color);
    background-color: #FFFFFF;
    box-shadow: 0 0 0 3px rgba(229, 14, 26, 0.08);
}

.form-group.invalid input {
    border-color: #EF4444;
    background-color: #FFF5F5;
}

.error-msg {
    font-size: 12px;
    color: #EF4444;
    margin-top: 4px;
    font-weight: 500;
    display: none;
}

.form-group.invalid .error-msg {
    display: block;
}

.modal-submit-btn {
    width: 100%;
    padding: 16px;
    font-family: var(--font-body);
    font-size: 16px;
    font-weight: 700;
    color: #FFFFFF;
    background: var(--primary-gradient);
    border: none;
    border-radius: 10px;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(229, 14, 26, 0.2);
    transition: var(--transition-smooth);
    margin-top: 10px;
}

.modal-submit-btn:hover {
    filter: brightness(1.06);
    transform: translateY(-1px);
    box-shadow: 0 6px 16px rgba(229, 14, 26, 0.3);
}

.modal-submit-btn:active {
    transform: translateY(1px);
    box-shadow: 0 2px 6px rgba(229, 14, 26, 0.15);
}

/* Success State Styling */
.success-icon {
    width: 64px;
    height: 64px;
    margin: 0 auto 20px auto;
}

.success-icon svg {
    width: 100%;
    height: 100%;
}

.telegram-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    padding: 16px;
    font-family: var(--font-body);
    font-size: 16px;
    font-weight: 700;
    color: #FFFFFF;
    background-color: #229ED9;
    border: none;
    border-radius: 10px;
    text-decoration: none;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(34, 158, 217, 0.25);
    transition: var(--transition-smooth);
}

.telegram-btn:hover {
    background-color: #1A84B8;
    transform: translateY(-1px);
    box-shadow: 0 6px 16px rgba(34, 158, 217, 0.35);
}

.tg-icon {
    width: 20px;
    height: 20px;
}

/* Responsive Adjustments */
@media (max-width: 380px) {
    .content-wrapper {
        padding: 20px 14px 40px 14px;
    }

    .date-badge {
        font-size: 11px;
        padding: 5px 12px;
    }

    .instructor-subtitle {
        font-size: 12px;
    }

    .benefit-text {
        font-size: 13px;
    }

    .modal-dialog {
        padding: 24px 18px;
    }
}

/* Larger Screens Responsive adjustments */
@media (min-width: 480px) {
    body {
        padding: 40px 0;
        background-color: #F0F2F5;
    }
    
    .page-container {
        border-radius: 32px;
        box-shadow: 0 20px 60px rgba(0, 0, 0, 0.05);
        height: auto;
        min-height: unset;
    }
}
