/* Reset y estilos base */
*{
     box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
  font-family: 'Inter', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  margin: 0;
  padding: 0;
  color: #333;
  text-decoration: none;
  line-height: 1.6;
}
html{
  scroll-behavior: smooth;
}
body a{
    text-decoration: none;
    color: #b55252;
}


     .spann{
     width: 100%;
    padding: 0.5rem;
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    margin-top: 0.6rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    }
    
    .spann a{
     padding: 0.2rem;
    text-decoration: none;
    border-radius: 0.3rem;
    text-align: center;
    color: #fff;
    width: 100%;
    }



.spann2{
    display:flex;
        border-top: 1px solid #ebebeb;
    padding: 5px;
}
.spann2 li{
     padding: 0.2rem;
    text-decoration: none;
    border-radius: 0.3rem;
    text-align: center;
    color: #fff;
    width: 100%;
}



/* Botón */
.open-modal-btn-menu {
  padding: 10px 18px;
  border: none;
  border-radius: 6px;
  background: #c41e3a;
  color: #fff;
  cursor: pointer;
  width: 100%;
  font-weight: bold;
  transition: 0.3s;
}
.open-modal-btn-menu:hover {
  background: #830010;
}

/* Modal general */
.modalMenuExpand {
  display: none;
  position: fixed;
  z-index: 9999;
  left: 0; top: 0;
  width: 100%; height: 100%;
  background-color: #fff; /* Fondo blanco total */
  overflow-y: auto;
  animation: fadeIn 0.3s ease;
}
/* Header */
.modal-header-expand-menu {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 20px;
  background: #830010;
  color: #fff;
}

.modal-header-expand-menu h2 {
  margin: 0;
  font-size: 20px;
}

/* Botón cerrar */
.close-expand-menu {
  font-size: 28px;
  font-weight: bold;
  cursor: pointer;
}
.close-expand-menu:hover {
  color: #ff4444;
}

/* Contenido */
.modal-content-expand-menu {
/*background: #fff; */
    /* width: 90%; */
    /* max-width: 800px; */
    /* margin: 50px auto; */
    padding: 20px 30px;
    border-radius: 12px;
    /* box-shadow: 0 0 20px rgba(0, 0, 0, 0.4); */
    animation: fadeInUp 0.4s ease;
}

/* Botón cerrar */
.closed-expand-menu {
  float: right;
  font-size: 28px;
  font-weight: bold;
  cursor: pointer;
  color: #fff;
  width: 50px;
    border-radius: 50%;
    height: 50px;
    display: flex;
        align-items: center;
    justify-content: center;
}
.closed-expand-menu:hover {
  color: white;
    background: rgba(255, 255, 255, 0.2);
transform: scale(1.1);
}


/* Contenido */


.modal-content-expand-menu ul {
  list-style: none;
  padding: 0;
}

.modal-content-expand-menu li {
  font-size: 18px;
  padding:0.5rem;
  background: #c41e3a;
  border-radius: 0.5rem;
}

.modal-content-expand-menu a {
  text-decoration: none;
  transition: 0.2s;
}
.modal-content-expand-menu a:hover {
  color: #fff;
}

/* Animación */
@keyframes fadeIn {
  from {opacity: 0;}
  to {opacity: 1;}
}

/* Animación */
@keyframes fadeInUp {
  from {opacity: 0; transform: translateY(40px);}
  to {opacity: 1; transform: translateY(0);}
}



.themeToggle{
    font-size: 1.2rem; 
    padding: 6px 12px;
    border-radius: 6px;
    border: 1px solid #1a1a1a;
    background: #3f3f3f;
    color:#fff;
    cursor: pointer;
    transition: all 0.3s ease;
}

.themeToggle:hover {
  background: #222;
    
}
  
  
.theme-block {
  text-align: center;
    background: rgb(33 33 33);
    transition: background 0.3s ease;
    padding: 0.5rem;
    border-radius: 0.5rem;
}

.theme-title {
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 4px;
}

.theme-desc {
  font-size: 12px;
  color: #ccc;
  margin-bottom: 8px;
}



/* ESTILOS BANNER SUPERIOR */
#superaddicion {
     position: relative;
    width: 100%;
    min-height: 250px; /* Altura mínima recomendada por AdSense */
    height: 30vh; /* Ocupa el 30% de la pantalla */
    background: #f1f1f1;
    overflow: hidden;
    transition: height 0.5s ease;
    z-index: 5;
    clip-path: inset(0px); /* similar a clever */
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    
}
  /* Estado colapsado */
  #superaddicion.collapsed {
    height: 0;
    min-height: 0;
    padding: 0;
  }
#slotsuper {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px;
}

.info-btn {
  background: #000;
  color: #fff;
  border: none;
  border-radius: 50%;
  width: 30px;
  height: 30px;
  cursor: pointer;
}

.info-panel {
  background: #fff;
  padding: 15px;
  display: none;
}

.info-panel.active {
  display: block;
}

.cerrarsuperior {
  background: rgba(0,0,0,0.7);
  color: #fff;
  font-size: 14px;
  display: block;
  max-height: 0;
  overflow: hidden;
  opacity: 0;
  transform: translateY(-15px);
  transition: all 0.4s ease;
}

.cerrarsuperior.show {
  max-height: 80px; /* Ajusta según contenido */
  opacity: 1;
   padding: 6px 10px;
  transform: translateY(0);
}

.cerrarsuperior button {
      padding: 5px;
      cursor: pointer;
    color: #fff;
    background: #4c4c4c;
    border: 1px solid #979797;
    border-radius: 2px;
}



  
  
  
  
  
  
  
  
  
/* Ocultar anuncio suavemente */
.ocultarAAAD {
  transition: opacity 0.6s ease, transform 0.6s ease;
}
.ocultarAAAD.hide {
  opacity: 0;
  transform: translateY(-10px);
}
.slotsuper{ 
    width: 100%; 
    min-height: 250px; 
    height: 30vh;
    
} 
.footersuper{ 
      display: flex;
    width: 100%;
    padding: 5px;
    font-size: small;
    color: #878787;
    background: #f1f1f1;
    justify-content: space-between;
    align-items: center;
    border-top: 3px solid #f7f7f7;
    
} 
.buttonfooter svg{
    color:#6d6d6d;
}

.buttonfooter{
    text-align: right;
    border-radius:5px;
    align-items: flex-end;
    background: #dddddd;
    padding: 5px;
    cursor: pointer;
   border: none;

}

.center-footer{
    display: flex;
}

/* ESTILOS PRELANDING Y PRELOAD */
.prelanding{
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgb(251 251 251);
  color: #730000;
  z-index: 10000;
  display: none; /* CORREGIDO */
  align-items: center;
  justify-content: center;
  flex-direction: column;
  padding: 2rem;
  text-align: center;
}

.prelanding button{
     margin-top: 1rem;
    padding: 10px 20px;
        background: #a81729;
    border: 1px solid #a81729;
    color: #ffffff;
    border-radius: 6px;
    font-size: 16px;
    cursor: pointer;
}

/* Overlay */
.preloader-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: #fff;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity 0.5s ease;
  
}

/* Contenido */
.preloader-content {
  text-align: center;
  color: black;
}

/* Animación del loader */
.loader {
  border: 6px solid #a81729;
  border-top: 6px solid #55000b;
  border-radius: 50%;
  width: 50px;
  height: 50px;
  animation: spin 1s linear infinite;
  margin: 0 auto 12px;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}









.oculterpre{
     display: none !important;
}
.search-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100%;
        height: 100%;
    background: rgba(0,0,0,0.6);
    z-index: 9999;
    display: none;
    justify-content: center;
    align-items: center;
}

.category-card{
    max-height: 250px;
    border: 1px solid #ddd; 
    border-radius: 8px; 
    padding: 20px; 
    background: #fff; 
    transition: transform 0.3s ease, 
    box-shadow 0.3s ease;
    
    
}


.cabecera-search-head {
            display: flex;
            max-height: 350px;
            /* align-items: center; */
            background: #f0f0f0;
            gap: 2rem;
            padding: 2rem;
            /* max-width: 1200px; */
            margin: 0;
            height: 100%;
        }
.search-modal-container {
    width: 100%;
    max-width: 100%;
    height: 100%;
    background: white;
    border-radius: 1px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    box-shadow: 0 4px 10px rgba(0,0,0,0.3);
}

.search-modal-header {
    padding: 1rem;
    background-color: #a81729;
    color: white;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.search-modal-close {
   background: rgba(255, 255, 255, 0.2);
        border: none;
        color: white;
        font-size: 24px;
        width: 40px;
        height: 40px;
        border-radius: 50%;
        cursor: pointer;
        display: flex;
        align-items: center;
        justify-content: center;
        transition: background 0.3s ease;
}

.search-modal-content {
    flex-grow: 1;
}

.pagination-controls-php{
    padding: 0.9em;
}

/* Estilos para comentarios */
.alert {
    padding: 1rem;
    border-radius: 5px;
    margin-bottom: 1rem;
}

.alert-success {
    background-color: #d4edda;
    border: 1px solid #c3e6cb;
    color: #155724;
}

.alert-error {
    background-color: #f8d7da;
    border: 1px solid #f5c6cb;
    color: #721c24;
}

.comment-form input:focus,
.comment-form textarea:focus {
    outline: none;
    border-color: #3498db;
    box-shadow: 0 0 0 2px rgba(52, 152, 219, 0.2);
}

.comment-form button:hover {
    background: #2980b9 !important;
    transform: translateY(-1px);
    transition: all 0.2s ease;
}

.comment-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(0,0,0,0.15) !important;
    transition: all 0.3s ease;
}


/* Estilos para la paginación */
        .posts-per-page-selector {
            display: flex;
            align-items: center;
            gap: 10px;
            margin-bottom: 20px;
            padding: 15px;
            background: #f8f9fa;
            border-radius: 8px;
            border: 1px solid #e9ecef;
        }

        .posts-per-page-selector label {
            font-weight: 600;
            color: #495057;
        }

        .posts-per-page-select {
            padding: 8px 12px;
            border: 1px solid #ced4da;
            border-radius: 4px;
            background: white;
            font-size: 14px;
            cursor: pointer;
        }

        .pagination-controls {
            margin-top: 30px;
            padding: 20px;
            background: #f8f9fa;
            border-radius: 10px;
            border: 1px solid #e9ecef;
        }

        .pagination-info {
            text-align: center;
            margin-bottom: 20px;
            color: #6c757d;
        }

        .pagination-info span {
            display: block;
            margin-bottom: 5px;
        }

        .posts-count {
            font-size: 0.9em;
            color: #868e96;
        }

        .pagination-buttons {
            display: flex;
            justify-content: center;
            align-items: center;
            gap: 8px;
            flex-wrap: wrap;
                padding: 1.9em;
                border-top: 1px solid #e7e7e7;
            margin-bottom: 10px;
    margin-top: 20px;
            
        }

        .btn-pagination {
            padding: 8px 16px;
            background: transparent;
            border: 1px solid #a81729;
            border-radius: 6px;
            color: #a81729;
            text-decoration: none;
            font-size: 14px;
            cursor: pointer;
            transition: all 0.2s ease;
            min-width: 40px;
            text-align: center;
        }

        .btn-pagination:hover {
            background: #e9ecef;
            border-color: #a81729;
            color:#a81729;
            transform: translateY(-1px);
        }

        .btn-pagination.active {
            background: #a81729;
            color: white;
            border-color: #a81729;
            font-weight: 600;
        }

        .btn-pagination:disabled {
            opacity: 0.5;
            cursor: not-allowed;
        }

        .pagination-dots {
            padding: 8px 4px;
            color: #6c757d;
            font-weight: bold;
        }

        .pagination-jump {
            display: flex;
            justify-content: center;
            align-items: center;
            gap: 10px;
            padding-top: 15px;
            border-top: 1px solid #dee2e6;
        }

        .page-input {
            padding: 8px 12px;
            border: 1px solid #ced4da;
            border-radius: 4px;
            width: 120px;
            text-align: center;
            font-size: 14px;
        }

        .btn-jump {
            padding: 8px 16px;
            background: #28a745;
            color: white;
            border: none;
            border-radius: 4px;
            cursor: pointer;
            font-size: 14px;
            transition: background 0.2s ease;
        }

        .btn-jump:hover {
            background: #218838;
        }

        @keyframes loading {
            0% {
                background-position: 200% 0;
            }
            100% {
                background-position: -200% 0;
            }
        }

        .error {
            text-align: center;
            padding: 40px;
            color: #dc3545;
            background: #f8d7da;
            border-radius: 8px;
            margin: 20px 0;
        }


/* Header */
/*header {*/
/*  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);*/
/*  color: white;*/
/*  padding: 2rem 1rem;*/
/*  text-align: center;*/
/*  box-shadow: 0 2px 10px rgba(0,0,0,0.1);*/
/*}*/


/*card de destacados con chatgpt*/
.header-destacado h1 {
  margin: 0;
  font-size: 2.5rem;
  font-weight: 700;
  text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
}
.grid-container-destacado {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
  grid-auto-rows: 300px;
}


.header-middle a{
    color:#fff;
}
.breadcrumbs-categorias{
    display: flex; 
    justify-content: space-between; 
    padding: 1rem; 
    gap: 20px;
}
.card-destacado {
  position: relative;
  background-size: cover;
  background-position: center;
  /*border-radius: 10px;*/
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 20px;
  color: white;
  transition: transform 0.3s ease;
    text-align: justify;
}

.contenedor {
  max-width: 100%;
  width: 100%;
  margin: auto;
  padding: 10px;
  box-sizing: border-box;
}


.card-destacado::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.8), transparent);
  z-index: 0;
}

.content-destacado {
  position: relative;
  z-index: 1;
}

.content-destacado h2 {
  font-size: 1.2rem;
  margin-bottom: 8px;
}


.tag-destacado {
  background-color: crimson;
  padding: 5px 10px;
  font-size: 0.75rem;
  border-radius: 5px;
  font-weight: bold;
}

.grande-destacado {
  grid-column: span 2;
  grid-row: span 2;
}



/* cards de destacados con chagpts*/




/* Navegación */
/*nav {
  /*background: rgba(44, 44, 44, 0.95);*/
  /*padding: 0.8rem;
  /*display: flex;
  /*justify-content: center;
  /*gap: 2rem;
  /*backdrop-filter: blur(10px);
/*}*/

nav a {
  color: #333;
  text-decoration: none;
  font-weight: 500;
  padding: 0.5rem 1rem;
  border-radius: 20px;
  transition: all 0.3s ease;
}

nav a:hover {
  background: rgba(255,255,255,0.2);
  transform: translateY(-2px);
}

/* Layout principal */
/*.container {
 /* display: flex;
 /* flex-direction: row;
  /*padding: 2rem;
  /*gap: 2rem;
  /*max-width: 1200px;
 /* margin: 0 auto;
/*}*/

main {
  flex: 3;
  padding: 0;
  background: #fff;
}

#posts {
  padding: 0.1rem;
  max-width: 1000px;
  margin: 0 auto;
}

/* Sidebar */
.sidebar {
  flex: 1;
  position: static;
  top: 2rem;
  /*height: fit-content;*/
  /*background: white;*/
  margin-bottom: 1.5rem;
  border-radius: 15px;
  /*box-shadow: 0 8px 25px rgba(0,0,0,0.1);*/
  /*border: 1px solid rgba(255,255,255,0.2);*/
}

/* Cards de posts */
.card {
  background: white;
  border-radius: 5px;
  box-shadow: 0 8px 25px rgba(0,0,0,0.1);
  overflow: hidden;
  margin-bottom: 0.5rem;
  transition: all 0.3s ease;
  border: 1px solid rgba(255,255,255,0.2);
}

/*.card:hover {
  transform: translateY(-8px);
  box-shadow: 0 15px 35px rgba(0,0,0,0.15);
}*/


.horizontal-scroll-container {
            display: flex;
            justify-content: space-between;
            flex-wrap: nowrap;
            gap: 0.2rem;
            padding: 0.2rem;
            max-width: 100%;
                background-color: #e9e9e9;
        }

        .card-article-destacadoshead {
            flex: 1 1 calc(33.33% - 1rem);
            /*background: #fff;*/
            border-radius: 2px;
            overflow: hidden;
            display: flex;
            align-items: center;
            padding: 0.2rem;
            /*box-shadow: 0 4px 12px rgba(0,0,0,0.1);*/
            min-width: 0; /* Importante para el text overflow */
            transition: transform 0.2s ease, box-shadow 0.2s ease;
        }

        .card-article-destacadoshead:hover {
            transform: translateY(-2px);
            box-shadow: 0 6px 20px rgba(0,0,0,0.15);
        }

        /* Contenedor de imagen y texto */
        .card-article-inner {
            display: flex;
            align-items: center;
            gap: 0.75rem;
            width: 100%;
            min-width: 0; /* Importante */
        }

        /* Enlaces */
        .post-link-img, .post-link-text, .post-link {
         display: flex;
        align-items: center;
        text-decoration: none;
        padding: 0.2rem;
        border-radius: 4px;
        border: 1px solid #c5c5c5;
        color: #c90f0f;
        /* width: 110px; */
        justify-content: center;
        }
        .post-link:hover{
            color: #fff;
            background:#c90f0f;
            transition: all 0.3s ease;
        }
    .post-link{
        padding:0.75rem;
    }
        /* Imagen */
        .card-img-destacadoshead {
            width: 50px;
            height: 50px;
            border-radius: 50%;
            object-fit: cover;
            flex-shrink: 0; /* No se reduce */
        }

        /* Contenedor del texto */
        .card-body-destacadoshead {
            flex: 1;
            min-width: 0; /* Permite que el texto se ajuste */
            overflow: hidden;
        }

        /* Título con texto que se ajusta en múltiples líneas */
        .card-title-destacadoshead {
            font-size: 0.85rem;
            font-weight: 500;
            line-height: 1.3;
            margin: 0;
            color: #333;
            /* Limitar a 2 líneas máximo */
            display: -webkit-box;
            -webkit-line-clamp: 2;
            -webkit-box-orient: vertical;
            overflow: hidden;
            text-overflow: ellipsis;
        }



        /* Botón genérico */
        .btn-destacados-head {
            background: transparent;
            border: none;
            padding: 0;
            cursor: pointer;
            text-decoration: none;
        }


.imagen-derecha .card-article{
    background: #fff;
    border-radius: 15px 15px 0 0;
    padding: 0.4rem;
}
.card-article .card-img {
  width: 100%;
  height: 350px;
  /*object-fit: cover;*/
  transition: transform 0.3s ease;
}

.card:hover .card-img {
  transform: scale(1.05);
}

.card-body {
  padding: 0.5rem;
}

.card-title {
  font-size: 1.5rem;
  margin: 0 0 0.8rem;
  font-weight: 600;
  color: #2c3e50;
  line-height: 1.3;
  text-decoration: none;
}
.card-title a{
    color: #2c3e50;
}
.card-date {
  font-size: 0.9rem;
  color: #7f8c8d;
  margin-bottom: 1rem;
  font-weight: 500;
}

.card-excerpt {
  color: #444;
  line-height: 1.6;
  margin-bottom: 1.5rem;
}
.card-excerpt a{
    color: #444;
}
.article-excerpt a{
     color: #444;
}
.card-excerpt p {
  margin: 0;
}


/* Footer */
footer {
  background: linear-gradient(135deg, #2c3e50 0%, #34495e 100%);
  color: white;
  padding: 2rem;
  text-align: center;
  /*margin-top: 3rem;*/
  box-shadow: 0 -2px 10px rgba(0,0,0,0.1);
}

footer p {
  margin: 0;
  font-size: 1rem;
}

/* Posts destacados y populares */
.destacado img,
.popular-article img {
  height: 200px;
  object-fit: cover;
  width: 100%;
  border-radius: 10px;
  transition: transform 0.3s ease;
}

.destacado:hover img,
.popular-article:hover img {
  transform: scale(1.05);
}

/* Estados de carga y error */
.loading {
  text-align: center;
  padding: 3rem;
  font-size: 1.2rem;
  color: #7f8c8d;
}

.error {
  text-align: center;
  padding: 3rem;
  color: #e74c3c;
  font-size: 1.2rem;
}


/* Estilos para el grid de destacados */
.contenedor {
  max-width: 1200px;
  margin: 2rem auto;
  padding: 0 20px;
}

.grid-container-destacado {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  grid-template-rows: repeat(3, 200px);
  gap: 5px;
  margin-bottom: 2rem;
}

.card-destacado {
  background-size: cover;
  background-position: center;
  border-radius: 0.5rem;
  position: relative;
  overflow: hidden;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  cursor: pointer;
}

.card-destacado:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 25px rgba(0,0,0,0.3);
}

/* Posicionamiento específico para cada tarjeta */
.card-destacado:nth-child(1) {
  grid-column: 1 / 2;
  grid-row: 1 / 2;
}

.card-destacado:nth-child(2) {
  grid-column: 2 / 4;
  grid-row: 1 / 3;
}

.card-destacado:nth-child(3) {
  grid-column: 4 / 5;
  grid-row: 1 / 3;
}

.card-destacado:nth-child(4) {
  grid-column: 1 / 2;
  grid-row: 2 / 4;
}

.card-destacado:nth-child(5) {
  grid-column: 2 / 5;
  grid-row: 3 / 4;
}

/* Overlay oscuro para mejorar legibilidad */
.card-destacado::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(
    to bottom,
    rgba(0,0,0,0.3) 0%,
    rgba(0,0,0,0.1) 50%,
    rgba(0,0,0,0.8) 100%
  );
  z-index: 1;
}

.tags-destacado {
  position: absolute;
  top: 12px;
  left: 12px;
  z-index: 2;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.tag-destacado {
  background: rgba(196, 30, 58, 0.9);
  color: white;
  padding: 4px 8px;
  border-radius: 4px;
  font-size: 0.6rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.tag-destacado.rojo {
  background: rgba(196, 30, 58, 0.9);
}

.content-destacado {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 15px;
  z-index: 2;
  color: white;
}

.content-destacado h2 {
  font-size: 1rem;
  font-weight: 600;
  line-height: 1.3;
  margin-bottom: 8px;
  text-shadow: 0 2px 4px rgba(0,0,0,0.5);
}

.content-destacado p {
  font-size: 0.8rem;
  opacity: 0.9;
  margin: 0;
}

/* Tarjeta grande */
.grande-destacado .content-destacado h2 {
  font-size: 1.4rem;
  line-height: 1.2;
}

.grande-destacado .content-destacado {
  padding: 20px;
}


   /* Botón hamburguesa */
        .menu-toggle {
            display: none;
            background: none;
            border: none;
            color: white;
            font-size: 30px;
            cursor: pointer;
            padding: 5px;
        }




        /* Estilos adicionales para demo */
        .container {
            max-width: 1300px;
            margin: 0 auto;
            padding: 0 20px;
        }
        
        .main-content {
            display: grid;
            grid-template-columns: 1fr 300px;
            gap: 10px;
            margin-top: 20px;
            margin-bottom: 5rem;
        }

    
    /* Featured Articles - Top 3 */
    .featured-top {
      display: grid;
      grid-template-columns: repeat(3, 1fr);
      gap: 20px;
      margin-bottom: 30px;
    }
    
    .featured-article {
      background: white;
      border-radius: 8px;
      overflow: hidden;
      box-shadow: 0 2px 10px rgba(0,0,0,0.1);
      transition: transform 0.3s;
    }
    
    .featured-article:hover {
      transform: translateY(-5px);
    }
    
    .featured-article img {
      width: 100%;
      height: 200px;
      object-fit: cover;
    }
    
    .featured-article .content {
      padding: 15px;
    }
    
    .featured-article h3 {
      font-size: 1.1rem;
      margin-bottom: 10px;
      color: #333;
    }
    
    .featured-article .meta {
      font-size: 0.85rem;
      color: #666;
      margin-bottom: 10px;
    }
    
    .featured-article .excerpt {
      font-size: 0.9rem;
      color: #666;
      line-height: 1.4;
    }
  
    /* Advertisement Section */
    .matrona-global {
         background: #f0f0f0;
    /*padding: 0.2rem 0rem 0px;*/
    /*text-align: center;*/
    margin: 2.3rem 0 7rem 0;
    border-radius: 0.2rem;
    border-bottom: 1px solid #e2e8f0;
    }
    
    .matrona-global-titulo{
        font-size:0.8rem;
            color: #a7a7a7;
    }
    
        /* Cabecera categorias */
    .category-header{
        /*font-size: 2rem;*/
            display: flex;
    justify-content: space-between;
    align-items: center;
    }
    .url-category{
        text-align: center;
    color: #c41e3a;
    padding: 2px;
    }
       .cabecera-categoria {
            display: flex;
            /*max-height: 350px;*/
        
            align-items: flex-start;
            
            background: #f0f0f0;
            gap: 2rem;
            padding: 2rem;
            /* max-width: 1200px; */
            margin: 0 auto 3rem;
          /*  min-height: 600px;*/
        }
        .cabecera-page-categoria {
             display: flex;
            /*max-height: 350px;*/
            border-radius: 0.5rem;
            align-items: flex-start;
            
            background: #f0f0f0;
            gap: 2rem;
            padding: 2rem;
            /* max-width: 1200px; */
            margin: 0 auto 3rem;
          /*  min-height: 600px;*/
        }

        .contenido-izquierda {
            flex: 1;
            max-width: 600px;
        }

        .category-header h1 {
            font-size: 2.5rem;
            font-weight: bold;
            color: #333;
            margin-bottom: 1rem;
            line-height: 1.2;
        }

        .category-description {
            font-size: 1.1rem;
            line-height: 1.6;
            color: #666;
            text-align: justify;
            margin-top: 0.5rem;
        }

        .imagen-derecha {
            flex: 1;
            position: relative;
            /*max-width: 500px;*/
            /*height: 300px;*/
        }

        .imagen-derecha img {
            width: 100%;
            height: auto;
            object-fit: cover;
            border-radius: 15px;
            box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
            transition: transform 0.3s ease, box-shadow 0.3s ease;
        }

        .imagen-derecha img:hover {
            transform: translateY(-5px);
            box-shadow: 0 12px 35px rgba(0, 0, 0, 0.2);
        }


      

.searchher{
    padding: 2rem;
}
.searchher2{
  padding: 1.5rem;
}
.boton-search-page{
            padding: 0.75rem 1.5rem;
    background: #007cba;
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 1rem;
    cursor: pointer;
    transition: background 0.3s;
        }
        
        .form-search-page{
            padding:0.75rem; 
            width:100%; 
            max-width:400px; 
            border-radius:6px;
            border:2px solid #ddd; 
            font-size: 1rem;
        }
    /* Featured Grid - 5 articles */
    .featured-grid {
      display: grid;
      grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
      gap: 20px;
      margin-bottom: 40px;
    }
    
    .featured-grid h2 {
      grid-column: 1 / -1;
      color: #c41e3a;
      font-size: 2rem;
      margin-bottom: 20px;
      text-align: center;
    }
    
    /* Left Content Area */
    .left-content {
      display: flex;
      flex-direction: column;
      margin-bottom: 1rem;
      gap: 30px;
    }
    
    /* Popular Section */
    .popular-section {
      /*background: white;*/
      padding: 5px;
      border-radius: 8px;
      /*box-shadow: 0 2px 10px rgba(0,0,0,0.1);*/
    }
    
    .popular-section h3 {
      color: #333;
      font-size: 1.5rem;
      margin-bottom: 20px;
      border-bottom: 2px solid #c41e3a;
      padding-bottom: 10px;
    }
    
    .slider-container {
      position: relative;
      overflow: hidden;
    }
    
    .slider {
      display: flex;
      transition: transform 0.3s ease;
    }
    
    .slide {
      min-width: 100%;
      display: flex;
      gap: 15px;
      align-items: center;
    }
    
    .slide img {
      width: 120px;
      height: 80px;
      object-fit: cover;
      border-radius: 4px;
    }
    
    .slide-content h4 {
      font-size: 1rem;
      margin-bottom: 5px;
      color: #333;
    }
    
    .slide-content .meta {
      font-size: 0.8rem;
      color: #666;
    }
    
    /* Latest Articles */
    .latest-section {
      /*background: white;*/
      padding: 20px;
      border-radius: 8px;
      /*box-shadow: 0 2px 10px rgba(0,0,0,0.1);*/
      margin-bottom: 30px;
    }
    
    .latest-section h3 {
      color: #8f8f8f;
      font-size: 1.5rem;
      margin-bottom: 20px;
      border-bottom: 2px solid #c41e3a;
      padding-bottom: 10px;
    }
    
    .latest-article {
      display: flex;
      gap: 15px;
      margin-bottom: 15px;
      padding-bottom: 15px;
      border-bottom: 1px solid #eee;
    }
    
    .latest-article:last-child {
      border-bottom: none;
      margin-bottom: 0;
      padding-bottom: 1rem;
    }
    
    .latest-article img {
      width: 80px;
      height: 60px;
      object-fit: cover;
      border-radius: 4px;
    }
    
    .latest-article .content h4 {
      font-size: 0.95rem;
      margin-bottom: 5px;
      color: #333;
    }
    
    .latest-article .meta {
      font-size: 0.8rem;
      color: #666;
    }
    /* Latest Articles Section - Improved Design */

.latest-section h3 {
  color: #333;
  font-size: 1.8rem;
  margin-bottom: 25px;
  border-bottom: 3px solid #c41e3a;
  padding-bottom: 12px;
  font-weight: 700;
}

/* Improved Latest Article Cards */
.latest-article {
    display: flex;
    /* gap: 20px; */
    /* margin-bottom: 20px; */
    padding: 5px;
    border-radius: 5px;
    background: #fff;
    /* box-shadow: 0 3px 15px rgba(0, 0, 0, 0.06); */
    border: 1px solid rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

.latest-article:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 25px rgba(0,0,0,0.12);
  border-color: rgba(196, 30, 58, 0.2);
}

.latest-article:last-child {
  margin-bottom: 0;
}

/* Image styling */
.latest-article .article-image, .ancho {
    width: 470px;
    height: 264px;
    flex-shrink: 0;
    border-radius: 2px;
    overflow: hidden;
    position: relative;
}
.latest-article .article-image img,
.latest-article img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.latest-article:hover .article-image img,
.latest-article:hover img {
  transform: scale(1.05);
}

/* Content styling */
.latest-article .article-content,
.latest-article .content {
      flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
}

.latest-article .article-content h4,
.latest-article .content h4 {
  font-size: 1.1rem;
  font-weight: 600;
  color: #2c3e50;
  margin: 0 0 8px 0;
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.latest-article .article-content h4:hover,
.latest-article .content h4:hover {
  color: #c41e3a;
}

.latest-article .article-excerpt {
  font-size: 0.9rem;
  color: #666;
  line-height: 1.5;
  margin-bottom: 12px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.latest-article .article-meta,
.latest-article .meta {
  display: flex;
  align-items: center;
  gap: 15px;
  font-size: 0.85rem;
  color: #888;
}

.latest-article .article-meta .date,
.latest-article .meta .date {
  display: flex;
  align-items: center;
  gap: 5px;
}

.latest-article .article-meta .category,
.latest-article .meta .category {
  background: linear-gradient(135deg, #c41e3a, #a81729);
  color: white;
  padding: 3px 8px;
  border-radius: 12px;
  font-size: 0.75rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.latest-article .article-meta .read-time,
.latest-article .meta .read-time {
  display: flex;
  align-items: center;
  gap: 5px;
}
.category .badge-home{
    /* background: rgba(196, 30, 58, 0.9); */
    color: #c62828;
    /* padding: 4px 8px; */
    border-radius: 4px;
    font-size: 0.6rem;
    font-weight: 600;
    text-transform: uppercase;
    text-decoration: none;
    letter-spacing: 0.5px;
}


/* Loading skeleton - Updated */
.latest-article.loading-skeleton {
  background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
  background-size: 200% 100%;
  animation: loading 1.5s infinite;
  border-radius: 12px;
  height: 130px;
  margin-bottom: 20px;
}

@keyframes loading {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

    /* Sidebar */
    .sidebar {
      display: flex;
      flex-direction: column;
      gap: 20px;
    }
    
    .search-box {
      /*background: white;*/
      padding: 20px;
      border-radius: 8px;
     /* box-shadow: 0 2px 10px rgba(0,0,0,0.1);*/
    }
    .align-svg {
  display: inline-flex; /* clave para alinear ícono y texto */
  align-items: center;
  text-decoration: none;
  transition: background 0.3s;
}
.align-svg svg{
  /*color: #710303;*/
  margin-right: 5px; /* un poco más cómodo visualmente */
  width: 18px;
  height: 18px;
  flex-shrink: 0; /* evita que se encoja si hay poco espacio */

}
    .search-box h4, .sidebar-daa h4 {
    color: #333;
    font-size: 1rem;
    margin-bottom: 20px;
    border-bottom: 2px solid #c41e3a;
    padding-bottom: 10px;
    }
    
    .search-box input {
      width: 100%;
      padding: 10px;
      border: 1px solid #ddd;
      border-radius: 4px;
      font-size: 14px;
    }
    
    .search-box button {
      width: 100%;
      padding: 10px;
      background: #c41e3a;
      color: white;
      border: none;
      border-radius: 4px;
      margin-top: 10px;
      cursor: pointer;
    }
    
    .sidebar-daa {
      /*background: white;*/
      padding: 20px;
      border-radius: 8px;
      /*box-shadow: 0 2px 10px rgba(0,0,0,0.1);*/
      text-align: center;
      position: sticky;
      top: 50px;
    }
    
    /* Loading Skeleton */
    .loading-skeleton {
      background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
      background-size: 200% 100%;
      animation: loading 1.5s infinite;
    }
    
    @keyframes loading {
      0% { background-position: 200% 0; }
      100% { background-position: -200% 0; }
    }
    
    /* Footer */
    footer {
      background: #1a1a1a;
      color: white;
      padding: 40px 0 0px;
      margin-top: 5rem;
    }
    
    .footer-content {
      display: grid;
      grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
      gap: 30px;
      margin-bottom: 30px;
    }
    
    .footer-section h4 {
      color: #ff4d4d;
      margin-bottom: 15px;
    }
    
    .footer-section a {
      color: #ccc;
      text-decoration: none;
    }
    
    .footer-section a:hover {
      color: #c41e3a;
    }
    
    .footer-bottom {
      text-align: center;
      padding: 20px;
      border-top: 1px solid #333;
      opacity: 0.7;
      background:#000;
    }
    .footer-bottom-2 {
         text-align: center;
    padding: 5px;
    border-top: 1px solid #070707;
    opacity: 0.7;
    background: #0c0c0c;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 5px;
    }
    
    

    /** TODOS LOS ESTILOS DE RESULTADOS DE COMENTARIOS*/
      .comentarios-container { 
        max-width: 100%; 
        margin: auto; 
        padding:1px;
        font-family: Arial; 
        
    }
    .comentario {
    border: 1px solid #ebebeb;
    padding: 10px 5px;
    margin: 5px;
    border-radius: 5px; 
    }
    .comentario strong {
        color: #333; 
        
    }
    .comentario small {
        color: #888; 
        display: block; 
        margin-top: 5px; 
        
    }
    .comentario p{
    background: #f7f7f7;
    padding: 3px;
    border-radius: 5px;
    }
    .formulario-comentario {
    margin: 20px 0 10px;
    padding: 5px 3px;
    border-top: 1px solid #212121;
        
    }
    .formulario-comentario textarea{
        resize: none;
    }
    .formulario-comentario input, .formulario-comentario textarea, .formulario-comentario select {
        width: 100%;
    padding: 8px;
    margin-bottom: 10px;
    box-sizing: border-box;
    border: 1px solid #bfbfbf;
    border-radius: 0.3rem;
        
    }
    .formulario-comentario button {
    padding: 10px 15px;
    width: 100%;
    border: 2px solid #c41e3a;
    background: #c41e3a;
    color: #fff; 
    border-radius: 5px;
        
    }
    .error { 
        background: #ffe0e0; 
        padding: 10px; 
        border: 1px solid #a00; 
        margin-bottom: 10px; 
        
    }
    .checkbox-container { 
        margin-bottom: 10px; 
        
    }
    .checkbox-container input[type="checkbox"] { 
        width: auto; 
        margin-right: 8px; 
        
    }
    .form-hidden { 
        display: none; 
        
    }
    
    /* Botón Ver más comentarios */
    .ver-mas-btn {
       background: #fff;
    color: #c41e3a;
    border: 1px solid #c41e3a;
    padding: 12px 25px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 16px;
    font-weight: 500;
    margin: 20px auto;
    display: block;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
    }
    
    .ver-mas-btn:hover {
        transform: translateY(-2px);
        box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4);
    }
    
    .ver-mas-btn:disabled {
        background: #ccc;
        cursor: not-allowed;
        transform: none;
        box-shadow: none;
    }
    
    /* Modal de comentarios */
    .comments-modal-overlay {
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background: rgba(0, 0, 0, 0.8);
        z-index: 10009;
        display: none;
        backdrop-filter: blur(5px);
    }
    
    .comments-modal-container {
        position: relative;
        width: 100%;
        height: 100%;
        background: white;
        overflow: hidden;
        display: flex;
        flex-direction: column;
    }
    
    .comments-modal-header {
        background: #c41e3a;
        color: white;
       padding: 1.5rem 2rem;
        min-height: 70px;
        display: flex;
        justify-content: space-between;
        align-items: center;
        box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    }
    
    .comments-modal-header h3 {
        margin: 0;
        font-size: 1.4em;
    }
    
    .comments-modal-close {
        background: none;
        border: none;
        color: white;
        font-size: 1.5rem;
        width: 50px;
        height: 50px;
        border-radius: 50%;
        cursor: pointer;
        display: flex;
        align-items: center;
        justify-content: center;
        transition: background 0.3s ease;
    }
    
    .comments-modal-close:hover {
        background: rgba(255, 255, 255, 0.3);
    }
    
    .comments-modal-content {
        flex: 1;
        overflow-y: auto;
        padding: 0;
    }
    
    .comments-modal-inner {
        padding: 25px;
        max-width: 800px;
        margin: 0 auto;
    }
    
    .comentario-modal {
        padding: 20px 0;
        animation: fadeInUp 0.5s ease-out;
         border: 1px solid #ebebeb;
        padding: 10px 5px;
        margin: 5px;
        border-radius: 5px; 
    }
    
    .comentario-modal:last-child {
        border-bottom: none;
    }
    
    .comentario-modal strong {
        color: #333;
        font-size: 1.1em;
    }
    
    .comentario-modal small {
        color: #888;
        display: block;
        margin: 5px 0 10px 0;
    }
    
    .comentario-modal p {
        margin: 0;
        line-height: 1.6;
        color: #555;
         background: #f7f7f7;
        padding: 3px;
        border-radius: 5px;
    }
    
    @keyframes fadeInUp {
        from {
            opacity: 0;
            transform: translateY(20px);
        }
        to {
            opacity: 1;
            transform: translateY(0);
        }
    }
    
    /* Anuncios */
    .anuncio-container {
        margin: 30px 0;
        padding: 0;
    }
    
    .anuncio-placeholder {
        background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
        color: white;
        padding: 25px;
        border-radius: 12px;
        text-align: center;
        box-shadow: 0 4px 15px rgba(240, 147, 251, 0.3);
    }
    
    .anuncio-placeholder p {
        margin: 10px 0 0 0;
        opacity: 0.9;
    }
    
    /* Botón cargar más en modal */
    .load-more-modal-btn {
           background: #fff;
    color: #c41e3a;
    border: 1px solid #c41e3a;
    padding: 15px 30px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 16px;
    font-weight: 500;
    margin: 30px auto;
    display: block;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
    }
    
    .load-more-modal-btn:hover {
        transform: translateY(-2px);
        box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4);
    }
    
    .load-more-modal-btn:disabled {
        background: #ccc;
        cursor: not-allowed;
        transform: none;
        box-shadow: none;
    }
    
    /* Loading spinner */
    .loading-spinner {
        border: 3px solid #f3f3f3;
        border-top: 3px solid #667eea;
        border-radius: 50%;
        width: 30px;
        height: 30px;
        animation: spin 1s linear infinite;
        margin: 20px auto;
        display: none;
    }
    
    @keyframes spin {
        0% { transform: rotate(0deg); }
        100% { transform: rotate(360deg); }
    }
    
    /* Estilos para el modal de éxito */
    .modal-overlay {
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background: rgba(0, 0, 0, 0.6);
        display: flex;
        justify-content: center;
        align-items: center;
        z-index: 1000;
        backdrop-filter: blur(5px);
    }
    
    .modal-content {
        background: white;
        padding: 30px;
        border-radius: 15px;
        max-width: 500px;
        width: 90%;
        text-align: center;
        box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
        animation: modalFadeIn 0.3s ease-out;
        position: relative;
    }
    
    @keyframes modalFadeIn {
        from {
            opacity: 0;
            transform: scale(0.9) translateY(-20px);
        }
        to {
            opacity: 1;
            transform: scale(1) translateY(0);
        }
    }
    
    .modal-content h3 {
        margin-top: 0;
        color: #333;
        font-size: 1.4em;
        margin-bottom: 15px;
    }
    
    .modal-content p {
        margin: 10px 0;
        color: #555;
        line-height: 1.5;
    }
    
    .modal-buttons {
        margin-top: 25px;
        display: flex;
        gap: 15px;
        justify-content: center;
        flex-wrap: wrap;
    }
    
    .modal-btn {
        padding: 12px 25px;
        border: none;
        border-radius: 8px;
        cursor: pointer;
        text-decoration: none;
        display: inline-block;
        font-size: 14px;
        font-weight: 500;
        transition: all 0.3s ease;
        min-width: 120px;
    }
    
    .modal-btn-primary {
        background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
        color: white;
    }
    
    .modal-btn-primary:hover {
        transform: translateY(-2px);
        box-shadow: 0 5px 15px rgba(102, 126, 234, 0.4);
    }
    
    .modal-btn-secondary {
        background: #f8f9fa;
        color: #555;
        border: 2px solid #e9ecef;
    }
    
    .modal-btn-secondary:hover {
        background: #e9ecef;
        transform: translateY(-1px);
    }
    
    /* Estilos específicos para diamantes */
    .modal-diamantes {
        background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
        color: white;
    }
    
    .modal-diamantes h3 {
        color: white;
    }
    
    .modal-diamantes p {
        color: rgba(255, 255, 255, 0.9);
    }
    
    .modal-diamantes .modal-btn-primary {
        background: white;
        color: #667eea;
    }
    
    .modal-diamantes .modal-btn-primary:hover {
        background: #f8f9fa;
        box-shadow: 0 5px 15px rgba(255, 255, 255, 0.3);
    }
    
    .text-input{
        display:flex;    
        gap: 0.5rem;
    }
    
    /**estilos botones comentarios*/
    .toggle-btn {
        margin: 10px 0;
        padding: 8px 12px;
        background-color: #f0f0f0;
        border: none;
        cursor: pointer;
        font-weight: bold;
        border-radius: 6px;
        transition: background-color 0.3s ease;
    }
    .toggle-btn:hover {
        background-color: #e0e0e0;
    }
    .comentario-vacio {
        font-style: italic;
        color: #888;
        padding: 10px;
    }

.formulario-wrapper {
       transition: height 0.4s ease;
        overflow: hidden;
        height: 0;
}
.formulario-wrapper.activo {
        /* La clase activa simplemente permite que el script funcione, sin estilos aquí */
}
    
.tarios{
        padding: 0.4rem;
        background: #f0f0f0;
        width: 20rem;
        height: 20rem;
        align-items: center;
        justify-content: center;
        border-radius: 4px;
        border: 2px dashed #ccc;
        display: flex;
        text-align: center;
        margin-top: 10px;
}



/* ESTILOS SEARCH.PHP*/
.search-form-group {
    display: flex;
    gap: 0.5rem;
    justify-content: center;
    flex-wrap: wrap;
    max-width: 500px;
    margin: 0 auto;
}

.search-form-input {
    flex: 1;
    min-width: 250px;
    padding: 12px 16px;
    border: 1px solid #c3c3c3;
    border-radius: 6px;
    font-size: 16px;
    outline: none;
    transition: all 0.3s ease;
}

.search-form-input:focus {
    border-color: #a81729;
    box-shadow: 0 0 0 3px rgba(0, 124, 186, 0.2);
}

.search-form-button {
    padding: 12px 24px;
    background: #a81729;
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    min-width: 120px;
}

.search-form-button:hover {
    background: #fff;
    color:#a81729;
    border:1px solid #a81729;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 124, 186, 0.3);
}

.btn-load-more {
    padding: 1rem 2rem;
    background: #a81729;
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 1rem;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    min-width: 200px;
}

.btn-load-more:hover {
    background: #fff;
    border:1px solid #a81729;
    color: #a81729;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 124, 186, 0.3);
}

.btn-load-more:disabled {
    background: #6c757d;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}


    
    /* FIN ESTILOS COMENTARIOS */
    /* ESTILOS SEARCH.PHP */
     .search-form-group {
        flex-direction: column;
        align-items: stretch;
    }
    
    .search-form-input {
        min-width: auto;
    }
    
    
    
    /** ESTILOS BUSCADOR, MODAL, ETC **/
    /* Modal a pantalla completa */
.search-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: 10009;
    display: flex;
    align-items: stretch;
    justify-content: center;
}

.search-modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.95);
    backdrop-filter: blur(8px);
}

.search-modal-content {
    position: relative;
    width: 100%;
    /*margin-bottom: 10rem;*/
    /*height: 100%;*/
    height:100dvh;
    max-width: none;
    max-height: none;
    background: white;
    border-radius: 0;
    overflow: hidden;
    box-shadow: none;
    animation: modalSlideIn 0.3s ease-out;
    display: flex;
    flex-direction: column;
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: scale(0.95);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.search-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 2rem 3rem;
    background: #c41e3a;
    border-bottom: 1px solid #eee;
    flex-shrink: 0;
    min-height: 80px;
}

.search-modal-header h2 {
    margin: 0;
    color: #fff;
    font-size: 2rem;
    font-weight: 600;
}

.search-modal-close {
    background: none;
    border: none;
    color: white;
    font-size: 2rem;
    cursor: pointer;
    padding: 1rem;
    border-radius: 50%;
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.search-modal-close:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: scale(1.1);
}

.search-modal-body {
    padding: 3rem;
    flex: 1;
    overflow-y: auto;
    background: #fafafa;
    margin-bottom: 2rem;
}

.search-loading {
    text-align: center;
    padding: 5rem;
}

.search-spinner {
    width: 60px;
    height: 60px;
    border: 6px solid #f3f3f3;
    border-top: 6px solid #007cba;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 2rem;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.search-modal-actions {
    text-align: center;
    padding: 2rem 0;
    border-top: 2px solid #eee;
    margin-top: 3rem;
    background: white;
}

.btn-view-more {
    background: #fdfeff;
    color: #c41e3a;
    border: 2px solid #c41e3a;
    padding: 16px 40px;
    border-radius: 8px;
    font-size: 1.2rem;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-block;
}

.btn-view-more:hover {
    background: #c41e3a;
    color: #fff;
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(196, 30, 58, 0.3);
}

/* Secciones de resultados */
.results-section {
    margin-bottom: 5rem;
}

.results-section-title {
    font-size: 1.5rem;
    font-weight: bold;
    color: #333;
    margin-bottom: 1.5rem;
    padding-bottom: 0.5rem;
    border-bottom: 3px solid #c41e3a;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* Resultados de posts - diseño original */
.modal-result-item {
    display: flex;
    gap: 2rem;
    padding: 2rem;
    margin-bottom: 1rem;
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    text-decoration: none;
    color: inherit;
}

.modal-result-item:hover {
    background: #f8f9fa;
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.modal-result-item:last-child {
    border-bottom: none;
}

.modal-result-image {
    width: 150px;
    height: 100px;
    object-fit: cover;
    border-radius: 8px;
    flex-shrink: 0;
}

.modal-result-content {
    flex: 1;
}

.modal-result-title {
    font-size: 1.4rem;
    font-weight: bold;
    color: #333;
    margin: 0 0 1rem 0;
    line-height: 1.4;
}

.modal-result-excerpt {
    font-size: 1rem;
    color: #666;
    line-height: 1.6;
    margin: 0 0 1rem 0;
}

.modal-result-date {
    font-size: 0.9rem;
    color: #999;
    margin-top: 0.5rem;
}

/* Nuevo diseño para categorías y etiquetas */
.category-tag-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1rem;
}

.category-tag-item {
    display: block;
    padding: 1rem 1.5rem;
    background: linear-gradient(135deg, #f8f9fa, #e9ecef);
    border: 2px solid transparent;
    border-radius: 8px;
    text-decoration: none;
    color: #333;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.category-tag-item:hover {
    border-color: #c41e3a;
    background: linear-gradient(135deg, #fff, #f8f9fa);
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(196, 30, 58, 0.2);
}

.category-tag-item.category {
    border-left: 4px solid #007cba;
}

.category-tag-item.tag {
    border-left: 4px solid #28a745;
}

.category-tag-title {
    font-size: 1.1rem;
    font-weight: 600;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* Íconos para categorías y etiquetas */
.category-icon {
    color: #007cba;
    font-size: 1.2rem;
}
.category-info h3{
    margin: 0 0 10px 0;
    color: #333;
}
.category-info p{
    color: #666;
    margin: 10px 0;
    line-height: 1.5;
}
.tag-icon {
    color: #28a745;
    font-size: 1rem;
}

.modal-ad-placeholder {
    background: linear-gradient(135deg, #f9f9f9, #e9ecef);
    padding: 2rem;
    text-align: center;
    border: 2px dashed #ccc;
    margin: 2rem 0;
    border-radius: 12px;
    color: #666;
    font-size: 1.2rem;
    font-weight: 500;
}

/* Mensaje de no resultados */
.no-results-message {
    text-align: center;
    padding: 5rem 2rem;
    color: #666;
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.no-results-message h3 {
    font-size: 2rem;
    margin-bottom: 1rem;
    color: #555;
}

.no-results-message p {
    font-size: 1.2rem;
    line-height: 1.6;
}

/* Mensaje de error */
.error-message {
    text-align: center;
    padding: 5rem 2rem;
    color: #dc3545;
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    border-left: 5px solid #dc3545;
}

.error-message h3 {
    font-size: 2rem;
    margin-bottom: 1rem;
}

.error-message p {
    font-size: 1.2rem;
    line-height: 1.6;
}

/* ESTILOS SEARCH.PHP */
.search-form-group {
    display: flex;
    gap: 0.5rem;
    justify-content: center;
    flex-wrap: wrap;
    max-width: 500px;
    margin: 0 auto;
}

.search-form-input {
    flex: 1;
    min-width: 250px;
    padding: 12px 16px;
    border: 1px solid #c3c3c3;
    border-radius: 6px;
    font-size: 16px;
    outline: none;
    transition: all 0.3s ease;
}

.search-form-input:focus {
    border-color: #a81729;
    box-shadow: 0 0 0 3px rgba(0, 124, 186, 0.2);
}

.search-form-button {
    padding: 12px 24px;
    background: #a81729;
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    min-width: 120px;
}

.search-form-button:hover {
    background: #fff;
    color:#a81729;
    border:1px solid #a81729;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 124, 186, 0.3);
}

.btn-load-more {
    padding: 1rem 2rem;
    background: #a81729;
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 1rem;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    min-width: 200px;
}

.btn-load-more:hover {
    background: #fff;
    border:1px solid #a81729;
    color: #a81729;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 124, 186, 0.3);
}

.btn-load-more:disabled {
    background: #6c757d;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}
/* Estilos base para los resultados de búsqueda */
.latest-article {
    display: flex;
    gap: 1rem;
    margin-bottom: 2rem;
    padding: 1rem;
    background: #fff;
    border-radius: 0.5rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    border: 1px solid #e9ecef;
}

.latest-article:hover {
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
    transform: translateY(-2px);
}

/* Contenedor de la imagen */
.latest-article > a:first-child {
    flex-shrink: 0;
    width: 200px;
    height: 150px;
    border-radius: 6px;
    overflow: hidden;
    display: block;
}

/* Imagen del artículo */
.article-image.ancho {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 6px;
    transition: transform 0.3s ease;
}

.article-image.ancho:hover {
    transform: scale(1.05);
}

/* Contenido del artículo */
.article-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

/* Título del artículo */
.card-title {
    margin: 0 0 0.5rem 0;
    font-size: 1.25rem;
    font-weight: 600;
    line-height: 1.3;
}

.card-title a {
    color: #333;
    text-decoration: none;
    transition: color 0.3s ease;
}

.card-title a:hover {
    color: #007cba;
}

/* Fecha */
.date {
    margin: 0 0 1rem 0;
    font-size: 0.875rem;
    color: #7f8c8d;
    font-weight: 500;
}

/* Excerpt */
.article-excerpt {
    margin: 0 0 1rem 0;
    line-height: 1.6;
    color: #555;
    flex-grow: 1;
}

.article-excerpt a {
    color: inherit;
    text-decoration: none;
}

/* Botón de leer más */
.btn.post-link {
      display: inline-block;
    padding: 0.5rem 1rem;
    background: #c41e3a;
    color: #fff;
    text-decoration: none;
    border-radius: 4px;
    font-weight: 500;
    transition: all 0.3s ease;
    align-self: flex-start;
    border:1px solid #a81729;
}

.btn.post-link:hover {
    background: #a81729;
    color:#fff;
    transform: translateY(-1px);
}

/* Estilos para anuncios */
.anuncio-placeholder {
    background: #f8f9fa;
    padding: 2rem;
    text-align: center;
    border: 2px dashed #dee2e6;
    margin: 2rem 0;
    border-radius: 8px;
    color: #6c757d;
    font-weight: 500;
}
/* Fix para imágenes que no cargan */
.article-image.ancho[src*="placeholder"] {
    background: #f8f9fa;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #6c757d;
    font-size: 0.875rem;
}

.article-image.ancho[src*="placeholder"]:after {
    content: "📷 Sin imagen";
}


/* Asegurar que el grid de otras coincidencias sea responsive */
.otros-resultados-grid {
    display: grid;
    gap: 1rem;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
}
    
    
/* ESTILOS CONTACT Y VERIFICAR CONTACT */
.pistas {
  background-color: #fff5cc;
  border: 1px solid #ffd700;
  padding: 15px;
  margin-top: 20px;
  border-radius: 8px;
  font-size: 1rem;
  color: #333;
}

.pistas ul {
  padding-left: 1.2rem;
}

.pistas li {
  margin-bottom: 6px;
}

 .contact-content {
        padding: 20px;
        background: #fff;
        border-radius: 12px;
        box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
        line-height: 1.7;
        font-size: 1rem;
        color: #333;
    }
    .contact-content h2, .contact-content h3 {
      margin-top: 1rem;
    color: #9d0101;
    /* border-bottom: 2px solid #f0f0f0; */
    /* padding-bottom: 0.5rem;*/
    }
    .contact-content p {
        margin-bottom: 1rem;
    }
    .contact-content ul, .contact-content ol {
        margin: 1rem 0;
        padding-left: 2rem;
    }
    .contact-content li {
        margin-bottom: 0.5rem;
    }
      #contact-box {
       max-width: 600px;
    margin: 2rem auto;
    border: 2px solid #777777;
    border-radius: 10px;
       padding: 0rem 0.5rem;
    background: #fefefe;
    /* box-shadow: 0 0 10px rgba(0, 0, 0, 0.05);*/
  }

  #contact-box h2 {
    font-size: 1.4rem;
    cursor: pointer;
    margin-bottom: 1rem;
    /*color: #0077cc;*/
  }

  #hidden-form {
    animation: fadeIn 0.3s ease-in-out;
    padding: 0.5rem;
  }

  #hidden-form p {
    font-size: 1rem;
    margin-bottom: 1rem;
  }

  #hidden-form button {
    background-color: #a81729;
    color: white;
    padding: 0.6rem 1.2rem;
    border: none;
    border-radius: 5px;
    cursor: pointer;
  }

  #hidden-form button:hover {
    background-color: #005fa3;
  }

  @keyframes fadeIn {
    from { opacity: 0; transform: scale(0.95); }
    to { opacity: 1; transform: scale(1); }
  }
    
    
 .contact-verify {
    background: #f9f9f9;
    border: 2px solid #ccc;
    padding: 20px;
    max-width: 600px;
    margin: 2rem auto;
    border-radius: 10px;
    font-family: Arial, sans-serif;
    box-shadow: 0 0 10px rgba(0,0,0,0.1);
  }

  .contact-verify h2 {
    margin-top: 0;
    font-size: 1.6rem;
    color: #333;
  }

  .contact-verify p {
    font-size: 1rem;
    color: #444;
  }

  .contact-verify form {
    margin-top: 15px;
  }

  .contact-verify label {
    font-weight: bold;
    display: block;
    margin-bottom: 5px;
  }

  .contact-verify input[type="text"] {
    width: 100%;
    padding: 10px;
    margin-bottom: 15px;
    border: 1px solid #bbb;
    border-radius: 5px;
    font-size: 1rem;
  }

  .contact-verify button {
      background-color: #a81729;
    color: white;
    padding: 0.6rem 1.2rem;
    border: none;
    border-radius: 5px;
    cursor: pointer;
  }

  .contact-verify button:hover {
    background-color: #005bb5;
  }

  .contact-verify code {
    background: #eee;
    padding: 3px 6px;
    border-radius: 5px;
    font-size: 1rem;
    display: inline-block;
    margin-top: 10px;
  }
  
  .real{
          padding: 0.5rem;
    margin: 0.8rem 0.3rem;
    background: #ccc;
    border-radius: 0.3rem;
  }
  
  
/* ESTILOS BANNER INFERIOR FLOTANTE */
    
.hidden {
  display: none;
}
.confirm-modal {
  position: fixed;
  bottom: 100px;
  left: 50%;
      min-width: 20rem;
  transform: translateX(-50%);
  background: #fff;
  border: 2px solid #ccc;
  padding: 1rem;
  z-index: 9997;
  border-radius: 10px;
  box-shadow: 0 0 10px rgba(0,0,0,0.25);
  text-align: center;
}
.confirm-content {
  display: flex;
  flex-direction: column;
  gap: 10px;
      color: #333;
  align-items: center;
}
.confirm-content button {
      padding: 5px 15px;
    cursor: pointer;
    background: #a81729;
    color: #ccc;
    border: 1px solid #fff;
    border-radius: 0.3rem;
}
    
  .overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    z-index: 9996;
  }   
    .buttoModal{
        display: flex;
    }
    
    
    
/* ESTILOS AUTHOR */  
    .cabecera-author {
  display: flex;
  flex-wrap: wrap;
  background: #f8f8f8;
  gap: 2rem;
  padding: 2rem;
  margin: 0 auto 3rem;
  border-radius: 12px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.05);
}

.author-header {
  display: flex;
  gap: 1rem;
  align-items: center;
}

.author-header img {
  width: 96px;
  height: 96px;
  border-radius: 50%;
  object-fit: cover;
  box-shadow: 0 0 6px rgba(0,0,0,0.1);
}

.author-header h1 {
  font-size: 1.8rem;
  font-weight: bold;
  color: #333;
  margin: 0;
}

.author-header p {
  margin: 0.5rem 0 0;
  color: #555;
  font-size: 1rem;
}

.url-author {
    margin-top: 1rem;
    font-size: 1rem;
    color: #c41e3a;
    background: #ffffff;
    border: 1px solid #ccc;
    padding: 5px;
    border-radius: 5px;
}

.url-author a {
  color: #c41e3a;
  text-decoration: none;
}

.url-author a:hover {
  text-decoration: underline;
}

.contenido-izquierda-author {
  flex: 1;
  min-width: 280px;
}

.imagen-derecha-author {
  flex: 1;
  min-width: 280px;
  display: flex;
  align-items: flex-start;
}


.posts-list{
        display:flex; 
        flex-wrap:wrap; 
        gap:1rem;
    }
    .posts-list a{
        width:280px;
        border:1px solid #eee;
        border-radius:8px;
        overflow:hidden;
        text-decoration:none;
        color:#333;
    }
.author-url{
    margin: 1rem 0 0 0;
    text-align: center;
    background: #f5f5f5;
    padding: 5px;
    border-radius: 5px;
    border: 1px solid #e9e9e9;
}

.author-url h3{
font-size:1rem;
}

.author-description-container {
  position: relative;
  max-width: 100%;
}

.author-description {
  background: #fff;
  padding: 1rem;
  border: 1px solid #ddd;
  border-radius: 8px;
  color: #555;
  font-size: 1rem;
  line-height: 1.6;
  box-shadow: 0 4px 8px rgba(0,0,0,0.03);
  max-height: 120px;
  overflow: hidden;
  transition: max-height 0.3s ease, overflow 0.3s ease;
}

.author-description.expanded {
  max-height: 200px;
  overflow-y: auto;
}

.description-toggle {
  background: none;
  border: none;
  color: #c41e3a;
  cursor: pointer;
  margin-top: 0.5rem;
  font-size: 0.95rem;
  font-weight: bold;
  padding: 0;
}

.description-toggle:hover {
  text-decoration: underline;
}

.author-card-fade {
  opacity: 0;
  transition: opacity 0.5s ease-in-out;
}
.author-card-fade.show {
  opacity: 1;
} 
    
@media (max-width: 900px){
    .posts-list a{
            width: 240px;
            border: 1px solid #eee;
            border-radius: 8px;
            overflow: hidden;
            text-decoration: none;
            color: #333;
        }
}    
    /* Responsive */
@media (max-width: 768px) {
    
    .boton-meta-like{
        display: none;
    }
         .cabecera-author {
    flex-direction: column;
    align-items: center;
    flex-wrap: nowrap;
  }
.contenido-izquierda-author{
    max-width:280px;
}
  .author-header {
    flex-direction: column;
    text-align: center;
  }

  .url-author {
    text-align: center;
  }

  .imagen-derecha-author {
    justify-content: center;
  }
   .posts-list a{
            width: 100%;
            border: 1px solid #eee;
            border-radius: 8px;
            overflow: hidden;
            text-decoration: none;
            color: #333;
        }
        
    .category-card{
            max-height:100%;
            
}
    .categoria-cabecera{
            max-height:100%;
}
        
    .comments-modal-header {
            padding: 15px 20px;
}
        
    .comments-modal-inner {
            padding: 20px 15px;
}
        
    .text-input{
            display: flex;
            gap: 0.1rem;
            flex-direction: column;
}
        
    .modal-content {
            padding: 20px;
            margin: 20px;
}
        
    .modal-buttons {
            flex-direction: column;
}
        
    .modal-btn {
            width: 100%;
}
        
    .tarios{
            display: none;
}

    .search-modal-header {
        padding: 1.5rem 2rem;
        min-height: 70px;
    }
    
    .search-modal-header h2 {
        font-size: 1.5rem;
    }
    
    .search-modal-close {
        width: 50px;
        height: 50px;
        font-size: 1.5rem;
    }
    
    .search-modal-body {
        padding: 2rem 1.5rem;
    }
    
    .modal-result-item {
        flex-direction: column;
        gap: 1rem;
        padding: 1.5rem;
    }
    
    .modal-result-image {
        width: 100%;
        height: 200px;
    }
    
    .modal-result-title {
        font-size: 1.2rem;
    }
    
    .modal-result-excerpt {
        font-size: 0.95rem;
    }

    .category-tag-grid {
        grid-template-columns: 1fr;
    }
    
    
  /* ESTILOS SEARCH.PHP */
    .search-form-group {
        flex-direction: column;
        align-items: stretch;
    }
    
    .search-form-input {
        min-width: auto;
    }
    
      .latest-article > a:first-child {
        width: 150px;
        height: 120px;
    }
    
    .card-title {
        font-size: 1.1rem;
    }
    
    .latest-article {
        gap: 0.75rem;
        padding: 0.75rem;
    }
    
}

@media (max-width: 480px) {
    .search-modal-header {
        padding: 1rem;
        min-height: 60px;
    }
    
    .search-modal-header h2 {
        font-size: 1.3rem;
    }
    
    .search-modal-body {
        padding: 1rem;
    }
    
    .modal-result-item {
        padding: 1rem;
    }
    
    .btn-view-more {
        padding: 14px 30px;
        font-size: 1rem;
    }

    .results-section-title {
        font-size: 1.3rem;
    }
}
    /** FIN ESTILOS BUSCADOR **/




    .search-modal-results {
        padding: 1rem;
        border-radius: 5px;
    }























/* Media Queries Combinados y Organizados */

/* Para pantallas medianas (laptops pequeñas o tablets en landscape) */
@media (max-width: 1200px) {
  .grid-container-destacado {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* Para tablets o pantallas medianas */
@media (max-width: 1035px) {
  .main-content {
    grid-template-columns: 1fr;
    gap: 20px;
    display: grid;
    justify-content: center;
  }
  
  .featured-top {
    grid-template-columns: 1fr;
  }
  
  .featured-grid {
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  }
  
  .header-bottom .container {
    flex-direction: column;
    gap: 15px;
  }
  
  .main-menu {
    flex-wrap: wrap;
    justify-content: center;
  }
}

/* Para tablets */
@media (max-width: 1024px) and (min-width: 769px) {
  .card-title-destacadoshead {
    font-size: 0.8rem;
  }
}

@media (max-width: 1024px) {
  .header-bottom .container {
    padding: 0 15px;
  }
  
  .main-menu {
    gap: 1px;
  }
  
  .main-menu a {
    padding: 6px 6px;
    font-size: 16px;
  }
  
  .grid-container-destacado {
    grid-template-columns: repeat(3, 1fr);
    grid-template-rows: repeat(4, 180px);
  }
  
  .card-destacado:nth-child(1) {
    grid-column: 1 / 2;
    grid-row: 1 / 2;
  }
  
  .card-destacado:nth-child(2) {
    grid-column: 2 / 4;
    grid-row: 1 / 3;
  }
  
  .card-destacado:nth-child(3) {
    grid-column: 1 / 2;
    grid-row: 2 / 3;
  }
  
  .card-destacado:nth-child(4) {
    grid-column: 1 / 4;
    grid-row: 3 / 4;
  }
  
  .card-destacado:nth-child(5) {
    grid-column: 1 / 4;
    grid-row: 4 / 5;
  }
}

/* Para tablets */
@media (max-width: 968px) {
  .cabecera-categoria {
    gap: 1.5rem;
    padding: 1.5rem;
  }

  .category-header h1 {
    font-size: 2rem;
  }

  .imagen-derecha {
    height: 250px;
  }
}

/* Para tablets o pantallas pequeñas */
@media (max-width: 900px) {
  .grid-container-destacado {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* Para móviles - Media Query Principal */
@media (max-width: 768px) {
  /* Comentarios */
  .comment-form > div:first-child {
    grid-template-columns: 1fr !important;
  }
  
  .comment-header {
    flex-direction: column !important;
    align-items: flex-start !important;
    gap: 0.5rem;
  }

  /* Paginación */
  .pagination-buttons {
    gap: 4px;
  }
  
  .btn-pagination {
    padding: 6px 12px;
    font-size: 12px;
    min-width: 35px;
  }
  
  .pagination-jump {
    flex-direction: column;
    gap: 10px;
  }
  
  .page-input {
    width: 100px;
  }
  
  #posts {
    grid-template-columns: 1fr;
  }

  /* Contenedor horizontal scroll */
  .horizontal-scroll-container {
    flex-direction: column;
    gap: 0.75rem;
    display: none;
  }
  
  .card-article-destacadoshead {
    flex: none;
    width: 100%;
  }
  
  .card-title-destacadoshead {
    font-size: 0.9rem;
    -webkit-line-clamp: 3; /* Más líneas en móvil */
  }

  /* Layout principal */
  .container {
    flex-direction: column;
    padding: 1rem;
    gap: 1rem;
  }
  
  /* Header */
  header h1 {
    font-size: 2rem;
  }
  
  /* Post detail */
  .post-detail {
    padding: 0.2rem 0.2rem;
    margin: 0.2rem;
  }
  
  .post-detail h2 {
    font-size: 2rem;
  }
  
  /* Cards */
  .card-body {
    padding: 0.6rem;
  }
  
  /* Navegación */
  nav {
    flex-wrap: wrap;
    gap: 1rem;
  }
  
  #posts {
    padding: 1rem;
  }

  /* Menu toggle */
  .menu-toggle {
    display: block;
  }
  
  .header-top .span {
    display: none;
  }
  
  .header-bottom .ocult {
    display: none;
  }
  
  .header-bottom {
    padding: 5px;
  }
  
  .desktop-content {
    display: none;
  }

  .header-bottom .container {
    justify-content: space-between;
  }

  /* Social links */
  .social-links {
    display: flex;
    align-items: center;
    gap: 0.5em;
  }

  .social-links a {
    margin-right: 10px;
  }
  
  /* Social links */
  .menu-divisor {
    display: none;
    align-items: center;
    gap: 0.5em;
  }

  .menu-divisor a {
    margin-right: 10px;
  }
  

  /* Cabecera categoría */
  .cabecera-categoria {
    flex-direction: column;
    text-align: center;
    padding: 1rem;
    margin-bottom: 3rem;
    min-height: max-content;
    gap: 1.5rem;
  }

  .contenido-izquierda {
    max-width: 100%;
  }

  .category-header h1 {
    font-size: 1.8rem;
  }

  .category-description {
    font-size: 1rem;
    text-align: left;
  }

  .imagen-derecha {
    max-width: 100%;
    height: 200px;
  }

  /* Latest article */
  .latest-article {
    flex-direction: column;
    gap: 15px;
    padding: 5px;
  }

  .latest-article .article-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
  }

  .latest-article .article-meta,
  .latest-article .meta {
    flex-wrap: wrap;
    gap: 10px;
  }

  .latest-section {
    padding: 5px 5px;
  }

  /* Mobile menu */
  #mobile-menu-toggle {
    display: block !important;
  }
  
  nav ul {
    display: none;
    width: 100%;
    flex-direction: column;
    background: rgba(0,0,0,0.2);
    border-radius: 8px;
    padding: 1rem;
    margin-top: 1rem;
  }
  
  nav ul.active {
    display: flex;
  }
  
  nav ul li {
    margin: 0.5rem 0;
  }
  
  header h1 {
    font-size: 2rem !important;
  }
  
  header p {
    font-size: 1.1rem !important;
  }
  
  .hero-stats {
    gap: 1.5rem !important;
  }
  
  /* Breadcrumb search */
  .breadcrumb-search {
    flex-direction: column;
    gap: 1rem;
  }
  
  .breadcrumb-search input {
    width: 100% !important;
  }

  /* Breadcrumbs categorías */
  .breadcrumbs-categorias {
    display: flex;
    padding: 1rem;
    gap: 20px;
    flex-direction: column;
  }

  /* Grande destacado - FIX IMPORTANTE */
  .grande-destacado {
    grid-column: span 1;
    grid-row: span 1;
  }
  
  .grid-container-destacado {
    grid-template-columns: 1fr;
    grid-template-rows: repeat(5, 200px);
  }
  
  .card-destacado:nth-child(1),
  .card-destacado:nth-child(2),
  .card-destacado:nth-child(3),
  .card-destacado:nth-child(4),
  .card-destacado:nth-child(5) { 
    grid-column: 1 / 2;
  }
  
  .card-destacado:nth-child(1) { grid-row: 1 / 2; }
  .card-destacado:nth-child(2) { grid-row: 2 / 3; }
  .card-destacado:nth-child(3) { grid-row: 3 / 4; }
  .card-destacado:nth-child(4) { grid-row: 4 / 5; }
  .card-destacado:nth-child(5) { grid-row: 5 / 6; }
  
  .content-destacado h2 {
    font-size: 1.1rem;
  }
  
  .grande-destacado .content-destacado h2 {
    font-size: 1.2rem;
  }
}

/* Para pantallas muy pequeñas */
@media (max-width: 651px) {
  .boton-search-page {
    width: 100%;
  }
  
  .form-search-page {
    width: 100% !important;
    max-width: 100% !important;
  }
}

/* Para móviles */
@media (max-width: 600px) {
  .grid-container-destacado {
    grid-template-columns: 1fr;
  }
  
  /* Hacemos que las tarjetas grandes ya no ocupen dos columnas */
  .grande-destacado {
    grid-column: span 1 !important;
    grid-row: span 1 !important;
  }
  
  .breadcrumbs-categorias {
    display: flex;
    padding: 1rem;
    gap: 20px;
    flex-direction: column;
  }
  
  
  /* ESTILOS SEARCH.PHP */
   .latest-article {
        flex-direction: column;
        gap: 1rem;
    }
    
    /* La imagen ocupará todo el ancho en móvil */
    .latest-article > a:first-child {
        width: 100%;
        height: 200px;
        order: -1; /* Imagen arriba */
    }
    
    .article-content {
        order: 1;
    }
    
    .card-title {
        font-size: 1.2rem;
        margin-bottom: 0.75rem;
    }
    
    .article-excerpt {
        margin-bottom: 1rem;
        font-size: 0.95rem;
    }
    
    .btn.post-link {
        align-self: stretch;
        text-align: center;
        padding: 0.75rem;
    }
     .search-form-group {
        flex-direction: column;
        gap: 0.75rem;
    }
    
    .search-form-input {
        min-width: auto;
        width: 100%;
    }
    
    .search-form-button {
        width: 100%;
        min-width: auto;
    }
     .btn-load-more {
        width: 100%;
        padding: 1rem;
        font-size: 1rem;
    }
        .otros-resultados-grid {
        grid-template-columns: 1fr !important;
    }
    
    .otros-resultados-grid > div {
        padding: 0.75rem;
    }
}

/* Para móviles - Media Query Complementario */
@media (max-width: 480px) {
  .header-bottom .container {
    padding: 0 10px;
  }
  
  .social-links a {
    margin-right: 8px;
    font-size: 16px;
    gap: 0.5em;
  }
  
  .language-selector {
    padding: 4px 8px;
    font-size: 14px;
  }
  .icon-search {
    padding:10px;
    /*font-size: 14px;*/
  }
  
  /* Header */
  header h1 {
    font-size: 1.8rem;
  }
  
  .post-detail {
    padding: 0rem 0rem;
  }
  
  .card-body {
    padding: 1rem;
  }
  
  .card-title {
    font-size: 1.3rem;
  }

  /* Cabecera categoría */
  .cabecera-categoria {
    padding: 0.5rem;
  }

  .category-header h1 {
    font-size: 2rem;
  }
  
  .category-header {
           display: flex;
        justify-content: center;
        align-items: center;
  }
  
  .url-category {
    text-align: center;
    color: #c41e3a;
    padding: 2px;
  }

  .category-description {
    font-size: 0.9rem;
  }

  .imagen-derecha {
    height: 180px;
  }
  
  .cabecera-search-head {
    display: flex;
    max-height: 350px;
    background: #f0f0f0;
    gap: 2rem;
    padding: 2rem;
    margin: 0;
    height: 100%;
    flex-direction: column;
  }
  
  .searchher {
    padding: 1px !important;
  }
  
  .searchher2 {
    padding: 1px !important;
  }
  
  .boton-search-page {
    width: 100%;
  }

  /* Latest articles */
  .latest-section h3 {
    font-size: 1.5rem;
  }

  .latest-article .article-content h4,
  .latest-article .content h4 {
    font-size: 1rem;
  }

  .latest-article .article-excerpt {
    font-size: 0.85rem;
  }

  /* Hero stats */
  .hero-stats {
    flex-direction: column;
    gap: 1rem !important;
  }
  
  .hero-stats > div {
    padding: 1rem;
    background: rgba(255,255,255,0.1);
    border-radius: 10px;
    backdrop-filter: blur(10px);
  }
  
  
  /* ESTILOS SEARCH.PHP */
   .latest-article {
        margin-bottom: 1.5rem;
        padding: 1rem;
        margin-left: -0.5rem;
        margin-right: -0.5rem;
        border-radius: 0;
        border-left: none;
        border-right: none;
    }
    
    .latest-article > a:first-child {
        height: 180px;
        border-radius: 4px;
    }
    
    .card-title {
        font-size: 1.1rem;
        line-height: 1.4;
    }
    
    .date {
        font-size: 0.8rem;
    }
    
    .article-excerpt {
        font-size: 0.9rem;
        line-height: 1.5;
    }
    
    .anuncio-placeholder {
        margin-left: -0.5rem;
        margin-right: -0.5rem;
        border-radius: 0;
        border-left: none;
        border-right: none;
        padding: 1.5rem 1rem;
    }
}

/* Estilos si el usuario tiene activado modo oscuro */
