/* =========================================
   VARIABLES Y RESETEO - PORTAL DEL AGUA
========================================= */
:root {
    --guinda-oca: #621132;
    --gris-claro-oca: #F4F4F4;
    --texto-oscuro: #333333;
    --gris-footer: #EBEBEB;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;


    body {
        font-family: 'Open Sans', Arial, sans-serif;
        background-color: var(--crema-fondo);
        color: var(--texto-oscuro);
        line-height: 1.6;
        padding: auto;
    }

    /* =========================================
   HEADER Y NAVEGACIÓN
========================================= */
    .oca-top-bar {
        background-color: var(--guinda-oca);
        color: white;
        padding: 0;
        font-size: 0.85rem;
    }

    .oca-top-container {
        /* max-width: 1200px; */
        margin: 0;
        padding: 0;
        display: flex;
        justify-content: space-between;
    }

    .oca-top-container a {
        color: white;
        text-decoration: none;
    }

    .oca-header {
        background-color: white;
        border-bottom: 2px solid #eee;
        padding:0;
        width: 100%;
    }

    .oca-header-container {
        margin: 0;
        padding: 0px;
        display: flex;
        justify-content: space-between;
        align-items: center;
        width: 100%;
    }


    /* =========================================
   HERO IMAGES (GRID DE 3 FOTOS)
========================================= */
    .oca-hero-grid {
        display: grid;
        grid-template-columns: repeat(3, 1fr);
        height: 350px;
        width: 100%;
    }

    .oca-hero-img {
        background-size: cover;
        background-position: center;
        width: 100%;
        height: 100%;
    }

    /* =========================================
   SECCIÓN: ¿QUÉ ES OCA?
========================================= */
    .oca-que-es {
        max-width: 1000px;
        margin: 60px auto;
        padding: 0 20px;
    }

    .oca-titulo-centrado {
        text-align: center;
        margin-bottom: 40px;
        position: relative;
    }

    .oca-titulo-centrado h2 {
        background-color: var(--guinda-oca);
        color: white;
        display: inline-block;
        padding: 10px 30px;
        font-size: 1.2rem;
        font-weight: 600;
        border-radius: 4px;
        margin: 0;
        position: relative;
        z-index: 2;
    }

    /* Línea detrás del título */
    .oca-titulo-centrado::after {
        content: '';
        position: absolute;
        top: 50%;
        left: 0;
        right: 0;
        height: 1px;
        background-color: var(--guinda-oca);
        z-index: 1;
    }

    .oca-info-container {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 50px;
        align-items: center;
    }

    .oca-texto p {
        font-size: 1.1rem;
        line-height: 1.8;
        color: #555;
        text-align: justify;
    }

    .oca-mapa img {
        width: 100%;
        max-width: 400px;
        display: block;
        margin: 0 auto;
    }

    /* =========================================
   FOOTER
========================================= */
    .oca-footer {
        background-color: var(--gris-footer);
        margin-top: 60px;
    }

    .oca-footer-top {
        max-width: 1200px;
        margin: 0 auto;
        padding: 50px 20px;
        display: grid;
        grid-template-columns: 2fr 1fr;
        gap: 40px;
    }

    .oca-footer-col h4 {
        color: #222;
        font-size: 1.1rem;
        margin-bottom: 20px;
    }

    .oca-footer-col p {
        font-size: 0.9rem;
        color: #555;
        margin-bottom: 8px;
    }

    .oca-social-icons a {
        color: var(--guinda-oca);
        font-size: 1.5rem;
        margin-right: 15px;
        text-decoration: none;
    }

    .oca-sitemap {
        list-style: none;
        padding: 0;
    }

    .oca-sitemap li {
        margin-bottom: 10px;
    }

    .oca-sitemap a {
        color: #555;
        text-decoration: none;
        font-size: 0.9rem;
    }

    .oca-sitemap a:hover {
        color: var(--guinda-oca);
        text-decoration: underline;
    }

    .oca-footer-bottom {
        background-color: var(--guinda-oca);
        color: white;
        text-align: center;
        padding: 15px 20px;
        font-size: 0.85rem;
    }

    /* Responsive BA */
    @media (max-width: 768px) {

        .oca-header-container,
        .oca-info-container,
        .oca-footer-top {
            flex-direction: column;
            grid-template-columns: 1fr;
            text-align: center;
        }

        .oca-nav ul {
            flex-direction: column;
            gap: 10px;
            margin-top: 20px;
        }

        .oca-hero-grid {
            grid-template-columns: 1fr;
            /* Una foto sobre otra en celular */
            height: auto;
        }

        .oca-hero-img {
            height: 200px;
        }
    }








    /* =========================================
   CONTENEDORES Y TARJETAS GENERALES
========================================= */
    .oca-container {
        max-width: 1200px;
        margin: 0 auto;
        padding: 0 20px;
    }

    .oca-my-4 {
        margin-top: 40px;
        margin-bottom: 40px;
    }

    .oca-page-header {
        background-color: var(--gris-claro-oca);
        padding: 40px 0;
        border-bottom: 1px solid #ddd;
    }

    .oca-page-header h1 {
        color: var(--guinda-oca);
        font-size: 2.2rem;
        margin-bottom: 10px;
    }

    .oca-card {
        background: #FFFFFF;
        border-radius: 8px;
        padding: 30px;
        box-shadow: 0 4px 15px rgba(0, 0, 0, 0.06);
        border: 1px solid #eee;
    }

    /* =========================================
   SISTEMA DE FILTROS Y FORMULARIOS
========================================= */
    .oca-grid-filtros {
        display: grid;
        grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
        gap: 20px;
    }

    .oca-form-group label {
        display: block;
        font-size: 0.85rem;
        color: #666;
        font-weight: 600;
        margin-bottom: 8px;
    }

    .oca-input {
        width: 100%;
        padding: 10px 15px;
        border: 1px solid #ccc;
        border-radius: 4px;
        font-family: inherit;
        font-size: 0.95rem;
        color: #333;
        background-color: #fafafa;
    }

    .oca-input:focus {
        outline: none;
        border-color: var(--guinda-oca);
        background-color: #fff;
    }

    /* =========================================
   BOTONES
========================================= */
    .oca-btn {
        padding: 10px 20px;
        border: none;
        border-radius: 4px;
        font-weight: 600;
        cursor: pointer;
        font-family: inherit;
        transition: all 0.3s ease;
    }

    .oca-btn-guinda {
        background-color: var(--guinda-oca);
        color: white;
    }

    .oca-btn-guinda:hover {
        background-color: #4A0D26;
    }

    .oca-btn-outline {
        background-color: transparent;
        border: 1px solid #ccc;
        color: #555;
    }

    .oca-btn-outline:hover {
        background-color: #f4f4f4;
        border-color: #999;
    }

    /* =========================================
   TABLAS Y ETIQUETAS 
========================================= */
    .oca-table-responsive {
        overflow-x: auto;
    }

    .oca-table {
        width: 100%;
        border-collapse: collapse;
        margin-top: 10px;
    }

    .oca-table th,
    .oca-table td {
        padding: 15px;
        text-align: left;
        border-bottom: 1px solid #eee;
        font-size: 0.95rem;
    }

    .oca-table th {
        background-color: #f9f9f9;
        color: #444;
        font-weight: 700;
    }

    .oca-table tbody tr:hover {
        background-color: #fdfdfd;
    }

    .oca-badge {
        padding: 5px 10px;
        border-radius: 12px;
        font-size: 0.8rem;
        font-weight: 700;
    }

    .badge-verde {
        background-color: #E6F4EA;
        color: #137333;
    }

    .badge-amarillo {
        background-color: #FEF7E0;
        color: #B06000;
    }

    .badge-rojo {
        background-color: #FCE8E6;
        color: #C5221F;
    }

    .oca-link-pdf {
        color: #D32F2F;
        text-decoration: none;
        font-weight: 600;
    }

    .oca-link-pdf:hover {
        text-decoration: underline;
    }










    /* =========================================
   SEMÁFORO DE CALIDAD DEL AGUA
========================================= */
    .oca-leyenda-semaforo {
        display: flex;
        justify-content: center;
        gap: 30px;
        flex-wrap: wrap;
    }

    .leyenda-item {
        display: flex;
        align-items: center;
        gap: 15px;
        font-size: 0.95rem;
        color: #444;
        max-width: 300px;
        text-align: left;
    }

    .oca-semaforo-grid {
        display: grid;
        grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
        gap: 30px;
    }

    .oca-semaforo-card {
        text-align: center;
        display: flex;
        flex-direction: column;
        align-items: center;
        transition: transform 0.3s ease;
    }

    .oca-semaforo-card:hover {
        transform: translateY(-5px);
    }

    .oca-semaforo-card h4 {
        color: var(--guinda-oca);
        font-size: 1.3rem;
        margin-bottom: 5px;
    }

    .oca-semaforo-card .ubicacion {
        font-size: 0.9rem;
        color: #777;
        margin-bottom: 25px;
    }

    /* El cuerpo del semáforo */
    .caja-semaforo {
        background-color: #2c2c2c;
        /* Gris oscuro para parecer metal/plástico */
        padding: 20px 15px;
        border-radius: 40px;
        display: inline-flex;
        flex-direction: column;
        gap: 15px;
        box-shadow: inset 0 5px 15px rgba(0, 0, 0, 0.5), 0 4px 10px rgba(0, 0, 0, 0.1);
        margin-bottom: 25px;
    }

    /* Focos apagados por defecto */
    .luz {
        width: 45px;
        height: 45px;
        border-radius: 50%;
        background-color: #444;
        border: 2px solid #111;
        box-shadow: inset 0 3px 6px rgba(0, 0, 0, 0.6);
        transition: all 0.4s ease;
    }

    /* Focos encendidos  */
    .luz.roja.activa {
        background-color: #FF3B30;
        box-shadow: 0 0 20px #FF3B30, 0 0 40px #FF3B30, inset 0 0 10px rgba(255, 255, 255, 0.5);
        border-color: #FF3B30;
    }

    .luz.amarilla.activa {
        background-color: #FFCC00;
        box-shadow: 0 0 20px #FFCC00, 0 0 40px #FFCC00, inset 0 0 10px rgba(255, 255, 255, 0.5);
        border-color: #FFCC00;
    }

    .luz.verde.activa {
        background-color: #34C759;
        box-shadow: 0 0 20px #34C759, 0 0 40px #34C759, inset 0 0 10px rgba(255, 255, 255, 0.5);
        border-color: #34C759;
    }

    .fecha-actualizacion {
        font-size: 0.85rem;
        color: #999;
        font-style: italic;
        margin-top: auto;
    }















    /* =========================================
   GALERÍA DE CENOTES URBANOS
========================================= */
    .oca-cenote-grid {
        display: grid;
        grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
        gap: 40px;
        margin-top: 30px;
    }

    .oca-cenote-card {
        text-align: center;
        background: #FFFFFF;
        border-radius: 8px;
        padding: 40px 20px;
        box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
        border: 1px solid #eee;
        transition: transform 0.3s ease, box-shadow 0.3s ease;
    }

    .oca-cenote-card:hover {
        transform: translateY(-8px);
        box-shadow: 0 12px 25px rgba(98, 17, 50, 0.1);
        /* Sombra con un ligero toque guinda */
    }

    .oca-cenote-img-container {
        width: 160px;
        height: 160px;
        margin: 0 auto 25px auto;
        border-radius: 50%;
        padding: 6px;
        border: 2px dashed var(--guinda-oca);
        transition: transform 0.5s ease;
    }

    .oca-cenote-card:hover .oca-cenote-img-container {
        transform: rotate(5deg) scale(1.05);
    }

    .oca-cenote-img {
        width: 100%;
        height: 100%;
        object-fit: cover;
        border-radius: 50%;
    }

    .oca-cenote-title {
        color: var(--guinda-oca);
        font-size: 1.3rem;
        font-weight: 800;
        margin-bottom: 8px;
    }

    .oca-cenote-loc {
        font-size: 0.9rem;
        color: #666;
        margin-bottom: 15px;
        font-weight: 600;
    }

    .oca-cenote-loc i {
        color: var(--guinda-oca);
        margin-right: 5px;
    }

    .oca-cenote-desc {
        font-size: 0.95rem;
        line-height: 1.6;
        color: #555;
    }










    /* =========================================
   MODALES EMERGENTES (POP-UPS)
========================================= */
    .oca-modal-overlay {
        display: none;
        /* Oculto por defecto */
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background-color: rgba(0, 0, 0, 0.6);
        z-index: 9998;
        backdrop-filter: blur(3px);
        /* Efecto de desenfoque moderno */
    }

    .oca-modal-box {
        display: none;
        /* Oculto por defecto */
        position: fixed;
        top: 50%;
        left: 50%;
        transform: translate(-50%, -50%);
        background: #fff;
        width: 90%;
        max-width: 500px;
        border-radius: 8px;
        z-index: 9999;
        box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
        animation: modalAparecer 0.3s ease-out;
        overflow: hidden;
    }

    .oca-modal-header {
        background-color: var(--guinda-oca);
        color: white;
        padding: 20px;
        display: flex;
        justify-content: space-between;
        align-items: center;
    }

    .oca-modal-close {
        color: white;
        font-size: 1.8rem;
        font-weight: bold;
        cursor: pointer;
        transition: color 0.3s;
        line-height: 1;
    }

    .oca-modal-close:hover {
        color: var(--dorado-institucional, #EADBB9);
    }

    .oca-modal-body {
        padding: 30px;
        max-height: 70vh;
        overflow-y: auto;
    }

    @keyframes modalAparecer {
        from {
            opacity: 0;
            transform: translate(-50%, -45%);
        }

        to {
            opacity: 1;
            transform: translate(-50%, -50%);
        }
    }