/* ================================================
   WIRESERVICE.CL — Tema Claro con Acentos Aurora
   ================================================ */

:root {
    --bg:           #F7FAFB;
    --bg-alt:       #FFFFFF;
    --bg-dark:      #0D1B2A;
    --text:         #0F1F2E;
    --text-muted:   #4A6375;
    --teal:         #17B89A;
    --teal-light:   #E8FAF6;
    --teal-glow:    rgba(23, 184, 154, .2);
    --violet:       #7C3AED;
    --border:       #DDE6ED;
    --border-dark:  #B8CDD8;
    --shadow-sm:    0 1px 4px rgba(15, 31, 46, .07);
    --shadow:       0 4px 20px rgba(15, 31, 46, .08);
    --shadow-lg:    0 12px 40px rgba(15, 31, 46, .12);
    --radius:       10px;
    --radius-lg:    16px;
}

/* --- Reset & Base --- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
    font-family: 'Inter', system-ui, sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.65;
    font-size: 16px;
}
h1, h2, h3 { font-family: 'Outfit', sans-serif; line-height: 1.2; }
img { max-width: 100%; display: block; }
a { text-decoration: none; color: inherit; }
ul { list-style: none; }

/* --- Layout --- */
.container {
    width: 100%;
    max-width: 1120px;
    margin: 0 auto;
    padding: 0 1.5rem;
}
section { padding: 5rem 0; }
.section-alt { background: var(--bg-alt); }

.section-header {
    text-align: center;
    margin-bottom: 3.5rem;
}
.section-header h2 {
    font-size: 2rem;
    color: var(--text);
    margin-bottom: .5rem;
}
.section-header p {
    color: var(--text-muted);
    font-size: 1.05rem;
}

/* --- Header --- */
#header {
    position: fixed;
    top: 0; left: 0; right: 0;
    z-index: 100;
    background: rgba(247, 250, 251, .95);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border-bottom: 1px solid var(--border);
    transition: box-shadow .3s;
}
.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 68px;
}
.logo-text {
    font-family: 'Outfit', sans-serif;
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--text);
    letter-spacing: -.01em;
}
.logo-ws { font-weight: 800; color: var(--teal); }

nav ul { display: flex; align-items: center; gap: 2rem; }
nav a {
    font-size: .9rem;
    font-weight: 500;
    color: var(--text-muted);
    transition: color .2s;
}
nav a:hover { color: var(--text); }

.btn-nav {
    background: var(--bg-dark);
    color: #FFFFFF !important;
    padding: .45rem 1.25rem;
    border-radius: 6px;
    font-weight: 600 !important;
    transition: background .2s !important;
}
.btn-nav:hover { background: var(--teal) !important; color: #FFFFFF !important; }

/* --- Botones --- */
.btn-primary {
    display: inline-block;
    background: var(--teal);
    color: #FFFFFF;
    padding: .75rem 2rem;
    border-radius: var(--radius);
    font-weight: 700;
    font-size: .95rem;
    transition: background .2s, box-shadow .2s, transform .15s;
}
.btn-primary:hover {
    background: #13A087;
    box-shadow: 0 6px 20px var(--teal-glow);
    transform: translateY(-1px);
}
.btn-ghost {
    display: inline-block;
    border: 1.5px solid var(--border-dark);
    color: var(--text-muted);
    padding: .75rem 2rem;
    border-radius: var(--radius);
    font-weight: 600;
    font-size: .95rem;
    transition: border-color .2s, color .2s;
}
.btn-ghost:hover { border-color: var(--teal); color: var(--teal); }
.btn-lg { padding: 1rem 2.5rem; font-size: 1rem; }

/* --- Hero --- */
#hero {
    padding-top: 8rem;
    padding-bottom: 5rem;
    background: var(--bg);
    position: relative;
    overflow: hidden;
}

#hero::before, #hero::after {
    content: '';
    position: absolute;
    width: 600px;
    height: 600px;
    border-radius: 50%;
    filter: blur(120px);
    z-index: 0;
    opacity: 0.15;
    animation: aurora 20s infinite alternate ease-in-out;
}

#hero::before {
    top: -10%;
    left: -10%;
    background: var(--teal);
}

#hero::after {
    bottom: -10%;
    right: -10%;
    background: var(--violet);
    animation-delay: -5s;
}

@keyframes aurora {
    0% { transform: translate(0, 0) scale(1); }
    100% { transform: translate(100px, 50px) scale(1.1); }
}

.hero-inner { 
    text-align: center; 
    position: relative;
    z-index: 1;
}

.hero-tag {
    display: inline-block;
    background: var(--teal-light);
    border: 1px solid rgba(23,184,154,.3);
    color: var(--teal);
    font-size: .78rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .1em;
    padding: .35rem 1.1rem;
    border-radius: 100px;
    margin-bottom: 1.5rem;
}
.hero-inner h1 {
    font-size: clamp(1.9rem, 4vw, 3rem);
    color: var(--text);
    margin-bottom: 1.25rem;
    line-height: 1.25;
}
.highlight { color: var(--teal); }
.hero-sub {
    font-size: 1.1rem;
    color: var(--text-muted);
    max-width: 620px;
    margin: 0 auto 2.5rem;
    line-height: 1.7;
}
.hero-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
    margin-bottom: 3.5rem;
}
.hero-stats {
    display: inline-flex;
    align-items: center;
    gap: 2.5rem;
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.5);
    border-radius: var(--radius-lg);
    padding: 1.4rem 3rem;
    box-shadow: var(--shadow);
}
.stat { text-align: center; }
.stat strong {
    display: block;
    font-family: 'Outfit', sans-serif;
    font-size: 1.7rem;
    font-weight: 700;
    color: var(--teal);
}
.stat span { font-size: .8rem; color: var(--text-muted); font-weight: 500; }
.stat-divider { width: 1px; height: 40px; background: rgba(0, 0, 0, 0.05); }

/* --- Servicios --- */
.services-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
}
.service-card {
    background: rgba(255, 255, 255, 0.5);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(255, 255, 255, 0.8);
    border-radius: var(--radius-lg);
    padding: 2.5rem 2rem;
    box-shadow: 
        0 4px 6px -1px rgba(15, 31, 46, 0.05),
        0 2px 4px -1px rgba(15, 31, 46, 0.03);
    transition: all .4s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    flex-direction: column;
    position: relative;
    overflow: hidden;
}
.service-card::after {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: var(--radius-lg);
    padding: 1px;
    background: linear-gradient(135deg, rgba(255,255,255,0.8), transparent 50%, rgba(23,184,154,0.2) 100%);
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    pointer-events: none;
}
.service-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    background: radial-gradient(circle at top right, rgba(23, 184, 154, 0.05), transparent);
    opacity: 0;
    transition: opacity .4s ease;
}
.service-card:hover {
    box-shadow: var(--shadow-lg), 0 0 0 1px rgba(23, 184, 154, 0.15);
    border-color: rgba(23, 184, 154, 0.3);
    transform: translateY(-8px);
    background: rgba(255, 255, 255, 0.8);
}
.service-card:hover::before {
    opacity: 1;
}
.service-icon {
    width: 56px;
    height: 56px;
    background: linear-gradient(135deg, var(--teal-light) 0%, #FFFFFF 100%);
    border: 1px solid rgba(23, 184, 154, 0.2);
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.5rem;
    color: var(--teal);
    box-shadow: 0 8px 16px -4px var(--teal-glow);
    transition: all .4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}
.service-card:hover .service-icon {
    transform: scale(1.1) rotate(5deg);
    background: var(--teal);
    color: #FFFFFF;
    box-shadow: 0 12px 20px -5px var(--teal-glow);
}
.service-icon svg { width: 28px; height: 28px; }

.service-card h3 { 
    font-size: 1.15rem; 
    color: var(--text); 
    margin-bottom: .8rem;
    font-weight: 700;
}
.service-card p { 
    font-size: .92rem; 
    color: var(--text-muted); 
    line-height: 1.7;
    margin-bottom: 1.5rem;
    flex-grow: 1;
}

.service-footer {
    padding-top: 1.25rem;
    border-top: 1px solid rgba(15, 31, 46, 0.05);
}
.service-link {
    display: flex;
    align-items: center;
    gap: .5rem;
    font-size: .85rem;
    font-weight: 700;
    color: var(--teal);
    transition: all .3s ease;
}
.service-link svg {
    width: 16px;
    height: 16px;
    transition: transform .3s ease;
}
.service-card:hover .service-link {
    gap: .75rem;
}
.service-card:hover .service-link svg {
    transform: translateX(3px);
}

/* --- Clientes: Ecosistema & Marquee --- */
.ecosystem-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
    margin-bottom: 5rem;
}

.eco-card {
    background: rgba(255, 255, 255, 0.6);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.4);
    border-radius: var(--radius-lg);
    padding: 2.5rem;
    display: flex;
    flex-direction: column;
    transition: all .5s cubic-bezier(0.23, 1, 0.32, 1);
    position: relative;
    overflow: hidden;
    box-shadow: 
        0 4px 6px -1px rgba(0, 0, 0, 0.02),
        0 2px 4px -1px rgba(0, 0, 0, 0.01);
}

.eco-card::before {
    content: '';
    position: absolute;
    top: 0; left: -100%; width: 50%; height: 100%;
    background: linear-gradient(
        to right,
        transparent,
        rgba(255, 255, 255, 0.4),
        transparent
    );
    transform: skewX(-25deg);
    transition: none;
}

.eco-card:hover {
    transform: translateY(-10px) scale(1.02);
    box-shadow: 
        0 20px 25px -5px rgba(15, 31, 46, 0.1),
        0 8px 10px -6px rgba(15, 31, 46, 0.05);
    border-color: var(--teal);
    background: #FFFFFF;
}

.eco-card:hover::before {
    left: 150%;
    transition: all 0.75s ease;
}

.eco-badge {
    position: absolute;
    top: 1.25rem;
    right: 1.25rem;
    font-size: 0.62rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--teal);
    background: var(--teal-light);
    padding: 0.35rem 0.75rem;
    border-radius: 6px;
    border: 1px solid rgba(23, 184, 154, 0.1);
}

.eco-logo {
    height: 70px;
    margin-bottom: 1.75rem;
    display: flex;
    align-items: center;
    transition: transform .4s ease;
}

.eco-card:hover .eco-logo {
    transform: scale(1.05);
}

.eco-logo img {
    height: 100%;
    width: auto;
    max-width: 180px;
    object-fit: contain;
    opacity: 0.85;
    transition: all .4s ease;
}

.eco-card:hover .eco-logo img {
    opacity: 1;
    filter: drop-shadow(0 4px 8px rgba(0,0,0,0.05));
}

.eco-card h3 {
    font-size: 1.35rem;
    color: var(--text);
    margin-bottom: 0.85rem;
    font-weight: 700;
}

.eco-card p {
    font-size: 0.95rem;
    color: var(--text-muted);
    line-height: 1.7;
    margin-bottom: 2rem;
    flex-grow: 1;
}

.eco-link {
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--teal);
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: gap .3s ease;
}

.eco-card:hover .eco-link {
    gap: .75rem;
}

/* Marquee Styles */
.marquee-container {
    padding: 3rem 0;
    background: rgba(23, 184, 154, 0.03);
    border-radius: var(--radius-lg);
    border: 1px dashed var(--border);
    overflow: hidden;
}

.marquee-title {
    text-align: center;
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.15em;
    margin-bottom: 2rem;
}

.marquee {
    position: relative;
    width: 100%;
    display: flex;
    overflow: hidden;
    user-select: none;
    gap: 3rem;
    mask-image: linear-gradient(
        to right,
        transparent,
        black 15%,
        black 85%,
        transparent
    );
}

.marquee-content {
    flex-shrink: 0;
    display: flex;
    justify-content: space-around;
    gap: 4rem;
    min-width: 100%;
    animation: scroll-marquee 40s linear infinite;
}

.marquee-item {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    height: 55px;
    opacity: 0.8;
    transition: opacity 0.3s ease;
}

.marquee-item:hover {
    opacity: 1;
}

.marquee-item img {
    height: 100%;
    width: auto;
    max-width: 150px;
}

@keyframes scroll-marquee {
    from { transform: translateX(0); }
    to { transform: translateX(-50%); }
}

@media (hover: none) {
    .eco-logo img, .marquee-item { filter: grayscale(0); opacity: 1; }
}
/* --- Modal de Clientes --- */
.modal-overlay {
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: rgba(13, 27, 42, 0.4);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.modal-window {
    background: #FFFFFF;
    width: 90%;
    max-width: 950px;
    max-height: 85vh;
    border-radius: var(--radius-lg);
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    position: relative;
    overflow: hidden;
    transform: scale(0.9) translateY(20px);
    transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.modal-overlay.active .modal-window {
    transform: scale(1) translateY(0);
}

.modal-close {
    position: absolute;
    top: 1.5rem;
    right: 1.5rem;
    background: var(--bg);
    border: 1px solid var(--border);
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--text-muted);
    transition: all 0.2s;
    z-index: 10;
}

.modal-close:hover {
    background: var(--teal);
    color: #FFFFFF;
    border-color: var(--teal);
}

.modal-body {
    padding: 3.5rem 3rem;
    overflow-y: auto;
    max-height: 85vh;
}

.modal-header {
    text-align: center;
    margin-bottom: 3rem;
}

.modal-header h2 {
    font-size: 2rem;
    margin-bottom: 0.5rem;
}

.modal-header p {
    color: var(--text-muted);
}

.modal-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 1.25rem;
}

.gallery-item {
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 2rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    transition: all 0.25s ease;
    text-decoration: none;
    height: 160px;
}

.gallery-item:hover {
    background: #FFFFFF;
    border-color: var(--teal);
    transform: translateY(-4px);
    box-shadow: var(--shadow);
}

.gallery-item img {
    max-height: 48px;
    width: auto;
    margin-bottom: 1rem;
    object-fit: contain;
}

.gallery-item span {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-muted);
}

.client-placeholder {
    width: 50px;
    height: 50px;
    background: var(--teal-light);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    color: var(--teal);
    font-size: 1.2rem;
    margin-bottom: 0.75rem;
}

@media (max-width: 640px) {
    .modal-body { padding: 2.5rem 1.25rem; }
    .modal-gallery { grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 0.75rem; }
    .gallery-item { height: 120px; padding: 1.25rem; }
}
/* --- Partners / Logos Grid --- */
.logos-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: 3rem;
    padding: 2rem 0;
}

.logos-grid--sm {
    gap: 2.5rem;
}

.logo-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    transition: all 0.3s ease;
    opacity: 0.9;
    filter: none;
    max-width: 180px;
}

.logo-item:hover {
    opacity: 1;
    transform: translateY(-5px);
}

.logo-item img {
    height: 60px;
    width: auto;
    margin-bottom: 0.85rem;
    object-fit: contain;
}

.logo-item span {
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.logo-item:hover span {
    opacity: 1;
}

@media (max-width: 768px) {
    .logos-grid { gap: 2rem; }
    .logo-item { opacity: 1; filter: grayscale(0); }
    .logo-item span { opacity: 1; }
}

#contacto { 
    background: var(--bg);
    background: 
        radial-gradient(circle at 10% 10%, rgba(23, 184, 154, 0.05) 0%, transparent 40%),
        radial-gradient(circle at 90% 90%, rgba(124, 58, 237, 0.03) 0%, transparent 40%),
        linear-gradient(180deg, var(--bg) 0%, var(--bg-alt) 100%);
    position: relative;
    overflow: hidden;
    border-top: 1px solid var(--border);
}

#contacto .cta-box {
    text-align: center;
    padding: 5rem 3rem;
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(255, 255, 255, 0.5);
    border-radius: 28px;
    max-width: 850px;
    margin: 0 auto;
    box-shadow: 
        0 20px 40px rgba(15, 31, 46, 0.05),
        inset 0 1px 1px rgba(255, 255, 255, 0.8);
}

#contacto .cta-box h2 {
    font-size: clamp(1.8rem, 4vw, 2.6rem);
    color: var(--text);
    margin-bottom: 1rem;
    font-weight: 800;
    letter-spacing: -0.02em;
}

#contacto .cta-box p {
    color: var(--text-muted);
    margin-bottom: 2.5rem;
    font-size: 1.15rem;
    max-width: 550px;
    margin-left: auto;
    margin-right: auto;
    line-height: 1.6;
}

/* --- Footer --- */
footer { 
    background: var(--bg-alt); 
    border-top: 1px solid var(--border); 
    padding-bottom: 2rem;
}
.footer-inner {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    padding-top: 3rem;
    padding-bottom: 2rem;
    gap: 2rem;
}
.footer-logo  { display: block; margin-bottom: .8rem; font-size: 1.35rem; }
.footer-brand p { font-size: .95rem; color: var(--text-muted); max-width: 280px; line-height: 1.6; }

.footer-contact {
    display: flex;
    flex-direction: column;
    gap: .75rem;
}
.footer-contact-item {
    font-size: .9rem;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: .85rem;
    transition: color 0.2s;
}
.footer-contact-item:hover {
    color: var(--text);
}
.footer-contact-item svg {
    width: 18px;
    height: 18px;
    color: var(--teal);
    opacity: 0.8;
}

.footer-links { display: flex; flex-direction: column; gap: .75rem; align-items: flex-end; }
.footer-links a { font-size: .9rem; color: var(--text-muted); transition: color .2s; }
.footer-links a:hover { color: var(--teal); }
.footer-bottom { border-top: 1px solid var(--border); padding-top: 1.25rem; padding-bottom: 1.5rem; }
.footer-bottom p { font-size: .82rem; color: var(--text-muted); opacity: 0.7; }

/* --- WhatsApp Flotante --- */
.whatsapp-float {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 60px;
    height: 60px;
    background-color: #25d366;
    color: #FFF;
    border-radius: 50px;
    text-align: center;
    font-size: 30px;
    box-shadow: 0 4px 15px rgba(37, 211, 102, .3);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform .3s, background-color .3s;
}
.whatsapp-float:hover {
    transform: scale(1.1);
    background-color: #20ba5a;
}
.whatsapp-float svg {
    width: 32px;
    height: 32px;
    fill: currentColor;
}

/* --- Modal de Servicios --- */
.modal-window--service {
    max-width: 800px;
    padding: 0;
}

.service-modal-content {
    display: flex;
    gap: 3rem;
    align-items: flex-start;
}

.service-modal-icon {
    flex-shrink: 0;
    width: 80px;
    height: 80px;
    background: var(--teal-light);
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--teal);
    box-shadow: 0 10px 25px var(--teal-glow);
}

.service-modal-icon svg {
    width: 40px;
    height: 40px;
}

.service-modal-text h2 {
    font-size: 2.25rem;
    margin-bottom: 1.5rem;
    color: var(--text);
}

.service-detailed-desc {
    font-size: 1.1rem;
    color: var(--text-muted);
    line-height: 1.8;
    margin-bottom: 2.5rem;
}

.service-detailed-desc strong {
    color: var(--teal);
    font-weight: 700;
}

.service-modal-actions {
    display: flex;
    gap: 1rem;
}

@media (max-width: 768px) {
    .service-modal-content {
        flex-direction: column;
        gap: 2rem;
        align-items: center;
        text-align: center;
    }
    .service-modal-actions {
        justify-content: center;
    }
}

/* ── HAMBURGER BUTTON ─────────────────────────────────────────────────── */
.nav-hamburger {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 6px 4px;
    z-index: 200;
    flex-shrink: 0;
}
.nav-hamburger span {
    display: block;
    width: 24px;
    height: 2px;
    background: var(--text);
    border-radius: 2px;
    transition: transform 0.3s ease, opacity 0.3s ease;
    transform-origin: center;
}
.nav-hamburger.is-open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-hamburger.is-open span:nth-child(2) { opacity: 0; transform: scaleX(0); }
.nav-hamburger.is-open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ── RESPONSIVE ───────────────────────────────────────────────────────── */

/* Tablet: 2 columnas en servicios */
@media (max-width: 900px) {
    .services-grid { grid-template-columns: repeat(2, 1fr); }
    .hero-inner h1 { font-size: clamp(1.7rem, 5vw, 2.6rem); }
}

/* Mobile: menu hamburger y ajustes generales */
@media (max-width: 768px) {
    /* Header */
    .nav-hamburger { display: flex; }

    nav ul {
        position: fixed;
        top: 68px; left: 0; right: 0; bottom: 0;
        background: rgba(247, 250, 251, 0.97);
        backdrop-filter: blur(18px);
        -webkit-backdrop-filter: blur(18px);
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 2rem;
        z-index: 150;
        /* Oculto por defecto */
        opacity: 0;
        pointer-events: none;
        transform: translateY(-8px);
        transition: opacity 0.25s ease, transform 0.25s ease;
    }
    nav ul.nav-open {
        opacity: 1;
        pointer-events: auto;
        transform: translateY(0);
    }
    /* Restaurar todos los li (antes se ocultaban) */
    nav li { display: list-item !important; }
    nav a { font-size: 1.15rem; font-weight: 600; color: var(--text); }
    .btn-nav {
        font-size: 1rem !important;
        padding: 0.65rem 2rem !important;
    }

    /* Hero */
    #hero { padding-top: 6rem; }
    .hero-inner h1 { font-size: clamp(1.85rem, 6vw, 2.5rem); }
    .hero-sub { font-size: 1rem; }
    .hero-actions { gap: 0.75rem; }
    .hero-actions .btn-primary,
    .hero-actions .btn-ghost { width: 100%; text-align: center; }
    .hero-stats {
        flex-direction: row;
        flex-wrap: wrap;
        justify-content: center;
        gap: 1.25rem 2rem;
        padding: 1.25rem 1.5rem;
    }
    .stat-divider { display: none; }

    /* Servicios */
    .services-grid { grid-template-columns: 1fr; }
    section { padding: 3.5rem 0; }

    /* Clientes */
    .ecosystem-grid { grid-template-columns: 1fr; }
    .eco-card { padding: 2rem; }

    /* Partners */
    .logos-grid { gap: 1.75rem; }
    .logo-item img { height: 48px; }

    /* CTA Contacto */
    #contacto .cta-box { padding: 3rem 1.5rem; }
    #contacto .cta-box h2 { font-size: 1.6rem; }

    /* Footer */
    .footer-inner {
        flex-direction: column;
        gap: 2rem;
    }
    .footer-links {
        flex-direction: row;
        flex-wrap: wrap;
        align-items: flex-start;
        gap: 0.5rem 1.25rem;
    }
    .footer-brand p { max-width: 100%; }

    /* Modales */
    .modal-body { padding: 2.5rem 1.5rem; }
    .modal-window { width: 95%; max-height: 90vh; }
    .service-modal-content { flex-direction: column; gap: 1.5rem; align-items: center; text-align: center; }
    .service-modal-actions { justify-content: center; }
    .service-modal-text h2 { font-size: 1.6rem; }
}

/* Small mobile */
@media (max-width: 480px) {
    .container { padding: 0 1rem; }
    .hero-inner h1 { font-size: 1.85rem; }
    .hero-stats { gap: 1rem; padding: 1rem; border-radius: var(--radius); }
    .stat strong { font-size: 1.4rem; }
    .section-header h2 { font-size: 1.6rem; }
    .modal-gallery { grid-template-columns: repeat(2, 1fr); gap: 0.75rem; }
    .gallery-item { height: 110px; padding: 1rem; }
    .gallery-item img { max-height: 36px; }
    .whatsapp-float { width: 52px; height: 52px; bottom: 20px; right: 20px; }
    .whatsapp-float svg { width: 28px; height: 28px; }
    .logos-grid { gap: 1.25rem; }
    .logo-item img { height: 40px; }
}


