.service-card {
    width: 100%;
    max-width: 25rem; /* Ancho máximo un poco más generoso */
    height: auto;
    min-height: 14rem;
    background: #fff;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05); /* Sombra inicial suave */
    display: flex;
    flex-direction: row;
    gap: 0;
    padding: 0;
    border-radius: 16px; /* Bordes más redondeados */
    border: 1px solid #f0f0f0;
    overflow: hidden;
    position: relative;
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

.service-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.1);
    border-color: transparent;
}

.card-img-wrapper {
    width: 140px; /* Ancho fijo para retrato */
    min-width: 140px; /* Evita que se aplaste */
    position: relative;
    overflow: hidden;
    background: #f0f0f0;
}

.card-img-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover; 
    transition: transform 0.5s ease;
}

.service-card:hover .card-img-wrapper img {
    transform: scale(1.05);
}

.info {
    flex: 1; /* Ocupa el resto del espacio */
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    align-items: flex-start; /* Alineación a la izquierda */
    gap: 0.8rem;
}

.header-info h4 {
    margin: 0;
    font-size: 1.2rem;
    color: #2c3e50;
    font-weight: 700;
    letter-spacing: -0.5px;
}

/* Grid de estadísticas pequeñas */
.stats-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 0.2rem 0;
    width: 100%;
}

.stat-item {
    display: flex;
    align-items: center;
    gap: 6px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    padding: 6px 10px;
    border-radius: 8px;
    font-size: 0.85rem;
    color: #475569;
    font-weight: 600;
    transition: background 0.2s;
}

.stat-item:hover {
    background: #f1f5f9;
    border-color: #cbd5e1;
}

/* Ajuste para que los SVGs se alineen bien */
.stat-item svg {
    width: 16px;
    height: 16px;
}

.solicitar_btn{
    width: 100%;
    padding: 0.7rem 1rem;
    border: none;
    font-family: 'Inter', sans-serif;
    background: #83bebe;
    color: white;
    border-radius: 8px;
    font-weight: 600;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    transition: background 0.3s ease, transform 0.2s ease;
}

.solicitar_btn:hover{
    background: #111d1d; 
    cursor: pointer;
}

.verified-badge {
    position: absolute;
    top: 10px;
    left: 10px;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(4px);
    padding: 4px 8px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: bold;
    color: #27ae60;
    display: flex;
    align-items: center;
    gap: 4px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 2000;
    transition: background 0.3s ease;
    pointer-events: none;
    opacity: 0;
    backdrop-filter: blur(0px); /* Empieza sin nada */
    transition: backdrop-filter 0.3s ease, background 0.3s ease;
}

.modal-overlay.active {
    background: rgba(0, 0, 0, 0.75);
    pointer-events: auto;
    opacity: 1;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(8px);
}

.modal-content {
    background: #f4f4f4;
    width: 90%;
    max-width: 1000px;
    max-height: 85vh;
    border-radius: 20px;
    padding: 25px;
    overflow-y: auto;
    transform: translateY(50px);
    transition: transform 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
}

.modal-overlay.active .modal-content {
    transform: translateY(0);
}

.modal-overlay.active .modal-content {
    transform: translateY(0);
}

.modal-grid-tramitadores .service-card {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.modal-grid-tramitadores .service-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 15px rgba(0,0,0,0.2);
}

.modal-header {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-bottom: 20px;
}

#modal-titulo{
    width: 90%;
    text-align: center;
}

.btn-cerrar-modal {
    position: absolute;
    right: 20px;
    top: 15px;
    font-size: 2rem;
    border: none;
    background: none;
    cursor: pointer;
    color: #333;
}

.tramitadores-flex {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
}

.tramitadores-flex .service-card {
    flex: 1 1 calc(45% - 20px);
    min-width: 320px;
}

#tramitadores_container{
    margin: 4rem 2rem 2rem 2rem;
}

.tramitadores-flex{
    padding: 2rem;
}

.oculto { display: none !important; }

@media (max-width:1050px){
    #tramitadores_container{
        margin: 6rem 2rem 2rem 2rem;
        padding: 0;
    }

    .tramitadores-flex{
        padding: 2rem 0;
    }

    .service-card {
        flex-direction: column; /* En tablet/mobile pasa a vertical */
        height: auto;
    }

    .card-img-wrapper {
        width: 100%;
        height: 200px;
    }

    .info{
        width: 100%;
    }
}


@media (max-width:768px){
    .info{
        text-align: left;
    }
}