/* ===================================
   BeX Studio - Custom Styles
   =================================== */

/* Variables CSS para colores principales */
:root {
    --bex-coral: #E74E4E;
    --bex-dark: #2C3E50;
    --bex-gray: #F8F9FA;
    --bex-text-dark: #333333;
    --bex-text-light: #666666;
}

/* Prevención de scroll horizontal en toda la página */
html {
    scroll-behavior: smooth!important;
}

html, body {
    width: 100%;
    font-family: 'Inter', system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
}

@media (max-width: 991.98px) {
    html {
        overflow-x: hidden !important;
    }
    body {
        overflow-x: clip !important; /* más moderno y no interfiere con el scroll */
        overflow-y: auto !important; /* asegura desplazamiento vertical */
    }
}

/* ===================================
   Navigation Styles
   =================================== */

/* Navbar siempre con fondo blanco puro */
#mainNav {
    background-color: #FFFFFF !important;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08) !important;
    padding-top: 1rem !important;
    padding-bottom: 1rem !important;
    z-index: 1100; /* asegurar que quede por encima del contenido */
}

/* Asegurar visibilidad del icono hamburguesa en mobile */
.navbar-light .navbar-toggler {
    border-color: rgba(0, 0, 0, 0.2);
}

.navbar-light .navbar-toggler:focus {
    box-shadow: none;
}

.navbar-light .navbar-toggler-icon {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='rgba(0, 0, 0, 0.8)' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e");
    width: 1.5em;
    height: 1.5em;
}

/* Fondo del menú colapsado en mobile */
@media (max-width: 991.98px) {
    #mainNav .navbar-collapse {
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: #ffffff;
        padding: 0.75rem 0.5rem;
        border-radius: 0 0 0.5rem 0.5rem;
        box-shadow: 0 8px 24px rgba(0,0,0,0.12);
        transition: height .35s ease, opacity .28s ease, transform .28s ease;
        opacity: 0;
        transform: translateY(-8px);
    }
    #mainNav .navbar-collapse.show {
        opacity: 1;
        transform: translateY(0);
    }
    #mainNav .navbar-collapse.collapsing {
        opacity: 0;
        transform: translateY(-8px);
    }
    #mainNav .container-fluid {
        display: flex;
        align-items: center;
        gap: 0.5rem;
        overflow: hidden; /* evita desborde del header */
    }
    #mainNav .navbar-toggler {
        margin-left: auto;
        align-self: center;
    }
    .bex-logo-img {
        height: 48px;
        display: block;
    }
}

/* Logo y branding */
.bex-logo-img {
    height: 80px;
    width: auto;
    transition: transform 0.3s ease;
}


.logo-img-services {
    height: 65px;
    width: auto;
    transition: transform 0.3s ease;
}

.bex-logo-img:hover {
    transform: scale(1.05);
}

.text-description {
    font-size: 1.2rem;
}
.text-description-big {
    font-size: 1.5rem;
    line-height: 1.6;
    font-weight: lighter;
}

#mainNav .navbar-brand {
    color: #212529 !important;
    padding: 0 !important;
}

.btn-close-casos{
    color: white!important;
    opacity: unset;
}

#mainNav .navbar-brand:hover {
    color: var(--bex-coral) !important;
}

/* Estilos de navegación */
.navbar-nav .nav-link {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    height: auto !important;
    padding: 10px 20px !important;
    margin: 0 5px !important;
    border-radius: 25px !important;
    font-weight: 600 !important;
    font-size: 15px !important;
    color: black !important;
    transition: all 0.3s ease !important;
    border: 2px solid transparent !important;
    background-color:  transparent !important;
}

.navbar-nav .nav-link.active {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    height: auto !important;
    padding: 10px 20px !important;
    margin: 0 5px !important;
    border-radius: 25px !important;
    font-weight: 600 !important;
    font-size: 15px !important;
    color: white !important;
    transition: all 0.3s ease !important;
    border: 2px solid transparent !important;
    background-color:  var(--bex-coral) !important;
}

.navbar-nav .nav-link.active:hover {
    color: black !important;
}


.navbar-nav .nav-link:hover {
    color: var(--bex-coral) !important;
}




/* ===================================
   Hero Section Styles
   =================================== */

/* Imagen de fondo del hero */
header.masthead {
    background: linear-gradient(to bottom, rgba(0, 0, 0, 0.6) 0%, rgba(0, 0, 0, 0.6) 100%), url("../assets/img/bexestudio/img-home-bexestudio.png") !important;
    background-position: center !important;
    background-repeat: no-repeat !important;
    background-size: cover !important;
    min-height: 100vh;
}

/* Alineación del contenido del hero como en el diseño (desktop) */
/* Quitamos forzados globales de alineación; lo maneja el HTML con utilidades */
header.masthead .col-lg-10,
header.masthead .col-lg-8 {
    max-width: 900px;
}

.hero-title {
    font-size: 3.5rem;
    font-weight: 700;
    margin-bottom: 2rem;
}

.hero-subtitle {
    font-size: 1.2rem;
    line-height: 1.6;
    max-width: 800px;
    margin: 0;
}

.hero-btn {
    background-color: var(--bex-coral);
    border: none;
    border-radius: 30px;
    padding: 15px 40px;
    font-size: 1.1rem;
    font-weight: 600;
    transition: all 0.3s ease;
    display: block;
    width: max-content;
    margin: 0 auto;
}

.hero-btn:hover {
    background-color: #e55a5a;
    transform: translateY(-3px);
    box-shadow: 0 10px 25px rgba(255, 107, 107, 0.3);
}

/* ===================================
   Background Colors
   =================================== */
.bg-coral {
    background-color: var(--bex-coral) !important;
}

/* ===================================
   Section Titles
   =================================== */
.section-title {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 3rem;
}

/* ===================================
   Services Section
   =================================== */
.service-item {
    text-align: center;
    background: white;
    border-radius: 15px;
    transition: all 0.3s ease;
    height: 100%;
}

.service-item:hover {
    transform: translateY(-10px);
}

.service-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 1.5rem;
    background-color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    color: white;
}

.service-title {
    text-align: left;
    font-size: 1.3rem;
    font-weight: 600;
    color: var(--bex-text-dark);
    margin-bottom: 1rem;
}

.service-description {
    color: var(--bex-text-light);
    line-height: 1.6;
    text-align: left;
}

/* ===================================
   Academy Section
   =================================== */
.academy-section {
    background-color: #F3F8FF;
    padding: 80px 0;
}

.academy-title {
    color: var(--bex-coral);
    font-size: 2.2rem;
    font-weight: 700;
    margin-bottom: 2rem;
}

.academy-sub-title {
    font-style: italic!important;
    font-weight: 100;
    margin-block-end: 0px!important;
}


.btn-coral {
    background-color: var(--bex-coral);
    color: white;
    border: none;
    border-radius: 25px;
    padding: 12px 30px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s ease;
}

.btn-coral:hover {
    background-color: #e55a5a;
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(255, 107, 107, 0.3);
}

/* ===================================
   Experience Section
   =================================== */
.experience-section {
    padding: 100px 0;
}

.experience-title {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--bex-text-dark);
    margin-bottom: 2rem;
    line-height: 1.2;
}

.experience-subtitle {
    font-size: 1.1rem;
    color: var(--bex-text-light);
    margin-bottom: 3rem;
    line-height: 1.6;
}

.experience-image {
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
}

/* ===================================
   Cases Section
   =================================== */
.cases-section {
    background-color: black;
    padding-top: 80px;
}

.cases-section .container-fluid {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0!important;
}

.cases-section .row {
    margin: 0;
}

.cases-section .col-lg-4,
.cases-section .col-md-6 {
    padding: 0;
}

.cases-title {
    color: white;
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 3rem;
    text-align: center;
}

.texto-card{
    font-size: 1rem;
    font-weight: 200;
}

.case-item {
    background: var(--bex-coral);
    border-radius: 0;
    padding: 2rem;
    height: 350px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0;
    border: none;
    transition: all 0.3s ease;
    cursor: pointer;
    position: relative;
}

.case-item:hover {
    transform: scale(1.05);
    box-shadow: 0 10px 30px rgba(255, 107, 107, 0.3);
}

.case-item.dark {
    background: black;
}

.case-item.dark:hover {
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

.case-content {
    text-align: center;
    color: white;
}

.case-company {
    color: white;
    font-size: 1.6rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.case-type {
    color: white;
    font-size: 1.1rem;
    font-weight: 200;
    margin-bottom: 0;
    opacity: 0.9;
}

.case-footer {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 18%;
    text-align: center;
    color: #ffffff;
    font-weight: 100;
    letter-spacing: 0.3px;
}

/* ===================================
   Testimonials Section
   =================================== */
.testimonials-section {
    background-color: var(--bex-gray);
    padding: 80px 0;
}

.testimonials-title {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--bex-text-dark);
    margin-bottom: 3rem;
    text-align: left;
}

.client-logo {
    height: 50px;
}

.client-logo:hover {
    opacity: 1;
}

.testimonial-item {
    background: white;
    padding: 2rem;
    border-radius: 15px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.08);
    margin-bottom: 2rem;
    height: 100%;
}

.stars {
    color: #FFD700;
    font-size: 1.2rem;
}

.testimonial-author {
    color: var(--bex-text-dark);
    font-size: 0.9rem;
}

/* ===================================
   Contact Section
   =================================== */
.contact-section {
    padding: 80px 0;
    background: white;
}

.contact-title {
    font-size: 3rem;
    font-weight: 700;
    color: var(--bex-text-dark);
    margin-bottom: 2rem;
}

.contact-menu {
    list-style: none;
    padding: 0;
    margin: 0;
}

.contact-menu li {
    margin-bottom: 1rem;
}

.contact-menu a {
    color: var(--bex-text-dark);
    text-decoration: none;
    font-size: 1.1rem;
    transition: color 0.3s ease;
}

.contact-menu a:hover {
    color: var(--bex-coral);
}

.social-links a {
    color: var(--bex-text-light);
    font-size: 1.2rem;
    transition: color 0.3s ease;
}

.social-links a:hover {
    color: var(--bex-coral);
}

/* Social links: solo más espacio horizontal (ancho) entre iconos */
.social-links .social-link.me-3 {
    margin-right: 24px !important;
}

/* Contacto: legal/footer en una sola línea (desktop) */
.contact-section p.text-muted {
    font-size: 0.85rem;
    color: black;
    white-space: nowrap;
}

.contact-form {
    background: var(--bex-coral);
    padding: 3rem;
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(255, 107, 107, 0.2);
}

.form-title {
    color: white;
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
}

.form-subtitle {
    color: white;
    margin-bottom: 2rem;
    opacity: 0.9;
}

.contact-form .form-control {
    border: none;
    border-radius: 10px;
    padding: 15px 20px;
    margin-bottom: 1rem;
    box-shadow: none;
    background: white;
}

.contact-form .form-control::placeholder {
    color: #999;
}

.btn-submit {
    background-color: var(--bex-dark);
    border: none;
    border-radius: 10px;
    padding: 15px 40px;
    font-weight: 600;
    color: white;
    transition: all 0.3s ease;
}

.btn-submit:hover {
    background-color: #1a252f;
    transform: translateY(-2px);
}

.btn-submit:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none;
}

/* Mensajes del formulario */
.alert {
    padding: 12px 15px;
    border-radius: 8px;
    border: none;
    font-weight: 500;
}

.alert-success {
    background-color: #d4edda;
    color: #155724;
    border-left: 4px solid #28a745;
}

.alert-danger {
    background-color: #f8d7da;
    color: #721c24;
    border-left: 4px solid #dc3545;
}

/* ===================================
   Responsive Design
   =================================== */
/* Cases Modal / Carousel */
.cases-modal .modal-dialog.cases-modal-dialog {
    max-width: 98vw;
    width: 98vw;
    margin-top: var(--nav-height, 0px);
}

.cases-modal .modal-content {
    background: rgba(0, 0, 0, 0.92);
    border: none;
    color: #ffffff;
    max-height: calc(100vh - var(--nav-height, 0px));
    overflow: auto;
}

/* Forzar fuente Inter en títulos del modal */
.cases-modal .modal-title,
.case-text-card h4 {
    font-family: 'Inter', system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif !important;
    font-weight: 700;
}

.cases-modal .modal-header {
    border: none;
    position: sticky;
    top: 0;
    z-index: 3;
    background: rgba(0, 0, 0, 0.92);
}

/* Offset nativo de anclas compensando el header fijo */
section[id],
header[id] {
    scroll-margin-top: var(--nav-height, 80px);
}

#casesCarousel .carousel-item {
    min-height: 70vh;
}

/* Centrado solo para los ítems visibles del carrusel */
#casesCarousel .carousel-item.active,
#casesCarousel .carousel-item-next,
#casesCarousel .carousel-item-prev {
    display: flex;
    align-items: center;
    justify-content: center;
}

.case-text-card {
    background: black;
    color: white;
    padding: 40px 44px;
    border-radius: 10px;
    max-width: 60%;
    font-size: 1.2rem;
    margin: 0 auto;
}

.case-text-card-coral {
    background: var(--bex-coral);
}


.cases-modal.theme-dark .case-text-card { background: rgba(17, 17, 17, 0.92); color: #ffffff; }
.cases-modal.theme-coral .case-text-card { background: rgba(231, 78, 78, 0.95); color: #ffffff; }

.cases-modal .carousel-control-prev,
.cases-modal .carousel-control-next {
    width: 8%;
}

.cases-modal .carousel-control-prev-icon,
.cases-modal .carousel-control-next-icon {
    width: 48px;
    height: 48px;
    background-size: 70% 70%;
    background-color: rgba(0,0,0,0.6);
    border-radius: 50%;
    filter: invert(1);
}

@media (max-width: 768px) {
    .hero-title {
        font-size: 3.5rem !important;
    }
    /* En mobile, mantener centrado desde utilidades de Bootstrap por defecto */
    
    .section-title {
        font-size: 2rem;
    }
    
    .experience-title {
        font-size: 2rem;
    }
    
    .btn-contactanos {
        margin-left: 0;
        margin-top: 10px;
    }
    /* Alinear textos del hero a la izquierda en mobile */
    header.masthead .col-lg-12,
    header.masthead .col-lg-8,
    header.masthead .hero-title,
    header.masthead .hero-subtitle {
        text-align: left !important;
    }
    .cases-modal .modal-dialog.cases-modal-dialog {
        max-width: 100vw;
        width: 100vw;
        margin: 0;
    }
    #casesCarousel .carousel-item { min-height: 70vh; }
    .case-text-card { max-width: 95%; }

    /* Servicios: más espacio lateral y títulos centrados */
    #servicios .service-item {
        margin-left: 12px;
        margin-right: 12px;
        padding-left: 20px;
        padding-right: 20px;
    }
    #servicios .service-title {
        text-align: center !important;
    }

    /* Contacto: más espacio después del formulario y del bloque de links */
    .contact-section .contact-form {
        margin-bottom: 32px;
    }
    .contact-section .contact-info {
        margin-bottom: 32px;
    }
    /* Contacto: legal/footer en una sola línea */
    .contact-section p.text-muted {
        font-size: 0.70rem; /* mobile más chico */
        line-height: 1.2;
        color: black;
        white-space: nowrap;
    }

    /* Contacto (mobile): formulario a ancho completo sin márgenes laterales */
    .contact-section .container {
        padding-left: 0 !important;
        padding-right: 0 !important;
    }
    .contact-section .row {
        margin-left: 0 !important;
        margin-right: 0 !important;
        --bs-gutter-x: 0; /* elimina gutters horizontales */
    }
    .contact-section .col-12.col-lg-6 {
        padding-left: 0 !important;
        padding-right: 0 !important;
    }
    /* Contacto (mobile): sin bordes redondeados del contenedor */
    .contact-section .contact-form {
        border-radius: 0 !important;
    }

    /* Modal casos (mobile): ocultar flechas del carousel y asegurar botón de cierre */
    .cases-modal .carousel-control-prev,
    .cases-modal .carousel-control-next {
        display: none !important;
    }
    .cases-modal .btn-close-casos {
        font-size: 1.4rem;
        z-index: 4;
    }

    /* Contacto (mobile): centrar info y redes */
    .contact-section .contact-info,
    .contact-section .iconos-con-links,
    .contact-section .social-links,
    .contact-section .contact-menu {
        text-align: center !important;
        justify-content: center;
    }

    /* Botones "Quiero saber más" iguales y centrados (solo mobile) */
    .hero-btn,
    .btn-coral {
        display: block !important;
        width: 260px !important; /* tamaño unificado */
        max-width: 90% !important;
        margin-left: auto !important;
        margin-right: auto !important;
        text-align: center !important;
        font-size: 1rem !important; /* tipografía unificada */
    }
}

/* ================================
   Logos Carousel
   ================================ */
.logos-carousel {
    overflow: hidden;
    position: relative;
    width: 100vw; /* ancho exacto del viewport */
    left: 50%;
    transform: translateX(-50%); /* centrar sin desbordar */
}

.logos-carousel .logos-track {
    display: flex;
    align-items: center;
    gap: 40px;
    width: max-content;
    animation: logos-scroll 30s linear infinite;
}

.logos-carousel .client-logo {
    height: 140px;
}

.logos-carousel .client-logo:hover {
    opacity: 1;
}

@keyframes logos-scroll {
    0% { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}

.iconos-con-links{
    padding-left: 6%;
}
