.models {
    padding: 80px 0;
    background-image: url('../fondoamarillo.png');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    position: relative;
}

.models::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 1;
}

.models .container {
    position: relative;
    z-index: 2;
}

.models .section-title {
    text-align: center;
    color: var(--light);
}

.models .section-subtitle {
    color: #eee;
    text-align: center;
    max-width: 700px;
    margin: 0 auto 3rem;
}

/* Grid de tarjetas principales */
.models-grid {
    display: flex;
    gap: 2rem;
    justify-content: center;
    flex-wrap: wrap;
}

.model-card {
    flex: 1 1 300px;
    max-width: 350px;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(5px);
    border-radius: 5px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
    transition: transform 0.3s, box-shadow 0.3s;
    border: 1px solid rgba(255,255,255,0.2);
    color: var(--light);
    display: flex;
    flex-direction: column;
}

.model-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 40px rgba(0,0,0,0.5);
    border-color: var(--primary);
}

.model-card-image {
    height: 200px;
    overflow: hidden;
}

.model-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s;
}

.model-card:hover .model-card-image img {
    transform: scale(1.1);
}

.model-card-title {
    font-size: 1.8rem;
    margin: 1rem 1rem 0.5rem;
    color: var(--primary);
}

.model-card-description {
    color: #ccc;
    margin: 0 1rem 1rem;
    line-height: 1.5;
    flex-grow: 1;
}

/* Botón "Ver modelos" */
.model-card-btn {
    margin: 0 1rem 1.5rem;
    width: calc(100% - 2rem);
    background: var(--primary);
    color: #fff;
    border: 2px solid var(--primary);
    border-radius: 5px;
    font-weight: 700;
    padding: 12px 0;
    text-align: center;
    transition: all 0.3s ease;
    cursor: pointer;
    font-size: 1rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.3);
}

.model-card-btn:hover {
    background: var(--primary);
    color: #fff;
    border-color: var(--primary);
    transform: scale(1.02);
}

/* Estilos para el popup (se mantienen igual) */
.popup-tiers {
    display: flex;
    gap: 1.5rem;
    margin-top: 2rem;
    flex-wrap: wrap;
    justify-content: center;
}

.popup-tier {
    flex: 1 1 250px;
    background: rgba(255,255,255,0.05);
    backdrop-filter: blur(5px);
    border-radius: 15px;
    padding: 1.5rem;
    border: 1px solid rgba(255,255,255,0.1);
    transition: transform 0.3s;
}

.popup-tier:hover {
    transform: translateY(-5px);
    border-color: var(--primary);
}

.popup-tier h3 {
    color: var(--primary);
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
    text-align: center;
}

.popup-tier ul {
    list-style: none;
    padding: 0;
}

.popup-tier li {
    color: #ccc;
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.popup-tier li::before {
    content: '✓';
    color: var(--primary);
    font-weight: bold;
}

@media (max-width: 768px) {
    .models-grid {
        flex-direction: column;
        align-items: center;
    }

    .model-card {
        width: 100%;
        max-width: 400px;
    }

    /* Altura reducida para mejor visualización en móvil */
    .model-card-image {
        height: 250px; /* antes 650px, ahora más proporcionado */
    }

    .model-card-image img {
        object-fit: cover;
        width: 100%;
        height: 100%;
    }

    .model-card-btn {
        font-size: 1.1rem;
        padding: 14px 0;
    }

    .popup-tiers {
        flex-direction: column;
        align-items: center;
    }

    .popup-tier {
        width: 100%;
        max-width: 350px;
    }
    .model-card-title {
        text-align: center;
    }
}