:root {
    --navy-deep: #081525;
    --navy: #0e2040;
    --navy-light: #162d55;
    --purple: #1a0d4e;
    --orange: #ff6b35;
    --orange-hover: #e85a2a;
    --white: #ffffff;
    --offwhite: #e8eaf6;
    --slate: #9aa5c0;
    --glass-bg: rgba(10, 22, 45, 0.78);
    --glass-border: rgba(255, 255, 255, 0.10);
}

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

html { scroll-behavior: smooth; overflow-x: hidden; }

body {
    font-family: 'Montserrat', sans-serif;
    background-color: var(--navy-deep);
    color: var(--offwhite);
    overflow-x: hidden;
    line-height: 1.6;
    cursor: auto;
}

/* ── Typography ──────────────────────────────────────────────────────── */
h1, h2, h3, h4 {
    font-family: 'Montserrat', sans-serif;
    color: var(--white);
    font-weight: 800;
    letter-spacing: -0.02em;
}

h1 { font-size: clamp(2.2rem, 4.5vw, 4rem); line-height: 1.1; }
h2 { font-size: clamp(1.8rem, 3.5vw, 2.8rem); margin-bottom: 1.25rem; }
h3 { font-size: 1.25rem; margin-bottom: 0.75rem; color: var(--orange); }
h4 { font-size: 1rem; font-weight: 700; color: var(--white); }
p  { font-size: 1rem; color: var(--slate); max-width: 600px; margin-bottom: 1.25rem; }

.mono   { font-family: 'Montserrat', monospace; letter-spacing: 0.08em; font-weight: 600; }
.accent { color: var(--orange); }

/* ── Utilities ───────────────────────────────────────────────────────── */
.container {
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
}

.btn {
    display: inline-block;
    padding: 0.9rem 2rem;
    background-color: var(--orange);
    color: var(--white);
    text-decoration: none;
    font-weight: 700;
    border-radius: 4px;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
    font-family: 'Montserrat', sans-serif;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    font-size: 0.85rem;
}

.btn:hover {
    background-color: var(--orange-hover);
    transform: translateY(-2px);
    box-shadow: 0 10px 30px -10px rgba(255, 107, 53, 0.5);
}

.btn-outline {
    background-color: transparent;
    border: 2px solid var(--orange);
}

.btn-outline:hover { background-color: var(--orange); }

.glass-panel {
    background: var(--glass-bg);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    padding: 2rem;
}

/* ── Video Background ────────────────────────────────────────────────── */
#videoBg {
    position: fixed;
    inset: 0;
    z-index: 0;
    background: var(--navy-deep);
    overflow: hidden;
}

#videoBg video {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: opacity 1.5s ease;
}

#videoA { opacity: 1; z-index: 1; }
#videoB { opacity: 0; z-index: 2; }

/* Dark overlay sobre el video para que el texto se lea bien */
#videoOverlay {
    position: absolute;
    inset: 0;
    z-index: 3;
    background:
        linear-gradient(to right, rgba(8,21,37,0.72) 0%, rgba(8,21,37,0.25) 55%, rgba(8,21,37,0.45) 100%),
        linear-gradient(to top, rgba(8,21,37,0.55) 0%, transparent 40%);
}

/* Fallback cuando no hay videos: fondo animado */
#videoBg.no-video {
    background: var(--navy-deep);
}

#videoBg.no-video::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(255,255,255,0.025) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255,255,255,0.025) 1px, transparent 1px);
    background-size: 80px 80px;
}

#videoBg.no-video::after {
    content: '';
    position: absolute;
    inset: -30%;
    background:
        radial-gradient(ellipse 55% 55% at 25% 45%, rgba(26,13,78,0.45) 0%, transparent 60%),
        radial-gradient(ellipse 40% 40% at 80% 65%, rgba(255,107,53,0.07) 0%, transparent 55%);
    animation: bgFloat 18s ease-in-out infinite alternate;
}

@keyframes bgFloat {
    0%   { transform: translate(0, 0) scale(1); }
    100% { transform: translate(4%, 3%) scale(1.06); }
}

/* ── Marquee ─────────────────────────────────────────────────────────── */
.marquee-bar {
    background: rgba(255,107,53,0.12);
    border-top: 1px solid rgba(255,107,53,0.2);
    border-bottom: 1px solid rgba(255,107,53,0.2);
    padding: 0.75rem 0;
    overflow: hidden;
    white-space: nowrap;
    position: relative;
    z-index: 21;
}

.marquee-track {
    display: inline-block;
    animation: marqueeScroll 35s linear infinite;
}

.marquee-track span {
    display: inline-block;
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: var(--offwhite);
    padding: 0 1.5rem;
}

.marquee-dot {
    color: var(--orange) !important;
    padding: 0 0.25rem !important;
}

@keyframes marqueeScroll {
    0%   { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}

/* ── Navigation ──────────────────────────────────────────────────────── */
#main-nav {
    position: fixed;
    top: 0; left: 0;
    width: 100%;
    z-index: 100;
    padding: 1.5rem 0;
    transition: all 0.3s ease;
    background: linear-gradient(to bottom, rgba(3,11,24,0.95) 0%, transparent 100%);
}

#main-nav.scrolled {
    background: rgba(3, 11, 24, 0.95);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    padding: 1rem 0;
    border-bottom: 1px solid var(--glass-border);
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-links {
    display: flex;
    gap: 2rem;
    list-style: none;
}

.nav-links a {
    color: var(--offwhite);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    transition: color 0.3s ease;
}

.nav-links a:hover { color: var(--orange); }

/* Hamburger button */
#menuBtn {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px;
    z-index: 200;
}

#menuBtn span {
    display: block;
    width: 24px;
    height: 2px;
    background: var(--white);
    border-radius: 2px;
    transition: all 0.3s ease;
}

#menuBtn.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
#menuBtn.open span:nth-child(2) { opacity: 0; }
#menuBtn.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* Mobile menu */
#mobileMenu {
    display: none;
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: rgba(3,11,24,0.98);
    z-index: 150;
    align-items: center;
    justify-content: center;
    flex-direction: column;
}

#mobileMenu.open { display: flex; }

#mobileMenu ul {
    list-style: none;
    text-align: center;
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

#mobileMenu a {
    color: var(--white);
    text-decoration: none;
    font-size: 1.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 2px;
    transition: color 0.3s;
}

#mobileMenu a:hover { color: var(--orange); }

/* ── Hero ─────────────────────────────────────────────────────────────── */
#overlay {
    position: fixed;
    inset: 0;
    z-index: 10;
    display: flex;
    align-items: center;
    height: 100vh;
    transition: opacity 0.4s ease;
    /* Left-side gradient so text is readable */
    background: linear-gradient(to right, rgba(3,11,24,0.9) 0%, rgba(3,11,24,0.65) 40%, transparent 65%);
    pointer-events: none;
}

.hero-content {
    margin-top: 8vh;
    max-width: 560px;
}

.hero-brand {
    font-family: 'Montserrat', sans-serif;
    font-size: clamp(1.8rem, 4vw, 3.2rem);
    font-weight: 800;
    color: var(--white);
    letter-spacing: -0.02em;
    line-height: 1.05;
    margin-bottom: 0.8rem;
    text-shadow: 0 2px 24px rgba(0,0,0,0.85);
    white-space: nowrap;
    animation: heroFadeIn 1.2s cubic-bezier(0.22, 1, 0.36, 1) both;
}

@keyframes heroFadeIn {
    0%   { opacity: 0; transform: translateY(30px) skewY(1deg); }
    100% { opacity: 1; transform: translateY(0) skewY(0deg); }
}

.hero-tagline {
    font-size: clamp(1rem, 2vw, 1.25rem);
    font-weight: 400;
    margin-bottom: 1.2rem;
    text-shadow: 0 2px 20px rgba(0,0,0,0.8);
    color: var(--offwhite);
    opacity: 0.85;
    animation: heroFadeIn 1.2s cubic-bezier(0.22, 1, 0.36, 1) 0.25s both;
}

.hero-sub {
    font-size: 1rem;
    color: var(--offwhite);
    margin-bottom: 2.5rem;
    max-width: 460px;
    opacity: 0.9;
}

/* ── Page Root ───────────────────────────────────────────────────────── */
#pageRoot {
    position: relative;
    z-index: 20;
    margin-top: 100vh;
    background: linear-gradient(to bottom, transparent 0%, var(--navy-deep) 8%);
    pointer-events: auto;
}

/* ── Content Sections ────────────────────────────────────────────────── */
.content-section {
    padding: 8vh 0;
    display: flex;
    align-items: center;
    position: relative;
}

/* ── About ───────────────────────────────────────────────────────────── */
.credentials-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
    margin-top: 2.5rem;
}

.credential-item {
    text-align: center;
    padding: 1.5rem;
}

.credential-icon {
    font-size: 2.2rem;
    color: var(--orange);
    margin-bottom: 0.75rem;
    font-family: 'Montserrat', sans-serif;
    font-weight: 800;
}

/* ── Business Lines ──────────────────────────────────────────────────── */
.business-lines-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
    margin-top: 3rem;
}

.line-card {
    position: relative;
    overflow: hidden;
    border-radius: 12px;
    height: 320px;
    cursor: pointer;
}

.line-card-bg {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center;
    transition: transform 0.5s ease;
    will-change: transform;
}

/* Fotos por línea de negocio */
#line-construccion .line-card-bg  { background-image: url('../uploads/serv-construccion.jpg'); background-size: cover; background-position: center; opacity: 0.65; }
#line-ferreteria .line-card-bg    { background-image: url('../uploads/serv-ferreteria.jpg'); background-size: cover; background-position: center; opacity: 0.65; }
#line-pinturas .line-card-bg      { background-image: url('../uploads/serv-pinturas.jpg'); background-size: cover; background-position: center; opacity: 0.65; }
#line-lubricantes .line-card-bg   { background-image: url('../uploads/serv-lubricantes.jpg'); background-size: cover; background-position: center; opacity: 0.65; }
#line-epp .line-card-bg           { background-image: url('../uploads/serv-epp.jpg'); background-size: cover; background-position: center; opacity: 0.65; }
#line-mantenimiento .line-card-bg { background-image: url('../uploads/serv-plomeria.jpg'); background-size: cover; background-position: center; opacity: 0.65; }

.line-card:hover .line-card-bg { transform: scale(1.05); }

.line-content {
    position: absolute;
    inset: 0;
    padding: 1.75rem;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    background: linear-gradient(to top, rgba(3,11,24,0.95) 0%, transparent 100%);
}

.line-content p { margin-bottom: 0; font-size: 0.9rem; }

/* ── Experiencia ─────────────────────────────────────────────────────── */
.exp-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
    margin-top: 3rem;
}

.exp-card {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

/* ── Sectores ────────────────────────────────────────────────────────── */
.sectores-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 1.5rem;
    margin-top: 3rem;
}

.sector-card { text-align: center; }
.sector-icon {
    width: 48px;
    height: 48px;
    margin: 0 auto 1rem;
    color: var(--orange);
}

.sector-icon svg {
    width: 100%;
    height: 100%;
    stroke: var(--orange);
}
.sector-card h3 { font-size: 1rem; margin-bottom: 0.5rem; }
.sector-card p  { font-size: 0.85rem; max-width: 100%; }

/* ── Brands ──────────────────────────────────────────────────────────── */
.brands-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1px;
    background: var(--glass-border);
    border: 1px solid var(--glass-border);
    border-radius: 8px;
    overflow: hidden;
    margin-top: 2.5rem;
}

.brand-item {
    background: var(--navy);
    padding: 2.5rem 1.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    transition: background 0.3s ease;
}

.brand-item:hover { background: var(--navy-light); }

.brand-inner {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    text-align: center;
}

.brand-inner img {
    max-height: 52px;
    max-width: 150px;
    object-fit: contain;
    opacity: 0.75;
    transition: opacity 0.3s, filter 0.3s;
}

/* Logos con fondo transparente → se muestran en blanco */
.brand-inner img.logo-transparent {
    filter: brightness(0) invert(1);
}

.brand-item:hover .brand-inner img { opacity: 1; }

.brand-inner span {
    font-size: 0.7rem;
    color: var(--slate);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.brand-text strong {
    display: block;
    font-size: 1.3rem;
    font-weight: 900;
    color: var(--white);
    letter-spacing: 1px;
}

/* ── Contact ─────────────────────────────────────────────────────────── */
.contact-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    margin-top: 2.5rem;
}

.contact-form { display: flex; flex-direction: column; gap: 1.25rem; }

.form-group  { display: flex; flex-direction: column; gap: 0.4rem; }
.form-label  { font-size: 0.8rem; color: var(--slate); font-weight: 600; text-transform: uppercase; letter-spacing: 1px; }

.form-input {
    padding: 0.9rem 1rem;
    background: var(--navy-light);
    border: 1px solid var(--glass-border);
    border-radius: 6px;
    color: var(--white);
    font-family: 'Montserrat', sans-serif;
    font-size: 0.95rem;
    transition: border-color 0.3s ease;
}

.form-input:focus { outline: none; border-color: var(--orange); }

textarea.form-input { resize: vertical; min-height: 120px; }

.whatsapp-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background-color: #25D366;
    margin-top: 1rem;
}

.whatsapp-btn:hover {
    background-color: #1fb857;
    box-shadow: 0 10px 20px -10px rgba(37,211,102,0.5);
}

/* ── Video Dots ──────────────────────────────────────────────────────── */
#videoDots {
    position: absolute;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%);
    z-index: 4;
    display: flex;
    gap: 0.6rem;
}

.video-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: rgba(255,255,255,0.35);
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
    padding: 0;
}

.video-dot.active {
    background: var(--orange);
    transform: scale(1.3);
}

/* ── Catálogos ───────────────────────────────────────────────────────── */
.catalogos-grid {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
    margin-top: 2.5rem;
}

.catalogo-card {
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    gap: 1.5rem;
    padding: 1.75rem 2rem;
    transition: transform 0.25s ease, border-color 0.25s ease;
}

.catalogo-card:hover {
    transform: translateY(-3px);
    border-color: rgba(255,107,53,0.3);
}

.catalogo-icon { color: var(--orange); flex-shrink: 0; }

.catalogo-info h4 { margin-bottom: 0.25rem; }
.catalogo-info p  { font-size: 0.875rem; color: var(--slate); margin-bottom: 0; }

/* ── Portal GFM ──────────────────────────────────────────────────────── */
.portal-section {
    position: relative;
    overflow: hidden;
    background: linear-gradient(135deg, #0a1c38 0%, #0e2040 50%, #0a1828 100%);
    border-top: 1px solid rgba(255,107,53,0.2);
    border-bottom: 1px solid rgba(255,107,53,0.2);
}

.portal-section::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(ellipse at 70% 30%, rgba(255,107,53,0.12) 0%, transparent 55%),
                radial-gradient(ellipse at 20% 80%, rgba(255,107,53,0.06) 0%, transparent 45%);
    pointer-events: none;
}

.portal-header {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem 4rem;
    align-items: center;
    margin-bottom: 3rem;
}

.portal-header-text { }

.portal-badge {
    display: inline-block;
    font-family: 'Montserrat', sans-serif;
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    color: #fff;
    background: var(--orange);
    border-radius: 50px;
    padding: 0.35rem 1rem;
    margin-bottom: 1rem;
}

.portal-header h2 { margin-bottom: 0.75rem; }

.portal-lead {
    font-size: 1rem;
    color: var(--slate);
    max-width: 100%;
    margin: 0;
}

.portal-header-visual {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
}

.portal-mock-bar {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
}

.portal-mock-dot {
    width: 10px; height: 10px; border-radius: 50%;
}

.portal-mock-row {
    height: 10px;
    border-radius: 4px;
    background: rgba(255,255,255,0.07);
}

.portal-mock-row.accent { background: rgba(255,107,53,0.3); width: 60%; }
.portal-mock-row.short  { width: 40%; }
.portal-mock-row.med    { width: 75%; }
.portal-mock-row.full   { width: 100%; }

.portal-features {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.25rem;
    margin-bottom: 3rem;
}

.portal-feature {
    padding: 1.75rem 1.5rem;
    transition: transform 0.25s ease, border-color 0.25s ease;
}

.portal-feature:hover {
    transform: translateY(-5px);
    border-color: rgba(255,107,53,0.3);
}

.portal-feature-icon {
    color: var(--orange);
    margin-bottom: 1rem;
}

.portal-feature h4 {
    font-size: 1rem;
    margin-bottom: 0.5rem;
    color: var(--white);
}

.portal-feature p {
    font-size: 0.875rem;
    color: var(--slate);
    margin-bottom: 0;
}

.portal-steps {
    margin: 3.5rem 0;
    padding: 3rem 2.5rem;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 16px;
}

.portal-steps-grid {
    display: grid;
    grid-template-columns: 1fr auto 1fr auto 1fr auto 1fr;
    gap: 0 1rem;
    align-items: start;
}

.portal-step {
    text-align: center;
}

.portal-step-num {
    width: 52px;
    height: 52px;
    border-radius: 50%;
    background: var(--orange);
    color: var(--white);
    font-weight: 900;
    font-size: 1.3rem;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1rem;
}

.portal-step h4 { margin-bottom: 0.4rem; font-size: 0.95rem; }
.portal-step p  { font-size: 0.82rem; color: var(--slate); margin-bottom: 0; }

.portal-step-arrow {
    font-size: 1.5rem;
    color: var(--orange);
    opacity: 0.5;
    padding-top: 1rem;
    align-self: start;
}

.portal-cta {
    text-align: center;
    padding: 2.5rem;
    border: 1px dashed rgba(255,107,53,0.35);
    border-radius: 12px;
    background: rgba(255,107,53,0.04);
}

.portal-cta p {
    font-size: 1.1rem;
    color: var(--offwhite);
    margin-bottom: 1.25rem;
}

/* ── Misión / Visión ─────────────────────────────────────────────────── */
.mision-vision-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    margin: 2.5rem 0;
}

/* ── Metodología ─────────────────────────────────────────────────────── */
.metod-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
    margin-top: 3rem;
}

.metod-card {
    padding: 2.5rem 2rem;
    text-align: center;
    transition: transform 0.3s ease;
}

.metod-card:hover { transform: translateY(-6px); }

.metod-icon {
    width: 72px;
    height: 72px;
    border-radius: 50%;
    background: rgba(255,107,53,0.12);
    border: 1px solid rgba(255,107,53,0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.5rem;
    color: var(--orange);
}

.metod-card h3 { color: var(--white); margin-bottom: 0.75rem; }

/* ── Timeline v2 ─────────────────────────────────────────────────────── */
.gfm-timeline-section { padding: 1rem 0 3rem; max-width: 860px; margin: 0 auto; }

.tl-header { text-align: center; margin-bottom: 3.5rem; }
.tl-eyebrow { font-size: 11px; font-weight: 600; letter-spacing: 0.22em; text-transform: uppercase; color: var(--orange); margin-bottom: 0.75rem; }
.tl-title { font-size: clamp(1.6rem, 3.5vw, 2.2rem); font-weight: 700; color: var(--white); line-height: 1.2; margin-bottom: 0.75rem; }
.tl-subtitle { font-size: 1rem; color: var(--slate); max-width: 540px; margin: 0 auto; line-height: 1.7; }

.tl-track { position: relative; padding: 0; }
.tl-spine {
  position: absolute; left: 50%; top: 0; bottom: 0; width: 1px;
  transform: translateX(-50%);
  background: linear-gradient(to bottom, transparent 0%, var(--orange) 6%, var(--navy-light) 35%, var(--navy-light) 68%, var(--orange) 92%, transparent 100%);
  opacity: 0.4;
}

.tl-item { display: grid; grid-template-columns: 1fr 64px 1fr; gap: 0; margin-bottom: 2.5rem; align-items: start; cursor: pointer; }
.tl-item:last-child { margin-bottom: 0; }
.tl-item.right .tl-content { grid-column: 3; padding-left: 2rem; }
.tl-item.right .tl-center  { grid-column: 2; }
.tl-item.right .tl-empty   { grid-column: 1; }
.tl-item.left  .tl-content { grid-column: 1; order: 1; padding-right: 2rem; text-align: right; }
.tl-item.left  .tl-center  { grid-column: 2; order: 2; }
.tl-item.left  .tl-empty   { grid-column: 3; order: 3; }

.tl-center { display: flex; flex-direction: column; align-items: center; position: relative; z-index: 2; }
.tl-dot-outer { width: 52px; height: 52px; border-radius: 50%; display: flex; align-items: center; justify-content: center; transition: transform 0.25s ease; flex-shrink: 0; }
.tl-item:hover .tl-dot-outer { transform: scale(1.12); }
.dot-orange { background: rgba(255,107,53,0.1); border: 1.5px solid rgba(255,107,53,0.45); }
.dot-blue   { background: rgba(14,32,64,0.5); border: 1.5px solid rgba(255,255,255,0.2); }
.dot-gold   { background: rgba(200,160,40,0.12); border: 2px solid rgba(200,160,40,0.65); box-shadow: 0 0 0 5px rgba(200,160,40,0.07); }
.tl-dot-inner { width: 14px; height: 14px; border-radius: 50%; }
.inner-orange { background: var(--orange); }
.inner-blue   { background: var(--navy-light); }
.inner-gold   { background: #c8a028; }
.tl-year { font-size: 11px; font-weight: 600; letter-spacing: 0.1em; color: var(--slate); margin-top: 8px; white-space: nowrap; }

.tl-card { background: var(--navy); border: 0.5px solid var(--glass-border); border-radius: 14px; padding: 1.25rem 1.5rem; transition: border-color 0.2s, transform 0.2s; text-align: left; }
.tl-item:hover .tl-card { border-color: rgba(255,255,255,0.15); transform: translateY(-2px); }
.tl-card.featured { border: 1px solid rgba(200,160,40,0.35); }
.tl-item:hover .tl-card.featured { border-color: rgba(200,160,40,0.65); }

.tl-card-tag { font-size: 10px; font-weight: 600; letter-spacing: 0.18em; text-transform: uppercase; margin-bottom: 8px; display: inline-block; padding: 3px 10px; border-radius: 20px; }
.tag-orange { background: rgba(255,107,53,0.1); color: var(--orange); border: 0.5px solid rgba(255,107,53,0.25); }
.tag-blue   { background: rgba(14,32,64,0.5); color: var(--offwhite); border: 0.5px solid rgba(255,255,255,0.15); }
.tag-gold   { background: rgba(200,160,40,0.1); color: #c8a028; border: 0.5px solid rgba(200,160,40,0.3); }

.tl-card-name { font-size: 1rem; font-weight: 700; color: var(--white); margin-bottom: 6px; line-height: 1.3; }
.tl-card-desc { font-size: 0.875rem; color: var(--slate); line-height: 1.7; margin-bottom: 0; max-width: 100%; }
.tl-card-pill { display: inline-block; margin-top: 12px; font-size: 11px; font-weight: 600; letter-spacing: 0.05em; padding: 4px 12px; border-radius: 20px; background: rgba(200,160,40,0.1); color: #c8a028; border: 0.5px solid rgba(200,160,40,0.3); }

.tl-card-img { width: 160px; height: 160px; object-fit: cover; border-radius: 50%; margin-bottom: 1rem; filter: grayscale(100%); border: 3px solid rgba(255,107,53,0.4); display: block; }

.tl-footer { text-align: center; margin-top: 3rem; padding-top: 2rem; border-top: 0.5px solid var(--glass-border); }
.tl-footer-slogan { font-size: 15px; color: var(--slate); font-style: italic; }
.tl-footer-accent { color: var(--orange); font-weight: 600; font-style: normal; }

@media (max-width: 768px) {
  .tl-item { grid-template-columns: 40px 1fr; }
  .tl-spine { left: 20px; }
  .tl-item.right .tl-center, .tl-item.left .tl-center { grid-column: 1; grid-row: 1; order: 1; }
  .tl-item.right .tl-content, .tl-item.left .tl-content { grid-column: 2; grid-row: 1; order: 2; padding: 0 0 0 1rem !important; text-align: left !important; }
  .tl-item.right .tl-empty, .tl-item.left .tl-empty { display: none; }
  .tl-dot-outer { width: 38px; height: 38px; }
  .tl-dot-inner { width: 11px; height: 11px; }
}

/* ── Timeline (old - keep for reference) ─────────────────────────────── */
.timeline {
    position: relative;
    margin-top: 3.5rem;
    padding-left: 0;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 90px;
    top: 0;
    bottom: 0;
    width: 2px;
    background: linear-gradient(to bottom, var(--orange), rgba(255,107,53,0.1));
}

.timeline-item {
    display: grid;
    grid-template-columns: 90px 20px 1fr;
    gap: 0 1.5rem;
    align-items: start;
    margin-bottom: 2rem;
}

.timeline-year {
    font-family: 'Montserrat', sans-serif;
    font-weight: 800;
    font-size: 1.1rem;
    color: var(--orange);
    text-align: right;
    padding-top: 1.2rem;
    line-height: 1;
}

.timeline-dot {
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: var(--orange);
    border: 3px solid var(--navy-deep);
    box-shadow: 0 0 0 2px var(--orange);
    margin-top: 1.4rem;
    flex-shrink: 0;
}

.timeline-content {
    padding: 1.25rem 1.5rem;
}

.timeline-content h4 { margin-bottom: 0.4rem; }
.timeline-content p  { font-size: 0.9rem; margin-bottom: 0; color: var(--slate); }

/* ── WhatsApp botón de contacto (dentro de sección) ─────────────────── */
.btn-whatsapp-contact {
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    background: #25d366;
    color: #fff;
    border: none;
    padding: 0.85rem 1.5rem;
    border-radius: 6px;
    font-weight: 700;
    font-size: 0.9rem;
    text-decoration: none;
    transition: background 0.2s ease;
}
.btn-whatsapp-contact:hover { background: #1ebc59; }

/* ── WhatsApp flotante ───────────────────────────────────────────────── */
.whatsapp-btn {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    z-index: 999;
    display: flex;
    align-items: center;
    gap: 0.6rem;
    background: #25d366;
    color: #fff;
    text-decoration: none;
    padding: 0.75rem 1.2rem 0.75rem 1rem;
    border-radius: 50px;
    font-family: 'Montserrat', sans-serif;
    font-weight: 700;
    font-size: 0.95rem;
    box-shadow: 0 4px 20px rgba(37,211,102,0.45);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.whatsapp-btn:hover {
    transform: translateY(-3px) scale(1.04);
    box-shadow: 0 8px 28px rgba(37,211,102,0.55);
}

/* ── Footer ──────────────────────────────────────────────────────────── */
footer {
    position: relative;
    z-index: 20;
    background: var(--navy-deep);
    padding: 5rem 0 2rem;
    border-top: 1px solid var(--glass-border);
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.5fr 1fr 1fr;
    gap: 4rem;
    padding-bottom: 3rem;
    border-bottom: 1px solid var(--glass-border);
}

.footer-links {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
}

.footer-links li, .footer-links a {
    font-size: 0.9rem;
    color: var(--slate);
    text-decoration: none;
    transition: color 0.3s;
}

.footer-links a:hover { color: var(--orange); }

.footer-bottom {
    padding-top: 2rem;
    margin-top: 2rem;
    border-top: 1px solid rgba(255,255,255,0.1);
    text-align: center;
}

.footer-legal-links {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.4rem 0.75rem;
    margin-bottom: 1.25rem;
}

.footer-legal-links a {
    font-size: 0.75rem;
    color: rgba(180,190,210,0.85);
    text-decoration: none;
    transition: color 0.2s;
}

.footer-legal-links a:hover { color: var(--orange); }

.footer-legal-links span {
    font-size: 0.75rem;
    color: rgba(136,146,176,0.5);
}

/* ── Custom Cursor ───────────────────────────────────────────────────── */
/* (elements are inline on HTML) */

/* ── Reveal Animation ────────────────────────────────────────────────── */
.reveal-up {
    opacity: 0;
    transform: translateY(25px);
    transition: opacity 0.7s ease, transform 0.7s ease;
}
.reveal-up.active {
    opacity: 1;
    transform: translateY(0);
}

/* ── Responsive ──────────────────────────────────────────────────────── */
@media (max-width: 1024px) {
    .business-lines-grid,
    .exp-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .sectores-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 1024px) {
    .footer-grid { grid-template-columns: 1fr 1fr; gap: 2rem; }
}

@media (max-width: 768px) {
    body { cursor: auto; }
    #cursorDot, #cursorRing { display: none !important; }
    .nav-links { display: none; }
    #menuBtn { display: flex; }

    h1 { font-size: 2rem; }
    h2 { font-size: 1.6rem; }
    p  { max-width: 100%; }

    /* Hero: overlay cubre todo en móvil para legibilidad */
    #overlay {
        background: rgba(3,11,24,0.75);
    }

    /* Fondo estático en móvil en lugar de video */
    #videoBg.no-video {
        background-image: url('../uploads/serv-construccion.jpg');
        background-size: cover;
        background-position: center;
    }
    #videoBg.no-video::before {
        background-image: none;
        background: rgba(3,11,24,0.55);
    }
    #videoBg.no-video::after { display: none; }

    .hero-content { max-width: 100%; }
    .hero-brand { font-size: clamp(1.6rem, 7vw, 2.4rem); white-space: normal; }

    .contact-layout,
    .business-lines-grid,
    .exp-grid,
    .credentials-grid,
    .footer-grid,
    .metod-grid,
    .portal-features,
    .mision-vision-grid {
        grid-template-columns: 1fr;
    }

    /* Sectores: 2 columnas en móvil */
    .sectores-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    /* Marcas: 1 columna en móvil para evitar cortes */
    .brands-grid {
        grid-template-columns: 1fr;
    }
    .brand-item {
        padding: 1.5rem 1rem;
    }
    .brand-inner img {
        max-height: 40px;
    }

    /* WhatsApp flotante: solo ícono en móvil */
    .whatsapp-btn {
        padding: 0.85rem;
        border-radius: 50%;
        font-size: 0;
        gap: 0;
    }
    .whatsapp-btn svg { width: 26px; height: 26px; }

    .timeline::before { left: 70px; }
    .timeline-item { grid-template-columns: 70px 16px 1fr; }
    .timeline-year { font-size: 0.95rem; }

    .portal-steps-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem 0;
    }
    .portal-step-arrow { display: none; }

    .portal-header {
        grid-template-columns: 1fr;
    }
    .portal-header-visual { display: none; }

    .catalogo-card {
        grid-template-columns: 1fr;
        text-align: center;
    }
    .catalogo-icon { margin: 0 auto; }

    /* Secciones con menos padding vertical */
    .content-section { padding: 5vh 0; }
    footer { padding: 3rem 0 2rem; }
}
