/* ─────────────────────────────────────────────────────────
   OPL Innovaciones — Main Stylesheet
   Shared across all pages. Página-specific backgrounds
   are set via inline style="" on the element.
   ───────────────────────────────────────────────────────── */

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

:root {
  --blue:       #52EAEC;
  --blue-dark:  #3BBFC1;
  --navy:       #0A0630;
  --navy-mid:   #0F0948;
  --white:      #ffffff;
  --bg-light:   #F2F2F3;
  --text-dark:  #1D1F20;
  --text-muted: #6b7280;
  --border:     rgba(255,255,255,0.18);
  --font: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
}

html { font-family: var(--font); font-size: 16px; color: var(--text-dark); }
img { display: block; width: 100%; }
a { text-decoration: none; }
ul { list-style: none; }

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 32px;
}

/* ─── HEADER ──────────────────────────────────────────── */
header {
  background: var(--white);
  border-bottom: 1px solid #e5e7eb;
  position: sticky;
  top: 0;
  z-index: 100;
}
header .container {
  display: flex;
  align-items: center;
  height: 68px;
}
.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--navy);
  letter-spacing: -0.01em;
  flex-shrink: 0;
}
.logo img { width: auto; height: 40px; }
header nav { display: flex; align-items: center; gap: 32px; margin-left: auto; }
header nav ul { display: flex; align-items: center; gap: 28px; }
header nav ul a {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-dark);
  padding-bottom: 2px;
  transition: color 0.15s;
}
header nav ul a.active { border-bottom: 2px solid var(--blue); color: var(--text-dark); }
header nav ul a:hover { color: var(--navy); }

/* ─── BUTTONS ──────────────────────────────────────────── */
.btn-contact {
  display: inline-block;
  background: var(--blue);
  color: var(--navy);
  font-size: 0.875rem;
  font-weight: 600;
  padding: 9px 22px;
  border-radius: 3px;
  transition: background 0.15s;
}
.btn-contact:hover { background: var(--blue-dark); }

.btn-primary {
  display: inline-block;
  background: var(--blue);
  color: var(--navy);
  font-size: 0.875rem;
  font-weight: 600;
  padding: 11px 26px;
  border-radius: 3px;
  transition: background 0.15s;
}
.btn-primary:hover { background: var(--blue-dark); }

.btn-outline {
  display: inline-block;
  border: 1px solid var(--blue);
  color: var(--blue);
  font-size: 0.8125rem;
  font-weight: 500;
  padding: 8px 18px;
  border-radius: 2px;
  align-self: flex-start;
  transition: border-color 0.15s, background 0.15s;
}
.btn-outline:hover {
  border-color: var(--blue);
  background: rgba(82, 234, 236, 0.08);
}

.btn-outline-light {
  display: inline-block;
  border: 1px solid #d1d5db;
  color: var(--text-dark);
  font-size: 0.875rem;
  font-weight: 500;
  padding: 10px 22px;
  border-radius: 3px;
  transition: border-color 0.15s, color 0.15s;
}
.btn-outline-light:hover { border-color: var(--navy); color: var(--navy); }

/* ─── HOMEPAGE HERO ────────────────────────────────────── */
.hero {
  position: relative;
  min-height: 580px;
  padding-bottom: 120px;
  overflow: hidden;
}
.hero-video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 0;
}
.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 1;
  background: linear-gradient(
    to right,
    rgba(10, 6, 48, 0.92) 0%,
    rgba(10, 6, 48, 0.72) 55%,
    rgba(10, 6, 48, 0.40) 100%
  );
}
.hero .container {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: flex-start;
  padding-top: 90px;
}
.hero-content { max-width: 560px; }
.hero-content h1 {
  font-size: 2.75rem;
  font-weight: 700;
  color: var(--white);
  line-height: 1.18;
  letter-spacing: -0.02em;
  margin-bottom: 16px;
  max-width: 640px;
}
.hero-content p {
  font-size: 1rem;
  color: rgba(255,255,255,0.82);
  margin-bottom: 28px;
  font-weight: 400;
}

/* ─── SERVICE CARDS (homepage) ────────────────────────── */
.services {
  margin-top: -100px;
  position: relative;
  z-index: 10;
  padding-bottom: 0;
}
.services .container { padding-bottom: 0; }
.services-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.service-card {
  display: flex;
  flex-direction: column;
  background: var(--white);
  overflow: hidden;
}
.service-card .card-img { height: 180px; overflow: hidden; flex-shrink: 0; }
.service-card .card-img img {
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}
.service-card:hover .card-img img { transform: scale(1.04); }
.service-card .card-body {
  background: var(--navy);
  padding: 20px 22px 22px;
  flex: 1;
  display: flex;
  flex-direction: column;
}
.card-title-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 10px;
}
.card-title-row h3 {
  font-size: 1.0625rem;
  font-weight: 700;
  color: var(--white);
  line-height: 1.3;
  max-width: 180px;
}
.card-icon { flex-shrink: 0; width: 36px; height: 36px; margin-left: 12px; }
.card-icon svg { width: 100%; height: 100%; }
.card-body p {
  font-size: 0.8125rem;
  color: rgba(255,255,255,0.6);
  line-height: 1.55;
  margin-bottom: 18px;
  flex: 1;
}

/* ─── ABOUT ───────────────────────────────────────────── */
.about { background: var(--bg-light); padding: 72px 0; }
.about-grid {
  display: grid;
  grid-template-columns: 42% 58%;
  gap: 56px;
  align-items: start;
}
.about-left h2 {
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--text-dark);
  margin-bottom: 16px;
  letter-spacing: -0.02em;
}
.about-left p {
  font-size: 0.875rem;
  color: var(--text-muted);
  line-height: 1.65;
  margin-bottom: 24px;
}
.about-left .about-img { height: 280px; overflow: hidden; }
.about-left .about-img img { height: 100%; object-fit: cover; }
.about-right h2 {
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--text-dark);
  margin-bottom: 28px;
  letter-spacing: -0.02em;
}
.expertise-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px 32px;
  margin-bottom: 32px;
}
.expertise-item { display: flex; gap: 14px; align-items: flex-start; }
.expertise-icon { flex-shrink: 0; width: 38px; height: 38px; color: var(--navy); }
.expertise-icon svg { width: 100%; height: 100%; }
.expertise-text h4 {
  font-size: 0.9375rem;
  font-weight: 700;
  color: var(--text-dark);
  margin-bottom: 5px;
}
.expertise-text p {
  font-size: 0.8125rem;
  color: var(--text-muted);
  line-height: 1.55;
}

/* ─── FEATURED PROJECTS (homepage) ────────────────────── */
.projects { background: var(--navy); padding: 72px 0 0; }
.projects-header {
  display: grid;
  grid-template-columns: 38% 62%;
  gap: 48px;
  align-items: start;
  margin-bottom: 40px;
}
.projects-header h2 {
  font-size: 2rem;
  font-weight: 700;
  color: var(--white);
  letter-spacing: -0.02em;
  line-height: 1.2;
}
.projects-header p {
  font-size: 0.9rem;
  color: rgba(255,255,255,0.65);
  line-height: 1.65;
  padding-top: 6px;
}
.projects-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }

.project-card, a.project-card {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  color: inherit;
}
.project-card .proj-img { height: 200px; overflow: hidden; }
.project-card .proj-img img {
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}
.project-card:hover .proj-img img { transform: scale(1.04); }
.project-card .proj-body { background: var(--navy-mid); padding: 18px 20px 20px; }
.proj-title-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 8px;
}
.proj-title-row h3 {
  font-size: 1rem;
  font-weight: 700;
  color: var(--white);
  line-height: 1.3;
}
.proj-icon { flex-shrink: 0; width: 32px; height: 32px; color: rgba(255,255,255,0.55); margin-left: 10px; }
.proj-icon svg { width: 100%; height: 100%; }
.project-card .proj-body p {
  font-size: 0.8125rem;
  color: rgba(255,255,255,0.55);
  line-height: 1.5;
}

/* ─── PAGE HERO (inner pages) ─────────────────────────── */
.page-hero { background: var(--navy); padding: 56px 0 52px; }
.breadcrumb { display: flex; align-items: center; margin-bottom: 20px; font-size: 0.8125rem; }
.breadcrumb a { color: rgba(255,255,255,0.5); transition: color 0.15s; }
.breadcrumb a:hover { color: rgba(255,255,255,0.8); }
.breadcrumb .sep { color: rgba(255,255,255,0.25); margin: 0 10px; }
.breadcrumb .current { color: rgba(255,255,255,0.7); }
.page-hero h1 {
  font-size: 2.25rem;
  font-weight: 700;
  color: var(--white);
  letter-spacing: -0.02em;
  line-height: 1.2;
  margin-bottom: 14px;
}
.page-hero .ph-subtitle {
  font-size: 0.9375rem;
  color: rgba(255,255,255,0.6);
  max-width: 560px;
  line-height: 1.65;
}

/* ─── SERVICE DETAIL SECTIONS ──────────────────────────── */
.svc-section { padding: 72px 0; background: var(--bg-light); }
.svc-section.on-white { background: var(--white); }

.svc-grid {
  display: grid;
  grid-template-columns: 44% 56%;
  gap: 64px;
  align-items: start;
}
.svc-section.on-white .svc-grid { grid-template-columns: 56% 44%; }

.svc-img { height: 380px; overflow: hidden; }
.svc-img img { height: 100%; object-fit: cover; }

.svc-content h2 {
  font-size: 1.625rem;
  font-weight: 700;
  color: var(--text-dark);
  letter-spacing: -0.02em;
  margin-bottom: 12px;
  line-height: 1.25;
}
.svc-content > p {
  font-size: 0.9rem;
  color: var(--text-muted);
  line-height: 1.72;
  margin-bottom: 28px;
}
.svc-group { margin-bottom: 22px; }
.svc-group:last-child { margin-bottom: 0; }
.svc-group-label {
  font-size: 0.7rem;
  font-weight: 700;
  color: var(--navy);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 8px;
}
.svc-list { border-top: 1px solid #e5e7eb; }
.svc-list li {
  font-size: 0.875rem;
  color: var(--text-dark);
  padding: 8px 0 8px 16px;
  border-bottom: 1px solid #e5e7eb;
  position: relative;
  line-height: 1.5;
}
.svc-list li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 16px;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--navy);
}

/* ─── PROJECTS LISTING PAGE ────────────────────────────── */
.projects-listing { padding: 72px 0; background: var(--bg-light); }
.projects-listing-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
.proj-listing-card {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: var(--white);
  color: inherit;
}
.proj-listing-card .pl-img { height: 248px; overflow: hidden; }
.proj-listing-card .pl-img img {
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}
.proj-listing-card:hover .pl-img img { transform: scale(1.04); }
.proj-listing-card .pl-body {
  padding: 24px 26px 28px;
  flex: 1;
  display: flex;
  flex-direction: column;
}
.pl-area {
  font-size: 0.7rem;
  font-weight: 700;
  color: var(--navy);
  letter-spacing: 0.07em;
  text-transform: uppercase;
  margin-bottom: 8px;
}
.pl-body h3 {
  font-size: 1.1875rem;
  font-weight: 700;
  color: var(--text-dark);
  letter-spacing: -0.01em;
  margin-bottom: 10px;
  line-height: 1.3;
}
.pl-body p {
  font-size: 0.875rem;
  color: var(--text-muted);
  line-height: 1.68;
  margin-bottom: 22px;
  flex: 1;
}
.pl-link {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--navy);
  display: flex;
  align-items: center;
  gap: 6px;
  align-self: flex-start;
  transition: gap 0.15s;
}
.pl-link:hover { gap: 10px; }
.pl-link svg { width: 16px; height: 16px; flex-shrink: 0; }

/* ─── PROJECT DETAIL HERO ──────────────────────────────── */
.project-hero {
  position: relative;
  min-height: 400px;
  display: flex;
  align-items: flex-end;
  padding-bottom: 56px;
  background-size: cover;
  background-position: center;
}
.project-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to top,
    rgba(10, 6, 48, 0.96) 0%,
    rgba(10, 6, 48, 0.70) 45%,
    rgba(10, 6, 48, 0.35) 100%
  );
  z-index: 1;
}
.project-hero .container { position: relative; z-index: 2; }
.project-hero .breadcrumb { margin-bottom: 24px; }
.project-hero h1 {
  font-size: 2.5rem;
  font-weight: 700;
  color: var(--white);
  letter-spacing: -0.02em;
  line-height: 1.15;
  margin-bottom: 12px;
  max-width: 720px;
}
.project-hero .ph-area {
  font-size: 0.8rem;
  font-weight: 600;
  color: rgba(255,255,255,0.5);
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

/* ─── PROJECT DETAIL CONTENT ───────────────────────────── */
.project-detail { padding: 72px 0; background: var(--bg-light); }
.project-detail-grid {
  display: grid;
  grid-template-columns: 30% 70%;
  gap: 56px;
  align-items: start;
}
.pd-sidebar { background: var(--white); padding: 24px; }
.pd-sidebar h3 {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--text-dark);
  letter-spacing: 0.05em;
  text-transform: uppercase;
  margin-bottom: 14px;
}
.pd-fact-list { border-top: 1px solid #e5e7eb; }
.pd-fact {
  display: flex;
  justify-content: space-between;
  padding: 11px 0;
  border-bottom: 1px solid #e5e7eb;
  font-size: 0.875rem;
  gap: 12px;
}
.pd-fact-label { color: var(--text-muted); font-weight: 400; flex-shrink: 0; }
.pd-fact-value { color: var(--text-dark); font-weight: 600; text-align: right; }

.pd-status-badge {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 600;
  padding: 2px 9px;
  background: #dcfce7;
  color: #166534;
}
.pd-status-badge.active { background: #dbeafe; color: #1e40af; }

.pd-content h2 {
  font-size: 1.375rem;
  font-weight: 700;
  color: var(--text-dark);
  letter-spacing: -0.02em;
  margin-bottom: 14px;
  margin-top: 40px;
  line-height: 1.3;
}
.pd-content h2:first-child { margin-top: 0; }
.pd-content p {
  font-size: 0.9375rem;
  color: var(--text-muted);
  line-height: 1.78;
  margin-bottom: 16px;
}
.pd-content ul { list-style: none; margin-bottom: 24px; border-top: 1px solid #e5e7eb; }
.pd-content ul li {
  font-size: 0.9rem;
  color: var(--text-dark);
  padding: 9px 0 9px 18px;
  position: relative;
  border-bottom: 1px solid #e5e7eb;
  line-height: 1.5;
}
.pd-content ul li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 17px;
  width: 4px;
  height: 4px;
  background: var(--navy);
  border-radius: 50%;
}
.pd-back {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--navy);
  margin-top: 36px;
  transition: gap 0.15s;
}
.pd-back:hover { gap: 12px; }
.pd-back svg { width: 16px; height: 16px; transform: rotate(180deg); flex-shrink: 0; }

/* ─── RELATED PROJECTS ─────────────────────────────────── */
.related-projects { background: var(--navy); padding: 60px 0 64px; }
.related-projects h2 {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--white);
  letter-spacing: -0.01em;
  margin-bottom: 28px;
}
.related-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }

/* ─── RESPONSIVE ────────────────────────────────────────── */

/* Hamburger button — hidden on desktop, shown by JS on mobile */
.nav-toggle { display: none; }

/* ── Mobile (≤ 768px) ─────────────────────────────────── */
@media (max-width: 768px) {

  .container { padding: 0 20px; }

  /* Header */
  .nav-toggle {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px 4px;
    margin-left: auto;
    width: 44px;
    height: 68px;
    flex-shrink: 0;
  }
  .nav-toggle span {
    display: block;
    width: 22px;
    height: 2px;
    background: var(--text-dark);
    border-radius: 1px;
    transition: transform 0.25s ease, opacity 0.15s ease;
    transform-origin: center;
  }
  .nav-toggle.is-open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
  .nav-toggle.is-open span:nth-child(2) { opacity: 0; }
  .nav-toggle.is-open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

  header nav {
    display: none;
    position: absolute;
    top: 68px;
    left: 0;
    right: 0;
    background: var(--white);
    border-bottom: 1px solid #e5e7eb;
    padding: 12px 20px 24px;
    flex-direction: column;
    align-items: flex-start;
    gap: 0;
    z-index: 200;
    box-shadow: 0 8px 24px rgba(10, 6, 48, 0.10);
    max-height: calc(100vh - 68px);
    overflow-y: auto;
  }
  header nav.is-open { display: flex; }
  header nav ul { flex-direction: column; align-items: flex-start; gap: 0; width: 100%; margin-bottom: 4px; }
  header nav ul li { width: 100%; }
  header nav ul a { display: block; padding: 12px 0; font-size: 1rem; border-bottom: 1px solid #f3f4f6; width: 100%; }
  header nav ul a.active { border-bottom: 1px solid #f3f4f6; }
  .btn-contact { margin-top: 16px; }

  /* Page hero */
  .page-hero { padding: 40px 0 36px; }
  .page-hero h1 { font-size: 1.75rem; }
  .page-hero .ph-subtitle { font-size: 0.875rem; }

  /* Service detail sections */
  .svc-section { padding: 48px 0; }
  .svc-grid,
  .svc-section.on-white .svc-grid { grid-template-columns: 1fr; gap: 32px; }
  .svc-img { height: 240px; }

  /* Projects listing */
  .projects-listing { padding: 48px 0; }
  .projects-listing-grid { grid-template-columns: 1fr; gap: 16px; }

  /* Project detail */
  .project-hero h1 { font-size: 1.875rem; }
  .project-detail { padding: 48px 0; }
  .project-detail-grid { grid-template-columns: 1fr; gap: 32px; }
  .pd-sidebar { margin-bottom: 0; }

  /* Related projects */
  .related-projects { padding: 48px 0 52px; }
  .related-grid { grid-template-columns: 1fr; gap: 16px; }
}

/* ── Tablet (769px – 1024px) ───────────────────────────── */
@media (min-width: 769px) and (max-width: 1024px) {
  .container { padding: 0 24px; }
  .svc-grid,
  .svc-section.on-white .svc-grid { gap: 40px; }
  .projects-listing-grid { gap: 16px; }
  .project-detail-grid { gap: 40px; }
}
