/* ============================================
   PACKAGES SECTION - CON FONDO VERDE #2FA39A (COMPACTO)
   ============================================ */

/* PACKAGES SECTION - FONDO VERDE */
.packages {
    background: #2FA39A;
    position: relative;
    overflow: hidden;
    padding: clamp(4rem, 8vw, 7rem) 0;
    color: white;
}

/* Efecto de gradiente sutil */
.packages::before {
    content: '';
    position: absolute;
    inset: 0;
    background: 
        radial-gradient(circle at 10% 20%, rgba(184, 251, 60, 0.1) 0%, transparent 40%),
        radial-gradient(circle at 90% 80%, rgba(255, 255, 255, 0.08) 0%, transparent 40%);
    pointer-events: none;
    z-index: 0;
}

/* Línea decorativa superior */
.packages::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, 
        transparent, 
        #C8FF5E, 
        #2FA39A, 
        #C8FF5E, 
        transparent);
    z-index: 1;
}

/* CONTENEDOR PRINCIPAL */
.packages .container {
    position: relative;
    z-index: 2;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* TÍTULO DE SECCIÓN - MÁS COMPACTO */
.section-title {
    text-align: center;
    margin-bottom: clamp(2.5rem, 5vw, 4rem);
    position: relative;
    z-index: 1;
}

.section-title h2 {
    font-size: clamp(2rem, 4vw, 2.8rem);
    color: #ffffff;
    margin-bottom: 0.8rem;
    font-weight: 700;
    position: relative;
    display: inline-block;
    font-family: 'Montserrat', sans-serif;
}

.section-title h2::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 3px;
    background: linear-gradient(90deg, 
        transparent, 
        #C8FF5E, 
        #03045E, 
        #C8FF5E, 
        transparent);
    border-radius: 2px;
}

.section-title p {
    font-size: clamp(1rem, 1.5vw, 1.2rem);
    color: rgba(255, 255, 255, 0.9);
    max-width: 600px;
    margin: 1.5rem auto 0;
    line-height: 1.6;
    font-weight: 400;
    font-family: 'Montserrat', sans-serif;
    padding: 0 15px;
}

/* PACKAGE WRAPPER - MÁS COMPACTO */
.package {
    display: flex;
    align-items: stretch;
    margin-bottom: clamp(2.5rem, 5vw, 4rem);
    gap: clamp(1.5rem, 3vw, 2.5rem);
    position: relative;
    z-index: 1;
    border-radius: 18px;
    overflow: hidden;
    background: rgba(255, 255, 255, 0.06);
    transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
    border: 1px solid rgba(184, 251, 60, 0.15);
    padding: 1.5rem;
    backdrop-filter: blur(8px);
    max-height: 450px; /* Limitar altura máxima */
}

.package:last-child {
    margin-bottom: 0;
}

/* Efecto hover más sutil */
.package:hover {
    transform: translateY(-8px);
    box-shadow: 
        0 20px 40px rgba(0, 0, 0, 0.25),
        0 0 0 1px rgba(184, 251, 60, 0.25),
        0 0 30px rgba(184, 251, 60, 0.15);
    background: rgba(255, 255, 255, 0.09);
}

/* Alternar dirección de las tarjetas */
.package:nth-child(even) {
    flex-direction: row-reverse;
}

/* PACKAGE TEXT - MÁS COMPACTO */
.package-text {
    flex: 1.2; /* Un poco más de espacio para el texto */
    background: #03045E !important;
    padding: clamp(1.8rem, 3vw, 2.5rem);
    border-radius: 15px;
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    justify-content: flex-start; /* Cambiado de space-between para mejor control */
    min-height: 380px; /* Reducido de 550px */
    max-height: 400px; /* Limitar altura máxima */
    border: 1px solid rgba(184, 251, 60, 0.25);
    box-shadow: 
        0 15px 30px rgba(0, 0, 0, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.08);
    transition: all 0.3s ease;
    overflow-y: auto; /* Scroll si el contenido es muy largo */
    scrollbar-width: thin;
    scrollbar-color: #C8FF5E #03045E;
}

/* Estilos para scrollbar */
.package-text::-webkit-scrollbar {
    width: 6px;
}

.package-text::-webkit-scrollbar-track {
    background: rgba(184, 251, 60, 0.1);
    border-radius: 3px;
}

.package-text::-webkit-scrollbar-thumb {
    background: #C8FF5E;
    border-radius: 3px;
}

/* Patrón de fondo sutil */
.package-text::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        radial-gradient(circle at 15% 20%, rgba(184, 251, 60, 0.06) 0%, transparent 50%);
    opacity: 0.3;
    z-index: 0;
}

.package-text:hover {
    transform: translateY(-5px);
    box-shadow: 
        0 18px 35px rgba(0, 0, 0, 0.25),
        0 0 0 2px rgba(184, 251, 60, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

/* CONTENEDOR INTERNO PARA MEJOR CONTROL */
.package-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    height: 100%;
    min-height: 350px;
}

/* TÍTULO DEL PAQUETE - MÁS COMPACTO */
.package-text h3 {
    font-size: clamp(1.5rem, 2.5vw, 2rem);
    color: #ffffff;
    margin-bottom: 1rem;
    line-height: 1.3;
    position: relative;
    z-index: 1;
    font-weight: 700;
    font-family: 'Playfair Display', serif;
    flex-shrink: 0; /* Evita que el título se reduzca */
}

.package-text h3::after {
    content: '';
    position: absolute;
    bottom: -0.5rem;
    left: 0;
    width: 40px;
    height: 3px;
    background: linear-gradient(90deg, #C8FF5E, transparent);
    border-radius: 2px;
    transition: width 0.3s ease;
}

.package-text:hover h3::after {
    width: 60px;
}

/* DESCRIPCIÓN - MÁS COMPACTA */
.package-text > p {
    color: rgba(255, 255, 255, 0.85);
    margin-bottom: 1.5rem;
    line-height: 1.6;
    font-size: clamp(0.9rem, 1.1vw, 1rem);
    position: relative;
    z-index: 1;
    font-family: 'Montserrat', sans-serif;
    font-weight: 400;
    flex-shrink: 0;
    max-height: 80px; /* Limitar altura de la descripción */
    overflow: hidden;
}

/* LISTA DE CARACTERÍSTICAS - MÁS COMPACTA */
.package-features {
    list-style: none;
    margin: 1.2rem 0;
    position: relative;
    z-index: 1;
    flex: 1;
    min-height: 140px;
    max-height: 160px;
    overflow-y: auto;
    padding-right: 5px;
    scrollbar-width: thin;
    scrollbar-color: #C8FF5E transparent;
}

.package-features::-webkit-scrollbar {
    width: 4px;
}

.package-features::-webkit-scrollbar-track {
    background: transparent;
}

.package-features::-webkit-scrollbar-thumb {
    background: #C8FF5E;
    border-radius: 2px;
}

.package-features li {
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 0.6rem;
    padding: 0.6rem 0.8rem;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.08);
    display: flex;
    align-items: center;
    transition: all 0.3s ease;
    font-size: clamp(0.85rem, 1vw, 0.95rem);
    font-family: 'Montserrat', sans-serif;
    font-weight: 400;
}

.package-features li:hover {
    background: rgba(184, 251, 60, 0.15);
    border-color: rgba(184, 251, 60, 0.4);
    transform: translateX(4px);
}

.package-features li i {
    color: #C8FF5E;
    margin-right: 0.8rem;
    font-size: 0.9rem;
    background: rgba(184, 251, 60, 0.15);
    padding: 0.5rem;
    border-radius: 50%;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    flex-shrink: 0;
}

.package-features li:hover i {
    transform: scale(1.1);
    background: rgba(184, 251, 60, 0.25);
}

/* PRECIO - MÁS COMPACTO */
.package-price {
    font-size: clamp(1.8rem, 2.5vw, 2.2rem);
    color: #C8FF5E;
    margin: 1.2rem 0 1rem 0;
    font-weight: 700;
    position: relative;
    z-index: 1;
    padding: 0.8rem 1.2rem;
    background: rgba(184, 251, 60, 0.1);
    border-radius: 10px;
    border: 1px solid rgba(184, 251, 60, 0.25);
    display: inline-block;
    font-family: 'Montserrat', sans-serif;
    flex-shrink: 0; /* Evita que el precio se reduzca */
}

/* BOTÓN - MÁS COMPACTO */
.package-text .btn {
    background: linear-gradient(135deg, #C8FF5E, #a0e22a);
    color: #03045E;
    border: none;
    padding: 0.9rem 2rem;
    font-weight: 700;
    font-size: 0.95rem;
    border-radius: 40px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.6rem;
    position: relative;
    z-index: 1;
    margin-top: 0.5rem;
    width: fit-content;
    box-shadow: 0 6px 15px rgba(184, 251, 60, 0.3);
    font-family: 'Montserrat', sans-serif;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    flex-shrink: 0; /* Evita que el botón se reduzca */
}

.package-text .btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 20px rgba(184, 251, 60, 0.4);
    background: linear-gradient(135deg, #d9ff8a, #b8fb3c);
}

.package-text .btn i {
    font-size: 1rem;
    transition: transform 0.3s ease;
}

.package-text .btn:hover i {
    transform: translateX(5px);
}

/* IMAGEN DEL PAQUETE - MÁS COMPACTA */
.package-image {
    flex: 1;
    border-radius: 15px;
    overflow: hidden;
    position: relative;
    min-height: 380px;
    max-height: 400px;
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.2);
    border: 1px solid rgba(184, 251, 60, 0.2);
    transition: all 0.4s ease;
}

.package-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* Efecto overlay sutil */
.package-image::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(
        to bottom,
        transparent 40%,
        rgba(3, 4, 94, 0.3) 100%
    );
    opacity: 0.5;
    transition: opacity 0.4s ease;
    z-index: 1;
}

.package:hover .package-image {
    transform: translateY(-6px);
    box-shadow: 0 20px 35px rgba(0, 0, 0, 0.25);
}

.package:hover .package-image::before {
    opacity: 0.6;
}

.package:hover .package-image img {
    transform: scale(1.08);
}

/* RESPONSIVE DESIGN OPTIMIZADO */
@media (max-width: 1200px) {
    .package {
        max-height: 420px;
    }
    
    .package-text {
        min-height: 360px;
        max-height: 380px;
    }
    
    .package-image {
        min-height: 360px;
        max-height: 380px;
    }
}

@media (max-width: 992px) {
    .package,
    .package:nth-child(even) {
        flex-direction: column;
        gap: 2rem;
        padding: 1.2rem;
        margin-bottom: clamp(2.5rem, 5vw, 3.5rem);
        max-height: none; /* Eliminar límite de altura en móvil */
    }

    .package-text {
        min-height: auto;
        max-height: none;
        padding: 2rem;
        order: 2;
        flex: none;
        width: 100%;
    }

    .package-image {
        min-height: 320px;
        max-height: none;
        order: 1;
        flex: none;
        width: 100%;
    }

    .package-text .btn {
        width: 100%;
        text-align: center;
        justify-content: center;
    }
    
    .package-features {
        max-height: 180px; /* Un poco más alto en móvil */
        min-height: 150px;
    }
}

@media (max-width: 768px) {
    .packages {
        padding: clamp(2.5rem, 5vw, 4rem) 0;
    }

    .package {
        margin-bottom: clamp(2rem, 4vw, 3rem);
        padding: 1rem;
    }

    .package-text {
        padding: 1.5rem;
    }

    .package-text h3 {
        font-size: 1.4rem;
    }

    .package-price {
        font-size: 1.8rem;
        padding: 0.7rem 1rem;
    }

    .package-image {
        min-height: 280px;
    }
}

@media (max-width: 576px) {
    .packages {
        padding: 2.5rem 0;
    }

    .section-title {
        margin-bottom: 2rem;
    }

    .section-title h2 {
        font-size: 1.7rem;
    }

    .section-title h2::after {
        width: 60px;
        height: 2px;
        bottom: -8px;
    }

    .section-title p {
        font-size: 1rem;
        margin-top: 1rem;
    }

    .package {
        margin-bottom: 2.5rem;
    }

    .package-text {
        padding: 1.3rem;
    }

    .package-text h3 {
        font-size: 1.3rem;
    }

    .package-text > p {
        font-size: 0.9rem;
        max-height: 70px;
    }

    .package-features li {
        font-size: 0.85rem;
        padding: 0.5rem 0.7rem;
        margin-bottom: 0.5rem;
    }

    .package-features li i {
        width: 26px;
        height: 26px;
        font-size: 0.85rem;
        padding: 0.4rem;
        margin-right: 0.6rem;
    }

    .package-price {
        font-size: 1.5rem;
        margin: 1rem 0 0.8rem 0;
        padding: 0.6rem 0.9rem;
    }

    .package-text .btn {
        padding: 0.8rem 1.5rem;
        font-size: 0.9rem;
    }

    .package-image {
        min-height: 240px;
    }
}

/* ANIMACIONES SUTILES */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.package {
    animation: fadeInUp 0.6s ease-out forwards;
    opacity: 0;
}

.package:nth-child(1) {
    animation-delay: 0.1s;
}

.package:nth-child(2) {
    animation-delay: 0.2s;
}

.package:nth-child(3) {
    animation-delay: 0.3s;
}

/* EFECTO FLOTANTE MÁS SUTIL */
@keyframes float {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-6px);
    }
}

.package:hover {
    animation: float 3s ease-in-out infinite;
}