* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', sans-serif;
    background: #f1f5f9;
    color: #1e293b;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background-image: radial-gradient(#cbd5e1 1px, transparent 1px);
    background-size: 24px 24px;
}

.main-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    max-width: 1100px;
    width: 100%;
    margin: 40px 20px;
    background: #ffffff;
    border-radius: 24px;
    border: 1px solid #e2e8f0;
    box-shadow: 0 20px 40px -15px rgba(0, 0, 0, 0.05);
    overflow: hidden;
}

@media (max-width: 850px) {
    .main-container {
        grid-template-columns: 1fr;
    }
}

.details-section {
    padding: 50px 40px;
    background: linear-gradient(135deg, #04122B 0%, #071a3d 100%);
    color: #f1f5f9;
    border-right: none;
}

.details-section h2 {
    font-size: 1.8rem;
    margin-bottom: 20px;
    color: #ffffff;
    line-height: 1.3;
    font-weight: 700;
}

.details-section p {
    color: #cbd5e1;
    font-size: 1rem;
    line-height: 1.6;
    margin-bottom: 20px;
}

.alert-info {
    background: rgba(234, 179, 8, 0.15);
    border-left: 4px solid #f59e0b;
    padding: 15px 20px;
    margin-bottom: 20px;
    border-radius: 0 8px 8px 0;
    color: #fef3c7;
    font-size: 0.95rem;
    line-height: 1.5;
}

.highlight {
    font-size: 1.3rem !important;
    font-weight: bold;
    color: #38bdf8 !important;
}

.details-section hr {
    border: none;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    margin: 25px 0;
}

.social-links {
    list-style: none;
    margin-bottom: 30px;
}

.social-links li {
    margin-bottom: 12px;
    font-size: 0.95rem;
    color: #cbd5e1;
    display: flex;
    align-items: flex-start;
    gap: 8px;
}

.social-links a {
    color: #60a5fa;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s;
}

.social-links a:hover {
    color: #93c5fd;
    text-decoration: underline;
}

.social-links small {
    display: block;
    margin-top: 4px;
    color: #94a3b8;
    font-size: 0.85rem;
}

.quote {
    font-style: italic;
    font-weight: 500;
    font-size: 1.1rem;
    color: #cbd5e1;
    border-left: 3px solid #3b82f6;
    padding-left: 18px;
    margin-top: 30px;
}

.form-section {
    padding: 50px 40px;
}

.register-box {
    width: 100%;
}

.register-box h1 {
    text-align: center;
    margin-bottom: 10px;
    font-size: 1.8rem;
    color: #0f172a;
    font-weight: 700;
}

.register-box p.subtitle {
    text-align: center;
    color: #64748b;
    font-size: 0.95rem;
    margin-bottom: 35px;
}

.form-row {
    display: flex;
    gap: 15px;
}

.form-group {
    margin-bottom: 20px;
    flex: 1;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    color: #475569;
    font-size: 0.85rem;
    font-weight: 600;
}

.form-control {
    width: 100%;
    padding: 12px 16px;
    background: #ffffff;
    border: 1.5px solid #cbd5e1;
    border-radius: 10px;
    color: #0f172a;
    transition: all 0.3s ease;
    font-family: inherit;
    font-size: 0.95rem;
}

.form-control:hover {
    border-color: #94a3b8;
}

.form-control:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.15);
    background: #ffffff;
}

.form-control::placeholder {
    color: #94a3b8;
    font-weight: 400;
}

.phone-group {
    display: flex;
    gap: 8px;
}

.phone-prefix {
    width: 140px;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 14px 24px;
    border: none;
    border-radius: 10px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    transition: all 0.3s ease;
    font-family: inherit;
}

.btn-primary {
    background: linear-gradient(135deg, #2563eb, #1d4ed8);
    color: white;
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.2);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(37, 99, 235, 0.3);
}

.btn-whatsapp {
    background: linear-gradient(135deg, #25D366, #128C7E);
    color: white;
    margin-top: 20px;
    font-size: 1.1rem;
    padding: 15px;
    box-shadow: 0 4px 12px rgba(37, 211, 102, 0.2);
    width: 100%;
}

.btn-whatsapp:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(37, 211, 102, 0.3);
}

.alert {
    padding: 15px 20px;
    border-radius: 12px;
    margin-bottom: 25px;
    font-size: 0.9rem;
    line-height: 1.5;
    display: none;
}

.alert-error {
    background: #fef2f2;
    border: 1px solid #fecaca;
    color: #dc2626;
}

.footer-link {
    text-align: center;
    margin-top: 25px;
    font-size: 0.9rem;
    color: #64748b;
}

.footer-link a {
    color: #2563eb;
    text-decoration: none;
    font-weight: 600;
}

.footer-link a:hover {
    text-decoration: underline;
}

#success-screen {
    display: none;
    text-align: center;
    padding: 30px 20px;
}

#success-screen h2 {
    color: #16a34a;
    font-size: 2.2rem;
    margin-bottom: 15px;
    font-weight: 700;
}

#success-screen p {
    color: #475569;
    font-size: 1.05rem;
    line-height: 1.6;
    margin-bottom: 25px;
}

.whatsapp-icon {
    width: 26px;
    height: 26px;
    margin-right: 10px;
    fill: currentColor;
}

.google-divider {
    display: flex;
    align-items: center;
    margin: 30px 0;
    color: #64748b;
    font-size: 0.85rem;
}

.google-divider .line {
    flex: 1;
    height: 1px;
    background-color: #e2e8f0;
}

.google-divider span {
    padding: 0 15px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.info-box {
    background: #f8fafc;
    padding: 15px 20px;
    border-radius: 10px;
    margin: 25px 0;
    text-align: left;
    border-left: 4px solid #3b82f6;
}

.info-box p.title {
    font-size: 0.95rem;
    margin-bottom: 5px;
    color: #0f172a;
    font-weight: 600;
}

.info-box p.desc {
    font-size: 0.85rem;
    color: #475569;
    margin: 0;
    line-height: 1.5;
}

/* Dynamic Event Header & Metadata Chips */
.event-badge-container {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin-bottom: 14px;
    flex-wrap: wrap;
}

.event-type-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 14px;
    border-radius: 9999px;
    font-size: 0.78rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    background: linear-gradient(135deg, rgba(37, 99, 235, 0.1), rgba(59, 130, 246, 0.15));
    color: #1d4ed8;
    border: 1px solid rgba(59, 130, 246, 0.3);
}

.event-type-badge.congreso {
    background: linear-gradient(135deg, rgba(147, 51, 234, 0.12), rgba(126, 34, 206, 0.18));
    color: #7e22ce;
    border-color: rgba(168, 85, 247, 0.35);
}

.event-type-badge.maraton {
    background: linear-gradient(135deg, rgba(249, 115, 22, 0.12), rgba(234, 88, 12, 0.18));
    color: #c2410c;
    border-color: rgba(249, 115, 22, 0.35);
}

.event-type-badge.webinar {
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.12), rgba(5, 150, 105, 0.18));
    color: #047857;
    border-color: rgba(16, 185, 129, 0.35);
}

.event-status-pill {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 5px 12px;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 600;
    background: rgba(16, 185, 129, 0.1);
    color: #10b981;
    border: 1px solid rgba(16, 185, 129, 0.25);
}

.evento-dynamic-title {
    text-align: center;
    font-size: 1.65rem !important;
    font-weight: 800 !important;
    color: #0f172a !important;
    line-height: 1.3 !important;
    margin-bottom: 10px !important;
    word-break: break-word;
}

.evento-summary-box {
    background: #f8fafc;
    border-left: 3px solid #3b82f6;
    padding: 10px 14px;
    border-radius: 0 8px 8px 0;
    font-size: 0.88rem;
    color: #475569;
    margin-bottom: 18px;
    line-height: 1.5;
    text-align: left;
}

.evento-details-bar {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    margin-bottom: 24px;
    padding: 14px;
    background: #f8fafc;
    border-radius: 14px;
    border: 1px solid #e2e8f0;
}

@media (max-width: 520px) {
    .evento-details-bar {
        grid-template-columns: 1fr;
        gap: 10px;
    }
}

.detail-chip {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 10px 14px;
    background: #ffffff;
    border-radius: 10px;
    border: 1px solid #e2e8f0;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.03);
    min-width: 0;
    box-sizing: border-box;
}

.detail-chip.highlight-cert,
.detail-chip#chip-ponentes {
    grid-column: 1 / -1;
}

.detail-chip.highlight-cert {
    background: #ecfdf5;
    border-color: #a7f3d0;
    box-shadow: 0 2px 6px rgba(16, 185, 129, 0.08);
}

.chip-icon {
    font-size: 1.25rem;
    line-height: 1.2;
    flex-shrink: 0;
    margin-top: 1px;
}

.chip-info {
    display: flex;
    flex-direction: column;
    min-width: 0;
    flex: 1;
}

.chip-label {
    font-size: 0.68rem;
    text-transform: uppercase;
    letter-spacing: 0.6px;
    color: #64748b;
    font-weight: 700;
    margin-bottom: 3px;
}

.chip-text {
    font-size: 0.88rem;
    color: #0f172a;
    font-weight: 700;
    line-height: 1.35;
    white-space: normal;
    word-break: normal;
    overflow-wrap: break-word;
}

.detail-chip.highlight-cert .chip-text {
    color: #047857;
    font-size: 0.9rem;
}

/* Lista y Cuadrícula Estructurada de Ponentes */
.chip-content {
    width: 100%;
}

.full-width-chip {
    grid-column: 1 / -1;
}

.ponentes-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 8px 12px;
    margin-top: 6px;
    width: 100%;
}

.ponentes-grid.many-speakers {
    max-height: 270px;
    overflow-y: auto;
    padding-right: 4px;
}

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

.ponente-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 12px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 9px;
    transition: all 0.2s ease;
}

.ponente-item:hover {
    background: #f1f5f9;
    border-color: #cbd5e1;
}

.ponente-item.solo {
    background: transparent;
    border: none;
    padding: 2px 0;
}

.ponente-avatar {
    font-size: 1rem;
    flex-shrink: 0;
    line-height: 1;
}

.ponente-meta {
    display: flex;
    flex-direction: column;
    min-width: 0;
    gap: 2px;
}

.ponente-name {
    font-size: 0.88rem;
    color: #0f172a;
    font-weight: 700;
    line-height: 1.25;
    word-break: break-word;
}

.ponente-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 0.76rem;
    color: #475569;
    font-weight: 500;
    line-height: 1.2;
}

.cert-feature-card {
    background: rgba(16, 185, 129, 0.12);
    border: 1px solid rgba(52, 211, 153, 0.35);
    border-radius: 12px;
    padding: 14px 18px;
    margin-bottom: 20px;
}

/* =====================================================
   RESPONSIVIDAD AVANZADA (Mobile, Tablet y Desktop)
   ===================================================== */
@media (max-width: 850px) {
    body {
        align-items: flex-start;
        padding: 10px 0;
    }

    .main-container {
        grid-template-columns: 1fr;
        margin: 16px 12px;
        border-radius: 18px;
        box-shadow: 0 10px 30px -10px rgba(0, 0, 0, 0.1);
    }

    .details-section {
        padding: 34px 24px;
    }

    .details-section h2 {
        font-size: 1.55rem;
    }

    .form-section {
        padding: 34px 24px;
    }

    #left-event-image-wrap img {
        max-height: 260px;
    }
}

@media (max-width: 640px) {
    .main-container {
        margin: 12px 8px;
        border-radius: 16px;
    }

    .details-section {
        padding: 24px 18px;
    }

    .details-section h2 {
        font-size: 1.35rem;
        margin-bottom: 14px;
    }

    .details-section p {
        font-size: 0.92rem;
        line-height: 1.5;
        margin-bottom: 16px;
    }

    .form-section {
        padding: 24px 18px;
    }

    /* Los campos en fila se apilan verticalmente en pantallas móviles */
    .form-row {
        flex-direction: column;
        gap: 0;
    }

    .form-group {
        margin-bottom: 16px;
    }

    .form-group label {
        font-size: 0.82rem;
        margin-bottom: 6px;
    }

    .form-control {
        padding: 11px 14px;
        font-size: 0.92rem;
        border-radius: 9px;
    }

    /* Título y subtítulo dinámico responsivo */
    .evento-dynamic-title {
        font-size: 1.32rem !important;
        margin-bottom: 8px !important;
    }

    .register-box p.subtitle {
        font-size: 0.86rem;
        margin-bottom: 18px;
    }

    /* Barra de detalles / chips en 1 columna cómoda */
    .evento-details-bar {
        grid-template-columns: 1fr;
        gap: 8px;
        padding: 10px;
        margin-bottom: 20px;
    }

    .detail-chip {
        padding: 8px 12px;
        gap: 8px;
    }

    .chip-icon {
        font-size: 1.1rem;
    }

    .chip-label {
        font-size: 0.65rem;
    }

    .chip-text {
        font-size: 0.84rem;
    }

    /* Adaptación del teléfono y prefijo internacional */
    .phone-group {
        gap: 6px;
    }

    .phone-prefix {
        width: 108px;
        padding: 11px 8px;
        font-size: 0.82rem;
        flex-shrink: 0;
    }

    .phone-group input[type="tel"] {
        flex: 1;
        min-width: 0;
    }

    /* Botón de envío a ancho completo */
    .btn-primary {
        width: 100%;
        padding: 13px 18px;
        font-size: 0.98rem;
        border-radius: 9px;
    }

    .alert-info, .cert-feature-card {
        padding: 12px 14px;
        font-size: 0.88rem;
    }

    .highlight {
        font-size: 1.15rem !important;
    }

    .social-links li {
        font-size: 0.88rem;
        word-break: break-word;
    }

    #left-event-image-wrap {
        margin-bottom: 18px;
    }

    #left-event-image-wrap img {
        max-height: 220px;
    }

    .ponentes-grid {
        grid-template-columns: 1fr;
        gap: 6px;
        max-height: 240px;
    }

    .ponente-item {
        padding: 6px 10px;
    }
}

@media (max-width: 400px) {
    .main-container {
        margin: 8px 4px;
        border-radius: 12px;
    }

    .details-section {
        padding: 20px 14px;
    }

    .form-section {
        padding: 20px 14px;
    }

    .evento-dynamic-title {
        font-size: 1.2rem !important;
    }

    .phone-prefix {
        width: 96px;
        font-size: 0.78rem;
        padding: 11px 6px;
    }

    .details-section h2 {
        font-size: 1.22rem;
    }
}

#left-event-desc, #event-description-rest {
    white-space: pre-line;
    overflow-wrap: anywhere;
}

#event-description-more {
    margin-bottom: 1.25rem;
}

#event-description-more summary {
    width: fit-content;
    padding-block: .35rem;
    color: #f3d58c;
    cursor: pointer;
    font-weight: 600;
}

#event-description-more .label-less,
#event-description-more[open] .label-more { display: none; }

#event-description-more[open] .label-less { display: inline; }
