/* ═══════════════════════════════════════════════
   Grupo Aznalmara® — Stylesheet
   style.css · Todas las páginas
═══════════════════════════════════════════════ */

/* ── VARIABLES ─────────────────────────────── */
:root {
  --blue:       #0059ff;
  --blue-light: #3d80ff;
  --bg:         #ffffff;
  --bg-2:       #f7f8fc;
  --bg-3:       #eef1f8;
  --text:       #1a1a2e;
  --muted:      #666;
  --border:     rgba(0, 89, 255, 0.15);

  /* aliases usados en index.html */
  --gold:       #0059ff;
  --gold-light: #3d80ff;
  --dark:       #ffffff;
  --dark-2:     #f7f8fc;
  --dark-3:     #eef1f8;
}

/* ── RESET ─────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: 'Martel Sans', sans-serif;
  font-weight: 300;
  min-height: 100vh;
  overflow-x: hidden;
}

/* ── NOISE TEXTURE (index) ─────────────────── */
body.home::before {
  content: '';
  position: fixed;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)' opacity='0.03'/%3E%3C/svg%3E");
  pointer-events: none;
  z-index: 0;
}

/* ── NAV — STICKY ──────────────────────────── */
nav {
  position: sticky;
  top: 0;
  z-index: 100;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 40px;
  height: 60px;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
  box-shadow: 0 1px 16px rgba(0, 89, 255, 0.06);
  transition: box-shadow 0.3s ease;
}

.nav-logo {
  font-family: 'Martel Sans', sans-serif;
  font-size: 13px;
  font-weight: 700;
  color: var(--blue);
  text-decoration: none;
  letter-spacing: 0.05em;
  display: flex;
  align-items: center;
}

.nav-logo img {
  height: 32px;
  width: auto;
  display: block;
}

.nav-links {
  display: flex;
  gap: 32px;
  list-style: none;
}

.nav-links a {
  font-family: 'Martel Sans', sans-serif;
  font-size: 11px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--text);
  text-decoration: none;
  transition: color 0.2s ease;
}

.nav-links a:hover,
.nav-links a.active { color: var(--blue); }

/* ── HEADER (index) ────────────────────────── */
header {
  position: relative;
  z-index: 10;
  text-align: center;
  padding: 90px 24px 70px;
  border-bottom: 1px solid var(--border);
  background: linear-gradient(180deg, rgba(0,89,255,0.06) 0%, transparent 100%);
}

.header-eyebrow {
  font-family: 'Martel Sans', sans-serif;
  text-transform: uppercase;
  color: var(--blue);
  margin-bottom: 20px;
  opacity: 0;
  animation: fadeUp 0.8s ease 0.2s forwards;
}

.header-title {
  font-family: 'Martel Sans', sans-serif;
  font-size: clamp(2.4rem, 6vw, 4.2rem);
  font-weight: 300;
  line-height: 1.15;
  letter-spacing: -0.01em;
  color: var(--text);
  opacity: 0;
  animation: fadeUp 0.9s ease 0.4s forwards;
}

.header-title span {
  color: var(--blue);
  font-weight: 600;
}

.header-tagline {
  font-size: 16px;
  letter-spacing: 0.2em;
  text-transform: none;
  color: var(--muted);
  margin-top: 18px;
  opacity: 0;
  animation: fadeUp 0.9s ease 0.6s forwards;
}

.gold-line {
  width: 60px;
  height: 1px;
  background: var(--blue);
  margin: 28px auto 0;
  opacity: 0;
  animation: fadeUp 0.9s ease 0.8s forwards;
}

/* ── HERO (subpáginas) ─────────────────────── */
.hero {
  position: relative;
  z-index: 10;
  text-align: center;
  padding: 90px 24px 70px;
  border-bottom: 1px solid var(--border);
  background: linear-gradient(180deg, rgba(0,89,255,0.06) 0%, transparent 100%);
}

.hero-eyebrow {
  font-size: 11px;
  letter-spacing: 0.35em;
  text-transform: uppercase;
  color: var(--blue);
  margin-bottom: 20px;
  opacity: 0;
  animation: fadeUp 0.8s ease 0.2s forwards;
}

.hero-title {
  font-size: clamp(2rem, 5vw, 3.6rem);
  font-weight: 700;
  line-height: 1.15;
  color: var(--text);
  opacity: 0;
  animation: fadeUp 0.9s ease 0.4s forwards;
}

.hero-title span { color: var(--blue); }

.hero-sub {
  max-width: 620px;
  margin: 20px auto 0;
  font-size: 15px;
  line-height: 1.8;
  color: var(--muted);
  opacity: 0;
  animation: fadeUp 0.9s ease 0.6s forwards;
}

.blue-line {
  width: 60px;
  height: 2px;
  background: var(--blue);
  margin: 28px auto 0;
  opacity: 0;
  animation: fadeUp 0.9s ease 0.8s forwards;
}

/* ── SERVICE CARDS (index grid) ────────────── */
.services {
  position: relative;
  z-index: 10;
  max-width: 1200px;
  margin: 0 auto;
  padding: 80px 24px;
}

.services-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1px;
  background: var(--border);
  border: 1px solid var(--border);
}

.service-card {
  background: var(--bg-2);
  padding: 48px 32px 40px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  transition: background 0.4s ease;
  opacity: 0;
  animation: fadeUp 0.8s ease forwards;
}

.service-card:nth-child(1) { animation-delay: 0.15s; }
.service-card:nth-child(2) { animation-delay: 0.30s; }
.service-card:nth-child(3) { animation-delay: 0.45s; }
.service-card:nth-child(4) { animation-delay: 0.60s; }

.service-card:hover { background: var(--bg-3); }

.service-icon {
  width: 56px;
  height: 56px;
  border: 1px solid var(--border);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 28px;
  transition: border-color 0.3s ease, transform 0.3s ease;
}

.service-card:hover .service-icon {
  border-color: var(--blue);
  transform: scale(1.08);
}

.service-icon svg {
  width: 24px;
  height: 24px;
  stroke: var(--blue);
  fill: none;
  stroke-width: 1.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.service-title {
  font-family: 'Martel Sans', sans-serif;
  font-size: 1.3rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 14px;
}

.service-desc {
  font-size: 13px;
  line-height: 1.75;
  color: var(--muted);
  flex: 1;
  margin-bottom: 32px;
}

.service-btn {
  display: inline-block;
  font-family: 'Martel Sans', sans-serif;
  font-size: 10px;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: var(--blue);
  border: 1px solid var(--blue);
  padding: 10px 22px;
  text-decoration: none;
  background: transparent;
  transition: background 0.3s ease, color 0.3s ease;
  cursor: pointer;
}

.service-btn:hover {
  background: var(--blue);
  color: #fff;
}

/* ── CONTACT (index) ───────────────────────── */
.contact {
  position: relative;
  z-index: 10;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  background: linear-gradient(180deg, transparent, rgba(0,89,255,0.04), transparent);
  padding: 70px 24px;
  text-align: center;
}

.contact-label {
  font-family: 'Martel Sans', sans-serif;
  font-size: 10px;
  letter-spacing: 0.4em;
  text-transform: uppercase;
  color: var(--blue);
  margin-bottom: 40px;
}

.contact-items {
  display: flex;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
  gap: 40px 60px;
}

.contact-item {
  display: flex;
  align-items: center;
  gap: 14px;
  text-decoration: none;
  color: var(--text);
  font-size: 14px;
  letter-spacing: 0.04em;
  transition: color 0.3s ease;
}

.contact-item:hover { color: var(--blue-light); }

.contact-item svg {
  width: 18px;
  height: 18px;
  stroke: var(--blue);
  fill: none;
  stroke-width: 1.5;
  stroke-linecap: round;
  stroke-linejoin: round;
  flex-shrink: 0;
}

.contact-sep {
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--border);
}

/* ── SERVICE ROWS (subpáginas) ─────────────── */
.wrap {
  max-width: 1100px;
  margin: 0 auto;
  padding: 80px 24px;
}

.section-label {
  font-size: 10px;
  letter-spacing: 0.4em;
  text-transform: uppercase;
  color: var(--blue);
  text-align: center;
  margin-bottom: 50px;
}

.services-list {
  display: flex;
  flex-direction: column;
  gap: 2px;
  background: var(--border);
  border: 1px solid var(--border);
}

.service-row {
  display: grid;
  grid-template-columns: 80px 1fr auto;
  align-items: center;
  background: var(--bg-2);
  padding: 36px 40px;
  transition: background 0.3s ease;
  opacity: 0;
  animation: fadeUp 0.7s ease forwards;
}

.service-row:nth-child(1) { animation-delay: 0.10s; }
.service-row:nth-child(2) { animation-delay: 0.20s; }
.service-row:nth-child(3) { animation-delay: 0.30s; }
.service-row:nth-child(4) { animation-delay: 0.40s; }

.service-row:hover { background: var(--bg-3); }

.row-icon {
  width: 52px;
  height: 52px;
  border: 1px solid var(--border);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: border-color 0.3s, transform 0.3s;
}

.service-row:hover .row-icon {
  border-color: var(--blue);
  transform: scale(1.08);
}

.row-icon svg {
  width: 22px;
  height: 22px;
  stroke: var(--blue);
  fill: none;
  stroke-width: 1.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.row-body { padding: 0 32px; }

.row-title {
  font-size: 1.15rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 8px;
}

.row-desc {
  font-size: 13px;
  line-height: 1.75;
  color: var(--muted);
}

.row-tag {
  font-size: 10px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--blue);
  border: 1px solid var(--border);
  padding: 6px 14px;
  white-space: nowrap;
}

/* ── CASES GRID ────────────────────────────── */
.cases {
  background: var(--bg-2);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  padding: 80px 24px;
}

.cases-inner {
  max-width: 1100px;
  margin: 0 auto;
}

.cases-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: var(--border);
  border: 1px solid var(--border);
  margin-top: 50px;
}

.case-card {
  background: #fff;
  padding: 36px 28px;
  opacity: 0;
  animation: fadeUp 0.7s ease forwards;
}

.case-card:nth-child(1) { animation-delay: 0.10s; }
.case-card:nth-child(2) { animation-delay: 0.20s; }
.case-card:nth-child(3) { animation-delay: 0.30s; }
.case-card:nth-child(4) { animation-delay: 0.40s; }
.case-card:nth-child(5) { animation-delay: 0.50s; }
.case-card:nth-child(6) { animation-delay: 0.60s; }

.case-num {
  font-size: 11px;
  letter-spacing: 0.25em;
  color: var(--blue);
  margin-bottom: 14px;
  font-weight: 600;
}

.case-title {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 10px;
}

.case-desc {
  font-size: 12px;
  line-height: 1.75;
  color: var(--muted);
}

/* ── CTA ───────────────────────────────────── */
.cta {
  text-align: center;
  padding: 90px 24px;
}

.cta-title {
  font-size: clamp(1.6rem, 3.5vw, 2.4rem);
  font-weight: 700;
  color: var(--text);
  margin-bottom: 16px;
}

.cta-title span { color: var(--blue); }

.cta-sub {
  font-size: 14px;
  color: var(--muted);
  margin-bottom: 40px;
  line-height: 1.8;
}

.cta-buttons {
  display: flex;
  justify-content: center;
  gap: 16px;
  flex-wrap: wrap;
}

.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: 'Martel Sans', sans-serif;
  font-size: 11px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  background: var(--blue);
  color: #fff;
  padding: 14px 30px;
  text-decoration: none;
  transition: background 0.3s;
}

.btn-primary:hover { background: var(--blue-light); }

.btn-secondary {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: 'Martel Sans', sans-serif;
  font-size: 11px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  background: transparent;
  color: var(--blue);
  border: 1px solid var(--blue);
  padding: 14px 30px;
  text-decoration: none;
  transition: background 0.3s, color 0.3s;
}

.btn-secondary:hover { background: var(--blue); color: #fff; }

.btn-primary svg,
.btn-secondary svg {
  width: 16px;
  height: 16px;
  stroke: currentColor;
  fill: none;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* ── FOOTER ────────────────────────────────── */
footer {
  position: relative;
  z-index: 10;
  text-align: center;
  padding: 50px 24px 40px;
  border-top: 1px solid var(--border);
  background: #f7f8fc;
}

.footer-title {
  font-family: 'Martel Sans', sans-serif;
  font-size: 1.2rem;
  font-weight: 400;
  color: var(--text);
  margin-bottom: 14px;
  letter-spacing: 0.02em;
}

.footer-title span { color: var(--blue); }

.footer-brands {
  font-size: 12px;
  color: var(--muted);
  letter-spacing: 0.06em;
  line-height: 1.9;
}

.footer-brands strong {
  color: rgba(0, 89, 255, 0.85);
  font-weight: 400;
}

.footer-copy {
  margin-top: 28px;
  font-size: 11px;
  color: rgba(136, 136, 136, 0.4);
  letter-spacing: 0.08em;
}

/* ── PORTFOLIO GRID ────────────────────────── */
.portfolio {
  max-width: 1200px;
  margin: 0 auto;
  padding: 80px 24px;
}

.portfolio-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: var(--border);
  border: 1px solid var(--border);
  margin-top: 50px;
}

.portfolio-card {
  background: var(--bg-2);
  display: flex;
  flex-direction: column;
  opacity: 0;
  animation: fadeUp 0.7s ease forwards;
  transition: background 0.3s ease;
}

.portfolio-card.hidden { display: none; }

.portfolio-card:hover { background: var(--bg-3); }

.portfolio-card:nth-child(1) { animation-delay: 0.10s; }
.portfolio-card:nth-child(2) { animation-delay: 0.20s; }
.portfolio-card:nth-child(3) { animation-delay: 0.30s; }
.portfolio-card:nth-child(4) { animation-delay: 0.40s; }
.portfolio-card:nth-child(5) { animation-delay: 0.50s; }
.portfolio-card:nth-child(6) { animation-delay: 0.60s; }

.portfolio-img-wrap { overflow: hidden; }

.portfolio-img {
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  display: block;
  filter: grayscale(15%);
  transition: filter 0.4s ease, transform 0.4s ease;
}

.portfolio-card:hover .portfolio-img {
  filter: grayscale(0%);
  transform: scale(1.03);
}

.portfolio-body {
  padding: 28px 28px 32px;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.portfolio-num {
  font-size: 10px;
  letter-spacing: 0.35em;
  text-transform: uppercase;
  color: var(--blue);
  font-weight: 600;
  margin-bottom: 10px;
}

.portfolio-title {
  font-family: 'Martel Sans', sans-serif;
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 10px;
  line-height: 1.35;
}

.portfolio-desc {
  font-size: 12px;
  line-height: 1.8;
  color: var(--muted);
  flex: 1;
  margin-bottom: 24px;
}

.portfolio-tag {
  display: inline-block;
  font-size: 10px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--blue);
  border: 1px solid var(--border);
  padding: 6px 14px;
  align-self: flex-start;
  transition: border-color 0.3s, background 0.3s, color 0.3s;
  text-decoration: none;
}

.portfolio-tag:hover {
  background: var(--blue);
  border-color: var(--blue);
  color: #fff;
}

/* ── PORTFOLIO PAGINATION ──────────────────── */
.portfolio-pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 6px;
  margin-top: 48px;
}

.page-btn {
  font-family: 'Martel Sans', sans-serif;
  font-size: 11px;
  letter-spacing: 0.2em;
  width: 38px;
  height: 38px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--border);
  background: var(--bg-2);
  color: var(--muted);
  cursor: pointer;
  transition: border-color 0.2s, background 0.2s, color 0.2s;
  user-select: none;
}

.page-btn:hover {
  border-color: var(--blue);
  color: var(--blue);
}

.page-btn.active {
  background: var(--blue);
  border-color: var(--blue);
  color: #fff;
}

.page-btn svg {
  width: 14px;
  height: 14px;
  stroke: currentColor;
  fill: none;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* ── ANIMATIONS ────────────────────────────── */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(22px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ── RESPONSIVE ────────────────────────────── */
@media (max-width: 960px) {
  .services-grid { grid-template-columns: repeat(2, 1fr); }
  .portfolio-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 768px) {
  .service-row { grid-template-columns: 60px 1fr; }
  .row-tag { display: none; }
  .cases-grid { grid-template-columns: 1fr; }
  nav { padding: 0 20px; }
  .nav-links { gap: 16px; }
}

@media (max-width: 540px) {
  .services-grid { grid-template-columns: 1fr; }
  .portfolio-grid { grid-template-columns: 1fr; }
  .contact-sep { display: none; }
}

@media (max-width: 480px) {
  .nav-links a { font-size: 10px; letter-spacing: 0.08em; }
}
