:root {
    --dark-red: #440412;
    --red: #AB0A3D;
    --red-100: #fff0f2;
    --black: #3D3935;
    --yellow: #B68400;
    --yellow-900: #754d0e;
    --gray: #B0ABA1;
    --gray-50: #f9fafb;
    --gray-100: #f3f4f6;
    --gray-200: #e5e7eb;
    --gray-400: #9ca3af;
    --gray-600: #4b5563;
    --gray-900: #111827;
    --light-gray: #CBCBCB;
    --light: #E8E8E8;

}

/* ================================================================
   HEADER PILL NAV - Navbar flotante con animación scroll
   ================================================================ */
.header-pill-nav {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    width: 90%;
    max-width: 1200px;
    height: 70px;
    background: rgba(68, 4, 18, 0);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--glass-border, rgba(255,255,255,0.1));
    border-radius: 50px;
    padding: 0 30px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    z-index: 1040;
    transition: all 0.4s cubic-bezier(0.25, 1, 0.5, 1);
}

.header-pill-nav.scrolled-pill {
    top: 0;
    width: 100%;
    max-width: 100%;
    border-radius: 0;
    border-left: none;
    border-right: none;
    border-top: none;
    background: rgba(68, 4, 18, 0.98);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.3);
    padding: 0 5%;
}

.header-pill-nav .brand-logo {
    font-weight: 800;
    font-size: 1.5rem;
    color: #fff;
    text-decoration: none;
    letter-spacing: 2px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.header-pill-nav .brand-logo img {
    height: 100px;
    filter: brightness(0) invert(1);
    transition: filter 0.3s ease;
}

.header-pill-nav .brand-logo:hover img {
    filter: brightness(0) invert(1) opacity(0.8);
}

body {
    font-family: "Montserrat", sans-serif !important;
    font-weight: 400;
}

h1,
h2,
h3 {
    font-weight: 700;
}

strong {
    font-weight: 600;
}

.btn-collapse {
    background-color: var(--light-gray) !important;
    border-color: var(--light-gray) !important;
    color: white;
}

.btn-primary {
    background-color: var(--red) !important;
    border-color: var(--red) !important;
    font-weight: 400;
}

.btn-primary:hover {
    background-color: var(--dark-red) !important;
    border-color: var(--dark-red) !important;
}

.btn-primary:active,
.btn-primary.active {
    background-color: var(--dark-red) !important;
    border-color: var(--dark-red) !important;
}

.btn-secondary {
    background-color: var(--yellow) !important;
    border-color: var(--yellow) !important;
}

.btn-secondary:hover {
    background-color: var(--gray) !important;
    border-color: var(--dark-red) !important;
}

.btn-secondary:active,
.btn-secondary.active {
    background-color: var(--yellow) !important;
    border-color: var(--yellow) !important;
}

/* Backgrounds */
.bg-primary {
    background-color: var(--dark-red) !important;
}

.bg-secondary {
    background-color: var(--red) !important;
}

.bg-imove {
    background-color: var(--gray);
}

.bg-imove-2 {
    background-color: var(--black);
}

.bg-yellow {
    background-color: var(--yellow);

}

/* Borders */
.border-primary {
    border-color: var(--dark-red) !important;
}

.border-secondary {
    border-color: var(--red) !important;
}

/* Links */
a {
    color: var(--red);
}

a:hover {
    color: var(--dark-red);
}

.text-primary {
    color: var(--dark-red) !important;
}

.text-lead {
    font-size: 1.8rem;
    font-weight: 300;
}

/* FOOTER */
.footer-color {
    width: 100%;
    height: 40px;
    background-color: var(--dark-red);
}

.footer-img,
.socio-img {
    width: 100%;
    max-width: 300px;
    height: 100%;
    object-fit: cover;
    object-position: center;
}

.footer-wrapper {
    display: flex;
    justify-content: center;
    align-items: center;
    background: white;
    overflow: hidden;
    flex-wrap: wrap;
}

/* container */
.header-container {
    align-items: left;
    justify-content: left;
    flex-wrap: wrap;
    overflow: hidden;
    margin-bottom: 10px;
}

.image-container {
    display: flex;
    align-items: left;
    justify-content: left;
    flex-wrap: wrap;
    overflow: hidden;
    max-height: 600px;
    max-width: 600px;
}

/* image */
.logo-img {
    height: 150px;
    /* altura fija */
    width: auto;
    /* mantiene proporción */
    object-fit: contain;
    flex-shrink: 0;
    /* evita que se encoja en flex */
}

.image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    overflow: hidden;
}

.logo-escudo {
    height: 80px;
    width: 100%;
    object-fit: cover;
    object-position: center;
    overflow: hidden;
}

@media (max-width: 768px) {
    .logo-container {
        gap: 20px;
    }

    .logo-item {
        height: 90px;
    }

    .footer-links a {
        margin: 0 10px;
        display: inline-block;
        margin-bottom: 5px;
    }

    .diagrama {
        display: inline-block
    }
}

/*  */
.navbar .nav-link {
    font-weight: bold;
}

.nav-link.active {
    background-color: var(--dark-red);
    padding: 0.5em 1em !important;
    color: white !important;
    border-radius: 30px;
}

/* HEADER */
.header-logo-container {
    width: 350px;
    height: 50px;
    overflow: hidden;
    background-color: white;
}

.header-logo {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
}

/* Cards */
.custom-card {
    background: #ffffff;
    transition: transform 0.22s ease, box-shadow 0.22s ease;
    border: none;
    position: relative;
    overflow: hidden;
    border-radius: 22px;
    box-shadow: 0 4px 20px rgba(68, 4, 18, 0.08);
    height: 100%;
    display: flex;
    flex-direction: column;
}

.custom-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 18px 44px rgba(68, 4, 18, 0.2);
}

/* ── Tramite Card Header ── */
.tramite-icon-header {
    overflow: hidden;
    background: #fafafa;
    padding: 15px 13px 15px;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 14px;
}

/* Orbe cálido (dorado) */
.tramite-icon-header::before {
    content: '';
    position: absolute;
    top: -35%;
    right: -20%;
    width: 75%;
    height: 75%;
    background: radial-gradient(circle, rgba(247, 181, 0, 0.22) 0%, rgba(68, 4, 18, 0) 65%);
    border-radius: 50%;
    animation: cardOrb1 3s ease-in-out infinite;
    pointer-events: none;
    z-index: 0;
}

/* Orbe frío (verde) */
.tramite-icon-header::after {
    content: '';
    position: absolute;
    bottom: -30%;
    left: -15%;
    width: 65%;
    height: 65%;
    background: radial-gradient(circle, rgba(20, 120, 75, 0.25) 0%, rgba(4, 68, 18, 0) 65%);
    border-radius: 50%;
    animation: cardOrb2 3s ease-in-out infinite;
    pointer-events: none;
    z-index: 0;
}

/* Badge en header */
.tramite-badge-sm {
    position: relative;
    z-index: 1;
    align-self: flex-end;
    margin-top: auto;
    padding: 5px 12px;
    border-radius: 50px;
    font-size: 0.68rem;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.badge-linea-sm {
    background: rgba(255, 255, 255, 0.14);
    color: #440412;
    border: 1px solid #440412;
}

.badge-presencial-sm {
    background: rgba(255, 255, 255, 0.14);
    color: #440412;
    border: 1px solid #440412;
}

/* Cuerpo de la card */
.tramite-body {
    padding: 18px 22px 20px;
    display: flex;
    flex-direction: column;
    flex: 1;
}

.tramite-body h5 {
    font-weight: 800;
    letter-spacing: 0.3px;
    line-height: 1.3;
    color: #440412;
    margin-bottom: 8px;
    text-transform: uppercase;
}

.tramite-desc {
    color: #6b7280;
    font-size: 0.78rem;
    line-height: 1.55;
    margin-bottom: 16px;
    flex: 1;
    overflow: hidden;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 3;
}

.btn-tramite {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    width: 100%;
    padding: 9px 16px;
    border-radius: 50px;
    font-size: 0.78rem;
    font-weight: 600;
    border: 1.5px solid #459a9c;
    background: transparent;
    color: #459a9c;
    text-decoration: none;
    transition: all 0.2s ease;
    cursor: pointer;
}

.btn-tramite:hover {
    border-color: #440412;
    color: #440412;
    background: #fafafa;
}

/* Orbes animados */
@keyframes cardOrb1 {
    0%, 100% { transform: translate(0, 0) scale(1); }
    40%      { transform: translate(10px, -8px) scale(1.05); }
    70%      { transform: translate(-6px, 5px) scale(0.96); }
}

@keyframes cardOrb2 {
    0%, 100% { transform: translate(0, 0) scale(1); }
    35%      { transform: translate(-8px, 6px) scale(1.04); }
    65%      { transform: translate(7px, -4px) scale(0.97); }
}

@keyframes fadeInCard {
    from { opacity: 0; transform: translateY(18px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* Responsive adjustments for cards */
@media (max-width: 768px) {
    .custom-card:hover {
        transform: none;
    }

    .tramite-icon-header {
        padding: 12px 10px 12px;
    }

    .tramite-badge-sm {
        font-size: 0.62rem;
        padding: 4px 10px;
    }

    .tramite-body {
        padding: 15px 18px 18px;
    }

    .tramite-body h5 {
        font-size: 1rem;
    }

    .tramite-desc {
        font-size: 0.72rem;
    }

    .btn-tramite {
        font-size: 0.72rem;
        padding: 8px 14px;
    }
}

.header-ciudades {
    position: sticky;
    top: 0;
    z-index: 1030;
    background: white;
}

.header-logo {
    max-height: 40px;
    width: auto;
    object-fit: contain;
}

.img-box {
    height: 250px;
    overflow: hidden;
    background-color: white;
    /* fallback elegante */
}

.img-box img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.custom-input {
    background-color: var(--light);
    border-radius: 10px;
    padding: 12px;
}

.custom-input:focus {
    border-color: var(--light);
    background-color: var(--light);
    /* box-shadow: 0 0 0 0.25rem rgba(214, 51, 132, 0.25); */
}


.pago-info {
    background-color: #f8f9fa;
    padding: 20px;
    border-radius: 8px;
}


.text-justify {
    text-align: justify;
}

.centered {
    display: flex;
    justify-content: center;
    /* centra horizontalmente */
    align-items: center;
    /* centra verticalmente */
}

/* dropdow */
.dropdown-item:active,
.dropdown-item:focus,
.dropdown-item:hover {
    background-color: var(--red);
    color: white;
    outline: none;
}

.dropdown-item:active {
    background-color: var(--dark-red);
}

/* loading para las paginas */
#loadingOverlay {
    background: rgba(0, 0, 0, 0.6);
    z-index: 2000;

    opacity: 0;
    visibility: hidden;

    transition: opacity 0.25s ease, visibility 0.25s ease;
}

#loadingOverlay.show {
    opacity: 1;
    visibility: visible;
}


/*Sección de Home*/
.home-img{
    max-height:400px;
}

.icon-mision-vision{
    width:70px; 
    height:70px;
}

/* oculta el icon del input time */
input[type="time"]::-webkit-calendar-picker-indicator {
    background: none;
    display: none;
    -webkit-appearance: none;
}

/* ================================================================
   KEYFRAMES ANIMATIONS
   ================================================================ */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}


/* Buscador */
.search-container {
    background-color: #ffffff;
    border: 1px solid rgba(0, 0, 0, 0.06);
    border-radius: 50px;
    padding: 0.45rem 0.45rem 0.45rem 1.25rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
    max-width: 760px;
    margin: 0 auto;
    position: relative;
    z-index: 1;
    overflow: hidden;
}
 
.search-input {
    border: none;
    outline: none;
    flex: 1;
    font-size: 1rem;
    background: transparent;
    min-width: 0; 
}

.search-btn {
    background-color: var(--red);
    color: #fff;
    border: none;
    border-radius: 50px;
    padding: 0.55rem 1.75rem;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.2s ease, transform 0.1s ease;
    white-space: nowrap;
    flex-shrink: 0;  
}
 
.search-btn:hover {
    background-color: var(--dark-red);
}
 
.search-btn:active {
    transform: scale(0.97);
}

/* =========================
   FOOTER GLASS
   ========================= */

.footer-glass-wrapper {
    position: relative;
    background: #141211;
    overflow: hidden;
    padding-top: 5rem;
    padding-bottom: 0;
}

.footer-svg-bg {
    position: absolute;
    inset: 0;
    z-index: 0;
    opacity: 0.7;
}

.glass-footer-card {
    position: relative;
    z-index: 2;
    background: rgba(68, 4, 18, 0);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.09);
    border-bottom: none;
    border-radius: 40px 40px 0 0;
    padding: 60px 50px 0;
    overflow: hidden;
    box-shadow: 0 -20px 80px rgba(0, 0, 0, 0.7);
}

.glass-border {
    border-color: rgba(255, 255, 255, 0.08) !important;
}

.sys-status-badge {
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.08);
    padding: 8px 16px;
    border-radius: 50px;
    display: inline-flex;
    align-items: center;
    gap: 10px;
}

.sys-pulse-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #c4ff00;
    animation: sysPulse 2s infinite;
}

@keyframes sysPulse {
    0% { transform: scale(0.9); opacity: 0.5; box-shadow: 0 0 0 0 rgba(196, 255, 0, 0.6); }
    70% { transform: scale(1); opacity: 1; box-shadow: 0 0 0 10px rgba(196, 255, 0, 0); }
    100% { transform: scale(0.9); opacity: 0.5; box-shadow: 0 0 0 0 rgba(196, 255, 0, 0); }
}

.sys-text {
    font-size: 0.7rem;
    letter-spacing: 1.5px;
}

.footer-title {
    font-size: 1.5rem;
    letter-spacing: -0.5px;
    font-weight: 600;
}

.glass-social-link {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: rgba(255, 255, 255, 0.6) !important;
    border: 1px solid rgba(255, 255, 255, 0.08);
    font-size: 1.2rem;
    text-decoration: none;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.glass-social-link:hover {
    background: #ffffff;
    color: #000 !important;
    transform: scale(1.1) translateY(-3px);
}

.footer-links a {
    color: rgba(255, 255, 255, 0.4);
    text-decoration: none;
    font-size: 0.8rem;
    margin: 0 12px;
    transition: 0.3s ease;
}

.footer-links a:hover {
    color: #fff;
}

.footer-watermark-container {
    width: 100%;
    text-align: center;
    margin-top: 2rem;
    transform: translateY(25px);
}

.footer-watermark-text {
    font-size: clamp(5rem, 18vw, 15rem);
    font-weight: 900;
    letter-spacing: -4px;
    line-height: 0.75;
    margin: 0;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.11) 0%, rgba(255, 255, 255, 0) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    user-select: none;
    pointer-events: none;
}

@media (max-width: 991.98px) {
    .glass-footer-card {
        padding: 40px 20px 0;
        border-radius: 28px 28px 0 0;
    }
}

@media (max-width: 768px) {
    .footer-glass-wrapper {
        padding: 60px 15px 40px 15px;
    }
    .glass-footer-card {
        padding: 30px 25px 0;
        border-radius: 20px 20px 0 0;
    }
    .glass-social-links {
        justify-content: center;
    }
    .footer-links {
        gap: 16px;
    }
}

/* =========================
   GLOW ANIMATION
   ========================= */

@keyframes footerFlow {
    0% {
        stroke-dashoffset: 300;
        opacity: 0.3;
    }
    50% {
        stroke-dashoffset: 0;
        opacity: 1;
    }
    100% {
        stroke-dashoffset: -300;
        opacity: 0.3;
    }
}

@keyframes footerPulse {
    0%, 100% {
        transform: scale(1);
        opacity: 0.3;
    }
    50% {
        transform: scale(1.15);
        opacity: 0.8;
    }
}
