/* ===================================== */
/* RESET */
/* ===================================== */

:root {
  --bg: #ffffff;
  --text: #1a1a1a;
  --muted: #666666;
  --brand: #f05a28;
  --brand-light: #ff7e54;
  --brand-contrast: #ffffff;
  --surface: #f8f9fa;
  --elevated: #ffffff;
  --shadow-sm: 0 2px 8px rgba(0,0,0,0.05);
  --shadow-md: 0 10px 30px rgba(0,0,0,0.08);
  --shadow-lg: 0 20px 50px rgba(0,0,0,0.12);
  --radius-s: 4px;
  --radius-m: 8px;
  --radius-l: 20px;
  --container: 90%;
  --container-max: 1280px;
  --font-main: 'Outfit', 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700&display=swap');

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-main);
    background: var(--bg);
    color: var(--text);
    line-height: 1.7;
    -webkit-font-smoothing: antialiased;
}

p {
    text-align: justify;
    hyphens: auto;
}

h1, h2, h3, h4, h5, h6 {
    text-align: left;
}

h1 { font-size: clamp(32px, 5vw, 44px); }
h2 { font-size: clamp(24px, 3vw, 32px); }

/* ===================================== */
/* CONTENEDOR */
/* ===================================== */

.container {
    width: var(--container);
    max-width: var(--container-max);
    margin: 0 auto;
}

/* ===================================== */
/* HEADER */
/* ===================================== */

.header {
    padding: 20px 0;
    background: rgba(255, 255, 255, 0.8);
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
    transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid transparent;
}

/* Optional: offset body if header height changes */
/* body { padding-top: 96px; } */

.header.scrolled {
    padding: 12px 0;
    background: rgba(255, 255, 255, 0.95);
    box-shadow: var(--shadow-sm);
    border-bottom: 1px solid rgba(0,0,0,0.05);
}

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

.logo img {
    height: 120px;
}

/* ===================================== */
/* NAV */
/* ===================================== */

.nav {
    display: flex;
    align-items: center;
    gap: 30px;
}

.lang-switch {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 13px;
    font-weight: 700;
    margin-left: 20px;
    letter-spacing: 1px;
    border-left: 1px solid rgba(0,0,0,0.1);
    padding-left: 20px;
}

.lang-switch a {
    text-decoration: none;
    color: var(--muted);
    transition: color 0.3s ease;
    opacity: 0.6;
}

.lang-switch a.active {
    color: var(--brand);
    pointer-events: none;
    opacity: 1;
}

.lang-switch a:hover {
    color: var(--text);
    opacity: 1;
}

.lang-switch span {
    color: #ccc;
    font-weight: 300;
}

.nav a {
    text-decoration: none;
    color: #1a1a1a;
    font-size: 15px;
    font-weight: 500;
    transition: all 0.3s ease;
    opacity: 0.8;
}

.nav a:hover {
    color: var(--brand);
    opacity: 1;
}

.btn-nav {
    padding: 10px 22px;
    background: transparent;
    color: var(--brand) !important;
    border-radius: var(--radius-m);
    border: 1.5px solid var(--brand);
    font-weight: 600 !important;
}

/* ===================================== */
/* NAV TOGGLE (MOBILE) */
/* ===================================== */

.nav-toggle {
  display: none;
  background: transparent;
  border: 0;
  width: 40px;
  height: 32px;
  padding: 0;
  position: relative;
}
.nav-toggle .bar {
  display: block;
  height: 2px;
  background: #333;
  margin: 6px 0;
  transition: transform .25s ease, opacity .25s ease;
}

/* Responsive behavior */
@media (max-width: 900px) {
  .nav-toggle { display: inline-block; }
  .nav { 
    position: absolute; 
    top: 100%; 
    right: 0; 
    left: 0; 
    background: var(--elevated);
    border-bottom: 1px solid rgba(0,0,0,0.06);
    display: none;
    flex-direction: column;
    gap: 0;
    padding: 10px 0;
  }
  .nav a, .dropdown > a { 
    padding: 12px 20px; 
    display: block; 
    color: #333; 
  }
  .dropdown { position: static; }
  .dropdown-menu { 
    position: static; 
    top: auto; 
    left: auto; 
    box-shadow: none; 
    border-radius: 0; 
    padding: 0; 
    transform: none; 
    visibility: visible; 
    opacity: 1; 
    display: none; 
  }
  .dropdown.open .dropdown-menu { display: block; }
  .nav.open { display: flex; }
}

/* ===================================== */
/* DROPDOWN */
/* ===================================== */

.dropdown {
    position: relative;
}

.dropdown-menu {
    position: absolute;
    top: 38px;
    left: 0;
    background: var(--elevated);
    min-width: 220px;
    box-shadow: none;
    border: 1px solid rgba(0,0,0,0.06);
    border-radius: 8px;
    padding: 10px 0;
    opacity: 0;
    visibility: hidden;
    transform: translateY(8px);
    transition: all 0.25s ease;
    z-index: 999;
}

.dropdown-menu a {
    display: block;
    padding: 10px 14px;
    font-size: 14px;
}

.dropdown-menu a:hover {
    background: rgba(0,0,0,0.03);
    color: inherit;
}

.dropdown:hover .dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

/* ===================================== */
/* HERO */
/* ===================================== */

.hero {
    margin-top: 160px;
    min-height: 55vh;
    display: flex;
    align-items: center;
    background: url('../assets/images/hero-4k.png') no-repeat center right;
    background-size: cover;
    position: relative;
    padding: 40px 0;
    color: var(--text);
}

.hero::before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(
        to right,
        rgba(0,0,0,0.90) 0%,
        rgba(0,0,0,0.70) 40%,
        rgba(0,0,0,0.30) 70%,
        transparent 100%
    );
    backdrop-filter: blur(2px);
    -webkit-backdrop-filter: blur(2px);
}

.hero .container {
    position: relative;
    z-index: 2;
}

.hero-actions {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-top: 40px;
}

.btn-secondary {
    color: #ffffff;
    text-decoration: none;
    font-weight: 600;
    border: 1.5px solid rgba(255,255,255,0.3);
    padding: 10px 24px;
    border-radius: var(--radius-m);
    transition: all 0.3s cubic-bezier(0.165, 0.84, 0.44, 1);
}

.btn-secondary:hover {
    background: rgba(255,255,255,0.1);
    border-color: #ffffff;
    color: #ffffff;
}

.hero h1 {
    font-size: clamp(44px, 6vw, 72px);
    font-weight: 700;
    line-height: 1.1;
    max-width: 900px;
    margin-bottom: 32px;
    letter-spacing: -2.5px;
    color: #ffffff;
}

.hero p {
    max-width: 680px;
    margin-bottom: 48px;
    font-size: 22px;
    line-height: 1.5;
    color: rgba(255,255,255,0.8);
    font-weight: 300;
}

.hero-small {
    margin-top: 160px;
    padding: 80px 0;
    min-height: 40vh;
    display: flex;
    align-items: center;
    position: relative;
    overflow: hidden;
    background-size: cover;
    background-position: center;
    color: var(--text);
}

.hero-small::before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(
        75deg,
        rgba(0,0,0,0.85) 0%,
        rgba(0,0,0,0.65) 40%,
        rgba(0,0,0,0.30) 80%,
        transparent 100%
    );
    backdrop-filter: blur(3px);
    -webkit-backdrop-filter: blur(3px);
    z-index: 1;
}

.hero-small .container {
    position: relative;
    z-index: 2;
}

.hero-small h1 {
    font-size: 52px;
    font-weight: 700;
    margin-bottom: 20px;
    line-height: 1.1;
    color: #ffffff;
}

.hero-small p {
    font-size: 20px;
    color: rgba(255,255,255,0.8);
}

.btn-primary {
    display: inline-block;
    padding: 14px 32px;
    background: var(--brand);
    color: var(--brand-contrast);
    text-decoration: none;
    border-radius: var(--radius-m);
    font-weight: 600;
    transition: all 0.3s cubic-bezier(0.165, 0.84, 0.44, 1);
    box-shadow: 0 4px 14px rgba(240, 90, 40, 0.25);
}

.btn-primary:hover { 
    background: var(--brand-light);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(240, 90, 40, 0.35);
}
.btn-nav:hover { background: var(--brand); color: var(--brand-contrast) !important; }

.btn-primary:active { transform: translateY(0); opacity: .85; }
.btn-nav:active { transform: translateY(1px); }

a:focus-visible, .btn-primary:focus-visible, .btn-nav:focus-visible, .dropdown-menu a:focus-visible {
  outline: 2px solid var(--brand);
  outline-offset: 2px;
  border-radius: var(--radius-s);
}

/* ===================================== */
/* SECTIONS */
/* ===================================== */

.section {
    padding: 90px 0;
}

/* ===================================== */
/* LAYOUTS */
/* ===================================== */

.grid-2-col {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 80px;
    align-items: center;
    margin-bottom: 120px;
}

.grid-2-col.reverse {
    direction: rtl;
}

.grid-2-col.reverse > div {
    direction: ltr;
}

.solution-detail h2 {
    font-size: 42px;
    margin-bottom: 24px;
}

.solution-detail p {
    font-size: 18px;
    color: var(--muted);
    margin-bottom: 32px;
}

.badge {
    display: inline-block;
    padding: 6px 14px;
    background: rgba(240, 90, 40, 0.1);
    color: var(--brand);
    border-radius: 50px;
    font-size: 13px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 16px;
}

.feature-list {
    list-style: none;
    margin-bottom: 40px;
}

.feature-list li {
    position: relative;
    padding-left: 28px;
    margin-bottom: 12px;
    font-weight: 500;
}

.feature-list li::before {
    content: "✓";
    position: absolute;
    left: 0;
    color: var(--brand);
    font-weight: 700;
}

.img-responsive {
    width: 100%;
    height: auto;
    border-radius: var(--radius-l);
    box-shadow: var(--shadow-lg);
    display: block;
}

.spec-card {
    padding: 40px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-m);
    transition: all 0.3s ease;
}

.spec-card:hover {
    border-color: var(--brand);
    background: rgba(255, 255, 255, 0.05);
}

.spec-card h5 {
    color: var(--brand);
    margin-bottom: 15px;
    font-size: 18px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.sector-panel {
    padding: 50px;
    background: var(--surface);
    border-radius: var(--radius-l);
    border-bottom: 4px solid var(--brand);
    transition: transform 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
}

.sector-panel:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-md);
}

.feature-item {
    margin-bottom: 30px;
}

.feature-item h4 {
    margin-bottom: 10px;
    font-size: 18px;
    color: var(--text);
}

.feature-item p {
    font-size: 16px !important;
}

/* ===================================== */
/* METHODOLOGY & CASE STUDIES */
/* ===================================== */

.methodology-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 40px;
    margin-top: 60px;
}

.method-item {
    position: relative;
    padding-left: 60px;
    margin-bottom: 40px;
}

.method-number {
    position: absolute;
    left: 0;
    top: 0;
    width: 40px;
    height: 40px;
    background: var(--brand);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 18px;
    box-shadow: 0 4px 10px rgba(240, 90, 40, 0.3);
}

.case-study h3 {
    font-size: 24px;
    margin-bottom: 12px;
    color: var(--text);
}

.case-study p {
    font-size: 16px;
    color: var(--muted);
}

.tech-tag {
    display: inline-block;
    padding: 4px 10px;
    background: rgba(0,0,0,0.05);
    border-radius: 4px;
    font-size: 12px;
    margin-right: 8px;
    font-family: monospace;
    font-weight: 600;
}

.testimonial {
    font-style: italic;
    border-left: 3px solid var(--brand);
    padding-left: 20px;
    margin: 20px 0;
    color: var(--text);
}

/* ===================================== */
/* SOLUCIONES */
/* ===================================== */

.grid-4 {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 32px;
}

.card {
    background: var(--elevated);
    border-radius: var(--radius-l);
    padding: 10px;
    transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
    border: 1px solid transparent;
}

.card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-lg);
    border-color: rgba(0,0,0,0.03);
}

.card-link {
    text-decoration: none;
    color: inherit;
    display: block;
}

.card-image {
    border-radius: calc(var(--radius-l) - 6px);
    overflow: hidden;
    aspect-ratio: 16/10;
}

.card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.6s cubic-bezier(0.165, 0.84, 0.44, 1);
}

.card:hover .card-image img {
    transform: scale(1.08);
}

.card h3 {
    font-size: 20px;
    margin: 20px 10px 10px;
    font-weight: 700;
    transition: color 0.3s ease;
}

.card:hover h3 {
    color: var(--brand);
}

.card p {
    color: var(--muted);
    padding: 0 10px 20px;
    font-size: 15px;
}

/* Responsive para soluciones */

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

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

/* ===================================== */
/* CAPACIDADES */
/* ===================================== */

.capabilities {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 50px;
    text-align: center;
}

.cap-item {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.cap-item h3 {
    font-size: 19px;
    font-weight: 700;
    line-height: 1.3;
    min-height: 52px;
    margin-bottom: 20px;
    display: block;
    position: relative;
    color: var(--text);
}

.cap-item h3::after {
    content: "";
    display: block;
    height: 4px;
    background: var(--brand);
    margin: 15px auto 0 auto;
    width: 40px;
    transition: width 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
}

.cap-item:hover h3::after {
    width: 80px;
}

.cap-item p {
    font-size: 15px;
    color: var(--muted);
    line-height: 1.6;
    max-width: 280px;
    text-align: center; /* Override global justify for narrow cols */
    margin: 0 auto;
}

/* ===================================== */
/* AUTHORITY & METRICS */
/* ===================================== */

.metrics-section {
    background: #111;
    color: white;
    padding: 100px 0;
    text-align: center;
}

.metrics-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 40px;
    margin-top: 50px;
}

.metric-item h2 {
    font-size: 64px;
    font-weight: 800;
    color: var(--brand);
    margin-bottom: 10px;
    text-align: center;
}

.metric-item p {
    font-size: 14px;
    color: rgba(255,255,255,0.6);
    text-transform: uppercase;
    letter-spacing: 2px;
    text-align: center;
}

.tech-stack {
    margin-top: 80px;
    padding-top: 60px;
    border-top: 1px solid rgba(0,0,0,0.05);
}

.tech-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 30px;
    margin-top: 40px;
    opacity: 0.6;
}

.tech-item {
    font-weight: 700;
    font-size: 14px;
    color: var(--text);
    padding: 10px 20px;
    border: 1.5px solid rgba(0,0,0,0.1);
    border-radius: var(--radius-m);
}

/* ===================================== */
/* INDUSTRY */
/* ===================================== */

.industry {
    min-height: 45vh;
    display: flex;
    align-items: center;
    background: url('../assets/images/industry-4k.png') center/cover no-repeat;
    position: relative;
    padding: 90px 0;
    text-align: center;
}

.industry p {
    text-align: center;
    margin-left: auto;
    margin-right: auto;
}

.industry::before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(
        75deg,
        rgba(0,0,0,0.85) 0%,
        rgba(0,0,0,0.65) 40%,
        rgba(0,0,0,0.40) 75%,
        rgba(0,0,0,0.20) 100%
    );
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
}

.industry .container {
    position: relative;
    z-index: 2;
}

/* ===================================== */
/* FOOTER */
/* ===================================== */

.footer {
    background: #0f0f0f;
    color: #e0e0e0;
    padding: 80px 0 40px;
    font-size: 14px;
    text-align: left;
}

.footer p {
    text-align: left;
    hyphens: none;
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 60px;
    margin-bottom: 60px;
    text-align: left;
}

.footer-info p {
    max-width: 300px;
    margin-top: 20px;
    color: #999;
}

.footer-links h4, .footer-contact h4 {
    color: white;
    margin-bottom: 24px;
    font-size: 18px;
}

.footer-links a {
    display: block;
    color: #999;
    text-decoration: none;
    margin-bottom: 12px;
    transition: color 0.3s ease;
}

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

.footer-bottom {
    padding-top: 40px;
    border-top: 1px solid rgba(255,255,255,0.05);
    color: #666;
    font-size: 12px;
    text-align: center;
}

.footer-bottom p {
    text-align: center;
}

