/* ===== ESTILOS GENERALES (APLICABLES A TODAS LAS PÁGINAS) ===== */
:root {
    --azul-oscuro: #003366;       /* Color principal (navbar, títulos) */
    --amarillo: #FFFF33;          /* Fondo header/logo */
    --azul-claro: #87CEFA;       /* Degradado superior */
    --gris-fondo: #f9f9f9;       /* Fondo de secciones */
    --gris-texto: #333333;       /* Texto principal */
    --verde-destacado: #b3e6d3;  /* Fondo cajas destacadas (index) */
    --gris-cajas: #919181;       /* Fondo cajas (afiliación) */
    --marron-cajas: #ab898a;      /* Fondo cajas (Quienes somos)  */
    --fuente-principal: 'Segoe UI', sans-serif;
    --fuente-secundaria: 'Georgia', serif;
    --tamano-texto: 16px;
    --tamano-titulo: 2rem;
    --espaciado-base: 1rem; /* 16px por defecto */
    --radio-borde: 8px; /* Para esquinas redondeadas */
    --sombra-caja: 0 4px 6px rgba(0, 0, 0, 0.1); /* Sombra estándar */
    --mobile: 600px;
    --tablet: 1024px;
 }

/* Reset básico */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    line-height: 1.5; /* Espaciado entre líneas */
    list-style: none; /* Elimina viñetas de listas */
    text-decoration: none; /* Quita subrayados de enlaces */
    -webkit-font-smoothing: antialiased; /* Suaviza fuentes en Chrome/Safari */
    -moz-osx-font-smoothing: grayscale; /* Suaviza fuentes en Firefox */
}

body {
    font-family: 'Segoe UI', sans-serif;
    background: linear-gradient(to bottom, #87CEFA 50%, #FFFF33 50%);
    line-height: 1.6; /* Mejor lectura */
    scroll-behavior: smooth; /* Transición en anclas */
    overflow-x: hidden; /* Útil para sliders o elementos que salen del viewport */
    --fondo: #9b8e8e;
    --texto: #05010e;
    margin: 0;
    padding: 0;
}

img {
    max-width: 100%; /* Evita desbordamiento */
    height: auto; /* Mantiene proporciones */
    display: block; /* Elimina espacio fantasma debajo */
}


.noticia-link {
    display: block;
    position: relative;
    overflow: hidden; /* Recorta excesos */
}

.noticia-imagen-container {
    height: 100%; /* Altura fija */
    width: 100%;
    overflow: hidden;
    border-radius: 5px;
    background: #eee; /* Color de carga */
}

.noticia-imagen {
    width: 200px;
    height: 200px;
    object-fit: cover; /* Cubre el contenedor manteniendo proporción */
    object-position: center; /* Enfoca el centro de la imagen */
    transition: transform 0.3s; /* Efecto hover opcional */
}

.noticia-link:hover .noticia-imagen {
    transform: scale(1.03); /* Efecto zoom sutil */
}

.noticias-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-top: 20px;
}

.noticia-card img {
    max-width: 100%;
    height: auto;
    border-radius: 4px;
    margin-bottom: 10px;
}




.noticia {
    border: 1px solid #971313;
    padding: 15px;
    border-radius: 5px;
    background: #acaeb0;
}


.noticia-meta {
    font-size: 0.9em;
    color: #666;
    margin: 10px 0;
    margin-bottom: 10px;
}

 .noticia h3 {
    margin-top: 0;
    color: #003366;
    text-align: left;
    }
 
.comentarios {
    margin-top: 15px;
    border-top: 1px dashed #ccc;
    padding-top: 10px;
}

.comentario {
    background: #d5d8db;
    padding: 8px;
    margin: 5px 0;
    border-radius: 3px;
    border-left: 3px solid #003366;
}


/* === CABECERA Y NAVEGACIÓN === */

.header {
      background: #FFFF33;
      padding: 5px;
    }

.logo-container {
    text-align: left;
    padding: 10px 20px;
    background: #FFFF33; 
}

 .logo {
    height: 100px; /* Ajusta según tu logo */
}

.cartel-votar {
    display: inline-block;
    background-color: #87CEFA; /* Fondo amarillo claro */
    color: #FFFF33; /* Texto azul oscuro (como tu paleta) */
    font-size: 2.2rem; /* Texto grande */
    font-weight: bold;
    padding: 15px 30px;
    border-radius: 12px; /* Esquinas redondeadas */
    border: 2px solid #003366; /* Borde azul oscuro */
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1); /* Sombra suave */
    text-align: center;
    margin: 20px auto; /* Centrado y con espacio alrededor */
    font-family: var(--fuente-secundaria); /* Usa tu fuente secundaria (Georgia) */
}

nav {
    background: #003366;
    padding: 10px;
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
}

nav a {
    color: white;
    text-decoration: none;
    margin: 10px 15px;
    font-weight: bold;
    font-size: 16px;
}

nav a:hover {
    text-decoration: underline;
}

@media (max-width: 600px) {
    nav a { margin: 5px 10px; font-size: 14px; }
}

@media (prefers-color-scheme: dark) {
    body {
        --fondo: #1a1a1a;
        --texto: #f0f0f0;
    }
}
/* === CONTENEDOR PRINCIPAL (común a todas las páginas) === */
.container {
    max-width: 980px;
    width: 95%;
    margin: 5px auto;
    background: white;
    padding: 5px;
    border-radius: 5px;
    box-shadow: 0 0 5px rgba(0, 0, 0, 0.1);
}

h1, h2, h3 {
    
    font-weight: bold;
    color: #003366;
    text-align: center;
    margin-bottom: 20px;
    }

textarea, input[type="text"], input[type="submit"] {
    
    color: #8e9061;
    width: 350px;
    padding: 10px;
    margin: 10px 15px;
    border: 1px solid #740606;
    border-radius: 5px;
  }

/* === ESTILOS ESPECÍFICOS PARA CADA PÁGINA === */

/* ---- index.html ---- */
.destacado-inicio {
    text-align: justify;
    background-color: var(--verde-destacado);
    padding: 20px;
    border-radius: 10px;
    margin: 20px 0;
}

/* ---- afiliacion.html ---- */
.destacado-afiliacion {
    text-align: justify;
    background-color: var(--gris-cajas);
    padding: 20px;
    border-radius: 10px;
    margin: 20px 0;
    color: white;
}

.form-afiliacion input[type="text"],
.form-afiliacion input[type="submit"] {
    width: 100%;
    padding: 10px;
    margin: 10px 0;
    border: 1px solid #ccc;
    border-radius: 5px;
}

/* ---- noticias.html ---- */


/* === FOOTER (común a todas las páginas) === */
.footer {
    background: var(--azul-oscuro);
    color: white;
    text-align: center;
    padding: 20px;
    margin-top: 40px;
}

/* === RESPONSIVE (Mobile) === */
@media (max-width: 768px) {
    .noticias-grid {
        grid-template-columns: 1fr;
    }

    nav a {
        margin: 5px 10px;
        font-size: 14px;
    }

    .container {
        padding: 20px;
        margin: 20px auto;
    }
}

.columns-container {
  display: flex;
  flex-wrap: wrap;
  gap: 2rem;
}

.column {
  flex: 1;
  min-width: 300px;
  background: white;
  border-radius: 8px;
  box-shadow: 0 2px 10px rgba(0,0,0,0.1);
  padding: 1.5rem;
  margin-bottom: 2rem;
}

.column h2 {
  color: #1a237e;
  margin-bottom: 1rem;
}

.column-meta {
  color: #666;
  font-size: 0.9rem;
  margin-bottom: 1rem;
  border-bottom: 1px solid #eee;
  padding-bottom: 0.5rem;
}

.column-content {
  margin-bottom: 1.5rem;
  text-align: justify;
  line-height: 1.6;
}

.comments-section {
  margin-top: 2rem;
  border-top: 1px solid #eee;
  padding-top: 1.5rem;
}

.comments-section h3 {
  margin-bottom: 1rem;
  color: #1a237e;
}

.comment {
  background: #f9f9f9;
  padding: 1rem;
  border-radius: 4px;
  margin-bottom: 1rem;
}

.comment-text {
    color: #d7dd20;
}

.comment-header {
  display: flex;
  justify-content: space-between;
  margin-bottom: 0.5rem;
  font-size: 0.9rem;
}

.comment-author {
  font-weight: 600;
}

.comment-date {
  color: #666;
}

.comment-form {
  margin-top: 1.5rem;
}

.form-group {
  margin-bottom: 1rem;
}

.comment-form label {
  display: block;
  margin-bottom: 0.5rem;
  font-weight: 500;
}

.comment-form input[type="text"],
.comment-form textarea {
  color: #e2b9b9; 
  width: 100%;
  padding: 0.75rem;
  border: 1px solid #ddd;
  border-radius: 4px;
  font-family: inherit;
}

.comment-form textarea {
  min-height: 100px;
  resize: vertical;
}

.comment-form button {
  background: #1a237e;
  color: white;
  border: none;
  padding: 0.75rem 1.5rem;
  border-radius: 4px;
  cursor: pointer;
  font-weight: 500;
  font-family: inherit;
}

.comment-form button:hover {
  background: #283593;
}

.success-message {
  background: #d4edda;
  color: #155724;
  padding: 0.75rem;
  border-radius: 4px;
  margin-top: 1rem;
}

/* Responsive para columnas */
@media (max-width: 768px) {
  .columns-container {
    flex-direction: column;
  }
  
  .column {
    min-width: 100%;
  }
}

.author-image {
    max-width: 100px;
    float: left;
    margin: 0 15px 15px 0;
    border-radius: 50%;
}

/* ===== ESTILOS ESPECÍFICOS PARA NOTICIAS.PHP ===== */
.contenedor-noticias {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(450px, 1fr));
    gap: 20px;
    margin-top: 30px;
    width: 100%;
}

.noticia {
    background: white;
    border-radius: 10px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    overflow: hidden;
    transition: transform 0.2s ease-in-out;
    margin-bottom: 20px;
}

.noticia:hover {
    transform: scale(1.02);
}

.noticia img {
    width: 100%;
    height: 220px;
    object-fit: cover;
}

.noticia .contenido {
    padding: 15px;
}

.noticia h2 {
    font-size: 20px;
    margin: 0 0 10px;
    color: #003366;
    text-align: left;
}

.noticia p {
    color: #555;
    line-height: 1.4;
    text-align: justify;
}

.noticia small {
    display: block;
    margin-top: 10px;
    color: #888;
}

a.boton {
    display: inline-block;
    margin-top: 10px;
    color: #fff;
    background: #007BFF;
    padding: 8px 15px;
    border-radius: 5px;
    text-decoration: none;
}

a.boton:hover {
    background: #0056b3;
}

/* Estilos para comentarios */
.comentarios {
    margin-top: 15px;
    border-top: 1px dashed #ccc;
    padding-top: 10px;
}

.comentarios h3 {
    font-size: 16px;
    color: #003366;
    margin-bottom: 10px;
    text-align: left;
}

.comentario {
    background: #f8f9fa;
    padding: 10px;
    margin: 8px 0;
    border-radius: 5px;
    border-left: 3px solid #003366;
}

.form-comentario {
   margin-top: 10px;
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.form-comentario input[type="text"],
.form-comentario textarea {
    padding: 8px;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-family: inherit;
}

.form-comentario textarea {
    min-height: 80px;
    resize: vertical;
}

.form-comentario button {
    background: #28a745;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 4px;
    cursor: pointer;
    font-weight: bold;
}

.form-comentario button:hover {
    background: #218838;
}