:root {
    --primary: #0e5bb3;
    --secondary: #d7b43f;
    --dark: #0b1c2d;
    --light: #f4f7fb;
    --white: #ffffff;
}

body {
    font-family: 'Poppins', sans-serif;
    background: var(--light);
    color: var(--dark);
}

/* HERO */
.colegiados-hero {
    height: 75vh;
    background: url('/public/recursos/nuescole.jpg') center/cover no-repeat;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

.overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(120deg, rgba(14, 91, 179, 0.478), rgba(11,28,45,.85));
}

.hero-content {
    position: relative;
    text-align: center;
    color: white;
}

.hero-content h1 {
    font-size: 3.2rem;
}

/* JURAMENTO */
.juramento-section {
    padding: 120px 15%;
    background: white;
}

.juramento {
    max-width: 900px;
    margin: auto;
    text-align: center;
    font-size: 1.3rem;
    line-height: 1.8;
    color: var(--dark);
}

.juramento i {
    font-size: 3rem;
    color: var(--secondary);
    margin-bottom: 30px;
}

.juramento span {
    display: block;
    margin-top: 30px;
    font-size: .9rem;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: var(--primary);
}

/* GRID */
.colegiados-section {
    padding: 120px 10%;
    background: var(--light);
    text-align: center;
}

.colegiados-section h2 {
    font-size: 2.5rem;
    margin-bottom: 80px;
}

.colegiados-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 40px;
}

/* CARD */
.colegiado-card {
    position: relative;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 30px 80px rgba(0,0,0,.15);
}

.colegiado-card img {
    width: 100%;
    height: 420px;
    object-fit: cover;
    transition: transform .6s ease;
}

.colegiado-card:hover img {
    transform: scale(1.08);
}

.card-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(11,28,45,.9), rgba(11,28,45,.2));
    color: white;
    padding: 30px;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    opacity: 0;
    transition: opacity .5s ease;
}

.colegiado-card:hover .card-overlay {
    opacity: 1;
}

.card-overlay h3 {
    font-size: 1.1rem;
}

.card-overlay span {
    font-size: .85rem;
    color: var(--secondary);
}

.card-overlay p {
    margin-top: 15px;
    font-size: .9rem;
    font-style: italic;
}

/* FRASE FINAL */
.closing-message {
    padding: 50px 10%;
    background: linear-gradient(120deg, var(--primary), var(--dark));
    color: white;
    text-align: center;
}

.closing-message h2 {
    font-size: 2.4rem;
}




.colegiados-carousel {
    width: 100%;
    height: 100vh;
    padding: 0;
   background-image: url(/public/recursos/fondowa2.png);
    background-size: cover;
    background-position: center;
    overflow: hidden;
    position: relative;
}





/* TRACK */
.carousel-track {
    display: flex;
    align-items: center;
    gap: 60px;
    padding-left: 15%;
    height: 100%;
    will-change: transform;
}

/* ITEM */
.carousel-item {
    flex-shrink: 0;
    width: 420px;
    height: 560px;
    border-radius: 0px;
    overflow: hidden;
    position: relative;
    background: #000;
    box-shadow:
        0 40px 90px rgba(11, 28, 45, 0.35),
        inset 0 0 0 1px rgba(255,255,255,.08);
    transition:
        transform .6s cubic-bezier(.2,.8,.2,1),
        box-shadow .6s ease;
}


.carousel-item::after {
    content: "";
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at top, rgba(255,255,255,.25), transparent 50%),
        linear-gradient(to top, rgba(11,28,45,.75), rgba(11,28,45,.05));
    opacity: .9;
    z-index: 2;
    pointer-events: none;
}

/* hover */
.carousel-item:hover {
    transform: translateY(-20px) scale(1.07);
    box-shadow:
        0 60px 140px rgba(11, 28, 45, 0.45);
}

/* IMAGEN */
.carousel-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transform: scale(1.15);
    filter: saturate(1.1) contrast(1.05);
    transition: transform 1.2s cubic-bezier(.2,.8,.2,1);
}

.carousel-item:hover img {
    transform: scale(1.3);
}   
/* ================================
   PROGRESS BAR – SCROLL HORIZONTAL
================================ */

.carousel-progress {
    position: absolute;
    bottom: 40px;
    left: 10%;
    width: 80%;
    height: 4px;
    background: rgba(14, 91, 179, 0.15);
    border-radius: 10px;
    overflow: hidden;
    z-index: 10;
}

.progress-bar {
    display: block;
    width: 0%;
    height: 100%;
    background: linear-gradient(
        90deg,
        #5c5c5c,
        #ffffff
    );
    border-radius: 10px;
    transition: width 0.1s linear;
}


/* ===============================
 BUSCADOR
================================ */
.buscador-section {
    position: absolute;
    bottom: -60px;
    left: 50%;
    transform: translateY(-250%) translateX(-50%);
    z-index: 100;
    width: 85%;
    max-width: 1100px;
    padding: 0;
}

.buscador {
    margin: auto;
    background: rgba(255, 255, 255, 0.365);
    backdrop-filter: blur(20px);
    padding: 32px 48px;
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.2);
}

.Textobuscador {
    text-align: center;
    margin-bottom: 1.8rem;
}

.Textobuscador h2 {
    font-size: 1.8rem;
    color: #1e3a8a;
    margin-bottom: .5rem;
    font-weight: 600;
    letter-spacing: -0.3px;
}

.Textobuscador p {
    color: #ffffff;
    font-size: 0.95rem;
    font-weight: 500;
}

.INPUTSBUSQUEDA {
    display: flex;
    gap: 0.8rem;
    flex-wrap: nowrap;
    justify-content: center;
    align-items: stretch;
}

.INPUTSBUSQUEDA input {
    padding: 14px 20px;
    border-radius: 12px;
    border: 1.5px solid rgba(226, 232, 240, 0.8);
    flex: 1;
    min-width: 200px;
    max-width: 280px;
    font-size: 0.95rem;
    transition: all .3s cubic-bezier(0.4, 0, 0.2, 1);
    background: rgba(248, 250, 252, 0.5);
    color: #ffffff;
    font-weight: 500;
}

.INPUTSBUSQUEDA input:focus {
    outline: none;
    border-color: #1e3a8a;
    background: #303a54f2;
    box-shadow: 0 0 0 3px rgba(30, 58, 138, 0.08),
                0 4px 12px rgba(30, 58, 138, 0.1);
    transform: translateY(-1px);
}

.INPUTSBUSQUEDA input::placeholder {
    color: #ffffff;
    font-weight: 400;
}

.INPUTSBUSQUEDA button {
    border-radius: 12px;
    padding: 14px 24px;
    border: none;
    cursor: pointer;
    font-weight: 600;
    transition: all .3s cubic-bezier(0.4, 0, 0.2, 1);
    font-size: 0.95rem;
    display: flex;
    align-items: center;
    gap: 8px;
    white-space: nowrap;
    letter-spacing: 0.01em;
}

#btnEnviarBusqueda {
    background: linear-gradient(135deg, #e4c631 0%, #ffd500 100%);
    color: white;
    box-shadow: 0 4px 14px rgba(30, 58, 138, 0.25);
    min-width: 56px;
    justify-content: center;
  
}

#btnEnviarBusqueda i {
    font-size: 1.1rem;
}

#btnEnviarBusqueda:hover {
    background: linear-gradient(135deg, #1e40af 0%, #2563eb 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 24px rgba(30, 58, 138, 0.35);
   
}

#btnEnviarBusqueda:active {
    transform: translateY(0);
    box-shadow: 0 2px 8px rgba(30, 58, 138, 0.3);
}

#btnBorrarFiltro {
    background: rgba(248, 250, 252, 0.9);
    color: #475569;
    border: 1.5px solid rgba(226, 232, 240, 0.8);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

#btnBorrarFiltro i {
    font-size: 1rem;
    color: #64748b;
}

#btnBorrarFiltro:hover {
    background: rgba(241, 245, 249, 1);
    color: #1e293b;
    border-color: #cbd5e1;
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
}

#btnBorrarFiltro:hover i {
    color: #ef4444;
}

#btnBorrarFiltro:active {
    transform: translateY(0);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
}



/* ===============================
 MODAL
================================ */
.popup-resultado {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(15, 23, 42, 0.75);
    backdrop-filter: blur(8px);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 10000; /* Increased z-index */
    padding: 20px;
}

.popup-resultado.show {
    display: flex !important;
}

.popup-contenido {
    
      background-image: url(/public/recursos/fondowa2.png);
    background-size: cover;
    background-position: center;
    padding: 30px;
    border-radius: 26px;
    width: 100%;
    max-width: 1200px;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
    box-shadow: 0 25px 70px rgba(0, 0, 0, 0.4);
    scroll-behavior: smooth;
}

/* BOTÓN CERRAR */
.popup-cerrar {
    position: absolute;
    top: 20px;
    right: 20px;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: rgba(30, 58, 138, 0.15);
    color: #ffffff;
    font-size: 1.8rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all .3s ease;
}

.popup-cerrar:hover {
    background: #1e3a8a;
    color: white;
    transform: rotate(90deg);
}




/* ===============================
 GRID RESULTADOS (3 COLUMNAS)
================================ */
.cards-container-resultado {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 35px;
    margin-top: 40px;
    padding: 20px;
}

/* ===============================
 CARD RESULTADO
================================ */
.card-resultado {
    position: relative;
    border-radius: 24px;
    overflow: visible; 
    width: 100%;
    max-width: 360px;
    height: 560px;
    margin: auto;
    display: flex;
    flex-direction: column;
    background: linear-gradient(145deg, #ffffff, #f8f9fa);
    box-shadow:
        0 8px 32px rgba(0,0,0,.08),
        0 2px 8px rgba(0,0,0,.04);
    transition: all .4s ease;
}

.card-resultado:hover {
    transform: translateY(-10px) scale(1.02);
}

/* ===============================
 HEADER
================================ */
.card-header-resultado {
    background: linear-gradient(135deg, #dcbf01, #f5e90b, #dcbf01);
    color: white;
    padding: 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* ===============================
 IMAGEN
================================ */
.card-image-resultado {
    display: flex;
    justify-content: center;
    margin-top: -40px;
}

.card-image-resultado img {
    width: 130px;
    height: 130px;
    border-radius: 20px;
    border: 5px solid white;
    object-fit: cover;
    box-shadow: 0 12px 40px rgba(0,0,0,.2);
}

/* ===============================
 BODY
================================ */
.card-content {
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    flex: 1;
}

/* ===============================
 CARD FOOTER & BUTTON
================================ */
.card-footer-resultado {
    margin-top: auto;
    padding-top: 1rem;
    border-top: 1px solid #f1f5f9;
}

.btn-ver-perfil {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    padding: 12px;
    background: #1e3a8a;
    color: white !important;
    border-radius: 12px;
    font-size: 0.9rem;
    font-weight: 700;
    text-decoration: none;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(30, 58, 138, 0.15);
}

.btn-ver-perfil:hover {
    background: #dcbf01;
    color: #1e3a8a !important;
    transform: translateY(-2px);
    box-shadow: 0 6px 18px rgba(220, 191, 1, 0.3);
}

.btn-ver-perfil i {
    font-size: 0.8rem;
    transition: transform 0.3s ease;
}

.btn-ver-perfil:hover i {
    transform: translateX(4px);
}

/* ===============================
 INFO
================================ */
.card-info-section {
    background: #f8fafc;
    border-radius: 14px;
    padding: .75rem;
    border: 1px solid #e2e8f0;
}

.info-item {
    display: flex;
    justify-content: space-between;
    padding: .45rem 0;
    font-size: .9rem;
    border-bottom: 1px solid #e5e7eb;
}

.info-item:last-child {
    border-bottom: none;
}

.info-label {
    font-weight: 700;
    color: #1e3a8a;
}

.info-value {
    color: #475569;
}


/* ===============================
 ESTADOS
================================ */
.status {
    position: relative;
    padding: 10px 26px;
    border-radius: 50px;
    font-size: .75rem;
    font-weight: 800;
    text-transform: uppercase;
}

/* ACTIVO */
.status.activo {
    background: linear-gradient(135deg,#10b981,#059669);
    color: white;
}

/* VENCIDO - CLICKABLE */
.status.vencido {
    background: linear-gradient(135deg,#fecaca,#fca5a5);
    color: #7f1d1d;
    cursor: pointer;
    animation: pulseVencido 1.6s infinite;
}



/* Animación */
@keyframes pulseVencido {
    0% { box-shadow: 0 0 0 0 rgba(220,38,38,.4); }
    70% { box-shadow: 0 0 0 14px rgba(220,38,38,0); }
    100% { box-shadow: 0 0 0 0 rgba(220,38,38,0); }
}

/* ===============================
 TOOLTIP VENCIDO
================================ */
.estado-hover {
    position: absolute;
    top: -120%;
    left: 50%;
    transform: translateX(-50%);
    background: white;
    padding: 1rem;
    width: 240px;
    border-radius: 16px;
    box-shadow: 0 16px 48px rgba(0,0,0,.2);
    opacity: 0;
    pointer-events: none;
    transition: .3s ease;
    z-index: 100;
}

.status.vencido:hover .estado-hover {
    opacity: 1;
    pointer-events: auto;
}

.estado-hover p {
    font-size: .9rem;
    font-weight: 600;
    color: #475569;
}

/* ===============================
 BOTÓN RENOVAR
================================ */
.btn-renovar {
    display: inline-block;
    margin-top: .75rem;
    padding: 10px 22px;
    background: linear-gradient(135deg,#1e40af,#1e3a8a);
    color: white;
    border-radius: 50px;
    font-size: .75rem;
    font-weight: 800;
    text-decoration: none;
}

/* ===============================
 TABS CREDENCIAL
================================ */

.credencial-tabs {
    margin-top: auto;
    display: flex;
    gap: 12px;
    justify-content: center;
    padding-top: 1rem;
}

.tab-btn {
    width: 48px;
    height: 48px;
    border-radius: 14px;
    border: none;
    cursor: pointer;
    font-size: 1.3rem;

    background: #e2e8f0;
    color: #475569;

    transition: all .25s ease;
}

.tab-btn:hover {
    transform: translateY(-2px);
}

.tab-btn.active {
    background: linear-gradient(135deg,#3b82f6,#6366f1);
    color: white;
    box-shadow: 0 8px 20px rgba(59,130,246,.35);
}

/* ===============================
 CONTENIDO TABS
================================ */

.tab-content {
    display: none;
    animation: fadeInUp .4s ease;
    min-height: 120px;
}

.tab-content.active {
    display: block;
}

/* overlay ya no fullscreen */
.overlay-credencial {
    position: relative;
    inset: auto;
    opacity: 1;
    pointer-events: auto;
    border-radius: 16px;
    margin-top: 1rem;
}


/* ===============================
 TABS TIPO RADIO (ICONOS)
================================ */

.credencial-tabs {
    display: flex;
    gap: 6px;
    background: #eef2f7;
    padding: 6px;
    border-radius: 14px;
    margin-top: auto;
}

.tab-radio {
    flex: 1;
}

.tab-radio input {
    display: none;
}

.tab-icon {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;

    cursor: pointer;
    padding: 8px 0;
    border-radius: 10px;

    color: #475569;
    font-size: 11px;
    font-weight: 600;

    transition: all .2s ease;
}

.tab-icon svg {
    width: 20px;
    height: 20px;
    fill: currentColor;
}

/* ACTIVO */
.tab-radio input:checked + .tab-icon {
    background: white;
    color: #1e40af;
    box-shadow: 0 4px 14px rgba(0,0,0,.12);
}

/* ================================
   RESPONSIVE DESIGN
================================ */

/* Carrusel automático solo en responsive */
@media (max-width: 768px) {
    .carousel-track {
        animation: autoScroll 12s linear infinite;
    }

    @keyframes autoScroll {
        0% {
            transform: translateX(0);
        }
        100% {
            transform: translateX(-100%);
        }
    }

    .carousel-track:hover {
        animation-play-state: paused;
    }
}

/* Tablets grandes y laptops pequeñas */
@media (max-width: 1200px) {
    .hero-content h1 {
        font-size: 2.8rem;
    }

    .juramento-section {
        padding: 100px 10%;
    }

    .carousel-item {
        width: 380px;
        height: 520px;
    }

    .carousel-track {
        gap: 50px;
        padding-left: 10%;
    }

    /* Buscador */
    .buscador-section {
        width: 90%;
        max-width: 1000px;
    }

    .buscador {
        padding: 28px 40px;
    }

    /* Modal */
    .cards-container-resultado {
        grid-template-columns: repeat(2, 1fr);
        gap: 30px;
    }

    .card-resultado {
        max-width: 100%;
    }
}

/* Tablets */
@media (max-width: 992px) {
    .colegiados-hero {
        height: 60vh;
    }

    .hero-content h1 {
        font-size: 2.4rem;
    }

    .hero-content p {
        font-size: 1rem;
    }

    .juramento-section {
        padding: 80px 8%;
    }

    .juramento {
        font-size: 1.1rem;
    }

    .juramento i {
        font-size: 2.5rem;
    }

    .colegiados-section {
        padding: 80px 8%;
    }

    .colegiados-section h2 {
        font-size: 2.2rem;
        margin-bottom: 60px;
    }

    .colegiados-grid {
        grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
        gap: 30px;
    }

    .closing-message {
        padding: 40px 8%;
    }

    .closing-message h2 {
        font-size: 2rem;
    }

    .colegiados-carousel {
        height: 80vh;
    }

    .carousel-item {
        width: 340px;
        height: 480px;
    }

    .carousel-track {
        gap: 40px;
        padding-left: 8%;
    }

    .carousel-progress {
        left: 8%;
        width: 84%;
    }

    /* Buscador */
    .buscador-section {
        width: 92%;
    }

    .buscador {
        padding: 24px 32px;
    }

    .Textobuscador h2 {
        font-size: 1.6rem;
    }

    .Textobuscador p {
        font-size: 0.9rem;
    }

    .INPUTSBUSQUEDA {
        gap: 0.6rem;
    }

    .INPUTSBUSQUEDA input {
        min-width: 180px;
        max-width: 250px;
        padding: 12px 16px;
        font-size: 0.9rem;
    }

    /* Modal */
    .popup-contenido {
        padding: 25px;
        max-height: 85vh;
    }

    .cards-container-resultado {
        grid-template-columns: repeat(2, 1fr);
        gap: 25px;
        padding: 15px;
    }
}

/* Tablets pequeñas */
@media (max-width: 768px) {
    .colegiados-hero {
        height: 50vh;
    }

    .hero-content h1 {
        font-size: 2rem;
        padding: 0 20px;
    }

    .hero-content p {
        font-size: 0.9rem;
        padding: 0 20px;
    }

    .juramento-section {
        padding: 60px 5%;
    }

    .juramento {
        font-size: 1rem;
        line-height: 1.7;
    }

    .juramento i {
        font-size: 2rem;
        margin-bottom: 20px;
    }

    .juramento span {
        font-size: 0.8rem;
        margin-top: 20px;
    }

    .colegiados-section {
        padding: 60px 5%;
    }

    .colegiados-section h2 {
        font-size: 1.8rem;
        margin-bottom: 40px;
    }

    .colegiados-grid {
        grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
        gap: 25px;
    }

    .colegiado-card img {
        height: 380px;
    }

    .card-overlay {
        padding: 20px;
    }

    .card-overlay h3 {
        font-size: 1rem;
    }

    .card-overlay p {
        font-size: 0.85rem;
    }

    .closing-message {
        padding: 35px 5%;
    }

    .closing-message h2 {
        font-size: 1.6rem;
    }

    .colegiados-carousel {
        height: 70vh;
    }

    .carousel-item {
        width: 300px;
        height: 420px;
        border-radius: 20px;
    }

    .carousel-track {
        gap: 30px;
        padding-left: 5%;
    }

    .carousel-progress {
        left: 5%;
        width: 90%;
        bottom: 30px;
    }

    /* Buscador */
    .buscador-section {
        position: relative;
        bottom: auto;
        left: auto;
        transform: none;
        width: 94%;
        margin: 40px auto 0;
        background-color: #d7b43f;
    }

    .buscador {
        padding: 20px 24px;
        border-radius: 16px;
    }

    .Textobuscador {
        margin-bottom: 1.4rem;
    }

    .Textobuscador h2 {
        font-size: 1.4rem;
        margin-bottom: 0.4rem;
    }

    .Textobuscador p {
        font-size: 0.85rem;
    }

    .INPUTSBUSQUEDA {
        flex-wrap: wrap;
        gap: 0.6rem;
    }

    .INPUTSBUSQUEDA input {
        min-width: 150px;
        max-width: 100%;
        flex: 1 1 calc(50% - 0.3rem);
        padding: 12px 14px;
        font-size: 0.85rem;
    }

    .INPUTSBUSQUEDA button {
        padding: 12px 20px;
        font-size: 0.85rem;
        flex: 1 1 100%;
    }

    #btnEnviarBusqueda,
    #btnBorrarFiltro {
        min-width: 100%;
        justify-content: center;
    }

    /* Modal */
    .popup-resultado {
        padding: 15px;
    }

    .popup-contenido {
        padding: 20px;
        border-radius: 20px;
        max-height: 88vh;
    }

    .popup-cerrar {
        top: 15px;
        right: 15px;
        width: 38px;
        height: 38px;
        font-size: 1.5rem;
    }

    .cards-container-resultado {
        grid-template-columns: 1fr;
        gap: 25px;
        margin-top: 30px;
        padding: 10px;
    }

    .card-resultado {
        max-width: 100%;
        height: auto;
        min-height: 520px;
    }

    .card-header-resultado {
        padding: 1.2rem;
    }

    .card-image-resultado {
        margin-top: -35px;
    }

    .card-image-resultado img {
        width: 110px;
        height: 110px;
        border-radius: 16px;
        border: 4px solid white;
    }

    .card-content {
        padding: 1.2rem;
        gap: 0.8rem;
    }

    .info-item {
        font-size: 0.85rem;
        padding: 0.4rem 0;
    }

    .status {
        padding: 8px 22px;
        font-size: 0.7rem;
    }

    .estado-hover {
        width: 200px;
        padding: 0.8rem;
    }

    .estado-hover p {
        font-size: 0.8rem;
    }

    .btn-renovar {
        padding: 8px 18px;
        font-size: 0.7rem;
    }

    .tab-btn {
        width: 42px;
        height: 42px;
        font-size: 1.1rem;
    }

    .credencial-tabs {
        gap: 8px;
    }

    .tab-icon {
        padding: 6px 0;
        font-size: 10px;
    }

    .tab-icon svg {
        width: 18px;
        height: 18px;
    }
}

/* Móviles grandes */
@media (max-width: 576px) {
    .colegiados-hero {
        height: 45vh;
    }

    .hero-content h1 {
        font-size: 1.6rem;
        padding: 0 15px;
    }

    .hero-content p {
        font-size: 0.85rem;
        padding: 0 15px;
    }

    .juramento-section {
        padding: 50px 5%;
    }

    .juramento {
        font-size: 0.95rem;
        line-height: 1.6;
    }

    .juramento i {
        font-size: 1.8rem;
        margin-bottom: 15px;
    }

    .juramento span {
        font-size: 0.75rem;
        margin-top: 15px;
        letter-spacing: 1px;
    }

    .colegiados-section {
        padding: 50px 5%;
    }

    .colegiados-section h2 {
        font-size: 1.5rem;
        margin-bottom: 30px;
    }

    .colegiados-grid {
        grid-template-columns: 1fr 1fr;
        gap: 20px;
    }

    .colegiado-card {
        border-radius: 15px;
    }

    .colegiado-card img {
        height: 350px;
    }

    .card-overlay {
        padding: 15px;
        opacity: 1;
        background: linear-gradient(to top, rgba(11,28,45,.85), rgba(11,28,45,.3));
    }

    .card-overlay h3 {
        font-size: 0.95rem;
    }

    .card-overlay span {
        font-size: 0.8rem;
    }

    .card-overlay p {
        font-size: 0.8rem;
        margin-top: 10px;
    }

    .closing-message {
        padding: 30px 5%;
    }

    .closing-message h2 {
        font-size: 1.3rem;
        line-height: 1.4;
    }

    .colegiados-carousel {
        height: 60vh;
    }

    .carousel-item {
        width: 260px;
        height: 360px;
        border-radius: 16px;
    }

    .carousel-track {
        gap: 20px;
        padding-left: 5%;
    }

    .carousel-progress {
        left: 5%;
        width: 90%;
        bottom: 20px;
        height: 3px;
    }

    /* Buscador */
    .buscador-section {
        width: 95%;
        bottom: -30px;
        transform: translateY(-180%) translateX(-50%);
    }

    .buscador {
        padding: 18px 20px;
        border-radius: 14px;
    }

    .Textobuscador {
        margin-bottom: 1.2rem;
    }

    .Textobuscador h2 {
        font-size: 1.2rem;
        margin-bottom: 0.3rem;
    }

    .Textobuscador p {
        font-size: 0.8rem;
    }

    .INPUTSBUSQUEDA {
        flex-direction: column;
        gap: 0.6rem;
    }

    .INPUTSBUSQUEDA input {
        min-width: 100%;
        max-width: 100%;
        padding: 11px 14px;
        font-size: 0.85rem;
    }

    .INPUTSBUSQUEDA button {
        padding: 11px 18px;
        font-size: 0.8rem;
        width: 100%;
    }

    #btnEnviarBusqueda i {
        font-size: 1rem;
    }

    #btnBorrarFiltro i {
        font-size: 0.9rem;
    }

    /* Modal */
    .popup-resultado {
        padding: 10px;
    }

    .popup-contenido {
        padding: 16px;
        border-radius: 18px;
        max-height: 90vh;
    }

    .popup-cerrar {
        top: 12px;
        right: 12px;
        width: 34px;
        height: 34px;
        font-size: 1.3rem;
    }

    .cards-container-resultado {
        gap: 20px;
        margin-top: 25px;
        padding: 8px;
    }

    .card-resultado {
        height: auto;
        min-height: 500px;
        border-radius: 20px;
    }

    .card-header-resultado {
        padding: 1rem;
        font-size: 0.9rem;
    }

    .card-image-resultado {
        margin-top: -30px;
    }

    .card-image-resultado img {
        width: 100px;
        height: 100px;
        border-radius: 14px;
        border: 3px solid white;
    }

    .card-content {
        padding: 1rem;
        gap: 0.7rem;
    }

    .card-info-section {
        padding: 0.6rem;
        border-radius: 12px;
    }

    .info-item {
        font-size: 0.8rem;
        padding: 0.35rem 0;
    }

    .status {
        padding: 7px 20px;
        font-size: 0.65rem;
    }

    .estado-hover {
        width: 180px;
        padding: 0.7rem;
        top: -110%;
    }

    .estado-hover p {
        font-size: 0.75rem;
    }

    .btn-renovar {
        padding: 7px 16px;
        font-size: 0.65rem;
        margin-top: 0.6rem;
    }

    .credencial-tabs {
        gap: 6px;
        padding: 5px;
        border-radius: 12px;
    }

    .tab-btn {
        width: 38px;
        height: 38px;
        font-size: 1rem;
        border-radius: 12px;
    }

    .tab-icon {
        padding: 5px 0;
        font-size: 9px;
        gap: 3px;
    }

    .tab-icon svg {
        width: 16px;
        height: 16px;
    }

    .tab-content {
        min-height: 100px;
    }
}

/* Móviles pequeños */
@media (max-width: 375px) {
    .hero-content h1 {
        font-size: 1.4rem;
    }

    .hero-content p {
        font-size: 0.8rem;
    }

    .juramento {
        font-size: 0.9rem;
    }

    .colegiados-section h2 {
        font-size: 1.3rem;
    }

    .colegiado-card img {
        height: 320px;
    }

    .closing-message h2 {
        font-size: 1.2rem;
    }

    .carousel-item {
        width: 240px;
        height: 340px;
    }

    .carousel-track {
        gap: 15px;
    }

    /* Buscador */
    .buscador {
        padding: 16px 18px;
    }

    .Textobuscador h2 {
        font-size: 1.1rem;
    }

    .Textobuscador p {
        font-size: 0.75rem;
    }

    .INPUTSBUSQUEDA input {
        padding: 10px 12px;
        font-size: 0.8rem;
    }

    .INPUTSBUSQUEDA button {
        padding: 10px 16px;
        font-size: 0.75rem;
    }

    /* Modal */
    .popup-contenido {
        padding: 14px;
    }

    .cards-container-resultado {
        gap: 18px;
    }

    .card-resultado {
        min-height: 480px;
        border-radius: 18px;
    }

    .card-image-resultado img {
        width: 90px;
        height: 90px;
    }

    .info-item {
        font-size: 0.75rem;
    }
}

/* Landscape mode para móviles */
@media (max-width: 896px) and (orientation: landscape) {
    .colegiados-hero {
        height: 100vh;
    }

    .colegiados-carousel {
        height: 100vh;
    }

    .carousel-item {
        width: 280px;
        height: 380px;
    }

    /* Buscador en landscape */
    .buscador-section {
        transform: translateY(-150%) translateX(-50%);
    }

    .buscador {
        padding: 16px 24px;
    }

    .INPUTSBUSQUEDA {
        flex-wrap: nowrap;
    }

    .INPUTSBUSQUEDA input {
        flex: 1;
        min-width: 140px;
        max-width: 200px;
    }

    /* Modal en landscape */
    .popup-contenido {
        max-height: 92vh;
    }

    .cards-container-resultado {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Mejoras de rendimiento para dispositivos móviles */
@media (max-width: 768px) {
    .colegiado-card:hover img,
    .carousel-item img {
        transform: none;
    }

    .colegiado-card:hover {
        transform: none;
    }

    .carousel-item:hover {
        transform: none;
    }

    .carousel-item::after {
        opacity: 0.7;
    }

    /* Deshabilitar animaciones pesadas en móvil */
    .card-resultado:hover {
        transform: translateY(-5px) scale(1.01);
    }

    .status.vencido {
        animation: none;
    }

    .tab-btn:hover,
    #btnEnviarBusqueda:hover,
    #btnBorrarFiltro:hover {
        transform: none;
    }

    /* Buscador - No encima del hero */
    .buscador-section {
        padding:  20px ;
        position: relative;
        bottom: auto;
        left: auto;
        transform: none;
        width: 100%;
        margin:  0;
    }
}

/* Extra pequeños (iPhone SE, etc) */
@media (max-width: 360px) {
    .buscador-section {
        width: 96%;
    }

    .buscador {
        padding: 14px 16px;
    }

    .Textobuscador h2 {
        font-size: 1rem;
    }

    .popup-contenido {
        padding: 12px;
    }

    .card-resultado {
        min-height: 460px;
    }

    .card-image-resultado img {
        width: 85px;
        height: 85px;
    }
}

/* Tablets en landscape */
@media (min-width: 768px) and (max-width: 1024px) and (orientation: landscape) {
    .cards-container-resultado {
        grid-template-columns: repeat(3, 1fr);
        gap: 20px;
    }

    .card-resultado {
        height: 500px;
    }
}