/* ============================================
   Happy Home — Landing Page Styles
   ============================================ */

:root {
    --primary: #1e40af;
    --primary-dark: #1e3a8a;
    --primary-light: #3b82f6;
    --accent: #0ea5e9;
    --dark: #0f172a;
    --gray-50: #f8fafc;
    --gray-100: #f1f5f9;
    --gray-200: #e2e8f0;
    --gray-500: #64748b;
    --gray-700: #334155;
    --success: #10b981;
    --warning: #f59e0b;
    --danger: #ef4444;
}

* { box-sizing: border-box; }

html, body {
    overflow-x: hidden;
    max-width: 100%;
}

body {
    font-family: 'Inter', 'Segoe UI', sans-serif;
    color: var(--gray-700);
}

/* ---- Navbar ---- */
#navbarMain {
    background: transparent;
    transition: all 0.3s ease;
    padding: 0;
}

#navbarMain.navbar-scrolled {
    background: var(--dark) !important;
    box-shadow: 0 2px 20px rgba(0,0,0,0.3);
    padding: 0;
}

/* ---- Navbar mobile: siempre fondo oscuro ---- */
@media (max-width: 991.98px) {
    #navbarMain {
        background: rgba(15, 23, 42, 0.97) !important;
        padding: 8px 0;
    }

    /* Hamburguesa: borde blanco + ícono blanco sólido */
    #navbarMain .navbar-toggler {
        border: 2px solid rgba(255, 255, 255, 0.85) !important;
        padding: 5px 9px !important;
        border-radius: 6px !important;
    }
    #navbarMain .navbar-toggler-icon {
        /* Tres líneas blancas explícitas */
        background-image: url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'><path stroke='white' stroke-width='2.5' stroke-linecap='round' d='M4 7h22M4 15h22M4 23h22'/></svg>") !important;
        width: 24px;
        height: 24px;
    }

    /* Menú desplegado */
    #navbarMain .navbar-collapse {
        border-top: 1px solid rgba(255,255,255,0.12);
        padding: 0.4rem 0 0.75rem;
        margin-top: 6px;
    }
    #navbarMain .navbar-collapse .nav-link {
        padding: 0.65rem 0.75rem !important;
        border-bottom: 1px solid rgba(255,255,255,0.07);
        border-radius: 0;
    }
    #navbarMain .navbar-collapse .ms-lg-3 {
        padding-top: 0.75rem;
    }

    /* Hero: la sección empieza DESPUÉS del navbar fijo */
    .hero-section {
        margin-top: 56px;
        height: calc(100vh - 56px);
        min-height: 380px;
    }

    /* El hero-content ahora cubre toda la sección (que ya empieza bajo el navbar) */
    .hero-content {
        top: 0;
        padding-top: 0;
        align-items: center;
    }

    /* Imagen de fondo: cubrir bien en portrait */
    .hero-slide {
        background-size: cover;
        background-position: center top;
    }

    .hero-title {
        font-size: 1.5rem !important;
    }

    .hero-subtitle {
        font-size: 0.9rem;
    }
}

.logo-nav {
    height: 60px;
    width: auto;
    border-radius: 6px;
    padding: 0;
}
/* Navbar un poco más alto para acomodar logo más grande */
#navbarMain .container { min-height: 76px; }

.brand-text {
    font-weight: 800;
    font-size: 1.2rem;
    letter-spacing: -0.5px;
}

.nav-link {
    font-weight: 500;
    font-size: 0.9rem;
    padding: 0.5rem 1rem !important;
    border-radius: 6px;
    transition: background 0.2s;
}

.nav-link:hover {
    background: rgba(255,255,255,0.1);
}

/* ---- Hero Carousel ---- */
.hero-section {
    position: relative;
    overflow: hidden;
    height: 90vh;
    min-height: 780px;
}

/* Imagen del convenio dentro del hero (debajo del texto) */
.hero-image-wrapper {
    margin: 1.5rem auto 2.5rem;
    max-width: 865px;
    padding: 0 1rem;
}
.hero-image {
    width: 100%;
    height: auto;
    max-height: 240px;
    object-fit: contain;
    display: block;
    filter: drop-shadow(0 6px 18px rgba(0,0,0,0.3));
}
@media (max-width: 768px) {
    .hero-image-wrapper { max-width: 600px; margin: 1rem auto 1.75rem; }
    .hero-image         { max-height: 160px; }
}

/* Card destacado: Supervisoras */
.supervisoras-card {
    background: linear-gradient(135deg, #f0f9ff 0%, #e0f2fe 100%);
    border-left: 6px solid var(--primary);
    border-radius: 16px;
    padding: 2.5rem;
    box-shadow: 0 6px 24px rgba(15,23,42,0.08);
}
.supervisora-img {
    width: 100%;
    height: auto;
    display: block;
}
@media (max-width: 768px) {
    .supervisoras-card { padding: 1.5rem; }
}

/* Imagen real en sección Nosotros (reemplaza placeholder) */
.about-real-img {
    width: 100%;
    max-width: 420px;
    height: auto;
    border-radius: 20px;
    box-shadow: 0 12px 32px rgba(15,23,42,0.18);
    display: block;
    margin: 0 auto;
}
@media (max-width: 991px) {
    .about-real-img { max-width: 320px; }
}
@media (max-width: 576px) {
    .about-real-img { max-width: 260px; }
}

#heroCarousel,
.hero-section .carousel,
.hero-section .carousel-inner,
.hero-section .carousel-item {
    height: 100%;
    width: 100%;
}

.hero-slide {
    height: 100%;
    width: 100%;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    background-color: var(--dark);
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(15, 23, 42, 0.55);
    z-index: 1;
    pointer-events: none;
}

.hero-content {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2;
}

.hero-title {
    font-size: clamp(1.8rem, 4vw, 2.8rem);
    font-weight: 900;
    line-height: 1.2;
    margin-bottom: 1rem;
    letter-spacing: -0.5px;
}

.text-gradient {
    background: linear-gradient(135deg, #60a5fa, #06b6d4);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-subtitle {
    font-size: 1.1rem;
    opacity: 0.85;
    max-width: 600px;
    line-height: 1.6;
}

/* ---- Sections ---- */
.section-padding {
    padding: 5rem 0;
}

/* ---- Emergency Section ---- */
.emergency-section {
    padding: 3rem 0;
    background: white;
}

.emergency-parallax {
    height: 100%;
    min-height: 320px;
    background-size: 120%; /* más grande que la caja para que haya margen de movimiento */
    background-position: center center;
    background-attachment: scroll;
    background-repeat: no-repeat;
    border-radius: 0;
    will-change: background-position; /* optimización GPU */
}

.emergency-card {
    background: white;
    border-radius: 20px;
    box-shadow: 0 8px 40px rgba(0,0,0,0.1);
    overflow: hidden;
    margin-top: -60px;
    position: relative;
    z-index: 3;
    max-width: 500px;
    margin-left: auto;
    margin-right: auto;
}

.emergency-img {
    width: 100%;
    height: 100%;
    min-height: 250px;
    object-fit: cover;
}

.emergency-content {
    padding: 2.5rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.emergency-title {
    font-size: 1.4rem;
    font-weight: 800;
    color: var(--dark);
}

.emergency-title span {
    color: var(--primary);
}

.emergency-phone {
    font-size: 1.8rem;
    font-weight: 800;
    color: var(--primary);
    text-decoration: none;
    display: block;
    margin: 0.5rem 0 1rem;
}

.emergency-phone:hover {
    color: var(--primary-dark);
}

.emergency-desc {
    color: var(--gray-500);
    font-size: 0.95rem;
    line-height: 1.6;
    margin-bottom: 1.5rem;
    text-align: center;
    max-width: 600px;
}

.btn-call {
    background: var(--primary);
    color: white;
    border: none;
    padding: 0.8rem 2rem;
    border-radius: 30px;
    font-weight: 700;
    font-size: 1rem;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.3s;
    text-decoration: none;
}

.btn-call:hover {
    background: var(--primary-dark);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(30, 64, 175, 0.3);
}

.section-title {
    font-size: clamp(1.6rem, 3vw, 2.2rem);
    font-weight: 800;
    color: var(--dark);
    letter-spacing: -0.5px;
}

.section-subtitle {
    color: var(--gray-500);
    max-width: 600px;
    margin: 0 auto;
}

/* ---- Service Cards ---- */
.service-card {
    background: white;
    border-radius: 16px;
    padding: 2rem;
    height: 100%;
    border: 1px solid var(--gray-200);
    transition: all 0.3s ease;
}

.service-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 40px rgba(0,0,0,0.08);
    border-color: transparent;
}

.service-icon {
    width: 56px;
    height: 56px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1rem;
    font-size: 1.5rem;
}

.service-card h5 {
    font-weight: 700;
    font-size: 1.05rem;
    margin-bottom: 0.5rem;
    color: var(--dark);
}

.service-card p {
    color: var(--gray-500);
    font-size: 0.9rem;
    margin-bottom: 0.75rem;
    line-height: 1.5;
}

.service-img {
    width: 100%;
    height: 180px;
    object-fit: cover;
}

/* ---- About ---- */
.about-feature {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.75rem;
    background: var(--gray-50);
    border-radius: 10px;
    font-size: 0.85rem;
    font-weight: 500;
}

.about-feature i {
    font-size: 1.1rem;
}

.about-image-wrapper {
    position: relative;
    border-radius: 20px;
    padding: 1rem;
    min-height: auto;
    display: flex;
    align-items: center;
    justify-content: center;
}

.about-image-placeholder {
    text-align: center;
    color: white;
}

.about-image-placeholder i {
    font-size: 5rem;
    opacity: 0.8;
    display: block;
    margin-bottom: 1rem;
}

.about-image-placeholder span {
    font-size: 1.1rem;
    opacity: 0.9;
    font-weight: 500;
}

.about-badge {
    position: absolute;
    bottom: -20px;
    right: 30px;
    background: white;
    padding: 1rem 1.5rem;
    border-radius: 12px;
    box-shadow: 0 8px 30px rgba(0,0,0,0.12);
    text-align: center;
    color: var(--primary);
}

/* ---- Process ---- */
.process-card {
    background: white;
    border-radius: 16px;
    padding: 2rem;
    text-align: center;
    height: 100%;
    border: 1px solid var(--gray-200);
    position: relative;
}

.process-number {
    width: 44px;
    height: 44px;
    background: var(--primary);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 1.1rem;
    margin: 0 auto 1rem;
}

/* ---- Form Section ---- */
.card-service {
    border: none;
    border-radius: 16px;
    box-shadow: 0 4px 24px rgba(0,0,0,0.08);
}

.problema-card {
    cursor: pointer;
    border: 2px solid var(--gray-200);
    border-radius: 10px;
    padding: 12px 16px;
    transition: all 0.2s;
}

.problema-card:hover,
.problema-card.selected {
    border-color: var(--primary);
    background: #eff6ff;
}

.problema-card input { display: none; }

.btn-primary {
    background: var(--primary);
    border-color: var(--primary);
}

.btn-primary:hover {
    background: var(--primary-dark);
    border-color: var(--primary-dark);
}

/* ---- Footer ---- */
.footer-section {
    background: var(--dark);
}

.footer-links {
    list-style: none;
    padding: 0;
}

.footer-links li {
    margin-bottom: 0.5rem;
}

.footer-links a {
    color: rgba(255,255,255,0.6);
    text-decoration: none;
    font-size: 0.9rem;
    transition: color 0.2s;
}

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

/* ---- WhatsApp Float ---- */
.whatsapp-float {
    position: fixed;
    bottom: 24px;
    right: 24px;
    width: 56px;
    height: 56px;
    background: #25d366;
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.6rem;
    box-shadow: 0 4px 20px rgba(37,211,102,0.4);
    z-index: 1000;
    transition: transform 0.3s;
    text-decoration: none;
}

.whatsapp-float:hover {
    transform: scale(1.1);
    color: white;
}

/* ---- Call Float ---- */
.call-float {
    position: fixed;
    bottom: 24px;
    left: 24px;
    height: 48px;
    background: var(--primary);
    color: white;
    border-radius: 30px;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0 1.2rem;
    font-size: 0.95rem;
    font-weight: 600;
    box-shadow: 0 4px 20px rgba(30,64,175,0.4);
    z-index: 1000;
    transition: transform 0.3s;
    text-decoration: none;
}

.call-float:hover {
    transform: scale(1.05);
    color: white;
}

.call-float i {
    font-size: 1.1rem;
}

.call-float-text {
    font-size: 0.85rem;
}

/* ---- Responsive: tablets ---- */
@media (max-width: 768px) {
    .logo-nav { height: 48px; }

    .section-padding { padding: 2.5rem 0; }

    .hero-section {
        height: calc(100vh - 56px);
        min-height: 320px;
    }
    .hero-title   { font-size: 1.5rem !important; }
    .hero-subtitle { font-size: 0.9rem; margin: 0 auto; max-width: 90%; }

    .section-title  { font-size: 1.4rem; }
    .section-subtitle { font-size: 0.9rem; }

    .about-image-wrapper { min-height: 200px; padding: 2rem; }
    .about-badge { right: 16px; bottom: -16px; padding: 0.6rem 1rem; }

    .emergency-card { margin-top: -20px; border-radius: 12px; }
    .emergency-content { padding: 1.25rem; }
    .emergency-title { font-size: 1.1rem; }
    .emergency-phone { font-size: 1.3rem; }
    .emergency-desc  { font-size: 0.85rem; }
    .btn-call        { padding: 0.6rem 1.4rem; font-size: 0.9rem; }

    /* Foto emergencia: altura fija cuando se apila en móvil */
    .emergency-parallax {
        height: 220px !important;
        min-height: 0;
        border-radius: 12px 12px 0 0 !important; /* esquinas arriba, plano abajo */
        background-attachment: scroll !important;
        background-position: center center;
    }

    /* Flotantes más pequeños en mobile */
    .whatsapp-float {
        bottom: 14px; right: 14px;
        width: 46px; height: 46px;
        font-size: 1.3rem;
    }
    .call-float {
        bottom: 14px; left: 14px;
        height: 42px; padding: 0 1rem;
        font-size: 0.85rem;
    }
}

/* ---- Responsive: móviles pequeños ---- */
@media (max-width: 480px) {
    .logo-nav { height: 42px; }

    .hero-section {
        height: calc(100vh - 56px);
        min-height: 280px;
    }
    .hero-title    { font-size: 1.3rem !important; }
    .hero-subtitle { font-size: 0.82rem; }

    /* Botones hero en columna */
    .hero-content .d-flex.flex-wrap {
        flex-direction: column;
        align-items: center;
    }
    .hero-content .btn { width: 80%; text-align: center; }

    .section-title    { font-size: 1.2rem; }
    .section-padding  { padding: 2rem 0; }

    /* Foto emergencia más pequeña en móviles chicos */
    .emergency-parallax {
        height: 180px !important;
    }

    /* Cards de problema: 1 columna */
    .problema-card { padding: 10px 12px; font-size: 0.85rem; }

    /* Info cards inferiores en 1 fila */
    .service-card { padding: 1.25rem; }

    /* Footer */
    .footer-section .fs-5 { font-size: 1rem !important; }

    /* Ocultar texto del botón flotante en pantallas muy pequeñas */
    .call-float-text { display: none; }
    .call-float      { width: 46px; height: 46px; border-radius: 50%; padding: 0; justify-content: center; }
}
