/* ==========================================================================
   VETTORIALE MARKETING - SUBPAGES STYLES
   Extends main.css for internal pages styling
   ========================================================================== */

/* ─── PAGE HERO (Internal Header) ─────────────────────────────────── */
.page-hero {
  padding: clamp(8rem, 12vw, 11rem) 0 clamp(3rem, 6vw, 5rem);
  background: var(--surface);
  position: relative;
  overflow: hidden;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.page-hero::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  background: radial-gradient(circle at center top, rgba(246, 139, 31, 0.05) 0%, transparent 70%);
  pointer-events: none;
}

/* Dark variant — used on all internal pages */
.page-hero--dark {
  background: var(--gradient-navy);
  border-bottom: none;
  min-height: 38vh;
  display: flex;
  align-items: center;
  padding: clamp(6rem, 10vw, 8rem) 0;
}

.page-hero--dark::before {
  background:
    radial-gradient(ellipse at 60% 0%, rgba(255, 102, 0, 0.18) 0%, transparent 65%),
    linear-gradient(to bottom, rgba(12, 22, 50, 0.72) 0%, rgba(12, 22, 50, 0.52) 100%);
  z-index: 1;
}

.page-hero-bg {
  position: absolute;
  inset: -20% 0;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  z-index: 0;
  will-change: transform;
}

.page-hero--dark .page-title {
  color: var(--text-on-navy);
}

.page-hero--dark .page-subtitle {
  color: rgba(255, 255, 255, 0.65);
}

.page-hero--dark .section-badge {
  color: rgba(255, 255, 255, 0.55);
  background: rgba(255, 255, 255, 0.07);
  border-color: rgba(255, 255, 255, 0.14);
}

.page-hero-content {
  text-align: center;
  position: relative;
  z-index: 2;
  max-width: 800px;
  margin: 0 auto;
}

.page-hero .section-badge {
  margin-bottom: var(--space-2);
  display: inline-flex;
}

.page-title {
  font-size: clamp(2.5rem, 5vw, 4rem);
  line-height: 1.1;
  font-weight: 700;
  margin-bottom: var(--space-4);
  letter-spacing: -0.02em;
}

.page-subtitle {
  font-size: var(--text-xl);
  color: var(--text-muted);
  line-height: 1.6;
}

/* ─── GENERIC PAGE CONTENT ─────────────────────────────────────── */
.page-content {
  padding: var(--space-section) 0;
  background: var(--surface);
}

.content-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: var(--space-8);
  margin-top: var(--space-8);
}

/* ─── ARTICLE / STANDARD READING CONTENT (Privacy / Blog) ───── */
.article-container {
  max-width: 800px;
  margin: 0 auto;
  padding: var(--space-section) 0;
}

.article-content {
  font-size: var(--text-base);
  line-height: 1.8;
  color: var(--text-muted);
}

.article-content h2 {
  color: var(--text-primary);
  font-size: var(--text-2xl);
  margin: var(--space-8) 0 var(--space-4);
}

.article-content h3 {
  color: var(--text-primary);
  font-size: var(--text-xl);
  margin: var(--space-6) 0 var(--space-2);
}

.article-content p {
  margin-bottom: var(--space-4);
}

.article-content ul, .article-content ol {
  margin-bottom: var(--space-4);
  padding-left: var(--space-6);
}

.article-content li {
  margin-bottom: 0.5rem;
}

.article-content a {
  color: var(--orange);
  text-decoration: underline;
  text-underline-offset: 4px;
}

/* ─── SERVICES EXTENDED CARDS ─────────────────────────────────── */
.services-detailed-grid {
  display: flex;
  flex-direction: column;
  gap: var(--space-24);
}

.service-feature-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-12);
  align-items: center;
}

.service-feature-row.reversed {
  direction: rtl;
}

.service-feature-row.reversed > * {
  direction: ltr; /* keep text readable */
}

.feature-img-wrapper {
  position: relative;
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: var(--surface-card);
  border: 1px solid rgba(26, 61, 104, 0.08);
  box-shadow: var(--shadow-card);
}

.feature-img-wrapper img {
  width: 100%;
  height: auto;
  display: block;
  object-fit: cover;
  transition: transform 0.7s cubic-bezier(0.2, 1, 0.2, 1);
}

.feature-img-wrapper:hover img {
  transform: scale(1.05);
}

.feature-content h3 {
  font-size: var(--text-3xl);
  margin-bottom: var(--space-4);
}

.feature-content p {
  color: var(--text-muted);
  font-size: var(--text-lg);
  margin-bottom: var(--space-6);
}

/* ─── CONTACT EXTENDED ────────────────────────────────────────── */
.contact-extended {
  display: grid;
  grid-template-columns: 1.5fr 1fr;
  gap: var(--space-12);
  align-items: stretch;
}

.contact-form-wrapper {
  background: var(--surface-card);
  border-radius: var(--radius-xl);
  padding: clamp(var(--space-8), 4vw, var(--space-12));
  box-shadow: var(--shadow-card);
  border-top: 4px solid var(--orange);
  transition: box-shadow var(--transition-expo-fast), transform var(--transition-expo-fast);
}

.contact-form-wrapper:focus-within {
  box-shadow: var(--shadow-card-hover);
  transform: translateY(-2px);
}

.contact-info-panel {
  background: var(--surface-card);
  border-radius: var(--radius-xl);
  border-top: 4px solid var(--orange);
  box-shadow: var(--shadow-card);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  height: 100%;
}

.contact-info-item {
  display: flex;
  align-items: flex-start;
  gap: var(--space-5);
  padding: var(--space-6) var(--space-8);
  border-bottom: 1px solid rgba(26, 61, 104, 0.07);
}

.contact-info-item:first-child {
  padding-top: clamp(var(--space-8), 4vw, var(--space-10));
}

.contact-info-item:last-child {
  border-bottom: none;
  flex: 1;
  min-height: 0;
  align-items: stretch;
}

.contact-info-item:last-child .contact-info-icon {
  align-self: flex-start;
}

.contact-info-item:last-child .contact-info-item-body {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 0;
}

.contact-info-icon {
  width: 40px;
  height: 40px;
  flex-shrink: 0;
  background: rgba(199, 66, 0, 0.08);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--orange-aa);
}

.contact-info-item-body h4 {
  font-family: var(--font-headline);
  font-weight: 700;
  color: var(--orange-aa);
  font-size: var(--text-xs);
  text-transform: uppercase;
  letter-spacing: var(--letter-spacing-wide);
  margin: 0 0 var(--space-1);
}

.contact-info-item-body p {
  font-size: var(--text-lg);
  font-weight: 600;
  color: var(--text-primary);
  margin: 0;
}

.contact-info-item-body a {
  color: var(--navy);
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: color var(--transition-fast), border-color var(--transition-fast);
}

.contact-info-item-body a:hover {
  color: var(--orange-aa);
  border-bottom-color: currentColor;
}

.contact-map {
  width: 100%;
  flex: 1;
  min-height: 200px;
  border-radius: var(--radius-md);
  margin-top: var(--space-4);
  overflow: hidden;
  background: var(--surface-low);
}

.contact-map iframe {
  display: block;
  width: 100%;
  height: 100%;
}

/* Trust strip inside form */
.form-trust {
  display: flex;
  gap: var(--space-6);
  justify-content: center;
  flex-wrap: wrap;
  margin-top: var(--space-6);
  padding-top: var(--space-6);
  border-top: 1px solid rgba(26, 61, 104, 0.08);
}

.form-trust span {
  font-size: var(--text-sm);
  color: var(--text-muted);
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: var(--space-2);
}

.form-trust span::before {
  content: '✓';
  color: var(--orange-aa);
  font-weight: 700;
  font-size: var(--text-base);
}

@media (max-width: 1024px) {
  .service-feature-row {
    grid-template-columns: 1fr;
    gap: var(--space-6);
  }
  .service-feature-row.reversed {
    direction: ltr;
  }
  .contact-extended {
    grid-template-columns: 1fr;
    gap: var(--space-8);
  }
}

@media (max-width: 768px) {
  .services-detailed-grid {
    gap: var(--space-12);
  }

  .feature-content h3 {
    font-size: var(--text-2xl);
  }

  .feature-content p {
    font-size: var(--text-base);
  }

  .page-title {
    font-size: clamp(1.75rem, 7.5vw, 2.5rem);
  }

  .page-subtitle {
    font-size: var(--text-base);
  }

  .contact-info-item {
    padding: var(--space-4) var(--space-5);
  }

  .contact-info-item:first-child {
    padding-top: var(--space-5);
  }
}

@media (max-width: 640px) {
  .contact-form-wrapper {
    padding: var(--space-6);
    border-radius: var(--radius-lg);
  }
  .contact-info-panel {
    padding: var(--space-5);
  }
  .services-detailed-grid {
    gap: var(--space-8);
  }
}

/* ─── CHI SIAMO — Vantaggio feature row ───────────────────────── */
.vantaggio-section { padding: var(--space-section) 0; }

/* ─── CHI SIAMO — Valori Fondamentali ─────────────────────────── */
.valori-section { background: #F5F3F1; padding: var(--space-section) 0; }
.valori-section h2 { text-align: center; font-size: var(--text-3xl); color: var(--navy); margin-bottom: var(--space-12); }
.valori-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--space-12); }
.valore-item { display: flex; flex-direction: column; gap: var(--space-4); }
.valore-icon { width: 56px; height: 56px; display: flex; align-items: center; justify-content: center; background: rgba(255, 102, 0, 0.08); border-radius: var(--radius-lg); color: var(--orange); flex-shrink: 0; }
.valore-icon svg { width: 28px; height: 28px; }
.valore-item h4 { font-family: var(--font-headline); font-size: var(--text-lg); font-weight: 700; color: var(--navy); margin: 0; }
.valore-item p { font-size: var(--text-base); color: var(--text-secondary, #43474F); line-height: 1.7; margin: 0; }

/* ─── CHI SIAMO — Certificazioni ──────────────────────────────── */
.cert-section { padding: var(--space-section) 0; text-align: center; }
.cert-section h2 { font-size: var(--text-2xl); color: var(--navy); margin-bottom: var(--space-4); }
.cert-section > .container > p { color: var(--text-muted); margin-bottom: var(--space-10); }
.cert-badges {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-12);
  flex-wrap: wrap;
}
.cert-badges img {
  height: 56px;
  width: auto;
  display: block;
  object-fit: contain;
  filter: grayscale(100%) opacity(0.62);
  transition: filter 300ms cubic-bezier(0.22, 1, 0.36, 1),
              opacity 300ms cubic-bezier(0.22, 1, 0.36, 1);
}
.cert-badges img:hover {
  filter: grayscale(0%) opacity(1);
}

@media (max-width: 768px) {
  .valori-grid { grid-template-columns: 1fr; gap: var(--space-8); }
  .cert-badges { gap: var(--space-8); }
  .cert-badges img { height: 44px; }
}

/* ─── CTA FINAL WARM — transição diagonal serviços → ação ─────
   Gradiente creme-laranja (Carta Low → Foundation Gold leve):
   serviços branco frio → CTA creme quente → footer navy.
   Diagonal esquerda-baixo / direita-cima = vetor da marca.       */
.section-cta-dark {
  background: linear-gradient(135deg, #FFF9F4 0%, #FFF0E3 60%, #FFE8D0 100%);
  position: relative;
  clip-path: polygon(0 clamp(2rem, 5vw, 4rem), 100% 0, 100% 100%, 0 100%);
  margin-top: calc(-1 * clamp(2rem, 5vw, 4rem));
  padding: calc(clamp(2rem, 5vw, 4rem) + var(--space-20)) 0 var(--space-24);
  overflow: hidden;
}

.section-cta-dark::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse at 65% 40%, rgba(255, 102, 0, 0.10) 0%, transparent 55%),
    radial-gradient(circle, rgba(26, 61, 104, 0.045) 1.5px, transparent 1.5px);
  background-size: auto, 32px 32px;
  pointer-events: none;
}

.section-cta-dark .container {
  position: relative;
  z-index: 1;
}

@media (prefers-reduced-motion: reduce) {
  .contact-form-wrapper,
  .contact-info-panel { transition: none; }
  .contact-form-wrapper:focus-within,
  .contact-info-panel:hover { transform: none; }
}

/* ─── BLOG — Filter chips ─────────────────────────────────── */
.blog-filter {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  justify-content: center;
  margin-bottom: var(--space-12);
}
.filter-chip {
  display: inline-flex;
  align-items: center;
  padding: 0.4rem 1.1rem;
  border-radius: 9999px;
  border: 1.5px solid rgba(26, 61, 104, 0.2);
  background: transparent;
  color: var(--text-secondary, #43474F);
  font-family: var(--font-headline);
  font-size: 0.875rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 280ms cubic-bezier(0.22, 1, 0.36, 1);
}
.filter-chip:hover {
  border-color: var(--navy);
  color: var(--navy);
  background: rgba(26, 61, 104, 0.04);
}
.filter-chip.active {
  background: var(--navy);
  color: #fff;
  border-color: var(--navy);
}
.filter-chip:focus-visible {
  outline: 2px solid var(--orange);
  outline-offset: 2px;
}

/* ─── BLOG — Grid layout ─────────────────────────────────── */
.blog-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-8);
}

.blog-post-featured {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 0;
  border-radius: var(--radius-xl);
  overflow: hidden;
  box-shadow: var(--shadow-card);
  background: var(--surface-card);
  transition: box-shadow 450ms cubic-bezier(0.22, 1, 0.36, 1),
              transform 450ms cubic-bezier(0.22, 1, 0.36, 1);
}
.blog-post-featured:hover {
  box-shadow: var(--shadow-card-hover);
  transform: translateY(-4px);
}
.blog-post-featured .post-img {
  min-height: 340px;
  background-size: cover;
  background-position: center;
  will-change: transform;
  transition: transform 0.7s cubic-bezier(0.2, 1, 0.2, 1);
}
.blog-post-featured:hover .post-img { transform: scale(1.04); }
.blog-post-featured .post-body {
  padding: clamp(var(--space-8), 4vw, var(--space-12));
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.blog-post-card {
  background: var(--surface-card);
  border-radius: var(--radius-xl);
  overflow: hidden;
  box-shadow: var(--shadow-card);
  display: flex;
  flex-direction: column;
  transition: box-shadow 450ms cubic-bezier(0.22, 1, 0.36, 1),
              transform 450ms cubic-bezier(0.22, 1, 0.36, 1);
}
.blog-post-card:hover {
  box-shadow: var(--shadow-card-hover);
  transform: translateY(-4px);
}
.blog-post-card .post-img {
  height: 220px;
  background-size: cover;
  background-position: center;
  will-change: transform;
  transition: transform 0.7s cubic-bezier(0.2, 1, 0.2, 1);
}
.blog-post-card:hover .post-img { transform: scale(1.05); }
.blog-post-card .post-body {
  padding: var(--space-6);
  flex: 1;
  display: flex;
  flex-direction: column;
}

.post-category {
  font-family: var(--font-headline);
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--orange-aa);
  margin-bottom: 0.5rem;
  display: block;
}
.post-title {
  font-family: var(--font-headline);
  font-weight: 700;
  color: var(--navy);
  line-height: 1.25;
  text-decoration: none;
  display: block;
  text-wrap: balance;
  transition: color 200ms ease;
}
.post-title:hover { color: var(--orange-aa); }
.blog-post-featured .post-title { font-size: var(--text-2xl); margin-bottom: var(--space-4); }
.blog-post-card .post-title { font-size: var(--text-lg); margin-bottom: var(--space-3); }
.post-meta {
  font-size: 0.875rem;
  color: var(--text-muted);
  display: flex;
  gap: var(--space-3);
  align-items: center;
  margin-bottom: var(--space-4);
}
.post-meta-sep { opacity: 0.4; }
.post-excerpt {
  font-size: var(--text-base);
  color: var(--text-muted);
  line-height: 1.7;
  margin-bottom: var(--space-6);
  flex: 1;
}

.blog-post-featured.hidden,
.blog-post-card.hidden { display: none; }

.btn-text {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--orange-aa);
  font-family: var(--font-headline);
  font-size: 0.875rem;
  font-weight: 700;
  text-decoration: none;
  transition: gap 250ms cubic-bezier(0.22, 1, 0.36, 1),
              color 200ms ease;
}
.btn-text:hover {
  gap: 0.85rem;
  color: var(--navy);
}
.btn-text svg {
  flex-shrink: 0;
  transition: transform 250ms cubic-bezier(0.22, 1, 0.36, 1);
}
.btn-text:hover svg { transform: translateX(3px); }

/* ─── BLOG — Article page ────────────────────────────────── */
.article-header-wrap {
  max-width: 800px;
  margin: 0 auto;
  padding: var(--space-section) var(--space-6) var(--space-12);
}
.article-body-wrap {
  max-width: 720px;
  margin: 0 auto;
  padding: 0 var(--space-6) var(--space-section);
}
.article-back {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  color: var(--orange-aa);
  font-weight: 600;
  font-size: 0.875rem;
  text-decoration: none;
  margin-bottom: var(--space-8);
}
.article-back:hover { color: var(--navy); }
.article-meta {
  display: flex;
  gap: var(--space-4);
  align-items: center;
  margin-bottom: var(--space-6);
  flex-wrap: wrap;
}
.article-meta .post-category { margin: 0; }
.article-meta-info {
  font-size: 0.875rem;
  color: var(--text-muted);
  display: flex;
  gap: var(--space-3);
  align-items: center;
}
.article-meta-info span + span::before { content: '·'; margin-right: var(--space-3); }
.article-cover {
  width: 100%;
  max-height: 480px;
  object-fit: cover;
  border-radius: var(--radius-xl);
  margin-bottom: var(--space-10);
  display: block;
}
.article-body p {
  text-wrap: pretty;
  line-height: 1.85;
  color: var(--text-secondary, #43474F);
  margin-bottom: var(--space-6);
  max-width: 70ch;
}
.article-body h2 {
  font-family: var(--font-headline);
  font-size: var(--text-2xl);
  color: var(--navy);
  margin: var(--space-12) 0 var(--space-4);
  text-wrap: balance;
}
.article-body h3 {
  font-family: var(--font-headline);
  font-size: var(--text-xl);
  color: var(--navy);
  margin: var(--space-8) 0 var(--space-3);
}
.article-body ul {
  margin-bottom: var(--space-6);
  padding-left: var(--space-6);
}
.article-body ul li {
  color: var(--text-secondary, #43474F);
  line-height: 1.8;
  margin-bottom: 0.5rem;
}
.article-cta-box {
  background: linear-gradient(135deg, #FFF9F4 0%, #FFF0E3 100%);
  border-radius: var(--radius-xl);
  padding: clamp(var(--space-8), 4vw, var(--space-10));
  text-align: center;
  margin-top: var(--space-16);
  border: 1px solid rgba(255, 102, 0, 0.12);
}
.article-cta-box h3 { font-size: var(--text-2xl); color: var(--navy); margin-bottom: var(--space-4); text-wrap: balance; }
.article-cta-box p { color: #43474F; margin-bottom: var(--space-6); }

@media (max-width: 900px) {
  .blog-grid { grid-template-columns: 1fr; }
  .blog-post-featured { grid-template-columns: 1fr; }
  .blog-post-featured .post-img { min-height: 260px; }
}
@media (max-width: 640px) {
  .blog-post-featured .post-title { font-size: var(--text-xl); }
  .article-body p { max-width: 100%; }
}
@media (prefers-reduced-motion: reduce) {
  .blog-post-featured, .blog-post-card { transition: none; }
  .blog-post-featured:hover, .blog-post-card:hover { transform: none; }
  .blog-post-featured .post-img, .blog-post-card .post-img { transition: none; }
  .blog-post-featured:hover .post-img, .blog-post-card:hover .post-img { transform: none; }
}
