/* CSS Reset & Variables — Modern 2026 SaaS */
:root {
    --bg-base: #f5f7ff;
    --bg-card: rgba(255,255,255,0.75);
    --border-color: rgba(99,102,241,0.12);
    --border-glass: rgba(255,255,255,0.6);
    --text-main: #0b0f1e;
    --text-muted: #64748b;
    --accent: #4f46e5;
    --accent-light: #6366f1;
    --accent-cyan: #0ea5e9;
    --gradient-accent: linear-gradient(135deg, #4f46e5 0%, #0ea5e9 100%);
    --gradient-mesh: linear-gradient(135deg,#ede9fe 0%,#e0f2fe 50%,#f0fdf4 100%);
    --header-bg: rgba(248,249,255,0.82);
    --card-shadow: 0 4px 24px rgba(79,70,229,0.06), 0 1px 4px rgba(0,0,0,0.04);
    --radius-card: 18px;
    --radius-btn: 10px;
    --font-head: 'Outfit', sans-serif;
    --font-body: 'Inter', sans-serif;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    background-color: var(--bg-base);
    font-family: var(--font-body);
    color: var(--text-main);
    overflow-x: hidden;
    line-height: 1.6;
    -webkit-text-size-adjust: 100%;
}

/* Mesh gradient background */
body::before {
    content: '';
    position: fixed;
    inset: 0;
    background:
        radial-gradient(ellipse 80% 60% at 15% 0%, rgba(99,102,241,0.13) 0%, transparent 60%),
        radial-gradient(ellipse 60% 50% at 85% 100%, rgba(14,165,233,0.10) 0%, transparent 55%),
        radial-gradient(ellipse 50% 40% at 50% 50%, rgba(244,244,255,1) 0%, transparent 100%);
    background-color: #f5f7ff;
    z-index: -1;
    pointer-events: none;
}
.ambient-glow { display: none; }

/* Fixed Navigation Header */
header {
    position: fixed;
    top: 0; left: 0;
    width: 100%;
    height: 68px;
    padding: 0 32px;
    background: var(--header-bg);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    backdrop-filter: blur(20px) saturate(180%);
    border-bottom: 1px solid rgba(99,102,241,0.1);
    box-shadow: 0 1px 0 rgba(255,255,255,0.8) inset, 0 4px 20px rgba(79,70,229,0.06);
    z-index: 1000;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.brand-container {
    display: flex;
    align-items: center;
    text-decoration: none;
}

.logo-text {
    font-family: var(--font-head);
    font-size: 1.55rem;
    font-weight: 800;
    background: var(--gradient-accent);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    letter-spacing: -0.8px;
}

/* Header Navigation Links */
.header-nav {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 32px;
    flex: 1;
    margin: 0 40px;
}

.header-nav a {
    color: var(--text-muted);
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 600;
    transition: color 0.2s ease, transform 0.2s ease;
    position: relative;
    padding: 6px 0;
}

.header-nav a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--gradient-accent);
    transition: width 0.25s ease;
    border-radius: 2px;
}

.header-nav a:hover {
    color: var(--accent);
}

.header-nav a:hover::after {
    width: 100%;
}

/* Accessibility Focus States */
a:focus-visible,
button:focus-visible,
details summary:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 4px;
    border-radius: 4px;
}

input:focus-visible,
textarea:focus-visible,
select:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 0;
    border-radius: 4px;
}

/* Scroll offset for navigation targets to clear the sticky header */
#cobertura,
#referencias,
#servicios,
#proceso,
#contacto,
#srv-migracion,
#srv-apps,
#srv-integraciones,
#srv-despliegue,
#srv-capacitacion {
    scroll-margin-top: 88px;
}

/* Fixed/Sticky Top Right WhatsApp Button */
.whatsapp-fixed-btn {
    background: #25d366;
    color: #ffffff;
    padding: 10px 22px;
    border-radius: 30px;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.95rem;
    display: flex;
    align-items: center;
    gap: 8px;
    box-shadow: 0 4px 15px rgba(37, 211, 102, 0.4);
    transition: all 0.3s ease;
    position: relative;
}

.whatsapp-fixed-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(37, 211, 102, 0.6);
}

.whatsapp-fixed-btn svg {
    fill: currentColor;
}

/* Custom Tooltip using data-tooltip */
.whatsapp-fixed-btn::after {
    content: attr(data-tooltip);
    position: absolute;
    top: calc(100% + 12px);
    right: 0;
    width: 280px;
    background: #0f172a;
    color: #ffffff;
    padding: 12px 14px;
    border-radius: 8px;
    font-size: 0.8rem;
    font-weight: 500;
    line-height: 1.45;
    white-space: normal;
    text-align: left;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transform: translateY(4px);
    transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s ease;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.25);
    border: 1px solid rgba(255, 255, 255, 0.1);
    z-index: 1010;
}

.whatsapp-fixed-btn::before {
    content: '';
    position: absolute;
    top: calc(100% + 6px);
    right: 24px;
    border-width: 0 6px 6px 6px;
    border-style: solid;
    border-color: transparent transparent #0f172a transparent;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transform: translateY(4px);
    transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s ease;
    z-index: 1011;
}

.whatsapp-fixed-btn:hover::after,
.whatsapp-fixed-btn:hover::before {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

/* Header Contact Actions Wrapper */
.header-contact-actions {
    display: flex;
    align-items: center;
    gap: 4px;
}

/* Email Button in Header (Circular Icon Only) */
.email-header-btn {
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.15);
    color: #ffffff;
    padding: 10px 12px;
    border-radius: 50%;
    text-decoration: none;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    -webkit-backdrop-filter: blur(8px);
    backdrop-filter: blur(8px);
    height: 42px;
    width: 42px;
    flex-shrink: 0;
}
.email-header-btn:hover {
    background: rgba(255, 255, 255, 0.15);
    border-color: rgba(255, 255, 255, 0.3);
    transform: translateY(-2px);
}
.email-header-btn svg {
    stroke: #d8b4fe; /* Violet accent glow stroke */
}


/* =====================================================
   Hero Band — fixed title strip below header
   ===================================================== */
.hero-band {
    position: fixed;
    top: 68px;          /* sits just below the header */
    left: 0;
    width: 100%;
    z-index: 900;
    background: linear-gradient(135deg, #4f46e5 0%, #0ea5e9 100%);
    padding: 10px 40px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    box-shadow: 0 4px 24px rgba(79,70,229,0.25);
    transition: padding 0.3s ease, box-shadow 0.3s ease;
}

/* Compact mode when page scrolled */
.hero-band.band-compact {
    padding: 6px 40px;
    box-shadow: 0 2px 14px rgba(79,70,229,0.18);
}

.hero-content-wrap {
    width: 100%;
    text-align: center;
    display: flex;
    flex-direction: column;
    gap: 4px;
    align-items: center;
}

.hero-band-desc {
    color: rgba(255, 255, 255, 0.92);
    font-family: var(--font-head);
    font-size: 1.35rem;
    font-weight: 400;
    letter-spacing: 0.8px;
    text-shadow: 0 1px 4px rgba(0, 0, 0, 0.15);
    transition: opacity 0.25s ease, max-height 0.25s ease, margin 0.25s ease;
    max-height: 60px;
    opacity: 1;
    margin-top: 6px;
}

.hero-band.band-compact .hero-band-desc {
    opacity: 0;
    max-height: 0;
    margin: 0;
    overflow: hidden;
}

.hl-title {
    color: #22d3ee; /* vibrant cyan accent to highlight 'solidez y experiencia' */
    text-shadow: 0 0 15px rgba(34, 211, 238, 0.2);
}

.hl-desc {
    color: #ffffff;
    font-weight: 600;
    border-bottom: 1px dashed rgba(255, 255, 255, 0.4);
    padding-bottom: 1px;
}

.hero-band-title {
    font-family: var(--font-head);
    font-size: 1.65rem;
    font-weight: 800;
    color: #ffffff;
    letter-spacing: -0.6px;
    line-height: 1.2;
    text-shadow: 0 1px 8px rgba(0,0,0,0.12);
    width: 100%;
    text-align: center;
}
.hero-band.band-compact .hero-band-title {
    font-size: 1.2rem;
}

@media (max-width: 768px) {
    .hero-band { padding: 12px 18px; }
    .hero-band-title { font-size: 1.1rem; }
    .hero-band-desc { font-size: 0.98rem; }
}
@media (max-width: 480px) {
    .hero-band-title { font-size: 0.95rem; }
    .hero-band-desc { font-size: 0.88rem; line-height: 1.45; letter-spacing: 0.5px; }
}

/* Two-Column Main Layout Grid */
.main-grid {
    max-width: 1800px;
    margin: 125px auto 0 auto;   /* Compact margin adjusted for slim hero-band */
    display: grid;
    grid-template-columns: 1fr 1.5fr;
    gap: 48px;
    padding: 20px 24px 50px 24px;
}


/* Left Column Styles */
.left-column {
    display: flex;
    flex-direction: column;
    gap: 60px;
}

/* Right Column Styles */
.right-column {
    display: flex;
    flex-direction: column;
    gap: 60px;
    background: transparent;
    border-left: 1px solid rgba(99,102,241,0.1);
    padding-left: 56px;
}

/* ===== Right column font scaling ===== */
/* Service cards */
.right-column .service-card-body h3 {
    font-size: 1.38rem;
}
.right-column .service-card-body p {
    font-size: 1.1rem;
}
.right-column .srv-chip {
    font-size: 0.82rem;
    padding: 4px 13px;
}
/* Timeline steps */
.right-column .step-body h4 {
    font-size: 1.28rem;
}
.right-column .step-body p {
    font-size: 1.1rem;
}
.right-column .step-num {
    font-size: 1.85rem;
}



/* Intro Highlight Banner (Transversal across both columns) */
.intro-highlight {
    grid-column: 1 / -1;
    background: linear-gradient(135deg,
        rgba(255,255,255,0.95) 0%,
        rgba(237,233,254,0.55) 50%,
        rgba(224,242,254,0.45) 100%);
    border: none;
    border-radius: var(--radius-card);
    padding: 36px 42px 32px 52px;
    box-shadow: 0 12px 36px rgba(79, 70, 229, 0.08);
    -webkit-backdrop-filter: blur(15px);
    backdrop-filter: blur(15px);
    position: relative;
    overflow: hidden;
    margin-top: -30px; /* Pull closer to preceding grid */
    margin-bottom: 10px;
}

/* Decorative </> code tag watermark */
.intro-highlight::before {
    content: '</>';
    position: absolute;
    top: 50%;
    left: 18px;
    transform: translateY(-50%);
    font-family: 'Courier New', monospace;
    font-size: 5.5rem;
    font-weight: 900;
    line-height: 1;
    background: var(--gradient-accent);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    opacity: 0.12;
    pointer-events: none;
    z-index: 0;
    user-select: none;
    letter-spacing: -4px;
}

.intro-highlight::after {
    content: '';
    position: absolute;
    top: -40%;
    right: -10%;
    width: 380px;
    height: 380px;
    background: radial-gradient(circle, rgba(99, 102, 241, 0.1) 0%, transparent 68%);
    z-index: 0;
    pointer-events: none;
}

.intro-highlight-text {
    font-size: 1.38rem;
    color: var(--text-main);
    line-height: 1.8;
    font-weight: 600;
    position: relative;
    z-index: 1;
    margin-bottom: 10px;
}

.intro-highlight-text strong {
    font-weight: 800;
}

.intro-highlight-sub {
    font-size: 1.05rem;
    color: var(--text-muted);
    line-height: 1.75;
    font-weight: 400;
    position: relative;
    z-index: 1;
}

/* Gradient text for key geographic names */
.hl-accent {
    background: var(--gradient-accent);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-weight: 700;
}


/* Modern Software Showcase Images */
.showcase-images {
    display: flex;
    flex-direction: column;
    gap: 30px;
}

.showcase-card {
    background: var(--bg-card);
    border: 1px solid var(--border-glass);
    border-radius: var(--radius-card);
    overflow: hidden;
    box-shadow: var(--card-shadow);
    -webkit-backdrop-filter: blur(12px);
    backdrop-filter: blur(12px);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}
.showcase-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 36px rgba(79,70,229,0.11);
}

.showcase-card img {
    width: 100%;
    height: auto;
    display: block;
    vertical-align: bottom;
    line-height: 0;
    border-bottom: 1px solid var(--border-color);
    /* Clip any whitespace baked into the image itself */
    object-fit: cover;
    /* Negative margin trick to neutralize top/bottom white areas in image */
    margin-top: -1px;
    margin-bottom: 0;
}



/* Section Headings */
h2 {
    font-family: var(--font-head);
    font-size: 1.9rem;
    font-weight: 800;
    margin-bottom: 12px;
    letter-spacing: -0.8px;
    color: var(--text-main);
}

.section-desc {
    color: var(--text-muted);
    margin-bottom: 30px;
    font-size: 1.05rem;
}

/* Clientes y prospectos de referencia */
.reference-list {
    display: flex;
    flex-direction: column;
    gap: 25px;
}

.ref-accordion-item {
    background: var(--bg-card);
    border: 1px solid var(--border-glass);
    border-radius: var(--radius-card);
    box-shadow: var(--card-shadow);
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
    overflow: hidden;
    margin-bottom: 5px;
    display: block;
    width: 100%;
}

.ref-accordion-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 30px rgba(79,70,229,0.06);
}

.ref-accordion-header {
    list-style: none;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 24px 28px;
    cursor: pointer;
    position: relative;
    user-select: none;
}

.ref-accordion-header::-webkit-details-marker {
    display: none;
}

.ref-header-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 8px;
    text-align: left;
}

.ref-meta-row {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
}

.ref-badge {
    display: inline-block;
    padding: 4px 12px;
    background: linear-gradient(135deg, rgba(79,70,229,0.08) 0%, rgba(14,165,233,0.08) 100%);
    border: 1px solid rgba(79,70,229,0.18);
    border-radius: 50px;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--accent);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.ref-accordion-header h3 {
    font-family: var(--font-head);
    font-size: 1.35rem;
    font-weight: 700;
    color: var(--text-main);
    margin: 0;
    line-height: 1.3;
}

.ref-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1), color 0.3s ease;
    margin-left: 20px;
    flex-shrink: 0;
}

.ref-accordion-item[open] .ref-icon {
    transform: rotate(180deg);
    color: var(--accent-cyan);
}

.ref-accordion-body {
    padding: 0 28px 26px 28px;
    border-top: 1px solid rgba(255,255,255,0.05);
    animation: refSlideDown 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.ref-accordion-body p {
    color: var(--text-muted);
    font-size: 1rem;
    margin-bottom: 18px;
    text-align: justify;
    line-height: 1.6;
}

.ref-details-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    background: rgba(79, 70, 229, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    padding: 16px 20px;
    text-align: left;
}

.ref-detail-col {
    font-size: 0.92rem;
    color: var(--text-main);
    line-height: 1.5;
}

.ref-detail-col strong {
    color: var(--accent-cyan);
}

@keyframes refSlideDown {
    from {
        opacity: 0;
        transform: translateY(-8px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Así trabajamos contigo (Process Timeline) */
.timeline {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.timeline-step {
    display: flex;
    background: var(--bg-card);
    border: 1px solid var(--border-glass);
    border-radius: 14px;
    align-items: stretch;
    box-shadow: var(--card-shadow);
    -webkit-backdrop-filter: blur(8px);
    backdrop-filter: blur(8px);
    transition: transform 0.2s ease;
    overflow: hidden;
}
.timeline-step:hover { transform: translateX(4px); }

/* inner wrapper for step content */
.step-inner {
    flex: 1;
    padding: 18px 20px;
    display: flex;
    gap: 16px;
    align-items: flex-start;
}

.step-num {
    font-family: var(--font-head);
    font-size: 1.6rem;
    font-weight: 800;
    background: var(--gradient-accent);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    min-width: 36px;
    line-height: 1;
}

.step-body h4 {
    font-family: var(--font-head);
    font-size: 1.18rem;
    font-weight: 600;
    margin-bottom: 4px;
}

.step-body p {
    font-size: 1rem;
    color: var(--text-muted);
}

/* ===== SEMÁFORO DE SERVICIOS (inspired by user-search palette) ===== */
/* Strip lateral + chip de estado, igual al sistema de options.php     */
.service-card {
    background: var(--bg-card);
    border: 1px solid var(--border-glass);
    border-radius: var(--radius-card);
    padding: 0;
    display: flex;
    align-items: stretch;
    scroll-margin-top: 80px;
    box-shadow: var(--card-shadow);
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
    transition: box-shadow 0.25s ease, transform 0.25s ease, border-color 0.25s ease;
    overflow: hidden;
}
.service-card:hover {
    box-shadow: 0 10px 32px rgba(79,70,229,0.14);
    transform: translateY(-2px);
    border-color: rgba(99,102,241,0.3);
}

/* Strip lateral de color — semáforo (Hidden as per request) */
.srv-strip {
    display: none;
    width: 0;
    flex-shrink: 0;
}
.strip-green  { background: linear-gradient(to bottom, #86efac, #22c55e); }
.strip-blue   { background: linear-gradient(to bottom, #93c5fd, #3b82f6); }
.strip-amber  { background: linear-gradient(to bottom, #fde68a, #f59e0b); }
.strip-violet { background: linear-gradient(to bottom, #d8b4fe, #8b5cf6); }

/* Inner body con padding */
.srv-inner {
    flex: 1;
    padding: 20px 22px;
    display: flex;
    gap: 16px;
    align-items: flex-start;
}

/* Chip de estado (pastilla) */
.srv-chip {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 3px 10px;
    border-radius: 50px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.4px;
    margin-bottom: 10px;
}
.chip-green  { background: #dcfce7; color: #15803d; border: 1px solid #bbf7d0; }
.chip-blue   { background: #dbeafe; color: #1d4ed8; border: 1px solid #bfdbfe; }
.chip-amber  { background: #fef3c7; color: #b45309; border: 1px solid #fde68a; }
.chip-violet { background: #ede9fe; color: #6d28d9; border: 1px solid #ddd6fe; }

.service-card-body {
    flex: 1;
}

.service-card-body h3 {
    font-family: var(--font-head);
    font-size: 1.28rem;
    font-weight: 700;
    margin-bottom: 8px;
}

.service-card-body p {
    color: var(--text-muted);
    font-size: 1rem;
    text-align: justify;
}

/* Contact Form */
form.contact-form {
    background: var(--bg-card);
    border: 1px solid var(--border-glass);
    border-radius: var(--radius-card);
    padding: 28px;
    box-shadow: var(--card-shadow);
    -webkit-backdrop-filter: blur(12px);
    backdrop-filter: blur(12px);
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.form-group label {
    font-size: 0.95rem;
    color: var(--text-muted);
    font-weight: 500;
}

.form-group input, .form-group textarea, .form-group select {
    background: rgba(245,247,255,0.8);
    border: 1px solid rgba(99,102,241,0.15);
    border-radius: 10px;
    padding: 11px 14px;
    color: var(--text-main);
    font-family: var(--font-body);
    font-size: 1rem;
    -webkit-appearance: none;
    appearance: none;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.form-group input:focus, .form-group textarea:focus, .form-group select:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(79,70,229,0.1);
    background: #fff;
}

.btn-submit {
    background: var(--gradient-accent);
    color: #ffffff;
    border: none;
    padding: 13px;
    border-radius: var(--radius-btn);
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    letter-spacing: 0.2px;
    transition: all 0.25s ease;
    box-shadow: 0 4px 14px rgba(79,70,229,0.3), 0 1px 3px rgba(0,0,0,0.08);
}
.btn-submit:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(79,70,229,0.38);
    filter: brightness(1.05);
}
.btn-submit:active { transform: translateY(0); }

.contact-info-cards {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
    margin-top: 20px;
}

.info-mini-card {
    background: linear-gradient(135deg, rgba(79,70,229,0.04) 0%, rgba(14,165,233,0.04) 100%);
    border: 1px solid rgba(99,102,241,0.14);
    border-radius: 12px;
    padding: 14px;
    font-size: 0.85rem;
    display: flex;
    align-items: center;
    gap: 12px;
}

.info-mini-card svg {
    color: var(--accent-purple);
    flex-shrink: 0;
}

.info-mini-card div p {
    color: var(--text-muted);
}

.info-mini-card div a {
    color: var(--accent-cyan);
    text-decoration: none;
    font-size: 0.95rem;
}

/* Footer */
footer {
    margin-top: 80px;
    padding: 40px 0;
    border-top: 1px solid rgba(99,102,241,0.1);
    text-align: center;
    color: var(--text-muted);
    font-size: 0.85rem;
    background: linear-gradient(to bottom, transparent, rgba(79,70,229,0.03));
}

footer a {
    color: var(--accent-cyan);
    text-decoration: none;
}

/* ===== RESPONSIVE ===== */

/* Tablet landscape (≤1200px) */
@media (max-width: 1200px) {
    .main-grid {
        grid-template-columns: 1fr;
        gap: 40px;
        padding: 16px 32px 40px 32px;
    }
    .right-column {
        border-left: none;
        padding-left: 0;
    }
    .header-nav {
        display: none;
    }
    h1 { font-size: 2.6rem; }
}

/* Tablet portrait (≤768px) */
@media (max-width: 768px) {
    header {
        padding: 0 18px;
        height: 62px;
    }
    .logo-text { font-size: 1.3rem; }
    .whatsapp-fixed-btn span { display: none; }
    .whatsapp-fixed-btn { padding: 10px 12px; border-radius: 50%; }
    .hero-band {
        top: 62px;
    }
    .main-grid {
        margin-top: 150px;
        padding: 12px 16px 28px 16px;
        gap: 36px;
    }
    h1 { font-size: 2rem; }
    h2 { font-size: 1.7rem; }
    .intro-highlight {
        padding: 24px 20px;
    }
    .intro-highlight-text {
        font-size: 1.15rem;
        line-height: 1.7;
    }
    .ref-accordion-header { padding: 18px 20px; }
    .ref-accordion-body { padding: 0 20px 20px 20px; }
    .ref-details-grid { grid-template-columns: 1fr; gap: 12px; padding: 12px 14px; }
    .srv-inner { padding: 16px 18px; gap: 12px; }
    .step-inner { padding: 16px 18px; gap: 12px; }
    .step-num { font-size: 1.5rem; min-width: 32px; }
}

/* Mobile (≤480px) */
@media (max-width: 480px) {
    .logo-text { font-size: 1.15rem; }
    h1 { font-size: 1.7rem; letter-spacing: -0.5px; }
    h2 { font-size: 1.4rem; }
    .hero-desc { font-size: 1rem; }
    .intro-highlight {
        padding: 16px 14px;
        border-left-width: 4px;
    }
    .intro-highlight-text {
        font-size: 1.05rem;
        line-height: 1.6;
    }
    .ref-accordion-header h3 { font-size: 1.1rem; }
    .ref-accordion-header { padding: 14px 16px; }
    .ref-accordion-body { padding: 0 16px 16px 16px; }
    .ref-accordion-body p { font-size: 0.92rem; }
    .service-card-body h3 { font-size: 1rem; }
    .main-grid { padding: 10px 12px 20px 12px; margin-top: 165px; }
    form.contact-form { padding: 20px; }
    .btn-submit { font-size: 0.9rem; }
}

/* iOS safe-area support */
@supports (padding: env(safe-area-inset-bottom)) {
    body { padding-bottom: env(safe-area-inset-bottom); }
    header { padding-left: max(18px, env(safe-area-inset-left)); padding-right: max(18px, env(safe-area-inset-right)); }
}

/* =====================================================
   Functional Solutions Section (index2.html)
   ===================================================== */
.functional-solutions-container {
    margin-bottom: 40px;
}

.functional-title {
    font-family: var(--font-head);
    font-size: 1.8rem;
    font-weight: 700;
    text-align: left;
    color: var(--text-main);
    margin-bottom: 8px;
    letter-spacing: -0.5px;
}

.functional-desc {
    text-align: left;
    font-size: 1.05rem;
    color: var(--text-muted);
    line-height: 1.5;
    margin-bottom: 24px;
}

.functional-cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
}

.functional-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-card);
    padding: 24px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.02);
    display: flex;
    flex-direction: column;
    gap: 16px;
    transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
}

.functional-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 10px 24px rgba(79, 70, 229, 0.08), 0 0 16px rgba(14, 165, 233, 0.15);
    border-color: rgba(79, 70, 229, 0.25);
}

.func-header {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.func-title-wrap {
    display: flex;
    align-items: center;
    gap: 12px;
    flex: 1;
    min-width: 0;
}

.func-icon-box {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 44px;
    height: 44px;
    border-radius: 12px;
}

.func-icon-box.box-blue, .vertical-icon.box-blue {
    color: #3b82f6;
    background: linear-gradient(135deg, rgba(147, 197, 253, 0.18), rgba(59, 130, 246, 0.1));
    border: 1px solid rgba(59, 130, 246, 0.2);
}

.func-icon-box.box-green, .vertical-icon.box-green {
    color: #10b981;
    background: linear-gradient(135deg, rgba(167, 243, 208, 0.18), rgba(16, 185, 129, 0.1));
    border: 1px solid rgba(16, 185, 129, 0.2);
}

.func-icon-box.box-amber, .vertical-icon.box-amber {
    color: #f59e0b;
    background: linear-gradient(135deg, rgba(253, 230, 138, 0.18), rgba(245, 158, 11, 0.1));
    border: 1px solid rgba(245, 158, 11, 0.2);
}

.func-icon-box.box-violet, .vertical-icon.box-violet {
    color: #8b5cf6;
    background: linear-gradient(135deg, rgba(216, 180, 254, 0.18), rgba(139, 92, 246, 0.1));
    border: 1px solid rgba(139, 92, 246, 0.2);
}

.func-icon-box.box-cyan, .vertical-icon.box-cyan {
    color: #06b6d4;
    background: linear-gradient(135deg, rgba(165, 243, 252, 0.18), rgba(6, 182, 212, 0.1));
    border: 1px solid rgba(6, 182, 212, 0.2);
}

.func-icon-box.box-rose, .vertical-icon.box-rose {
    color: #f43f5e;
    background: linear-gradient(135deg, rgba(254, 205, 211, 0.18), rgba(244, 63, 94, 0.1));
    border: 1px solid rgba(244, 63, 94, 0.2);
}

.func-icon-box.box-emerald, .vertical-icon.box-emerald {
    color: #34d399;
    background: linear-gradient(135deg, rgba(167, 243, 208, 0.18), rgba(52, 211, 153, 0.1));
    border: 1px solid rgba(52, 211, 153, 0.2);
}

.func-icon-box.box-indigo, .vertical-icon.box-indigo {
    color: #6366f1;
    background: linear-gradient(135deg, rgba(199, 210, 254, 0.18), rgba(99, 102, 241, 0.1));
    border: 1px solid rgba(99, 102, 241, 0.2);
}

.functional-card h3 {
    font-family: var(--font-head);
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--text-dark);
    margin: 0;
    line-height: 1.25;
}

.func-chip {
    font-size: 0.65rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    padding: 3px 8px;
    border-radius: 6px;
    white-space: nowrap;
    margin-left: auto;
}

.func-chip.chip-tactic {
    background: rgba(139, 92, 246, 0.08);
    color: #6d28d9;
    border: 1px solid rgba(139, 92, 246, 0.15);
}

.func-chip.chip-operative {
    background: rgba(14, 116, 144, 0.08);
    color: #0e7490;
    border: 1px solid rgba(14, 116, 144, 0.15);
}

.func-body p {
    margin: 0 0 12px 0;
    font-size: 0.92rem;
    color: var(--text-muted);
    font-weight: 500;
}

.func-body ul {
    margin: 0;
    padding-left: 18px;
    list-style-type: none;
}

.func-body li {
    font-size: 0.9rem;
    color: var(--text-muted);
    margin-bottom: 8px;
    position: relative;
    line-height: 1.45;
}

.func-body li::before {
    content: "•";
    color: rgba(79, 70, 229, 0.6);
    font-weight: bold;
    display: inline-block;
    width: 1em;
    margin-left: -1em;
}

@media (max-width: 1024px) {
    .functional-cards-grid {
        grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
        gap: 20px;
    }
}

@media (max-width: 600px) {
    .functional-cards-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }
    .functional-title {
        font-size: 1.5rem;
    }
    .func-chip {
        margin-left: 0;
        margin-top: 4px;
    }
}

/* Contact Section (Full Width Layout) */
.full-width-contact {
    grid-column: 1 / -1;
    margin-top: 56px;
    margin-bottom: 20px;
    padding: 0 16px;
}

.full-width-contact h2 {
    font-size: 2rem;
    text-align: center;
    margin-bottom: 12px;
}

.full-width-contact .section-desc {
    text-align: center;
    max-width: 700px;
    margin: 0 auto 32px auto;
}

.full-width-contact form.contact-form {
    max-width: 650px;
    margin: 0 auto;
    text-align: left;
}

@media (max-width: 768px) {
    .full-width-contact {
        margin-top: 36px;
        padding: 0;
    }
    .full-width-contact h2 {
        font-size: 1.7rem;
    }
}

/* =====================================================
   Sectores y Casos de Uso Específicos (Cobertura)
   ===================================================== */
.business-verticals-container {
    grid-column: 1 / -1;
    margin-top: 0;
    margin-bottom: -15px; /* Pull succeeding highlight banner closer */
}

.verticals-title {
    font-family: var(--font-head);
    font-size: 1.8rem;
    font-weight: 700;
    text-align: center;
    color: var(--text-main);
    margin-bottom: 8px;
    letter-spacing: -0.5px;
}

.verticals-desc {
    text-align: center;
    max-width: 800px;
    margin: 0 auto 32px auto;
    font-size: 1.05rem;
    color: var(--text-muted);
    line-height: 1.5;
}

.verticals-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    direction: rtl;
}

@media (max-width: 992px) {
    .verticals-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 600px) {
    .verticals-grid {
        grid-template-columns: 1fr;
    }
}

.vertical-item {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-card);
    padding: 20px;
    display: flex;
    gap: 14px;
    align-items: flex-start;
    transition: all 0.3s ease;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.01);
    direction: ltr;
}

.vertical-item:hover {
    background: rgba(255, 255, 255, 0.9);
    border-color: rgba(99, 102, 241, 0.25);
    transform: translateY(-3px);
    box-shadow: var(--card-shadow);
}

.vertical-icon {
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    flex-shrink: 0;
}

.vertical-item h4 {
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--text-main);
    margin-bottom: 6px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}

.vertical-item p {
    font-size: 0.88rem;
    color: var(--text-muted);
    line-height: 1.45;
}
