/* ==========================================================================
   JPS Ingenieros - CSS Principal
   Diseño premium corporativo de ingeniería
   ========================================================================== */

/* ---------- Variables y Reset ---------- */
:root {
    --blue: #004AAD;
    --blue-dark: #002E6D;
    --navy: #002E6D;
    --red: #E31E24;
    --yellow: #FFD100;
    --white: #FFFFFF;
    --black: #111111;
    --gray: #BFC4CB;
    --gray-light: #F5F6F8;
    --font-heading: 'Manrope', sans-serif;
    --font-body: 'Inter', sans-serif;
    --transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --shadow: 0 4px 24px rgba(0,0,0,0.08);
    --shadow-lg: 0 12px 48px rgba(0,0,0,0.12);
    --radius: 12px;
    --radius-sm: 8px;
}

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

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    font-family: var(--font-body);
    font-weight: 400;
    line-height: 1.7;
    color: var(--black);
    background: var(--white);
    overflow-x: hidden;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

a {
    text-decoration: none;
    color: inherit;
    transition: var(--transition);
}

ul, ol {
    list-style: none;
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    font-weight: 800;
    line-height: 1.2;
}

/* ---------- Trama técnica de fondo ---------- */
.bg-blueprint {
    position: relative;
}
.bg-blueprint::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image: 
        linear-gradient(30deg, rgba(0, 74, 173, 0.1) 1px, transparent 1px),
        linear-gradient(-30deg, rgba(0, 74, 173, 0.1) 1px, transparent 1px);
    background-size: 80px 46px;
    pointer-events: none;
    z-index: 0;
}
.section-dark.bg-blueprint::before,
.section-dark .bg-blueprint::before {
    background-image: 
        linear-gradient(30deg, rgba(255, 255, 255, 0.1) 1px, transparent 1px),
        linear-gradient(-30deg, rgba(255, 255, 255, 0.1) 1px, transparent 1px);
}

/* ---------- Línea tricolor ---------- */
.tricolor-line {
    height: 4px;
    background: linear-gradient(90deg, var(--blue), var(--yellow), var(--red));
    border: none;
    width: 100%;
}

.tricolor-accent {
    position: relative;
}
.tricolor-accent::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 60px;
    height: 4px;
    background: linear-gradient(90deg, var(--blue), var(--yellow), var(--red));
}

/* ---------- Recorte diagonal 54° ---------- */
.diagonal-cut {
    position: relative;
}
.diagonal-cut::after {
    content: '';
    position: absolute;
    bottom: -40px;
    left: 0;
    width: 100%;
    height: 40px;
    background: inherit;
    clip-path: polygon(0 0, 100% 0, 100% 100%);
    z-index: 2;
}
.diagonal-image-frame,
.hero-image-frame {
    clip-path: polygon(0 0, 100% 0, 100% calc(100% - 110px), calc(100% - 80px) 100%, 0 100%) !important;
}

/* ---------- Contenedor ---------- */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
}

.section {
    padding: 80px 0;
}

.section-dark {
    background: var(--navy);
    color: var(--white);
}

/* ---------- Botones ---------- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 14px 32px;
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 0.95rem;
    border: none;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: var(--transition);
    text-transform: uppercase;
    letter-spacing: 0.02em;
}

.btn-primary {
    background: var(--blue);
    color: var(--white);
}
.btn-primary:hover {
    background: var(--blue-dark);
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(0,74,173,0.3);
}

.btn-red {
    background: var(--red);
    color: var(--white);
}
.btn-red:hover {
    background: #c4181e;
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(227,30,36,0.3);
}

.btn-outline {
    background: transparent;
    color: var(--white);
    border: 2px solid rgba(255,255,255,0.4);
}
.btn-outline:hover {
    border-color: var(--white);
    background: rgba(255,255,255,0.1);
}

.btn-sm {
    padding: 10px 24px;
    font-size: 0.85rem;
}

/* ---------- Barra Superior ---------- */
.top-bar {
    background: linear-gradient(135deg, var(--navy), var(--blue-dark));
    color: rgba(255,255,255,0.8);
    font-size: 0.82rem;
    padding: 8px 0;
    position: relative;
    overflow: hidden;
}
.top-bar::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(255,255,255,0.04) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255,255,255,0.04) 1px, transparent 1px);
    background-size: 46px 46px;
    pointer-events: none;
}
.top-bar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: relative;
    z-index: 1;
}
.top-bar-left {
    display: flex;
    gap: 24px;
    align-items: center;
}
.top-bar-right {
    display: flex;
    gap: 16px;
    align-items: center;
}
.top-bar a {
    color: rgba(255,255,255,0.8);
    display: flex;
    align-items: center;
    gap: 6px;
}
.top-bar a:hover {
    color: var(--yellow);
}
.top-bar-icon {
    width: 14px;
    height: 14px;
    fill: currentColor;
}
.social-icon {
    width: 18px;
    height: 18px;
    fill: currentColor;
}

/* ---------- Header ---------- */
.header {
    background: var(--white);
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 20px rgba(0,0,0,0.06);
    transition: var(--transition);
}
.header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 12px;
    padding-bottom: 12px;
}
.logo {
    display: flex;
    align-items: center;
}
.logo img {
    height: 48px;
    width: auto;
}

/* Navegación */
.nav {
    display: flex;
    align-items: center;
    gap: 0;
}
.nav-link {
    font-family: var(--font-heading);
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--black);
    padding: 8px 18px;
    position: relative;
    transition: var(--transition);
}
.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 3px;
    background: var(--blue);
    transition: width 0.3s ease;
    border-radius: 2px;
}
.nav-link:hover::after,
.nav-link.active::after {
    width: 80%;
}
.nav-link:hover {
    color: var(--blue);
}

/* Menú servicios dropdown */
.nav-item {
    position: relative;
}
.nav-dropdown {
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    background: var(--white);
    border-radius: var(--radius);
    box-shadow: var(--shadow-lg);
    min-width: 260px;
    padding: 12px 0;
    opacity: 0;
    visibility: hidden;
    transform: translateX(-50%) translateY(10px);
    transition: var(--transition);
    z-index: 100;
    border-top: 3px solid var(--blue);
}
.nav-item:hover .nav-dropdown {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(0);
}
.nav-dropdown a {
    display: block;
    padding: 10px 20px;
    font-size: 0.88rem;
    font-weight: 500;
    color: var(--black);
    transition: var(--transition);
}
.nav-dropdown a:hover {
    background: var(--gray-light);
    color: var(--blue);
    padding-left: 24px;
}

.header-cta {
    margin-left: 16px;
}

/* Hamburguesa móvil */
.hamburger {
    display: none;
    flex-direction: column;
    gap: 5px;
    cursor: pointer;
    padding: 8px;
    z-index: 1001;
}
.hamburger span {
    width: 28px;
    height: 3px;
    background: var(--black);
    border-radius: 2px;
    transition: var(--transition);
}
.hamburger.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 6px);
}
.hamburger.active span:nth-child(2) {
    opacity: 0;
}
.hamburger.active span:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -6px);
}

/* ---------- Hero ---------- */
.hero {
    background: linear-gradient(135deg, var(--navy) 0%, var(--blue-dark) 50%, #013b88 100%);
    color: var(--white);
    position: relative;
    overflow: hidden;
    min-height: 600px;
    display: flex;
    align-items: center;
}
.hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(255,255,255,0.04) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255,255,255,0.04) 1px, transparent 1px);
    background-size: 46px 46px;
    pointer-events: none;
}
.hero::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 60px;
    background: linear-gradient(to top, var(--white), transparent);
    z-index: 2;
}
.hero-glow-1 {
    position: absolute;
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, rgba(0,74,173,0.25), transparent 70%);
    top: -150px;
    right: 5%;
    filter: blur(80px);
    pointer-events: none;
    animation: glowPulse1 8s ease-in-out infinite;
}
.hero-glow-2 {
    position: absolute;
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, rgba(255,209,0,0.12), transparent 70%);
    bottom: 10%;
    left: 0%;
    filter: blur(80px);
    pointer-events: none;
    animation: glowPulse2 10s ease-in-out infinite;
}
@keyframes glowPulse1 {
    0%, 100% { opacity: 0.6; transform: scale(1); }
    50% { opacity: 1; transform: scale(1.1); }
}
@keyframes glowPulse2 {
    0%, 100% { opacity: 0.5; transform: scale(1); }
    50% { opacity: 0.8; transform: scale(1.15); }
}
.hero .container {
    position: relative;
    z-index: 3;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: center;
    padding-top: 40px;
    padding-bottom: 60px;
}
.hero-content {
    max-width: 580px;
}
.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(255,255,255,0.1);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255,255,255,0.15);
    padding: 8px 16px;
    border-radius: 100px;
    font-size: 0.82rem;
    font-weight: 600;
    margin-bottom: 24px;
    animation: fadeInDown 0.8s ease;
}
.hero-kicker {
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 0.8rem;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--yellow);
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 12px;
    animation: fadeInDown 0.8s ease 0.1s both;
}
.hero h1 {
    font-size: clamp(2.2rem, 4vw, 3.5rem);
    margin-bottom: 20px;
    animation: fadeInUp 0.8s ease 0.2s both;
}
.hero h1 span {
    color: var(--yellow);
}
.hero-subtitle {
    font-size: 1.1rem;
    color: rgba(255,255,255,0.8);
    font-weight: 300;
    margin-bottom: 32px;
    line-height: 1.8;
    animation: fadeInUp 0.8s ease 0.3s both;
}
.hero-buttons {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
    margin-bottom: 40px;
    animation: fadeInUp 0.8s ease 0.4s both;
}
.hero-signals {
    display: flex;
    gap: 24px;
    flex-wrap: wrap;
    animation: fadeInUp 0.8s ease 0.5s both;
}
.hero-signal {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.85rem;
    font-weight: 600;
}
.hero-signal-icon {
    width: 20px;
    height: 20px;
    fill: var(--yellow);
}

/* Hero imagen */
.hero-visual {
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
    animation: fadeInRight 1s ease 0.3s both;
}
.hero-image-frame {
    position: relative;
    width: 100%;
    max-width: 480px;
    border-radius: var(--radius);
    overflow: hidden;
    border: 2px solid rgba(255,255,255,0.15);
    background: linear-gradient(135deg, #0a1628 0%, #0d2847 50%, #1a3a5c 100%);
    padding: 0;
    min-height: 360px;
}
.hero-image-frame img {
    width: 100%;
    height: 360px;
    object-fit: cover;
    border-radius: 0;
    display: block;
}
/* Placeholder cuando no hay imagen */
.hero-image-frame::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        linear-gradient(135deg, rgba(0,74,173,0.3) 0%, rgba(0,46,109,0.4) 50%, rgba(0,17,46,0.5) 100%),
        repeating-linear-gradient(
            0deg,
            transparent,
            transparent 40px,
            rgba(255,209,0,0.03) 40px,
            rgba(255,209,0,0.03) 41px
        ),
        repeating-linear-gradient(
            90deg,
            transparent,
            transparent 40px,
            rgba(255,209,0,0.03) 40px,
            rgba(255,209,0,0.03) 41px
        );
    z-index: 1;
}
.hero-image-frame::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--blue), var(--yellow), var(--red));
    z-index: 3;
}
/* Icono de ingeniería superpuesto */
.hero-image-frame .hero-icon-overlay {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 2;
    opacity: 0.15;
}
.hero-image-frame .hero-icon-overlay svg {
    width: 160px;
    height: 160px;
    stroke: var(--yellow);
    stroke-width: 0.5;
    fill: none;
}
.hero-stat-card {
    position: absolute;
    bottom: -20px;
    right: -20px;
    background: var(--white);
    color: var(--black);
    padding: 16px 24px;
    border-radius: var(--radius);
    box-shadow: var(--shadow-lg);
    text-align: center;
    z-index: 4;
    border-left: 4px solid var(--blue);
}
.hero-stat-card .number {
    font-family: var(--font-heading);
    font-size: 1.8rem;
    font-weight: 800;
    color: var(--blue);
    line-height: 1;
}
.hero-stat-card .label {
    font-size: 0.78rem;
    color: var(--gray);
    font-weight: 600;
    margin-top: 4px;
}

/* ---------- Franja de Clientes ---------- */
.clients-bar {
    background: linear-gradient(180deg, var(--gray-light) 0%, #f8f9fc 100%);
    padding: 48px 0;
    border-bottom: 1px solid rgba(0,0,0,0.06);
    position: relative;
    overflow: hidden;
}
.clients-bar::before {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 3px;
    background: linear-gradient(90deg, var(--blue), var(--yellow));
    border-radius: 2px;
}
.clients-bar .container {
    text-align: center;
}
.clients-bar-title {
    font-family: var(--font-heading);
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: var(--gray);
    margin-bottom: 28px;
    position: relative;
    display: inline-block;
}
.clients-logos {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 56px;
    flex-wrap: wrap;
}
.clients-logos .client-logo {
    font-family: var(--font-heading);
    font-weight: 800;
    font-size: 1.15rem;
    color: var(--navy);
    opacity: 0.35;
    transition: var(--transition);
    letter-spacing: 0.02em;
    position: relative;
    padding: 8px 16px;
}
.clients-logos .client-logo::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 2px;
    background: var(--blue);
    transition: var(--transition);
}
.clients-logos .client-logo:hover {
    opacity: 0.8;
    color: var(--blue);
}
.clients-logos .client-logo:hover::after {
    width: 80%;
}
.clients-logos span {
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 1.1rem;
    color: var(--gray);
    opacity: 0.6;
    transition: var(--transition);
}
.clients-logos span:hover {
    opacity: 1;
    color: var(--blue-dark);
}

/* ---------- Servicios ---------- */
.services-section {
    padding: 100px 0;
    background: var(--white);
    position: relative;
}
.services-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(0,74,173,0.2), transparent);
}
.section-header {
    text-align: center;
    max-width: 700px;
    margin: 0 auto 60px;
}
.section-header .hero-kicker {
    justify-content: center;
    margin-bottom: 16px;
}
.section-header h2 {
    font-size: clamp(2rem, 3.5vw, 2.6rem);
    color: var(--navy);
    margin-bottom: 16px;
    letter-spacing: -0.02em;
}
.section-header p {
    color: #666;
    font-size: 1.05rem;
    line-height: 1.8;
}
.services-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 28px;
}
.service-card {
    background: var(--white);
    border-radius: 16px;
    padding: 36px 28px 28px;
    border: 1px solid rgba(0,0,0,0.06);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}
.service-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--blue), var(--yellow), var(--red));
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.4s ease;
}
.service-card:hover::before {
    transform: scaleX(1);
}
.service-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 60px rgba(0,74,173,0.12);
    border-color: transparent;
}
.service-icon {
    width: 64px;
    height: 64px;
    background: linear-gradient(135deg, rgba(0,74,173,0.08), rgba(0,74,173,0.02));
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 24px;
    position: relative;
    transition: all 0.4s ease;
}
.service-card:hover .service-icon {
    background: linear-gradient(135deg, var(--blue), var(--blue-dark));
    transform: scale(1.05);
}
.service-icon svg {
    width: 28px;
    height: 28px;
    stroke: var(--blue);
    fill: none;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
    transition: all 0.4s ease;
}
.service-card:hover .service-icon svg {
    stroke: var(--white);
    transform: scale(1.1);
}
.service-card h3 {
    font-size: 1.2rem;
    margin-bottom: 12px;
    color: var(--navy);
    font-weight: 800;
    transition: color 0.3s ease;
}
.service-card:hover h3 {
    color: var(--blue);
}
.service-card p {
    font-size: 0.92rem;
    color: #666;
    margin-bottom: 24px;
    line-height: 1.7;
}
.service-card .card-link {
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 0.85rem;
    color: var(--blue);
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 0;
    border-bottom: 2px solid transparent;
    transition: all 0.3s ease;
}
.service-card .card-link:hover {
    gap: 10px;
    border-bottom-color: var(--blue);
}
.service-card .card-link svg {
    width: 18px;
    height: 18px;
    stroke: currentColor;
    fill: none;
    stroke-width: 2.5;
    stroke-linecap: round;
    stroke-linejoin: round;
    transition: transform 0.3s ease;
}
.service-card:hover .card-link svg {
    transform: translateX(4px);
}
.service-number {
    position: absolute;
    top: 20px;
    right: 20px;
    font-family: var(--font-heading);
    font-size: 3.5rem;
    font-weight: 800;
    color: rgba(0,74,173,0.04);
    line-height: 1;
    transition: color 0.3s ease;
}
.service-card:hover .service-number {
    color: rgba(0,74,173,0.08);
}
@media (max-width: 1024px) {
    .services-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}
@media (max-width: 768px) {
    .services-section {
        padding: 60px 0;
    }
    .services-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    .section-header {
        margin-bottom: 40px;
    }
}
    gap: 6px;
}
.service-card .card-link:hover {
    gap: 10px;
    color: var(--blue-dark);
}

/* ---------- Por qué elegirnos ---------- */
.why-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
    margin-top: 48px;
}
.why-card {
    background: rgba(255,255,255,0.05);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: var(--radius);
    padding: 32px 24px;
    position: relative;
    transition: var(--transition);
    backdrop-filter: blur(10px);
}
.why-card:hover {
    background: rgba(255,255,255,0.1);
    border-color: var(--yellow);
    transform: translateY(-4px);
}
.why-card-number {
    font-family: var(--font-heading);
    font-size: 3rem;
    font-weight: 800;
    color: rgba(255,255,255,0.05);
    position: absolute;
    top: 16px;
    right: 20px;
}
.why-card-icon {
    width: 48px;
    height: 48px;
    background: linear-gradient(135deg, var(--blue), var(--blue-dark));
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 16px;
    border-bottom: 3px solid var(--yellow);
}
.why-card-icon svg {
    width: 24px;
    height: 24px;
    stroke: var(--white);
    fill: none;
    stroke-width: 2;
}
.why-card h3 {
    font-size: 1.05rem;
    margin-bottom: 10px;
    color: var(--white);
}
.why-card p {
    font-size: 0.88rem;
    color: rgba(255,255,255,0.7);
    line-height: 1.7;
}

/* ---------- Proyectos ---------- */
.projects-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
    margin-top: 48px;
}
.project-card {
    border-radius: var(--radius);
    overflow: hidden;
    background: var(--white);
    border: 1px solid rgba(0,0,0,0.06);
    transition: var(--transition);
    position: relative;
}
.project-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}
.project-card-image {
    height: 220px;
    overflow: hidden;
    position: relative;
}
.project-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}
.project-card:hover .project-card-image img {
    transform: scale(1.05);
}
.project-card-badge {
    position: absolute;
    top: 12px;
    left: 12px;
    background: var(--blue);
    color: var(--white);
    padding: 4px 12px;
    border-radius: 100px;
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}
.project-card-year {
    position: absolute;
    top: 12px;
    right: 12px;
    background: rgba(0,0,0,0.6);
    color: var(--white);
    padding: 4px 10px;
    border-radius: 100px;
    font-size: 0.72rem;
    font-weight: 700;
}
.project-card-body {
    padding: 20px;
}
.project-card-body h3 {
    font-size: 1.05rem;
    margin-bottom: 8px;
    color: var(--navy);
}
.project-card-body p {
    font-size: 0.88rem;
    color: #666;
    margin-bottom: 16px;
    line-height: 1.6;
}
.project-card-meta {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    margin-bottom: 16px;
}
.project-meta-tag {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    background: var(--gray-light);
    padding: 4px 10px;
    border-radius: 100px;
    font-size: 0.75rem;
    font-weight: 600;
    color: #555;
}

/* ---------- Sección de contacto ---------- */
.contact-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 48px;
    margin-top: 48px;
}
.contact-form-wrapper {
    background: var(--white);
    border-radius: var(--radius);
    padding: 40px;
    box-shadow: var(--shadow);
}
.form-group {
    margin-bottom: 20px;
}
.form-group label {
    display: block;
    font-family: var(--font-heading);
    font-weight: 600;
    font-size: 0.88rem;
    color: var(--navy);
    margin-bottom: 6px;
}
.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid var(--gray);
    border-radius: var(--radius-sm);
    font-family: var(--font-body);
    font-size: 0.95rem;
    transition: var(--transition);
    background: var(--white);
}
.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--blue);
    box-shadow: 0 0 0 3px rgba(0,74,173,0.1);
}
.form-group textarea {
    resize: vertical;
    min-height: 120px;
}
.form-error {
    color: var(--red);
    font-size: 0.82rem;
    margin-top: 4px;
    display: none;
}
.contact-info-card {
    background: linear-gradient(135deg, var(--navy), var(--blue-dark));
    border-radius: var(--radius);
    padding: 40px;
    color: var(--white);
    position: relative;
    overflow: hidden;
}
.contact-info-card::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(255,255,255,0.04) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255,255,255,0.04) 1px, transparent 1px);
    background-size: 46px 46px;
    pointer-events: none;
}
.contact-info-item {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    margin-bottom: 28px;
    position: relative;
    z-index: 1;
}
.contact-info-icon {
    width: 44px;
    height: 44px;
    background: rgba(255,255,255,0.1);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.contact-info-icon svg {
    width: 22px;
    height: 22px;
    stroke: var(--yellow);
    fill: none;
    stroke-width: 2;
}
.contact-info-text h4 {
    font-size: 0.88rem;
    font-weight: 700;
    margin-bottom: 4px;
}
.contact-info-text p,
.contact-info-text a {
    font-size: 0.92rem;
    color: rgba(255,255,255,0.7);
}
.contact-info-text a:hover {
    color: var(--yellow);
}

/* ---------- CTA Final ---------- */
.cta-final {
    background: linear-gradient(135deg, var(--navy) 0%, var(--blue-dark) 50%, #0a1628 100%);
    position: relative;
    overflow: hidden;
    padding: 100px 0 80px;
}
.cta-final::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(255,255,255,0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255,255,255,0.03) 1px, transparent 1px);
    background-size: 50px 50px;
    pointer-events: none;
}
.cta-final::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(0,74,173,0.15) 0%, transparent 70%);
    pointer-events: none;
}
.cta-content {
    text-align: center;
    position: relative;
    z-index: 1;
    max-width: 700px;
    margin: 0 auto;
}
.cta-kicker {
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 0.82rem;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--yellow);
    margin-bottom: 12px;
    position: relative;
    display: inline-block;
}
.cta-kicker::before,
.cta-kicker::after {
    content: '';
    position: absolute;
    top: 50%;
    width: 40px;
    height: 2px;
    background: linear-gradient(90deg, var(--yellow), transparent);
}
.cta-kicker::before {
    right: calc(100% + 16px);
    background: linear-gradient(90deg, transparent, var(--yellow));
}
.cta-kicker::after {
    left: calc(100% + 16px);
    background: linear-gradient(90deg, var(--yellow), transparent);
}
.cta-content h2 {
    font-size: clamp(1.8rem, 3vw, 2.5rem);
    color: var(--white);
    margin-bottom: 20px;
    line-height: 1.2;
}
.cta-content p {
    color: rgba(255,255,255,0.7);
    font-size: 1.05rem;
    margin-bottom: 32px;
    line-height: 1.6;
}
.cta-guarantees {
    display: flex;
    justify-content: center;
    gap: 32px;
    margin-bottom: 40px;
    flex-wrap: wrap;
}
.cta-guarantee {
    display: flex;
    align-items: center;
    gap: 8px;
    color: rgba(255,255,255,0.8);
    font-size: 0.88rem;
    font-weight: 600;
    background: rgba(255,255,255,0.05);
    padding: 10px 18px;
    border-radius: 30px;
    border: 1px solid rgba(255,255,255,0.08);
    transition: var(--transition);
}
.cta-guarantee:hover {
    background: rgba(255,255,255,0.1);
    border-color: rgba(255,209,0,0.3);
}
.cta-guarantee svg {
    width: 18px;
    height: 18px;
    stroke: var(--yellow);
    fill: none;
    stroke-width: 2;
}
.cta-buttons {
    display: flex;
    justify-content: center;
    gap: 16px;
    flex-wrap: wrap;
}

/* ---------- Footer ---------- */
.footer {
    background: linear-gradient(180deg, #001636, #000B1E);
    color: var(--white);
    padding-top: 60px;
    position: relative;
}
.footer::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(255,255,255,0.02) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255,255,255,0.02) 1px, transparent 1px);
    background-size: 46px 46px;
    pointer-events: none;
}
.footer-grid {
    display: grid;
    grid-template-columns: 1.5fr 1fr 1fr 1.2fr;
    gap: 40px;
    padding-bottom: 40px;
    border-bottom: 1px solid rgba(255,255,255,0.1);
    position: relative;
    z-index: 1;
}
.footer-brand {
    max-width: 280px;
}
.footer-brand img {
    height: 48px;
    margin-bottom: 16px;
}
.footer-brand p {
    font-size: 0.88rem;
    color: rgba(255,255,255,0.6);
    line-height: 1.7;
    margin-bottom: 16px;
}
.footer h4 {
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 0.92rem;
    margin-bottom: 20px;
    color: var(--white);
}
.footer-links li {
    margin-bottom: 10px;
}
.footer-links a {
    font-size: 0.88rem;
    color: rgba(255,255,255,0.6);
    display: flex;
    align-items: center;
    gap: 6px;
}
.footer-links a:hover {
    color: var(--yellow);
    padding-left: 4px;
}
.footer-contact-item {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 14px;
}
.footer-contact-item svg {
    width: 18px;
    height: 18px;
    stroke: var(--yellow);
    fill: none;
    stroke-width: 2;
    flex-shrink: 0;
    margin-top: 2px;
}
.footer-contact-item p,
.footer-contact-item a {
    font-size: 0.88rem;
    color: rgba(255,255,255,0.6);
    line-height: 1.6;
}
.footer-contact-item a:hover {
    color: var(--yellow);
}
.footer-social {
    display: flex;
    gap: 12px;
    margin-top: 16px;
}
.footer-social a {
    width: 36px;
    height: 36px;
    background: rgba(255,255,255,0.1);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
}
.footer-social a:hover {
    background: var(--blue);
}
.footer-social svg {
    width: 18px;
    height: 18px;
    fill: var(--white);
}
.footer-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 0;
    position: relative;
    z-index: 1;
}
.footer-bottom p {
    font-size: 0.82rem;
    color: rgba(255,255,255,0.4);
}

/* ---------- WhatsApp flotante ---------- */
.whatsapp-float {
    position: fixed;
    bottom: 24px;
    right: 24px;
    width: 60px;
    height: 60px;
    background: #25D366;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 20px rgba(37,211,102,0.4);
    z-index: 9999;
    transition: var(--transition);
    animation: pulse 2s infinite;
}
.whatsapp-float:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 28px rgba(37,211,102,0.5);
}
.whatsapp-float svg {
    width: 32px;
    height: 32px;
    fill: var(--white);
}

/* ---------- Animaciones ---------- */
@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(30px); }
    to { opacity: 1; transform: translateY(0); }
}
@keyframes fadeInDown {
    from { opacity: 0; transform: translateY(-20px); }
    to { opacity: 1; transform: translateY(0); }
}
@keyframes fadeInRight {
    from { opacity: 0; transform: translateX(40px); }
    to { opacity: 1; transform: translateX(0); }
}
@keyframes fadeInLeft {
    from { opacity: 0; transform: translateX(-40px); }
    to { opacity: 1; transform: translateX(0); }
}
@keyframes pulse {
    0%, 100% { box-shadow: 0 4px 20px rgba(37,211,102,0.4); }
    50% { box-shadow: 0 4px 30px rgba(37,211,102,0.6); }
}
@keyframes shimmer {
    0% { background-position: -200% center; }
    100% { background-position: 200% center; }
}
@keyframes borderGlow {
    0%, 100% { border-color: rgba(0,74,173,0.3); }
    50% { border-color: rgba(255,209,0,0.4); }
}
@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-8px); }
}

/* Hero image glow animation */
.hero-image-frame {
    animation: borderGlow 4s ease-in-out infinite;
}
.hero-stat-card {
    animation: float 3s ease-in-out infinite;
}

/* Scroll reveal */
.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}
.reveal.revealed {
    opacity: 1;
    transform: translateY(0);
}

/* ---------- Responsive ---------- */
@media (max-width: 1024px) {
    .hero .container {
        grid-template-columns: 1fr;
        text-align: center;
    }
    .hero-content {
        max-width: 100%;
    }
    .hero-kicker {
        justify-content: center;
    }
    .hero-buttons {
        justify-content: center;
    }
    .hero-signals {
        justify-content: center;
    }
    .hero-visual {
        display: none;
    }
    .services-grid,
    .why-grid,
    .projects-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .footer-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .top-bar {
        display: none;
    }
    .hamburger {
        display: flex;
    }
    .nav {
        position: fixed;
        top: 0;
        right: -100%;
        width: 80%;
        max-width: 320px;
        height: 100vh;
        background: var(--white);
        flex-direction: column;
        align-items: flex-start;
        padding: 80px 24px 24px;
        box-shadow: -4px 0 20px rgba(0,0,0,0.1);
        transition: right 0.3s ease;
        z-index: 1000;
        overflow-y: auto;
    }
    .nav.active {
        right: 0;
    }
    .nav-link {
        padding: 12px 0;
        font-size: 1rem;
        width: 100%;
    }
    .nav-dropdown {
        position: static;
        transform: none;
        box-shadow: none;
        border-top: none;
        padding: 0 0 0 16px;
        opacity: 1;
        visibility: visible;
        display: none;
    }
    .nav-item.open .nav-dropdown {
        display: block;
    }
    .header-cta {
        margin-left: 0;
        margin-top: 16px;
    }
    .services-grid,
    .why-grid,
    .projects-grid {
        grid-template-columns: 1fr;
    }
    .contact-grid {
        grid-template-columns: 1fr;
    }
    .footer-grid {
        grid-template-columns: 1fr;
    }
    .footer-bottom {
        flex-direction: column;
        gap: 12px;
        text-align: center;
    }
    .section {
        padding: 60px 0;
    }
    .hero {
        min-height: auto;
        padding: 40px 0;
    }
    .cta-guarantees {
        flex-direction: column;
        align-items: center;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 16px;
    }
    .btn {
        padding: 12px 24px;
        font-size: 0.85rem;
    }
    .hero h1 {
        font-size: 1.8rem;
    }
}

/* ---------- Breadcrumb ---------- */
.breadcrumb {
    background: var(--gray-light);
    padding: 16px 0;
    font-size: 0.85rem;
}
.breadcrumb .container {
    display: flex;
    align-items: center;
    gap: 8px;
}
.breadcrumb a {
    color: var(--blue);
    font-weight: 500;
}
.breadcrumb span {
    color: var(--gray);
}

/* ---------- Página interna hero ---------- */
.page-hero {
    background: linear-gradient(135deg, var(--navy), var(--blue-dark));
    color: var(--white);
    padding: 80px 0 60px;
    position: relative;
    overflow: hidden;
}
.page-hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(255,255,255,0.04) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255,255,255,0.04) 1px, transparent 1px);
    background-size: 46px 46px;
    pointer-events: none;
}
.page-hero h1 {
    font-size: clamp(2rem, 3.5vw, 2.8rem);
    margin-bottom: 16px;
    position: relative;
    z-index: 1;
}
.page-hero p {
    font-size: 1.05rem;
    color: rgba(255,255,255,0.7);
    max-width: 600px;
    position: relative;
    z-index: 1;
}

/* ---------- Blog ---------- */
.blog-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
    margin-top: 48px;
}
.blog-card {
    border-radius: var(--radius);
    overflow: hidden;
    background: var(--white);
    border: 1px solid rgba(0,0,0,0.06);
    transition: var(--transition);
}
.blog-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}
.blog-card-image {
    height: 200px;
    overflow: hidden;
}
.blog-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.blog-card-body {
    padding: 20px;
}
.blog-card-date {
    font-size: 0.78rem;
    color: var(--gray);
    margin-bottom: 8px;
}
.blog-card-body h3 {
    font-size: 1.05rem;
    margin-bottom: 10px;
    color: var(--navy);
}
.blog-card-body p {
    font-size: 0.88rem;
    color: #666;
    line-height: 1.6;
    margin-bottom: 16px;
}
@media (max-width: 768px) {
    .blog-grid {
        grid-template-columns: 1fr;
    }
}

/* ---------- Mensaje flash ---------- */
.flash-message {
    padding: 14px 20px;
    border-radius: var(--radius-sm);
    margin-bottom: 20px;
    font-size: 0.92rem;
    font-weight: 500;
    animation: fadeInDown 0.3s ease;
}
.flash-success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}
.flash-error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

/* ---------- Tabs filtros ---------- */
.filter-tabs {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 32px;
}
.filter-tab {
    padding: 8px 20px;
    border-radius: 100px;
    border: 2px solid var(--gray);
    background: var(--white);
    font-family: var(--font-heading);
    font-weight: 600;
    font-size: 0.85rem;
    cursor: pointer;
    transition: var(--transition);
}
.filter-tab:hover,
.filter-tab.active {
    border-color: var(--blue);
    background: var(--blue);
    color: var(--white);
}

/* ---------- Galería proyectos ---------- */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
    margin-top: 32px;
}
.gallery-item {
    border-radius: var(--radius-sm);
    overflow: hidden;
    aspect-ratio: 4/3;
}
.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}
.gallery-item:hover img {
    transform: scale(1.05);
}
@media (max-width: 768px) {
    .gallery-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* ---------- FAQ ---------- */
.faq-list {
    max-width: 800px;
    margin: 48px auto 0;
}
.faq-item {
    border: 1px solid rgba(0,0,0,0.08);
    border-radius: var(--radius-sm);
    margin-bottom: 12px;
    overflow: hidden;
}
.faq-question {
    padding: 18px 24px;
    background: var(--white);
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-family: var(--font-heading);
    font-weight: 600;
    font-size: 0.95rem;
    color: var(--navy);
    transition: var(--transition);
}
.faq-question:hover {
    background: var(--gray-light);
}
.faq-question svg {
    width: 20px;
    height: 20px;
    stroke: var(--blue);
    fill: none;
    stroke-width: 2;
    transition: transform 0.3s ease;
}
.faq-item.active .faq-question svg {
    transform: rotate(180deg);
}
.faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
}
.faq-answer-content {
    padding: 0 24px 18px;
    font-size: 0.92rem;
    color: #555;
    line-height: 1.7;
}

/* ---------- Jerarquía y legibilidad ---------- */
.hero-subtitle,
.section-header p,
.service-content-text p,
.footer-brand p,
.blog-card-body p,
.contact-form-wrapper p {
    max-width: 68ch;
}