/* Shared styles for internal pages */

.page-hero {
  padding: 180px 0 80px;
  position: relative;
  overflow: hidden;
}
.page-hero::before {
  content: '';
  position: absolute;
  width: 900px; height: 900px;
  top: -300px; right: -300px;
  background: radial-gradient(circle, var(--brand-glow), transparent 60%);
  pointer-events: none;
}
.page-hero h1 { max-width: 18ch; }

/* ========== About / story ========== */
.about-story { padding: 80px 0 120px; }
.story-grid { display: grid; grid-template-columns: 1.1fr 1fr; gap: 80px; align-items: center; }
@media (max-width: 900px) { .story-grid { grid-template-columns: 1fr; gap: 32px; } }
.story-visual img { border-radius: 28px; box-shadow: var(--shadow-lg); aspect-ratio: 4/5; object-fit: cover; width: 100%; }

/* ========== Values ========== */
.values { background: #fff; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.values-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
@media (max-width: 900px) { .values-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 540px) { .values-grid { grid-template-columns: 1fr; } }
.val-card { padding: 32px; border-radius: var(--r-md); background: var(--bg); transition: transform .3s, background .3s; }
.val-card:hover { transform: translateY(-4px); background: var(--ink); color: #fff; }
.val-card:hover h3 { color: #fff; }
.val-card:hover p { color: rgba(255,255,255,0.7); }
.val-card:hover .val-n { color: var(--brand-light); }
.val-n { font-family: var(--f-mono); font-size: 13px; color: var(--brand); margin-bottom: 16px; letter-spacing: 0.08em; }
.val-card h3 { font-size: 22px; margin-bottom: 8px; transition: color .3s; }
.val-card p { color: var(--slate); font-size: 14px; transition: color .3s; }

/* ========== FAQ ========== */
.faq { padding: 100px 0; }
.faq-list { display: grid; gap: 12px; }
.faq details { background: #fff; border: 1px solid var(--line); border-radius: var(--r-md); padding: 0; overflow: hidden; transition: border-color .3s, box-shadow .3s; }
.faq details[open] { border-color: transparent; box-shadow: var(--shadow-md); }
.faq summary { padding: 20px 24px; cursor: pointer; font-family: var(--f-display); font-size: 18px; font-weight: 500; list-style: none; display: flex; justify-content: space-between; align-items: center; gap: 16px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: '+'; font-size: 24px; color: var(--brand); font-weight: 300; transition: transform .3s;
  width: 28px; height: 28px; display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details p { padding: 0 24px 24px; color: var(--slate); font-size: 15px; line-height: 1.6; }

/* ========== Services detail page ========== */
.svc-hero { padding: 180px 0 60px; background: var(--ink); color: #fff; position: relative; overflow: hidden; }
.svc-hero h1, .svc-hero h2 { color: #fff; }
.svc-hero .lead { color: rgba(255,255,255,0.75); }
.svc-hero::before { content: ''; position: absolute; width: 800px; height: 800px; bottom: -400px; left: -200px; background: radial-gradient(circle, var(--brand-glow), transparent 60%); pointer-events: none; }

.svc-block { padding: 100px 0; border-bottom: 1px solid var(--line); }
.svc-block:last-child { border-bottom: none; }
.svc-block-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 72px; align-items: center; }
.svc-block:nth-child(even) .svc-block-grid { direction: rtl; }
.svc-block:nth-child(even) .svc-block-grid > * { direction: ltr; }
@media (max-width: 900px) { .svc-block-grid { grid-template-columns: 1fr; gap: 32px; direction: ltr !important; } }

.svc-block h2 { font-size: clamp(28px, 3.4vw, 44px); }
.svc-features { margin-top: 28px; display: grid; gap: 16px; }
.svc-feat { display: grid; grid-template-columns: 28px 1fr; gap: 12px; align-items: start; }
.svc-feat-i { width: 24px; height: 24px; background: rgba(242,101,34,0.12); color: var(--brand); border-radius: 6px; display: flex; align-items: center; justify-content: center; font-size: 13px; font-weight: 700; margin-top: 2px; }
.svc-feat strong { display: block; font-size: 15px; margin-bottom: 2px; }
.svc-feat p { color: var(--slate); font-size: 14px; }

.svc-visual {
  position: relative;
  border-radius: var(--r-lg);
  overflow: hidden;
  aspect-ratio: 4/3;
  background: var(--bg-2);
  box-shadow: var(--shadow-lg);
}
.svc-visual img { width: 100%; height: 100%; object-fit: cover; }

/* ========== Clientes page ========== */
.clients-tiles { padding-top: 80px !important; }
.clients-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
@media (max-width: 900px) { .clients-grid { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 640px) { .clients-grid { grid-template-columns: repeat(2, 1fr); } }
.client-tile {
  background: #fff; border: 1px solid var(--line); border-radius: var(--r-md);
  aspect-ratio: 3/2; display: flex; align-items: center; justify-content: center;
  padding: 20px; transition: transform .3s, box-shadow .3s, border-color .3s;
}
.client-tile:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); border-color: var(--brand); }
.client-tile img { max-height: 85%; max-width: 85%; height: auto; width: auto; object-fit: contain; }

.case-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
@media (max-width: 900px) { .case-grid { grid-template-columns: 1fr; } }
.case-card {
  background: #fff; border: 1px solid var(--line); border-radius: var(--r-lg);
  padding: 32px; transition: transform .3s, box-shadow .3s;
}
.case-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }
.case-logo { height: 40px; margin-bottom: 20px; display: flex; align-items: center; }
.case-logo img { max-height: 100%; max-width: 140px; object-fit: contain; }
.case-metric {
  font-family: var(--f-display);
  font-size: 44px;
  font-weight: 700;
  color: var(--brand);
  letter-spacing: -0.02em;
  margin: 20px 0 4px;
  line-height: 1;
}
.case-metric-l { font-size: 13px; color: var(--slate); }
.case-card h3 { font-size: 20px; margin: 20px 0 8px; }
.case-card p { color: var(--slate); font-size: 14px; line-height: 1.6; }

/* ========== Blog ========== */
.blog-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px; }
@media (max-width: 900px) { .blog-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 640px) { .blog-grid { grid-template-columns: 1fr; } }
.blog-card {
  display: block;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  overflow: hidden;
  transition: transform .3s, box-shadow .3s;
}
.blog-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }
.blog-card-img { aspect-ratio: 16/10; background: var(--line-2); overflow: hidden; }
.blog-card-img img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s; }
.blog-card:hover .blog-card-img img { transform: scale(1.04); }
.blog-card-body { padding: 24px; }
.blog-card-tag { font-family: var(--f-mono); font-size: 11px; letter-spacing: 0.08em; color: var(--brand); text-transform: uppercase; }
.blog-card h3 { font-size: 20px; margin: 10px 0 10px; line-height: 1.25; }
.blog-card p { color: var(--slate); font-size: 14px; line-height: 1.6; }
.blog-card-meta { margin-top: 16px; font-size: 12px; color: var(--slate-2); display: flex; gap: 12px; }

/* Article reading */
.article {
  max-width: 760px;
  margin: 0 auto;
  padding: 180px 28px 80px;
}
.article .article-tag { font-family: var(--f-mono); color: var(--brand); font-size: 12px; letter-spacing: 0.1em; text-transform: uppercase; }
.article h1 { font-size: clamp(36px, 5vw, 60px); margin: 16px 0 20px; }
.article-meta { display: flex; gap: 16px; color: var(--slate); font-size: 13px; margin-bottom: 40px; }
.article-cover { border-radius: var(--r-lg); overflow: hidden; margin-bottom: 48px; aspect-ratio: 16/9; }
.article-cover img { width: 100%; height: 100%; object-fit: cover; }
.article h2 { font-size: clamp(26px, 3.2vw, 36px); margin: 48px 0 16px; letter-spacing: -0.02em; }
.article h3 { font-size: 22px; margin: 32px 0 12px; }
.article p { color: var(--ink); font-size: 17px; line-height: 1.75; margin-bottom: 20px; }
.article ul, .article ol { margin: 0 0 24px 28px; color: var(--ink); font-size: 17px; line-height: 1.75; }
.article li { margin-bottom: 8px; }
.article blockquote {
  border-left: 4px solid var(--brand);
  padding: 12px 0 12px 24px;
  margin: 32px 0;
  font-family: var(--f-display);
  font-size: 22px;
  color: var(--ink);
  line-height: 1.4;
}
.article strong { font-weight: 600; color: var(--ink); }
.article a { color: var(--brand); text-decoration: underline; text-underline-offset: 3px; }

.article-share { padding: 32px 36px; margin-top: 60px; background: var(--ink); border-radius: var(--r-lg); display: flex; justify-content: space-between; flex-wrap: wrap; gap: 20px; align-items: center; }
.article-share div { color: rgba(255,255,255,0.8); }

/* ========== Calculadora ========== */
.calc-layout { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; max-width: 1120px; margin: 0 auto; }
@media (max-width: 900px) { .calc-layout { grid-template-columns: 1fr; } }

.calc-form {
  background: #fff; border: 1px solid var(--line); border-radius: var(--r-lg); padding: 36px;
}
.calc-form h2 { font-size: 24px; margin-bottom: 24px; }
.calc-field { margin-bottom: 24px; }
.calc-field label { display: block; font-size: 14px; font-weight: 500; margin-bottom: 10px; color: var(--ink); }
.calc-field .hint { font-size: 12px; color: var(--slate); margin-top: 4px; }
.calc-field input[type="range"] { width: 100%; accent-color: var(--brand); }
.calc-field input[type="number"] {
  width: 100%; padding: 12px 16px; border: 1px solid var(--line); border-radius: var(--r-sm);
  font-family: inherit; font-size: 16px; outline: none;
}
.calc-field input[type="number"]:focus { border-color: var(--brand); }
.calc-val { display: inline-block; font-family: var(--f-mono); color: var(--brand); margin-left: 8px; font-weight: 500; }

.calc-result {
  background: var(--ink); color: #fff; border-radius: var(--r-lg); padding: 36px;
  position: sticky; top: 100px; align-self: start;
}
.calc-result h2 { color: #fff; font-size: 24px; margin-bottom: 24px; }
.calc-row { display: flex; justify-content: space-between; padding: 14px 0; border-bottom: 1px dashed rgba(255,255,255,0.1); font-size: 15px; }
.calc-row:last-child { border-bottom: none; }
.calc-row span:last-child { font-family: var(--f-display); font-weight: 600; }
.calc-row.total { margin-top: 12px; padding-top: 20px; border-top: 1px solid rgba(255,255,255,0.2); border-bottom: none; font-size: 16px; }
.calc-row.total span:last-child { font-size: 28px; color: var(--brand-light); }
.calc-saving-box {
  margin-top: 24px; padding: 24px; background: linear-gradient(135deg, var(--brand), var(--brand-dark));
  border-radius: var(--r-md); text-align: center;
}
.calc-saving-box .l { font-size: 12px; letter-spacing: 0.1em; text-transform: uppercase; opacity: .9; }
.calc-saving-box .n { font-family: var(--f-display); font-size: clamp(34px, 5vw, 52px); font-weight: 700; margin: 6px 0 4px; }
.calc-saving-box .s { font-size: 13px; opacity: .9; }

/* ========== Contact ========== */
.contact-layout { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; }
@media (max-width: 900px) { .contact-layout { grid-template-columns: 1fr; } }
.contact-info { padding: 20px 0; }
.contact-info h3 { font-size: 20px; margin-bottom: 20px; }
.contact-item { padding: 20px 0; border-bottom: 1px solid var(--line); }
.contact-item:last-child { border-bottom: none; }
.contact-item-l { font-family: var(--f-mono); font-size: 12px; letter-spacing: 0.08em; color: var(--brand); text-transform: uppercase; margin-bottom: 6px; }
.contact-item strong { font-family: var(--f-display); font-size: 20px; font-weight: 500; }
.contact-item p { color: var(--slate); font-size: 14px; margin-top: 4px; }
.contact-form { background: #fff; border: 1px solid var(--line); border-radius: var(--r-lg); padding: 36px; }
.form-field { margin-bottom: 20px; }
.form-field label { display: block; font-size: 14px; font-weight: 500; margin-bottom: 8px; }
.form-field input, .form-field textarea, .form-field select {
  width: 100%; padding: 12px 16px; border: 1px solid var(--line); border-radius: var(--r-sm);
  font-family: inherit; font-size: 15px; outline: none; background: #fff;
}
.form-field textarea { resize: vertical; min-height: 120px; }
.form-field input:focus, .form-field textarea:focus, .form-field select:focus { border-color: var(--brand); }

.map-embed {
  width: 100%;
  aspect-ratio: 16/7;
  border-radius: var(--r-lg);
  overflow: hidden;
  margin-top: 60px;
  background: var(--line-2);
  filter: grayscale(0.3) contrast(1.05);
}
.map-embed iframe { width: 100%; height: 100%; border: 0; }

/* ========== IA & Marketing hero ========== */
.ia-hero {
  padding: 180px 0 100px;
  background:
    radial-gradient(ellipse at top left, rgba(242,101,34,0.18), transparent 50%),
    radial-gradient(ellipse at bottom right, rgba(46,125,79,0.08), transparent 50%),
    var(--ink);
  color: #fff;
  position: relative;
  overflow: hidden;
}
.ia-hero h1, .ia-hero h2 { color: #fff; }
.ia-hero .lead { color: rgba(255,255,255,0.8); }
.ia-grid-bg {
  position: absolute; inset: 0;
  background-image:
    linear-gradient(to right, rgba(255,255,255,0.04) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(255,255,255,0.04) 1px, transparent 1px);
  background-size: 48px 48px;
  pointer-events: none;
}

.ia-feat-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; margin-top: 60px; }
@media (max-width: 900px) { .ia-feat-grid { grid-template-columns: 1fr; } }
.ia-feat {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: 28px;
  transition: transform .3s, box-shadow .3s, border-color .3s;
}
.ia-feat:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); border-color: var(--brand); }
.ia-feat-icon {
  width: 48px; height: 48px;
  border-radius: 12px;
  background: rgba(242,101,34,0.10);
  color: var(--brand);
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 20px;
}
.ia-feat h3 { color: var(--ink); font-size: 20px; margin-bottom: 10px; }
.ia-feat p { color: var(--slate); font-size: 14px; line-height: 1.6; }

/* ========== Breadcrumbs on article ========== */
.crumbs { font-family: var(--f-mono); font-size: 12px; color: var(--slate); margin-bottom: 16px; }
.crumbs a { color: var(--slate); }
.crumbs a:hover { color: var(--brand); }
.crumbs span { margin: 0 8px; opacity: 0.5; }
