/* ==========================================================================
   1. ESTRUCTURA BASE Y HERO PRINCIPAL
   ========================================================================== */

/* LAYOUT CON BARRA LATERAL (Escritorio) */
@media (min-width: 992px) {
    .main-layout-wrapper {
        margin-left: 220px;
    }
}

/* HERO PRINCIPAL COPÁNDARO */
.hero-copandaro {
    background: url('img/hero-main.jpeg') no-repeat center center;
    background-size: cover;
    min-height: 100vh;
    position: relative;
    width: 100%;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.25);
    z-index: 1;
}

/* TIPOGRAFÍA HERO */
.hero-title {
    font-size: clamp(2.5rem, 8vw, 5.5rem);
    text-shadow: 0 4px 15px rgba(0, 0, 0, 0.6);
    letter-spacing: 2px;
}

.hero-subtitle {
    font-size: clamp(2rem, 6vw, 4.5rem);
    text-shadow: 0 4px 15px rgba(0, 0, 0, 0.6);
}

/* BOTÓN CONTACTO HERO */
.btn-hero-contact {
    background-color: #f59e0b !important;
    border: none;
    font-size: 0.95rem;
    letter-spacing: 1px;
    transition: transform 0.3s ease, background-color 0.3s ease;
}

.btn-hero-contact:hover {
    background-color: #d97706 !important;
    transform: translateY(-3px);
}

/* ANIMACIONES */
[data-animate="slide-right"] {
    animation: slideRight 1.2s cubic-bezier(0.25, 1, 0.5, 1) forwards;
}

@keyframes slideRight {
    from {
        opacity: 0;
        transform: translateX(100px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

[data-animate="slide-left"] {
    animation: slideLeft 1s cubic-bezier(0.25, 1, 0.5, 1) forwards;
}

@keyframes slideLeft {
    from {
        opacity: 0;
        transform: translateX(-80px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}


/* ==========================================================================
   2. SECCIÓN MUNICIPIO Y COMPONENTES
   ========================================================================== */

/* COLOR INSTITUCIONAL */
.text-copandaro-orange {
    color: #f59e0b !important;
}

/* ACCORDEÓN MINIMALISTA */
.accordion-copandaro .accordion-item {
    border: none;
    border-bottom: 1px solid #fce7f3;
    background: transparent;
    margin-bottom: 8px;
}

.accordion-copandaro .accordion-button {
    background: transparent !important;
    color: #f59e0b !important;
    font-weight: 700;
    font-size: 1.15rem;
    padding: 12px 0;
    box-shadow: none !important;
    border: none;
}

.accordion-copandaro .accordion-button:not(.collapsed) {
    color: #d97706 !important;
}

.accordion-copandaro .accordion-button::after {
    display: none;
}

.toggle-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    background-color: #334155;
    color: #ffffff;
    font-size: 0.85rem;
    font-weight: 700;
    border-radius: 4px;
    margin-right: 12px;
    transition: background-color 0.3s ease;
}

.accordion-button:not(.collapsed) .toggle-icon {
    background-color: #f59e0b;
}

.accordion-copandaro .accordion-body {
    padding: 10px 0 20px 36px;
    font-size: 0.95rem;
}

/* SECCIONES Y CONTENEDORES */
.max-w-500 {
    max-width: 500px;
}

/* BANNER SEPARADOR "BUZÓN" */
.btn-separador-buzon {
    background-color: #f59e0b;
    width: 100%;
    transition: background-color 0.3s ease, transform 0.2s ease;
    cursor: pointer;
    border: none;
    letter-spacing: 2px;
}

.btn-separador-buzon:hover {
    background-color: #dc2626 !important;
    color: #ffffff !important;
}

.btn-separador-buzon i {
    font-size: 1rem;
    transition: transform 0.3s ease;
}

.btn-separador-buzon:hover i {
    transform: translateY(3px);
}


/* ==========================================================================
   3. EFECTOS DE PAPEL RASGADO E IMÁGENES
   ========================================================================== */

.paper-cut-wrapper,
.paper-cut-wrapper-left {
    position: relative;
    overflow: hidden;
    border: none !important;
    outline: none !important;
    box-shadow: none !important;
}

@media (min-width: 992px) {
    .paper-cut-wrapper::before {
        content: "";
        position: absolute;
        top: -2px;
        left: -2px;
        bottom: -2px;
        width: 32px;
        background: #f8f9fa;
        clip-path: polygon(100% 0, 0 5%, 80% 12%, 10% 20%, 90% 28%, 0 35%, 100% 42%, 20% 50%, 85% 58%, 5% 65%, 95% 72%, 15% 80%, 100% 88%, 0 95%, 100% 100%);
        z-index: 3;
        border: none !important;
    }

    .paper-cut-wrapper-left::after {
        content: "";
        position: absolute;
        top: -2px;
        right: -2px;
        bottom: -2px;
        width: 32px;
        background: #f8f9fa;
        clip-path: polygon(0 0, 100% 5%, 20% 12%, 90% 20%, 10% 28%, 100% 35%, 0 42%, 80% 50%, 15% 58%, 95% 65%, 5% 72%, 85% 80%, 0 88%, 100% 95%, 0 100%);
        z-index: 3;
        border: none !important;
    }
}

.img-recargada-derecha {
    object-fit: cover;
    object-position: left center;
    position: relative;
    left: -2px;
    width: calc(100% + 2px) !important;
    border: none !important;
    outline: none !important;
}


/* ==========================================================================
   4. POP-UP MODAL Y ASISTENTE VISUAL (DERECHA)
   ========================================================================== */

/* POP-UP MODAL */
.max-h-100 {
    max-height: 110px;
    width: auto;
}

.btn-popup-action {
    background-color: #f59e0b !important;
    border: none;
    transition: transform 0.25s ease, background-color 0.25s ease;
}

.btn-popup-action:hover {
    background-color: #d97706 !important;
    transform: translateY(-2px);
}

/* WIDGET DE ACCESIBILIDAD */
#accessibilityWidget {
    position: fixed;
    bottom: 80px !important;
    /* Elevado para no encimarse con el botón del footer */
    right: 25px !important;
    left: auto !important;
    z-index: 9999 !important;
    pointer-events: auto;
}

.accessibility-btn {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background-color: #f59e0b;
    color: #ffffff;
    border: none;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    font-size: 1.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: transform 0.3s ease, background-color 0.3s ease;
}

.accessibility-btn:hover {
    background-color: #d97706;
    transform: scale(1.1);
}

.accessibility-menu {
    position: absolute;
    bottom: 60px;
    right: 0 !important;
    left: auto !important;
    width: 240px;
    z-index: 10000 !important;
    border: 1px solid #e2e8f0;
}

/* CLASES PARA FUNCIONALIDADES DE ACCESIBILIDAD */
body.high-contrast {
    background-color: #000000 !important;
    color: #ffff00 !important;
}

body.high-contrast .card,
body.high-contrast section,
body.high-contrast main {
    background-color: #121212 !important;
    color: #ffffff !important;
}

body.grayscale-mode {
    filter: grayscale(100%);
}

/* DESPLAZAMIENTO SUAVE PARA ENLACES CON ANCLA (#) */
html {
    scroll-behavior: smooth;
}

/* RECARGA LA IMAGEN PARA MOSTRAR SU LADO IZQUIERDO Y EMPUJARLA A LA DERECHA */
.object-position-left {
    object-position: left center !important;
}

/* EFECTO DE MARGEN Y BORDE EN EL ENCUADRE DERECHO */
.paper-cut-wrapper img {
    object-fit: cover;
    object-position: left center;
    border-top-left-radius: 1.5rem;
    border-bottom-left-radius: 1.5rem;
}

/* ==========================================
   TARJETAS DE TRANSPARENCIA PRESUPUESTARIA (PDF)
   ========================================== */
.pdf-card {
    background: #ffffff;
    border-radius: 20px;
    border: 2px solid #e2e8f0;
    transition: all 0.35s cubic-bezier(0.16, 1, 0.3, 1);
    text-decoration: none !important;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 2.5rem 1.5rem;
    position: relative;
    overflow: hidden;
}

.pdf-card::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 6px;
    background: #dc2626;
    transition: height 0.3s ease;
}

.pdf-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 40px rgba(220, 38, 38, 0.12);
    border-color: #fca5a5;
}

.pdf-card:hover::before {
    height: 10px;
}

.pdf-icon-wrapper {
    width: 90px;
    height: 110px;
    background: #fef2f2;
    border: 3px solid #dc2626;
    border-radius: 12px 28px 12px 12px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.5rem;
    transition: transform 0.3s ease;
    box-shadow: 0 8px 15px rgba(220, 38, 38, 0.1);
}

.pdf-card:hover .pdf-icon-wrapper {
    transform: scale(1.08);
    background: #dc2626;
}

.pdf-icon-wrapper i {
    color: #dc2626;
    font-size: 2.2rem;
    transition: color 0.3s ease;
}

.pdf-icon-wrapper span {
    color: #dc2626;
    font-weight: 800;
    font-size: 0.85rem;
    letter-spacing: 1px;
    margin-top: 2px;
    transition: color 0.3s ease;
}

.pdf-card:hover .pdf-icon-wrapper i,
.pdf-card:hover .pdf-icon-wrapper span {
    color: #ffffff;
}

.pdf-title {
    color: #1e293b;
    font-size: 1.25rem;
    font-weight: 800;
    text-align: center;
    margin-bottom: 0.75rem;
}

.btn-download-custom {
    background-color: #1e293b;
    color: #ffffff;
    border-radius: 50px;
    padding: 8px 20px;
    font-size: 0.85rem;
    font-weight: 700;
    transition: all 0.3s ease;
}

.pdf-card:hover .btn-download-custom {
    background-color: #dc2626;
    color: #ffffff;
    box-shadow: 0 4px 12px rgba(220, 38, 38, 0.3);
}