/* Estilos específicos para la página de inicio (index.html) */

/* Clases de utilidad para texto */
.text-primary-brand {
    color: var(--color-primary);
}

/* Efecto de destello para el logo */
.navbar-brand {
    position: relative;
    overflow: hidden;
    cursor: pointer;
}

.logo-main {
    max-height: 65px;
    transition: transform 0.3s ease;
    position: relative;
    z-index: 2;
    transform-origin: center;
    will-change: transform;
    transform: scale(1);
}

.navbar-brand::before {
    content: '';
    position: absolute;
    top: 20%;
    left: -10%;
    width: 40%;
    height: 70%;
    background: radial-gradient(
        ellipse at center,
        rgba(138, 43, 226, 0.7) 0%,
        rgba(138, 43, 226, 0.1) 60%,
        rgba(255, 255, 255, 0) 100%
    );
    transform: rotate(15deg);
    z-index: 1;
    animation: logoShine 3s ease-in-out infinite;
    will-change: transform, opacity;
    pointer-events: none !important;
    mask-image: linear-gradient(
        to right,
        transparent 0%,
        black 35%,
        black 65%,
        transparent 100%
    );
    -webkit-mask-image: linear-gradient(
        to right,
        transparent 0%,
        black 35%,
        black 65%,
        transparent 100%
    );
}

@keyframes logoShine {
    0% {
        left: -10%;
        opacity: 0;
    }
    20% {
        opacity: 0.8;
    }
    40% {
        opacity: 0.8;
    }
    60% {
        left: 75%;
        opacity: 0;
    }
    100% {
        left: 75%;
        opacity: 0;
    }
}

.navbar-brand:hover .logo-main {
    transform: scale(1.05);
}

.navbar-brand .logo-main {
    transform: scale(1);
}

/* Media queries para dispositivos móviles */
@media (max-width: 767.98px) {
    .navbar-brand .logo-main {
        transition: transform 0.2s ease-out;
    }
    
    .navbar-brand:active .logo-main {
        transform: scale(1.05);
    }
}

/* Hero Section */
.hero-section {
    background-color: var(--color-secondary);
    height: calc(100vh - 100px);
    display: flex;
    align-items: center;
    padding: 0;
    overflow: hidden;
}

.hero-section h1 {
    color: var(--color-light);
    font-weight: var(--font-weight-bold);
    margin-bottom: 20px;
    line-height: 1.2;
    opacity: 0;
    animation: fadeIn 0.8s ease forwards;
}

.hero-section p {
    color: var(--color-light);
    margin-bottom: 30px;
    font-size: 1.2rem;
    opacity: 0;
    animation: fadeIn 0.8s ease 0.2s forwards;
}

/* Estilos para el mockup del teléfono */
.phone-mockup {
    position: relative;
    width: 280px;
    height: 580px;
    margin: 0 auto;
    border-radius: 36px;
    background-color: #1f1f1f;
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.3), 
                inset 0 0 0 2px rgba(255, 255, 255, 0.1),
                inset 0 0 10px rgba(0, 0, 0, 0.5);
    padding: 10px;
    opacity: 1;
    transform: none;
    transition: none;
}

.phone-mockup::before {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 120px;
    height: 25px;
    background-color: #1f1f1f;
    border-bottom-left-radius: 15px;
    border-bottom-right-radius: 15px;
    z-index: 2;
}

.phone-screen {
    width: 100%;
    height: 100%;
    border-radius: 28px;
    overflow: hidden;
    position: relative;
    background-color: #000;
}

.hero-video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.phone-mockup:hover {
    transform: none;
}

/* Animación para el hero */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Botón primario */
.btn-outline-primary {
    color: var(--color-primary);
    border-color: var(--color-primary);
    font-weight: 500;
    padding: 10px 25px;
    border-radius: 50px;
    transition: all 0.3s ease;
}

.btn-outline-primary:hover {
    background-color: var(--color-primary);
    color: white;
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(255, 51, 1, 0.2);
}

/* Secciones generales */
section {
    padding: 80px 0;
}

.section-title {
    color: var(--color-light);
    font-weight: var(--font-weight-bold);
    margin-bottom: 15px;
    position: relative;
    display: inline-block;
}

.section-title::after {
    content: '';
    position: absolute;
    width: 50px;
    height: 3px;
    background-color: var(--color-primary);
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
}

.section-subtitle {
    color: var(--color-light);
    font-size: 1.1rem;
    max-width: 700px;
    margin: 0 auto;
    opacity: 0.8;
    margin-top: 20px;
}

/* Servicios Section */
.services-section {
    background-color: var(--color-tertiary);
}

.service-card {
    background-color: var(--color-secondary);
    border-radius: 12px;
    padding: 0;
    height: 100%;
    transition: all 0.3s ease;
    text-align: center;
    display: flex;
    flex-direction: column;
    opacity: 0;
    transform: scale(1);
    position: relative;
    z-index: 1;
}

/* Contenedor interno para el overflow */
.service-card-inner {
    position: relative;
    width: 100%;
    height: 100%;
    border-radius: 12px;
    overflow: hidden;
    background-color: var(--color-secondary);
}

/* Estela luminosa alrededor de la tarjeta */
.service-card::before {
    content: '';
    position: absolute;
    top: -4px;
    left: -4px;
    right: -4px;
    bottom: -4px;
    background: linear-gradient(135deg, var(--color-primary) 0%, rgba(98, 70, 194, 0.2) 50%, var(--color-primary) 100%);
    border-radius: 13px;
    z-index: -1;
    opacity: 0;
    transition: all 0.3s ease;
    filter: blur(6px);
}

.service-card::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--color-secondary);
    border-radius: 10px;
    z-index: -1;
}

.service-card:hover::before {
    opacity: 1;
}

.service-card.animated {
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.5s ease, transform 0.5s ease;
}

.service-card:hover {
    transform: scale(1.04);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.1);
}

/* Estilos para el banner de servicio */
.service-banner {
    width: 100%;
    height: 160px;
    overflow: hidden;
    border-top-left-radius: 12px;
    border-top-right-radius: 12px;
    margin: 0;
}

.service-banner img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.service-card:hover .service-banner img {
    transform: scale(1.1);
}

/* Contenido de la tarjeta */
.service-card h3 {
    color: var(--color-light);
    font-weight: 600;
    margin: 20px 22px 15px;
    font-size: 1.4rem;
}

.service-card p {
    color: var(--color-light);
    opacity: 0.8;
    font-size: 1rem;
    line-height: 1.5;
    padding: 0 22px 25px;
    margin: 0;
}

/* Media Queries para servicios */
@media (max-width: 991.98px) {
    .service-banner {
        height: 140px;
    }
    
    .service-card h3 {
        font-size: 1.25rem;
        margin: 15px 18px 12px;
    }
    
    .service-card p {
        font-size: 0.95rem;
        padding: 0 18px 20px;
    }
}

@media (max-width: 767.98px) {
    .service-card {
        margin-bottom: 20px;
    }
    
    .service-banner {
        height: 130px;
    }
}

/* Proyectos Section */
.portfolio-section {
    background-color: var(--color-secondary);
}

.portfolio-card {
    background-color: var(--color-tertiary);
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
    height: 100%;
}

.portfolio-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.1);
}

.portfolio-image {
    overflow: hidden;
    height: 220px;
    margin: 0;
}

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

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

/* Testimoniales Section */
.testimonials-section {
    background-color: var(--color-tertiary);
}

.testimonial-card {
    background-color: var(--color-secondary);
    border-radius: 10px;
    padding: 40px;
    margin: 0 auto;
    max-width: 800px;
    text-align: center;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
    position: relative;
}

/* Estilo para el avatar circular */
.testimonial-avatar {
    width: 80px;
    height: 80px;
    margin: 0 auto 20px;
    border-radius: 50%;
    overflow: hidden;
    border: 3px solid var(--color-primary);
    box-shadow: 0 0 10px rgba(138, 43, 226, 0.3);
    position: relative;
    z-index: 1;
}

.testimonial-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

/* Efecto de zoom suave al pasar el cursor */
.testimonial-card:hover .testimonial-avatar img {
    transform: scale(1.1);
}

.testimonial-text {
    color: var(--color-light);
    font-size: 1.1rem;
    line-height: 1.6;
    margin-bottom: 20px;
    font-style: italic;
}

.testimonial-author {
    margin-top: 5px;
}

.testimonial-author h4 {
    color: var(--color-light);
    font-weight: 600;
    margin-bottom: 5px;
}

.testimonial-author p {
    color: var(--color-light);
    opacity: 0.7;
}

/* Estilos para los controles del carrusel */
#testimonialCarousel .carousel-control-prev-icon,
#testimonialCarousel .carousel-control-next-icon {
    background-color: var(--color-primary);
    padding: 20px;
    border-radius: 50%;
    background-size: 50%;
}

/* Estilos para los indicadores del carrusel */
.testimonial-indicators {
    position: static;
    margin-top: 20px;
    margin-bottom: 0;
    justify-content: center;
}

.testimonial-indicators [data-bs-target] {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background-color: rgba(138, 43, 226, 0.4);
    border: none;
    margin: 0 4px;
}

.testimonial-indicators .active {
    background-color: var(--color-primary);
}

/* Contenedor para controles e indicadores */
.carousel-controls-container {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-top: 20px;
}

/* Estilos para los botones de control en móvil */
.mobile-control {
    position: static;
    width: auto;
    height: auto;
    margin: 0 10px;
    opacity: 1;
    flex-shrink: 0;
}

.mobile-control .carousel-control-prev-icon,
.mobile-control .carousel-control-next-icon {
    background-color: var(--color-primary);
    width: 40px;
    height: 40px;
    padding: 10px;
    border-radius: 50%;
    background-size: 50%;
}

.mobile-control:hover {
    opacity: 0.9;
}

/* Estilo para evitar que los indicadores se estiren demasiado */
.carousel-controls-container .carousel-indicators {
    margin: 0;
    flex-grow: 0;
    position: static;
}

/* Indicación visual de swipe en móvil */
@media (max-width: 991.98px) {
    
    /* Ajustar el estilo para móviles */
    .testimonial-indicators {
        margin-top: 0;
    }
    
    .testimonial-indicators [data-bs-target] {
        width: 8px;
        height: 8px;
        margin: 0 3px;
    }
    
    .testimonial-card {
        padding: 30px 20px;
    }
    
    /* Hacer que el carrusel sea más touch-friendly */
    #testimonialCarousel .carousel-item {
        touch-action: pan-y;
    }
}

/* Media queries para los testimonios */
@media (max-width: 767.98px) {
    .testimonial-card {
        padding: 30px 20px;
    }
    
    .testimonial-avatar {
        width: 60px;
        height: 60px;
        margin-bottom: 15px;
    }
    
    .testimonial-text {
        font-size: 1rem;
        margin-bottom: 15px;
    }
}

/* Línea divisora entre testimonios y marcas */
.testimonial-divider {
    border: 0;
    height: 1px;
    background: var(--color-primary);
    margin: 0 auto;
    width: 50%;
    opacity: 0.6;
}

/* Estilos para las marcas colaboradoras dentro de testimonios */
.brands-title {
    color: var(--color-light);
    font-size: 1.4rem;
    margin-bottom: 20px;
    font-weight: 500;
    opacity: 0.8;
}

.brands-title::after {
    display: none;
}

.brands-grid {
    justify-content: center;
    margin: 0 -1px;
}

.brands-grid [class*="col-"] {
    padding-left: 1px;
    padding-right: 1px;
}

/* Clases personalizadas para 10 columnas por fila */
.col-1-10 {
    width: 10%;
    flex: 0 0 10%;
    max-width: 10%;
}

@media (max-width: 991.98px) {
    .col-sm-1-5 {
        width: 20%;
        flex: 0 0 20%;
        max-width: 20%;
    }
}

@media (max-width: 767.98px) {
    .col-xs-1-3 {
        width: 33.333333%;
        flex: 0 0 33.333333%;
        max-width: 33.333333%;
    }
}

.brand-item {
    background-color: transparent;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    height: 110px;
    overflow: hidden;
    margin-bottom: 2px;
}

.brand-item img {
    max-width: 100%;
    max-height: 100px;
    object-fit: contain;
    opacity: 0.9;
}

/* Media queries para las marcas */
@media (max-width: 991.98px) {
    .brand-item {
        height: 90px;
        padding: 0;
        margin-bottom: 2px;
    }
    
    .brand-item img {
        max-height: 80px;
    }
    
    .brands-title {
        font-size: 1.4rem;
    }
}

@media (max-width: 767.98px) {
    .brand-item {
        height: 85px;
        padding: 0;
        margin-bottom: 2px;
    }
    
    .brand-item img {
        max-height: 75px;
    }
    
    .brands-title {
        font-size: 1.3rem;
    }
}

/* Sección de Marcas Colaboradoras */
.brands-section {
    background-color: var(--color-secondary);
    padding: 60px 0;
}

/* Footer Minimalista */
.footer-minimal {
    background-color: var(--color-dark);
    color: var(--color-light);
    padding: 20px 0;
    box-shadow: 0 -4px 12px rgba(98, 70, 194, 0.15);
}

.footer-minimal p {
    font-size: 0.9rem;
    letter-spacing: 1px;
    margin: 0;
    color: var(--color-light);
}

.footer-part {
    display: inline;
}

/* Agregar salto de línea en el footer en dispositivos móviles */
@media (max-width: 767.98px) {
    .footer-part:first-of-type {
        display: block;
        margin-bottom: 5px;
    }
}

/* Botón flotante de WhatsApp */
.whatsapp-float {
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 50px;
    height: 50px;
    background-color: #25D366;
    color: white;
    border-radius: 50%;
    text-align: center;
    font-size: 24px;
    display: flex;
    justify-content: center;
    align-items: center;
    box-shadow: 2px 2px 10px rgba(0, 0, 0, 0.2);
    z-index: 1050;
    transition: all 0.3s ease;
    will-change: transform;
}

/* Animación para el efecto ripple */
@keyframes whatsapp-ripple {
    0% {
        transform: scale(1);
        opacity: 0.4;
    }
    100% {
        transform: scale(1.6);
        opacity: 0;
    }
}

/* Efecto ripple constante para WhatsApp */
.whatsapp-float::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #25D366;
    border-radius: 50%;
    z-index: -1;
    opacity: 0.4;
    animation: whatsapp-ripple 2.5s infinite ease-out;
}

/* Quitamos el segundo ripple */
.whatsapp-float::after {
    display: none;
}

.whatsapp-float:hover {
    transform: scale(1.1);
    box-shadow: 2px 2px 15px rgba(0, 0, 0, 0.3);
    color: white;
}

.whatsapp-float:active {
    transform: scale(0.9);
}

/* Ajustar ripple para dispositivos móviles */
@media (max-width: 767.98px) {
    .whatsapp-float {
        width: 38px;
        height: 38px;
        font-size: 19px;
        bottom: 15px;
        right: 15px;
    }
    
    @keyframes whatsapp-ripple {
        0% {
            transform: scale(1);
            opacity: 0.4;
        }
        100% {
            transform: scale(1.4);
            opacity: 0;
        }
    }
}

/* Media Queries */
@media (max-width: 991.98px) {
    .hero-section {
        padding: 0;
        height: calc(100vh - 100px);
    }
    
    .hero-section h1 {
        font-size: 2.2rem;
    }
    
    .navbar-collapse {
        position: absolute;
        top: 100%;
        right: 0;
        left: 0;
        z-index: 1050;
        background-color: var(--color-dark);
        padding: 1rem;
        box-shadow: 0 10px 15px rgba(0, 0, 0, 0.15);
        max-height: calc(100vh - 100px);
        overflow-y: auto;
        transition: transform 0.15s ease, opacity 0.15s ease;
        -webkit-backface-visibility: hidden;
        backface-visibility: hidden;
    }
    
    .navbar-collapse.collapsing {
        opacity: 0;
        transform: translateY(-10px);
        transition: transform 0.1s ease, opacity 0.1s ease;
    }
    
    .navbar-collapse.show {
        opacity: 1;
        transform: translateY(0);
    }
}

@media (max-width: 767.98px) {
    section {
        padding: 60px 0;
    }
    
    .hero-section h1 {
        font-size: 2.5rem;
        line-height: 1.1;
        padding-left: 15px;
        padding-right: 15px;
    }
    
    .hero-section p.lead {
        font-size: 1rem;
        opacity: 0.9;
        padding-left: 15px;
        padding-right: 15px;
    }
    
    .testimonial-card {
        padding: 30px 20px;
    }
    
    .testimonial-text {
        font-size: 1rem;
    }
    
    .whatsapp-float {
        width: 38px;
        height: 38px;
        font-size: 19px;
        bottom: 15px;
        right: 15px;
    }
    
    .navbar-nav .nav-link {
        padding: 0.75rem 0;
        border-bottom: 1px solid rgba(240, 234, 232, 0.1);
    }
    
    .navbar-nav .nav-item:last-child .nav-link {
        border-bottom: none;
    }
    
    .navbar-nav .social-icon {
        display: inline-block;
        margin-right: 10px;
    }
}

/* Estilos para el header */
.header {
    background-color: var(--color-dark);
    box-shadow: 0 4px 12px rgba(98, 70, 194, 0.15);
    transition: all 0.3s ease;
    position: sticky;
    top: 0;
    z-index: 1040;
    will-change: transform;
    transform: translateZ(0);
}

.header .container {
    position: relative;
}

.logo-main {
    max-height: 65px;
    transition: transform 0.3s ease;
}

/* Estilo del menú hamburguesa */
.navbar-toggler {
    border-color: var(--color-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(240, 234, 232, 1)' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e");
}

.navbar-nav .nav-link {
    color: var(--color-light);
    font-weight: 500;
    padding: 10px 15px;
    transition: all 0.3s ease;
}

.navbar-nav .nav-link:hover,
.navbar-nav .nav-link.active {
    color: var(--color-primary);
}

/* Sección Nosotros */
.about-section {
    background-color: var(--color-secondary);
}

.about-section h3 {
    color: var(--color-light);
    font-weight: 600;
    margin-bottom: 15px;
    font-size: 1.4rem;
}

.about-section p {
    color: var(--color-light);
    opacity: 0.8;
    line-height: 1.7;
}

/* Estilo para justificar el texto del propósito */
.about-section h3 + p {
    text-align: justify;
}

.about-section img {
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease;
}

.about-section img:hover {
    transform: translateY(-10px);
}

/* Estilos para la sección de estadísticas */
.stats-container {
    margin-top: 30px;
    margin-bottom: 30px;
}

.stat-item {
    padding: 15px 10px;
    transition: all 0.5s ease;
}

.stat-number {
    font-size: 3.5rem;
    font-weight: 800;
    color: var(--color-primary);
    margin-bottom: 5px;
    line-height: 1;
    position: relative;
}

/* Efecto de destello para los números cuando aparecen */
.stat-number span {
    display: inline-block;
    position: relative;
    transition: all 0.3s ease;
}

.stat-number span::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(
        ellipse at center,
        rgba(138, 43, 226, 0.4) 0%,
        rgba(138, 43, 226, 0) 70%
    );
    border-radius: 50%;
    opacity: 0;
    transform: scale(0);
    z-index: -1;
    animation: numberPulse 1.5s ease-out;
}

@keyframes numberPulse {
    0% {
        opacity: 0;
        transform: scale(0);
    }
    50% {
        opacity: 0.8;
        transform: scale(1.5);
    }
    100% {
        opacity: 0;
        transform: scale(2);
    }
}

.stat-text {
    font-size: 1.1rem;
    color: var(--color-light);
    margin-bottom: 0;
    font-weight: 500;
}

.stat-description {
    font-size: 0.95rem;
    color: var(--color-light);
    opacity: 0.8;
    margin-top: 0;
}

@media (max-width: 767.98px) {
    .stat-item {
        margin-bottom: 25px;
    }
    
    .stat-number {
        font-size: 3rem;
    }
    
    /* Añadir padding a los textos de la sección nosotros en móviles */
    .about-section .col-lg-6 h3,
    .about-section .col-lg-6 p {
        padding-left: 15px;
        padding-right: 15px;
    }
}

/* Estilos para la pregunta principal */
.about-section .call-to-action {
    margin-top: 0;
    font-weight: 700;
    font-size: 2.2rem;
    text-align: center;
    letter-spacing: 1px;
    position: relative;
    display: block;
    width: 100%;
    padding: 5px 0;
    letter-spacing: 3px;
    clear: both;
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.5s ease, transform 0.5s ease;
}

.about-section .call-to-action span {
    color: var(--color-primary) !important;
    display: inline-block;
    position: relative;
}

/* Clase que se añadirá con JavaScript cuando el elemento sea visible */
.about-section .call-to-action.visible {
    opacity: 1;
    transform: translateY(0);
}

@media (max-width: 767.98px) {
    .about-section .call-to-action {
        font-size: 1.8rem;
        margin-top: 0;
    }
}

.hero-section .container,
.hero-section .row {
    height: 100%;
}

/* Estilos específicos para la imagen de Nosotros */
.about-image-container {
    max-width: 550px;
    margin: 0 auto;
    overflow: visible;
    position: relative;
    text-align: center;
    padding: 10px;
    margin-top: -20px;
}

.about-image {
    width: auto;
    max-width: 100%;
    height: auto;
    max-height: 500px;
    object-fit: contain;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease;
    transform-origin: center bottom;
}

.about-image:hover {
    transform: translateY(-10px);
}

/* Ajustes responsivos para la imagen */
@media (max-width: 991.98px) {
    .about-image-container {
        max-width: 480px;
    }
    
    .about-image {
        max-height: 430px;
    }
}

@media (max-width: 767.98px) {
    .about-image-container {
        max-width: 400px;
    }
    
    .about-image {
        max-height: 360px;
    }
}

/* Detener efectos hover cuando el menú hamburguesa está abierto */
.navbar-collapse.show ~ main .portfolio-card:hover .portfolio-image img,
.navbar-collapse.show ~ main .service-card:hover,
.navbar-collapse.show ~ main .about-section img:hover,
.navbar-collapse.show ~ main .portfolio-card:hover,
.navbar-collapse.show ~ main .portfolio-link:hover::after,
.navbar-collapse.collapsing ~ main .portfolio-card:hover .portfolio-image img,
.navbar-collapse.collapsing ~ main .service-card:hover,
.navbar-collapse.collapsing ~ main .about-section img:hover,
.navbar-collapse.collapsing ~ main .portfolio-card:hover,
.navbar-collapse.collapsing ~ main .portfolio-link:hover::after {
    transform: none !important;
    transition: none !important;
    animation: none !important;
    width: auto !important;
}

/* Estilos para el botón de reproducción del video */
.video-play-btn {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: transparent;
    border: none;
    color: var(--color-primary);
    font-size: 4rem;
    cursor: pointer;
    z-index: 3;
    opacity: 0.8;
    transition: all 0.3s ease;
}

.video-play-btn:hover {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1.1);
}

.video-play-btn:focus {
    outline: none;
}

/* Mejoras en la responsividad para el teléfono */
@media (max-width: 991.98px) {
    .phone-mockup {
        width: 260px;
        height: 530px;
        transform: none;
        margin: 0 auto 30px auto;
    }
    
    .hero-section {
        height: auto;
        min-height: 100vh;
        padding: 80px 0;
    }
}

@media (max-width: 767.98px) {
    .phone-mockup {
        width: 240px;
        height: 490px;
        border-radius: 30px;
        transform: none;
        margin: 0 auto 30px auto;
    }
    
    .phone-screen {
        border-radius: 24px;
    }
    
    .phone-mockup::before {
        width: 80px;
        height: 18px;
    }
    
    section {
        padding: 60px 0;
    }
    
    .hero-section h1 {
        font-size: 2.5rem;
        line-height: 1.1;
    }

    .hero-section p.lead {
        font-size: 1rem;
        opacity: 0.9;
    }
    
    .testimonial-card {
        padding: 30px 20px;
    }
    
    .testimonial-text {
        font-size: 1rem;
    }
    
    .whatsapp-float {
        width: 38px;
        height: 38px;
        font-size: 19px;
        bottom: 15px;
        right: 15px;
    }
    
    .navbar-nav .nav-link {
        padding: 0.75rem 0;
        border-bottom: 1px solid rgba(240, 234, 232, 0.1);
    }
    
    .navbar-nav .nav-item:last-child .nav-link {
        border-bottom: none;
    }
    
    .navbar-nav .social-icon {
        display: inline-block;
        margin-right: 10px;
    }
}

/* Estilos para los controles del video */
.video-controls {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    display: flex;
    justify-content: center;
    gap: 25px;
    padding: 15px 10px 15px;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.8) 0%, rgba(0, 0, 0, 0.4) 50%, transparent 100%);
    opacity: 0;
    transition: opacity 0.3s ease;
    border-bottom-left-radius: 24px;
    border-bottom-right-radius: 24px;
    z-index: 2;
    pointer-events: none;
}

.video-controls.active {
    opacity: 1;
    pointer-events: auto;
}

.phone-screen:hover .video-controls {
    opacity: 0;
}

.phone-screen:hover .video-controls.active {
    opacity: 1;
}

.video-control-btn {
    background: rgba(138, 43, 226, 0.8);
    border: none;
    color: white;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    margin-bottom: 3px;
}

.video-control-btn:hover {
    background: var(--color-primary);
    transform: scale(1.1);
}

.video-control-btn i {
    font-size: 1.1rem;
}

.video-control-btn.play-pause-btn i {
    margin-left: 2px;
}

/* Ajustes para dispositivos móviles */
@media (max-width: 767.98px) {
    .video-controls {
        padding: 12px 10px 12px;
        gap: 20px;
    }
    
    .video-control-btn {
        width: 28px;
        height: 28px;
    }
    
    .video-control-btn i {
        font-size: 1rem;
    }
}

/* Estilos para dispositivos táctiles */
@media (hover: none) {
    .video-controls {
        opacity: 0;
        background: linear-gradient(to top, rgba(0, 0, 0, 0.9) 0%, rgba(0, 0, 0, 0.6) 50%, transparent 100%);
        padding: 12px 10px 12px;
    }
    
    .video-controls.active {
        opacity: 1;
    }
}

/* Ajustes específicos para dispositivos móviles */
@media (max-width: 991.98px) {
    .phone-screen:hover .video-controls {
        opacity: 0;
    }
    
    .phone-screen:hover .video-controls.active {
        opacity: 1;
    }
}

/* Mejora para la interacción táctil */
.phone-screen {
    -webkit-tap-highlight-color: transparent;
}

/* Estilos para el portfolio with videos */
.portfolio-video {
    overflow: hidden;
    margin: 0;
    position: relative;
    background-color: #000;
    cursor: pointer;
    /* Removed fixed aspect ratio to allow natural video proportions */
}

.portfolio-video-element {
    width: 100%;
    height: auto;
    display: block;
    object-fit: contain;
    transition: transform 0.5s ease;
}

/* Ajustes para el overlay */
.portfolio-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.4);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    opacity: 1;
    transition: opacity 0.3s ease;
    z-index: 2;
    pointer-events: none; /* Permitir que los clics pasen al video */
}

/* Estilos para el título del video */
.portfolio-video-title {
    text-align: center;
    margin-bottom: 20px;
    pointer-events: none;
    opacity: 1;
    transform: translateY(0);
    transition: all 0.3s ease;
}

.portfolio-video-title h4 {
    color: white;
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: 5px;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.7);
    line-height: 1.2;
}

.portfolio-video-title p {
    color: rgba(255, 255, 255, 0.9);
    font-size: 0.9rem;
    margin: 0;
    text-shadow: 0 1px 4px rgba(0, 0, 0, 0.7);
    line-height: 1.3;
}

.portfolio-overlay .portfolio-play-btn {
    pointer-events: auto; /* Solo el botón debe ser clickeable */
}

.portfolio-video.playing .portfolio-overlay {
    opacity: 0;
}

.portfolio-card:hover .portfolio-overlay {
    opacity: 0.7;
}

.portfolio-video.playing:hover .portfolio-overlay {
    opacity: 0;
}

.portfolio-play-btn {
    width: 45px;
    height: 45px;
    border-radius: 50%;
    background-color: var(--color-primary);
    border: none;
    color: white;
    font-size: 1.3rem;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    padding: 0;
    transition: all 0.3s ease;
    box-shadow: 0 0 15px rgba(0, 0, 0, 0.3);
    z-index: 2;
}

.portfolio-play-btn i {
    margin-left: 4px;
}

.portfolio-play-btn:hover {
    transform: scale(1.1);
    background-color: var(--color-primary);
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.4);
}

/* Estilos para los controles del portfolio */
.portfolio-controls {
    position: absolute;
    bottom: 8px;
    left: 8px;
    right: 8px;
    display: flex;
    flex-direction: column;
    gap: 6px;
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: 3;
}

.portfolio-video:hover .portfolio-controls {
    opacity: 1;
}

/* Contenedor de la barra de progreso */
.portfolio-progress-container {
    display: flex;
    align-items: center;
    gap: 6px;
    background: rgba(0, 0, 0, 0.7);
    border-radius: 20px;
    padding: 4px 8px;
    backdrop-filter: blur(5px);
    user-select: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
}

/* Barra de progreso */
.portfolio-progress-bar {
    flex: 1;
    height: 4px;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 2px;
    cursor: pointer;
    position: relative;
    overflow: visible;
    transition: height 0.2s ease;
}

.portfolio-progress-bar:hover,
.portfolio-progress-bar.dragging {
    height: 6px;
}

.portfolio-progress-bar.dragging {
    cursor: grabbing;
}

.portfolio-progress-fill {
    height: 100%;
    background: var(--color-primary);
    border-radius: 2px;
    width: 0%;
    transition: width 0.1s ease;
    position: relative;
}

.portfolio-progress-bar.dragging .portfolio-progress-fill {
    background: linear-gradient(90deg, var(--color-primary), #ff6b6b);
    transition: none;
}

.portfolio-progress-fill::after {
    content: '';
    position: absolute;
    top: 50%;
    right: 0;
    width: 16px;
    height: 16px;
    background: white;
    border: 2px solid var(--color-primary);
    border-radius: 50%;
    transform: translate(50%, -50%);
    opacity: 0;
    transition: opacity 0.2s ease, transform 0.2s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
    cursor: grab;
}

.portfolio-progress-bar:hover .portfolio-progress-fill::after,
.portfolio-progress-bar.dragging .portfolio-progress-fill::after {
    opacity: 1;
    transform: translate(50%, -50%) scale(1.1);
}

.portfolio-progress-bar.dragging .portfolio-progress-fill::after {
    cursor: grabbing;
    transform: translate(50%, -50%) scale(1.2);
}

/* Indicador de tiempo */
.portfolio-time-display {
    color: white;
    font-size: 0.75rem;
    font-weight: 500;
    white-space: nowrap;
    min-width: 70px;
    text-align: center;
}

.portfolio-control-btn {
    background: rgba(138, 43, 226, 0.9);
    border: none;
    color: white;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 0.9rem;
    backdrop-filter: blur(5px);
}

.portfolio-control-btn:hover {
    background: var(--color-primary);
    transform: scale(1.1);
}

.portfolio-card:hover .portfolio-video-element {
    transform: scale(1.05);
}

.portfolio-video.playing .portfolio-video-element {
    transform: scale(1);
}

/* Media queries para el portafolio con video */
@media (max-width: 991.98px) {
    /* Remove fixed aspect ratio in mobile */
    
    .portfolio-play-btn {
        width: 45px;
        height: 45px;
        font-size: 1.3rem;
    }
    
    .portfolio-video-title h4 {
        font-size: 1.1rem;
    }
    
    .portfolio-video-title p {
        font-size: 0.85rem;
    }
    
    .portfolio-controls {
        bottom: 6px;
        left: 6px;
        right: 6px;
        gap: 4px;
    }
    
    .portfolio-progress-container {
        padding: 4px 8px;
    }
    
    .portfolio-time-display {
        font-size: 0.65rem;
        min-width: 55px;
    }
    
    .portfolio-control-btn {
        width: 24px;
        height: 24px;
        font-size: 0.75rem;
    }
}

@media (max-width: 767.98px) {
    /* Remove fixed aspect ratio in mobile */
    
    .portfolio-play-btn {
        width: 40px;
        height: 40px;
        font-size: 1.2rem;
    }
    
    .portfolio-video-title {
        margin-bottom: 15px;
    }
    
    .portfolio-video-title h4 {
        font-size: 1rem;
        margin-bottom: 3px;
    }
    
    .portfolio-video-title p {
        font-size: 0.8rem;
    }
    
    .portfolio-controls {
        bottom: 4px;
        left: 4px;
        right: 4px;
        gap: 3px;
    }
    
    .portfolio-progress-container {
        padding: 3px 6px;
    }
    
    .portfolio-progress-bar {
        height: 3px;
    }
    
    .portfolio-progress-fill::after {
        width: 6px;
    }
    
    .portfolio-time-display {
        font-size: 0.6rem;
        min-width: 50px;
    }
    
    .portfolio-control-btn {
        width: 20px;
        height: 20px;
        font-size: 0.7rem;
    }
}

/* Estilos para el carrusel del portafolio */
/* Estilos para los carruseles del portafolio */
#portfolioCarouselDesktop,
#portfolioCarouselMobile {
    position: relative;
}

#portfolioCarouselDesktop .carousel-control-prev,
#portfolioCarouselDesktop .carousel-control-next {
    width: 60px;
    height: 60px;
    top: 50%;
    transform: translateY(-50%);
    opacity: 0.8;
}

#portfolioCarouselDesktop .carousel-control-prev-icon,
#portfolioCarouselDesktop .carousel-control-next-icon {
    background-color: var(--color-primary);
    padding: 20px;
    border-radius: 50%;
    background-size: 50%;
}

#portfolioCarouselDesktop .carousel-control-prev {
    left: 35px;
}

#portfolioCarouselDesktop .carousel-control-next {
    right: 35px;
}

#portfolioCarouselDesktop .carousel-control-prev:hover,
#portfolioCarouselDesktop .carousel-control-next:hover {
    opacity: 1;
}

.portfolio-indicators {
    position: static;
    margin: 30px 0 0;
    justify-content: center;
    gap: 8px;
}

/* Estilos específicos para los indicadores en desktop */
#portfolioCarouselDesktop .portfolio-indicators {
    margin-top: 40px;
}

.portfolio-indicators [data-bs-target] {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background-color: rgba(138, 43, 226, 0.4);
    border: none;
    margin: 0 4px;
    opacity: 1;
    transition: all 0.3s ease;
}

.portfolio-indicators .active {
    background-color: var(--color-primary);
    transform: scale(1.2);
}

/* Estilos específicos para el carrusel móvil del portafolio */
@media (max-width: 991.98px) {
    /* Asegurar que el carrusel móvil tenga altura consistente */
    #portfolioCarouselMobile .carousel-inner {
        min-height: 400px;
        position: relative;
        overflow: hidden;
    }
    
    #portfolioCarouselMobile .carousel-item {
        min-height: 400px;
        display: flex;
        align-items: center;
        transition: transform 0.6s ease-in-out;
        flex: 0 0 100%;
        will-change: transform;
    }
    
    /* Gestión de los slides del carrusel móvil */
    #portfolioCarouselMobile .carousel-inner {
        overflow: hidden;
        position: relative;
    }
    
    #portfolioCarouselMobile .carousel-item {
        position: absolute;
        left: 0;
        top: 0;
        width: 100%;
        opacity: 0;
        transition: opacity 0.3s ease-in-out, transform 0.5s ease-in-out;
        transform: translateX(100%);
    }

    #portfolioCarouselMobile .carousel-item.active {
        opacity: 1;
        position: relative;
        transform: translateX(0);
        z-index: 10;
    }

    /* Slides entrantes y salientes */
    #portfolioCarouselMobile .carousel-item-start {
        opacity: 0;
        transform: translateX(-100%);
    }
    
    #portfolioCarouselMobile .carousel-item-end {
        opacity: 0;
        transform: translateX(100%);
    }
    
    #portfolioCarouselMobile .carousel-item-next.carousel-item-start,
    #portfolioCarouselMobile .carousel-item-prev.carousel-item-end {
        opacity: 1;
        transform: translateX(0);
        z-index: 11;
    }
    
    /* Centrar las tarjetas del portafolio en móvil */
    #portfolioCarouselMobile .portfolio-card {
        max-width: 400px;
        margin: 0 auto;
        width: 100%;
    }
    
    /* Asegurar que las filas en el carrusel móvil estén centradas correctamente */
    #portfolioCarouselMobile .row {
        margin-left: 0;
        margin-right: 0;
        width: 100%;
    }
    
    /* Ajustar los indicadores para el carrusel móvil */
    #portfolioCarouselMobile .portfolio-indicators {
        gap: 6px;
        justify-content: center;
    }
    
    #portfolioCarouselMobile .portfolio-indicators [data-bs-target] {
        width: 8px;
        height: 8px;
        margin: 0 2px;
    }
    
    /* Asegurar que los controles estén visibles */
    #portfolioCarouselMobile .mobile-control {
        position: static;
        width: auto;
        height: auto;
        margin: 0 10px;
        opacity: 1;
        z-index: 1000;
        background-color: transparent;
        display: flex;
        align-items: center;
        justify-content: center;
        flex-shrink: 0;
    }
    
    #portfolioCarouselMobile .mobile-control:hover {
        opacity: 1;
        background-color: transparent;
    }
    
    /* Iconos de flechas específicos para el carrusel móvil del portafolio */
    #portfolioCarouselMobile .mobile-control .carousel-control-prev-icon,
    #portfolioCarouselMobile .mobile-control .carousel-control-next-icon {
        background-color: var(--color-primary);
        width: 40px;    /* Aumentado para que sea más grande y visible */
        height: 40px;   /* Aumentado para que sea más grande y visible */
        padding: 10px;  /* Aumentado proporcionalmente */
        border-radius: 50%;
        background-size: 50%;
        filter: drop-shadow(0 0 2px rgba(0, 0, 0, 0.3));
    }
}

@media (max-width: 767.98px) {
    #portfolioCarouselMobile .carousel-inner {
        min-height: 350px;
    }
    
    #portfolioCarouselMobile .carousel-item {
        min-height: 350px;
        display: flex;
        justify-content: center;
    }
    
    #portfolioCarouselMobile .portfolio-card {
        max-width: 350px;
    }
    
    /* Mejorar la interacción táctil en móviles pequeños */
    #portfolioCarouselMobile .carousel-control-prev,
    #portfolioCarouselMobile .carousel-control-next {
        width: 15%;
        opacity: 1; /* Cambiado para que sea totalmente visible */
    }
    
    /* Mantener el tamaño de los controles incluso en móviles pequeños */
    #portfolioCarouselMobile .mobile-control .carousel-control-prev-icon,
    #portfolioCarouselMobile .mobile-control .carousel-control-next-icon {
        width: 40px !important;
        height: 40px !important;
        padding: 10px !important;
    }
}
