/* =========================================
   EXTRAS: accesibilidad, formularios, errores
========================================= */

.skip-link {
    position: absolute;
    top: -60px;
    left: 12px;
    z-index: 1000;
    padding: 10px 16px;
    border-radius: 8px;
    background: var(--blue);
    color: #fff;
    font-weight: 700;
    transition: top 0.2s ease;
}

.skip-link:focus {
    top: 12px;
}

:focus-visible {
    outline: 2px solid var(--blue-light);
    outline-offset: 3px;
}

/* Navegación */
.nav-link.is-active {
    color: var(--text-main);
}

.nav-link.is-active::after {
    transform: scaleX(1);
}

a.language-switch {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    text-decoration: none;
}

.footer-contact a {
    color: var(--blue-light);
}

/* Formulario de contacto */
.contact-form {
    display: grid;
    gap: 16px;
    margin: 22px 0 32px;
}

.form-field {
    display: grid;
    gap: 8px;
}

.form-field span {
    color: var(--text-secondary);
    font-size: 13px;
    font-weight: 600;
}

.form-field input,
.form-field textarea {
    width: 100%;
    padding: 13px 14px;
    border: 1px solid var(--border);
    border-radius: var(--radius-small);
    background: rgba(255, 255, 255, 0.03);
    color: var(--text-main);
    font: inherit;
    font-size: 15px;
    transition: border-color 0.2s ease, background 0.2s ease;
}

.form-field textarea {
    resize: vertical;
    min-height: 120px;
}

.form-field input:focus,
.form-field textarea:focus {
    border-color: rgba(77, 184, 255, 0.6);
    background: rgba(77, 184, 255, 0.05);
    outline: none;
}

.contact-form .btn {
    width: 100%;
    border: 0;
    cursor: pointer;
}

.contact-form .btn:disabled {
    opacity: 0.6;
    cursor: wait;
}

.hp-field {
    position: absolute;
    left: -9999px;
    width: 1px;
    height: 1px;
    overflow: hidden;
}

.form-alert {
    margin: 18px 0 0;
    padding: 12px 14px;
    border-radius: var(--radius-small);
    border: 1px solid var(--border);
    font-size: 14px;
}

.form-alert.success {
    border-color: rgba(70, 200, 120, 0.4);
    background: rgba(70, 200, 120, 0.1);
    color: #8be9ad;
}

.form-alert.error {
    border-color: rgba(255, 90, 90, 0.4);
    background: rgba(255, 90, 90, 0.1);
    color: #ff9c9c;
}

/* Página de error */
.error-page {
    min-height: 60vh;
    display: flex;
    align-items: center;
}

.error-inner {
    text-align: center;
}

.error-code {
    margin: 0;
    font-size: clamp(72px, 16vw, 140px);
    font-weight: 900;
    line-height: 1;
    letter-spacing: -4px;
    background: linear-gradient(135deg, var(--blue), var(--cyan));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.error-inner h1 {
    margin: 12px 0 8px;
}

.error-desc {
    margin: 0 0 28px;
    color: var(--text-secondary);
}

/* Admin: formularios en línea y mensajes */
.inline-form {
    display: inline;
    margin: 0;
}

button.admin-btn {
    font: inherit;
    cursor: pointer;
}

.message-list {
    display: grid;
    gap: 16px;
    margin-top: 24px;
}

.message-card {
    padding: 20px;
    border: 1px solid var(--border);
    border-radius: var(--radius-medium);
    background: var(--bg-card);
}

.message-card.is-unread {
    border-color: rgba(77, 184, 255, 0.5);
}

.message-card header {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 8px 16px;
}

.message-card header strong {
    margin-right: 10px;
}

.message-card header a {
    color: var(--blue-light);
}

.message-card header small {
    color: var(--text-muted);
}

.message-body {
    margin: 14px 0;
    color: var(--text-secondary);
    overflow-wrap: anywhere;
}

.message-card footer {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

/* Textos largos y móviles */
.cms-rich-text p {
    margin: 0 0 1em;
    overflow-wrap: anywhere;
}

img {
    max-width: 100%;
    height: auto;
}

@media (max-width: 480px) {
    .contact-card {
        padding: 22px;
    }
}
