/* Variables */
:root {
    --blue-dark: #0A2B4E;
    --blue-mid: #0177bd;
    --white: #ffffff;
    --text-dark: #0d2137;
    --text-muted: #5a7a9a;
    --bg-section: #f4f8fc;
    --border: #dde8f3;
    --font-heading: 'Montserrat', sans-serif;
    --font-body: 'Inter', sans-serif;
}

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

body {
    font-family: var(--font-body);
    /*background: linear-gradient(135deg, #0177bd 0%, #0A2B4E 100%);*/
    min-height: 100dvh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px 16px;
    overflow-y: auto;
}

/* Wrapper & Card */
.page-wrapper {
    width: 100%;
    max-width: 560px;
}

.card {
    background: var(--white);
    border-radius: 20px;
    box-shadow: 0 24px 64px rgba(0, 0, 0, 0.35);
    overflow: hidden;
    animation: fade-up 0.8s cubic-bezier(0.16, 1, 0.3, 1) forwards;
    opacity: 0;
    transform: translateY(20px);
}

@keyframes fade-up {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Header */
.card-header {
    background: var(--blue-dark);
    padding: 24px;
    display: flex;
    justify-content: center;
    align-items: center;
}

.logo {
    height: 52px;
    width: auto;
}

/* Body */
.card-body {
    padding: 36px 32px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
    text-align: center;
}

/* Gear icon */
.icon-wrapper {
    width: 60px;
    height: 60px;
    background: #e4f0fb;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.gear-icon {
    width: 30px;
    height: 30px;
    color: var(--blue-mid);
    animation: spin-slow 8s linear infinite;
}

@keyframes spin-slow {
    100% { transform: rotate(360deg); }
}

/* Typography */
.main-title {
    font-family: var(--font-heading);
    font-size: 1.35rem;
    font-weight: 800;
    color: var(--text-dark);
    line-height: 1.2;
}

.subtitle {
    font-size: 0.875rem;
    color: var(--text-muted);
    line-height: 1.65;
    max-width: 420px;
}

.expected-time {
    font-size: 0.85rem;
    color: var(--text-muted);
    font-weight: 300;
}

/* Progress bar */
.progress-bar-container {
    width: 100%;
    height: 4px;
    background: #e2eaf2;
    border-radius: 10px;
    overflow: hidden;
    position: relative;
}

.progress-bar {
    width: 40%;
    height: 100%;
    background: linear-gradient(90deg, transparent, var(--blue-mid), transparent);
    position: absolute;
    left: -40%;
    animation: loading-bar 2s infinite ease-in-out;
}

@keyframes loading-bar {
    100% { left: 100%; }
}

/* Access sections */
.access-section {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 16px;
    background: var(--bg-section);
    border-radius: 12px;
    border: 1px solid var(--border);
}

.section-label {
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.07em;
    color: var(--text-muted);
}

/* Buttons — CSS Grid para distribución automática */
.btn-group {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
    gap: 8px;
}

.btn-nav {
    display: block;
    background: var(--blue-dark);
    color: #fff;
    text-decoration: none;
    padding: 11px 10px;
    border-radius: 8px;
    font-size: 0.82rem;
    font-weight: 600;
    text-align: center;
    white-space: nowrap;
    transition: background 0.2s ease, transform 0.15s ease;
}

.btn-nav:hover {
    background: var(--blue-mid);
    transform: translateY(-2px);
}

/* Contact */
.contact-section {
    display: flex;
    flex-direction: column;
    gap: 6px;
    font-size: 0.85rem;
    color: var(--text-muted);
}

.contact-section a {
    color: var(--blue-mid);
    font-weight: 600;
    text-decoration: none;
}

.contact-section a:hover {
    text-decoration: underline;
}

/* Footer */
.card-footer {
    background: var(--bg-section);
    border-top: 1px solid var(--border);
    padding: 16px 24px;
    text-align: center;
    font-size: 0.72rem;
    color: var(--text-muted);
    line-height: 1.5;
}

/* Responsive — móvil */
@media (max-width: 480px) {
    body {
        padding: 16px 12px;
        align-items: flex-start;
    }

    .card {
        border-radius: 16px;
    }

    .card-header {
        padding: 20px;
    }

    .logo {
        height: 42px;
    }

    .card-body {
        padding: 28px 20px;
        gap: 16px;
    }

    .main-title {
        font-size: 1.15rem;
    }

    .subtitle {
        font-size: 0.82rem;
    }

    .btn-nav {
        padding: 12px 8px;
        font-size: 0.8rem;
    }
}
