html,
body {
    font-family: 'Roboto', 'Open Sans', -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
    line-height: 1.6;
    margin: 0;
    padding: 0;
    background: #FFFFFF;
    color: #333333;
    width: 100%;
    overflow-x: hidden;
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

img,
video,
iframe,
canvas,
audio {
    max-width: 100%;
    height: auto;
    display: block;
}

.container {
    max-width: 1080px;
    margin: auto;
    padding: 0 20px;
    width: 100%;
}

header {
    background: #FFFFFF;
    color: #333333;
    padding: 0.8rem 0; /* Reducido para hacer la cabecera más compacta */
    border-bottom: 1px solid #EEEEEE;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
    position: sticky;
    top: 0;
    z-index: 1000;
    transition: box-shadow 0.3s ease;
}

header .desktop-nav a {
    color: #333333;
    text-decoration: none;
    margin-left: 15px; /* Espaciado ajustado */
    padding: 5px 0;
    font-weight: 500;
    transition: color 0.3s ease;
}

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

header h1 {
    margin: 0;
    flex-shrink: 0;
}

header h1 a {
    color: #333333;
    text-decoration: none;
    font-size: 1.8em;
    font-weight: bold;
}

header h1 a i {
    color: #007BFF;
    margin-right: 5px;
}

header .desktop-nav {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    align-items: center;
}

header .desktop-nav a {
    color: #333333;
    text-decoration: none;
    margin-left: 20px;
    padding: 5px 0;
    font-weight: 500;
    transition: color 0.3s ease;
}

header .desktop-nav a:hover {
    color: #007BFF;
}

.menu-toggle {
    display: none;
    font-size: 1.8em;
    background: none;
    border: none;
    color: #333333;
    cursor: pointer;
    padding: 5px;
}

header .mobile-nav {
    display: flex;
    flex-direction: column;
    width: 100%;
    background-color: #007BFF;
    position: fixed; /* Cambiado a fixed para que ocupe toda la pantalla */
    top: 0;
    left: -100%; /* Inicialmente fuera de la pantalla */
    height: 100%; /* Ocupa toda la altura */
    overflow-y: auto; /* Para scroll si el contenido es largo */
    z-index: 1000;
    padding: 10px 0;
    box-shadow: 0 5px 10px rgba(0,0,0,0.3);
    transition: left 0.3s ease-in-out; /* Transición para el deslizamiento */
}

header .mobile-nav.active {
    left: 0; /* Se desliza hacia la pantalla */
}

.overlay {
    display: none; /* Oculto por defecto */
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5); /* Fondo semitransparente */
    z-index: 999; /* Detrás del menú, pero encima del contenido */
}

header .mobile-nav a {
    color: #FFFFFF;
    text-decoration: none;
    padding: 12px 20px;
    text-align: center;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}

header .mobile-nav a:last-child {
    border-bottom: none;
}

header .mobile-nav a:hover {
    background-color: rgba(255,255,255,0.2);
}

.hero-banner {
    background: url('images/hero-banner.jpg') no-repeat center center/cover;
    color: #fff;
    text-align: center;
    padding: 100px 0;
    position: relative;
    width: 100%;
}

.hero-banner::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
}

.hero-banner .container {
    position: relative;
    z-index: 1;
}

.hero-banner h2 {
    font-size: 3em;
    margin-bottom: 10px;
    color: #fff;
    border-bottom: none;
}

.hero-banner p {
    font-size: 1.5em;
    margin-bottom: 30px;
}

.hero-banner .btn {
    display: inline-block;
    background: #007BFF;
    color: #fff;
    padding: 12px 25px;
    text-decoration: none;
    border-radius: 5px;
    font-size: 1.1em;
    transition: background 0.3s ease;
}

.hero-banner .btn:hover {
    background: #0056b3;
}

main {
    padding: 40px 0;
}

h2 {
    color: #333333;
    font-size: 2.2em;
    margin-bottom: 25px;
    text-align: center;
}

.post-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); /* Ajuste para más flexibilidad */
    gap: 25px; /* Aumento del espacio entre artículos */
}

.post-list .post-preview {
    background: #fff;
    padding: 0;
    margin-bottom: 0;
    border-radius: 8px;
    border: 1px solid #EEEEEE;
    box-shadow: 0 4px 8px rgba(0,0,0,0.05);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    transition: transform 0.2s ease-in-out, box-shadow 0.2s ease-in-out;
}

.post-list .post-preview:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 16px rgba(0,0,0,0.1);
}

/* Estilo para un artículo destacado (similar a Xataka) */
.post-list .post-preview.featured {
    grid-column: span 2; /* Ocupa dos columnas */
    grid-row: span 2; /* Ocupa dos filas */
    display: flex;
    flex-direction: column;
}

.post-list .post-preview.featured .post-preview-image {
    height: 350px; /* Mayor altura para la imagen destacada */
}

.post-list .post-preview.featured h3 {
    font-size: 1.8em; /* Título más grande */
}

.post-list .post-preview.featured p {
    font-size: 1.1em; /* Texto más grande */
}

@media (max-width: 768px) {
    .post-list .post-preview.featured {
        grid-column: span 1; /* En móviles, vuelve a una columna */
        grid-row: span 1;
    }

    .post-list .post-preview.featured .post-preview-image {
        height: 200px; /* Ajuste de altura para móviles */
    }
}

.post-list .post-preview {
    background: #fff;
    padding: 0;
    margin-bottom: 0;
    border-radius: 8px;
    border: 1px solid #EEEEEE;
    box-shadow: 0 4px 8px rgba(0,0,0,0.05);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    transition: transform 0.2s ease-in-out;
}

.post-list .post-preview:hover {
    transform: translateY(-5px);
}

.post-preview a {
    text-decoration: none;
    color: inherit;
}

.post-preview .post-preview-image {
    width: 100%;
    height: 200px;
    object-fit: cover;
    border-radius: 8px 8px 0 0;
    margin-right: 0;
    margin-bottom: 0;
}

.post-preview .post-content-preview {
    padding: 20px;
}

.post-preview h3 {
    margin-top: 10px;
    margin-bottom: 10px;
    font-size: 1.4em;
    line-height: 1.3;
}

.post-preview h3 a {
    color: #333333;
}

.post-preview h3 a:hover {
    color: #007BFF;
    text-decoration: none;
}

.post-preview p {
    font-size: 0.95em;
    line-height: 1.5;
    margin-bottom: 15px;
    color: #666666;
}

.post-preview .read-more {
    display: inline-block;
    background: #007BFF;
    color: #fff;
    padding: 8px 15px;
    border-radius: 5px;
    text-decoration: none;
    font-size: 0.9em;
    transition: background 0.3s ease;
}

.post-preview .read-more:hover {
    background: #0056b3;
}

.post-content h1 {
    font-size: 2.8em;
    margin-bottom: 0.5em;
    color: #333333;
}

.post-content h2 {
    font-size: 2.2em;
    margin-top: 1.5em;
    margin-bottom: 0.8em;
    border-bottom: none;
    padding-bottom: 0;
    color: #333333;
}

.post-content h3 {
    font-size: 1.8em;
    margin-top: 1.2em;
    margin-bottom: 0.6em;
    color: #333333;
}

.post-content p {
    margin-bottom: 1em;
    color: #444444;
}

.post-content table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 20px;
    margin-bottom: 20px;
    border: 1px solid #EEEEEE;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
    border-radius: 8px;
}

.post-content th, .post-content td {
    padding: 15px;
    border-bottom: 1px solid #EEEEEE;
    text-align: left;
}

.post-content th {
    background-color: #F9F9F9;
    font-weight: bold;
    color: #333;
}

.post-content tr:nth-child(even) {
    background-color: #FCFCFC;
}

.post-content tr:hover {
    background-color: #F5F5F5;
}

.post-content ul,
.post-content ol {
    margin-bottom: 1em;
    padding-left: 25px;
    color: #444444;
}

.post-content ul li,
.post-content ol li {
    margin-bottom: 0.5em;
    line-height: 1.5;
}

.post-content ul li::marker {
    color: #007BFF;
}

.post-hero-image {
    width: 100%;
    height: auto;
    border-radius: 8px;
    margin-bottom: 20px;
}

.post-image-inline {
    max-width: 100%;
    height: auto;
    display: block;
    margin: 20px auto;
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

.tip-box {
    background-color: #E6F7FF;
    border-left: 5px solid #007BFF;
    padding: 15px 20px;
    margin: 25px 0;
    border-radius: 5px;
    font-style: italic;
    color: #333;
}

.tip-box strong {
    color: #0056b3;
}

footer {
    text-align: center;
    padding: 30px 0;
    margin-top: 50px;
    background: #333333;
    color: #FFFFFF;
}

@media (max-width: 768px) {
    .container {
        padding: 0 15px;
    }

    header .container {
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
    }

    header h1 {
        padding-bottom: 0;
    }

    header h1 a {
        font-size: 1.4em; /* Ajustado para móviles */
    }

    header .desktop-nav {
        display: none;
    }

    .menu-toggle {
        display: block;
    }

    header .mobile-nav {
        header .mobile-nav {
        flex-direction: column;
        width: 100%;
        background-color: #007BFF;
        position: fixed; /* Asegura que sea fijo */
        top: 0;
        left: -100%; /* Inicialmente fuera de la pantalla */
        height: 100%; /* Ocupa toda la altura */
        overflow-y: auto; /* Para scroll si el contenido es largo */
        z-index: 1000;
        padding: 10px 0;
        box-shadow: 0 5px 10px rgba(0,0,0,0.3);
        transition: left 0.3s ease-in-out; /* Transición para el deslizamiento */
    }

    header .mobile-nav.active {
        left: 0; /* Se desliza hacia la pantalla */
    }
    }

    header .mobile-nav a {
        margin: 10px 0;
        font-size: 1.1em;
        text-align: center;
    }

    .hero-banner {
        padding: 60px 0;
    }

    .hero-banner h2 {
        font-size: 2em;
    }

    .hero-banner p {
        font-size: 1.1em;
    }

    .post-list {
        grid-template-columns: 1fr;
    }

    .post-list .post-preview {
        flex-direction: column;
        align-items: flex-start;
        width: 100%;
    }

    .post-preview .post-preview-image {
        width: 100%;
        height: 180px;
        margin-right: 0;
        margin-bottom: 15px;
    }

    .post-preview h3 {
        font-size: 1.3em;
    }

    .post-preview p {
        font-size: 0.9em;
    }

    .post-content h1 {
        font-size: 2em;
    }

    .post-content h2 {
        font-size: 1.6em;
    }

    .post-content h3 {
        font-size: 1.3em;
    }

    .post-content table {
        display: block;
        overflow-x: auto;
        white-space: nowrap;
    }

    .post-content th,
    .post-content td {
        padding: 10px;
    }

    .calculadora-container, .compatibilidad-container, .rutinas-container, .convertidor-container, .simulador-solar-container, .diagnostico-container, .lista-compras-container {
        padding: 20px;
        margin: 20px auto;
    }

    .tab-button {
        font-size: 0.9em;
        padding: 8px 12px;
    }

    .form-group label {
        font-size: 1em;
    }

    .form-group input, .form-group select {
        padding: 10px;
        font-size: 1em;
    }



    .resultados-container, .resultados-compatibilidad, .resultados-rutinas, .resultados-conversion, .resultados-simulador, .resultados-diagnostico, .resultados-lista {
        font-size: 1em;
        padding: 15px;
    }

    .resultado-item {
        font-size: 1.1em;
    }

    .tip-box {
        padding: 10px 15px;
        font-size: 0.9em;
    }

    .pregunta-grupo label {
        font-size: 1em;
    }

    .pregunta-grupo input[type="radio"] +