/* === GENERAL === */
/* Estilos generales para dispositivos móviles y tablets */
@media (max-width: 1024px) {
    header {
        background: linear-gradient(rgba(0, 0, 0, 0.735), rgba(0, 0, 0, 0.735)),
                    url('/Img/PAG_WEB_BASICA/cabecera_cosm_mobile.avif') no-repeat center center / cover;
    }
    
    header h1 {
        font-size: 2.5rem;
    }

    .carousel-item {
        max-width: 250px;
    }

    .card {
        padding: 16px;
    }

    #reseñas {
        padding: 6rem 4rem;
    }

    .subtitulo-reseñas {
        font-size: 28px;
    }

    .mensaje-reseñas {
        font-size: 20px;
    }
}

/* === SMARTPHONES === */
/* Ajustes específicos para pantallas muy pequeñas */
@media (max-width: 480px) {
    #scrollToTopBtn {
        right: 5px; /* Ajustar la posición en pantallas muy pequeñas */
        bottom: 5px;
        padding: 10px 12px; /* Reducir tamaño */
        font-size: 20px; /* Reducir tamaño de la flecha */
    }

    header {
        padding: 3rem 1rem;
    }

    section {
        padding: 2rem 1rem;
        margin-bottom: 2rem;
    }

    h1 {
        font-size: 2rem;
    }

    h2 {
        font-size: 1.5rem;
    }

    .producto-card {
        max-width: 100%;
    }

    .Redes_Sociales {
        gap: 2rem;
        flex-wrap: wrap;
    }

    .Redes_Sociales2 {
        padding: 10px 15px;
    }

    .carousel-item {
        max-width: 200px;
    }

    .btn {
        padding: 8px 16px;
        font-size: 0.9rem;
    }

    #trayectoria .trayectoria-content {
        flex-direction: column;
        gap: 1rem;
    }

    #trayectoria .descripcion {
        width: 90%;
        margin-left: 0;
    }

    #trayectoria .imagen {
        width: 90%;
    }

    #trayectoria .descripcion p {
        font-size: 18px;
    }
}

/* === TABLET & MÓVIL === */
/* Ajustes para pantallas pequeñas y tablets */
@media (max-width: 768px) {
    /* Botón de scroll */
    #scrollToTopBtn {
        right: 10px;
        bottom: 10px;
        padding: 12px 15px;
        font-size: 25px;
    }

    /* Menú hamburguesa */
    .menu-toggle {
        display: block;
        margin-left: auto;
    }

    nav {
        flex-direction: column;
        align-items: flex-start;
    }

    nav .nav-links {
        display: none;
        flex-direction: column;
        width: 100%;
        background-color: black;
        padding: 1rem;
    }

    nav.active .nav-links {
        display: flex;
    }

    .carousel-buttons {
        display: none;
    }

    .servicios-container {
        flex-wrap: wrap;
        justify-content: center;
    }

    #trayectoria {
        background: linear-gradient(rgba(0, 0, 0, 0.75), rgba(0, 0, 0, 0.75)),
                    url('/Img//PAG_WEB_BASICA/Diseno_sin_titulo_mobile.avif') no-repeat center center/cover;
    }

    #trayectoria .trayectoria-content {
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 1.5rem;
        padding: 1rem;
        width: 100%;
    }

    #trayectoria .descripcion {
        width: 90%;
        text-align: center;
        margin: 0 auto;
    }

    #trayectoria .imagen {
        width: 90%;
        margin: 0 auto;
    }

    #trayectoria .descripcion p {
        font-size: 18px;
        line-height: 1.5;
    }

    .chat-bubble {
        bottom: 10px;
        right: 10px;
        width: 40px;
        height: 40px;
        box-shadow: 0 3px 5px rgba(0, 0, 0, 0.2);
    }

    .chat-bubble .chat-icon {
        font-size: 20px;
    }

    .notification {
        position: absolute;
        right: 0px;
        width: 12px;
        height: 19px;
        font-size: 10px;
    }

    .chat-menu {
        bottom: 75px;
        right: 10px;
        width: 70vw;
        max-width: 320px;
        border-radius: 8px;
    }

     .chat-header {
        padding: 6px 8px;
        font-size: 12px;
        line-height: 1.2;
    }

    .chat-header .close-btn {
        font-size: 12px;
        padding: 2px 4px;
    }

    .chat-body {
        padding: 8px;
        font-size: 13px;
    }

    .more-help {
        padding: 8px;
    }

    .more-help .help-btn {
        padding: 8px 16px;
        font-size: 13px;
    }
}

/* === PANTALLAS INTERMEDIAS (TABLETS) === */
/* Ajustes para pantallas entre 768px y 1024px */
@media (min-width: 768px) and (max-width: 1024px) {
    #trayectoria .trayectoria-content {
        display: flex;
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
        gap: 2rem;
        padding: 2rem;
    }

    #trayectoria .descripcion {
        width: 50%;
        text-align: left;
        margin: 0;
    }

    #trayectoria .imagen {
        width: 40%;
        margin: 0;
    }

    #trayectoria .descripcion p {
        font-size: 16px;
        line-height: 1.6;
    }
}

/* === FOOTER === */
/* Ajustes para el pie de página */
footer {
    flex-direction: column;
    text-align: center;
    gap: 1rem;
}

.footer-contacto {
    text-align: center;
    margin-top: 1rem;
}

.footer-social {
    justify-content: center;
}

.ubicacion-contenido {
    flex-direction: column;
    align-items: center;
}

#reseñas {
    padding: 4rem 1.5rem;
}

.subtitulo-reseñas {
    font-size: 24px;
}

.mensaje-reseñas {
    font-size: 18px;
}

.reseñas-wrapper {
    flex-wrap: wrap;
    justify-content: center;
}