/* CSS Document - Versión Premium */
/* ============ ANIMACIONES ============ */
@keyframes glow {
    0% { transform: scale(1); box-shadow: 0 0 5px rgba(255, 255, 255, 0.3); }
    50% { transform: scale(1.1); box-shadow: 0 0 20px rgba(255, 255, 255, 1), 0 0 30px rgba(255, 255, 255, 0.7); }
    100% { transform: scale(1); box-shadow: 0 0 5px rgba(255, 255, 255, 0.3); }
}

@keyframes zoomOnce {
    0% { transform: scale(1); }
    50% { transform: scale(1.2); }
    100% { transform: scale(1); }
}

@keyframes glow-text {
    0% { text-shadow: 0 0 5px rgba(255, 0, 0, 0.5); }
    50% { text-shadow: 0 0 15px rgba(255, 0, 0, 1); }
    100% { text-shadow: 0 0 5px rgba(255, 0, 0, 0.5); }
}

@keyframes brillo {
    0% { box-shadow: 0px 4px 10px rgba(0, 0, 0, 0.15); }
    50% { box-shadow: 0px 6px 15px rgba(255, 107, 0, 0.6); }
    100% { box-shadow: 0px 4px 10px rgba(0, 0, 0, 0.15); }
}

@keyframes shine {
    100% {
        transform: translateX(100%);
    }
}

/* ============ VARIABLES PREMIUM ============ */
:root {
    --deep-blue: #0A2463;
    --emerald: #3E92CC;
    --gold: #D4AF37;
    --light-bg: #F8F9FA;
    --dark-text: #2E2E2E;
    --shadow-lg: 0 15px 30px rgba(0, 0, 0, 0.15);
    --gold-glow: 0 0 15px rgba(212, 175, 55, 0.7);
}

/* ============ ESTILOS GENERALES ============ */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body {
    background-color: var(--light-bg);
    
    color: var(--dark-text);
    line-height: 1.6;
    overflow-x: hidden;
    position: relative;
}

/* Header y logo - TAMAÑO REDUCIDO */
.header {
    display: flex;
    align-items: center;
    padding-top: 10px;
    padding-right: 30px;
    padding-left: 30px;
    padding-bottom: 0px;
    background: white;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    margin-top: -20px;
    margin-right: auto;
    margin-left: auto;
    margin-bottom: -26px;
}

.logo {
    height: 40px;
    display: flex;
    align-items: center;
}

.logo img {
    height: 100%;
    width: auto;
    max-width: 200px;
}

/* Barra azul de navegación */
/* Estilos unificados para la barra de navegación */
/* --- NAVBAR BASE --- */
.nav-blue {
    background-color: #004080; /* azul corporativo */
    padding: 0.5rem 1rem;
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-logo {
    color: #fff;
    font-weight: bold;
    font-size: 1.2rem;
    text-decoration: none;
}

/* --- MENU --- */
.nav-menu {
    display: flex;
    list-style: none;
    gap: 1rem;
}

.nav-menu li a {
    color: #fff;
    text-decoration: none;
    font-weight: 500;
    padding: 0.5rem;
    transition: background 0.3s;
}

.nav-menu li a:hover {
    background: rgba(255,255,255,0.2);
    border-radius: 5px;
}

/* --- BOTÓN HAMBURGUESA --- */
.nav-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 1.8rem;
    color: #fff;
    cursor: pointer;
}

.nav-menu a {
    color: white;
    text-decoration: none;
    font-weight: 600;
    font-size: 14px;
    padding: 8px 12px;
    border-radius: 5px;
    transition: background 0.3s;
    white-space: nowrap;
}

.nav-menu a:hover {
    background: rgba(255, 255, 255, 0.2);
}

/* ============ SEARCH PREMIUM ============ */
.search-container {
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 2rem auto;
    position: relative;
    width: 60%;
    max-width: 800px;
}

#searchInput {
    font-size: 1.2rem;
    color: var(--dark-text);
    padding: 1rem 1.5rem;
    border: 2px solid var(--emerald);
    border-radius: 50px;
    width: 100%;
    background-color: rgba(255, 255, 255, 0.9);
    font-weight: 500;
    transition: all 0.3s;
    box-shadow: 0 5px 15px rgba(62, 146, 204, 0.1);
}

#searchInput:focus {
    border-color: var(--gold);
    box-shadow: 0 0 0 3px rgba(212, 175, 55, 0.3);
    outline: none;
}

#searchInput::placeholder {
    color: #A0AEC0;
    font-weight: 500;
}

.search-icon {
    position: absolute;
    right: 1.5rem;
    color: var(--emerald);
    font-size: 1.2rem;
    cursor: pointer;
    transition: all 0.3s;
}

.search-icon:hover {
    color: var(--gold);
    transform: scale(1.1);
}

/* ============ CONTENEDORES RECTANGULARES ============ */
.main-container {
    position: relative;
    min-height: 100vh;
}

.new-rectangle {
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 20px;
    box-shadow: var(--shadow-lg);
    padding: 2rem;
    margin-top: 2rem;
    margin-right: 2rem;
    margin-left: 6rem;
    margin-bottom: 2rem;
    width: 385.1px;
    transition: all 0.3s ease;
    position: absolute;
    z-index: 3;
}

#total-factor-container {
    display: flex;
    justify-content: center; /* Centra horizontalmente */
    align-items: center;     /* Centra verticalmente */
    margin: 1.5rem auto;    /* Espaciado uniforme */
    padding: 1rem;           /* Espacio interno */
    background: rgba(255, 255, 255, 0.9);
    border-radius: 10px;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.08);
    width: 80%;              /* Ancho relativo al contenedor padre */
    max-width: 300px;        /* Ancho máximo */
}

#total-factor-container p {
    margin: 0;              /* Elimina márgenes por defecto */
    font-size: 1.1rem;
    color: var(--deep-blue);
    font-weight: 600;
    text-align: center;     /* Centra el texto */
}

#total-uf-value {
    color: var(--gold);     /* Color destacado para el valor */
    font-weight: 700;
    margin-left: 0.5rem;    /* Espacio entre el texto y el valor */
}

/* ============ MODAL DE ALERTA ============ */
.alert-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
}

.alert-content {
    background: white;
    padding: 2rem;
    border-radius: 15px;
    max-width: 400px;
    text-align: center;
    box-shadow: 0 5px 15px rgba(0,0,0,0.3);
}

.alert-content h3 {
    color: var(--deep-blue);
    margin-bottom: 1rem;
    font-family: 'Playfair Display', serif;
}

.alert-content p {
    color: var(--dark-text);
    margin-bottom: 1.5rem;
}

.alert-close-btn {
    background: linear-gradient(to right, var(--emerald), #2AB7CA);
    color: white;
    border: none;
    padding: 0.8rem 1.8rem;
    border-radius: 50px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    box-shadow: 0 4px 15px rgba(62, 146, 204, 0.3);
}

.alert-close-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(62, 146, 204, 0.4);
}

.left-rectangle {
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 20px;
    box-shadow: var(--shadow-lg);
    padding-top: 2rem;
    padding-right: 2rem;
    padding-left: 2rem;
    padding-bottom: 2rem;
    margin-top: 39.5rem;
    margin-right: 2rem;
    margin-left: 6rem;
    margin-bottom: 2rem;
    width: 385.1px;
    position: absolute;
    z-index: 2;
    top: 154rem;
}

.left-rectangle2 {
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 20px;
    box-shadow: var(--shadow-lg);
    padding: 2rem;
    margin-top: 13rem;
    margin-right: 2rem;
    margin-left: 6rem;
    margin-bottom: 2rem;
    width: 385.1px;
    position: absolute;
    z-index: 2;
    top: 47rem;
}

.new-rectangle .text-container,
.left-rectangle .title-container1,
.left-rectangle2 .title-container1 {
    background: linear-gradient(135deg, var(--deep-blue) 0%, var(--emerald) 100%);
    color: white;
    font-family: 'Playfair Display', serif;
    font-size: 1.5rem;
    text-align: center;
    padding: 1.5rem;
    margin: 0 auto 2rem auto;
    border-radius: 15px;
    box-shadow: var(--shadow-lg);
    text-shadow: 0 2px 5px rgba(0,0,0,0.2);
    position: relative;
    overflow: hidden;
    width: fit-content;
    max-width: 193%;
}

.new-rectangle .text-container h2,
.left-rectangle .title-container1 h2,
.left-rectangle2 .title-container1 h2 {
    margin: 0;
    font-size: inherit;
    font-weight: 700;
}

.new-rectangle .text-container::after,
.left-rectangle .title-container1::after,
.left-rectangle2 .title-container1::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, 
                rgba(255,255,255,0) 0%, 
                rgba(255,255,255,0.2) 50%, 
                rgba(255,255,255,0) 100%);
    transform: translateX(-100%);
    animation: shine 3s infinite;
}

.rectangle {
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    box-shadow: var(--shadow-lg);
    padding: 2.5rem;
    margin: 2rem auto;
    width: 61%;
    max-width: 1269px;
    position: relative;
    margin-left: 34rem;
}

.gray-rectangle {
    background: rgba(248, 249, 250, 0.9);
    border-radius: 20px;
    box-shadow: var(--shadow-lg);
    padding: 2rem;
    margin: 2rem auto;
    width: 100%;
}


.gray-content {
    display: flex;
    flex-wrap: wrap;
    gap: 2rem; /* Espacio entre las columnas */
    justify-content: space-between;
}

/* ============ TEXT CONTAINER PREMIUM ============ */
.text-container {
    background: linear-gradient(135deg, var(--deep-blue) 0%, var(--emerald) 100%);
    color: white;
    font-family: 'Playfair Display', serif;
    font-size: 4rem;
    text-align: center;
    padding: 3rem;
    margin: 2rem auto;
    border-radius: 15px;
    box-shadow: var(--shadow-lg);
    text-shadow: 0 2px 5px rgba(0,0,0,0.2);
    border: none;
}

.text-container h3 {
    font-size: 1.5rem;
    margin-top: 1rem;
    color: rgba(255,255,255,0.9);
    font-weight: 400;
}

/* ============ ESTILOS PARA TÍTULOS DE SECCIÓN ============ */
.section-title {
    background: linear-gradient(135deg, var(--deep-blue) 0%, var(--emerald) 100%);
    color: white;
    font-family: 'Playfair Display', serif;
    font-size: 1.8rem;
    text-align: center;
    padding: 1.2rem 2rem;
    margin: 2rem auto;
    border-radius: 15px;
    box-shadow: var(--shadow-lg);
    text-shadow: 0 2px 5px rgba(0,0,0,0.2);
    border: none;
    width: fit-content;
    max-width: 90%;
    position: relative;
    overflow: hidden;
}

.section-title::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, 
                rgba(255,255,255,0) 0%, 
                rgba(255,255,255,0.2) 50%, 
                rgba(255,255,255,0) 100%);
    transform: translateX(-100%);
    animation: shine 3s infinite;
}

.section-title small {
    font-size: 1rem;
    display: block;
    margin-top: 0.5rem;
    color: rgba(255,255,255,0.8);
    font-weight: 400;
    font-family: 'Montserrat', sans-serif;
}

/* ============ FORMULARIOS PREMIUM ============ */
.input-group {
    margin: 1.5rem auto;
    width: 50%;
}

.edad-label,
.carga-label {
    font-weight: 600;
    color: var(--deep-blue);
    margin-bottom: 0.5rem;
    display: block;
}

input[type="number"],
input[type="text"] {
    width: 100%;
    padding: 0.8rem 1rem;
    border: 2px solid #E2E8F0;
    border-radius: 8px;
    font-size: 1rem;
    transition: all 0.3s;
    background: rgba(255,255,255,0.8);
}

input[type="number"]:focus,
input[type="text"]:focus {
    border-color: var(--emerald);
    box-shadow: 0 0 0 3px rgba(62, 146, 204, 0.2);
    outline: none;
}

/* ============ CHECKBOXES PREMIUM ============ */
.carga-checkbox,
.isapre-checkbox,
.zone-checkbox {
    width: 20px;
    height: 20px;
    border: 2px solid var(--emerald);
    border-radius: 6px;
    appearance: none;
    cursor: pointer;
    transition: all 0.2s;
    position: relative;
    margin-right: 0.5rem;
}

.carga-checkbox:checked,
.isapre-checkbox:checked,
.zone-checkbox:checked {
    background-color: var(--emerald);
    border-color: var(--emerald);
}

.carga-checkbox:checked::after,
.isapre-checkbox:checked::after,
.zone-checkbox:checked::after {
    content: "✓";
    position: absolute;
    color: white;
    font-size: 0.8rem;
    font-weight: bold;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

/* Estilos para el grupo del toggle (checkbox carga) */
.toggle-group {
    display: flex;
    justify-content: center; /* Centra horizontalmente */
    align-items: center;     /* Centra verticalmente */
    margin: 1.5rem auto;     /* Espaciado superior e inferior, centrado horizontal */
    width: 100%;            /* Ocupa todo el ancho disponible */
}

/* Ajustes para la etiqueta del checkbox */
.carga-label {
    margin-left: 0.5rem;    /* Espacio entre el checkbox y la etiqueta */
    color: var(--deep-blue); /* Color consistente con el diseño */
    font-weight: 600;       /* Peso de la fuente */
    cursor: pointer;        /* Cambia el cursor al pasar sobre la etiqueta */
}

/* Opcional: ajustar el tamaño del checkbox si es necesario */
.carga-checkbox {
    width: 20px;
    height: 20px;
}

/* ============ BOTONES PREMIUM ============ */

.download-button,
.contact-button {
    background: linear-gradient(to right, var(--emerald), #2AB7CA);
    color: white;
    border: none;
    padding: 0.8rem 1.8rem;
    border-radius: 50px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    box-shadow: 0 4px 15px rgba(62, 146, 204, 0.3);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    position: relative;
    overflow: hidden;
    margin: 1rem 0;
}

.agregar-beneficiario-btn {
    display: block; /* Cambia a bloque para ocupar todo el ancho disponible */
    width: fit-content; /* Ajusta el ancho al contenido */
    margin: 1.5rem auto; /* Centra horizontalmente con margen automático */
    padding: 0.8rem 2rem; /* Aumenta un poco el padding horizontal */
    background: linear-gradient(to right, var(--emerald), #2AB7CA);
    color: white;
    border: none;
    border-radius: 50px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    box-shadow: 0 4px 15px rgba(62, 146, 204, 0.3);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    position: relative;
    overflow: hidden;
}

.agregar-beneficiario-btn:hover,
.download-button:hover,
.contact-button:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(62, 146, 204, 0.4);
}

.download-button {
    background: linear-gradient(to right, #FF6836, #FF8E53);
}

.contact-button {
    background: linear-gradient(to right, #009A1F, #00BA2C);
}

/* ============ LISTA BENEFICIARIOS ============ */
#beneficiarios-list {
    list-style: none;
    width: 100%;
    max-width: 400px; /* Ajusta según necesites */
    margin: 2rem auto;
    padding: 0;
    display: flex;
    flex-direction: column;
    align-items: center; /* Centra horizontalmente los items */
}

/* Cada item de beneficiario */
#beneficiarios-list li {
    background: rgba(255, 255, 255, 0.9);
    padding: 1rem 1.5rem;
    margin-bottom: 1rem;
    border-radius: 10px;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.08);
    border-left: 4px solid var(--emerald);
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: all 0.3s;
    width: 100%; /* Ocupa todo el ancho disponible del contenedor */
    min-width: 300px; /* Ancho mínimo para evitar que se rompa el diseño */
    max-width: 350px; /* Ancho máximo para mantener la legibilidad */
    box-sizing: border-box;
    white-space: nowrap; /* Evita que el texto se divida en varias líneas */
}
#beneficiarios-list li:hover {
    transform: translateX(5px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

/* Agrega esto en la sección de CSS para PC (fuera de los media queries) */
.beneficiarios-container {
    width: 90% !important;
    max-width: 350px !important;
    margin: 1rem auto !important;
}

.beneficiario-item {
    min-width: 300px !important;
    white-space: nowrap !important;
    padding: 0.8rem 1.5rem !important;
    display: flex !important;
    justify-content: space-between !important;
    align-items: center !important;
}

.delete-button {
    background: linear-gradient(to right, #E53E3E, #F56565);
    color: white;
    border: none;
    width: 25px;
    height: 25px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s;
	margin-left: 1rem !important;
    flex-shrink: 0 !important;
}

.delete-button:hover {
    transform: rotate(90deg) scale(1.1);
}

/* ============ PLANES Y PRECIOS ============ */
.plan-header {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    margin-bottom: 1.5rem;
}

.logo {
    width: 200px;
    height: 80px;
    object-fit: contain;
    margin-bottom: 1rem;
    filter: drop-shadow(0 2px 5px rgba(0,0,0,0.1));
}

.plan-name {
    font-size: 1.5rem;
    color: var(--deep-blue);
    font-weight: 700;
    margin-bottom: 0.5rem;
    font-family: 'Playfair Display', serif;
}

.additional-info {
    font-size: 0.9rem;
    color: #4A5568;
    margin-bottom: 1rem;
}

.plan-price-container {
    background: white;
    border-radius: 12px;
    border: 3px solid var(--gold);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
    padding: 1.5rem;
    text-align: center;
    animation: brillo 2s infinite alternate;
    margin: 2rem auto;
    max-width: 401px;
}

.plan-price {
    font-size: 2rem;
    color: var(--gold);
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.plan-price-uf {
    font-size: 1.2rem;
    color: var(--deep-blue);
    font-weight: 600;
}

.hospital-label,
.ambulatory-label {
     font-size: 1.2rem;
    color: var(--deep-blue);
    font-weight: 600;
    margin: 0 0 1rem 0;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid #EDF2F7;
}

.hospital-info,
.ambulatory-info {
    font-size: 0.95rem;
    color: #4A5568;
    line-height: 1.6;
    margin: 0.5rem 0;
	flex: 1;
    min-width: 250px; /* Ancho mínimo para cada columna */
}

/* ============ NUEVOS ESTILOS PARA LISTAS DE CLÍNICAS ============ */
.hospital-coverage,
.ambulatory-coverage {
    list-style-type: none;
    padding-left: 0;
    margin: 0.5rem 0;
}

.hospital-coverage li,
.ambulatory-coverage li {
    display: block;
    margin-bottom: 0.5rem;
    padding-top: 0rem;
    padding-right: 0;
    padding-left: 0;
    padding-bottom: 0rem;
    white-space: normal;
    word-wrap: break-word;
    line-height: 1.4;
}

.hospital-coverage li:last-child,
.ambulatory-coverage li:last-child {
    margin-bottom: 0;
}


.highlight-clinic {
    color: var(--gold);
    font-weight: 700;
    text-shadow: 0 0 12px rgba(212, 175, 55, 0.6);
    animation: zoomOnce 2s ease-in-out, glow-gold-intense 1.2s infinite alternate;
    display: inline-block;
    position: relative;
    
    padding: 0.2rem 0.5rem;
    border-radius: 4px;
}

@keyframes glow-gold-intense {
    0% { 
        text-shadow: 0 0 8px rgba(212, 175, 55, 0.5),
                     0 0 2px rgba(255, 255, 255, 0.8); /* Reflejo adicional */
    }
    50% {
        text-shadow: 0 0 20px rgba(212, 175, 55, 0.8),
                     0 0 5px rgba(255, 255, 255, 0.9); /* Pico de intensidad */
    }
    100% { 
        text-shadow: 0 0 12px rgba(212, 175, 55, 0.7),
                     0 0 3px rgba(255, 255, 255, 0.85);
    }
}



/* ============ PAGINATION CONTAINER ============ */
#pagination-container {
    display: flex;
    justify-content: center;
    margin: 2rem auto;
    padding: 1rem;
    clear: both;
}

.pagination {
    display: flex;
    align-items: center;
    gap: 0.3rem;
    flex-wrap: wrap;
    justify-content: center;
}

.pagination-ellipsis {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0 0.5rem;
    color: var(--deep-blue);
    user-select: none;
}

.pagination-button {
    padding: 0.5rem 1rem;
    background: linear-gradient(to right, var(--emerald), #2AB7CA);
    color: white;
    border: none;
    border-radius: 50px;
    cursor: pointer;
    transition: all 0.3s;
    font-family: 'Montserrat', sans-serif;
    font-size: 0.9rem;
    min-width: 40px;
    text-align: center;
    box-shadow: 0 4px 15px rgba(62, 146, 204, 0.3);
}

.pagination-button:hover:not(:disabled) {
    background: linear-gradient(to right, var(--deep-blue), var(--emerald));
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(62, 146, 204, 0.4);
}

.pagination-button:disabled {
    background: #cccccc;
    cursor: not-allowed;
    opacity: 0.7;
}

.pagination-button.active {
    background: linear-gradient(to right, var(--gold), #D4AF37);
    font-weight: bold;
    box-shadow: 0 0 15px rgba(212, 175, 55, 0.7);
}

.page-numbers {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    justify-content: center;
}

/* ============ MODAL PREMIUM ============ */
.modal-premium {
    width: 90%;
    max-width: 600px;
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: white;
    border-radius: 20px;
    padding: 0;
    z-index: 1050;
    box-shadow: 0 10px 50px rgba(0, 0, 0, 0.3);
    max-height: 90vh;
    overflow: hidden; /* Cambiado de auto a hidden */
    display: flex;
    flex-direction: column;
}

.modal-content-premium {
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(5px);
    border-radius: 20px;
    width: 100%;
    margin: 0 auto;
    overflow: hidden;
    border: none;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.modal-header-premium {
    background: linear-gradient(135deg, var(--deep-blue) 0%, var(--emerald) 100%);
    color: white;
    font-family: 'Playfair Display', serif;
    font-size: 1.5rem;
    text-align: center;
    padding: 1.5rem;
    border-radius: 20px 20px 0 0;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    text-shadow: 0 2px 5px rgba(0,0,0,0.2);
    position: relative;
    overflow: hidden;
    flex-shrink: 0;
}

.modal-body-premium {
    padding: 2rem;
    color: var(--dark-text);
    line-height: 1.6;
    overflow-y: auto; /* Scroll solo dentro del cuerpo */
    flex-grow: 1;
    max-height: calc(90vh - 150px); /* Ajuste para header y footer */
    scrollbar-width: thin; /* Para Firefox */
    scrollbar-color: var(--emerald) rgba(0,0,0,0.1); /* Para Firefox */
}

/* Personalización de scrollbar para Chrome/Edge/Safari */
.modal-body-premium::-webkit-scrollbar {
    width: 8px;
}

.modal-body-premium::-webkit-scrollbar-track {
    background: rgba(0,0,0,0.05);
    border-radius: 4px;
}

.modal-body-premium::-webkit-scrollbar-thumb {
    background-color: var(--emerald);
    border-radius: 4px;
}

.modal-body-premium::-webkit-scrollbar-thumb:hover {
    background-color: var(--deep-blue);
}

.modal-close-premium {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: white;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    font-size: 1.2rem;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-actions-premium {
    display: flex;
    justify-content: center;
    gap: 1rem;
    padding: 1.5rem;
    background: rgba(248, 249, 250, 0.9);
    border-radius: 0 0 20px 20px;
    flex-shrink: 0;
}

.modal-btn-premium {
    background: linear-gradient(to right, var(--emerald), #2AB7CA);
    color: white;
    border: none;
    padding: 0.8rem 1.8rem;
    border-radius: 50px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    box-shadow: 0 4px 15px rgba(62, 146, 204, 0.3);
    min-width: 150px;
    text-align: center;
}

.modal-btn-premium:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(62, 146, 204, 0.4);
}

.modal-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    z-index: 1040;
    display: none;
}

/* ============ SORT CONTAINER ============ */
.sort-container {
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 1rem auto;
    gap: 0.8rem;
    width: 60%;
    max-width: 800px;
}

.sort-container label {
    font-weight: 600;
    color: var(--deep-blue);
    white-space: nowrap;
}

#sort-select {
    padding: 0.8rem 1rem;
    border: 2px solid var(--emerald);
    border-radius: 8px;
    font-size: 1rem;
    background-color: white;
    color: var(--dark-text);
    cursor: pointer;
    transition: all 0.3s;
    flex-grow: 1;
    max-width: 300px;
}

#sort-select:focus {
    border-color: var(--gold);
    box-shadow: 0 0 0 3px rgba(212, 175, 55, 0.3);
    outline: none;
}



.left-rectangle3 {
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 20px;
    box-shadow: var(--shadow-lg);
    padding: 2rem;
    margin-top: 64rem;
    margin-right: 2rem;
    margin-left: 6rem;
    margin-bottom: 2rem;
    width: 385.1px;
    position: absolute;
    z-index: 2;
}

.left-rectangle3 .title-container1 {
    background: linear-gradient(135deg, var(--deep-blue) 0%, var(--emerald) 100%);
    color: white;
    font-family: 'Playfair Display', serif;
    font-size: 1.5rem;
    text-align: center;
    padding: 1.5rem;
    margin: 0 auto 2rem auto;
    border-radius: 15px;
    box-shadow: var(--shadow-lg);
    text-shadow: 0 2px 5px rgba(0,0,0,0.2);
    position: relative;
    overflow: hidden;
    width: fit-content;
    max-width: 193%;
}

.left-rectangle3 .title-container1 h2 {
    margin: 0;
    font-size: inherit;
    font-weight: 700;
}

.left-rectangle3 .title-container1::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, 
                rgba(255,255,255,0) 0%, 
                rgba(255,255,255,0.2) 50%, 
                rgba(255,255,255,0) 100%);
    transform: translateX(-100%);
    animation: shine 3s infinite;
}

/* Estilos para los filtros de cobertura compactos */
.left-rectangle3 .coverage-filter-group {
    display: flex;
    flex-wrap: wrap;
    justify-content: center; /* Centra horizontalmente los elementos */
    gap: 0.5rem;
    margin-bottom: 1.5rem;
}

.left-rectangle3 .coverage-subtitle {
    width: 100%;
    margin-bottom: 0.5rem;
    color: var(--deep-blue);
    font-size: 1rem;
    font-weight: 600;
}

.left-rectangle3 .coverage-filter-group label {
    display: inline-flex; /* Cambiado a inline-flex para mejor alineación */
    align-items: center;
    justify-content: center; /* Centra el contenido horizontalmente */
    margin: 0;
    padding: 0.4rem 0.8rem; /* Aumentado el padding para mejor proporción */
    background: rgba(248, 249, 250, 0.9);
    border-radius: 6px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    transition: all 0.2s ease;
    cursor: pointer;
    min-width: 60px; /* Ancho mínimo para uniformidad */
    text-align: center; /* Asegura que el texto esté centrado */
    box-sizing: border-box;
}

.left-rectangle3 .coverage-filter-group label:hover {
    background: rgba(232, 240, 254, 0.9);
}

.left-rectangle3 .coverage-checkbox {
    width: 16px;
    height: 16px;
    border: 2px solid var(--emerald);
    border-radius: 4px;
    appearance: none;
    cursor: pointer;
    transition: all 0.2s;
    margin-right: 0.5rem;
    flex-shrink: 0;
}

.left-rectangle3 .coverage-checkbox:checked {
    background-color: var(--emerald);
    border-color: var(--emerald);
    position: relative;
}

.left-rectangle3 .coverage-checkbox:checked::after {
    content: "✓";
    position: absolute;
    color: white;
    font-size: 0.7rem;
    font-weight: bold;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}


/* ============ BOTÓN FLOTANTE WHATSAPP ============ */
.whatsapp-float {
    position: fixed;
    width: 60px;
    height: 60px;
    bottom: 40px;
    right: 40px;
    background-color: #25d366;
    color: #FFF;
    border-radius: 50px;
    text-align: center;
    font-size: 30px;
    box-shadow: 0 4px 15px rgba(37, 211, 102, 0.5);
    z-index: 100;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    animation: pulse 2s infinite;
}

.whatsapp-float:hover {
    background-color: #128C7E;
    transform: scale(1.1);
    box-shadow: 0 6px 20px rgba(37, 211, 102, 0.7);
}

.whatsapp-float img {
    width: 40px;
    height: 40px;
}

@keyframes pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(37, 211, 102, 0.7);
    }
    70% {
        box-shadow: 0 0 0 15px rgba(37, 211, 102, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(37, 211, 102, 0);
    }
}

/* Ajustes para móviles */
@media (max-width: 767px) {
    .whatsapp-float {
        width: 50px;
        height: 50px;
        bottom: 20px;
        right: 20px;
    }
    
    .whatsapp-float img {
        width: 30px;
        height: 30px;
    }
}

/* ============ VERSIÓN PARA TODOS LOS DISPOSITIVOS EXCEPTO PC ============ */
@media (max-width: 1024px) {
    /* Contenedores principales - Aplicamos a TODOS los recuadros */
    .left-rectangle,
    .left-rectangle2,
    .new-rectangle,
    .rectangle,
    .plan-price-container,
    .gray-rectangle {
        width: 95% !important;
        max-width: 900px !important;  /* Más ancho que antes */
        margin: 1.5rem auto !important;
        padding: 2rem !important;
        float: none !important;
        position: static !important;
        box-sizing: border-box !important;
    }
	
	
	 .left-rectangle3 {
        width: 95% !important;
        max-width: 900px !important;
        margin: 1.5rem auto !important;
        padding: 2rem !important;
        position: static !important;
    }
	


    /* Específicamente para .rectangle (el recuadro principal) */
    .rectangle {
        width: 96% !important;
        max-width: 950px !important;  /* Un poco más ancho que los demás */
        padding: 2.5rem !important;
        margin-top: 2rem !important;
        margin-bottom: 2rem !important;
    }

    /* Específicamente para .new-rectangle */
    .new-rectangle {
        width: 96% !important;
        max-width: 950px !important;
        margin-left: auto !important;
        margin-right: auto !important;
    }

    /* Reset de cualquier posición absoluta/flotante que pueda interferir */
    .rectangle,
    .new-rectangle {
        left: auto !important;
        right: auto !important;
        transform: none !important;
    }

    /* Aseguramos que el contenido interno también se expanda */
    .rectangle .input-group,
    .new-rectangle .input-group {
        width: 100% !important;
        max-width: 100% !important;
    }
	
	.search-container {
        position: sticky;
        top: 0;
        z-index: 1000;
        background-color: rgba(255, 255, 255, 0.95);
        padding: 1rem;
        margin: 0 auto;
        width: 100%;
        max-width: 100%;
        
        transition: all 0.3s ease;
    }
    
    .search-container.sticky {
        padding: 0.8rem;
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    }
    
    #searchInput {
        width: calc(100% - 4rem);
        padding: 0.8rem 1.2rem;
        font-size: 1rem;
    }
    
    .search-icon {
    right: 4rem;
    }
    
    /* Ajustar margen superior del contenido para que no quede oculto */
    .new-rectangle {
    margin-top: 1rem !important;
    }
	
	 .modal-premium {
        width: 85%;
        max-width: 500px;
    }
    
    .modal-header-premium {
        font-size: 1.3rem;
        padding: 1.2rem;
    }
    
     .modal-body-premium {
        max-height: calc(90vh - 130px);
        padding: 1.5rem;
    }
    
    .modal-actions-premium {
        margin: 0 1.5rem 1.5rem;
    }
}

/* ============ DISPOSITIVO 820x1180 - DISEÑO TABLET UNIFICADO ============ */
@media (min-width: 820px) and (max-width: 1024px), 
       (min-width: 820px) and (max-width: 1180px) and (orientation: portrait) {
    
    /* CONTENEDORES PRINCIPALES - MISMO ANCHO PARA TODOS */
    .left-rectangle,
    .left-rectangle2,
    .new-rectangle,
    .rectangle,
    .plan-price-container,
    .gray-rectangle {
        width: 94% !important;                    /* Mismo ancho porcentual */
        max-width: 920px !important;              /* Mismo máximo absoluto */
        margin: 1.2rem auto !important;           /* Mismos márgenes */
        padding: 2rem !important;                 /* Mismo padding */
        float: none !important;
        position: static !important;
        box-sizing: border-box !important;
    }
		   
		   
		   .left-rectangle3 {
        width: 94% !important;
        max-width: 920px !important;
        margin: 1.2rem auto !important;
        padding: 2rem !important;
        position: static !important;
    }

    /* AJUSTES ESPECÍFICOS PARA MANTENER JERARQUÍA */
    .rectangle {
        padding: 2.2rem !important;               /* Ligero aumento de padding */
        margin-top: 1.5rem !important;            /* Margen superior ligeramente mayor */
        margin-bottom: 2rem !important;           /* Margen inferior mayor */
    }

    /* ESTRUCTURA DEL LAYOUT */
    .main-container {
        display: flex;
        flex-direction: column;
        gap: 1rem;                               /* Espaciado consistente */
    }

    /* ORDEN DE VISUALIZACIÓN */
    .new-rectangle { order: 1; }
    .left-rectangle { order: 2; }
    .left-rectangle2 { order: 3; }
    .rectangle { order: 4; }

    /* CONTENIDO INTERNO */
    .rectangle .input-group,
    .new-rectangle .input-group,
    .left-rectangle .input-group,
    .left-rectangle2 .input-group {
        width: 100% !important;
        max-width: 100% !important;
        margin: 0.8rem auto !important;          /* Márgenes internos consistentes */
    }
		   
		   .search-container {
        position: sticky;
        top: 0;
        z-index: 1000;
        background-color: rgba(255, 255, 255, 0.95);
        padding: 1rem;
        margin: 0 auto;
        width: 100%;
        max-width: 100%;
        
        transition: all 0.3s ease;
    }
    
    .search-container.sticky {
        padding: 0.8rem;
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    }
    
    #searchInput {
        width: calc(100% - 4rem);
        padding: 0.8rem 1.2rem;
        font-size: 1rem;
    }
    
    .search-icon {
    right: 4rem;
    }
    
    /* Ajustar margen superior del contenido para que no quede oculto */
    .new-rectangle {
    margin-top: 1rem !important;
    }
}


/* ============ TABLETS (768px-1024px) - MÁS EXPANSIÓN ============ */
@media (min-width: 768px) and (max-width: 1024px) {
    .rectangle,
    .new-rectangle {
        max-width: 1000px !important;
        padding: 3rem !important;
    }
	
	 .modal-premium {
        max-width: 80% !important;
        max-height: 80vh !important;
    }
    
    .modal-content-premium {
        max-height: calc(80vh - 2rem) !important;
    }
    
    .modal-actions-premium {
        flex-direction: row !important;
        justify-content: center !important;
    }
    
    .modal-btn-premium {
        width: auto !important;
        min-width: 45% !important;
    }
	
	 /* --- RESPONSIVE --- */

    .nav-toggle {
        display: block;
    }

    .nav-menu {
        position: absolute;
        top: 60px; /* debajo del header */
        left: 0;
        width: 100%;
        flex-direction: column;
        background: #004080;
        display: none;
        padding: 1rem 0;
    }

    .nav-menu.active {
        display: flex;
    }

    .nav-menu li {
        text-align: center;
        margin: 0.5rem 0;
    }
}
	
	

/* ============ MÓVILES (hasta 767px) ============ */
@media (max-width: 767px) {
    .rectangle,
    .new-rectangle {
        width: 98% !important;
        padding: 1.8rem !important;
    }
	
	 .left-rectangle3 {
        width: 98% !important;
        padding: 1.8rem !important;
    }
    
    .left-rectangle3 .coverage-filter-group {
        gap: 0.3rem;
    }
    
     .left-rectangle3 .coverage-filter-group label {
        min-width: 50px; /* Reducido para móviles */
        padding: 0.3rem 0.5rem;
        font-size: 0.85rem;
    }
	
	 .modal-premium {
        width: 95%;
        max-height: 85vh;
    }
    
    .modal-header-premium {
        font-size: 1.2rem;
        padding: 1rem;
        border-radius: 15px 15px 0 0;
    }
    
    .modal-body-premium {
        max-height: calc(85vh - 120px);
        padding: 1.2rem;
    }
    
    .modal-actions-premium {
        padding: 1rem;
        flex-direction: column;
    }
    
    .modal-btn-premium {
        width: 100%;
        padding: 0.7rem;
    }
    
    .modal-close-premium {
        top: 0.5rem;
        right: 0.5rem;
        width: 25px;
        height: 25px;
        font-size: 1rem;
    }
}


/* Pantallas muy pequeñas */
@media (max-width: 480px) {
    .modal-premium {
        width: 98%;
        max-height: 90vh;
    }
    
    .modal-header-premium {
        font-size: 1.1rem;
    }
    
     .modal-body-premium {
        max-height: calc(90vh - 110px);
    }
}

