/* ========== HOME - LANDING PAGE ========== */
/* Depende de styles.css (variables :root, animaciones globales) */

/* ----- Links ----- */
#leistungen-link {
    color: var(--neon-blue);
}

/* ----- Hero: modificadores específicos de esta página ----- */
.hero-intro.gap-bottom-7 {
    margin-bottom: 7vh;
}

.main-title.contact-title {
    margin: 6vh auto 2vh auto;
}

.anchor-target {
    display: block;
    position: relative;
    top: -30vh; 
    visibility: hidden;
}

/* ----- Features Section ----- */

.feature-card {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    background: rgba(255, 255, 255, 0.35);
    backdrop-filter: blur(1px);
    border-radius: 40px;
    border: 0.0625rem solid rgba(255, 255, 255, 0.35);
    gap: 3rem;
    transition: transform 0.4s cubic-bezier(0.165, 0.84, 0.44, 1), background 0.3s ease, border-color 0.3s ease, box-shadow 0.4s ease;
}

.feature-card.show:hover {
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.20);
    border-color: rgba(255, 255, 255, 0.35);
    background: rgba(255, 255, 255, 0.35);
    transform: translateY(-5px);
    z-index: 2;
}    
    
.feature-card.show {
    opacity: 1;
    transform: perspective(700px) rotateZ(0deg);
    padding: 5vh;
}

.feature-image-container {
    flex: 1; /* Esto garantiza el 50% de ancho para la imagen */
    display: flex;
    justify-content: center;
}

.feature-image-container img {
    width: 100%;
    height: auto;
    aspect-ratio: 12 / 10;
    object-fit: cover;
    border-radius: 1.875rem;
    box-shadow: 0 0.9375rem 1.875rem rgba(0,0,0,0.2);
}

.feature-image {
    width: 100%;
    height: 15.625rem;
    overflow: hidden;
    border-radius: 0.625rem;
    margin-bottom: 1.25rem;
}

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

.feature-content-left, 
.feature-content-right {
    flex: 1; /* Esto garantiza el 50% de ancho para el texto */
    text-align: left;
}
.feature-title {
    font-size: 2.3rem;
    font-weight: 600;
    color: #000;
    margin-bottom: 20px;
    text-transform: uppercase;
    text-align: center;
}

.feature-description {
    font-size: 1.4rem;
    line-height: 1.4;
    color: #333;
    margin-bottom: 3vh;
    text-align: center;
}

.feature-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 1vh;
    margin: 0 auto;
    width: 100%;
    max-width: 500px;
    box-sizing: border-box;
    justify-content: center;
    margin-bottom: 0;
}

.feature-tag {
    background-color: #0000FF;
    color: white;
    padding: 0.5rem 0.75rem;
    border-radius: 3rem;
    font-size: 0.7rem;
    font-weight: 500;
    min-width: 5vh;
    text-align: center;
    box-sizing: border-box;
    transition: background-color 0.2s ease;
}

.feature-tag:hover {
    background-color: #2929ff;
}

/* ----- FAQ Section ----- */
.content-bloq-faq-header {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    margin: 2vh auto 2vh auto;
    max-width: 90%;
    text-align: center;
}

.content-block-questions {
    background: rgba(255, 255, 255, 0.35);
    backdrop-filter: blur(1px);
    -webkit-backdrop-filter: blur(1px);
    width: 95%;
    margin: 2vh auto 8vh auto;
    max-width: min(1600px, 100%);
    padding: 5vh;
    border-radius: 30px;
    border: 1px solid rgba(255, 255, 255, 0.35);
    color: #000;
    box-sizing: border-box;
    animation: blockAppear 0.8s ease-out forwards;
}

.content-bloq-faq {
    width: 100%;
    max-width: 1600px;
    margin: 2vh auto 6vh auto;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.block-faq {
    border-radius: 22px;
    overflow: hidden;
    opacity: 0;
    transform: translateY(20px) scale(0.98);
    animation: faqAppear 0.8s ease-out forwards;
}

@keyframes faqAppear {
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.faq-question {
    width: 100%;
    padding: 16px 25px;
    background: rgba(135, 128, 255, 0.70);
    color: #000000;
    font-size: 1.2rem;
    font-weight: 500;
    text-align: left;
    border: none;
    border-radius: 22px;
    cursor: pointer;
    display: block;
    transition: background 0.3s ease, transform 0.25s ease, box-shadow 0.25s ease;
}

.faq-question:active {
    transform: scale(0.985);
}

.faq-question strong {
    font-weight: 800;
}

.block-faq:hover .faq-question {
    background: rgba(135, 128, 255, 1);
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.25);
}

.block-faq.active .faq-question {
    background: rgba(135, 128, 255, 1);
    border-bottom-left-radius: 0;
    border-bottom-right-radius: 0;
    box-shadow: none;
    transform: none;
}

.faq-answer {
    max-height: 0;
    overflow: hidden;
    background: rgba(135, 128, 255, 0.18);
    color: #000000;
    padding: 0 28px;
    transition: max-height 0.45s ease, padding 0.35s ease, opacity 0.3s ease;
    opacity: 0;
}

.block-faq.active .faq-answer {
    max-height: 500px;
    padding: 22px 28px 25px 28px;
    opacity: 1;
}

.block-faq.active:hover {
    transform: translateY(-2px);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.block-faq.active:hover .faq-question {
    background: rgba(135, 128, 255, 1);
}

.block-faq.active:hover .faq-answer {
    background: rgba(135, 128, 255, 0.32);
}

.faq-answer p {
    margin: 0 0 8px 0;
    font-size: 1.1rem;
    line-height: 1.5;
}

.faq-answer p strong {
    font-weight: 800;
}

/* ----- Responsive Home ----- */

@media (min-width: 768px) {
    .feature-card {
        display: flex;
        align-items: center;
    }

    .feature-image-container,
    .feature-content-left,
    .feature-content-right {
        flex: 1 1 50%;
        min-width: 0;
    }

    .feature-content-left,
    .feature-content-right {
        max-width: 50%;
        display: flex;
        flex-direction: column;
        justify-content: center;
    }

    .feature-image-container {
        width: 50%;
        max-width: 50%;
    }

    .feature-title,
    .feature-description {
        margin-top: 0;
    }

    .feature-content-left > .feature-tags:last-child,
    .feature-content-right > .feature-tags:last-child {
        margin-bottom: 0;
    }
}

@media (min-width: 768px) and (max-width: 1024px) {
    .feature-card,
    .feature-card.show {
        padding: 4vh clamp(1.25rem, 3vw, 2.5rem);
        gap: clamp(1rem, 2.5vw, 2rem);
    }

    .feature-title {
        font-size: 1.4rem;
    }
    
    .feature-description {
        font-size: 1.1rem;
    }
}

@media (max-width: 767px) {
    .feature-title {
        font-size: clamp(1.1rem, 4vw, 2.2rem);
    }

    .feature-card {
        flex-direction: column; /* Cambia a disposición vertical */
        text-align: center; /* Centra el texto por defecto */
        min-height: auto;   /* Permite que la tarjeta crezca según el contenido */
        gap: 0.5rem;    
    }

    .feature-card.show {
        transform: none;
    }

    .feature-card.show:hover {
        transform: translateY(-3px);
    }

    .feature-content-left, .feature-content-right {
        display: contents; /* Deshace el contenedor para que sus hijos participen directamente en el flex de feature-card */
    }

    .feature-title {
        order: 1;
        width: 100%;
        text-align: center;
        margin-bottom: 1rem;
    }

    .feature-description {
        order: 2;
        width: 100%;
        text-align: center;
        margin-bottom: 1rem;
    }

    .feature-image-container {
        order: 3;
        width: 100%;
        justify-content: center;
        min-height: 0; /* Evita colapso del contenedor */
    }

    .feature-image-container img {
        width: 100%;
        height: auto;
        aspect-ratio: auto;
        display: block; /* Garantiza visibilidad */
    }

    .feature-tags {
        order: 4;
        width: 100%;
        justify-content: space-evenly;
        flex-wrap: wrap;
        margin-top: 1rem;
        gap: 10px;
    }

    .feature-tag {
        min-width: 100px;
        font-size: 0.7rem;
    }

   
    .content-block-questions {
        width: 93%;
        max-width: 100%;
        margin: 0 auto 6vh auto;
        padding: 2rem 20px;
        border-radius: 1.25rem;
        box-sizing: border-box;
    }

    .hero-header-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
        text-align: center;
    }

    .hero-header-center {
        justify-content: center;
    }

    .content-bloq-faq-header {
        margin: 0 auto 2vh auto;
    }

    .content-bloq-faq-header .faq-title {
        font-size: clamp(2.2rem, 7vw, 3rem);
        text-align: center;
        width: 100%;
        display: block;
        padding: 0;
        margin: 0 auto 1vh auto;
    }

    .content-bloq-faq {
        margin: 6vh 0 2vh 0;
        padding: 0;
        gap: 15px;
        width: 100%;
        max-width: 100%;
    }

    .faq-question {
        font-size: 1rem;
        padding: 18px 20px;
    }

    .faq-answer {
        padding: 0 20px;
    }

    .block-faq.active .faq-answer {
        padding: 18px 20px 20px 20px;
    }

    .faq-answer p {
        font-size: 0.95rem;
    }

}

@media (max-width: 480px) {

    .feature-tags {
        gap: 8px;
    }

    .feature-tag {
        min-width: 90px;
        font-size: 0.65rem;
    }

}

@media (max-width: 932px) and (orientation: landscape) {
    .global-site-container {
        min-height: 100vh;
        min-height: 100dvh;
        min-height: -webkit-fill-available;
        padding-bottom: max(3vh, env(safe-area-inset-bottom));
    }

    .content-block-questions {
        padding: 2rem 20px;
        border-radius: 1.5rem;
    }

    .content-bloq-faq-header .faq-title {
        font-size: clamp(1.8rem, 4vw, 2.5rem);
        margin: 0 auto 1vh auto;
    }

    .feature-card,
    .feature-card.show {
        width: 95%;
        margin: 0 auto;
        padding: 6vh 5vw;
        gap: min(3rem, 5vw);
        flex-direction: row;
        text-align: left;
        align-items: center;
    }

    .feature-content-left,
    .feature-content-right {
        display: flex;
        flex: 1;
        min-width: 0;
        max-width: none;
        text-align: left;
        flex-direction: column;
        justify-content: center;
    }

    .feature-title {
        order: initial;
        width: auto;
        text-align: center;
        font-size: clamp(1.3rem, 2.2vw, 1.4rem);
        margin: 0 0 0.5rem 0;
    }

    .feature-description {
        order: initial;
        width: auto;
        text-align: center;
        font-size: clamp(1rem, 1.6vw, 1rem);
        line-height: 1.4;
        margin: 0 0 0.45rem 0;
    }

    .feature-image-container {
        order: initial;
        flex: 0 0 40%;
        width: auto;
        max-width: 40%;
        min-height: 0;
        justify-content: center;
    }

    .feature-image-container img {
        width: 100%;
        aspect-ratio: 4 / 3;
        object-fit: cover;
       /* max-height: 40vh;
        max-height: 40dvh;*/
    }

    .feature-tags {
        order: initial;
        flex-direction: row;
        flex-wrap: nowrap;
        justify-content: center;
        align-items: center;
        width: auto;
        max-width: 100%;
        margin: 0.75rem auto 0;
        gap: 0.5rem;
    }

    .feature-tag {
        font-size: 0.6rem;
        padding: 0.3rem 0.55rem;
        min-width: auto;
    }
}

/* ----- CORRECCIÓN PARA PANTALLAS GRANDES ----- */
@media (min-width: 1200px) { 

    /* Eliminamos las restricciones de height que tenías aquí anteriormente */
    .feature-image {
        display: contents; /* Anulamos el contenedor antiguo si existe */
    }
    
    .feature-description {
        font-size: 1.2rem;
    }

    .feature-tag {
        font-size: 0.9rem;
    }

    .content-bloq-faq-header {
        margin: 6vh auto 2vh auto;
    }

}

@media (min-width: 1901px) {
    .feature-title {
        font-size: 2.55rem;
    }

    .feature-description {
        font-size: 1.4rem;
    }

    .faq-question {
        font-size: 1.5rem;
    }

    .faq-answer p {
        font-size: 1.4rem;
    }
}
