/* ============================================================
   ATEMUP - Estilos globales (compartidos por todas las páginas)
   ============================================================ */

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

body {
    font-family: 'Poppins', sans-serif;
    color: #333;
    line-height: 1.6;
}

/* ---------------------------- NAVBAR ----------------------- */
nav {
    background-color: #1e293b;
    padding: 0 60px;
    height: 80px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    position: sticky;
    top: 0;
    z-index: 50;
}

.logo {
    display: flex;
    align-items: center;
    gap: 12px;
    color: white;
    font-weight: 700;
    font-size: 18px;
    text-decoration: none;
}

.logo-text {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.logo-text span:first-child {
    font-size: 20px;
    font-weight: 700;
    line-height: 1;
}

.logo-text span:last-child {
    font-size: 11px;
    line-height: 1;
    color: #cbd5e1;
    font-weight: 500;
}

.nav-menu {
    display: flex;
    gap: 40px;
    align-items: center;
    list-style: none;
    flex: 1;
    margin-left: 80px;
}

.nav-menu a {
    color: white;
    text-decoration: none;
    font-size: 15px;
    font-weight: 500;
    transition: color 0.3s;
    display: flex;
    align-items: center;
    gap: 6px;
}

.nav-menu a:hover { color: #ef4444; }
.nav-menu a.active { color: #ef4444; }

.dropdown-arrow { font-size: 12px; }

.nav-right {
    display: flex;
    gap: 20px;
    align-items: center;
}

.btn-afiliate {
    background: white;
    color: #1e293b;
    padding: 12px 24px;
    border-radius: 25px;
    border: none;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s;
    text-decoration: none;
}

.btn-afiliate:hover {
    background: #f0f0f0;
    transform: translateY(-2px);
}

.btn-consult {
    background: #ef4444;
    color: white;
    padding: 12px 28px;
    border-radius: 25px;
    border: none;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    text-decoration: none;
}

.btn-consult:hover {
    background: #dc2626;
    transform: translateY(-2px);
}

/* ---------------------------- FOOTER ----------------------- */
footer {
    background: #1e293b;
    color: white;
    padding: 60px;
    margin-top: 60px;
}

.footer-content {
    max-width: 1400px;
    margin: 0 auto 40px;
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 60px;
}

.footer-section h3 {
    font-size: 18px;
    margin-bottom: 20px;
    color: white;
}

.footer-section ul { list-style: none; }
.footer-section li { margin-bottom: 12px; }

.footer-section a {
    color: #cbd5e1;
    text-decoration: none;
    font-size: 14px;
    transition: color 0.3s;
    display: flex;
    align-items: center;
    gap: 8px;
}

.footer-section a:hover { color: #ef4444; }

.footer-bottom {
    border-top: 1px solid #334155;
    padding-top: 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 13px;
    color: #cbd5e1;
}

.footer-links { display: flex; gap: 20px; }

.footer-links a {
    color: #cbd5e1;
    text-decoration: none;
    transition: color 0.3s;
}

.footer-links a:hover { color: #ef4444; }

/* ------------------------ WHATSAPP BTN --------------------- */
.whatsapp-btn {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 60px;
    height: 60px;
    background: #25d366;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 12px rgba(37, 211, 102, 0.4);
    cursor: pointer;
    transition: all 0.3s;
    z-index: 100;
}

.whatsapp-btn:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 16px rgba(37, 211, 102, 0.5);
}

.whatsapp-btn svg { width: 32px; height: 32px; }

/* --------------------------- ALERTAS ----------------------- */
.alert {
    padding: 14px 18px;
    border-radius: 6px;
    margin-bottom: 24px;
    font-size: 14px;
    font-weight: 500;
}

.alert-success {
    background: #dcfce7;
    color: #166534;
    border: 1px solid #86efac;
}

.alert-error {
    background: #fee2e2;
    color: #991b1b;
    border: 1px solid #fca5a5;
}

.field-error {
    color: #fca5a5;
    font-size: 13px;
    margin-top: 6px;
}

/* ----------------------- RESPONSIVE ------------------------ */
@media (max-width: 1024px) {
    nav { padding: 0 40px; }
    .nav-menu { gap: 20px; margin-left: 40px; }
}

@media (max-width: 768px) {
    nav { padding: 0 20px; }
    .nav-menu { display: none; }
    .nav-right .btn-afiliate { display: none; }

    .footer { padding: 40px 20px; }
    .footer-content {
        grid-template-columns: 1fr;
        gap: 30px;
    }
    .footer-bottom {
        flex-direction: column;
        gap: 20px;
        text-align: center;
    }
}

/* ----------------------- ÍCONOS SVG ------------------------ */
svg.icon,
svg.icon-inline { display: inline-block; vertical-align: middle; }

/* Tarjetas (servicios, beneficios, servicios de inicio) */
.service-icon,
.benefit-icon,
.home-service-icon { color: #ef4444; line-height: 0; }

.service-icon svg,
.benefit-icon svg { width: 48px; height: 48px; }

.home-service-icon svg { width: 40px; height: 40px; }

/* Noticias */
.news-image svg { width: 64px; height: 64px; color: #fff; }
.news-date svg { width: 14px; height: 14px; }

/* Contacto */
.info-icon { color: #ef4444; }
.info-icon svg { width: 22px; height: 22px; }

/* Placeholder de asociados */
.image-placeholder svg { width: 140px; height: 140px; color: #fff; opacity: 0.85; }

/* Íconos en línea (footer) */
.icon-inline { width: 16px; height: 16px; margin-right: 5px; }

/* ----------------------- LOGO (imagen) --------------------- */
.logo-img { height: 46px; width: auto; display: block; }
.footer-logo { height: 44px; width: auto; display: block; }

/* ----------------------- PRELOADER ------------------------- */
.preloader {
    position: fixed;
    inset: 0;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 26px;
    background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%);
    transition: opacity 0.5s ease, visibility 0.5s ease;
}

.preloader--hidden {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.preloader-logo {
    width: 190px;
    max-width: 55%;
    height: auto;
    animation: preloaderPulse 1.4s ease-in-out infinite;
}

.preloader-spinner {
    width: 38px;
    height: 38px;
    border: 3px solid rgba(255, 255, 255, 0.2);
    border-top-color: #ef4444;
    border-radius: 50%;
    animation: preloaderSpin 0.8s linear infinite;
}

@keyframes preloaderPulse {
    0%, 100% { transform: scale(1);    opacity: 1;   }
    50%      { transform: scale(1.07); opacity: 0.7; }
}

@keyframes preloaderSpin {
    to { transform: rotate(360deg); }
}

@media (prefers-reduced-motion: reduce) {
    .preloader-logo, .preloader-spinner { animation: none; }
}
