/* ==========================================================================
   1. RESET Y CONFIGURACIÓN BASE
   ========================================================================== */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: Arial, Helvetica, sans-serif;
    color: #2c3e50;
    background-color: #f4f9fc;
    line-height: 1.6;
    width: 100%;
    overflow-x: hidden;
}

img, iframe {
    max-width: 100%;
    height: auto;
    display: block;
}

/* ==========================================================================
   2. ENCABEZADO Y MENÚ DE NAVEGACIÓN
   ========================================================================== */
.main-header {
    width: 100%;
    position: sticky;
    top: 0;
    z-index: 1000;
    background: #ffffff;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    border-bottom: 3px solid #0284c7;
}

.header-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 10px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    max-height: 65px;
    width: auto;
    object-fit: contain;
}

.main-nav {
    display: flex;
    gap: 15px;
    align-items: center;
}

.main-nav a {
    text-decoration: none;
    color: #0369a1;
    font-weight: bold;
    font-size: 15px;
    padding: 8px 14px;
    border-radius: 6px;
    transition: background-color 0.2s ease, color 0.2s ease;
}

.main-nav a:hover {
    background-color: #e0f2fe;
    color: #0284c7;
}

/* ==========================================================================
   3. SECCIONES Y CONTENIDOS GENERALES
   ========================================================================== */
section {
    padding: 50px 20px;
    text-align: center;
}

section h2 {
    font-size: 30px;
    margin-bottom: 15px;
    color: #0369a1;
}

section p {
    max-width: 750px;
    margin: 0 auto 15px;
    font-size: 16px;
    color: #334155;
}

/* ==========================================================================
   4. INICIO / PORTADA
   ========================================================================== */
#inicio {
    padding: 80px 20px;
    min-height: 480px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    background-image: linear-gradient(rgba(14, 116, 144, 0.65), rgba(15, 23, 42, 0.7)), url("imagenes/asilo13.png");
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

#inicio h1 {
    font-size: 42px;
    color: #ffffff;
    margin-bottom: 12px;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
}

#inicio h2 {
    font-size: 22px;
    color: #e0f2fe;
    margin-bottom: 25px;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.4);
}

#inicio p {
    font-size: 17px;
    color: #ffffff;
    max-width: 650px;
}

.btn-principal {
    display: inline-block;
    margin-top: 20px;
    padding: 12px 30px;
    background-color: #0284c7;
    color: #ffffff;
    font-size: 16px;
    font-weight: bold;
    text-decoration: none;
    border-radius: 25px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
    transition: background-color 0.3s ease, transform 0.2s ease;
}

.btn-principal:hover {
    background-color: #0369a1;
    transform: translateY(-2px);
}

/* ==========================================================================
   5. NOSOTROS
   ========================================================================== */
#nosotros {
    background-color: #ffffff;
}

#mision {
    margin-top: 25px;
}

#mision h3 {
    color: #0369a1;
    margin-bottom: 8px;
}

/* ==========================================================================
   6. SERVICIOS
   ========================================================================== */
#servicios {
    background-color: #f0f9ff;
}

.servicios-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 20px;
    max-width: 1100px;
    margin: 25px auto 0;
}

.servicio-card {
    flex: 1 1 220px;
    max-width: 260px;
    padding: 22px 18px;
    background-color: #ffffff;
    border-radius: 12px;
    border-top: 4px solid #0284c7;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.06);
}

.servicio-card h3 {
    color: #0369a1;
    margin-bottom: 10px;
    font-size: 18px;
}

.servicio-card p {
    font-size: 14px;
    color: #475569;
    margin: 0;
}
.servicio-card img {
    width: 100%;
    height: 180px;
    object-fit: contain;
    border-radius: 8px;
    margin-top: 15px;
    margin-bottom: 15px;
    background-color: #f0f9ff;
}


/* ==========================================================================
   7. GALERÍA
   ========================================================================== */
#galeria {
    background-color: #ffffff;
}

.galeria-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 15px;
    max-width: 1100px;
    margin: 25px auto 0;
}

.galeria-grid img {
    width: calc(33.333% - 15px);
    max-width: 320px;
    height: 210px;
    object-fit: cover;
    border-radius: 8px;
    border: 1px solid #e2e8f0;
    box-shadow: 0 3px 6px rgba(0, 0, 0, 0.08);
}

/* ==========================================================================
   8. CONTACTO Y MAPA
   ========================================================================== */
#contacto {
    background-color: #e0f2fe;
}

.social-buttons {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 15px;
    margin: 20px 0;
    flex-wrap: wrap;
}

.btn-social {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 10px 22px;
    border-radius: 30px;
    color: #ffffff;
    font-size: 15px;
    font-weight: bold;
    text-decoration: none;
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.15);
}

.btn-instagram { background: linear-gradient(45deg, #f09433, #dc2743, #bc1888); }
.btn-facebook { background: #1877f2; }
.btn-whatsapp { background: #25d366; }

.mapa-section {
    margin-top: 30px;
}

.mapa-container {
    width: 100%;
    max-width: 900px;
    margin: 15px auto 0;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.1);
}

.mapa-container iframe {
    width: 100%;
    height: 320px;
    border: 0;
}

/* ==========================================================================
   9. PIE DE PÁGINA
   ========================================================================== */
footer {
    padding: 18px;
    text-align: center;
    background-color: #0c4a6e;
    color: #ffffff;
    font-size: 14px;
}

/* ==========================================================================
   10. ADAPTACIÓN RESPONSIVA (MÓVILES Y TABLETS)
   ========================================================================== */
@media (max-width: 768px) {
    .header-container {
        flex-direction: column;
        gap: 12px;
        padding: 12px 15px;
    }

    .main-nav {
        width: 100%;
        justify-content: center;
        flex-wrap: wrap;
        gap: 6px;
    }

    .main-nav a {
        font-size: 13px;
        padding: 6px 10px;
        background-color: #f0f9ff;
        border: 1px solid #bae6fd;
    }

    #inicio h1 {
        font-size: 30px;
    }

    #inicio h2 {
        font-size: 18px;
    }

    .servicio-card {
        max-width: 100%;
        flex: 1 1 100%;
    }

    .galeria-grid img {
        width: calc(50% - 10px);
        height: 150px;
    }
}

@media (max-width: 480px) {
    section {
        padding: 35px 15px;
    }

    .galeria-grid img {
        width: 100%;
        height: 200px;
    }

    .btn-social {
        width: 100%;
        max-width: 260px;
    }
}
/* Posicionamiento del contenedor de portada */
#inicio {
    position: relative !important;
    padding: 80px 20px;
    min-height: 480px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    background-image: linear-gradient(rgba(14, 116, 144, 0.65), rgba(15, 23, 42, 0.7)), url("imagenes/asilo13.png");
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

/* Estilos para la foto en la esquina superior derecha */
.foto-placa-portada {
    position: absolute !important;
    top: 20px !important;
    right: 20px !important;
    width: 140px !important;
    height: auto !important;
    border-radius: 8px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.4);
    z-index: 10;
    border: 2px solid #ffffff;
}

/* Adaptación para pantallas pequeñas (Celulares) */
@media (max-width: 768px) {
 /* Contenedor de la tarjeta en la esquina superior derecha */
/* Contenedor de la tarjeta en la esquina superior derecha */
.tarjeta-placa {
    position: absolute !important;
    top: 20px !important;
    right: 20px !important;
    width: 140px !important;
    max-width: 140px !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    background-color: rgba(255, 255, 255, 0.95);
    padding: 6px !important;
    border-radius: 8px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.4);
    z-index: 100 !important;
}

/* Imagen dentro de la tarjeta (fuerza el tamaño relativo al contenedor) */
.tarjeta-placa img {
    width: 100% !important;
    max-width: 100% !important;
    height: auto !important;
    border-radius: 4px;
}

/* Texto debajo de la imagen */
.tarjeta-placa span {
    font-size: 11px !important;
    font-weight: bold !important;
    color: #0369a1 !important;
    margin-top: 4px !important;
    text-align: center !important;
    line-height: 1.2 !important;
}

/* Adaptación para celulares */
@media (max-width: 768px) {
    .tarjeta-placa {
        width: 85px !important;
        max-width: 85px !important;
        top: 10px !important;
        right: 10px !important;
        padding: 4px !important;
    }

    .tarjeta-placa span {
        font-size: 9px !important;
    }
}

/* Imagen dentro de la tarjeta */
.tarjeta-placa img {
    width: 100%;
    height: auto;
    border-radius: 4px;
}

/* Texto debajo de la imagen */
.tarjeta-placa span {
    font-size: 11px;
    font-weight: bold;
    color: #0369a1;
    margin-top: 4px;
    text-align: center;
    line-height: 1.2;
}

/* Adaptación para celulares */
@media (max-width: 768px) {
    .tarjeta-placa {
        width: 85px;
        top: 10px !important;
        right: 10px !important;
        padding: 4px;
    }

    .tarjeta-placa span {
        font-size: 9px;
    }
}   .foto-placa-portada {
        width: 85px !important;
        top: 10px !important;
        right: 10px !important;
    }
}