/* Modern Reset BLOG*/
* {
    margin: 0;
    padding: 0;
    font-family: 'Roboto', 'Segoe UI', Arial, sans-serif;
    box-sizing: border-box;
}

:root {
    --primary-color: #090979;
    --accent-color: #11fdf5;
    --gradient-start: #9c26bc;
    --gradient-end: #090979;
    --text-dark: #333;
    --text-light: white;
    --text-muted: #666;
    --header-bg: #9c26bc;
    --tab-inactive: #e5dfdf;
    --highlight1: #11fdf5;
    --highlight2: #9c26bc;
    --footer-bg: #090979;
    --footer-text: #11fdf5;
    --border-radius: 8px;
    --box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    --transition: all 0.3s ease;
}

body {
    line-height: 1.6;
    overflow-x: hidden; /* Prevenir scroll horizontal */
}

/* Asegura que el footer esté abajo */
body.layout {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}
  
body.layout main {
    flex: 1;
    padding: 0 15px; /* Añadir padding para móviles */
    width: 100%;
    box-sizing: border-box;
    max-width: 1400px;
    margin: 0 auto;
}

/* Header and Navigation - Enhanced */
header {
    background: var(--primary-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 18px 5%;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    transition: padding 0.3s ease;
    width: 100%;
    box-sizing: border-box;
}

header.scrolled {
    padding: 12px 5%;
}

.logo {
    display: flex;
    align-items: center;
    z-index: 1001; /* Asegurar que esté por encima del menú móvil */
}

.logo img {
    width: 52px;
    transition: var(--transition);
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.2));
}

.logo img:hover {
    transform: scale(1.08) rotate(2deg);
}

nav {
    display: flex;
    align-items: center;
}

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

nav ul li a {
    text-decoration: none;
    color: var(--text-light);
    font-size: 16px;
    font-weight: 500;
    position: relative;
    padding: 6px 2px;
    transition: var(--transition);
    letter-spacing: 0.3px;
}

nav ul li a::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--accent-color);
    transition: width 0.3s cubic-bezier(0.65, 0, 0.35, 1);
    border-radius: 2px;
}

nav ul li a:hover::after,
nav ul li a.active::after {
    width: 100%;
}

nav ul li a:hover,
nav ul li a.active {
    color: var(--accent-color);
    text-shadow: 0 0 10px rgba(0, 255, 255, 0.3);
}

.search-icon {
    margin-left: 30px;
    position: relative;
}

.search-icon i {
    color: var(--text-light);
    font-size: 20px;
    cursor: pointer;
    transition: var(--transition);
    padding: 8px;
}

.search-icon::after {
    content: '';
    position: absolute;
    top: -8px;
    right: -8px;
    bottom: -8px;
    left: -8px;
    background-color: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    transform: scale(0);
    transition: transform 0.3s ease;
}

.search-icon:hover::after {
    transform: scale(1);
}

.search-icon i:hover {
    color: var(--accent-color);
    transform: rotate(15deg);
}

/* Hamburger menu for mobile */
.menu-toggle {
    display: none;
    flex-direction: column;
    justify-content: space-between;
    width: 30px;
    height: 21px;
    cursor: pointer;
}

.menu-toggle span {
    display: block;
    height: 3px;
    width: 100%;
    background-color: white;
    border-radius: 3px;
    transition: var(--transition);
}

/* Contact Hero Section - Enhanced */
.contacto-hero {
    background: linear-gradient(135deg, #11fdf5, #9c26bc);
    color: white;
    text-align: center;
    padding: 80px 20px 120px; /* Reducir el padding en móviles */
    position: relative;
    overflow: hidden;
}

.contacto-hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.05'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
    opacity: 0.5;
}

.contacto-hero-content {
    max-width: 900px;
    margin: 0 auto;
    position: relative;
    z-index: 2;
}

.contacto-hero h1 {
    font-size: 56px;
    font-weight: 800;
    margin: 0 0 20px;
    letter-spacing: 1px;
    text-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    transform: perspective(500px) translateZ(0);
    transition: var(--transition);
    animation: float 5s ease-in-out infinite;
}

@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

.contacto-hero p {
    font-size: 20px;
    max-width: 600px;
    margin: 0 auto 30px;
    opacity: 0.9;
}

.contacto-hero::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 180px;
    background: linear-gradient(to right, #7b79b5, #a2c3df, #c2e7f5);
    clip-path: polygon(0 35%, 100% 65%, 100% 100%, 0% 100%);
    z-index: 1;
}

/* Blog Grid Layout */
.blog-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    padding: 2rem 5%;
    max-width: 1400px;
    margin: 0 auto;
}

.blog-card {
    background: white;
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--box-shadow);
    transition: var(--transition);
    height: 100%;
    display: flex;
    flex-direction: column;
}

.blog-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 15px rgba(0, 0, 0, 0.2);
}

.blog-card-image {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

.blog-card-content {
    padding: 1.5rem;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.blog-card h2 {
    color: var(--text-dark);
    margin-bottom: 0.5rem;
    font-size: 1.25rem;
}

.blog-card .date {
    color: var(--text-muted);
    font-size: 0.875rem;
    margin-bottom: 1rem;
}

.blog-card p {
    color: var(--text-dark);
    margin-bottom: 1.5rem;
    flex: 1;
}

.blog-card .read-more {
    display: inline-block;
    padding: 0.5rem 1rem;
    background-color: var(--primary-color);
    color: white;
    text-decoration: none;
    border-radius: var(--border-radius);
    transition: var(--transition);
    text-align: center;
}

.blog-card .read-more:hover {
    background-color: var(--highlight1);
}

/* Back button styles */
.back-button {
    display: inline-block;
    padding: 10px 20px;
    background-color: #1a73e8;
    color: white;
    text-decoration: none;
    border-radius: 5px;
    margin: 20px;
    transition: background-color 0.3s;
}

.back-button:hover {
    background-color: #1557b0;
}

/* Footer Styles */
.footer {
    padding: 60px 5% 0;
    background-color: #090979;
    color: white;
    width: 100%;
    box-sizing: border-box;
}

.footer-contenedor {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: flex-start;
    max-width: 1200px;
    margin: 0 auto;
    padding-bottom: 40px;
    gap: 40px;
}

.footer-info {
    flex: 1;
    min-width: 280px;
    text-align: left;
}

.footer-info h3 {
    color: white;
    font-size: 20px;
    font-weight: 600;
    margin-bottom: 20px;
    position: relative;
    display: inline-block;
}

.footer-info h3::after {
    content: '';
    position: absolute;
    bottom: -8px;
    left: 0;
    width: 40px;
    height: 2px;
    background-color: var(--accent-color);
}

.footer-info p {
    font-size: 16px;
    color: #ccc;
    line-height: 1.7;
    margin-bottom: 20px;
}

.footer-info a {
    color: var(--accent-color);
    text-decoration: none;
    transition: var(--transition);
}

.footer-info a:hover {
    color: white;
}

.footer-logo {
    text-align: center;
    flex: 1;
    min-width: 200px;
}

.footer-logo img {
    width: 80px;
    margin-bottom: 15px;
}

.footer-logo h3 {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 10px;
    color: white;
}

.footer-copyright {
    background-color: #000000;
    padding: 20px 5%;
    font-size: 14px;
    text-align: center;
    color: #ccc;
    width: 100%;
    box-sizing: border-box;
}

.footer-copyright a {
    color: var(--accent-color);
    text-decoration: none;
    transition: var(--transition);
}

.footer-copyright a:hover {
    color: white;
}

/* Estilos para el botón del menú hamburguesa */
#menu-button {
    display: none; /* Oculto por defecto en pantallas grandes */
    background: none;
    border: none;
    cursor: pointer;
    padding: 10px;
    z-index: 1000;
    position: relative;
}
  
#menu-button span {
    display: block;
    width: 25px;
    height: 3px;
    margin: 5px 0;
    background-color: white;
    transition: transform 0.3s, opacity 0.3s;
}
  
/* Animación para el botón hamburguesa cuando está abierto */
#menu-button.open span:nth-child(1) {
    transform: translateY(8px) rotate(45deg);
}
  
#menu-button.open span:nth-child(2) {
    opacity: 0;
}
  
#menu-button.open span:nth-child(3) {
    transform: translateY(-8px) rotate(-45deg);
}

/* Mejoras responsive - Tabletas */
@media screen and (max-width: 1024px) {
    nav ul {
        gap: 20px; /* Reducir el espacio entre elementos de navegación */
    }
    
    .contacto-hero h1 {
        font-size: 46px; /* Reducir tamaño de título */
    }
    
    .contacto-hero p {
        font-size: 18px;
    }
    
    .blog-grid {
        grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    }
    
    .footer-contenedor {
        gap: 30px;
    }
}

/* Estilos responsivos para dispositivos móviles */
@media screen and (max-width: 768px) {
    header {
        padding: 15px 4%;
    }
    
    #menu-button {
        display: block; /* Mostrar en dispositivos móviles */
    }
    
    header nav {
        position: fixed;
        top: 0;
        right: -100%; /* Oculto por defecto */
        width: 70%;
        height: 100vh;
        background-color: var(--primary-color); /* Cambiado de #333 a var(--primary-color) */
        transition: right 0.3s ease;
        z-index: 999;
        padding-top: 60px;
        box-shadow: -5px 0 15px rgba(0, 0, 0, 0.2);
    }

    
    header nav.active {
        right: 0; /* Visible cuando está activo */
    }
    
    header nav ul {
        flex-direction: column;
        padding: 0 20px;
        gap: 25px; /* Cambiado de 15px a 25px */
    }
    
    header nav ul li {
        margin: 0; /* Cambiado de margin: 15px 0 a solo margin: 0 */
        width: 100%;
        text-align: left;
    }
    
    header nav ul li a {
        display: block;
        padding: 8px 0;
        font-size: 18px;
        width: 100%; /* Añadido width: 100% */
    }
    
    .search-icon {
        margin-left: 15px;
    }
    
    .contacto-hero {
        padding: 60px 15px 100px;
    }
    
    .contacto-hero h1 {
        font-size: 36px;
    }
    
    .contacto-hero p {
        font-size: 16px;
    }
    
    .contacto-hero::after {
        height: 120px;
    }
    
    .blog-grid {
        grid-template-columns: 1fr;
        padding: 1.5rem 15px;
        gap: 1.5rem;
    }
    
    .footer {
        padding: 40px 15px 0;
    }
    
    .footer-contenedor {
        flex-direction: column;
        gap: 30px;
        padding-bottom: 30px;
    }
    
    .footer-info, .footer-logo {
        min-width: 100%;
        text-align: center;
    }
    
    .footer-info h3::after {
        left: 50%;
        transform: translateX(-50%);
    }
    
    .back-button {
        margin: 15px;
        display: block;
        text-align: center;
    }
    
    body.menu-open {
        overflow: hidden;
    }
    
    .overlay {
        display: none;
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background: rgba(0, 0, 0, 0.5);
        z-index: 998;
    }
    
    .overlay.active {
        display: block;
    }
}

/* Pequeños dispositivos móviles */
@media screen and (max-width: 480px) {
    .logo img {
        width: 45px;
    }
    
    header nav {
        width: 85%; /* Aumentar el ancho del menú en pantallas pequeñas */
    }
    
    .contacto-hero h1 {
        font-size: 32px;
    }
    
    .contacto-hero {
        padding: 50px 10px 80px;
    }
    
    .blog-card-content {
        padding: 1.2rem;
    }
    
    .footer-logo h3 {
        font-size: 16px;
    }
}

nav ul li a:hover::after,
nav ul li a.activo::after {
    width: 100%;
}

nav ul li a:hover,
nav ul li a.activo {
    color: var(--accent-color);
    text-shadow: 0 0 10px rgba(0, 255, 255, 0.3);
}

.whatsapp-float {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 1000;
    background-color: #25D366;
    border-radius: 50%;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    padding: 12px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.whatsapp-float:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.4);
}

.whatsapp-float img {
    width: 40px;
    height: 40px;
    display: block;
}
