:root {
    --burgundy: #611232;
    --blue: #0B3D91;
    --blue-dark: #061E45;
    --blue-mid: #123B73;
    --blue-soft: #EAF1FF;
    --gold: #D4AF37;
    --white: #FFFFFF;
    --bg: #F4F7FB;
    --text: #172033;
    --muted: #667085;
    --border: #DFE7F2;
    --success-soft: #DCFCE7;
    --danger-soft: #FEE2E2;
    --shadow: 0 24px 70px rgba(15, 23, 42, 0.12);
    --shadow-strong: 0 34px 90px rgba(15, 23, 42, 0.18);
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    background: var(--bg);
    color: var(--text);
    font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

a {
    text-decoration: none;
    color: inherit;
}

button,
input,
textarea,
select {
    font: inherit;
}

button {
    border: 0;
    cursor: pointer;
}

.container {
    width: min(100% - 48px, 1240px);
    margin: 0 auto;
}

.gov-bar {
    background: var(--burgundy);
    color: var(--white);
}

.gov-content {
    min-height: 62px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.gov-brand img {
    height: 42px;
}

.gov-links {
    display: flex;
    align-items: center;
    gap: 26px;
    font-weight: 900;
}

.icon-button {
    width: 36px;
    height: 36px;
    border-radius: 8px;
    background: rgba(255, 255, 255, .16);
    color: var(--white);
    display: grid;
    place-items: center;
}

.register-page {
    min-height: calc(100vh - 62px);
    display: grid;
    grid-template-columns: 1.05fr .95fr;
}

/* RENDERING Y CONTROL DE PARPADEO EN PANEL IZQUIERDO */
.visual-panel {
    position: relative;
    overflow: hidden;
    background: radial-gradient(circle at top right, rgba(212, 175, 55, .18), transparent 32%), linear-gradient(135deg, var(--blue-dark), var(--blue-mid));
    color: var(--white);
    padding: clamp(28px, 5vw, 60px);
    -webkit-backface-visibility: hidden;
    backface-visibility: hidden;
    transform: translate3d(0, 0, 0);
    will-change: transform;
}

.orb {
    position: absolute;
    border-radius: 999px;
    filter: blur(12px);
    opacity: .35;
    pointer-events: none;
    transform: translateZ(0);
}

.orb-one {
    width: 520px;
    height: 520px;
    background: rgba(212, 175, 55, .25);
    top: -140px;
    right: -140px;
}

.orb-two {
    width: 480px;
    height: 480px;
    background: rgba(255, 255, 255, .15);
    bottom: -140px;
    left: -140px;
}

.visual-content {
    position: relative;
    z-index: 2;
    max-width: 760px;
    backface-visibility: hidden;
}

.back-link,
.pill {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    border-radius: 999px;
    font-weight: 950;
}

.back-link {
    background: rgba(255, 255, 255, .12);
    padding: 9px 13px;
    margin-bottom: 34px;
}

.brand-block {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 60px;
}

.brand-badge {
    width: 64px;
    height: 64px;
    border-radius: 22px;
    background: var(--gold);
    color: var(--blue-dark);
    display: grid;
    place-items: center;
    font-weight: 950;
    font-size: 20px;
}

.brand-block strong,
.brand-block span {
    display: block;
}

.brand-block strong {
    font-size: 22px;
}

.brand-block span {
    color: #D8E2F0;
}

.pill {
    color: var(--gold);
    background: rgba(255, 255, 255, .13);
    padding: 9px 14px;
    margin-bottom: 20px;
}

.hero-copy h1 {
    font-size: clamp(40px, 6vw, 76px);
    line-height: .96;
    letter-spacing: -.06em;
    margin-bottom: 20px;
    backface-visibility: hidden;
}

.hero-copy p {
    color: #D8E2F0;
    line-height: 1.7;
    max-width: 700px;
}

.feature-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 14px;
    margin-top: 42px;
}

.feature-grid article {
    background: rgba(255, 255, 255, 0.10);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 22px;
    padding: 18px;
    transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1), background 0.25s ease, box-shadow 0.25s ease;
    will-change: transform;
    backface-visibility: hidden;
    transform: translateZ(0);
}

.feature-grid article:hover {
    background: rgba(255, 255, 255, 0.22);
    transform: translateY(-6px) translateZ(0);
    box-shadow: 0 16px 36px rgba(0, 0, 0, 0.2);
}

.feature-grid span {
    color: var(--gold);
    font-size: 34px;
}

.feature-grid strong,
.feature-grid small {
    display: block;
}

.feature-grid small {
    color: #D8E2F0;
    margin-top: 4px;
}

.form-panel {
    padding: clamp(28px, 5vw, 60px);
    display: grid;
    align-content: center;
    background: var(--bg);
}

.register-card {
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: 34px;
    padding: clamp(26px, 4vw, 42px);
    box-shadow: var(--shadow-strong);
}

.card-heading {
    margin-bottom: 24px;
}

.card-heading > span {
    width: 58px;
    height: 58px;
    border-radius: 20px;
    background: var(--blue-soft);
    color: var(--blue);
    display: grid;
    place-items: center;
    font-size: 34px;
    margin-bottom: 16px;
}

.card-heading h2 {
    color: var(--blue-dark);
    font-size: 34px;
    letter-spacing: -.035em;
}

.card-heading p {
    color: var(--muted);
    line-height: 1.6;
    margin-top: 6px;
}

.teacher-type-notice {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    background: radial-gradient(circle at top right, rgba(212, 175, 55, 0.18), transparent 28%), var(--blue-soft);
    border: 1px solid rgba(11, 61, 145, 0.14);
    border-radius: 22px;
    padding: 16px;
    margin-bottom: 22px;
}

.teacher-type-notice .notice-icon {
    width: 46px;
    height: 46px;
    border-radius: 16px;
    background: var(--white);
    color: var(--blue);
    display: grid;
    place-items: center;
    flex: 0 0 auto;
    box-shadow: 0 10px 24px rgba(11, 61, 145, 0.08);
}

.teacher-type-notice .notice-icon span {
    font-size: 28px;
}

.teacher-type-notice strong {
    display: block;
    color: var(--blue-dark);
    font-weight: 950;
    margin-bottom: 4px;
}

.teacher-type-notice p {
    color: var(--muted);
    line-height: 1.55;
    font-size: 14px;
}

.register-form {
    display: grid;
    gap: 18px;
}

.form-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
    align-items: start;
}

.form-group {
    display: grid;
    gap: 8px;
}

.form-group label {
    color: var(--blue-dark);
    font-weight: 900;
    line-height: 1.25;
}

.input-shell {
    min-height: 52px;
    display: flex;
    align-items: center;
    gap: 10px;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: 18px;
    padding: 0 14px;
    transition: all 0.2s ease;
}

.input-shell span {
    color: var(--blue);
    flex-shrink: 0;
    font-size: 22px;
}

.input-shell input {
    width: 100%;
    border: 0;
    outline: none;
    background: transparent;
    font-size: 14px;
    color: var(--text);
    font-weight: 500;
}

.input-shell:focus-within {
    border-color: var(--blue);
    background: var(--white);
    box-shadow: 0 0 0 4px rgba(11, 61, 145, 0.12);
}

/* CUSTOM SELECT */
.custom-select {
    position: relative;
    user-select: none;
    outline: none;
}

.select-trigger {
    min-height: 52px;
    display: flex;
    align-items: center;
    gap: 10px;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: 18px;
    padding: 0 14px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.select-trigger .material-symbols-rounded {
    color: var(--blue);
    font-size: 22px;
    flex-shrink: 0;
}

.selected-text {
    flex: 1;
    font-size: 14px;
    font-weight: 600;
    color: var(--text);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.selected-text.placeholder {
    color: #7A8496;
    font-weight: 500;
}

.select-arrow {
    transition: transform 0.25s ease;
}

.custom-select:focus .select-trigger,
.custom-select.open .select-trigger {
    border-color: var(--blue);
    background: var(--white);
    box-shadow: 0 0 0 4px rgba(11, 61, 145, 0.12);
}

.custom-select.open .select-arrow {
    transform: rotate(180deg);
}

.select-dropdown {
    position: absolute;
    top: calc(100% + 6px);
    left: 0;
    right: 0;
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: 18px;
    box-shadow: var(--shadow);
    z-index: 50;
    overflow: hidden;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-8px);
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.custom-select.open .select-dropdown {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.select-dropdown ul {
    list-style: none;
    padding: 6px;
    margin: 0;
    max-height: 240px;
    overflow-y: auto;
}

.select-dropdown li {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 14px;
    border-radius: 12px;
    font-size: 14px;
    font-weight: 600;
    color: var(--text);
    cursor: pointer;
    transition: background 0.15s ease, color 0.15s ease;
}

.select-dropdown li .option-icon {
    font-size: 18px;
    color: var(--muted);
}

.select-dropdown li:hover {
    background: var(--blue-soft);
    color: var(--blue);
}

.select-dropdown li:hover .option-icon {
    color: var(--blue);
}

.select-dropdown li.selected {
    background: var(--blue);
    color: var(--white);
}

.select-dropdown li.selected .option-icon {
    color: var(--gold);
}

.full {
    grid-column: 1 / -1;
}

.form-group small {
    color: var(--muted);
    line-height: 1.45;
    font-size: 13px;
}

.toggle-password {
    background: transparent;
    padding: 4px;
    display: grid;
    place-items: center;
    color: var(--blue);
    cursor: pointer;
    flex-shrink: 0;
}

.toggle-password span {
    font-size: 20px;
}

.primary-button,
.secondary-button {
    margin-top: 14px;
    min-height: 50px;
    border-radius: 999px;
    width: 100%;
    display: inline-flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    font-weight: 950;
    transition: .2s ease;
}

.primary-button {
    background: var(--blue);
    color: var(--white);
}

.secondary-button {
    background: var(--blue-soft);
    color: var(--blue);
}

.primary-button span,
.secondary-button span {
    font-size: 22px;
}

.primary-button:hover,
.secondary-button:hover {
    transform: translateY(-2px);
}

.register-alert {
    margin-top: 18px;
    padding: 14px 16px;
    border-radius: 16px;
    font-weight: 850;
    line-height: 1.5;
}

.register-alert.success {
    background: var(--success-soft);
    color: #166534;
}

.register-alert.error {
    background: var(--danger-soft);
    color: #991B1B;
}

.hidden {
    display: none !important;
}

/* FOOTER GOBIERNO */
.gov-footer {
    background: var(--burgundy);
    color: var(--white);
    padding: 40px 0 30px;
}

.gov-footer-container {
    display: grid;
    grid-template-columns: 1fr 1fr 1.2fr 1.2fr;
    gap: 30px;
}

.gov-footer-logo {
    max-width: 180px;
}

.gov-footer-col h3 {
    font-size: 16px;
    font-weight: 700;
    margin-bottom: 16px;
}

.gov-footer-col p {
    font-size: 13px;
    line-height: 1.5;
    color: #E2E8F0;
    margin-bottom: 12px;
}

.gov-footer-col ul {
    list-style: none;
}

.gov-footer-col ul li {
    margin-bottom: 8px;
}

.gov-footer-col a {
    font-size: 13px;
    color: #E2E8F0;
    transition: color 0.2s ease;
}

.gov-footer-col a:hover {
    color: var(--gold);
    text-decoration: underline;
}

.footer-link-bold {
    font-weight: 700;
    display: inline-block;
    margin-bottom: 18px;
    text-decoration: underline !important;
}

.social-block {
    margin-bottom: 24px;
}

.social-block span {
    display: block;
    font-size: 13px;
    font-weight: 700;
    margin-bottom: 10px;
}

.social-icons {
    display: flex;
    gap: 14px;
    align-items: center;
}

.social-icons a {
    display: grid;
    place-items: center;
    color: var(--white);
}

.social-icons .material-symbols-rounded {
    font-size: 26px;
}

/* BADGE LÍNEA TELEFÓNICA 079 EXACTO A LA SEGUNDA FOTO */
.gov-079-badge {
    display: flex;
    align-items: center;
    gap: 12px;
    color: var(--white);
    margin-top: 10px;
}

.flower-icon-079 {
    flex-shrink: 0;
}

.num-079 {
    font-size: 34px;
    font-weight: 800;
    letter-spacing: -0.01em;
    line-height: 1;
    font-family: Arial, Helvetica, sans-serif;
}

.text-079 {
    font-size: 13px;
    line-height: 1.25;
    font-weight: 600;
    color: var(--white);
    margin-left: 4px;
}

@media (max-width: 980px) {
    .register-page {
        grid-template-columns: 1fr;
    }
    
    .gov-footer-container {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 640px) {
    .container {
        width: min(100% - 28px, 1240px);
    }

    .gov-brand img {
        height: 34px;
    }

    .gov-links {
        gap: 14px;
        font-size: 14px;
    }

    .form-grid,
    .feature-grid,
    .gov-footer-container {
        grid-template-columns: 1fr;
    }

    .visual-panel,
    .form-panel {
        padding: 24px;
    }

    .register-card {
        border-radius: 24px;
    }

    .teacher-type-notice {
        display: grid;
        padding: 15px;
        border-radius: 18px;
    }
}