/* El Café con Nan - estilos compartidos del blog público */

:root {
    --bg-primary: #0E0D0B;
    --bg-secondary: #151411;
    --surface: #1A1814;
    --surface-soft: #211E18;
    --text-primary: #F5EFE3;
    --text-secondary: #D4C8B5;
    --accent-gold: #C7A86A;
    --link: #D4895F;
    --border: #5A4A32;
    --muted: #9B8F7C;
    --field: #151411;
    --btn-bg: linear-gradient(135deg, #6B5344 0%, #9B8B73 100%);
    --btn-bg-hover: linear-gradient(135deg, #7D6554 0%, #B0A08B 100%);
    --btn-text: #ffffff;
    --error: #f2b8b8;
}

html.light-theme {
    --bg-primary: #F5F0E7;
    --bg-secondary: #FBF8F1;
    --surface: #FFFDF8;
    --surface-soft: #F0E8DA;
    --text-primary: #27231F;
    --text-secondary: #625A50;
    --accent-gold: #735E43;
    --link: #A0522D;
    --border: #D8CBB7;
    --muted: #8B8175;
    --field: #FBF8F1;
    --error: #8b3a3a;
}

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

body {
    font-family: Arial, sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    transition: background-color 0.3s, color 0.3s;
}

a { color: var(--link); text-decoration: none; }

.container { max-width: 1200px; margin: 0 auto; padding: 40px 20px; }

.sr-only {
    position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
    overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}

/* Botón de tema claro/oscuro */
.theme-toggle {
    position: fixed; top: 20px; right: 20px; z-index: 1000;
    display: flex; align-items: center; justify-content: center;
    background: var(--btn-bg); color: #fff; border: none;
    padding: 10px 15px; border-radius: 20px; cursor: pointer; font-size: 16px;
}
.theme-toggle:hover { background: var(--btn-bg-hover); }
.theme-toggle img { height: 20px; width: auto; }

/* Cabecera de página */
.page-header {
    background: var(--surface);
    border-bottom: 2px solid var(--border);
    padding: 60px 40px;
    margin-bottom: 40px;
}
.page-header h1 { font-size: 40px; margin-bottom: 10px; }
.page-header p { color: var(--text-secondary); }

/* Controles */
.btn {
    display: inline-block; background: var(--btn-bg); color: var(--btn-text);
    border: none; border-radius: 6px; padding: 12px 24px; font: inherit; cursor: pointer; white-space: nowrap;
}
.btn:hover { background: var(--btn-bg-hover); }

.field {
    background: var(--field); color: var(--text-primary);
    border: 1px solid var(--border); border-radius: 6px; padding: 12px; font: inherit;
}
.field:focus, .btn:focus-visible, a:focus-visible { outline: 2px solid var(--link); outline-offset: 2px; }

.hp { position: absolute; left: -9999px; }

/* Newsletter */
.newsletter-section {
    background: var(--surface);
    padding: 40px; border-radius: 8px; text-align: center;
    border: 2px solid var(--border); margin-top: 80px;
}
.newsletter-section h3 { font-size: 24px; margin-bottom: 15px; }
.newsletter-section p { color: var(--text-secondary); margin-bottom: 20px; }
.newsletter-section .notice { margin-bottom: 10px; color: var(--link); }
.newsletter-section .notice.error { color: var(--error); }
.newsletter-form { display: flex; gap: 10px; max-width: 500px; margin: 0 auto; }
.newsletter-form .field { flex: 1; min-width: 0; }

/* Paginación */
.pagination { display: flex; justify-content: center; flex-wrap: wrap; gap: 8px; margin-top: 40px; list-style: none; }
.pagination a, .pagination span {
    display: inline-block; padding: 10px 15px; border-radius: 6px;
    background: var(--surface); border: 1px solid var(--border); color: var(--text-primary);
}
.pagination a:hover { background: var(--bg-secondary); }
.pagination .current { background: var(--btn-bg); color: #fff; border-color: transparent; }
.pagination .disabled { opacity: 0.5; }

@media (max-width: 600px) {
    .page-header { padding: 48px 20px; }
    .page-header h1 { font-size: 30px; }
    .newsletter-form { flex-direction: column; }
}

.btn-block { width: 100%; font-weight: bold; }
