:root {
    --color-primary: #0f4c45;
    --color-secondary: #9e1b34;
    --color-background: #f8f9fa;
    --color-header-bg: #c39c5b;
    --color-button-bg: #9e1b34;
    --color-button-hover: #7d162a;
    --color-white: #ffffff;

    --font-base: 'Arial', sans-serif;

    --font-size-base: 14px;
    --font-size-sm: 12px;
    --font-size-lg: 16px;
    --font-size-xl: 18px;
    --font-size-2xl: 24px;

    --font-weight-normal: 400;
    --font-weight-medium: 500;
    --font-weight-bold: 700;

    --line-height-base: 1.6;

    --form-label-size: 15px;
    --form-input-size: 14px;
    --form-title-size: 24px;

    --btn-font-size: 14px;
}

/* ═══════════════════════════════════════════════════════════════
   TIPOGRAFÍA GLOBAL ESTANDARIZADA
   ═══════════════════════════════════════════════════════════════ */
body {
    font-family: var(--font-base);
    font-size: var(--font-size-base);
    line-height: var(--line-height-base);
    color: #333;
    background-color: var(--color-background);
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

h1, h2, h3, h4, h5, h6 {
    margin: 0.5em 0;
    font-family: var(--font-base);
    font-weight: var(--font-weight-bold);
    line-height: 1.2;
}

h1 { font-size: 2rem; }
h2 { font-size: 1.75rem; }
h3 { font-size: 1.25rem; }
h4 { font-size: 1.1rem; }
h5 { font-size: 1rem; }
h6 { font-size: 0.95rem; }

p {
    margin: 0.5em 0 1em 0;
    line-height: var(--line-height-base);
}

label {
    font-size: var(--form-label-size);
    font-weight: var(--font-weight-bold);
    color: #333;
}

input, select, textarea {
    font-family: var(--font-base);
    font-size: var(--form-input-size);
}

/* ═══════════════════════════════════════════════════════════════ */

header {
    background-color: var(--color-header-bg);
    color: var(--color-white);
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: fixed;
    width: 100%;
    top: 0;
    left: 0;
    z-index: 10;
}

.logo img {
    width: 100px;
    height: auto;
    padding: 0 3rem;
}

header h1 {
    flex: 1;
    text-align: center;
    font-size: 2.3rem;
    font-weight: bold;
    margin: 0;
}

.header-secundario {
    background-color: #0f4c45;
    padding: 0.8rem 0;
    width: 100%;
    position: fixed;
    top: 90px;
    z-index: 9;
    border: none;
    box-shadow: none;
}

.header-secundario ul {
    display: flex;
    justify-content: flex-end;
    gap: 2rem;
    margin: 0;
    padding: 0 3rem;
    list-style: none;
}

.header-secundario a {
    color: #fff;
    font-weight: bold;
    text-decoration: none;
    font-size: 1rem;
    transition: color 0.3s ease;
}

.header-secundario a:hover {
    color: #2606de;
}

main {
    text-align: center;
    margin-top: 140px;
    padding: 40px;
}

h2 {
    font-size: 1.8rem;
    font-weight: bold;
    color: #000000;
    margin-bottom: 1rem;
}

/* Tarjetas de Inicio */
section {
    display: flex;
    justify-content: center;
    gap: 2rem;
    margin-top: 2rem;
    flex-wrap: wrap;
}

section .card {
    background-color: var(--color-white);
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    padding: 2rem;
    width: 250px;
    text-align: center;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease;
    margin-bottom: 2rem;
}

section .card:hover {
    transform: translateY(-10px);
}

section .card h3 {
    font-size: 1.25rem;
    color: #333;
    font-weight: bold;
}

section .card p {
    color: #666;
    margin-bottom: 1rem;
}

section .card a {
    display: inline-block;
    background-color: var(--color-button-bg);
    color: var(--color-white);
    padding: 0.75rem 1.5rem;
    border-radius: 25px;
    text-decoration: none;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 0.1rem;
    transition: background-color 0.3s ease;
}

section .card a:hover {
    background-color: var(--color-button-hover);
}

/* SECCIÓN NOTICIAS */
.noticias {
    background-color: #0f4c45;
    padding: 30px 20px;
    margin-top: 40px;
    color: white;
    text-align: center;
}

.noticias h2 {
    font-size: 32px;
    margin-bottom: 30px;
    color: white;
}

/* Contenedor del carrusel */
.noticia-contenedor {
    position: relative;
    display: flex;
    align-items: center;
    gap: 15px;
    max-width: 700px;
    width: 100%;
    margin: 0 auto;
}

.carrusel-wrapper {
    flex: 1;
    overflow: hidden;
    border-radius: 12px;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.4);
    background: white;
}

.carrusel-track {
    display: flex;
    width: 100%;
}

.noticia {
    min-width: 100%;
    width: 100%;
    background-color: white;
    color: black;
    display: flex;
    flex-direction: column;
    flex-shrink: 0;
    box-sizing: border-box;
}

.noticia img {
    width: 100%;
    height: 220px;
    object-fit: cover;
    object-position: center;
    border-bottom: 3px solid #0f4c45;
    display: block;
}

.noticia h3 {
    font-size: 18px;
    padding: 20px 25px 10px;
    font-weight: bold;
    text-align: left;
    color: #0f4c45;
    margin: 0;
    line-height: 1.3;
}

.noticia p {
    padding: 0 25px 15px;
    font-size: 14px;
    line-height: 1.5;
    text-align: left;
    color: #555;
    margin: 0;
}

.noticia a {
    display: inline-block;
    margin: 0 25px 25px;
    padding: 8px 20px;
    background: linear-gradient(135deg, #3498db 0%, #1f78b4 100%);
    color: white;
    font-weight: bold;
    text-decoration: none;
    border-radius: 20px;
    transition: all 0.3s ease;
    font-size: 14px;
    width: fit-content;
}

.noticia a:hover {
    transform: scale(1.05);
    background: linear-gradient(135deg, #1f78b4 0%, #3498db 100%);
}

/* Botones del carrusel */
.carrusel-btn {
    background: white;
    border: 2px solid #0f4c45;
    width: 45px;
    height: 45px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
    z-index: 10;
    flex-shrink: 0;
}

.carrusel-btn span {
    color: #0f4c45;
    font-size: 1.6em;
    font-weight: bold;
}

.carrusel-btn:hover {
    transform: scale(1.1);
    background: #0f4c45;
}

.carrusel-btn:hover span {
    color: white;
}

/* Indicadores */
.carrusel-indicadores {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-top: 20px;
}

.indicador {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.4);
    cursor: pointer;
    transition: all 0.3s ease;
}

.indicador.activo {
    background: white;
    width: 30px;
    border-radius: 8px;
}

.indicador:hover {
    background: rgba(255, 255, 255, 0.7);
}

/* Footer */
footer {
    background-color: #000;
    color: #fff;
    text-align: center;
    padding: 20px 10px;
    font-size: 16px;
    margin-top: 40px;
    width: 100%;
}

/* Artículo completo */
.detalle-main {
    margin-top: 160px;
    margin-left: 0 !important;
    padding: 20px;
    display: flex;
    justify-content: center;
}

.articulo-completo {
    background-color: white;
    max-width: 900px;
    width: 100%;
    padding: 40px;
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    text-align: left;
}

.articulo-completo h2 {
    color: #0f4c45;
    font-size: 2.5rem;
    margin-bottom: 10px;
    border-bottom: 4px solid #c39c5b;
    padding-bottom: 10px;
}

.fecha-autor {
    color: #666;
    font-style: italic;
    margin-bottom: 30px;
    font-size: 0.9rem;
}

.img-destacada {
    width: 100%;
    height: 400px;
    object-fit: cover;
    border-radius: 8px;
    margin-bottom: 30px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
}

.contenido-texto p {
    font-size: 1.1rem;
    line-height: 1.8;
    color: #333;
    margin-bottom: 20px;
    text-align: justify;
}

.contenido-texto h3 {
    color: #9e1b34;
    font-size: 1.5rem;
    margin-top: 30px;
    margin-bottom: 15px;
}

/* Galería extra */
.galeria-imagenes {
    margin-top: 50px;
    background-color: #f0f4f4;
    padding: 20px;
    border-radius: 10px;
}

.galeria-imagenes h3 {
    text-align: center;
    color: #0f4c45;
    margin-bottom: 20px;
}

.grid-galeria {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
}

.grid-galeria img {
    width: 100%;
    height: 150px;
    object-fit: cover;
    border-radius: 6px;
    transition: transform 0.3s ease;
    cursor: pointer;
}

.grid-galeria img:hover {
    transform: scale(1.05);
}

.btn-regresar-noticia {
    display: inline-block;
    margin-top: 40px;
    background-color: #0f4c45;
    color: white;
    padding: 12px 30px;
    text-decoration: none;
    border-radius: 25px;
    font-weight: bold;
    transition: background 0.3s;
}

.btn-regresar-noticia:hover {
    background-color: #0b3832;
}

.user-info { text-align: right; margin-right: 20px; }
.user-info h2 { margin: 0; font-size: 20px; color: #333; }
.user-info p { margin: 0; font-size: 14px; color: #555; }

/* Tabla */
table {
    width: 90%;
    margin: 20px auto;
    border-collapse: collapse;
    font-family: Arial, Helvetica, sans-serif;
    background-color: #fff;
    border: 1px solid #ccc;
}

thead {
    background-color: #ff0000;
    color: #fff;
}

th, td {
    padding: 10px 12px;
    text-align: left;
    border-bottom: 1px solid #ddd;
}

tbody tr:nth-child(even) { background-color: #f2f2f2; }
tbody tr:hover { background-color: #eaf3ff; }

a { color: #2563eb; text-decoration: none; }

/* ================= Botones estandarizados ================= */
button,
input[type="submit"],
input[type="button"],
.back-btn,
.btn-regresar-noticia,
.menu-principal a,
section .card a,
.cerrar-sesion {}

.btn-primary {
    background-color: var(--color-button-bg) !important;
    color: var(--color-white) !important;
    border: none !important;
    padding: 10px 18px !important;
    border-radius: 22px !important;
    font-weight: 700 !important;
    font-size: var(--btn-font-size) !important;
    text-decoration: none !important;
    display: inline-block !important;
    cursor: pointer !important;
    text-align: center !important;
    transition: background-color 0.18s ease, transform 0.08s ease;
}

button:hover,
input[type="submit"]:hover,
input[type="button"]:hover,
.back-btn:hover,
.btn-regresar-noticia:hover,
.menu-principal a:hover,
section .card a:hover,
.cerrar-sesion:hover,
a:hover {
    text-decoration: underline;
}

.btn-primary:hover {
    background-color: var(--color-button-hover) !important;
    transform: translateY(-2px) !important;
}

button:active,
input[type="submit"]:active,
input[type="button"]:active,
.back-btn:active,
.btn-regresar-noticia:active,
.menu-principal a:active,
section .card a:active,
.cerrar-sesion:active {}

.btn-primary:active {
    transform: translateY(0) !important;
}

/* Quita subrayado */
section .card a,
.menu-principal a,
.cerrar-sesion {
    text-decoration: none !important;
}

form input[type="submit"] { line-height: 1; }

/* CONTENEDOR DE TARJETAS EN COLUMNA */
.contenedor-tarjetas {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 35px;
    margin-bottom: 60px;
    padding: 0 20px;
}

/* Tarjetas */
.tarjeta {
    width: 100%;
    max-width: 800px;
    background: linear-gradient(145deg, #ffffff, #f0f0f0);
    border-radius: 20px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
    padding: 40px 30px;
    text-align: center;
    position: relative;
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    animation: fadeInUp 0.8s ease;
    cursor: pointer;
}

.tarjeta::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(45deg, transparent, rgba(255, 255, 255, 0.1), transparent);
    transform: rotate(45deg);
    transition: all 0.6s ease;
}

.tarjeta:hover {
    transform: translateY(-15px) scale(1.03);
    box-shadow: 0 15px 40px rgba(139, 35, 50, 0.3);
    background: linear-gradient(145deg, #ffffff, #fafafa);
}

.tarjeta:hover::before { left: 100%; }

.tarjeta::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    border-radius: 20px;
    padding: 3px;
    background: linear-gradient(45deg, #8b2332, #2c5f4f, #8b2332);
    -webkit-mask: linear-gradient(#fff 0 0) content-box,
        linear-gradient(#fff 0 0);
    mask: linear-gradient(#fff 0 0) content-box,
        linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    opacity: 0;
    transition: opacity 0.4s ease;
}

.tarjeta:hover::after {
    opacity: 1;
    animation: borderRotate 3s linear infinite;
}

.tarjeta h3 {
    color: #2c5f4f;
    margin-bottom: 25px;
    font-size: 1.6em;
    font-weight: 700;
    letter-spacing: 1px;
    transition: all 0.3s ease;
    text-transform: uppercase;
}

.tarjeta:hover h3 {
    color: #8b2332;
    transform: scale(1.1);
    text-shadow: 2px 2px 8px rgba(139, 35, 50, 0.3);
}

.tarjeta p {
    color: #555;
    line-height: 1.8;
    margin-bottom: 30px;
    font-size: 1.05em;
    transition: color 0.3s ease;
}

.tarjeta:hover p { color: #333; }

/* Botón leer más */
.btn-leer {
    background: linear-gradient(135deg, #8b2332 0%, #6d1a26 100%);
    color: white;
    border: none;
    padding: 14px 35px;
    border-radius: 30px;
    font-weight: bold;
    font-size: 1em;
    cursor: pointer;
    position: relative;
    overflow: hidden;
    transition: all 0.4s ease;
    box-shadow: 0 4px 15px rgba(139, 35, 50, 0.4);
    letter-spacing: 1px;
    text-transform: uppercase;
}

.btn-leer::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    transform: translate(-50%, -50%);
    transition: width 0.6s ease, height 0.6s ease;
}

.btn-leer:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 25px rgba(139, 35, 50, 0.6);
    background: linear-gradient(135deg, #6d1a26 0%, #8b2332 100%);
}

.btn-leer:hover::before {
    width: 300px;
    height: 300px;
}

.btn-leer:active { transform: scale(0.95); }

/* Animaciones */
@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(30px); }
    to   { opacity: 1; transform: translateY(0); }
}

@keyframes borderRotate {
    0%   { filter: hue-rotate(0deg); }
    100% { filter: hue-rotate(360deg); }
}

.tarjeta:nth-child(1) { animation-delay: 0.1s; }
.tarjeta:nth-child(2) { animation-delay: 0.3s; }
.tarjeta:nth-child(3) { animation-delay: 0.5s; }
