/* ============================================
   CUSTOM CSS - IB LEARNING CENTER
   ============================================ */

/* --- TIPOGRAFÍA Y BASE --- */
body {
    font-family: 'Sulphur Point', sans-serif;
    color: #1B1F2A;
}

h1, h2, h3, h4, h5, h6 {
    font-family: 'Ubuntu', sans-serif;
}

/* --- NAVEGACIÓN --- */
.nav-link {
    display: inline-block;
    color: #1B1F2A;
    font-weight: 500;
    font-size: 0.9375rem;
    padding: 0.5rem 0.75rem;
    transition: all 0.2s ease;
    border-radius: 0.5rem;
    text-decoration: none;
    white-space: nowrap;
}

.nav-link:hover {
    color: #172FAB;
    background-color: rgba(88, 200, 250, 0.1);
}

.nav-link.active {
    color: #172FAB;
    font-weight: 600;
    background-color: rgba(88, 200, 250, 0.15);
}

.nav-link-mobile {
    display: block;
    color: #1B1F2A;
    font-weight: 500;
    padding: 0.75rem 1rem;
    transition: all 0.2s ease;
    border-radius: 0.5rem;
    text-decoration: none;
}

.nav-link-mobile:hover {
    color: #172FAB;
    background-color: rgba(88, 200, 250, 0.1);
}

.nav-link-mobile.active {
    color: #172FAB;
    font-weight: 600;
    background-color: rgba(88, 200, 250, 0.15);
}

/* --- BOTONES --- */
.btn-primary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.75rem 1.5rem;
    background-color: #172FAB;
    color: white;
    font-family: 'Ubuntu', sans-serif;
    font-weight: 600;
    border-radius: 0.5rem;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    text-decoration: none;
}

.btn-primary:hover {
    background-color: #001A5B;
    box-shadow: 0 10px 15px rgba(0, 0, 0, 0.15);
    transform: translateY(-2px);
}

.btn-primary-light {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.75rem 1.5rem;
    background-color: white;
    color: #172FAB;
    font-family: 'Ubuntu', sans-serif;
    font-weight: 600;
    border-radius: 0.5rem;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    text-decoration: none;
}

.btn-primary-light:hover {
    background-color: #58C8FA;
    color: #001A5B;
    box-shadow: 0 10px 15px rgba(0, 0, 0, 0.15);
    transform: translateY(-2px);
}

.btn-secondary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.75rem 1.5rem;
    background-color: transparent;
    color: #172FAB;
    font-family: 'Ubuntu', sans-serif;
    font-weight: 600;
    border-radius: 0.5rem;
    border: 2px solid #172FAB;
    transition: all 0.3s ease;
    text-decoration: none;
}

.btn-secondary:hover {
    background-color: #172FAB;
    color: white;
}

.btn-secondary-light {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.75rem 1.5rem;
    background-color: transparent;
    color: white;
    font-family: 'Ubuntu', sans-serif;
    font-weight: 600;
    border-radius: 0.5rem;
    border: 2px solid white;
    transition: all 0.3s ease;
    text-decoration: none;
}

.btn-secondary-light:hover {
    background-color: white;
    color: #172FAB;
}

/* --- FOOTER LINKS --- */
.footer-link {
    transition: color 0.2s;
}

.footer-link:hover {
    color: #58C8FA;
}

/* --- SOCIAL ICONS --- */
.social-icon {
    width: 2.5rem;
    height: 2.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.1);
    transition: all 0.3s ease;
}

.social-icon:hover {
    background-color: #58C8FA;
    transform: scale(1.1);
}

/* --- WHATSAPP BUTTON FLOTANTE --- */
.whatsapp-float {
    position: fixed !important;
    bottom: 30px !important;
    right: 30px !important;
    width: 60px !important;
    height: 60px !important;
    background: linear-gradient(135deg, #25D366 0%, #128C7E 100%) !important;
    color: white !important;
    border-radius: 50% !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15) !important;
    z-index: 9999 !important;
    transition: all 0.3s ease !important;
    cursor: pointer !important;
    animation: pulse-whatsapp 2s infinite !important;
    text-decoration: none !important;
}

.whatsapp-float:hover {
    transform: scale(1.1) !important;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.2) !important;
}

.whatsapp-float:hover .whatsapp-tooltip {
    opacity: 1 !important;
    visibility: visible !important;
    right: 75px !important;
}

.whatsapp-tooltip {
    position: absolute !important;
    right: 65px !important;
    top: 50% !important;
    transform: translateY(-50%) !important;
    background: #1B1F2A !important;
    color: white !important;
    padding: 8px 16px !important;
    border-radius: 8px !important;
    font-size: 14px !important;
    white-space: nowrap !important;
    opacity: 0 !important;
    visibility: hidden !important;
    transition: all 0.3s ease !important;
    pointer-events: none !important;
}

.whatsapp-tooltip::after {
    content: '' !important;
    position: absolute !important;
    right: -8px !important;
    top: 50% !important;
    transform: translateY(-50%) !important;
    border: 8px solid transparent !important;
    border-left-color: #1B1F2A !important;
}

/* Animación de pulso para WhatsApp button */
@keyframes pulse-whatsapp {
    0%, 100% {
        box-shadow: 0 4px 12px rgba(37, 211, 102, 0.3);
    }
    50% {
        box-shadow: 0 4px 20px rgba(37, 211, 102, 0.6);
    }
}

/* --- TARJETAS HOVER --- */
.card-hover {
    transition: all 0.3s ease;
}

.card-hover:hover {
    transform: translateY(-4px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
}

/* --- HEADER SCROLL --- */
.header-scrolled {
    box-shadow: 0 10px 15px rgba(0, 0, 0, 0.1);
}

/* --- POP-UP OVERLAY --- */
.popup-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(5px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.popup-overlay.show {
    opacity: 1;
    visibility: visible;
}

.popup-content {
    background: white;
    border-radius: 1rem;
    padding: 2.5rem;
    max-width: 500px;
    width: 90%;
    position: relative;
    transform: scale(0.9);
    transition: transform 0.3s ease;
}

.popup-overlay.show .popup-content {
    transform: scale(1);
}

.popup-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: #F5F7FB;
    cursor: pointer;
    transition: all 0.2s;
}

.popup-close:hover {
    background: #172FAB;
    color: white;
}

/* --- RESPONSIVE ADJUSTMENTS --- */
@media (max-width: 768px) {
    .whatsapp-float {
        bottom: 20px !important;
        right: 20px !important;
        width: 56px !important;
        height: 56px !important;
    }

    .whatsapp-tooltip {
        display: none !important;
    }
}

/* --- LOADING SPINNER (opcional) --- */
.spinner {
    border: 3px solid #F5F7FB;
    border-top: 3px solid #172FAB;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* --- PRINT STYLES --- */
@media print {
    .whatsapp-float,
    header,
    footer {
        display: none !important;
    }
    
    body {
        color: black;
        background: white;
    }
}

/* --- SMOOTH SCROLL --- */
html {
    scroll-behavior: smooth;
}

/* --- SELECTION COLOR --- */
::selection {
    background-color: #58C8FA;
    color: white;
}

::-moz-selection {
    background-color: #58C8FA;
    color: white;
}

/* =============================================
   FOOTER BRANDING - DIGIN PERÚ
   ============================================= */

/* Divisor con gradiente */
.footer-divider {
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    margin: 2rem 0;
}

/* Contenedor principal del branding */
.footer-branding {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 2rem 0 0;
    flex-wrap: wrap;
    gap: 1.5rem;
}

/* Copyright */
.footer-copyright p {
    font-size: 0.9rem;
    opacity: 0.7;
    margin: 0;
}

/* Contenedor del texto "Desarrollado con ❤️ por" */
.footer-developer {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.developer-label {
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.8);
}

/* Corazón animado */
.developer-heart {
    color: #e74c3c;
    animation: heartbeat 1.5s ease-in-out infinite;
}

@keyframes heartbeat {
    0%, 100% { transform: scale(1); }
    25% { transform: scale(1.2); }
    50% { transform: scale(1); }
}

/* Link principal del branding */
.digin-brand {
    display: inline-block;
    text-decoration: none;
    transition: all 0.3s ease;
}

/* Logo container con gradiente de fondo */
.digin-logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1.5rem;
    background: linear-gradient(135deg, rgba(52, 152, 219, 0.1), rgba(46, 204, 113, 0.1));
    border-radius: 50px;
    border: 2px solid transparent;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

/* Efecto de brillo que se mueve */
.digin-logo::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.1), transparent);
    transition: all 0.3s ease;
}

/* Hover: Elevación y borde */
.digin-brand:hover .digin-logo {
    border-color: #2ecc71;
    transform: translateY(-3px);
    box-shadow: 0 5px 20px rgba(52, 152, 219, 0.3);
}

/* Hover: Animación del brillo */
.digin-brand:hover .digin-logo::before {
    left: 100%;
    transition: left 0.5s ease;
}

/* Icono circular con gradiente */
.digin-icon {
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, #3498db, #2ecc71);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.1rem;
    transition: all 0.3s ease;
}

/* Hover: Rotación del icono */
.digin-brand:hover .digin-icon {
    transform: rotate(360deg);
}

/* Contenedor del texto */
.digin-text {
    display: flex;
    flex-direction: column;
    gap: 0.1rem;
}

/* Nombre "Digin Perú" */
.digin-name {
    font-size: 1.1rem;
    font-weight: 700;
    color: white;
    letter-spacing: 0.5px;
}

/* Tagline "Digital Innovation" */
.digin-tagline {
    font-size: 0.7rem;
    color: rgba(255, 255, 255, 0.6);
    text-transform: uppercase;
    letter-spacing: 1px;
    font-weight: 500;
}

/* =============================================
   RESPONSIVE - MOBILE
   ============================================= */
@media (max-width: 768px) {
    .footer-branding {
        flex-direction: column;
        text-align: center;
        gap: 1rem;
    }
    
    .footer-developer {
        justify-content: center;
    }
    
    .digin-logo {
        padding: 0.65rem 1.25rem;
    }
}