/* ===== ESTILOS GENERALES ===== */
body {
    font-family: Arial, sans-serif;
    margin: 0;
    padding: 0;
    text-align: center;
}

/* ===== ENCABEZADO ===== */
header {
    background-color: #33bd37;
    color: white;
    padding: 1em;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
}

.logo img {
    height: 125px;
}

header h1 {
    margin: 0;
    font-size: 1.8em;
    flex-grow: 1;
}

/* ===== MENÚ DE NAVEGACIÓN ===== */
/* Versión desktop */
nav {
    display: block;
    width: auto;
}

nav ul {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    gap: 15px;
}

nav ul li a {
    color: white;
    text-decoration: none;
    font-weight: 500;
    padding: 5px 10px;
    border-radius: 4px;
    transition: background-color 0.3s;
}

nav ul li a:hover {
    background-color: rgba(255, 255, 255, 0.2);
}

/* Botón hamburguesa - Oculto por defecto */
.menu-toggle {
    display: none;
    background: none;
    border: none;
    color: white;
    font-size: 1.8em;
    cursor: pointer;
    padding: 10px;
}

/* ===== BOTÓN FLOTANTE WHATSAPP ===== */
.float-whatsapp {
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 60px;
    height: 60px;
    background: #25D366;
    color: white;
    border-radius: 50%;
    text-align: center;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 30px;
    text-decoration: none;
    transition: all 0.3s;
}

.float-whatsapp:hover {
    background: #128C7E;
    transform: scale(1.1);
}

/* ===== PIE DE PÁGINA ===== */
footer {
    background-color: #333;
    color: white;
    text-align: center;
    padding: 20px;
    margin-top: 50px;
}

/* ===== BLOG ===== */
/* Contenedor principal */
.blog-container {
    max-width: 1000px;
    margin: 40px auto;
    padding: 0 20px;
}

/* Entradas del blog */
.blog-post {
    background: white;
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
    margin-bottom: 30px;
    overflow: hidden;
    transition: transform 0.3s ease;
    max-width: 100%;
    padding: 1.5rem;
}

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

/* Encabezado del post */
.post-header {
    background-color: #33bd37;
    color: white;
    padding: 20px;
    margin-bottom: 1.5rem;
    border-bottom: 1px solid #eee;
    padding-bottom: 1rem;
}

.post-title {
    margin: 0;
    font-size: 24px;
    color: #333;
    margin-bottom: 0.5rem;
    line-height: 1.3;
}

.post-date {
    font-size: 14px;
    opacity: 0.8;
    margin-top: 5px;
    color: #777;
}

/* Contenido del post */
.post-content {
    padding: 25px;
    line-height: 1.6;
    color: #444;
}

.post-excerpt {
    line-height: 1.6;
    color: #333;
    margin-bottom: 1.5rem;
    font-size: 1rem;
}

/* Elementos del contenido */
.post-content p {
    text-align: justify;
}

.post-content img {
    max-width: 100%;
    height: auto;
    display: block;
    margin: 2rem auto;
    border-radius: 6px;
    box-shadow: 0 3px 15px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: 1px solid #eee;
    object-fit: cover;
}

h2, h3 {
    margin: 1.8rem 0 1rem;
    font-weight: 600;
}

h2 {
    font-size: 1.5rem;
}

h3 {
    font-size: 1.3rem;
}

/* Enlaces */
.read-more, .post-content a {
    display: inline-block;
    margin-top: 15px;
    color: #33bd37;
    text-decoration: none;
    font-weight: bold;
}

.post-content a {
    font-weight: 500;
}

.read-more:hover, .post-content a:hover {
    color: #2a9a2e;
    text-decoration: underline;
}

/* ===== MEDIA QUERIES ===== */
/* Dispositivos medianos (tablets) */
@media (max-width: 768px) {
    /* Header */
    header {
        flex-direction: row;
        align-items: center;
        padding: 0.5em 1em;
    }

    .logo img {
        height: 80px;
    }

    header h1 {
        font-size: 1.3em;
        text-align: left;
        margin-left: 10px;
    }

    /* Menú hamburguesa */
    .menu-toggle {
        display: block;
        order: 3;
    }

    nav {
        display: none;
        width: 100%;
        order: 4;
    }

    nav.active {
        display: block;
    }

    nav ul {
        flex-direction: column;
        gap: 0;
    }

    nav ul li {
        width: 100%;
        text-align: center;
        padding: 0.5em 0;
    }

    nav ul li a {
        display: block;
        padding: 10px 0;
    }

    /* Botón WhatsApp */
    .float-whatsapp {
        width: 50px;
        height: 50px;
        font-size: 25px;
    }

    /* Blog */
    .blog-container {
        margin: 20px auto;
    }
    
    .post-title {
        font-size: 20px;
    }
    
    .blog-post {
        padding: 1rem;
        margin-bottom: 1.5rem;
    }
    
    h2 {
        font-size: 1.3rem;
    }
    
    h3 {
        font-size: 1.2rem;
    }
    
    .post-content img {
        margin: 1.5rem auto;
    }
}

/* Dispositivos pequeños (móviles) */
@media (max-width: 480px) {
    header h1 {
        font-size: 1.1em;
    }

    .logo img {
        height: 60px;
    }
    
    .post-title {
        font-size: 1.3rem;
    }
    
    .post-content {
        font-size: 0.95rem;
    }
    
    .post-excerpt {
        font-size: 0.95rem;
    }
    
    h2 {
        font-size: 1.2rem;
    }
    
    h3 {
        font-size: 1.1rem;
    }
    
    .post-content img {
        margin: 1.2rem auto;
    }
    
    .post-header {
        margin-bottom: 1rem;
    }
    
    .post-content p {
        margin-bottom: 1.2rem;
    }
}

/* Efectos hover solo para dispositivos con capacidad hover */
@media (hover: hover) and (pointer: fine) {
    .post-content img:hover {
        transform: scale(1.02);
        box-shadow: 0 5px 20px rgba(0, 0, 0, 0.15);
    }
}