/* ============================================================
   APEX GROUP CONSULTORES — ESTILOS PRINCIPALES
   Paleta: Azul corporativo #1B4FD8 + Naranja #F97316
   Tipografía: Inter + Merriweather
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&family=Merriweather:wght@400;700&display=swap');

/* --- Reset & Base ------------------------------------------ */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; font-size: 16px; }
body {
    font-family: 'Inter', sans-serif;
    color: #1e293b;
    background: #fff;
    line-height: 1.6;
    overflow-x: hidden;
}
img { max-width: 100%; height: auto; display: block; }
a { text-decoration: none; color: inherit; transition: color .2s; }
ul { list-style: none; }

/* --- Variables --------------------------------------------- */
:root {
    --blue:       #1B4FD8;
    --blue-dark:  #1340b0;
    --blue-light: #dbeafe;
    --orange:     #F97316;
    --orange-dk:  #ea6d0a;
    --dark:       #0f172a;
    --gray:       #64748b;
    --gray-lt:    #f1f5f9;
    --white:      #ffffff;
    --border:     #e2e8f0;
    --radius:     10px;
    --shadow:     0 4px 24px rgba(0,0,0,.08);
    --shadow-lg:  0 12px 40px rgba(0,0,0,.14);
}

/* --- Utilidades -------------------------------------------- */
.container { max-width: 1180px; margin: 0 auto; padding: 0 20px; }
.row { display: flex; flex-wrap: wrap; margin: 0 -15px; }
[class*="col-"] { padding: 0 15px; }
.col-12 { width: 100%; }
.col-xl-3 { width: 25%; } .col-xl-4 { width: 33.333%; } .col-xl-6 { width: 50%; }
.col-lg-3 { width: 25%; } .col-lg-4 { width: 33.333%; } .col-lg-6 { width: 50%; } .col-lg-7 { width: 58.333%; } .col-lg-8 { width: 66.666%; }
.col-md-4 { width: 33.333%; } .col-md-5 { width: 41.666%; } .col-md-6 { width: 50%; } .col-md-7 { width: 58.333%; } .col-md-8 { width: 66.666%; }
.col-sm-6 { width: 50%; }
.py-80 { padding: 80px 0; } .py-60 { padding: 60px 0; } .py-40 { padding: 40px 0; }
.mb-10 { margin-bottom: 10px; } .mb-20 { margin-bottom: 20px; } .mb-30 { margin-bottom: 30px; }
.mb-40 { margin-bottom: 40px; } .mt-10 { margin-top: 10px; } .mt-20 { margin-top: 20px; }
.mt-30 { margin-top: 30px; } .mt-40 { margin-top: 40px; } .mt-50 { margin-top: 50px; }
.text-center { text-align: center; } .text-white { color: #fff; }
.d-flex { display: flex; } .align-center { align-items: center; }
.gap-10 { gap: 10px; } .gap-20 { gap: 20px; }
.bg-light { background: var(--gray-lt); }
.bg-dark  { background: var(--dark); }
.bg-blue  { background: var(--blue); }
.img-fluid { width: 100%; height: auto; }
.rounded { border-radius: var(--radius); }
.small { font-size: 13px; }
.text-accent { color: var(--orange); }
.text-muted  { color: var(--gray); }
.d-block { display: block; }
.p-25 { padding: 25px; }
.mr-5 { margin-right: 5px; } .mr-10 { margin-right: 10px; } .mr-15 { margin-right: 15px; }
.ml-10 { margin-left: 10px; }
.justify-content-center { justify-content: center; }
.flex-wrap { flex-wrap: wrap; }

/* --- Botones ----------------------------------------------- */
.btn {
    display: inline-flex; align-items: center; gap: 8px;
    padding: 12px 28px; border-radius: 6px; border: none;
    font-size: 14px; font-weight: 600; cursor: pointer;
    transition: all .22s; letter-spacing: .3px;
}
.btn-primary  { background: var(--blue); color: #fff; }
.btn-primary:hover { background: var(--blue-dark); transform: translateY(-1px); box-shadow: 0 6px 20px rgba(27,79,216,.3); }
.btn-orange   { background: var(--orange); color: #fff; }
.btn-orange:hover { background: var(--orange-dk); transform: translateY(-1px); }
.btn-outline  { background: transparent; border: 2px solid var(--blue); color: var(--blue); }
.btn-outline:hover { background: var(--blue); color: #fff; }
.btn-outline-white { background: transparent; border: 2px solid #fff; color: #fff; }
.btn-outline-white:hover { background: #fff; color: var(--blue); }
.btn-whatsapp { background: #25D366; color: #fff; }
.btn-whatsapp:hover { background: #1ebe5d; }
.btn-sm  { padding: 8px 18px; font-size: 13px; }
.btn-lg  { padding: 15px 36px; font-size: 16px; }
.btn-block { width: 100%; justify-content: center; margin-bottom: 8px; }

/* --- Alertas ----------------------------------------------- */
.alert { padding: 14px 18px; border-radius: var(--radius); margin-bottom: 18px; font-size: 14px; }
.alert-success { background: #dcfce7; color: #166534; border: 1px solid #bbf7d0; }
.alert-danger  { background: #fee2e2; color: #991b1b; border: 1px solid #fecaca; }
.alert-warning { background: #fef9c3; color: #854d0e; border: 1px solid #fef08a; }
.alert-info    { background: #dbeafe; color: #1e40af; border: 1px solid #bfdbfe; }

/* --- Sección títulos --------------------------------------- */
.section-label {
    display: inline-block; background: var(--blue-light); color: var(--blue);
    font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: 1.5px;
    padding: 5px 14px; border-radius: 20px; margin-bottom: 12px;
}
.section-title {
    font-family: 'Merriweather', serif;
    font-size: 34px; font-weight: 700; line-height: 1.3; color: var(--dark);
}
.section-title span { color: var(--blue); }
.section-desc { color: var(--gray); font-size: 16px; max-width: 600px; margin-top: 10px; }
.section-header-center { text-align: center; }
.section-header-center .section-desc { margin: 10px auto 0; }
.divider {
    width: 50px; height: 4px; background: var(--orange);
    border-radius: 2px; margin: 14px 0 20px;
}
.divider-center { margin: 14px auto 20px; }

/* ============================================================
   HEADER
   ============================================================ */
#site-header {
    position: fixed; top: 0; left: 0; right: 0; z-index: 1000;
    padding: 0;
    background: rgba(255,255,255,.98);
    border-bottom: 1px solid transparent;
    transition: all .3s;
}
#site-header.scrolled {
    border-color: var(--border);
    box-shadow: 0 2px 20px rgba(0,0,0,.08);
}
.header-inner {
    display: flex; align-items: center; justify-content: space-between;
    height: 72px;
}
.site-logo { display: flex; align-items: center; gap: 10px; }
.site-logo .logo-icon {
    width: 40px; height: 40px; background: var(--blue);
    border-radius: 8px; display: flex; align-items: center; justify-content: center;
}
.site-logo .logo-icon span { color: #fff; font-weight: 800; font-size: 18px; }
.site-logo .logo-text strong { display: block; font-size: 16px; font-weight: 800; color: var(--dark); line-height: 1.1; }
.site-logo .logo-text small { font-size: 10px; color: var(--gray); text-transform: uppercase; letter-spacing: 1px; }

/* Nav desktop */
.main-nav { display: flex; align-items: center; gap: 4px; }
.main-nav > li { position: relative; }
.main-nav > li > a {
    display: flex; align-items: center; gap: 5px;
    padding: 8px 14px; font-size: 14px; font-weight: 500; color: var(--dark);
    border-radius: 6px; transition: all .2s;
}
.main-nav > li > a:hover, .main-nav > li.active > a {
    background: var(--blue-light); color: var(--blue);
}
.main-nav > li > a i { font-size: 10px; }

/* Dropdown */
.nav-dropdown {
    position: absolute; top: calc(100% + 8px); left: 0; min-width: 220px;
    background: #fff; border-radius: var(--radius); padding: 8px;
    box-shadow: var(--shadow-lg); border: 1px solid var(--border);
    opacity: 0; visibility: hidden; transform: translateY(8px);
    transition: all .22s;
}
.main-nav > li:hover .nav-dropdown {
    opacity: 1; visibility: visible; transform: translateY(0);
}
.nav-dropdown a {
    display: flex; align-items: center; gap: 10px;
    padding: 9px 12px; font-size: 13px; color: var(--dark); border-radius: 6px;
    transition: all .15s;
}
.nav-dropdown a:hover { background: var(--blue-light); color: var(--blue); }
.nav-dropdown a i { width: 18px; color: var(--blue); }

/* Megamenú */
.megamenu {
    position: absolute; top: calc(100% + 8px); left: -180px;
    width: 620px; background: #fff;
    border-radius: var(--radius); padding: 24px;
    box-shadow: var(--shadow-lg); border: 1px solid var(--border);
    opacity: 0; visibility: hidden; transform: translateY(8px);
    transition: all .22s; display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 20px;
}
.main-nav > li:hover .megamenu { opacity: 1; visibility: visible; transform: translateY(0); }
.mega-col h5 {
    font-size: 11px; text-transform: uppercase; letter-spacing: 1px;
    color: var(--blue); font-weight: 700; margin-bottom: 10px;
    padding-bottom: 8px; border-bottom: 2px solid var(--blue-light);
}
.mega-col a {
    display: block; padding: 7px 0; font-size: 13px; color: var(--dark);
    border-bottom: 1px solid transparent; transition: all .15s;
}
.mega-col a:hover { color: var(--blue); padding-left: 6px; }

/* Header right */
.header-right { display: flex; align-items: center; gap: 10px; }
.btn-header-wa {
    display: flex; align-items: center; gap: 7px;
    padding: 8px 18px; background: #25D366; color: #fff;
    border-radius: 6px; font-size: 13px; font-weight: 600;
    transition: all .2s;
}
.btn-header-wa:hover { background: #1ebe5d; }
.hamburger {
    display: none; flex-direction: column; gap: 5px;
    background: none; border: none; cursor: pointer; padding: 8px;
}
.hamburger span { width: 24px; height: 2px; background: var(--dark); border-radius: 2px; transition: all .3s; display: block; }
.hamburger.active span:nth-child(1) { transform: rotate(45deg) translate(5px,5px); }
.hamburger.active span:nth-child(2) { opacity: 0; }
.hamburger.active span:nth-child(3) { transform: rotate(-45deg) translate(5px,-5px); }

/* Menú móvil */
.mobile-menu {
    display: none; position: fixed; top: 72px; left: 0; right: 0; bottom: 0;
    background: #fff; overflow-y: auto; z-index: 999; padding: 20px;
}
.mobile-menu.open { display: block; }
.mobile-nav { border-top: 1px solid var(--border); padding-top: 10px; }
.mobile-nav a {
    display: block; padding: 12px 16px; font-size: 15px; color: var(--dark);
    border-radius: 8px; border-bottom: 1px solid var(--gray-lt);
}
.mobile-nav a:hover { background: var(--blue-light); color: var(--blue); }
.mobile-nav .sub-link { padding-left: 32px; font-size: 14px; color: var(--gray); }

/* ============================================================
   HERO
   ============================================================ */
#hero {
    padding-top: 72px; /* header height */
    min-height: 100vh;
    background: linear-gradient(135deg, #0f172a 0%, #1B4FD8 60%, #1340b0 100%);
    display: flex; align-items: center; position: relative; overflow: hidden;
}
#hero::before {
    content: '';
    position: absolute; inset: 0;
    background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.03'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
}
.hero-inner { position: relative; z-index: 2; }
.hero-label {
    display: inline-flex; align-items: center; gap: 8px;
    background: rgba(255,255,255,.12); color: #fff;
    padding: 6px 16px; border-radius: 20px; font-size: 13px; font-weight: 500;
    border: 1px solid rgba(255,255,255,.2); margin-bottom: 24px;
}
.hero-label i { color: var(--orange); }
.hero-title {
    font-family: 'Merriweather', serif;
    font-size: clamp(32px, 5vw, 58px);
    color: #fff; font-weight: 700; line-height: 1.2; margin-bottom: 22px;
}
.hero-title .highlight {
    color: var(--orange);
    position: relative;
}
.hero-desc { color: rgba(255,255,255,.8); font-size: 17px; line-height: 1.7; margin-bottom: 36px; max-width: 540px; }
.hero-btns { display: flex; gap: 14px; flex-wrap: wrap; }
.hero-stats {
    display: flex; gap: 32px; margin-top: 50px; padding-top: 40px;
    border-top: 1px solid rgba(255,255,255,.15);
}
.hero-stat-num { font-size: 36px; font-weight: 800; color: #fff; line-height: 1; }
.hero-stat-num span { color: var(--orange); }
.hero-stat-label { color: rgba(255,255,255,.65); font-size: 13px; margin-top: 4px; }
.hero-visual { position: relative; }
.hero-card {
    background: rgba(255,255,255,.1); border: 1px solid rgba(255,255,255,.2);
    backdrop-filter: blur(10px); border-radius: 16px; padding: 28px;
    color: #fff; margin-bottom: 16px;
}
.hero-card-icon { width: 48px; height: 48px; background: var(--orange); border-radius: 10px; display: flex; align-items: center; justify-content: center; margin-bottom: 14px; }
.hero-card-icon i { color: #fff; font-size: 20px; }
.hero-card h4 { font-size: 15px; font-weight: 700; margin-bottom: 6px; }
.hero-card p { font-size: 13px; color: rgba(255,255,255,.7); }
.hero-cards-col { display: flex; flex-direction: column; gap: 16px; }

/* ============================================================
   CLIENTES STRIP
   ============================================================ */
.section-clients-strip { background: var(--gray-lt); padding: 36px 0; border-bottom: 1px solid var(--border); }
.clients-label { font-size: 12px; text-transform: uppercase; letter-spacing: 1.5px; color: var(--gray); font-weight: 600; white-space: nowrap; margin-right: 30px; }
.clients-track-wrap { overflow: hidden; flex: 1; }
.clients-track { display: flex; gap: 50px; align-items: center; animation: scroll-x 25s linear infinite; }
.clients-track:hover { animation-play-state: paused; }
.clients-track img { height: 36px; width: auto; filter: grayscale(100%) opacity(.5); transition: all .3s; object-fit: contain; }
.clients-track img:hover { filter: grayscale(0) opacity(1); }
.client-text-logo {
    white-space: nowrap; font-weight: 700; font-size: 15px;
    color: #a0aec0; transition: color .3s;
}
.client-text-logo:hover { color: var(--blue); }
@keyframes scroll-x {
    0%   { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}

/* ============================================================
   SERVICIOS
   ============================================================ */
.service-card {
    background: #fff; border: 1px solid var(--border); border-radius: 14px;
    padding: 30px 24px; transition: all .3s; height: 100%;
    display: flex; flex-direction: column;
}
.service-card:hover {
    border-color: var(--blue); box-shadow: 0 10px 40px rgba(27,79,216,.12);
    transform: translateY(-4px);
}
.service-icon {
    width: 56px; height: 56px; border-radius: 12px;
    background: var(--blue-light); display: flex; align-items: center; justify-content: center;
    margin-bottom: 18px; transition: all .3s;
}
.service-icon i { color: var(--blue); font-size: 22px; }
.service-card:hover .service-icon { background: var(--blue); }
.service-card:hover .service-icon i { color: #fff; }
.service-cat {
    font-size: 11px; text-transform: uppercase; letter-spacing: 1px;
    color: var(--orange); font-weight: 700; margin-bottom: 8px;
}
.service-card h3 { font-size: 17px; font-weight: 700; margin-bottom: 10px; color: var(--dark); }
.service-card p { font-size: 14px; color: var(--gray); line-height: 1.6; flex: 1; }
.service-link {
    margin-top: 18px; font-size: 13px; font-weight: 600; color: var(--blue);
    display: flex; align-items: center; gap: 6px;
}
.service-link i { transition: transform .2s; }
.service-card:hover .service-link i { transform: translateX(4px); }

/* ============================================================
   STATS / NEX WAY
   ============================================================ */
.stats-section { background: var(--blue); }
.stats-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 0; }
.stat-item {
    text-align: center; padding: 50px 30px;
    border-right: 1px solid rgba(255,255,255,.15);
}
.stat-item:last-child { border-right: none; }
.stat-item .number {
    font-size: 52px; font-weight: 800; color: #fff; line-height: 1;
    display: flex; align-items: baseline; justify-content: center; gap: 4px;
}
.stat-item .number .suffix { font-size: 28px; color: var(--orange); }
.stat-item p { color: rgba(255,255,255,.75); font-size: 14px; margin-top: 8px; }

/* ============================================================
   PORTAFOLIO
   ============================================================ */
.portfolio-filter-wrap { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 36px; }
.pf-btn {
    padding: 8px 20px; border: 1px solid var(--border); background: #fff;
    border-radius: 6px; font-size: 13px; font-weight: 500; color: var(--gray);
    cursor: pointer; transition: all .2s;
}
.pf-btn.active, .pf-btn:hover { background: var(--blue); border-color: var(--blue); color: #fff; }
.portfolio-card { position: relative; border-radius: 12px; overflow: hidden; }
.portfolio-card-img { aspect-ratio: 4/3; overflow: hidden; background: var(--gray-lt); }
.portfolio-card-img img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s; }
.portfolio-card:hover .portfolio-card-img img { transform: scale(1.06); }
.portfolio-card-overlay {
    position: absolute; inset: 0; background: rgba(27,79,216,.85);
    display: flex; align-items: center; justify-content: center;
    opacity: 0; transition: opacity .3s;
}
.portfolio-card:hover .portfolio-card-overlay { opacity: 1; }
.portfolio-card-overlay a {
    width: 50px; height: 50px; background: #fff; border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    color: var(--blue); font-size: 18px;
    transform: scale(.7); transition: transform .3s;
}
.portfolio-card:hover .portfolio-card-overlay a { transform: scale(1); }
.portfolio-card-body { padding: 16px 0; }
.portfolio-card-cat { font-size: 12px; color: var(--orange); font-weight: 700; text-transform: uppercase; letter-spacing: .8px; }
.portfolio-card-title { font-size: 16px; font-weight: 600; margin-top: 4px; color: var(--dark); }
.portfolio-card-title a:hover { color: var(--blue); }
.portfolio-placeholder { aspect-ratio: 4/3; background: var(--gray-lt); display: flex; align-items: center; justify-content: center; color: #cbd5e1; font-size: 36px; }

/* ============================================================
   PROCESO / METODOLOGÍA
   ============================================================ */
.process-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; }
.process-step { text-align: center; position: relative; }
.process-step::after {
    content: ''; position: absolute; top: 28px; left: calc(50% + 40px);
    width: calc(100% - 80px); height: 2px;
    background: linear-gradient(90deg, var(--blue), var(--blue-light));
}
.process-step:last-child::after { display: none; }
.step-num {
    width: 56px; height: 56px; border-radius: 50%; background: var(--blue);
    color: #fff; font-size: 20px; font-weight: 800;
    display: flex; align-items: center; justify-content: center; margin: 0 auto 16px;
    position: relative; z-index: 2;
}
.process-step h4 { font-size: 16px; font-weight: 700; margin-bottom: 8px; }
.process-step p { font-size: 13px; color: var(--gray); }

/* ============================================================
   BLOG
   ============================================================ */
.blog-card {
    background: #fff; border-radius: 12px; overflow: hidden;
    border: 1px solid var(--border); transition: all .3s; height: 100%;
    display: flex; flex-direction: column;
}
.blog-card:hover { box-shadow: var(--shadow); transform: translateY(-3px); border-color: var(--blue-light); }
.blog-card-img { overflow: hidden; }
.blog-card-img img { width: 100%; aspect-ratio: 16/9; object-fit: cover; transition: transform .4s; }
.blog-card:hover .blog-card-img img { transform: scale(1.04); }
.blog-card-body { padding: 20px; flex: 1; display: flex; flex-direction: column; }
.entry-meta { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; margin-bottom: 10px; }
.entry-cat {
    background: var(--blue-light); color: var(--blue);
    font-size: 11px; font-weight: 700; padding: 3px 10px;
    border-radius: 20px; text-transform: uppercase; letter-spacing: .8px;
}
.entry-date, .entry-author { font-size: 12px; color: var(--gray); }
.blog-card h3 { font-size: 16px; font-weight: 700; line-height: 1.4; margin-bottom: 10px; flex: 1; }
.blog-card h3 a:hover { color: var(--blue); }
.blog-card-excerpt { font-size: 14px; color: var(--gray); line-height: 1.6; margin-bottom: 14px; }
.blog-readmore { font-size: 13px; font-weight: 600; color: var(--blue); display: flex; align-items: center; gap: 5px; }
.blog-readmore i { transition: transform .2s; }
.blog-readmore:hover i { transform: translateX(4px); }
.blog-featured { border-radius: 16px; overflow: hidden; border: 1px solid var(--border); }
.blog-featured-img img { width: 100%; aspect-ratio: 16/7; object-fit: cover; }
.blog-featured-body { padding: 28px; }
.blog-featured-body h2 { font-size: 24px; font-weight: 800; margin-bottom: 12px; line-height: 1.3; }
.blog-featured-body h2 a:hover { color: var(--blue); }
.blog-featured-body p { color: var(--gray); margin-bottom: 18px; }

/* ============================================================
   CTA BANNER
   ============================================================ */
.cta-section {
    background: linear-gradient(135deg, var(--dark) 0%, #1B4FD8 100%);
    padding: 80px 0; text-align: center; position: relative; overflow: hidden;
}
.cta-section::before {
    content: '';
    position: absolute; inset: 0;
    background: url("data:image/svg+xml,%3Csvg width='40' height='40' viewBox='0 0 40 40' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='%23ffffff' fill-opacity='0.03'%3E%3Cpath d='M20 20.5V18H0v5h5v5H0v5h20v-9.5zM20 9.5V14H0V9h5V4H0V0h20v9.5z'/%3E%3C/g%3E%3C/svg%3E");
}
.cta-section h2 { font-family: 'Merriweather', serif; font-size: 36px; color: #fff; margin-bottom: 16px; position: relative; }
.cta-section p { color: rgba(255,255,255,.75); font-size: 17px; margin-bottom: 32px; position: relative; }
.cta-btns { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; position: relative; }

/* ============================================================
   CONTACTO
   ============================================================ */
.contact-info-item { display: flex; gap: 16px; padding: 20px 0; border-bottom: 1px solid var(--border); }
.contact-info-item:last-child { border-bottom: none; }
.contact-icon {
    width: 48px; height: 48px; border-radius: 10px; background: var(--blue-light);
    display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.contact-icon i { color: var(--blue); font-size: 18px; }
.contact-info-text h5 { font-size: 14px; font-weight: 700; margin-bottom: 3px; }
.contact-info-text p, .contact-info-text a { font-size: 14px; color: var(--gray); }
.contact-info-text a:hover { color: var(--blue); }
.contact-form-wrap { background: var(--gray-lt); border-radius: 16px; padding: 36px; }
.contact-form-wrap h3 { font-size: 22px; font-weight: 700; margin-bottom: 6px; }
.contact-form-wrap > p { color: var(--gray); font-size: 14px; margin-bottom: 24px; }
.form-group { margin-bottom: 18px; }
.form-label { display: block; font-size: 13px; font-weight: 600; margin-bottom: 6px; }
.form-label .required { color: #ef4444; }
.form-control {
    width: 100%; padding: 11px 14px; border: 1px solid var(--border);
    border-radius: 8px; font-size: 14px; color: var(--dark);
    background: #fff; transition: border .2s; font-family: 'Inter', sans-serif;
}
.form-control:focus { outline: none; border-color: var(--blue); box-shadow: 0 0 0 3px rgba(27,79,216,.1); }
textarea.form-control { resize: vertical; min-height: 120px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.form-hint { font-size: 12px; color: var(--gray); margin-top: 4px; }

/* ============================================================
   PAGE BANNER
   ============================================================ */
.page-banner {
    background: linear-gradient(135deg, var(--dark) 0%, var(--blue) 100%);
    padding: 80px 0 60px;
    margin-top: 72px;
    position: relative; overflow: hidden;
}
.page-banner::after {
    content: ''; position: absolute; bottom: 0; left: 0; right: 0; height: 4px;
    background: linear-gradient(90deg, var(--orange), var(--blue));
}
.page-banner h1 { color: #fff; font-family: 'Merriweather', serif; font-size: 36px; margin-bottom: 12px; }
.breadcrumb { display: flex; align-items: center; gap: 8px; font-size: 13px; }
.breadcrumb a { color: rgba(255,255,255,.7); }
.breadcrumb a:hover { color: #fff; }
.breadcrumb .sep { color: rgba(255,255,255,.4); }
.breadcrumb span { color: rgba(255,255,255,.9); }

/* ============================================================
   SIDEBAR
   ============================================================ */
.sidebar-widget { background: #fff; border: 1px solid var(--border); border-radius: 12px; padding: 24px; margin-bottom: 24px; }
.sidebar-widget .widget-title {
    font-size: 16px; font-weight: 700; margin-bottom: 16px; padding-bottom: 12px;
    border-bottom: 2px solid var(--blue-light); position: relative;
}
.sidebar-widget .widget-title::after {
    content: ''; position: absolute; bottom: -2px; left: 0;
    width: 40px; height: 2px; background: var(--blue);
}
.sidebar-services-list li a {
    display: flex; align-items: center; gap: 8px;
    padding: 9px 0; font-size: 14px; color: var(--dark);
    border-bottom: 1px solid var(--gray-lt); transition: all .2s;
}
.sidebar-services-list li a:hover, .sidebar-services-list li a.active { color: var(--blue); padding-left: 6px; }
.sidebar-services-list li a i { color: var(--blue); font-size: 10px; }
.sidebar-recent-posts li { display: flex; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--gray-lt); }
.sidebar-recent-posts .thumb { width: 64px; height: 48px; border-radius: 6px; overflow: hidden; flex-shrink: 0; }
.sidebar-recent-posts .thumb img { width: 100%; height: 100%; object-fit: cover; }
.sidebar-recent-posts .info a { font-size: 13px; font-weight: 600; color: var(--dark); display: block; margin-bottom: 3px; }
.sidebar-recent-posts .info a:hover { color: var(--blue); }
.sidebar-recent-posts .info span { font-size: 11px; color: var(--gray); }
.sidebar-categories li a {
    display: flex; justify-content: space-between; align-items: center;
    padding: 9px 12px; border-radius: 6px; font-size: 14px; color: var(--dark);
    transition: all .2s;
}
.sidebar-categories li a:hover, .sidebar-categories li a.active { background: var(--blue-light); color: var(--blue); }
.sidebar-categories .count { background: var(--border); color: var(--gray); font-size: 11px; padding: 2px 8px; border-radius: 10px; }
.sidebar-cta { background: linear-gradient(135deg, var(--blue), var(--dark)); border: none; }
.sidebar-cta h4 { color: #fff; margin-bottom: 8px; }
.sidebar-cta p { color: rgba(255,255,255,.75); font-size: 13px; margin-bottom: 16px; }
.search-wrap { display: flex; border: 1px solid var(--border); border-radius: 8px; overflow: hidden; }
.search-wrap input { flex: 1; padding: 10px 14px; border: none; font-size: 14px; font-family: 'Inter', sans-serif; }
.search-wrap input:focus { outline: none; }
.search-wrap button { padding: 0 16px; background: var(--blue); color: #fff; border: none; cursor: pointer; }

/* ============================================================
   PROYECTO DETALLE / BLOG SINGLE
   ============================================================ */
.post-content { font-size: 15px; line-height: 1.8; color: #374151; }
.post-content h2, .post-content h3 { font-family: 'Merriweather', serif; margin: 28px 0 12px; color: var(--dark); }
.post-content p { margin-bottom: 18px; }
.post-content ul, .post-content ol { margin: 0 0 18px 24px; }
.post-content li { margin-bottom: 8px; }
.post-content img { border-radius: 10px; margin: 20px 0; }
.post-share { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.share-btn {
    display: flex; align-items: center; gap: 6px;
    padding: 8px 16px; border-radius: 6px; font-size: 13px; font-weight: 600; color: #fff;
}
.share-fb { background: #1877f2; } .share-li { background: #0077b5; } .share-wa { background: #25D366; }
.project-info-list li { display: flex; gap: 10px; padding: 10px 0; border-bottom: 1px solid var(--gray-lt); font-size: 14px; }
.project-info-list .label { font-weight: 600; width: 100px; flex-shrink: 0; }
.project-info-list .value { color: var(--gray); }
.result-box { background: var(--blue-light); border-left: 4px solid var(--blue); border-radius: 0 8px 8px 0; padding: 20px 24px; }
.result-box h4 { color: var(--blue); margin-bottom: 6px; }

/* ============================================================
   PAGINACIÓN
   ============================================================ */
.pagination { margin-top: 40px; }
.pagination ul { display: flex; gap: 6px; justify-content: center; flex-wrap: wrap; }
.pagination ul li a, .pagination ul li span {
    display: flex; align-items: center; justify-content: center;
    width: 40px; height: 40px; border: 1px solid var(--border);
    border-radius: 8px; font-size: 14px; color: var(--dark);
    transition: all .2s;
}
.pagination ul li a:hover { background: var(--blue-light); border-color: var(--blue); color: var(--blue); }
.pagination ul li.active a, .pagination ul li.active span { background: var(--blue); border-color: var(--blue); color: #fff; }
.pagination ul li:first-child a, .pagination ul li:last-child a { width: auto; padding: 0 14px; }

/* ============================================================
   FOOTER
   ============================================================ */
#site-footer { background: var(--dark); color: rgba(255,255,255,.75); }
.footer-top { padding: 70px 0 50px; border-bottom: 1px solid rgba(255,255,255,.08); }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1.5fr; gap: 40px; }
.footer-brand .logo-text strong { color: #fff; }
.footer-brand .logo-text small { color: rgba(255,255,255,.5); }
.footer-about { font-size: 14px; line-height: 1.7; margin: 18px 0; color: rgba(255,255,255,.6); }
.footer-social { display: flex; gap: 10px; }
.footer-social a {
    width: 38px; height: 38px; border-radius: 8px;
    background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.1);
    display: flex; align-items: center; justify-content: center;
    color: rgba(255,255,255,.7); font-size: 15px; transition: all .2s;
}
.footer-social a:hover { background: var(--blue); border-color: var(--blue); color: #fff; }
.footer-heading { font-size: 14px; font-weight: 700; color: #fff; text-transform: uppercase; letter-spacing: 1px; margin-bottom: 20px; }
.footer-links li { padding: 6px 0; }
.footer-links a { font-size: 14px; color: rgba(255,255,255,.6); transition: all .2s; }
.footer-links a:hover { color: #fff; padding-left: 4px; }
.footer-contact li { display: flex; gap: 10px; padding: 8px 0; font-size: 14px; color: rgba(255,255,255,.6); }
.footer-contact i { color: var(--orange); flex-shrink: 0; margin-top: 2px; }
.newsletter-form-footer { display: flex; margin-top: 14px; border-radius: 8px; overflow: hidden; }
.newsletter-form-footer input { flex: 1; padding: 11px 14px; border: none; font-size: 14px; background: rgba(255,255,255,.08); color: #fff; }
.newsletter-form-footer input::placeholder { color: rgba(255,255,255,.4); }
.newsletter-form-footer input:focus { outline: none; background: rgba(255,255,255,.12); }
.newsletter-form-footer button { padding: 11px 16px; background: var(--orange); color: #fff; border: none; cursor: pointer; font-size: 14px; transition: background .2s; }
.newsletter-form-footer button:hover { background: var(--orange-dk); }
.newsletter-msg-footer { font-size: 13px; margin-top: 8px; }
.footer-bottom {
    padding: 20px 0; display: flex; align-items: center;
    justify-content: space-between; font-size: 13px;
    color: rgba(255,255,255,.4);
}
.footer-bottom a { color: rgba(255,255,255,.5); margin-left: 16px; }
.footer-bottom a:hover { color: #fff; }

/* ============================================================
   WHATSAPP FLOAT & SCROLL TOP
   ============================================================ */
.wa-float {
    position: fixed; bottom: 28px; right: 28px; z-index: 900;
    width: 56px; height: 56px; background: #25D366; border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    box-shadow: 0 4px 20px rgba(37,211,102,.5); color: #fff; font-size: 24px;
    transition: all .3s;
}
.wa-float:hover { transform: scale(1.1); box-shadow: 0 6px 28px rgba(37,211,102,.6); }
.wa-float::before {
    content: ''; position: absolute; inset: -4px;
    border-radius: 50%; border: 2px solid rgba(37,211,102,.4);
    animation: pulse-wa 2s ease-in-out infinite;
}
@keyframes pulse-wa { 0%,100%{transform:scale(1);opacity:.7} 50%{transform:scale(1.2);opacity:0} }
.scroll-top {
    position: fixed; bottom: 28px; right: 96px; z-index: 900;
    width: 44px; height: 44px; background: var(--blue); border-radius: 8px;
    display: flex; align-items: center; justify-content: center;
    color: #fff; font-size: 16px;
    opacity: 0; visibility: hidden; transition: all .3s; cursor: pointer;
}
.scroll-top.show { opacity: 1; visibility: visible; }
.scroll-top:hover { background: var(--blue-dark); }

/* ============================================================
   PÁGINA LEGAL
   ============================================================ */
.legal-content h2 { font-size: 20px; font-weight: 700; margin: 32px 0 10px; color: var(--dark); }
.legal-content p, .legal-content li { font-size: 15px; color: #4b5563; line-height: 1.8; }
.legal-content ul { margin: 10px 0 16px 22px; }

/* ============================================================
   MAP
   ============================================================ */
.map-container iframe { width: 100%; height: 400px; border: 0; border-radius: 12px; }

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 1199px) {
    .footer-grid { grid-template-columns: 1fr 1fr; gap: 30px; }
    .stats-grid { grid-template-columns: repeat(2, 1fr); }
    .stat-item { border-right: none; border-bottom: 1px solid rgba(255,255,255,.15); }
}
@media (max-width: 991px) {
    .main-nav, .header-right .btn-header-wa { display: none; }
    .hamburger { display: flex; }
    .process-grid { grid-template-columns: 1fr 1fr; }
    .process-step::after { display: none; }
    .col-lg-3 { width: 50%; } .col-lg-4 { width: 50%; }
    .col-lg-6, .col-lg-7, .col-lg-8 { width: 100%; }
    .hero-visual { display: none; }
    .hero-inner .row { display: block; }
    #hero { min-height: auto; padding: 120px 0 60px; }
}
@media (max-width: 767px) {
    .section-title { font-size: 26px; }
    .col-md-4, .col-md-5, .col-md-6, .col-md-7, .col-md-8 { width: 100%; }
    .col-sm-6 { width: 100%; }
    .stats-grid { grid-template-columns: 1fr; }
    .footer-grid { grid-template-columns: 1fr; }
    .form-row { grid-template-columns: 1fr; }
    .hero-stats { flex-wrap: wrap; gap: 20px; }
    .process-grid { grid-template-columns: 1fr; }
}
@media (max-width: 480px) {
    .col-xl-3, .col-xl-4, .col-lg-3, .col-md-4 { width: 100%; }
}

/* ============================================================
   DARK MODE — Variables + overrides completos
   ============================================================ */
html[data-theme="dark"] {
    --blue:       #3b82f6;
    --blue-dark:  #2563eb;
    --orange:     #fb923c;
    --dark:       #f1f5f9;
    --gray:       #94a3b8;
    --gray-lt:    #1e293b;
    --white:      #0f172a;
    --border:     #334155;
    --shadow:     0 4px 24px rgba(0,0,0,.4);
    --shadow-lg:  0 12px 40px rgba(0,0,0,.5);
    color-scheme: dark;
}

/* Base */
html[data-theme="dark"] body            { background:#0f172a; color:#cbd5e1; }
html[data-theme="dark"] h1,
html[data-theme="dark"] h2,
html[data-theme="dark"] h3,
html[data-theme="dark"] h4,
html[data-theme="dark"] h5             { color:#f1f5f9; }
html[data-theme="dark"] p              { color:#94a3b8; }
html[data-theme="dark"] a              { color:#93c5fd; }

/* Header / Nav */
html[data-theme="dark"] #site-header   { background:#0f172a; border-bottom:1px solid #1e293b; box-shadow:0 2px 12px rgba(0,0,0,.4); }
html[data-theme="dark"] .site-logo .logo-text strong,
html[data-theme="dark"] .site-logo .logo-text small { color:#f1f5f9; }
html[data-theme="dark"] .logo-icon     { background:#1e3a8a; }
html[data-theme="dark"] .main-nav > li > a { color:#e2e8f0; }
html[data-theme="dark"] .main-nav > li > a:hover { color:#60a5fa; }
html[data-theme="dark"] .megamenu      { background:#1e293b; border:1px solid #334155; box-shadow:0 8px 32px rgba(0,0,0,.5); }
html[data-theme="dark"] .megamenu h5   { color:#64748b; }
html[data-theme="dark"] .megamenu a    { color:#cbd5e1; }
html[data-theme="dark"] .megamenu a:hover { color:#60a5fa; background:#334155; }
html[data-theme="dark"] .mobile-menu   { background:#0a0a2e; }
html[data-theme="dark"] .mobile-nav a  { color:#e2e8f0; border-bottom-color:#1e293b; }
html[data-theme="dark"] .hamburger span { background:#e2e8f0; }
html[data-theme="dark"] .header-right .btn-header-wa { background:#15803d; }

/* Page banner */
html[data-theme="dark"] .page-banner   { background:linear-gradient(135deg,#0f172a 0%,#1e3a8a 100%); }
html[data-theme="dark"] .page-banner h1,
html[data-theme="dark"] .page-banner .breadcrumb a,
html[data-theme="dark"] .page-banner .breadcrumb span { color:#e2e8f0; }

/* Sections */
html[data-theme="dark"] section        { background:#0f172a; }
html[data-theme="dark"] .section-alt,
html[data-theme="dark"] .bg-light,
html[data-theme="dark"] .section-padding.bg-light { background:#1e293b !important; }
html[data-theme="dark"] .section-tag   { background:#1e3a8a; color:#93c5fd; }
html[data-theme="dark"] .section-title { color:#f1f5f9; }
html[data-theme="dark"] .section-desc  { color:#94a3b8; }

/* Cards */
html[data-theme="dark"] .card,
html[data-theme="dark"] .service-card,
html[data-theme="dark"] .service-list-card,
html[data-theme="dark"] .blog-card,
html[data-theme="dark"] .portfolio-card { background:#1e293b; border-color:#334155; }
html[data-theme="dark"] .card-header    { background:#1e293b; border-bottom-color:#334155; }
html[data-theme="dark"] .service-card:hover,
html[data-theme="dark"] .service-list-card:hover { background:#334155; }
html[data-theme="dark"] .service-card h3,
html[data-theme="dark"] .service-list-card h3 { color:#f1f5f9; }
html[data-theme="dark"] .service-card p,
html[data-theme="dark"] .service-list-card p { color:#94a3b8; }

/* Blog */
html[data-theme="dark"] .blog-card-body  { background:#1e293b; }
html[data-theme="dark"] .blog-card-title a { color:#f1f5f9; }
html[data-theme="dark"] .entry-cat       { background:#1e3a8a; color:#93c5fd; }
html[data-theme="dark"] .entry-date,
html[data-theme="dark"] .entry-author    { color:#64748b; }
html[data-theme="dark"] .post-content p,
html[data-theme="dark"] .post-content li { color:#cbd5e1; }
html[data-theme="dark"] .post-content h2,
html[data-theme="dark"] .post-content h3 { color:#f1f5f9; }

/* Portfolio */
html[data-theme="dark"] .portfolio-card-body { background:#1e293b; }
html[data-theme="dark"] .portfolio-card-title a { color:#f1f5f9; }
html[data-theme="dark"] .portfolio-category { color:#64748b; }

/* Sidebar */
html[data-theme="dark"] .sidebar-widget { background:#1e293b; border-color:#334155; }
html[data-theme="dark"] .widget-title   { color:#f1f5f9; border-bottom-color:#334155; }
html[data-theme="dark"] .sidebar-categories a { color:#cbd5e1; }
html[data-theme="dark"] .sidebar-categories a:hover { color:#60a5fa; }
html[data-theme="dark"] .sidebar-categories .count { background:#334155; color:#94a3b8; }
html[data-theme="dark"] .sidebar-recent-posts .info a { color:#cbd5e1; }
html[data-theme="dark"] .sidebar-recent-posts span { color:#64748b; }
html[data-theme="dark"] .search-wrap input { background:#0f172a; border-color:#334155; color:#e2e8f0; }

/* Forms */
html[data-theme="dark"] .form-control,
html[data-theme="dark"] input[type="text"],
html[data-theme="dark"] input[type="email"],
html[data-theme="dark"] textarea,
html[data-theme="dark"] select         { background:#1e293b; border-color:#334155; color:#e2e8f0; }
html[data-theme="dark"] .form-control:focus { border-color:#3b82f6; background:#0f172a; }
html[data-theme="dark"] ::placeholder  { color:#475569; }

/* Stats / counters */
html[data-theme="dark"] .stats-section,
html[data-theme="dark"] .section-stats { background:linear-gradient(135deg,#0a0a2e,#1e3a8a) !important; }

/* Hero */
html[data-theme="dark"] .hero-section  { background:linear-gradient(135deg,#020617 0%,#0f172a 50%,#1e3a8a 100%) !important; }

/* CTA sections */
html[data-theme="dark"] .cta-banner,
html[data-theme="dark"] .cta-section   { background:linear-gradient(135deg,#1e3a8a,#1B4FD8) !important; }

/* Footer */
html[data-theme="dark"] footer,
html[data-theme="dark"] .site-footer   { background:#020617 !important; }
html[data-theme="dark"] .footer-bottom { background:#010409 !important; border-top-color:#1e293b; }

/* Scroll top & WhatsApp float stay same */

/* Dark mode toggle button — public site */
.theme-toggle {
    width:36px; height:36px; border-radius:50%;
    border:1.5px solid var(--border);
    background:var(--gray-lt);
    cursor:pointer;
    display:flex; align-items:center; justify-content:center;
    font-size:16px; transition:all .2s; flex-shrink:0; color:var(--dark);
}
.theme-toggle:hover { background:var(--blue); color:#fff; border-color:var(--blue); }
html[data-theme="dark"] .theme-toggle  { background:#1e293b; border-color:#334155; color:#fbbf24; }
html[data-theme="dark"] .theme-toggle:hover { background:var(--blue); color:#fff; }