/* Global CSS for Habbaby Hnos website */
/* Shared styles across all pages: index.html, about_us.html, services.html, contact.html */

:root {
    --text-color: rgb(22, 22, 22);
    --background-color: #ffffff;
    --accent-color: rgb(0, 84, 158);
    --border-color: #e5e5e5;
    --font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'SF Pro Text', 'Helvetica Neue', sans-serif;
    --overlay-color: rgba(255, 255, 255, 0.1);
}

body {
    position: relative;
    z-index: 1;
    font-family: var(--font-family);
    color: var(--text-color);
    background-color: var(--background-color);
    background-image: 
        linear-gradient(to bottom, transparent 0%, transparent 30%, rgba(255,255,255,0.6) 60%, rgba(255,255,255,0.8) 100%),
        linear-gradient(rgba(0,0,0,.08) 1px, transparent 1px),
        linear-gradient(90deg, rgba(0,0,0,.08) 1px, transparent 1px),
        url('../images/backgrounds/hero_background_light.jpg');
    background-size: 100% 100%, 30px 30px, 30px 30px, 100% 100%;
    background-position: 0 0, 0 0, 0 0, center;
    background-repeat: no-repeat, repeat, repeat, no-repeat;
    background-attachment: fixed, fixed, fixed, fixed;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-y: scroll;
    min-height: 100vh;
}

/* --- FIX: Unifica altura mínima de main en todas las páginas para que el botón flotante quede igual --- */
main {
    min-height: calc(100vh - 80px - 60px); /* 80px navbar + 60px footer aprox */
    display: flex;
    flex-direction: column;
}

/* Ajuste para que el footer siempre quede abajo y el contenido empuje el botón flotante igual que en las otras páginas */
@media (max-width: 767.98px) {
    main {
        min-height: calc(100vh - 56px - 50px); /* navbar y footer más chicos en mobile */
    }
}

/* === FORCE BACKGROUND CONSISTENCY ACROSS ALL PAGES === */
/* Ensure all main page sections are transparent to show global background */
.page-header,
.hero-section,
.content-section,
.timeline-section,
.spare-section {
    background: transparent !important;
}

/* Ensure service cards are less opaque to let background show through */
.service-card {
    background: rgba(255, 255, 255, 0.28) !important;
    backdrop-filter: blur(5px) !important;
}

/* Dark mode service cards */
body.dark-mode .service-card {
    background: rgba(40, 40, 40, 0.28) !important;
}

/* Force transparency in CTA sections and about sections */
.cta-section,
.about-snippet {
    background: rgba(248, 248, 248, 0.3) !important;
}

/* Dark mode CTA and about sections */
body.dark-mode .cta-section,
body.dark-mode .about-snippet {
    background: rgba(40, 40, 40, 0.3) !important;
}

/* === NAVBAR STYLES === */
.navbar {
    transition: background-color 0.3s ease-in-out;
    z-index: 1000; /* Ensure navbar is above content */
}

.navbar-glass {
    background-color: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border-color);
}

.nav-link {
    font-weight: 500;
    color: var(--text-color) !important;
    transition: color 0.2s ease;
}

.nav-link:hover, .nav-link.active {
    color: var(--accent-color) !important;
}

.nav-item {
    margin-left: 0.5rem;
}

/* === THEME TOGGLE === */
.theme-toggle {
    position: fixed;
    top: 19px; /* Subido 4px */
    right: 22px;
    z-index: 1200;
    background: none;
    border: none;
    color: var(--text-color);
    font-size: 1.2rem;
    cursor: pointer;
    margin: 0;
    transition: color 0.2s ease;
    box-shadow: none;
    padding: 0;
    border-radius: 0;
}

@media (max-width: 991.98px) {
    .theme-toggle {
        position: absolute;
        top: 11px; /* Subido 4px */
        right: 80px;
        font-size: 1.5rem;
        padding: 0;
        background: none;
        box-shadow: none;
    }
    
    .navbar-toggler[aria-expanded="true"] ~ .theme-toggle {
        top: 14px; /* Subido 4px */
        right: 48px;
    }
}

/* === BOTÓN ÚNICO GLOBAL (Actualización) === */
.btn {
    display: inline-block;
    font-family: var(--font-family);
    font-weight: 500;
    font-size: 1.05rem; /* Reducido ligeramente */
    line-height: 1.2;
    padding: 0.68em 2.1em;
    border-radius: 2em;
    border: none; /* Sin borde */
    background: #00549e; /* Azul que combina con el logo */
    color: #fff; /* Texto blanco */
    transition: all 0.18s cubic-bezier(.4,2,.6,1), box-shadow 0.18s cubic-bezier(.4,2,.6,1);
    cursor: pointer;
    outline: none;
    text-align: center;
    min-width: 120px;
    user-select: none;
}

.btn:hover, .btn:focus {
    background: #0060b4;
    color: #fff; /* Texto blanco */
}

.btn:active {
    transform: scale(0.98);
    box-shadow: 0 1px 4px rgba(0, 84, 158, 0.2);
}

.btn:disabled {
    opacity: 0.6;
    pointer-events: none;
    box-shadow: none;
}

/* === FOOTER === */
.footer {
    background-color: transparent !important;
    padding: 1.1rem 0 0.5rem 0;
    text-align: center;
    font-size: 0.92rem;
    color: #aaa;
    border-top: 1px solid var(--border-color);
}

/* === ANIMATIONS === */
.fade-in-up {
    opacity: 0;
    transform: translateY(28px);
    transition: opacity 0.7s cubic-bezier(.4,2,.3,1), transform 0.7s cubic-bezier(.4,2,.3,1);
}

.fade-in-up.is-visible {
    opacity: 1;
    transform: translateY(0);
}

/* === WHATSAPP FLOAT === */
.whatsapp-float {
    position: fixed;
    width: 60px;
    height: 60px;
    bottom: 30px;
    right: 40px;
    background-color: #25d366;
    color: #FFF;
    border-radius: 50px;
    text-align: center;
    font-size: 30px;
    box-shadow: 2px 2px 8px rgba(0,0,0,0.3);
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    text-decoration: none;
    animation: shake-whatsapp 12s infinite;
}


@keyframes shake-whatsapp {
    /* Normal hasta los 3 segundos (25% de 12s) */
    0%, 24% {
        transform: rotate(0deg) scale(1);
    }
    /* Shake a los 3 segundos */
    25% {
        transform: rotate(-5deg) scale(1.15);
    }
    26% {
        transform: rotate(5deg) scale(1.15);
    }
    27% {
        transform: rotate(-5deg) scale(1.15);
    }
    28% {
        transform: rotate(5deg) scale(1.15);
    }
    29% {
        transform: rotate(-5deg) scale(1.15);
    }
    30% {
        transform: rotate(5deg) scale(1.15);
    }
    31% {
        transform: rotate(0deg) scale(1.1);
    }
    32%, 100% {
        transform: rotate(0deg) scale(1);
    }
}

.whatsapp-float:hover {
    background-color: #1DA851;
    color: #FFF;
    text-decoration: none;
    transform: scale(1.1);
    animation: none;
}

.whatsapp-float i {
    font-size: 2rem;
    color: #FFF;
}

/* Ajuste específico para mobile */
@media (max-width: 767.98px) {
    .whatsapp-float {
        bottom: 20px;
        right: 20px;
        width: 50px;
        height: 50px;
    }
    
    .whatsapp-float i {
        font-size: 1.5rem;
    }
}

/* === SCROLL HINT ARROW === */
.scroll-hint {
    position: fixed;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.5s ease, visibility 0.5s ease;
    z-index: 150;
    pointer-events: none;
}

.scroll-hint.show {
    opacity: 1;
    visibility: visible;
}

.scroll-arrow-svg {
    display: block;
    margin: 0 auto;
    width: 48px;
    height: 48px;
    color: var(--text-color);
    opacity: 0.8;
    animation: scroll-bounce-svg 2s ease-in-out infinite;
}

@keyframes scroll-bounce-svg {
    0%, 20%, 50%, 80%, 100% {
        transform: translateY(0);
    }
    40% {
        transform: translateY(10px);
    }
    60% {
        transform: translateY(5px);
    }
}

body.dark-mode .scroll-arrow-svg {
    color: #f0f0f0;
}

/* === DARK MODE === */
body.dark-mode {
    --text-color: rgb(240, 240, 240);
    --background-color: #181818;
    --border-color: #333;
    --overlay-color: rgba(26, 26, 26, 0.5);
    background-image: 
        linear-gradient(to bottom, transparent 0%, transparent 50%, rgba(24,24,24,0.6) 60%, rgba(24,24,24,0.8) 100%),
        linear-gradient(rgba(255,255,255,.05) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255,255,255,.05) 1px, transparent 1px),
        url('../images/backgrounds/hero_background_dark.jpg');
    background-size: 100% 100%, 30px 30px, 30px 30px, cover;
    background-position: 0 0, 0 0, 0 0, center;
    background-repeat: no-repeat, repeat, repeat, no-repeat;
    background-attachment: fixed, fixed, fixed, fixed;
}

body.dark-mode .navbar-glass {
    background-color: rgba(26, 26, 26, 0.8);
    border-bottom: 1px solid var(--border-color);
}

body.dark-mode .navbar {
    background-color: transparent !important;
}

body.dark-mode .nav-link,
body.dark-mode .navbar-brand,
body.dark-mode .navbar-brand img {
    color: #f0f0f0 !important;
}

body.dark-mode .footer {
    background-color: transparent !important;
    color: #ccc;
    border-top: 1px solid var(--border-color);
}

/* Mejora visibilidad del menú hamburguesa en dark mode */
body.dark-mode .navbar-toggler-icon {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='rgba(240,240,240,1)' stroke-width='2' stroke-linecap='round' stroke-miterlimit='10' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e");
}

/* Dark mode logo brightness */
body.dark-mode .navbar-brand img {
    filter: brightness(1.4) contrast(1.15);
}

body.dark-mode .theme-toggle {
    background: none;
}

/* === MOBILE GRID TRANSPARENCY === */
@media (max-width: 768px) {
    body {
        background-image: 
            linear-gradient(to bottom, transparent 0%, transparent 50%, rgba(255,255,255,0.6) 60%, rgba(255,255,255,0.8) 100%),
            linear-gradient(rgba(0,0,0,.02) 1px, transparent 1px),
            linear-gradient(90deg, rgba(0,0,0,.02) 1px, transparent 1px),
            url('../images/backgrounds/hero_background_light.jpg');
        background-size: 100% 100%, 30px 30px, 30px 30px, 100% 100%;
        background-position: 0 0, 0 0, 0 0, center;
        background-repeat: no-repeat, repeat, repeat, no-repeat;
        background-attachment: fixed, fixed, fixed, fixed;
    }
    body.dark-mode {
        background-image: 
            linear-gradient(to bottom, transparent 0%, transparent 50%, rgba(24,24,24,0.6) 60%, rgba(24,24,24,0.8) 100%),
            linear-gradient(rgba(255,255,255,.01) 1px, transparent 1px),
            linear-gradient(90deg, rgba(255,255,255,.01) 1px, transparent 1px),
            url('../images/backgrounds/hero_background_dark.jpg');
        background-size: 100% 100%, 30px 30px, 30px 30px, cover;
        background-position: 0 0, 0 0, 0 0, center;
        background-repeat: no-repeat, repeat, repeat, no-repeat;
        background-attachment: fixed, fixed, fixed, fixed;
    }
}

/* Pseudo-elemento para imagen de fondo con opacidad */
body::before {
    content: '';
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    z-index: 0;
    pointer-events: none;
    background: none;
    background-image: linear-gradient(to bottom, transparent 0%, transparent 50%, rgba(255,255,255,0.6) 60%, rgba(255,255,255,0.8) 100%), url('../images/backgrounds/page_background_light.png');
    background-repeat: repeat;
    background-size: auto 100%; /* Ajusta al alto de la pantalla sin deformar */
    background-position: top right;
    opacity: 0.085;
}
body.dark-mode::before {
    background-image: url('../images/backgrounds/page_background_dark.png');
    opacity: 0.06;
}
@media (max-width: 768px) {
    body::before {
        display: none !important;
    }
}

.card {
    background: rgba(255,255,255,0.18); /* Blanco con más transparencia */
    box-shadow: 0 2px 12px rgba(0,0,0,0.08);
    border-radius: 1.1rem;
    /* ...puedes agregar más estilos si lo deseas... */
}

.feature-card {
    background: rgba(255,255,255,0.12) !important;
    backdrop-filter: blur(8px) !important;
    border: 1px solid var(--border-color);
    border-radius: 1rem;
    padding: 2rem 1.5rem 1.5rem 1.5rem;
    text-align: center;
    transition: box-shadow 0.25s cubic-bezier(.4,2,.3,1), transform 0.18s cubic-bezier(.4,2,.3,1);
    box-shadow: 0 2px 8px rgba(0,0,0,0.02);
}
.feature-card:hover {
    border-color: #dbe6f3;
    background: rgba(255,255,255,0.18) !important;
}
body.dark-mode .feature-card {
    background: rgba(35,35,35,0.12) !important;
    backdrop-filter: blur(8px) !important;
    border-color: #333;
    color: #f0f0f0;
}
body.dark-mode .feature-card:hover {
    background: rgba(35,35,35,0.18) !important;
}