/* ============================================================
   CSS VARIABLES — Maristas Mediterránea CandidatosPortal
   ============================================================ */
:root {
    --primary-gradient: linear-gradient(180deg, rgb(5, 39, 103) 0%, #3a0647 70%);
    --primary-gradient-135: linear-gradient(135deg, rgb(5, 39, 103) 0%, #3a0647 100%);
    --primary-blue: rgb(5, 39, 103);
    --primary-purple: #3a0647;
    --primary-blue-mid: #0d2d7a;
    --accent-blue: #1b6ec2;
    --accent-blue-hover: #1861ac;
    --accent-blue-light: #e3f2fd;
    --accent-purple-light: #f3e5f5;
    --accent-green-light: #e8f5e9;
    --accent-border-blue: #1976d2;
    --accent-border-purple: #7b1fa2;
    --accent-border-green: #388e3c;
    --text-primary: #1a1a2e;
    --text-secondary: #6c757d;
    --text-on-gradient: rgba(255, 255, 255, 0.9);
    --surface-white: #ffffff;
    --surface-light: #f8f9fa;
    --border-light: #dee2e6;
    --fieldset-accent: #0066cc;
    --radius-card: 12px;
    --radius-input: 6px;
    --shadow-card: 0 8px 32px rgba(5, 39, 103, 0.12);
    --shadow-card-hover: 0 12px 40px rgba(5, 39, 103, 0.2);
}

/* ============================================================
   BASE
   ============================================================ */
html,
body {
    font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
    color: var(--text-primary);
    background-color: var(--surface-white);
    background-image: none !important;
}

a,
.btn-link {
    color: var(--accent-blue);
}

/* ============================================================
   BOOTSTRAP OVERRIDES — aligned to brand colors
   ============================================================ */
.btn-primary {
    color: #fff;
    background-color: var(--accent-blue);
    border-color: var(--accent-blue-hover);
    border-radius: var(--radius-input);
    font-weight: 500;
    transition: background-color 0.2s ease, transform 0.1s ease;
}

.btn-primary:hover:not(:disabled) {
    background-color: var(--accent-blue-hover);
    border-color: var(--accent-blue-hover);
    transform: translateY(-1px);
}

.btn-primary:disabled {
    background-color: var(--accent-blue);
    border-color: var(--accent-blue-hover);
    opacity: 0.65;
}

.btn:focus,
.btn:active:focus,
.btn-link.nav-link:focus,
.form-control:focus,
.form-check-input:focus {
    box-shadow: 0 0 0 0.1rem white, 0 0 0 0.25rem #258cfb;
}

.form-control {
    border-radius: var(--radius-input);
    border: 1px solid var(--border-light);
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.form-control:focus {
    border-color: var(--accent-blue);
    box-shadow: 0 0 0 0.2rem rgba(27, 110, 194, 0.2);
}

.form-check-input:checked {
    background-color: var(--accent-blue);
    border-color: var(--accent-blue);
}

/* ============================================================
   LAYOUT UTILITIES
   ============================================================ */
.content {
    padding-top: 1.1rem;
}

h1:focus {
    outline: none;
}

.valid.modified:not([type=checkbox]) {
    outline: 1px solid #26b050;
}

.invalid {
    outline: 1px solid #e50000;
}

.validation-message {
    color: #e50000;
}

.blazor-error-boundary::after {
    content: "An error has occurred."
}

.darker-border-checkbox.form-check-input {
    border-color: #929292;
}

.form-floating>.form-control-plaintext::placeholder,
.form-floating>.form-control::placeholder {
    color: var(--bs-secondary-color);
    text-align: end;
}

.form-floating>.form-control-plaintext:focus::placeholder,
.form-floating>.form-control:focus::placeholder {
    text-align: start;
}

/* ============================================================
   PUBLIC PAGES — Auth forms (Login, Register)
   ============================================================ */

/* Split layout: gradient panel left + form right */
.auth-page-wrapper {
    min-height: 100vh;
    display: flex;
    align-items: stretch;
}

/* Left branding panel */
.auth-brand-panel {
    background: var(--primary-gradient);
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 3rem 2.5rem;
    color: white;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.auth-brand-panel::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle at 30% 40%, rgba(255,255,255,0.06) 0%, transparent 50%),
                radial-gradient(circle at 70% 80%, rgba(255,255,255,0.04) 0%, transparent 40%);
    pointer-events: none;
}

.auth-brand-logo {
    width: 72px;
    height: auto;
    margin-bottom: 1.5rem;
    filter: brightness(0) invert(1);
    position: relative;
    z-index: 1;
}

.auth-brand-title {
    font-size: 1.6rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    margin-bottom: 0.5rem;
    position: relative;
    z-index: 1;
}

.auth-brand-subtitle {
    font-size: 0.95rem;
    font-weight: 400;
    opacity: 0.85;
    line-height: 1.6;
    max-width: 280px;
    margin-bottom: 2.5rem;
    position: relative;
    z-index: 1;
}

.auth-brand-lema {
    font-size: 0.78rem;
    font-weight: 500;
    font-style: italic;
    background: linear-gradient(90deg, #fbbf24 0%, #f97316 30%, #ec4899 60%, #a78bfa 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    letter-spacing: 0.5px;
    position: relative;
    z-index: 1;
}

.auth-brand-badges {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    margin-top: 2rem;
    position: relative;
    z-index: 1;
}

.auth-brand-badge {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    font-size: 0.85rem;
    opacity: 0.9;
    text-align: left;
}

.auth-brand-badge-icon {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.15);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    font-size: 1rem;
}

/* Right form panel */
.auth-form-panel {
    background: var(--surface-white);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 3rem 2.5rem;
}

.auth-form-card {
    width: 100%;
    max-width: 420px;
}

/* Logo + title block */
.auth-card-header {
    margin-bottom: 2rem;
}

.auth-card-logo {
    width: 44px;
    height: auto;
    margin-bottom: 0.75rem;
}

.auth-form-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 0.375rem;
}

.auth-form-desc {
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin-bottom: 0;
}

.auth-form-card .form-label {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.35rem;
}

.auth-form-card .form-control {
    padding: 0.625rem 0.875rem;
    font-size: 0.95rem;
}

.auth-submit-btn {
    padding: 0.7rem 1rem;
    font-size: 1rem;
    font-weight: 600;
    border-radius: 8px;
    letter-spacing: 0.01em;
}

.auth-divider {
    text-align: center;
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin-top: 1.25rem;
}

.auth-divider a {
    color: var(--accent-blue);
    font-weight: 600;
    text-decoration: none;
}

.auth-divider a:hover {
    text-decoration: underline;
}

.auth-footer-note {
    text-align: center;
    margin-top: 1.5rem;
    font-size: 0.8rem;
    color: var(--text-secondary);
}

.auth-footer-note a {
    color: var(--accent-blue);
}

/* Mobile: formulario centrado, panel de fondo oculto (Bootstrap d-none d-md-flex lo gestiona) */
@media (max-width: 767.98px) {
    .auth-page-wrapper {
        align-items: center;
        justify-content: center;
        background: var(--surface-light);
        padding: 2rem 1rem;
    }

    .auth-form-panel {
        padding: 1.5rem 1rem;
        width: 100%;
        max-width: 460px;
    }

    .auth-form-card {
        background: var(--surface-white);
        border-radius: 16px;
        box-shadow: var(--shadow-card);
        padding: 2rem 1.5rem;
        max-width: 100%;
    }

    .auth-card-header {
        text-align: center;
    }

    .auth-form-title {
        font-size: 1.35rem;
    }
}

@media (max-width: 480px) {
    .auth-form-card {
        padding: 1.75rem 1.25rem;
        border-radius: 12px;
    }

    .auth-form-title {
        font-size: 1.25rem;
    }

    .auth-submit-btn {
        font-size: 0.95rem;
        padding: 0.65rem 1rem;
    }
}

/* ============================================================
   HOME PAGE — Public landing
   ============================================================ */
body {
    padding-top: 0;
    padding-bottom: 3rem;
}

.home-layout {
    padding-top: 3rem;
}

.home-main {
    padding: 0;
    margin: 0;
    background: transparent;
}

.home-main .content {
    padding: 0;
    background: transparent;
}

/* Hero section */
.hero-section {
    background: var(--primary-gradient);
    min-height: 80vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 5rem 1.5rem 4rem;
    position: relative;
    overflow: hidden;
}

.hero-section::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(ellipse at 20% 30%, rgba(255,255,255,0.07) 0%, transparent 55%),
                radial-gradient(ellipse at 80% 80%, rgba(255,255,255,0.04) 0%, transparent 40%);
    pointer-events: none;
}

.hero-logo {
    width: 64px;
    height: auto;
    filter: brightness(0) invert(1);
    margin-bottom: 1.5rem;
    position: relative;
    z-index: 1;
}

.hero-title {
    font-size: clamp(2rem, 5vw, 3.5rem);
    font-weight: 800;
    color: white;
    letter-spacing: -0.03em;
    line-height: 1.1;
    margin-bottom: 1rem;
    position: relative;
    z-index: 1;
}

.hero-subtitle {
    font-size: clamp(1rem, 2vw, 1.2rem);
    color: rgba(255, 255, 255, 0.85);
    max-width: 580px;
    margin: 0 auto 2.5rem;
    line-height: 1.7;
    position: relative;
    z-index: 1;
}

.hero-lema {
    font-size: 0.82rem;
    font-weight: 500;
    font-style: italic;
    background: linear-gradient(90deg, #fbbf24 0%, #f97316 30%, #ec4899 60%, #a78bfa 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    letter-spacing: 0.5px;
    margin-bottom: 2.5rem;
    position: relative;
    z-index: 1;
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.875rem;
    justify-content: center;
    position: relative;
    z-index: 1;
}

.hero-btn-primary {
    background: white;
    color: var(--primary-blue);
    border: 2px solid white;
    padding: 0.75rem 2rem;
    border-radius: 50px;
    font-weight: 700;
    font-size: 0.95rem;
    text-decoration: none;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.hero-btn-primary:hover {
    background: rgba(255,255,255,0.92);
    color: var(--primary-blue);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0,0,0,0.2);
    text-decoration: none;
}

.hero-btn-secondary {
    background: rgba(255,255,255,0.12);
    color: white;
    border: 2px solid rgba(255,255,255,0.45);
    padding: 0.75rem 2rem;
    border-radius: 50px;
    font-weight: 600;
    font-size: 0.95rem;
    text-decoration: none;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    backdrop-filter: blur(4px);
}

.hero-btn-secondary:hover {
    background: rgba(255,255,255,0.22);
    color: white;
    border-color: rgba(255,255,255,0.7);
    transform: translateY(-2px);
    text-decoration: none;
}

.hero-btn-outline {
    background: transparent;
    color: rgba(255,255,255,0.8);
    border: 1.5px solid rgba(255,255,255,0.3);
    padding: 0.75rem 1.5rem;
    border-radius: 50px;
    font-weight: 500;
    font-size: 0.875rem;
    text-decoration: none;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.hero-btn-outline:hover {
    background: rgba(255,255,255,0.1);
    color: white;
    border-color: rgba(255,255,255,0.6);
    text-decoration: none;
}

/* Values section */
.values-section {
    padding: 5rem 0;
    background: var(--surface-white);
}

.values-section .section-tag {
    display: inline-block;
    background: var(--accent-blue-light);
    color: var(--accent-blue);
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    padding: 0.3rem 0.75rem;
    border-radius: 20px;
    margin-bottom: 0.75rem;
}

.values-section .section-title {
    font-size: clamp(1.5rem, 3vw, 2rem);
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.values-section .section-desc {
    color: var(--text-secondary);
    font-size: 1rem;
    max-width: 520px;
    margin: 0 auto;
}

.value-card {
    text-align: center;
    padding: 1.75rem 1rem;
    border-radius: var(--radius-card);
    transition: box-shadow 0.2s ease, transform 0.2s ease;
}

.value-card:hover {
    box-shadow: var(--shadow-card);
    transform: translateY(-3px);
}

.value-card-img-wrap {
    width: 88px;
    height: 88px;
    border-radius: 50%;
    overflow: hidden;
    margin: 0 auto 1rem;
    border: 3px solid var(--accent-blue-light);
}

.value-card-img-wrap img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.value-card h3 {
    font-size: 1.05rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.value-card p {
    font-size: 0.875rem;
    color: var(--text-secondary);
    line-height: 1.65;
    margin: 0;
}

/* CTA strip */
.cta-section {
    background: var(--surface-light);
    border-top: 1px solid var(--border-light);
    border-bottom: 1px solid var(--border-light);
    padding: 4rem 0;
    text-align: center;
}

.cta-section h2 {
    font-size: clamp(1.4rem, 3vw, 2rem);
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 0.75rem;
}

.cta-section .lead {
    color: var(--text-secondary);
    font-size: 1rem;
    max-width: 560px;
    margin: 0 auto 2rem;
    line-height: 1.7;
}

/* Contact cards */
.contact-section {
    padding: 3rem 0 2rem;
}

.contact-card {
    border: 1px solid var(--border-light);
    border-radius: var(--radius-card);
    padding: 1.5rem 1.75rem;
    background: var(--surface-white);
    transition: box-shadow 0.2s ease;
    height: 100%;
    position: relative;
}

.contact-card:hover {
    box-shadow: var(--shadow-card);
}

.contact-card .contact-label {
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    margin-bottom: 0.5rem;
    display: block;
}

.contact-card p {
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
}

.contact-card a {
    font-weight: 600;
    font-size: 0.9rem;
    text-decoration: none;
    word-break: break-all;
}

.contact-card a:hover {
    text-decoration: underline;
}

/* Legacy compatibility */
.h-md-250 {
    min-height: 250px;
}

.stretched-link::after {
    position: absolute;
    top: 0; right: 0; bottom: 0; left: 0;
    z-index: 1;
    content: "";
}

/* Marketing / Featurette sections */
.marketing {
    padding-top: 3rem;
    padding-bottom: 3rem;
}

.marketing .col-lg-4 {
    margin-bottom: 1.5rem;
    text-align: center;
}

.marketing h2 {
    font-weight: 400;
    margin-top: 1rem;
    margin-bottom: 1rem;
}

.marketing .col-lg-4 p {
    margin-right: .75rem;
    margin-left: .75rem;
}

.bd-placeholder-img {
    object-fit: cover;
}

.bd-placeholder-img.rounded-circle {
    border-radius: 50%;
    object-fit: cover;
}

.featurette-divider {
    margin: 3rem 0;
}

.featurette-heading {
    font-weight: 300;
    line-height: 1;
    letter-spacing: -.05rem;
}

.featurette .lead {
    font-size: 1.125rem;
}

/* Footer */
footer {
    font-size: 0.875rem;
}

footer h5 {
    margin-bottom: 0.75rem;
    font-size: 1rem;
}

footer .list-unstyled li {
    margin-bottom: 0.25rem;
}

footer .link-secondary {
    color: var(--text-secondary);
    text-decoration: none;
}

footer .link-secondary:hover {
    color: var(--accent-blue);
    text-decoration: underline;
}

/* ============================================================
   RADZEN DATAGRID — Responsive wrapper
   ============================================================ */
.grid-scroll-wrapper {
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    border-radius: 4px;
}

@media (max-width: 640.98px) {
    /* Reduce padding inside grid cells on mobile */
    .grid-scroll-wrapper .rz-grid-table td,
    .grid-scroll-wrapper .rz-grid-table th {
        padding: 0.5rem 0.625rem !important;
        font-size: 0.875rem;
    }

    /* Tabs más compactos en móvil */
    .rz-tabview .rz-tabview-nav .rz-tabview-nav-link {
        padding: 0.5rem 0.75rem !important;
        font-size: 0.825rem !important;
    }
}

/* ============================================================
   DATOS PERSONALES — Scoped utility classes
   ============================================================ */
.foto-container {
    width: 120px;
    height: 120px;
    border-radius: 8px;
    overflow: hidden;
    background: #f5f5f5;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.foto-container-edit {
    width: 150px;
    height: 150px;
    border-radius: 8px;
    overflow: hidden;
    background: #f5f5f5;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px dashed #ccc;
    margin-bottom: 1rem;
}

.foto-container img,
.foto-container-edit img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.foto-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 100%;
}

.centro-tag {
    padding: 0.5rem 1rem;
    border-radius: 4px;
    border-left-width: 4px;
    border-left-style: solid;
}

.centro-tag-colegio {
    background: var(--accent-blue-light);
    border-left-color: var(--accent-border-blue);
}

.centro-tag-social {
    background: var(--accent-purple-light);
    border-left-color: var(--accent-border-purple);
}

.centro-tag-pas {
    background: var(--accent-green-light);
    border-left-color: var(--accent-border-green);
}

.centro-tag-edit {
    padding: 0.5rem 0.75rem;
    border-radius: 4px;
    border-left-width: 4px;
    border-left-style: solid;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.centro-add-row {
    display: flex;
    gap: 0.5rem;
}

.centro-chips-wrap {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.rz-fieldset-section {
    border-top: 2px solid var(--fieldset-accent);
    padding-top: 1rem;
}

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (min-width: 40em) {
    .featurette-heading {
        font-size: 50px;
    }
}

@media (min-width: 62em) {
    .featurette-heading {
        margin-top: 2rem;
    }
}

/* Practicas toggle card */
.practicas-toggle {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 1rem 1.1rem;
    background: var(--surface-light);
    border: 1.5px solid var(--border-light);
    border-radius: 10px;
    transition: border-color 0.2s, background 0.2s, box-shadow 0.2s;
    user-select: none;
}

.practicas-toggle:hover {
    border-color: var(--accent-blue);
    box-shadow: 0 0 0 3px rgba(27, 110, 194, 0.1);
}

.practicas-toggle.active {
    border-color: var(--accent-blue);
    background: rgba(27, 110, 194, 0.06);
}

.practicas-toggle-content {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.practicas-icon {
    font-size: 1.4rem;
    color: var(--accent-blue);
    flex-shrink: 0;
}

.practicas-switch {
    flex-shrink: 0;
}

@media (max-width: 768px) {
    .marketing h2 {
        font-size: 1.5rem;
    }

    .featurette-heading {
        font-size: 1.75rem;
    }

    .hero-actions {
        flex-direction: column;
        align-items: center;
    }

    .hero-btn-primary,
    .hero-btn-secondary,
    .hero-btn-outline {
        width: 100%;
        max-width: 300px;
        justify-content: center;
    }
}
