:root {
    --primary: #FF6B8B;
    --secondary: #FFD166;
    --accent: #6A67CE;
    --light: #FFF9F2;
    --dark: #333333;
    --shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

/* ===== OPTIMIZACIONES DE VELOCIDAD ===== */

/* Font-display: swap para fuentes Google */
@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700&family=Playfair+Display:wght@600;700&display=swap');

/* Reset de estilos críticos - ya no necesitan estar inline */
body {
    font-family: 'Poppins', Arial, sans-serif;
    background-color: var(--light);
    color: var(--dark);
    line-height: 1.2;
    overflow-x: hidden;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    opacity: 1 !important;
}

/* Asegurar que las fuentes custom se apliquen cuando carguen */
.brand-name {
    font-family: 'Playfair Display', Georgia, serif;
}

/* Mejoras de rendimiento para animaciones */
.category-card {
    will-change: transform;
    backface-visibility: hidden;
}

/* Optimización de imágenes de fondo */
header::before {
    image-rendering: -webkit-optimize-contrast;
    image-rendering: crisp-edges;
}

/* ===== FIN OPTIMIZACIONES ===== */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

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

/* Header - Padding optimizado */
header {
    background: linear-gradient(135deg, var(--primary), var(--accent));
    color: white;
    padding: 15px 0 10px 0;
    box-shadow: var(--shadow);
    position: relative;
    overflow: hidden;
}

header::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url("data:image/svg+xml,%3Csvg width='100' height='100' viewBox='0 0 100 100' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M11 18c3.866 0 7-3.134 7-7s-3.134-7-7-7-7 3.134-7 7 3.134 7 7 7zm48 25c3.866 0 7-3.134 7-7s-3.134-7-7-7-7 3.134-7 7 3.134 7 7 7zm-43-7c1.657 0 3-1.343 3-3s-1.343-3-3-3-3 1.343-3 3 1.343 3 3 3zm63 31c1.657 0 3-1.343 3-3s-1.343-3-3-3-3 1.343-3 3 1.343 3 3 3zM34 90c1.657 0 3-1.343 3-3s-1.343-3-3-3-3 1.343-3 3 1.343 3 3 3zm56-76c1.657 0 3-1.343 3-3s-1.343-3-3-3-3 1.343-3 3 1.343 3 3 3zM12 86c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4zm28-65c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4zm23-11c2.76 0 5-2.24 5-5s-2.24-5-5-5-5 2.24-5 5 2.24 5 5 5zm-6 60c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4zm29 22c2.76 0 5-2.24 5-5s-2.24-5-5-5-5 2.24-5 5 2.24 5 5 5zM32 63c2.76 0 5-2.24 5-5s-2.24-5-5-5-5 2.24-5 5 2.24 5 5 5zm57-13c2.76 0 5-2.24 5-5s-2.24-5-5-5-5 2.24-5 5 2.24 5 5 5zm-9-21c1.105 0 2-.895 2-2s-.895-2-2-2-2 .895-2 2 .895 2 2 2zM60 91c1.105 0 2-.895 2-2s-.895-2-2-2-2 .895-2 2 .895 2 2 2zM35 41c1.105 0 2-.895 2-2s-.895-2-2-2-2 .895-2 2 .895 2 2 2zM12 60c1.105 0 2-.895 2-2s-.895-2-2-2-2 .895-2 2 .895 2 2 2z' fill='%23ffffff' fill-opacity='0.1' fill-rule='evenodd'/%3E%3C/svg%3E");
}

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

.brand-name {
    font-family: 'Playfair Display', serif;
    font-size: 2.4rem;
    font-weight: 700;
    line-height: 1;
}

.tagline {
    font-size: 0.85rem;
    opacity: 0.95;
    font-weight: 400;
    text-align: right;
    line-height: 1.2;
}

/* Categories Grid - TAMAÑO REDUCIDO */
.categories {
    padding: 6px 0 15px 0;
    flex: 1;
}

.section-title {
    text-align: center;
    font-size: 1.1rem;
    margin-bottom: 8px;
    color: var(--accent);
    position: relative;
    padding-bottom: 3px;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 50px;
    height: 2px;
    background: var(--secondary);
    border-radius: 2px;
}

.categories-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
}

.category-card {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    text-decoration: none;
    color: inherit;
    display: block;
}

.category-card:active {
    transform: scale(0.98);
}

/* TAMAÑO REDUCIDO DE LAS TARJETAS */
.category-icon {
    height: 80px; /* Reducido de 95px */
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem; /* Reducido de 2.5rem */
    color: white;
    position: relative;
}

.category-content {
    padding: 8px; /* Reducido de 10px */
    text-align: center;
}

.category-title {
    font-weight: 600;
    font-size: 0.85rem; /* Reducido de 0.9rem */
    margin-bottom: 2px;
}

.category-count {
    font-size: 0.7rem; /* Reducido de 0.75rem */
    color: #777;
}

/* ANIMACIÓN MEJORADA PARA TARJETAS - PULSACIÓN SUAVE SIN SOLAPAR */
@keyframes card-pulse {
    0%, 100% { 
        transform: scale(1);
        box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    }
    50% { 
        transform: scale(1.04); /* Reducido de 1.08 para evitar solapamiento */
        box-shadow: 0 6px 18px rgba(0,0,0,0.15);
    }
}

.category-card {
    animation: card-pulse 4s ease-in-out infinite;
    animation-play-state: running;
}

/* Delays individuales para efecto de ola */
.category-card:nth-child(1) { animation-delay: 0s; }
.category-card:nth-child(2) { animation-delay: 0.8s; }
.category-card:nth-child(3) { animation-delay: 1.6s; }
.category-card:nth-child(4) { animation-delay: 2.4s; }
.category-card:nth-child(5) { animation-delay: 3.2s; }

/* Efecto hover - Pausar animación y hacer zoom más pronunciado */
.category-card:hover {
    animation-play-state: paused;
    transform: scale(1.06); /* Reducido de 1.1 */
    box-shadow: 0 8px 20px rgba(0,0,0,0.2);
}

/* ESTILOS MEJORADOS PARA CATEGORÍAS EN CONSTRUCCIÓN - MÁS DISCRETOS */
.category-card.construction {
    position: relative;
    opacity: 0.85;
    cursor: not-allowed;
}

.category-card.construction .category-icon {
    position: relative;
    overflow: hidden;
}

.construction-overlay {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) rotate(-15deg);
    width: 75%;
    height: 75%;
    background: rgba(255, 255, 255, 0.15);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 0.65rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    text-shadow: 1px 1px 3px rgba(0,0,0,0.5);
    border: 1px dashed rgba(255, 255, 255, 0.4);
    border-radius: 6px;
    backdrop-filter: blur(1px);
    animation: construction-shimmer 2s ease-in-out infinite alternate;
}

@keyframes construction-shimmer {
    0% {
        opacity: 0.6;
    }
    100% {
        opacity: 0.8;
    }
}

/* Desactivar animaciones para categorías en construcción */
.category-card.construction {
    animation: none;
}

.category-card.construction:hover {
    transform: none;
    box-shadow: var(--shadow);
}

/* Footer - ESPACIADO OPTIMIZADO */
footer {
    background: var(--dark);
    color: white;
    padding: 12px 0 35px 0; /* Padding superior reducido */
    margin-top: auto;
}

.footer-contact {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 15px;
    margin-bottom: 15px; /* Reducido de 20px */
    flex-wrap: nowrap;
    overflow-x: auto;
    padding: 8px 5px;
    -webkit-overflow-scrolling: touch;
}

.contact-item {
    display: flex;
    align-items: center;
    flex-shrink: 0;
}

.contact-link {
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    text-decoration: none;
    transition: all 0.3s ease;
    padding: 10px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    width: 44px;
    height: 44px;
    flex-shrink: 0;
}

.contact-link:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: scale(1.1);
}

.contact-link i {
    font-size: 1.2rem;
    transition: color 0.3s ease;
}

/* WhatsApp con color específico */
.contact-link[href*="whatsapp"] {
    background: rgba(37, 211, 102, 0.2);
}

.contact-link[href*="whatsapp"]:hover {
    background: rgba(37, 211, 102, 0.3);
}

/* Teléfono con color específico */
.contact-link[href*="tel:"] {
    background: rgba(255, 107, 139, 0.2);
}

.contact-link[href*="tel:"]:hover {
    background: rgba(255, 107, 139, 0.3);
}

/* NUEVA ANIMACIÓN PARA ICONOS CON CAMBIO DE COLOR */
@keyframes icon-pulse {
    0%, 100% { 
        transform: scale(1);
        box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    }
    50% { 
        transform: scale(1.2);
        box-shadow: 0 4px 15px rgba(0,0,0,0.2);
    }
}

/* Aplicar animación a todos los iconos del footer con delays aleatorios */
.contact-link,
.social-icons a {
    animation: icon-pulse 3s ease-in-out infinite;
}

/* Delays ALEATORIOS para crear efecto no secuencial */
.contact-link:nth-child(1) { animation-delay: 0s; } /* Teléfono */
.contact-link:nth-child(2) { animation-delay: 1.2s; } /* WhatsApp */
.social-icons a:nth-child(1) { animation-delay: 0.6s; } /* Facebook */
.social-icons a:nth-child(2) { animation-delay: 1.8s; } /* Instagram */
.social-icons a:nth-child(3) { animation-delay: 2.4s; } /* TikTok */

/* CAMBIO DE COLOR DURANTE LA PULSACIÓN - TELÉFONO */
.contact-link[href*="tel:"] i {
    animation: tel-color-pulse 3s ease-in-out infinite;
}

@keyframes tel-color-pulse {
    0%, 100% { color: white; }
    50% { color: #2196F3; } /* Azul para teléfono */
}

/* CAMBIO DE COLOR DURANTE LA PULSACIÓN - WHATSAPP */
.contact-link[href*="whatsapp"] i {
    animation: whatsapp-color-pulse 3s ease-in-out infinite;
}

@keyframes whatsapp-color-pulse {
    0%, 100% { color: white; }
    50% { color: #25D366; } /* Verde WhatsApp */
}

/* CAMBIO DE COLOR DURANTE LA PULSACIÓN - FACEBOOK */
.social-icons a[title="Facebook"] i {
    animation: facebook-color-pulse 3s ease-in-out infinite;
}

@keyframes facebook-color-pulse {
    0%, 100% { color: white; }
    50% { color: #1877F2; } /* Azul Facebook */
}

/* CAMBIO DE COLOR DURANTE LA PULSACIÓN - INSTAGRAM */
.social-icons a[title="Instagram"] i {
    animation: instagram-color-pulse 3s ease-in-out infinite;
}

@keyframes instagram-color-pulse {
    0%, 100% { color: white; }
    50% { 
        color: transparent;
        background: linear-gradient(45deg, #E1306C, #833AB4);
        -webkit-background-clip: text;
        background-clip: text;
    }
}

/* CAMBIO DE COLOR DURANTE LA PULSACIÓN - TIKTOK */
.social-icons a[title="TikTok"] i {
    animation: tiktok-color-pulse 3s ease-in-out infinite;
}

@keyframes tiktok-color-pulse {
    0%, 100% { color: white; }
    50% { 
        color: #FF0050; /* Rojo TikTok */
        text-shadow: 0 0 5px #000000; /* Sombra negra para contraste */
    }
}

.social-icons {
    display: flex;
    gap: 12px;
    align-items: center;
    flex-shrink: 0;
}

.social-icons a {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.1rem;
    text-decoration: none;
    transition: all 0.3s ease;
    flex-shrink: 0;
}

.social-icons a:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: scale(1.1);
    animation-play-state: paused;
}

/* Copyright */
.copyright-info {
    text-align: center;
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.7);
    padding-top: 12px; /* Reducido de 15px */
    border-top: 1px solid rgba(255, 255, 255, 0.2);
    line-height: 1.4;
    width: 100%;
}

/* Responsive Adjustments */
@media (min-width: 768px) {
    .container {
        max-width: 720px;
    }
    
    .categories-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 12px;
    }
    
    .brand-name {
        font-size: 2.8rem;
    }
    
    .tagline {
        font-size: 0.9rem;
    }
    
    .footer-contact {
        gap: 20px;
    }
    
    .contact-link,
    .social-icons a {
        width: 50px;
        height: 50px;
    }
    
    .contact-link i,
    .social-icons a i {
        font-size: 1.3rem;
    }
    
    /* Ajustar delays para pantallas más grandes */
    .category-card:nth-child(1) { animation-delay: 0s; }
    .category-card:nth-child(2) { animation-delay: 0.7s; }
    .category-card:nth-child(3) { animation-delay: 1.4s; }
    .category-card:nth-child(4) { animation-delay: 0.3s; }
    .category-card:nth-child(5) { animation-delay: 1.1s; }
}

@media (max-height: 700px) {
    .category-icon {
        height: 75px;
        font-size: 1.8rem;
    }
    
    .category-content {
        padding: 6px;
    }
    
    footer {
        padding: 10px 0 30px 0;
    }
}

@media (max-width: 480px) {
    .header-content {
        flex-direction: column;
        align-items: flex-start;
        gap: 4px;
    }
    
    .brand-name {
        font-size: 2.2rem;
    }
    
    .tagline {
        text-align: left;
        font-size: 0.8rem;
        width: 100%;
    }
    
    .footer-contact {
        gap: 12px;
        padding: 6px 3px;
    }
    
    .contact-link,
    .social-icons a {
        width: 40px;
        height: 40px;
    }
    
    .contact-link i,
    .social-icons a i {
        font-size: 1rem;
    }
    
    footer {
        padding: 10px 0 45px 0;
    }
}

@media (max-width: 360px) {
    .categories-grid {
        gap: 8px;
    }
    
    .category-icon {
        height: 75px;
    }
    
    .footer-contact {
        gap: 10px;
    }
    
    .contact-link,
    .social-icons a {
        width: 38px;
        height: 38px;
    }
    
    .contact-link i,
    .social-icons a i {
        font-size: 0.95rem;
    }
}
/* === NUEVO: Estilos para texto SEO === */
.intro-seo {
    background: linear-gradient(135deg, #FFF9F2, #FFEEDD);
    padding: 20px 0;
    border-bottom: 1px solid #FFD166;
}

.intro-seo h1 {
    font-size: 1.4rem;
    color: #6A67CE;
    text-align: center;
    margin-bottom: 10px;
    font-weight: 600;
}

.intro-seo p {
    font-size: 0.9rem;
    color: #555;
    text-align: center;
    line-height: 1.5;
    margin: 0;
}

/* Responsive para texto SEO */
@media (max-width: 768px) {
    .intro-seo h1 {
        font-size: 1.2rem;
    }
    
    .intro-seo p {
        font-size: 0.85rem;
    }
}

@media (max-width: 480px) {
    .intro-seo {
        padding: 15px 0;
    }
    
    .intro-seo h1 {
        font-size: 1.1rem;
    }
}
