:root {
    --primary-color: #252850;
    --secondary-color: #FFC107;
    --accent-color: #FFA000;
    --text-color: #333333;
    --light-bg: #f7f9fc;
    --white: #ffffff;
    --gray: #e0e0e0;
    --dark-gray: #666666;
    --success-color: #2e7d32;
    --error-color: #d32f2f;
    --transition: all 0.25s ease;
}

*, *::before, *::after {
    box-sizing: border-box;
}

body, html {
    margin: 0;
    padding: 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    line-height: 1.6;
    color: var(--text-color);
    background-color: var(--light-bg);
    overflow-x: hidden;
}

.container {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    width: 100%;
}


.simple-header {
    background-color: var(--primary-color);
    padding: 1.5rem 1rem;
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
    width: 100%;
}

.logos-grid {
    display: flex;
    align-items: center;
    justify-content: space-evenly;
    flex-wrap: nowrap; 
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    gap: 25px;
}

.logo-item {
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: none;
    box-shadow: none;
    padding: 0;
    flex: 1 1 0px;
    min-width: 0;
    transition: transform 0.2s ease;
}

.logo-item:hover {
    transform: scale(1.06);
}

.logo-item img {
    height: 90px; 
    max-width: 100%;
    width: auto;
    object-fit: contain;
    background: transparent;
    display: block;
}

.logo-text-placeholder {
    color: rgba(255, 255, 255, 0.4);
    font-size: 0.85rem;
    font-weight: 600;
    text-align: center;
    user-select: none;
}

main {
    flex: 1;
    padding: 1rem;
    width: 100%;
}

.form-section {
    max-width: 780px;
    width: 100%;
    margin: 1.5rem auto 2.5rem;
}

/* Banner de Bienvenida con Mascota */
.welcome-banner {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 24px;
    background: linear-gradient(135deg, #ffffff 0%, #f4f7fb 100%);
    padding: 1.6rem 2rem;
    border-radius: 16px;
    margin-bottom: 2rem;
    box-shadow: 0 4px 16px rgba(37, 40, 80, 0.06);
    border: 1px solid #e5ebf3;
}

.banner-mascot {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.mascot-img {
    height: 155px;
    width: auto;
    object-fit: contain;
    filter: drop-shadow(0 6px 12px rgba(0, 0, 0, 0.12));
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.mascot-img:hover {
    transform: scale(1.05) rotate(2deg);
}

.banner-text {
    flex: 1;
    text-align: left;
}

.header-title {
    color: var(--primary-color);
    margin: 0 0 0.3rem;
    font-size: 1.8rem;
    font-weight: 800;
    letter-spacing: 0.5px;
    line-height: 1.2;
}

.sub-title {
    color: var(--accent-color);
    margin: 0 0 0.6rem;
    font-size: 1.2rem;
    font-weight: 700;
}

.form-intro {
    color: var(--dark-gray);
    margin: 0;
    font-size: 0.95rem;
    line-height: 1.5;
}

form {
    background: var(--white);
    padding: 2.2rem;
    border-radius: 12px;
    box-shadow: 0 4px 18px rgba(0,0,0,0.06);
    border: 1px solid #edf0f5;
}

fieldset {
    border: 1px solid var(--gray);
    border-radius: 8px;
    padding: 1.5rem;
    margin-bottom: 1.8rem;
    background: #fff;
}

legend {
    padding: 0 10px;
    font-weight: 700;
    color: var(--primary-color);
    font-size: 1.15rem;
}

.form-group {
    margin-bottom: 1.3rem;
}

label {
    display: block;
    margin-bottom: 0.45rem;
    font-weight: 600;
    color: var(--primary-color);
    font-size: 0.95rem;
}

.required::after {
    content: " *";
    color: var(--error-color);
}

.optional {
    color: var(--dark-gray);
    font-weight: normal;
    font-size: 0.85rem;
}

input[type="text"],
input[type="number"],
input[type="tel"],
input[type="email"],
select,
textarea {
    width: 100%;
    padding: 11px 14px;
    border: 1px solid #cfd8dc;
    border-radius: 6px;
    font-size: 0.95rem;
    color: var(--text-color);
    background-color: #fff;
    transition: var(--transition);
    outline: none;
}

input:focus,
select:focus,
textarea:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(37, 40, 80, 0.12);
}

textarea {
    resize: vertical;
    min-height: 100px;
}

.radio-group {
    display: flex;
    gap: 0.8rem;
    margin-top: 0.5rem;
    flex-wrap: wrap;
}

.radio-option {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 9px 16px;
    background: #f1f3f6;
    border-radius: 20px;
    cursor: pointer;
    font-size: 0.92rem;
    user-select: none;
    transition: var(--transition);
}

.radio-option:hover {
    background: #e2e6eb;
}

.radio-input {
    margin: 0;
    cursor: pointer;
    accent-color: var(--primary-color);
}

.conditional-section {
    display: none;
    animation: fadeIn 0.25s ease-in-out;
}

.sub-panel {
    background: #f8fafc;
    border-left: 3px solid var(--accent-color);
    padding: 14px;
    border-radius: 6px;
    margin-bottom: 1.2rem;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(-5px); }
    to { opacity: 1; transform: translateY(0); }
}

.session-info-box {
    background: #f0f4f9;
    border-left: 4px solid var(--primary-color);
    padding: 14px 18px;
    border-radius: 6px;
    margin-bottom: 1.2rem;
}

.session-info-box h4 {
    margin: 0 0 8px 0;
    color: var(--primary-color);
    font-size: 0.96rem;
}

.session-info-box ul {
    margin: 0;
    padding-left: 20px;
}

.session-info-box li {
    margin-bottom: 5px;
    font-size: 0.9rem;
}

.session-note {
    margin: 8px 0 0;
    font-size: 0.85rem;
    color: var(--dark-gray);
}

.notice-privacy {
    background: #fbfbfb;
    border: 1px solid var(--gray);
    padding: 14px;
    border-radius: 6px;
    font-size: 0.87rem;
    color: #555;
    line-height: 1.5;
    margin-bottom: 1.2rem;
}

.checkbox-container {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin-bottom: 12px;
    cursor: pointer;
    font-size: 0.91rem;
    line-height: 1.4;
    user-select: none;
}

.checkbox-container input[type="checkbox"] {
    width: 18px;
    height: 18px;
    margin-top: 2px;
    cursor: pointer;
    accent-color: var(--primary-color);
    flex-shrink: 0;
}

.counter-badge {
    font-size: 0.8rem;
    color: var(--dark-gray);
    text-align: right;
    margin-top: 4px;
}

.form-actions {
    margin-top: 1.8rem;
    text-align: center;
}

.submit-button {
    background-color: var(--primary-color);
    color: var(--white);
    border: none;
    padding: 14px 35px;
    font-size: 1.05rem;
    font-weight: 700;
    border-radius: 30px;
    cursor: pointer;
    transition: var(--transition);
    display: inline-block;
    width: 100%;
    max-width: 280px;
    box-shadow: 0 4px 12px rgba(37, 40, 80, 0.25);
}

.submit-button:hover:not(:disabled) {
    background-color: var(--accent-color);
    color: #fff;
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(255, 160, 0, 0.35);
}

.submit-button:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

.alert-message {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    padding: 13px 22px;
    border-radius: 8px;
    color: white;
    font-weight: 600;
    font-size: 0.93rem;
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
    z-index: 9999;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
    max-width: 90%;
    text-align: center;
}

.alert-message.show {
    opacity: 1;
    visibility: visible;
}

/* Modal Exitoso Profesional */
.modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(16, 20, 45, 0.75);
    backdrop-filter: blur(4px);
    z-index: 10000;
    align-items: center;
    justify-content: center;
    padding: 16px;
}

.modal-success-pro {
    background: #ffffff;
    border-radius: 20px;
    max-width: 520px;
    width: 100%;
    padding: 30px 26px 26px;
    text-align: center;
    box-shadow: 0 20px 45px rgba(0, 0, 0, 0.28);
    border: 1px solid rgba(255, 255, 255, 0.9);
    position: relative;
    animation: modalPopIn 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
    max-height: 90vh;
    overflow-y: auto;
}

@keyframes modalPopIn {
    from { opacity: 0; transform: scale(0.85); }
    to { opacity: 1; transform: scale(1); }
}

.modal-mascot-wrapper {
    display: flex;
    justify-content: center;
    margin-top: -10px;
    margin-bottom: 10px;
}

.modal-mascot-img {
    height: 170px;
    width: auto;
    object-fit: contain;
    filter: drop-shadow(0 8px 16px rgba(0, 0, 0, 0.15));
    animation: floatMascot 2.5s ease-in-out infinite alternate;
}

@keyframes floatMascot {
    from { transform: translateY(0px); }
    to { transform: translateY(-8px); }
}

.modal-badge-success {
    display: inline-block;
    background: #e8f5e9;
    color: #2e7d32;
    padding: 4px 14px;
    font-size: 0.78rem;
    font-weight: 800;
    border-radius: 20px;
    letter-spacing: 0.8px;
    margin-bottom: 8px;
    border: 1px solid #c8e6c9;
}

.modal-success-pro h2 {
    color: var(--primary-color);
    font-size: 1.45rem;
    font-weight: 800;
    margin: 0 0 8px 0;
}

.modal-lead {
    color: #444;
    font-size: 0.95rem;
    line-height: 1.45;
    margin: 0 0 14px 0;
}

.modal-steps-box {
    background: #f7f9fd;
    border: 1px solid #e1e8f2;
    border-left: 4px solid var(--accent-color);
    border-radius: 10px;
    padding: 12px 16px;
    text-align: left;
    margin-bottom: 14px;
}

.modal-steps-box h4 {
    margin: 0 0 6px 0;
    color: var(--primary-color);
    font-size: 0.92rem;
    font-weight: 700;
}

.modal-steps-box ul {
    margin: 0;
    padding-left: 18px;
}

.modal-steps-box li {
    font-size: 0.86rem;
    color: #555;
    margin-bottom: 5px;
    line-height: 1.4;
}

.modal-foot-note {
    font-size: 0.88rem;
    color: var(--primary-color);
    font-weight: 600;
    margin: 0 0 16px 0;
}

.btn-modal-pro {
    background: linear-gradient(135deg, var(--primary-color) 0%, #373b6b 100%);
    color: white;
    padding: 12px 36px;
    border: none;
    border-radius: 30px;
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    box-shadow: 0 6px 16px rgba(37, 40, 80, 0.25);
    transition: var(--transition);
    display: inline-block;
}

.btn-modal-pro:hover {
    background: linear-gradient(135deg, var(--accent-color) 0%, #ff8f00 100%);
    color: #fff;
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(255, 160, 0, 0.35);
}

/* Footer */
footer {
    background: var(--primary-color);
    color: white;
    text-align: center;
    padding: 1.8rem 1rem;
    margin-top: auto;
}

footer p {
    margin: 0 0 8px 0;
    font-size: 0.88rem;
}

footer h3 {
    margin: 12px 0 8px 0;
    font-size: 1rem;
    color: var(--secondary-color);
}

.social-links {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 16px;
    margin-top: 6px;
}

.social-links a {
    color: #ffffff;
    font-size: 1.4rem;
    text-decoration: none;
    transition: var(--transition);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
}

.social-links a:hover {
    color: var(--primary-color);
    background: var(--secondary-color);
    transform: translateY(-3px);
}

@media (max-width: 900px) {
    .logos-grid {
        gap: 15px;
    }

    .logo-item img {
        height: 65px;
    }
}

@media (max-width: 768px) {
    .simple-header {
        padding: 0.8rem 0.4rem;
    }

    .logos-grid {
        flex-wrap: nowrap !important; 
        gap: 8px;
        justify-content: space-between;
    }

    .logo-item img {
        height: 48px;
        max-width: 100%;
    }

    .logo-text-placeholder {
        font-size: 0.7rem;
    }

    .form-section {
        margin: 0.8rem auto 1.5rem;
    }

    .welcome-banner {
        flex-direction: column;
        text-align: center;
        padding: 1.3rem 1.2rem;
        gap: 14px;
        margin-bottom: 1.4rem;
    }

    .banner-text {
        text-align: center;
    }

    .mascot-img {
        height: 120px;
    }

    .header-title {
        font-size: 1.4rem;
    }

    .sub-title {
        font-size: 1.1rem;
    }

    form {
        padding: 1.2rem 1rem;
        border-radius: 8px;
    }

    fieldset {
        padding: 1rem 0.8rem;
        margin-bottom: 1.3rem;
    }

    legend {
        font-size: 1.02rem;
    }

    .radio-group {
        flex-direction: column;
        gap: 0.5rem;
    }

    .radio-option {
        width: 100%;
        box-sizing: border-box;
    }
}

@media (max-width: 480px) {
    .simple-header {
        padding: 0.6rem 0.2rem;
    }

    .logos-grid {
        flex-wrap: nowrap !important;
        gap: 5px;
    }

    .logo-item img {
        height: 38px;
    }

    .logo-text-placeholder {
        font-size: 0.6rem;
    }
}

@media (max-width: 360px) {
    .logos-grid {
        gap: 3px;
    }

    .logo-item img {
        height: 30px;
    }

    .logo-text-placeholder {
        font-size: 0.52rem;
    }
}
