html, body{
    height: 100%;
    margin: 0;
    display: flex;
    flex-direction: column;
}

body {
    font-family: "Poppins", sans-serif;
    background: #fdfaf6; /* Un blanco "papel" más cálido, tipo cava */
    color: #2c3e50;
}

.container{
    width: 90%;
    max-width: 1100px;
    margin: auto;
}

header {
    background: linear-gradient(135deg, #0038a8, #d52b1e); /* Los colores de la bandera en degradado noble */
    padding: 15px 0;
    color: white;
    border-bottom: 3px solid #c5a059; /* Un detalle dorado */
}

.header-flex{
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.site-title{
    font-size: 1.8rem;
    font-weight: bold;
    color: white;
}

.site-title a{
    color: white;
    text-decoration: none;
}

nav a{
    color: white;
    text-decoration: none;
    margin-left: 20px;
    font-weight: 500;
    transition: 0.3s;
}

nav a:hover{
    color: #f7d7b0;
}

.search-wrapper {
    position: relative;
    max-width: 400px;
    margin: 10px auto;
}

#search-results {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    border-radius: 0 0 10px 10px;
    box-shadow: 0 8px 16px rgba(0,0,0,0.2);
    z-index: 1000;
    max-height: 400px;
    overflow-y: auto;
}

.search-result-item {
    padding: 15px;
    border-bottom: 1px solid #eee;
    transition: background 0.2s;
}

.search-result-item:hover {
    background: #fdfaf6; /* Tu color crema de fondo */
}

.search-result-item h4 {
    margin: 0;
    color: #0038a8; /* Azul bandera */
    font-size: 1.1rem;
}

.search-result-item p {
    margin: 5px 0 0;
    font-size: 0.85rem;
    color: #666;
}

.search-result-item a {
    text-decoration: none;
}

.hero{
    background-size: cover;
    color: white;
    padding: 100px 0;
    text-align: center;
    border-radius: 12px;
    margin-bottom: 40px;
    position: relative;
    margin-top: 30px;
}

.hero::before{
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.1);
    border-radius: 12px;
    z-index: 0;
}

.hero-title, .hero-text{
    position: relative;
    z-index: 1;
}

.hero-title {
    font-family: "Poppins", sans-serif;
    font-size: 3.5rem;
    font-weight: 800;
    text-transform: uppercase;
    /* Degradado metálico dorado */
    background: linear-gradient(90deg, #c5a059, #f7d7b0, #c5a059);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
}

.hero-text{
    font-size: 1.2rem;
    max-width: 700px;
    margin: 0 auto;
    padding: 10px;
    border-radius: 10px;
    background-color: rgba(0, 0, 0, 0.65); /* Un poco más de contraste */
    color: #ffffff;
    border: 1px solid #c5a059; /* Borde dorado fino */
    line-height: 1.6;
    font-weight: 500;
}

.about-section{
    background: white;
    padding: 40px;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    margin-top: 40px;
    text-align: center;
}

.about-section h1{
    font-size: 2.5rem;
    font-weight: 800;
    color: #0038a8;
    margin-bottom: 20px;
}

.about-section p{
    font-size: 1.1rem;
    line-height: 1.8;
    color: #555;
    max-width: 800px;
    margin: 0 auto 25px auto;
}

.about-section h2{
    font-size: 1.8rem;
    margin-top: 30px;
    margin-bottom: 15px;
    color: #d52b1e;
}

.about-section ul{
    list-style: none;
    padding: 0;
}

.about-section ul li{
    font-size: 1.1rem;
    padding: 8px 0;
}

.about-section a{
    color: #4facfe;
    text-decoration: none;
    font-weight: 600;
}

.about-section a:hover{
    color: #ffa751;
}

.blog-preview{
    display: flex;
    align-items: center;
    background: white;
    margin: 25px 0;
    padding: 20px;
    border-radius: 12px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.blog-preview img{
    width: 45%;
    border-radius: 10px;
}

.blog-preview .content{
    width: 55%;
    padding: 0 20px;
}

.blog-preview h2{
    margin-top: 0;
    color: #0038a8;
}

.read-more{
    display: inline-block;
    margin: 10px;
    background: #0038a8;
    border: 1px solid #002670;
    font-weight: 600;
    letter-spacing: 0.5px;
    color: white;
    padding: 8px 15px;
    border-radius: 6px;
    text-decoration: none;
    transition: 0.3s;
}

.read-more:hover{
    background: #d52b1e; /* Cambio a rojo al pasar el mouse */
    border-color: #a01f16;
    color: white;
}

.blog-preview.reverse{
    flex-direction: row-reverse;
}

.page-content{
    background: white;
    padding: 30px;
    border-radius: 12px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    margin-top: 30px;
}

.page-content img{
    max-width: 100%;
    margin: 15px 0;
    border-radius: 10px;
}

.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-top: 40px;
    padding: 20px 0;
}

.pagination a.prev, 
.pagination a.next {
    display: inline-block;
    margin: 10px;
    background: #0038a8;
    border: 1px solid #002670;
    font-weight: 600;
    letter-spacing: 0.5px;
    color: white;
    padding: 8px 15px;
    border-radius: 6px;
    text-decoration: none;
    transition: 0.3s;
    font-weight: 500;
    font-family: sans-serif; /* O la fuente que estés usando */
}

.pagination a.prev:hover, 
.pagination a.next:hover {
    background: #d52b1e; /* Cambio a rojo al pasar el mouse */
    border-color: #a01f16;
    color: white;
}

.page-number {
    margin: 0 15px;
    color: #555;
    font-style: italic;
    font-size: 0.9em;
}

footer{
    margin-top: 40px;
    text-align: center;
    background: #222;
    color: #ccc;
    padding: 10px;
}

footer a{
    color: #ccc;
}

/* --- RESPONSIVE DESIGN --- */

@media (max-width: 768px) {
    /* Ajustes del Header */
    .header-flex {
        flex-direction: column;
        text-align: center;
    }

    nav {
        margin-top: 15px;
    }

    nav a {
        margin: 0 10px;
        display: inline-block;
    }

    /* Ajustes del Hero (Menos agresivo en móvil) */
    .hero {
        padding: 60px 20px;
        margin-top: 15px;
    }

    .hero-title {
        font-size: 2rem; /* Título más pequeño para que no se corte */
    }

    .hero-text {
        font-size: 1rem;
        line-height: 1.4;
    }

    /* El Blog Preview: Clave para el móvil */
    .blog-preview, 
    .blog-preview.reverse {
        flex-direction: column; /* Apilamos imagen arriba y texto abajo */
        text-align: center;
    }

    .blog-preview img, 
    .blog-preview .content {
        width: 100%; /* Ocupan todo el ancho */
        padding: 10px 0;
    }

    .blog-preview .content {
        padding: 15px 0 0 0;
    }

    /* Buscador responsive */
    .search-wrapper {
        max-width: 90%;
    }

    /* Botones de paginación */
    .pagination {
        flex-direction: column;
    }
    
    .page-number {
        margin: 10px 0;
    }
}