/* ==================== CSS CUSTOM PROPERTIES (VARIABLES) ==================== */
:root {
    --header-height: 4.5rem; 

    --foreground: hsl(0, 0%, 95%); 
    --background: #040404; /* Fondo principal oscuro */
    --secondaryBg: #0d0c14; /* Fondo de tarjetas/secciones alternas */
    --gray-100: hsl(246, 18%, 15%);
    --gray-200: hsl(246, 11%, 22%);
    --gray-300: hsl(246, 8%, 35%); /* Usado para borde de btn-secondary */
    --gray-400: hsl(246, 7%, 45%);
    --gray-500: hsl(246, 6%, 65%); 
    --gray-600: hsl(246, 6%, 65%); 
    --gray-700: hsl(246, 6%, 78%); /* Usado para texto de btn-secondary */
    --gray-800: hsl(246, 6%, 87%);
    --gray-900: hsl(246, 6%, 95%);
    
    --accent-color: hsl(280, 80%, 60%); 
    --accent-color-hover: hsl(280, 90%, 70%); 
    --button-gradient-start: #853bce;
    --button-gradient-end: #843ccc;

    --highlight-glow: 0 0 30px hsla(280, 80%, 60%, 0.6); 

    --body-font: 'Inter', sans-serif; 
    --title-font: 'Inter', sans-serif; 

    --h1-font-size: clamp(2.5rem, 8vw, 60px); 
    --h1-line-height: 1.3; 

    --h2-font-size: clamp(2rem, 6vw, 40px); 
    --h2-line-height: 1.3; 

    --hero-description-font-size: clamp(1.7rem, 3vw, 24px); 
    --hero-description-line-height: 1.5; 

    --nav-button-font-size: 14px;
    --nav-button-line-height: 20px; 
    
    --h4-font-size: 1.25rem; 
    --normal-font-size: 1rem; 
    --small-font-size: 0.875rem; 

    --transition-smooth: all 0.2s ease-in-out;
    --transition-highlight: box-shadow 0.4s ease-out, border-color 0.4s ease-out, transform 0.2s ease-in-out; /* MODIFICADO: Añadida transition para transform */
    --shadow-light: 0 1px 3px rgba(0,0,0,0.1), 0 1px 2px rgba(0,0,0,0.2);
    --shadow-medium: 0 4px 6px rgba(0,0,0,0.1), 0 2px 4px rgba(0,0,0,0.2);
    --shadow-large: 0 8px 16px rgba(0,0,0,0.3); 
}

/* ==================== BASE & RESET ==================== */
* { box-sizing: border-box; padding: 0; margin: 0; }
html { 
    scroll-behavior: smooth; 
    overflow-x: hidden; 
}
body {
    font-family: var(--body-font);
    font-size: var(--normal-font-size);
    background-color: var(--background);
    color: var(--foreground);
    line-height: 1.6; 
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}
body.menu-open { overflow: hidden; }
h1, h2, h3, h4 { 
    font-family: var(--title-font); 
    font-weight: 600; 
    letter-spacing: -0.02em; 
    margin-bottom: 1rem;
    color: var(--foreground); 
}
h1 { font-weight: 700; }
ul { list-style: none; }
a, button { text-decoration: none; color: inherit; cursor: pointer; }
img { max-width: 100%; height: auto; display: block; }
button { background: none; border: none; font-family: inherit; }

/* ==================== PRELOADER ==================== */
#preloader { position: fixed; top: 0; left: 0; width: 100%; height: 100%; background-color: var(--background); z-index: 10000; display: flex; justify-content: center; align-items: center; transition: opacity 0.5s ease-out, visibility 0s 0.5s; }
#preloader.loaded { opacity: 0; visibility: hidden; }
.preloader-logo { width: 80px; }
#preloader.loaded .preloader-logo { animation: preloader-animation 1s forwards cubic-bezier(0.76, 0, 0.24, 1); }

@keyframes preloader-animation {
    0% { transform: scale(1) rotate(0deg); opacity: 1; }
    100% { transform: scale(0) rotate(180deg); opacity: 0; }
}

#main-content { opacity: 0; transition: opacity 0.5s ease-in; }
#main-content.loaded { opacity: 1; }

/* ==================== REUSABLE & LAYOUT ==================== */
.container { 
    max-width: 1200px; 
    margin: 0 auto; 
    padding: 0 24px; 
    position: relative;
    z-index: 1;
}
.section { 
    padding: 6rem 0; 
    overflow: visible; 
    position: relative;
}
.section-light { 
    color: var(--foreground); 
    padding-top: 0rem; 
    padding-bottom: 2rem; 
}
.section-card-bg {
    background-color: var(--secondaryBg); 
    border-radius: 16px; 
    border: 1px solid rgba(255, 255, 255, 0.10); 
    padding: 6rem 0; 
    margin: 0 auto; 
    max-width: calc(100% - 100px); 
    box-shadow: var(--shadow-large);
    position: relative; 
    z-index: 0; 
}
.section-light .container {
    padding-top: 0; 
    padding-bottom: 0;
}
.section-light h2, .section-light h3, .section-light h4 { color: var(--foreground); }
.section-header { text-align: center; margin-bottom: 4rem; }
.section-subtitle { color: var(--accent-color) !important; font-family: var(--body-font); font-weight: 500; letter-spacing: 1px; font-size: 0.9rem; text-transform: uppercase; margin-bottom: 0.5rem; }
.section-title { 
    font-size: var(--h2-font-size); 
    line-height: var(--h2-line-height); 
    margin: 0 0 1.5rem; 
    color: var(--foreground); 
    font-weight: 600; 
}
.section-title span { color: var(--accent-color); }
.section-light .section-title { color: var(--foreground); }

/* ==================== HEADER ==================== */
#header { width: 100%; position: fixed; top: 0; left: 0; z-index: 100; transition: background-color .3s; }
#header.scrolled { 
    background-color: var(--background); 
    backdrop-filter: none; 
}
nav.container { height: var(--header-height); display: flex; justify-content: space-between; align-items: center; }
.logo { display: flex; align-items: center; gap: 0.5rem; font-family: var(--title-font); font-size: 1.25rem; color: var(--foreground); font-weight: 600; transition: var(--transition-smooth); }
.logo:hover { opacity: 0.8; }
.logo img { height: 45px; }
.logo span { color: var(--foreground); }
.nav-list { display: flex; align-items: center; gap: 1rem; }
.nav-link { 
    color: var(--gray-600); 
    font-weight: 500; 
    font-size: var(--nav-button-font-size); 
    transition: color .2s, background-color .2s; 
    padding: 0.5rem 0.75rem; 
    border-radius: 4px; 
}
.nav-link:hover { color: var(--foreground); background-color: var(--gray-100); }
.nav-link::after { display: none; }

.nav-link-button {
    background: linear-gradient(to bottom, var(--button-gradient-start), var(--button-gradient-end)); 
    color: white !important;
    padding: 0.6rem 1.2rem; 
    border-radius: 6px;
    transition: var(--transition-smooth);
    font-weight: 500;
    font-size: var(--nav-button-font-size); 
    border: none; 
    box-shadow: 0 0 10px hsla(280, 80%, 60%, 0.2); 
}
.nav-link-button:hover {
    background: linear-gradient(to bottom, var(--button-gradient-start), var(--button-gradient-end)); 
    box-shadow: 0 0 20px hsla(280, 90%, 70%, 0.5), 0 0 8px hsla(280, 90%, 70%, 0.3); 
    transform: none; 
}

.nav-toggle, .nav-close { display: none; font-size: 1.5rem; cursor: pointer; color: var(--foreground); z-index: 2001; }

/* ==================== HERO ==================== */
.hero {
    position: relative;
    min-height: 70vh; 
    display: flex;
    align-items: center;
    padding-top: calc(var(--header-height) + 4rem);
    padding-bottom: 0rem; 
    text-align: left; 
    background: none; 
    overflow: hidden;
    border-top: none; 
}
.hero-and-portfolio-gradient {
    background: linear-gradient(180deg, #040404 0%, #08070c 100%);
    width: 100%;
}
.hero-background-overlay { display: none; }
.hero-container { position: relative; z-index: 2; width: 100%; }
.hero-content-wrapper {
    max-width: 1000px; 
    margin: 0; 
}
.hero-title {
    font-size: var(--h1-font-size);
    line-height: var(--h1-line-height); 
    font-weight: 700;
    margin-bottom: 1.5rem;
}
.hero-title span {
    color: #b848da;
}
.hero-title span.line { display: inline; }
.hero-title br { display: block; }
.hero-title span span { color: var(--accent-color); } 
.hero-description {
    font-size: var(--hero-description-font-size); 
    line-height: var(--hero-description-line-height); 
    color: var(--gray-500); 
    max-width: 750px; 
    margin: 0 0 2.5rem; 
}
.hero-buttons {
    display: flex;
    justify-content: flex-start; 
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
}

/* ==================== BOTONES ==================== */
.btn {
    padding: 0.75rem 1.75rem;
    border-radius: 6px;
    font-weight: 500;
    transition: var(--transition-smooth);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: none; 
    font-size: var(--normal-font-size);
    letter-spacing: normal;
    position: relative;
    overflow: hidden;
    z-index: 1;
}
.btn::after { display: none; }
.btn-primary {
    background: linear-gradient(to bottom, var(--button-gradient-start), var(--button-gradient-end)); 
    color: white;
    box-shadow: 0 0 15px hsla(280, 80%, 60%, 0.2); 
}
.btn-primary:hover {
    background: linear-gradient(to bottom, var(--button-gradient-start), var(--button-gradient-end)); 
    box-shadow: 0 0 25px hsla(280, 90%, 70%, 0.5), 0 0 8px hsla(280, 90%, 70%, 0.3);
    transform: none; 
}
.btn-secondary {
    background-color: transparent; 
    color: var(--gray-700); 
    border: 1px solid var(--gray-300); 
    box-shadow: none; 
}
.btn-secondary:hover { 
    background-color: var(--gray-100); 
    color: var(--foreground); 
    border-color: var(--gray-500); 
    box-shadow: none; 
    transform: none; 
}

.scroll-down-indicator { display: none; }

/* ==================== PORTFOLIO TABS ==================== */
#portfolio {
    border-top: none; 
    padding-top: 0rem; 
    padding-bottom: 6rem; 
}
.portfolio-tabs {
    display: flex;
    justify-content: space-around; 
    width: 100%; 
    margin-bottom: 3rem;
}
.portfolio-tab {
    flex-grow: 1; 
    text-align: center; 
    font-family: var(--body-font);
    font-weight: 500;
    font-size: 0.95rem;
    color: var(--gray-600);
    padding: 1rem 0.5rem;
    border-bottom: 2px solid transparent; 
    transition: color 0.3s, border-color 0.3s;
    position: relative;
}
.portfolio-tab:hover {
    color: var(--foreground);
}
.portfolio-tab.active {
    color: var(--foreground);
    border-bottom-color: var(--accent-color); 
}
.portfolio-content-panel {
    display: none; 
    animation: fadeIn 0.5s ease;
}
.portfolio-content-panel#panel-web.active {
    display: block; 
}
.portfolio-content-panel:not(#panel-web).active {
    display: block;
}
.portfolio-item {
    background: var(--secondaryBg);
    border-radius: 8px;
    overflow: hidden;
    transition: var(--transition-smooth);
    box-shadow: var(--shadow-medium); 
}
.portfolio-item:hover {
    transform: none; 
    box-shadow: var(--shadow-large); 
}
.portfolio-item img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    object-position: top;
}
.portfolio-item p {
    padding: 1rem;
    font-weight: 500;
    color: var(--foreground);
    font-size: 0.9rem;
}
.portfolio-item-placeholder {
    background: var(--secondaryBg);
    border-radius: 8px;
    padding: 2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 200px;
    box-shadow: inset 0 0 10px rgba(0,0,0,0.3); 
}
.portfolio-content-panel .portfolio-item-placeholder p {
    color: var(--gray-600);
    font-size: 1rem;
    text-align: center;
    grid-column: 1 / -1; 
}
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* --- INICIO: Estilos para carrusel de Logos --- */
.portfolio-logo-img {
    background-color: #f4f4f8; /* Fondo claro para logos oscuros */
    border-radius: 8px;
    padding: 1rem;
    height: 260px; /* AUMENTADO */
    width: auto; /* Ancho automático para mantener proporción */
    max-width: 320px; /* AUMENTADO */
    object-fit: contain; /* Asegura que el logo entre completo */
    box-shadow: var(--shadow-medium);
    transition: background-color 0.3s;
}

/* Anulación para logos blancos */
.portfolio-logo-img.logo-invert-bg {
    background-color: #111; /* Fondo oscuro para logos blancos */
}

/* Para que no se puedan seleccionar/arrastrar */
.scroller[data-type="logos"] {
    pointer-events: none;
}
/* --- FIN: Estilos de Logos --- */


/* ==================== INFINITE SCROLLER (TESTIMONIOS & PORTFOLIO WEB) ==================== */
.scroller {
    -webkit-mask: linear-gradient(90deg, transparent, white 10%, white 90%, transparent);
    mask: linear-gradient(90deg, transparent, white 10%, white 90%, transparent);
}

/* ESTA ES LA REGLA ACTUALIZADA */
#panel-web .scroller + .scroller,
#panel-apps .scroller + .scroller,
#panel-presencia .scroller + .scroller {
margin-top: 1.5rem; 
}


#testimonios .scroller { 
    margin-bottom: 1.5rem; 
}
.scroller__inner { display: flex; gap: 2.5rem; width: max-content; }
.scroller[data-direction="right"] .scroller__inner { animation-direction: reverse; }

/* === NUEVAS REGLAS DE ANIMACIÓN === */
/* 1. Regla base para activar la animación */
.scroller[data-animated="true"] .scroller__inner {
    animation-name: scroll;
    animation-timing-function: linear;
    animation-iteration-count: infinite;
    /* La duración se define abajo */
}

/* 2. Velocidades específicas por panel */
#panel-web .scroller__inner {
    animation-duration: 45s; /* Tu valor para Páginas Webs */
}
#panel-apps .scroller__inner {
    animation-duration: 15s; /* Tu valor para Apps */
}
#panel-presencia .scroller__inner {
    animation-duration: 25s; /* Tu valor para Marketing */
}
/* Asegúrate de que los testimonios sigan teniendo una velocidad */
#testimonios .scroller__inner {
    animation-duration: 25s; 
}
@keyframes scroll { to { transform: translate(calc(-50% - 0.75rem)); } }

/* --- DESPUÉS (Opacidad completa) --- */
/* Estilos SÓLO para screenshots de WEBS */
#panel-web .scroller__inner img {
    height: 220px; 
    width: auto;
    max-width: 350px; 
    border-radius: 8px;
    object-fit: cover;
    object-position: top;
    transition: var(--transition-smooth);
    opacity: 1; /* <-- CAMBIADO A 1 PARA MÁXIMA NITIDEZ */
    box-shadow: var(--shadow-medium);
    image-rendering: auto; /* Opcional: Ayuda al navegador a priorizar calidad */
}

/* El :hover debe aplicar a TODAS las imágenes del scroller, incluidas las de panel-web */
.scroller__inner img:hover { 
    transform: scale(1.03); 
    opacity: 1; 
    box-shadow: var(--shadow-large); 
}

/* ==================== SERVICIOS (ZIGZAG CON HIGHLIGHT Y TREN) ==================== */
#servicios { 
    overflow: hidden; 
}
.services-path-container {
    position: relative; 
    display: flex;
    flex-direction: column;
    align-items: center !important; 
    gap: 12rem; 
    padding: 0rem 0; 
}
.service-path-item {
    width: 90%; 
    max-width: 700px; 
    position: relative; 
    z-index: 2; 
}

.service-path-item.animate-on-scroll {
    opacity: 1;
    transform: none;
}

#servicios .service-path-item:nth-child(odd) { 
    align-self: flex-start; 
    padding-right: 10%; 
}
#servicios .service-path-item:nth-child(even) { 
    align-self: flex-end; 
    padding-left: 10%; 
}

.service-card-path {
    background-color: var(--secondaryBg); 
    padding: 2.5rem; 
    border-radius: 12px; 
    text-align: left;
    transition: var(--transition-highlight); 
    box-shadow: var(--shadow-medium); 
    opacity: 1; 
    border: 1px solid rgba(255, 255, 255, 0.10);
    transform: translateY(0); /* Estado inicial para la transición de hover */
}

/* === MODIFICADO: Estilos para .highlighted === */
/* Aplicamos el mismo efecto que el hover */
.service-card-path.highlighted {
    box-shadow: var(--shadow-large), var(--highlight-glow); 
    border-color: hsla(280, 80%, 60%, 0.5); 
    transform: translateY(-5px); /* Opcional: Levanta la tarjeta */
}

/* Efecto Hover para tarjetas (Solo en Desktop) */
.service-card-path:hover {
    box-shadow: var(--shadow-large), var(--highlight-glow); 
    border-color: hsla(280, 80%, 60%, 0.5); 
}


.service-card-path i.service-icon,
.service-card-path i {
    font-size: 2rem; 
    color: var(--accent-color); 
    margin-bottom: 1rem; 
    display: inline-block; 
}
.service-card-path h4.service-title,
.service-card-path h4 {
    font-size: 1.7rem; 
    color: var(--foreground); 
    margin-bottom: 0.75rem; 
    font-weight: 600; 
}
.service-card-path p.service-description,
.service-card-path p {
    font-size: 1rem; 
    color: var(--gray-600);
    line-height: 1.6; 
}

/* Línea Conectora SVG (Solo para #servicios) */
.connecting-line {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1; 
    pointer-events: none; 
    overflow: visible; 
}
#servicesPathDesktop { 
    display: block; 
}
#servicesPathMobile { 
    display: none; 
}
.connecting-line path {
    stroke-width: 1.5; 
    fill: none;
    stroke-dasharray: 5, 5; 
}

#path-indicator-capsule {
    transition: transform 0.1s linear; 
    transform-origin: center center; 
}

/* ==================== ABOUT US SECTION ==================== */
#about-us {
    background-color: var(--background); 
}
.about-us-container {
    display: grid;
    grid-template-columns: 1fr minmax(300px, 400px); 
    gap: 4rem; 
    align-items: center;
}
.about-us-content p {
    font-size: var(--hero-description-font-size); 
    line-height: var(--hero-description-line-height); 
    color: var(--gray-500); 
    max-width: 750px; 
    margin: 0 0 1.5rem; 
}
.about-us-content .btn {
    margin-top: 1rem; 
}
.about-us-image img {
    border-radius: 12px;
    box-shadow: var(--shadow-large); 
    width: 100%;
}

/* ==================== VENTAJAS (ID="PROCESO") GRID LAYOUT ==================== */
#proceso .advantages-grid-container {
    display: grid;
    grid-template-columns: repeat(2, minmax(300px, 1fr)); 
    gap: 2.5rem; 
    max-width: 1000px; 
    margin: 0 auto; 
    padding: 0; 
}

#proceso .service-path-item {
    width: 100%; 
    max-width: none;
    align-self: auto; 
    padding: 0;
}

#proceso .service-card-path {
    height: 100%; 
}


/* ==================== TESTIMONIALS ==================== */
.testimonial-card {
    background-color: var(--secondaryBg);
    padding: 2rem;
    border-radius: 8px;
    text-align: left;
    box-shadow: var(--shadow-medium); 
    width: 380px;
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    transition: var(--transition-smooth); 
}
.testimonial-card:hover { 
    transform: none; 
    box-shadow: var(--shadow-large); 
} 
.testimonial-card p { font-size: 1rem; font-style: normal; color: var(--foreground); margin-bottom: 1rem; line-height: 1.7; }
.testimonial-author { font-weight: 500; color: var(--gray-600); font-size: var(--small-font-size); margin-top: auto; }

/* ==================== CTA (CALL TO ACTION) ==================== */
#contact { padding: 0; } 
#contact .section-card-bg {
    padding: 6rem 0; 
    text-align: center; 
}
.cta-title { color: var(--foreground); font-size: clamp(1.8rem, 5vw, 2.8rem); font-weight: 600; margin-bottom: 1rem; }
.cta-description { color: var(--gray-600); margin: 0 auto 2.5rem; max-width: 550px; font-size: 1rem; line-height: 1.7; }
.btn-cta i { font-size: 1.2rem; margin-right: 0.5rem; } 

/* ==================== FOOTER ==================== */
.footer { padding: 6rem 0 0; } 
.footer-container { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 3rem; padding-bottom: 3rem; }
.footer-logo { display: inline-block; }
.footer-group { color: var(--gray-600); font-size: var(--small-font-size); }
.footer-logo img { height: 40px; margin-bottom: 1rem; }
.footer-about p { max-width: 300px; line-height: 1.7; margin-top: 1rem; }
.footer-group h4 { font-size: 0.9rem; margin-bottom: 1rem; color: var(--foreground); letter-spacing: 0.5px; font-weight: 500; text-transform: uppercase; }
.footer-group ul { display: flex; flex-direction: column; gap: 0.75rem; }
.footer-group a { color: var(--gray-600); transition: color 0.2s; }
.footer-group a:hover { color: var(--foreground); }
ul.footer-contact a { display: flex; align-items: center; gap: 0.75rem; }
ul.footer-contact i { font-size: 1.1rem; color: var(--gray-500); }
.footer-social { margin-top: 1rem; display: flex; gap: 1rem; }
.footer-social a { font-size: 1.3rem; }
.footer-copy-wrapper { padding: 1.5rem 0; }
.footer-copy-wrapper p { text-align: center; font-size: 0.8rem; color: var(--gray-400); }

/* ==================== FLOATING WHATSAPP BUTTON ==================== */
.whatsapp-float { position: fixed; bottom: 20px; right: 20px; width: 50px; height: 50px; background-color: #25D366; color: #FFF; border-radius: 50%; text-align: center; font-size: 24px; box-shadow: var(--shadow-medium); z-index: 100; display: flex; align-items: center; justify-content: center; transition: var(--transition-smooth); }
.whatsapp-float:hover { 
    transform: scale(1.1); 
    background-color: #128C7E; 
    box-shadow: 0 5px 15px rgba(37, 211, 102, 0.4); 
}

/* ==================== ANIMACIONES ON SCROLL ==================== */
.animate-on-scroll { opacity: 0; transform: translateY(20px); transition: opacity 0.6s ease-out, transform 0.6s ease-out; }
.animate-on-scroll.animated { opacity: 1; transform: translateY(0); }
.about-us-image.animate-on-scroll { transition-delay: 0.2s; }

/* ==================== RESPONSIVE DESIGN ==================== */
@media screen and (max-width: 992px) {
    .container { padding: 0px 15px !important; }
    .section { padding: 4rem 0; } 
    .section-card-bg { max-width: calc(100% - 30px); padding: 5rem 0;} 
    .section-light { padding-top: 1.5rem; padding-bottom: 1.5rem; }

    .about-us-container { grid-template-columns: 1fr; text-align: center;}
    .about-us-content p { font-size: 18px; margin-left: auto; margin-right: auto;}
    .about-us-image { max-width: 400px; margin: 0 auto; }
    
    .services-path-container {
        gap: 4rem; 
    } 

    .hero {

    min-height: 60vh; 

}
    
    .service-path-item { 
        opacity: 1 !important; 
        filter: none !important;
    }
    
    #servicesPathDesktop { display: none; }
    #servicesPathMobile { display: block; }
    
    #servicios .service-path-item,
    #servicios .service-path-item:nth-child(odd),
    #servicios .service-path-item:nth-child(even) { 
        align-self: center !important; 
        padding-left: 0 !important;
        padding-right: 0 !important;
    }
    
    .service-card-path { width: 90%; opacity: 1; margin: 0 auto;} /* Añadido margin auto */

    /* === AÑADIDO: Desactivar hover en responsive === */
    /* Apuntamos específicamente a las tarjetas dentro de #proceso y #servicios */
    #proceso .service-card-path:hover,
    #servicios .service-card-path:hover {
        box-shadow: var(--shadow-medium); /* Sombra normal */
        border-color: rgba(255, 255, 255, 0.10); /* Borde normal */
        transform: translateY(0); /* Sin elevación */
    }

    /* === CORRECCIÓN TABLET === 
       Se eliminó la regla 'grid-template-columns: 1fr;' de #proceso .advantages-grid-container
       para que se mantenga en 2 columnas en tablets.
       La regla de 1 columna se aplica en el breakpoint de 768px.
    */

    .footer-container { 
        grid-template-columns: 1fr; 
        justify-items: center;
    }
    .footer-about { 
        display: none; 
    }
    .footer-group {
        text-align: center;
    }
    .footer-group ul {
        align-items: center; 
    }
    ul.footer-contact, .footer-social { 
        justify-content: center; 
    }
}

@media screen and (max-width: 768px) {
    body { font-size: 0.95rem; }
    .section { padding: 4rem 0; } 
    .section-card-bg { max-width: calc(100% - 20px); padding: 4rem 0; border-radius: 12px;} 
    .section-light { padding-top: 1rem; padding-bottom: 1rem; }

    .nav-toggle { display: block; }
    .nav-menu { position: fixed; top: 0; left: -100%; width: 100%; height: 100%; background-color: var(--background); box-shadow: none; z-index: 2000; transition: left 0.35s ease-out; display: flex; flex-direction: column; justify-content: center; align-items: center; padding-top: var(--header-height); overflow-y: auto; }
    .show-menu { left: 0; }
    .nav-list { flex-direction: column; align-items: center; gap: 2rem; width: 100%; text-align: center; padding: 2rem 0; }
    .nav-link { font-size: 1.5rem; color: var(--foreground); }
    .nav-link:hover { background-color: transparent; color: var(--accent-color); }
    .nav-link-button { font-size: 1.2rem; padding: 0.8rem 1.8rem; background: linear-gradient(to bottom, var(--button-gradient-start), var(--button-gradient-end)); color: white !important; border: none;}
    .nav-link-button:hover { background: linear-gradient(to bottom, var(--button-gradient-start), var(--button-gradient-end)); box-shadow: 0 0 20px hsla(280, 90%, 70%, 0.5), 0 0 8px hsla(280, 90%, 70%, 0.3); color: white !important; }
    .nav-close { position: absolute; top: 1rem; right: 1.5rem; font-size: 2rem; color: var(--foreground); display: block; }
    .nav-toggle { position: fixed; right: 1.5rem; top: calc( (var(--header-height) - 1.5rem) / 2); z-index: 2001; }

    .hero { min-height: 65vh; text-align: left; padding-top: calc(var(--header-height) + 2rem); } 
    .hero-content-wrapper { margin: 0; } 
    .hero-title { font-size: clamp(1rem, 9vw, 3rem); margin-bottom: 10px !important;}
    .hero-description { font-size: 1.1rem; margin-left: 0; margin-right: 0; margin-bottom: 25px; max-width: 90%; } 
    .hero-buttons { justify-content: flex-start; } 
    .hero-buttons .btn-secondary { display: none; } 
    
    .portfolio-tabs { gap: 0.1rem; justify-content: space-between; flex-wrap: wrap;} 
    .portfolio-tab { font-size: 0.7rem; padding: 0.7rem 0.05rem; } 
    
    /* Apuntamos solo a los logos de Apps y Marketing */
    #panel-apps .portfolio-logo-img,
    #panel-presencia .portfolio-logo-img {
        height: 120px !important; /* AUMENTADO */
        padding: 0.75rem;
        max-width: 200px; /* AÑADIDO un tope móvil */
    }

    /* Apuntamos solo a las imágenes de la pestaña Web */
   /* Apuntamos solo a las imágenes de la pestaña Web */
#panel-web .scroller__inner img { 
height: 120px !important; /* REDUCIDO para que coincida con las otras pestañas */
max-width: 180px !important; /* REDUCIDO para que coincida con las otras pestañas */
}
    .services-path-container {
        gap: 4rem;
    } 
    .service-card-path { width: 95%; padding: 2rem; opacity: 1; } 
    /* No necesitamos .highlighted aquí porque el JS lo controla */

    .about-us-container { grid-template-columns: 1fr; gap: 2rem; text-align: left; } 
    .about-us-image { order: -1; margin-bottom: 2rem;} 

    #proceso .advantages-grid-container {
        grid-template-columns: 1fr; 
        gap: 2rem;
    }
    
    .footer-container { 
        grid-template-columns: 1fr; 
        text-align: center;
        gap: 1.5rem;
    }
    .footer-about { 
        display: none; 
    } 
    .footer-group ul { 
        align-items: center; 
    } 
    ul.footer-contact, .footer-social { 
        justify-content: center; 
    }

    .whatsapp-float { width: 45px; height: 45px; font-size: 22px; bottom: 15px; right: 15px; }
}