* {
    margin: 100;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: #333;
}

/* ==================== COLORES ==================== */
:root {
    --primary: #17a398;
    --accent: #ff7e5f;
    --dark: #2c3e50;
}

/* ==================== HEADER CON LÍNEA VERDE ==================== */
header .container {
    display: flex;
    align-items: center;
    
    max-width: 100%;
    margin: 0 auto;
    height: 5.5rem;
    gap: 5px;                    /* espacio entre logo, línea y nav */
}

.logo {
    flex-shrink: 0;               /* evita que el logo se comprima */
}

.header-divider {
    height: 15px;                  /* grosor de la línea */
    background: var(--primary);   /* color verde (#17a398) */
    flex-grow: 1;                 /* ocupa todo el espacio disponible */
    margin: 0 10px;               /* espacio a los lados */
    border-radius: 2px;
}



nav a {
    margin-left: 25px;
    text-decoration: none;
    color: var(--dark);
    font-weight: 600;
    transition: color 0.3s ease;
}

nav a:hover {
    color: var(--primary);
}

/* Responsive - En móviles la línea se oculta o se ajusta */
@media (max-width: 768px) {
    header .container {
        flex-wrap: wrap;
        height: auto;
        
        gap: 12px;
    }
    

    
    nav {
        width: 100%;
        text-align: center;
    }
    
    nav a {
        margin: 0 12px;
        font-size: 0.95rem;
    }
}

.logo h1 {
    color: var(--primary);
    font-size: 2rem;
    font-weight: bold;
}

nav a {
    margin-left: 25px;
    text-decoration: none;
    color: var(--dark);
    font-weight: 600;
    transition: color 0.3s;
}

nav a:hover {
    color: var(--primary);
}

/* ==================== HERO ==================== */
.hero {
    position: relative;
    height: 65vh;
    overflow: hidden;
    color: white;
    text-align: center;
}

.carousel {
    position: absolute;
    top: 0; left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
}

.slide {
    position: absolute;
    top: 0; left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    opacity: 0;
    transition: opacity 1s ease-in-out;
}

.slide.active {
    opacity: 1;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: linear-gradient(rgba(0,0,0,0.35), rgba(23,163,152,0.45));
    z-index: 2;
}

.hero-content {
    position: relative;
    z-index: 3;
    max-width: 800px;
    margin: 0 auto;
    padding: 0 20px;
    top: 50%;
    transform: translateY(-50%);
}

.hero h2 {
    font-size: 3.4rem;
    margin-bottom: 15px;
}

.hero p {
    font-size: 1.4rem;
    margin-bottom: 35px;
}

.hero-buttons {
    display: flex;
    gap: 15px;
    justify-content: center;
    flex-wrap: wrap;
}

.btn {
    background: var(--primary);
    color: white;
    padding: 15px 38px;
    border-radius: 50px;
    text-decoration: none;
    font-weight: bold;
    font-size: 1.1rem;
    transition: all 0.3s;
}

.btn:hover {
    background: #13897f;
    transform: translateY(-5px);
}

.whatsapp-btn {
    background: #25D366;
}

.whatsapp-btn:hover {
    background: #20c157;
}

/* Carrusel controles */
.carousel-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0,0,0,0.5);
    color: white;
    border: none;
    width: 55px;
    height: 55px;
    border-radius: 50%;
    font-size: 1.6rem;
    cursor: pointer;
    z-index: 10;
}

.carousel-btn:hover {
    background: var(--accent);
}

.prev { left: 30px; }
.next { right: 30px; }

.carousel-dots {
    position: absolute;
    bottom: 50px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 12px;
    z-index: 10;
}

.dot {
    width: 14px;
    height: 14px;
    background: rgba(255,255,255,0.7);
    border-radius: 50%;
    cursor: pointer;
}

.dot.active {
    background: var(--accent);
    transform: scale(1.4);
}

/* ==================== SECCIONES ==================== */
.section {
    padding: 80px 0;
}

.bg-light {
    background-color: #f8f9fa;
}

.section-title {
    text-align: center;
    font-size: 2.4rem;
    margin-bottom: 50px;
    color: var(--primary);
    position: relative;
}

.section-title::after {
    content: '';
    display: block;
    width: 80px;
    height: 4px;
    background: var(--accent);
    margin: 12px auto;
    border-radius: 2px;
}

/* ==================== TARJETAS (SERVICE CARDS) - MÁS COLORIDAS ==================== */
.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 25px;
}

.service-card {
    background: white;
    padding: 40px 25px;
    border-radius: 16px;
    text-align: center;
    box-shadow: 0 5px 20px rgba(0,0,0,0.08);
    transition: all 0.4s;
    border: 2px solid transparent;
}

.service-card:hover {
    transform: translateY(-15px);
    box-shadow: 0 20px 35px rgba(23, 163, 152, 0.2);
    border-color: var(--accent);
}

.service-card i {
    font-size: 3.2rem;
    margin-bottom: 20px;
    transition: all 0.3s;
}

.service-card:hover i {
    transform: scale(1.15);
}

/* Colores individuales por tarjeta */
.service-card:nth-child(1) i { color: #17a398; }   /* Atención Médica */
.service-card:nth-child(2) i { color: #e74c3c; }   /* Alimentación */
.service-card:nth-child(3) i { color: #3498db; }   /* Rehabilitación */
.service-card:nth-child(4) i { color: #9b59b6; }   /* Estimulación Cognitiva */
.service-card:nth-child(5) i { color: #f39c12; }   /* Acompañamiento Emocional */
.service-card:nth-child(6) i { color: #1abc9c; }   /* Hospedaje */

.service-card h3 {
    margin-bottom: 12px;
    color: var(--dark);
    font-size: 1.35rem;
}

/* ==================== CONTACTO ==================== */
.contact-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
}

.contact-info i {
    color: var(--primary);
    width: 28px;
}

.contact-form input,
.contact-form textarea {
    width: 100%;
    padding: 14px;
    margin-bottom: 18px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 1rem;
}

/* Footer */
footer {
    background: linear-gradient(135deg, var(--dark), #34495e);
    color: white;
    text-align: center;
    padding: 40px 0;
}


/* Mapa */
/* ==================== MAPA Y DIRECCIÓN ==================== */
.location {
    text-align: center;
    margin-bottom: 30px;
}

.location .address {
    font-size: 1.25rem;
    margin-bottom: 30px;
    color: var(--primary);
    font-weight: 600;
    text-align: center;
    display: block;
}

.map-wrapper {
    max-width: 850px;
    margin: 0 auto;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0,0,0,0.15);
}

/* Responsive */
@media (max-width: 768px) {
    .about-grid, .contact-grid {
        grid-template-columns: 1fr;
    }
    .hero h2 {
        font-size: 2.5rem;
    }
}

/* ==================== NOSOTROS - IMAGEN AL LADO ==================== */
.about-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;   /* Dos columnas iguales */
    gap: 60px;
    align-items:center;
    place-items: center;
}

.about-text {
    font-size: 1.1rem;
    line-height: 1.8;
}

.about-text p {
    margin-bottom: 20px;
}

.about-image img {
    width: 100%;
    border-radius: 16px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.15);
    transition: transform 0.4s;
}


/* En móviles se pone una debajo de la otra */
@media (max-width: 768px) {
    .about-grid {
        grid-template-columns: 1fr;
        gap: 40px;
    }
}


/* ==================== BOTONES FLOTANTES (WhatsApp + Instagram) ==================== */
.floating-buttons {
    position: fixed;
    bottom: 25px;
    right: 25px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    z-index: 9999;
}

.floating-btn {
    width: 62px;
    height: 62px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 29px;
    color: white;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
    transition: all 0.35s ease;
    text-decoration: none;
}

.floating-btn:hover {
    transform: scale(1.18) translateY(-4px);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.4);
}

/* WhatsApp */
.floating-btn.whatsapp {
    background-color: #25D366;
}

.floating-btn.whatsapp:hover {
    background-color: #20c157;
}

/* Instagram - Colores originales reales */
.floating-btn.instagram {
    background: linear-gradient(135deg, 
        #405DE6 0%, 
        #5851DB 10%, 
        #833AB4 25%, 
        #C13584 40%, 
        #E1306C 55%, 
        #FD1D1D 70%, 
        #F56040 85%, 
        #F77737 100%);
    box-shadow: 0 6px 20px rgba(225, 48, 108, 0.4);
}

.floating-btn.instagram:hover {
    box-shadow: 0 12px 30px rgba(225, 48, 108, 0.5);
}


/* Mensaje de éxito */
.success-message {
    text-align: center;
    padding: 30px 20px;
    background-color: #d4edda;
    color: #155724;
    border: 2px solid #c3e6cb;
    border-radius: 12px;
    margin-top: 20px;
}

.success-message i {
    font-size: 3.5rem;
    color: #28a745;
    margin-bottom: 15px;
}

.success-message h3 {
    margin-bottom: 10px;
    color: #155724;
}

.success-message p {
    font-size: 1.1rem;
    margin: 0;
}

.success-message {
    text-align: center;
    padding: 35px 20px;
    background-color: #d4edda;
    color: #155724;
    border: 2px solid #c3e6cb;
    border-radius: 16px;
    margin-top: 25px;
}

.success-message i {
    font-size: 3.8rem;
    color: #28a745;
    margin-bottom: 15px;
}

.success-message h3 {
    margin: 10px 0 8px;
}

.success-message button {
    margin-top: 15px;
    background: var(--primary);
}