/* Plan Detail Page */
.plan-detail {
    padding: 60px 0;
    background-color: #f9fafb;
}

.detail-content {
    display: flex;
    gap: 40px;
    align-items: flex-start;
    background: white;
    padding: 40px;
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(22, 57, 111, 0.1); /* #16396f con opacidad */
    max-width: 1200px;
    margin: 0 auto;
}

.detail-image {
    flex: 0 0 400px;
}

.detail-image img {
    width: 100%;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(22, 57, 111, 0.1);
}

.detail-info {
    flex: 1;
}

.flag-and-name {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 25px;
}

.flag-and-name img {
    width: 60px;
    height: 60px;
    border-radius: 3px;
}

.flag-and-name h1 {
    font-size: 2rem;
    margin: 0;
    color: #16396f; /* Texto oscuro alineado con marca */
}

.plan-stats {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
    margin-bottom: 30px;
}

.stat {
    display: flex;
    flex-direction: column;
}

.stat span {
    color: #16396f;
    opacity: 0.8;
    font-size: 14px;
}

.stat strong {
    font-size: 18px;
    color: #334DD9;
}

.price {
    color: #334DD9;
    font-size: 24px;
}

.buy-button {
    margin-bottom: 25px;
}

#buy-now-btn {
    background: #334DD9;
    color: white;
    border: none;
    padding: 14px 28px;
    border-radius: 30px;
    font-size: 18px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
}

#buy-now-btn:hover {
    background: #27307f; /* Azul más profundo */
}

.plan-description {
    color: #16396f;
    opacity: 0.9;
    line-height: 1.6;
}

.plan-description p {
    margin: 0;
}

/* NUEVO: Payment Methods Section */
.payment-methods-section {
    padding: 40px 0;
    background-color: #ffffff;
    border-top: 1px solid #e0e6f0;
    border-bottom: 1px solid #e0e6f0;
}

.payment-methods-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    max-width: 1200px;
    margin: 0 auto;
    gap: 30px;
    flex-wrap: wrap;
}

.secure-payment-badge {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1.2rem;
    font-weight: 600;
    color: #16396f;
    padding: 10px 20px;
    background: #eef6ff; /* Fondo muy claro del azul principal */
    border-radius: 30px;
    border: 1px solid #334DD9;
}

.secure-payment-badge img {
    width: 18px;
    height: 18px;
}

.payment-icons {
    display: flex;
    gap: 20px;
    align-items: center;
    flex-wrap: wrap;
}

.payment-icons .payment-logo {
    height: 30px;
    max-height: 30px;
    opacity: 0.85;
}

/* NUEVO: How It Works Section (3 Steps) */
.how-it-works-section {
    padding: 60px 0;
    background-color: #f9fafb;
    text-align: center;
}

.how-it-works-section h2 {
    font-size: 2rem;
    margin-bottom: 40px;
    color: #16396f;
}

.steps-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
    max-width: 1200px;
    margin: 0 auto;
}

.step-card {
    background: white;
    padding: 35px;
    border-radius: 20px;
    box-shadow: 0 8px 25px rgba(22, 57, 111, 0.08);
    text-align: center;
    position: relative;
    border-top: 5px solid transparent;
    transition: all 0.3s ease;
}

.step-card:nth-child(1) {
    border-top-color: #334DD9;
}

.step-card:nth-child(2) {
    border-top-color: #1e8099;
}

.step-card:nth-child(3) {
    border-top-color: #74fbd2;
}

.step-card:hover {
    transform: translateY(-5px) scale(1.02);
    box-shadow: 0 12px 30px rgba(22, 57, 111, 0.12);
}

.step-number {
    position: absolute;
    top: 15px;
    left: 25px;
    font-size: 1.2rem;
    font-weight: 700;
    color: #16396f;
    opacity: 0.6;
}

.step-icon {
    width: 60px;
    height: 60px;
    margin-bottom: 15px;
}

.step-card h3 {
    font-size: 1.4rem;
    margin-bottom: 10px;
    color: #16396f;
}

.step-card p {
    color: #16396f;
    opacity: 0.85;
    margin-bottom: 20px;
    font-size: 0.95rem;
}

.check-compatibility {
    color: #334DD9;
    text-decoration: none;
    font-weight: 600;
    display: inline-block;
    margin-top: 10px;
}

#know-methods-btn {
    background: #16396f;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 30px;
    cursor: pointer;
    font-weight: 600;
    transition: background 0.2s;
}

#know-methods-btn:hover {
    background: #27307f;
}

/* NUEVO: Support Section */
.support-section {
    padding: 60px 0;
    background-color: #eef6ff; /* Azul muy pálido */
    text-align: center;
}

.support-content {
    display: flex;
    align-items: center;
    gap: 50px;
    max-width: 1000px;
    margin: 0 auto;
    background: white;
    padding: 40px;
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(22, 57, 111, 0.08);
}

.support-text {
    flex: 1;
    text-align: left;
}

.support-text h2 {
    font-size: 2rem;
    margin-bottom: 15px;
    color: #16396f;
}

.support-text p {
    color: #16396f;
    opacity: 0.9;
    margin-bottom: 25px;
    line-height: 1.6;
}

#letstalk-btn {
    background: #334DD9;
    color: white;
    border: none;
    padding: 12px 25px;
    border-radius: 30px;
    cursor: pointer;
    font-weight: 600;
    font-size: 1rem;
    transition: background 0.2s;
}

#letstalk-btn:hover {
    background: #27307f;
}

.support-image {
    flex: 0 0 300px;
}

.support-image img {
    width: 100%;
    height: auto;
}

/* --- NUEVOS ESTILOS PARA LA SECCIÓN DE PAGO --- */

.terms-and-conditions {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 25px;
    font-size: 0.9rem;
    color: #16396f;
    opacity: 0.9;
}

.terms-and-conditions input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
}

.terms-and-conditions a {
    color: #334DD9;
    text-decoration: underline;
}

/* Estilo para el botón de compra deshabilitado */
#buy-now-btn:disabled {
    background: #cccccc !important;
    cursor: not-allowed !important;
}

#buy-now-btn:disabled:hover {
    background: #cccccc !important;
}

.email-section {
    margin-bottom: 15px;
}

.email-section label {
    display: block;
    margin-bottom: 5px;
    font-weight: 500;
    color: #16396f;
}

.custom-input-wrapper {
    display: flex;
    align-items: center;
    background-color: #ffffff;
    border-radius: 30px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
    padding: 0 20px;
    border: 1px solid #d0d9e6;
    transition: box-shadow 0.2s ease-in-out;
}

.custom-input-wrapper:focus-within {
    box-shadow: 0 0 0 3px rgba(51, 77, 217, 0.3); /* #334DD9 con opacidad */
    border-color: #334DD9;
}

#email-input {
    border: none;
    outline: none;
    flex-grow: 1;
    padding: 10px 0;
    font-size: 15px;
    color: #16396f;
    background-color: transparent;
}

#email-input::placeholder {
    color: #9ca3af;
}

.promo-code-section {
    margin-bottom: 15px;
}

.promo-code-section label {
    display: block;
    margin-bottom: 5px;
    font-weight: 500;
    color: #16396f;
}

.promo-input-group-wrapper {
    display: flex;
    align-items: center;
    background-color: #ffffff;
    border-radius: 30px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
    border: 1px solid #d0d9e6;
    transition: box-shadow 0.2s ease-in-out;
    overflow: hidden;
}

#promo-code-input {
    flex-grow: 1;
    border: none;
    outline: none;
    padding: 10px 20px;
    font-size: 15px;
    color: #16396f;
    background-color: transparent;
}

#promo-code-input::placeholder {
    color: #9ca3af;
}

#validate-promo-btn {
    background-color: #2793D0; /* Azul brillante de marca */
    color: white;
    border: none;
    border-radius: 30px;
    padding: 10px 20px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    margin-left: -5px;
    transition: background-color 0.2s ease-in-out;
    white-space: nowrap;
}

#validate-promo-btn:hover {
    background-color: #1e8099; /* Verde-azul como hover coherente */
}

#validate-promo-btn:disabled {
    background-color: #a0c4e8;
    cursor: not-allowed;
}

.promo-input-group-wrapper:focus-within {
    box-shadow: 0 0 0 3px rgba(51, 77, 217, 0.3);
    border-color: #334DD9;
}

.promo-message {
    margin-top: 5px;
    font-size: 0.875rem;
    color: #c00;
}

/* El modal en sí (fondo oscuro semi-transparente) */
.modal {
    display: none; /* Oculto por defecto, JS lo cambia a 'flex' */
    position: fixed;
    z-index: 1000; /* Asegura que esté por encima de casi todo */
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.6); /* Fondo oscuro */
    align-items: center;
    justify-content: center;
}

/* Contenido del modal (la caja blanca) */
.modal-content {
    background-color: #fff;
    margin: auto;
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
    width: 90%; /* Ancho por defecto */
    max-width: 550px; /* Ancho máximo */
    max-height: 80vh; /* Altura máxima para permitir scroll */
    display: flex;
    flex-direction: column;
}

/* Encabezado del modal */
.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 1px solid #eee;
}

.modal-header h3 {
    margin: 0;
    font-size: 1.4rem;
    color: #333;
}

/* Botón de cerrar */
.close-button {
    color: #aaa;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    line-height: 1; /* Ayuda a centrar el 'x' */
}

.close-button:hover,
.close-button:focus {
    color: #333;
    text-decoration: none;
}

/* Envoltorio de la barra de búsqueda */
.search-bar-wrapper {
    position: relative;
    margin-bottom: 15px;
}

.search-bar-wrapper input[type="text"] {
    width: 100%;
    padding: 10px 35px 10px 15px; /* Espacio a la derecha para el icono */
    border: 1px solid #ccc;
    border-radius: 8px;
    box-sizing: border-box;
    font-size: 1rem;
}

.search-bar-wrapper .search-icon {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    width: 20px;
    height: 20px;
    opacity: 0.6;
}

/* Lista de países */
.countries-list-scroll {
    list-style: none;
    padding: 0;
    margin: 0;
    overflow-y: auto; /* Scrollable list */
    flex-grow: 1; /* Ocupa el espacio restante */
}

.countries-list-scroll li {
    padding: 10px 15px;
    border-bottom: 1px solid #f1f1f1;
    cursor: default; /* Para indicar que es solo lista */
    color: #555;
}

.countries-list-scroll li:last-child {
    border-bottom: none;
}

.countries-list-scroll li:hover {
    background-color: #f9f9f9;
}

/* Estilo para el botón de "Show Countries" */
.btn-secondary-outline {
    background-color: white;
    color: #007bff; /* Un color de enlace/botón primario */
    border: 1px solid #007bff;
    padding: 5px 10px;
    border-radius: 5px;
    cursor: pointer;
    font-size: 0.9em;
    transition: background-color 0.2s;
}

.btn-secondary-outline:hover:not(:disabled) {
    background-color: #e7f3ff;
}

.btn-secondary-outline:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.message_buy_mxn {
    border-radius: 15px; 
    border: 2px dashed #007bff; 
    padding: 10px;
    text-align: center;
}

.message_buy_mxn_text1{
    color: #007bff;
    font-weight: bolder;
}

.message_buy_mxn_text2{
    color: #007bff;
}

/* Responsive para móvil */
@media (max-width: 768px) {
    .detail-content {
        flex-direction: column;
        text-align: center;
    }

    .flag-and-name {
        justify-content: center;
    }

    .plan-stats {
        grid-template-columns: 1fr;
    }

    .payment-methods-content {
        justify-content: center;
        gap: 20px;
    }

    .secure-payment-badge {
        font-size: 1rem;
        padding: 8px 15px;
    }

    .payment-icons {
        justify-content: center;
    }

    .steps-grid {
        gap: 20px;
    }

    .step-card {
        padding: 30px 20px;
    }

    .step-number {
        font-size: 1rem;
        top: 10px;
        left: 15px;
    }

    .step-card h3 {
        font-size: 1.2rem;
    }

    .support-content {
        flex-direction: column;
        text-align: center;
        gap: 30px;
        padding: 30px;
    }

    .support-text {
        text-align: center;
    }

    .support-image {
        max-width: 250px;
    }

    .promo-code-group {
        flex-direction: column;
        gap: 8px;
    }

    #validate-promo-btn {
        width: 100%;
    }

    .message_buy_mxn_text1{
        font-size: 12px;
    }
    
    .message_buy_mxn_text2{
        font-size: 12px;
    }
}

/* ===== RESPONSIVE BREAKPOINTS (5" a 12") ===== */

/* 5" (móvil pequeño: ≤ 480px) */
@media (max-width: 480px) {
    .detail-content {
        padding: 25px;
        flex-direction: column;
        gap: 25px;
    }

    .flag-and-name h1 {
        font-size: 1.6rem;
    }

    .step-card {
        padding: 25px 15px;
    }

    .step-card h3 {
        font-size: 1.2rem;
    }

    .support-content {
        padding: 25px;
        gap: 20px;
    }

    .support-image {
        max-width: 200px;
    }

    #buy-now-btn {
        padding: 12px 24px;
        font-size: 16px;
    }

    .custom-input-wrapper,
    .promo-input-group-wrapper {
        border-radius: 24px;
        padding: 0 15px;
    }

    #email-input,
    #promo-code-input {
        padding: 8px 0;
        font-size: 14px;
    }

    #validate-promo-btn {
        padding: 8px 16px;
        font-size: 13px;
    }
}

/* 6" (móvil estándar: ≤ 540px) */
@media (min-width: 481px) and (max-width: 540px) {
    .detail-content {
        padding: 30px;
    }

    .flag-and-name h1 {
        font-size: 1.8rem;
    }

    .support-content {
        padding: 30px;
    }

    .step-card {
        padding: 30px 20px;
    }
}

/* 7" (tablet pequeña: ≤ 768px) */
@media (min-width: 541px) and (max-width: 768px) {
    .detail-content {
        padding: 35px;
        gap: 30px;
    }

    .plan-stats {
        grid-template-columns: 1fr;
    }

    .payment-methods-content {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }

    .secure-payment-badge {
        justify-content: center;
    }

    .steps-grid {
        gap: 25px;
    }

    .support-content {
        flex-direction: column;
        text-align: center;
        gap: 30px;
        padding: 35px;
    }

    .support-text {
        text-align: center;
    }

    .support-image {
        max-width: 280px;
    }

    .promo-code-section {
        width: 100%;
    }

    .promo-input-group-wrapper {
        flex-direction: column;
        align-items: stretch;
        border-radius: 24px;
        padding: 0;
    }

    #promo-code-input {
        padding: 12px 20px;
        border-radius: 24px 24px 0 0;
    }

    #validate-promo-btn {
        border-radius: 0 0 24px 24px;
        margin-left: 0;
        padding: 12px;
        width: 100%;
    }
}

/* 10" (tablet media: ≤ 834px) */
@media (min-width: 769px) and (max-width: 834px) {
    .detail-content {
        padding: 35px;
    }

    .steps-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .support-content {
        gap: 40px;
        padding: 40px;
    }

    .support-image {
        flex: 0 0 320px;
    }
}

/* 11" (tablet grande: ≤ 1024px) */
@media (min-width: 835px) and (max-width: 1024px) {
    .detail-content {
        padding: 38px;
        gap: 35px;
    }

    .steps-grid {
        grid-template-columns: repeat(3, 1fr);
    }

    .payment-methods-content {
        padding: 0 20px;
    }

    .support-content {
        padding: 40px;
        max-width: 960px;
    }
}

/* 12" (iPad Pro 12.9": ≤ 1112px) */
@media (min-width: 1025px) and (max-width: 1112px) {
    .detail-content {
        max-width: 1080px;
        padding: 40px;
    }

    .payment-methods-content {
        max-width: 1080px;
    }

    .steps-grid {
        max-width: 1080px;
    }

    .support-content {
        max-width: 980px;
    }
}

/* >12" → usa el estilo base (escritorio) */