/* ==========================================================================
   TOKENS DE DISEÑO Y BASE CLAYMORFISMO - TRÍMBARO PT
   ========================================================================== */

:root {
    --clay-bg: #F5F2F3;
    --pt-rojo: #E30613;
    --pt-rojo-dark: #B00008;
    --pt-rojo-light: #FF2B38;
    --pt-amarillo: #FFED00;
    --pt-amarillo-dark: #C7B800;
    --pt-dark: #1C1917;
    --font-sans: 'Plus Jakarta Sans', sans-serif;
}

body {
    font-family: var(--font-sans);
    background-color: var(--clay-bg);
    color: var(--pt-dark);
    overflow-x: hidden;
}

/* ==========================================================================
   COMPONENTES CLAYMÓRFICOS REUTILIZABLES
   ========================================================================== */

/* Tarjeta Roja Clay */
.clay-card-red {
    background: var(--pt-rojo);
    color: #ffffff;
    border-radius: 36px;
    box-shadow: 
        12px 16px 24px rgba(176, 0, 8, 0.35),
        inset -6px -8px 12px rgba(0, 0, 0, 0.3),
        inset 6px 8px 12px rgba(255, 255, 255, 0.4);
    border: none;
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.clay-card-red:hover {
    transform: translateY(-6px) scale(1.01);
}

/* Tarjeta Blanca Clay */
.clay-card-white {
    background: #ffffff;
    color: var(--pt-dark);
    border-radius: 36px;
    box-shadow: 
        12px 18px 28px rgba(0, 0, 0, 0.08),
        inset -6px -8px 12px rgba(200, 200, 200, 0.25),
        inset 6px 8px 12px rgba(255, 255, 255, 0.9);
    border: none;
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.clay-card-white:hover {
    transform: translateY(-6px) scale(1.01);
}

/* Botón Amarillo Clay */
.clay-btn-yellow {
    background: var(--pt-amarillo);
    color: var(--pt-dark) !important;
    font-weight: 800;
    border-radius: 50rem;
    padding: 0.85rem 2rem;
    box-shadow: 
        6px 10px 18px rgba(199, 184, 0, 0.4),
        inset -4px -5px 8px rgba(0, 0, 0, 0.15),
        inset 4px 5px 8px rgba(255, 255, 255, 0.8);
    border: none;
    transition: all 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.clay-btn-yellow:hover {
    transform: translateY(-3px) scale(1.03);
    box-shadow: 
        8px 14px 22px rgba(199, 184, 0, 0.5),
        inset -4px -5px 8px rgba(0, 0, 0, 0.15),
        inset 4px 5px 8px rgba(255, 255, 255, 0.8);
}

.clay-btn-yellow:active {
    transform: translateY(1px) scale(0.98);
}

/* Botón Rojo Clay */
.clay-btn-red {
    background: var(--pt-rojo);
    color: #ffffff !important;
    font-weight: 800;
    border-radius: 50rem;
    padding: 0.85rem 2rem;
    box-shadow: 
        6px 10px 18px rgba(176, 0, 8, 0.4),
        inset -4px -5px 8px rgba(0, 0, 0, 0.3),
        inset 4px 5px 8px rgba(255, 255, 255, 0.4);
    border: none;
    transition: all 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.clay-btn-red:hover {
    transform: translateY(-3px) scale(1.03);
}

/* Badges e Íconos */
.clay-badge-yellow {
    background: var(--pt-amarillo);
    color: var(--pt-dark);
    font-weight: 800;
    border-radius: 50rem;
    padding: 0.4rem 1.25rem;
    box-shadow: 
        4px 6px 12px rgba(0, 0, 0, 0.1),
        inset -2px -3px 6px rgba(0, 0, 0, 0.12),
        inset 2px 3px 6px rgba(255, 255, 255, 0.7);
}

.clay-icon-circle {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: var(--pt-amarillo);
    color: var(--pt-dark);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
    box-shadow: 
        6px 10px 16px rgba(0, 0, 0, 0.12),
        inset -3px -4px 6px rgba(0, 0, 0, 0.15),
        inset 3px 4px 6px rgba(255, 255, 255, 0.8);
}

.micro-text {
    font-size: 0.78rem;
}


/* ==========================================================================
   HERO SECTION TARÍMBARO CON IMG/HERO1.PNG (MAYOR VISIBILIDAD)
   ========================================================================== */

.hero-section-tarimbaro {
    position: relative;
    min-height: 580px;
    overflow: hidden;
}

/* Pseudo-elemento para aplicar el efecto espejo (flip horizontal) al fondo */
.hero-section-tarimbaro::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url('../img/hero.jpg');
    background-size: cover;
    background-position: center top;
    background-repeat: no-repeat;
    background-attachment: fixed;
    transform: scaleX(-1);
    /* Invierte la imagen horizontalmente */
    z-index: 1;
}

/* Asegura que el contenido interno permanezca por encima del fondo */
.hero-section-tarimbaro>* {
    position: relative;
    z-index: 2;
}

/* Superposición sutil: imagen nítida y visible manteniendo legibilidad */
.hero-overlay {
    background: linear-gradient(180deg, rgba(245, 242, 243, 0.35) 0%, rgba(245, 242, 243, 0.65) 100%);
    backdrop-filter: none; /* Se elimina el difuminado para máxima claridad */
}

@media (max-width: 768px) {
    .hero-section-tarimbaro {
        background-attachment: scroll;
        background-position: center top; 
    }
}

.clay-card-red-transparent {
    background-color: rgba(227, 6, 19, 0.80) !important;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

/* ==========================================================================
   BANNER SEPARADOR DE SECCIÓN CLAYMÓRFICO (CORREGIDO)
   ========================================================================== */

.clay-banner-separator {
    background-color: var(--pt-rojo, #E30613);
    border-radius: 40px;
    margin-left: 15px;
    margin-right: 15px;
    box-shadow: 
        0 20px 40px rgba(176, 0, 8, 0.4),
        inset 0 4px 8px rgba(255, 255, 255, 0.3),
        inset 0 -6px 12px rgba(0, 0, 0, 0.35);
}

/* Patrón repetido del escudo corregido */
.banner-escudo-pattern {
    background-image: url('../img/ecudo.png');
    background-repeat: repeat;
    background-position: center;
    background-size: 160px 160px; /* Tamaño del escudo en mosaico */
    opacity: 0.25; /* Controla qué tan fuerte se ve la marca de agua */
    filter: brightness(1.2) contrast(1.1); /* Resalta los detalles sobre el rojo */
    z-index: 1;
}

/* Capa de contraste */
.banner-overlay {
    background: radial-gradient(circle at center, rgba(227, 6, 19, 0.4) 0%, rgba(176, 0, 8, 0.85) 100%);
    z-index: 2;
}

/* Tarjeta contenedora estilo Claymorphism inflado */
.clay-banner-card {
    background: rgba(255, 255, 255, 0.12);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    border-radius: 36px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    box-shadow: 
        12px 18px 30px rgba(0, 0, 0, 0.25),
        inset -6px -8px 14px rgba(0, 0, 0, 0.2),
        inset 6px 8px 14px rgba(255, 255, 255, 0.35);
}

/* Círculo del ícono en relieve amarillo */
.clay-banner-icon-circle {
    width: 70px;
    height: 70px;
    border-radius: 50%;
    background: var(--pt-amarillo, #FFED00);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 
        6px 10px 18px rgba(0, 0, 0, 0.25),
        inset -4px -5px 8px rgba(0, 0, 0, 0.2),
        inset 4px 5px 8px rgba(255, 255, 255, 0.8);
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.clay-banner-icon-circle:hover {
    transform: scale(1.1) rotate(5deg);
}

.text-shadow-clay {
    text-shadow: 0 4px 10px rgba(0, 0, 0, 0.4);
}

.text-shadow-sm {
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

/* ==========================================================================
   SECCIÓN CONOCE TARÍMBARO CON FONDO IMG/TORITO.PNG Y ACCORDION CLAY
   ========================================================================== */

.conoce-tarimbaro-section {
    background-image: url('../img/torito.png');
    background-size: cover;
    background-position: center top;
    background-repeat: no-repeat;
    background-attachment: fixed;
    position: relative;
    padding-bottom: 90px !important; /* Espacio reservado para el corte de ola */
}

/* Superposición sutil para mantener nitidez de imagen y alta legibilidad */
.torito-overlay {
    background: linear-gradient(180deg, rgba(245, 242, 243, 0.35) 0%, rgba(245, 242, 243, 0.60) 100%);
    backdrop-filter: none;
}

/* ACORDEÓN ANCHO CLAYMORFISMO */
.clay-accordion-btn {
    background: transparent !important;
    box-shadow: none !important;
    padding: 1.25rem 1.5rem !important;
    border: none !important;
}

.clay-accordion-btn:not(.collapsed) {
    color: var(--pt-rojo, #E30613) !important;
}

.clay-accordion-btn::after {
    filter: invert(13%) sepia(94%) saturate(7186%) hue-rotate(352deg) brightness(91%) contrast(105%);
}

.clay-card-tinted {
    background: rgba(227, 6, 19, 0.05);
    border: 1px solid rgba(227, 6, 19, 0.15);
}

.clay-inset {
    background: #eae7e8;
    box-shadow: inset 3px 4px 6px rgba(0, 0, 0, 0.08), inset -3px -4px 6px rgba(255, 255, 255, 0.8);
}

/* OLA DE EMPALME INFERIOR ROJA */
.wave-bottom-divider {
    line-height: 0;
    pointer-events: none;
}

.wave-bottom-divider svg {
    filter: drop-shadow(0 -3px 6px rgba(0, 0, 0, 0.15));
}

@media (max-width: 768px) {
    .conoce-tarimbaro-section {
        background-attachment: scroll;
        padding-bottom: 60px !important;
    }
}

/* ==========================================================================
   SECCIÓN DEL PRESIDENTE MUNICIPAL Y MARCO CLAYMÓRFICO
   ========================================================================== */

.presidente-section {
    background-color: var(--clay-bg, #F5F2F3);
    margin-top: -1px; /* Cero aberturas entre secciones */
}

/* Banda de transición roja PT */
.bg-pt-rojo {
    background-color: var(--pt-rojo, #E30613) !important;
    box-shadow: 0 6px 14px rgba(176, 0, 8, 0.25);
}

/* Marco 3D Inflado Claymórfico para la foto del Presidente */
.clay-president-frame {
    background: #ffffff;
    border-radius: 40px;
    box-shadow: 
        16px 24px 36px rgba(0, 0, 0, 0.12),
        inset -8px -10px 16px rgba(200, 200, 200, 0.25),
        inset 8px 10px 16px rgba(255, 255, 255, 0.95);
    border: 3px solid rgba(227, 6, 19, 0.08);
    transition: transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.clay-president-frame:hover {
    transform: translateY(-8px);
}

/* Tratamiento visual de la imagen img/presidente.jpeg */
.clay-photo-wrapper {
    box-shadow: 
        inset 0 0 15px rgba(0, 0, 0, 0.2),
        0 8px 16px rgba(0, 0, 0, 0.1);
    max-height: 480px;
}

.president-img {
    object-fit: cover;
    object-position: top center;
    transition: transform 0.5s ease;
}

.clay-president-frame:hover .president-img {
    transform: scale(1.03);
}

.italic {
    font-style: italic;
}

/* ==========================================================================
   BANNER PARALLAX CON CURVATURA ARQUEADA PRONUNCIADA
   ========================================================================== */

.parallax-curved-banner {
    width: 100%;
    margin-top: 2rem;
    margin-bottom: 2rem;
    /* Curvatura cóncava tipo cinta/lente visible en pantallas anchas */
    clip-path: ellipse(85% 100% at 50% 50%);
    -webkit-clip-path: ellipse(85% 100% at 50% 50%);
}

.parallax-wrapper {
    background-image: url('../img/protesta.jpg');
    background-attachment: fixed;
    background-position: center top;
    background-repeat: no-repeat;
    background-size: cover;
    /* Altura incrementada para lucir la fotografía */
    min-height: 520px;
    display: flex;
    align-items: center;
    padding-top: 4rem;
    padding-bottom: 4rem;
}

/* Overlay ligero para mayor claridad de la foto y excelente lectura */
.parallax-overlay {
    background: linear-gradient(135deg, rgba(227, 6, 19, 0.45) 0%, rgba(20, 18, 19, 0.65) 100%);
}

.letter-spacing-2 {
    letter-spacing: 3px;
}

/* Responsivo para móviles */
@media (max-width: 768px) {
    .parallax-wrapper {
        background-attachment: scroll;
        min-height: 400px;
    }
    
    .parallax-curved-banner {
        clip-path: ellipse(110% 100% at 50% 50%);
        -webkit-clip-path: ellipse(110% 100% at 50% 50%);
    }
}

/* ==========================================================================
   SECCIÓN NOSOTROS / VALORES CON IMG/FONDO.PNG
   ========================================================================== */

.nosotros-section {
    background-image: url('../img/fondo.png');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    background-attachment: fixed;
}

/* Overlay ligero para matizar la imagen manteniendo la vista nítida */
.nosotros-overlay {
    background: linear-gradient(180deg, rgba(245, 242, 243, 0.45) 0%, rgba(245, 242, 243, 0.70) 100%);
    backdrop-filter: none;
}

@media (max-width: 768px) {
    .nosotros-section {
        background-attachment: scroll;
    }
}

/* Olas rojas superior e inferior */
.wave-top-divider svg,
.wave-bottom-divider svg {
    filter: drop-shadow(0 3px 5px rgba(0, 0, 0, 0.2));
}

.wave-top-divider {
    line-height: 0;
    pointer-events: none;
}

/* ==========================================================================
   SECCIÓN CONTACTO CON FONDO ARCOS.WEBP NÍTIDO Y BOTÓN URGENCIAS CORREGIDO
   ========================================================================== */

.contacto-section {
    background-image: url('../img/arcos.webp');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    background-attachment: fixed;
}

/* Superposición transparente sin blur/desenfoque para ver la imagen nítida */
.arcos-overlay {
    background: linear-gradient(180deg, rgba(245, 242, 243, 0.45) 0%, rgba(245, 242, 243, 0.65) 100%);
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
}

/* FIX: ESTILOS DE LECTURABILIDAD FIJA EN HOVER PARA BOTÓN DE URGENCIAS */
.btn-urgencias,
.btn-urgencias:hover,
.btn-urgencias:focus,
.btn-urgencias:active {
    background-color: var(--pt-rojo, #E30613) !important;
    border-color: var(--pt-rojo, #E30613) !important;
}

.btn-urgencias .urgencias-title,
.btn-urgencias:hover .urgencias-title {
    color: #ffffff !important;
}

.btn-urgencias .urgencias-subtitle,
.btn-urgencias:hover .urgencias-subtitle {
    color: rgba(255, 255, 255, 0.9) !important;
}

.btn-urgencias .urgencias-icon,
.btn-urgencias:hover .urgencias-icon {
    color: #ffffff !important;
}

.min-h-350 {
    min-height: 350px;
}

/* Animación sutil al pasar el cursor sobre los botones */
.contacto-section .btn {
    transition: transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.25s ease;
}

.contacto-section .btn:hover {
    transform: translateY(-3px) scale(1.01);
}

@media (max-width: 768px) {
    .contacto-section {
        background-attachment: scroll;
    }
}

@media (max-width: 991px) {
    .min-h-350 {
        min-height: 300px;
    }
}

/* ==========================================================================
   ESTILOS GENERALES PARA MÓDULOS DE REQUISITOS Y TRÁMITES
   ========================================================================== */

.req-card {
    transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275), box-shadow 0.3s ease;
    word-wrap: break-word;
    overflow-wrap: anywhere;
}

.req-card:hover {
    transform: translateY(-5px);
}

.req-icon-badge {
    width: 48px;
    height: 48px;
    font-size: 1.25rem;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #E30613, #b8050f);
    color: #ffffff;
    box-shadow: 0 6px 14px rgba(227, 6, 19, 0.25);
    flex-shrink: 0;
}

.req-content-wrap {
    min-width: 0;
    /* Previene desbordes en contenedores flexbox */
    flex: 1 1 auto;
}