/* Marca de Agua CSS */
    .watermark {
        position: relative;
    }
    
    .watermark::before {
        content: "";    
        position: absolute;
        top: 25%;
        left: 1%;
        right: 0;
        bottom: 0;
        background-image: url('../media/img/MUNI-NEGRO.png');
        background-repeat: no-repeat;
        background-position: left;
        background-size: 1850px; /* Tamaño */
        opacity: 1; /* transparencia */
        pointer-events: none;
        z-index: 1;
    }
    
    .watermark > * {
        position: relative;
        z-index: 2;
    }

/* Slide CSS */
    .swiper-slide {
        display: flex;
        justify-content: center;
        align-items: center;
        background-size: cover;
        background-position: center;
        height: 60vh;
    }

/* Custom CSS for elements that need more styling */
    .hero {
        background-image: linear-gradient(rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0.5)), url('https://images.unsplash.com/photo-1579684385127-1ef15d508118?ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D&auto=format&fit=crop&w=2070&q=80');
        background-size: cover;
        background-position: center;
        height: 60vh;
    }
    
    .service-card:hover {
        transform: translateY(-5px);
        box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
    }
    
    .map-container {
        height: 400px;
        width: 100%;
    }
    
    .emergency-banner {
        animation: pulse 2s infinite;
    }
    
    @keyframes pulse {
        0% { background-color: #ef4444; }
        50% { background-color: #dc2626; }
        100% { background-color: #ef4444; }
    }
    
    .dropdown:hover .dropdown-menu {
        display: block;
    }

/* Custom CSS for Options    */
        
    .tab-content {
        transition: opacity 0.3s ease, transform 0.3s ease;
    }

    .tab-content:not(.active) {
        opacity: 0;
        transform: translateY(10px);
        height: 0;
        overflow: hidden;
        position: absolute;
    }

    .tab-content.active {
        opacity: 1;
        transform: translateY(0);
        height: auto;
        position: relative;
    }

/* Arreglo    */
    .sectores-container {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none; /* Firefox */
    }

    .sectores-container::-webkit-scrollbar {
        display: none; /* Chrome, Safari, Edge */
    }

    .sectores-buttons {
        display: flex;
        min-width: max-content;
        padding: 0.5rem;
    }

    .sectores-buttons .tab-btn {
        flex: 0 0 auto;
        white-space: nowrap;
        min-width: 100px;
    }

/* Dropdown con delay */
    .dropdown .dropdown-menu {
        transition: opacity 0.3s ease 0.1s, transform 0.3s ease 0.1s, visibility 0.3s ease 0.1s;
        box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
        background-color: white;
        border: 1px solid rgba(229, 231, 235, 0.8);
    }

/* Estados visibles - SIN DELAY de entrada */
    .dropdown:hover .dropdown-menu,
    .dropdown.hover-active .dropdown-menu {
        opacity: 1;
        visibility: visible;
        transform: translateY(0) scale(1);
        transition-delay: 0s !important; /* Importante: sin delay al entrar */
    }

/* Estados ocultos - CON DELAY de salida */
    .dropdown:not(:hover):not(.hover-active) .dropdown-menu:not(:hover) {
        opacity: 0;
        visibility: hidden;
        transform: translateY(10px) scale(0.95);
        transition-delay: 0.2s; /* Delay de 200ms antes de ocultar */
    }

/* El menú debe mantenerse visible cuando está sobre él */
    .dropdown-menu:hover {
        opacity: 1 !important;
        visibility: visible !important;
        transform: translateY(0) scale(1) !important;
        transition-delay: 0s !important;
    }

/* Animación de entrada */
    @keyframes slideIn {
        from {
            opacity: 0;
            transform: translateY(10px) scale(0.95);
        }
        to {
            opacity: 1;
            transform: translateY(0) scale(1);
        }
    }

    .dropdown:hover .dropdown-menu,
    .dropdown.hover-active .dropdown-menu {
        animation: slideIn 0.25s ease-out;
    }

/* Efecto para los items */
    .dropdown-menu a {
        position: relative;
        transition: all 0.2s ease;
    }

    .dropdown-menu a:hover {
        background-color: rgba(13, 107, 166, 0.05);
        transform: translateX(3px);
        padding-left: 20px !important;
    }

/* Ícono que se mueve */
    .dropdown-menu a i {
        transition: transform 0.2s ease;
    }

    .dropdown-menu a:hover i {
        transform: translateX(2px);
    }

/* Flecha del botón */
    .dropdown button i {
        transition: transform 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    }

    .dropdown:hover button i,
    .dropdown.hover-active button i {
        transform: rotate(180deg);
    }

/* Banner */
    .hero-pattern {
            background-image: linear-gradient(rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0.5)), url('../media/img/Entrada-3.jpg'); 
            background-size: cover;
            background-position: center;
        }

/* Tarjetas del equipo */
    .team-card {
        transition: all 0.3s ease;
        width: 15rem;
    }
    .team-card:hover {
        transform: translateY(-5px);
        box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
    }
    .centered-content {
        display: flex;
        flex-direction: column;
        align-items: center;
        text-align: center;
    }

    
/* Sectores Banner */    
    .hero-roble {
        background-image: linear-gradient(rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0.5)), url('https://upload.wikimedia.org/wikipedia/commons/d/da/Crooked_branches_of_Quercus_robur.jpg');
        background-size: cover;
        background-position: center;
        height: 40vh;
    }

    .hero-canelo {
        background-image: linear-gradient(rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0.5)), url('https://vilchesdelircay.cl/wp-content/uploads/2024/05/canelo-1024x576.jpg');
        background-size: cover;
        background-position: center;
        height: 40vh;
    }

    .hero-arrayan {
        background-image: linear-gradient(rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0.5)), url('https://upload.wikimedia.org/wikipedia/commons/7/7f/Luma_apiculata-Array%C3%A1n_%28flor%29.JPG');
        background-size: cover;
        background-position: center;
        height: 40vh;
    }

    .hero-alerce {
        background-image: linear-gradient(rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0.5)), url('https://www.ciperchile.cl/wp-content/uploads/alerces.jpeg');
        background-size: cover;
        background-position: center;
        height: 40vh;
    }

    .hero-araucaria {
        background-image: linear-gradient(rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0.5)), url('https://www.cooperativaciencia.cl/wp-content/uploads/2025/08/iStock-1395975662.jpg');
        background-size: cover;
        background-position: center;
        height: 40vh;
    }

/* Estilos del modal Norma.php */
    .modal {
        display: none;
        position: fixed;
        z-index: 1000;
        padding-top: 50px;
        left: 0;
        top: 0;
        width: 100%;
        height: 100%;
        overflow: auto;
        background-color: rgba(0, 0, 0, 0.9); /* Fondo oscuro semi-transparente */
    }

    #modalImage.modal-content {
        margin: auto;
        display: block;
        max-width: 90%; 
        max-height: 90%;
        width: auto;
        height: auto;
        position: absolute;
        top: 50%;
        left: 50%;
        transform: translate(-50%, -50%);
        border-radius: 8px;
        box-shadow: 0 4px 30px rgba(0, 0, 0, 0.8);
    }

    .close {
        position: absolute;
        top: 15px;
        right: 35px;
        color: #f1f1f1;
        font-size: 40px;
        font-weight: bold;
        transition: 0.3s;
        z-index: 1001;
        cursor: pointer;
    }

    .close:hover,
    .close:focus {
        color: #bbb;
        text-decoration: none;
        cursor: pointer;
    }

/* Modal Alert*/
        #modalOverlay.modal-overlay {
            display: none;
            position: fixed;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            background-color: rgba(0, 0, 0, 0.5);
            z-index: 1000;
            justify-content: center;
            align-items: center;
        }

        #alert.modal-container {
            background: white;
            border-radius: 10px;
            padding: 30px;
            max-width: 400px;
            box-shadow: 0 4px 20px rgba(0,0,0,0.3);
            animation: slideIn 0.3s ease-out;
            position: relative;
            border: 3px solid #ff6b6b;
        }

        @keyframes slideIn {
            from {
                transform: translateY(-100px);
                opacity: 0;
            }
            to {
                transform: translateY(0);
                opacity: 1;
            }
        }

        #alert.modal-header {
            display: flex;
            align-items: center;
            margin-bottom: 15px;
        }

        #alert.modal-icon {
            font-size: 30px;
            margin-right: 10px;
            animation: bounce 1s infinite;
        }

        @keyframes bounce {
            0%, 100% { transform: translateY(0); }
            50% { transform: translateY(-10px); }
        }

        #alert.modal-title {
            font-size: 24px;
            color: #333;
            margin: 0;
            font-weight: bold;
        }

        #alert.modal-content p{
            margin-bottom: 25px;
        }

        #alert.modal-content {
            font-size: 16px;
            line-height: 1.5;
            color: #666;
        }

        #modalButton.modal-button {
            background: linear-gradient(45deg, #ff6b6b, #ff8e8e);
            color: white;
            border: none;
            padding: 12px 30px;
            border-radius: 5px;
            font-size: 16px;
            font-weight: bold;
            cursor: pointer;
            transition: transform 0.2s, box-shadow 0.2s;
            display: block;
            margin: 0 auto;
        }

        #modalButton.modal-button:hover {
            transform: scale(1.05);
            box-shadow: 0 5px 15px rgba(255,107,107,0.4);
        }

        
                .form-section {
            margin-bottom: 2rem;
            padding: 1.5rem;
            border-radius: 0.5rem;
            background-color: #f9fafb;
            border: 1px solid #0D6BA6;
        }


/* Antecedentes Form */       
        .form-section-title {
            font-size: 1.25rem;
            font-weight: 600;
            color: #0D6BA6;
            margin-bottom: 1rem;
        }

        .required-field::after {
            content: " *";
            color: #ef4444;
        }

        .partial-period, .usuario-section, .representante-section, .documentos-section {
            display: none;
        }

        .partial-period.active, .usuario-section.active, .representante-section.active, .documentos-section.active {
            display: block;
            animation: fadeIn 0.3s ease;
        }

        @keyframes fadeIn {
            from { opacity: 0; transform: translateY(-10px); }
            to { opacity: 1; transform: translateY(0); }
        }

        .dropdown .dropdown-menu {
            animation: fadeIn 0.2s ease-in-out;
        }

        .dropdown.active .dropdown-menu {
            display: block;
        }