/* ==========================================================================
   ITAPOSTES — estilos do site
   Base: Bootstrap 5.3. Aqui ficam tokens, componentes e ajustes de marca.
   ========================================================================== */

:root {
  --navy: #0f2547;
  --navy-2: #16315d;
  --blue: #2f5daa;
  --blue-dark: #234a8c;
  --amber: #f5a623;
  --amber-dark: #dc8f0c;
  --concrete: #eceef1;
  --concrete-2: #d5d9de;
  --ink: #1b2433;
  --muted: #566176;
  --white: #fff;
  --whatsapp: #17a34a;
  --radius: 4px;
  --font-head: "Barlow Semi Condensed", "Arial Narrow", Arial, sans-serif;
  --font-body: "Source Sans 3", "Segoe UI", Arial, sans-serif;
  --bs-body-font-family: var(--font-body);
  --bs-body-color: var(--ink);
  --bs-link-color: var(--blue);
  --bs-link-hover-color: var(--navy);
}

html { scroll-behavior: smooth; scroll-padding-top: 90px; }
body { font-family: var(--font-body); font-size: 1.0625rem; line-height: 1.65; color: var(--ink); background: var(--white); }
h1, h2, h3, h4, .navbar-nav .nav-link, .btn { font-family: var(--font-head); }
h1, h2, h3, h4 { font-weight: 700; line-height: 1.15; color: var(--navy); letter-spacing: 0; }
p { max-width: 70ch; }
img { max-width: 100%; height: auto; }

.skip-link { position: absolute; left: -999px; top: 0; z-index: 2000; background: var(--amber); color: #1b1403; padding: .6rem 1rem; font-weight: 700; }
.skip-link:focus { left: 8px; top: 8px; }
:focus-visible { outline: 3px solid var(--amber); outline-offset: 2px; }

/* ---------- Botões ---------- */
.btn { font-weight: 600; font-size: 1.05rem; letter-spacing: .01em; border-radius: var(--radius); padding: .6rem 1.4rem; transition: background-color .2s, color .2s, border-color .2s; }
.btn-lg { padding: .75rem 1.8rem; font-size: 1.15rem; }
.btn-cta { background: var(--amber); border: 2px solid var(--amber); color: #1b1403; }
.btn-cta:hover, .btn-cta:focus { background: var(--amber-dark); border-color: var(--amber-dark); color: #1b1403; }
.btn-primary-brand { background: var(--blue); border: 2px solid var(--blue); color: #fff; }
.btn-primary-brand:hover, .btn-primary-brand:focus { background: var(--navy); border-color: var(--navy); color: #fff; }
.btn-whatsapp { background: var(--whatsapp); border: 2px solid var(--whatsapp); color: #fff; }
.btn-whatsapp:hover { background: #12873c; border-color: #12873c; color: #fff; }

/* ---------- Faixa superior e header ---------- */
.topbar { background: var(--navy); color: #cfd8e6; font-size: .92rem; padding: .45rem 0; }
.topbar a { color: #fff; text-decoration: none; }
.topbar a:hover { color: var(--amber); }
.topbar i { color: var(--amber); margin-right: .25rem; }

.site-header { position: sticky; top: 0; z-index: 1030; background: #fff; border-bottom: 1px solid var(--concrete-2); }
.navbar { padding: .5rem 0; }
.navbar-brand img { height: 52px; width: auto; }
.navbar .nav-link { font-size: 1.12rem; font-weight: 600; color: var(--navy); padding: .6rem .95rem; position: relative; }
.navbar .nav-link:hover { color: var(--blue); }
.navbar .nav-link.active { color: var(--blue); }
@media (min-width: 992px) {
  .navbar .nav-link.active::after { content: ""; position: absolute; left: .95rem; right: .95rem; bottom: .15rem; height: 3px; background: var(--amber); }
}
.navbar-toggler { border: 1px solid var(--concrete-2); font-size: 1.7rem; line-height: 1; padding: .2rem .5rem; color: var(--navy); }
.navbar-toggler:focus { box-shadow: 0 0 0 3px rgba(245,166,35,.5); }
.dropdown-menu { border-radius: var(--radius); border: 1px solid var(--concrete-2); padding: .4rem; min-width: 14rem; }
.dropdown-item { font-family: var(--font-body); border-radius: 3px; padding: .5rem .8rem; }
.dropdown-item:hover, .dropdown-item:focus { background: var(--concrete); color: var(--navy); }
@media (min-width: 992px) { .navbar .dropdown:hover > .dropdown-menu { display: block; } }
@media (max-width: 991.98px) {
  .navbar-collapse { padding: .75rem 0 1rem; }
  .navbar .btn-cta { display: block; text-align: center; }
}

/* ---------- Hero carousel ---------- */
.hero { background: var(--navy); }
.hero .carousel-item { position: relative; height: clamp(440px, 64vh, 660px); }
.hero-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.hero-overlay { position: absolute; inset: 0; background: linear-gradient(90deg, rgba(10,24,48,.88) 0%, rgba(10,24,48,.62) 45%, rgba(10,24,48,.12) 100%); }
.hero-content { position: relative; height: 100%; display: flex; align-items: center; }
.hero-copy { max-width: 640px; padding-left: 1.25rem; border-left: 5px solid var(--amber); color: #fff; }
.hero-copy h2 { color: #fff; font-size: clamp(2rem, 4.6vw, 3.4rem); margin-bottom: 1rem; }
.hero-copy p { font-size: clamp(1.05rem, 1.6vw, 1.25rem); color: #e6ecf6; margin-bottom: 1.6rem; }
.hero .carousel-indicators { margin-bottom: 1.2rem; }
.hero .carousel-indicators [data-bs-target] { width: 38px; height: 4px; border: 0; background-color: #fff; opacity: .5; border-radius: 0; }
.hero .carousel-indicators .active { opacity: 1; background-color: var(--amber); }
.hero .carousel-control-prev, .hero .carousel-control-next { width: 8%; min-width: 56px; opacity: 1; }
.hero-arrow { width: 46px; height: 46px; display: grid; place-items: center; background: rgba(15,37,71,.7); color: #fff; font-size: 1.3rem; border: 1px solid rgba(255,255,255,.35); transition: background-color .2s; }
.hero .carousel-control-prev:hover .hero-arrow, .hero .carousel-control-next:hover .hero-arrow { background: var(--amber); color: #1b1403; }
@media (max-width: 767.98px) {
  .hero .carousel-control-prev, .hero .carousel-control-next { display: none; }
  .hero-copy { padding-left: 1rem; }
  .hero-overlay { background: linear-gradient(0deg, rgba(10,24,48,.9) 0%, rgba(10,24,48,.55) 100%); }
}

/* ---------- Seções ---------- */
.section { padding: clamp(3rem, 6vw, 5.5rem) 0; }
.section-alt { background: var(--concrete); }
.section-head { max-width: 760px; margin-bottom: 2.5rem; }
.section-title { font-size: clamp(1.7rem, 3vw, 2.4rem); margin-bottom: 1rem; }
.section-title::after { content: ""; display: block; width: 56px; height: 4px; background: var(--amber); margin-top: .8rem; }
.text-white-75 { color: rgba(255,255,255,.82); }
.narrow { max-width: 820px; }

.intro-media img { width: 100%; border-radius: var(--radius); display: block; }
.highlights { display: grid; gap: .6rem; margin: 1.5rem 0; }
.highlights li { display: flex; align-items: center; gap: .75rem; font-weight: 600; color: var(--navy); }
.highlights i { color: var(--blue); font-size: 1.35rem; }

/* ---------- Cards de solução ---------- */
.solution-card { background: #fff; border: 1px solid var(--concrete-2); border-radius: var(--radius); overflow: hidden; display: flex; flex-direction: column; transition: border-color .2s; }
.solution-card:hover { border-color: var(--blue); }
.solution-card-media { display: block; aspect-ratio: 4 / 3; overflow: hidden; background: var(--concrete); }
.solution-card-media img { width: 100%; height: 100%; object-fit: cover; display: block; }
.solution-card-body { padding: 1.25rem 1.35rem 1.5rem; display: flex; flex-direction: column; flex: 1; }
.solution-card h3 { font-size: 1.4rem; margin-bottom: .5rem; }
.solution-card h3 a { color: var(--navy); text-decoration: none; }
.solution-card h3 a:hover { color: var(--blue); }
.solution-card p { color: var(--muted); font-size: 1rem; flex: 1; }
.link-more { font-family: var(--font-head); font-weight: 600; font-size: 1.05rem; text-decoration: none; color: var(--blue); }
.link-more:hover { color: var(--navy); }
.link-more i { transition: transform .2s; display: inline-block; }
.link-more:hover i { transform: translateX(4px); }

/* ---------- Mosaico (Home) e galeria ---------- */
.mosaic { display: grid; gap: .75rem; grid-template-columns: repeat(6, 1fr); grid-auto-rows: 120px; }
.mosaic-item { overflow: hidden; border-radius: var(--radius); background: var(--concrete); display: block; }
.mosaic-item img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .4s; }
.mosaic-item:hover img { transform: scale(1.04); }
.mosaic-item:nth-child(1) { grid-column: span 3; grid-row: span 2; }
.mosaic-item:nth-child(2) { grid-column: span 3; grid-row: span 1; }
.mosaic-item:nth-child(3) { grid-column: span 3; grid-row: span 1; }
.mosaic-item:nth-child(4) { grid-column: span 2; grid-row: span 2; }
.mosaic-item:nth-child(5) { grid-column: span 4; grid-row: span 2; }
@media (max-width: 575.98px) { .mosaic { grid-auto-rows: 90px; } }

.gallery-grid { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }
.gallery-item { position: relative; display: block; aspect-ratio: 4 / 3; overflow: hidden; border-radius: var(--radius); background: var(--concrete); }
.gallery-item img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .4s; }
.gallery-item:hover img { transform: scale(1.05); }
.gallery-tag { position: absolute; left: 0; bottom: 0; background: rgba(15,37,71,.88); color: #fff; font-family: var(--font-head); font-weight: 600; padding: .3rem .8rem; font-size: .95rem; }

.thumb-grid { display: grid; gap: .75rem; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }
.thumb-grid a { display: block; aspect-ratio: 1; overflow: hidden; border-radius: var(--radius); background: var(--concrete); }
.thumb-grid img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .3s; }
.thumb-grid a:hover img { transform: scale(1.05); }

/* ---------- Hero interno e breadcrumb ---------- */
.page-hero { position: relative; background-color: var(--blue); background-image: linear-gradient(90deg, rgba(47,93,170,.97) 0%, rgba(47,93,170,.9) 60%, rgba(35,74,140,.82) 100%), var(--hero-bg, none); background-size: cover; background-position: center; color: #fff; padding: 2.6rem 0 3rem; }
.page-hero h1 { color: #fff; font-size: clamp(2rem, 4.2vw, 3.1rem); margin: 1rem 0 0; }
.page-hero .lead { color: #eef3fb; margin: .8rem 0 0; font-size: 1.2rem; max-width: 60ch; }
.crumbs .breadcrumb { --bs-breadcrumb-divider-color: #d3def2; --bs-breadcrumb-item-active-color: #e6edf9; font-size: .95rem; }
.crumbs a { color: #fff; text-decoration: none; }
.crumbs a:hover { color: var(--amber); text-decoration: underline; }

/* ---------- Conteúdo das soluções ---------- */
.solution-content h2 { font-size: 1.7rem; margin: 2rem 0 .9rem; }
.solution-content h2:first-child { margin-top: 0; }
.figure-img-card { margin: 0; overflow: hidden; border-radius: var(--radius); background: var(--concrete); }
.figure-img-card img { width: 100%; display: block; }
.check-list { list-style: none; padding: 0; margin: 0 0 1.2rem; display: grid; gap: .55rem; }
.check-list li { position: relative; padding-left: 1.9rem; font-weight: 600; color: var(--navy); }
.check-list li::before { content: "\F26A"; font-family: "bootstrap-icons"; position: absolute; left: 0; top: 0; color: var(--blue); }
.check-list.cols-2 { grid-template-columns: 1fr; }
@media (min-width: 576px) { .check-list.cols-2 { grid-template-columns: 1fr 1fr; } }

/* Tabelas técnicas */
.spec-table-wrap { overflow-x: auto; margin: 1rem 0 .6rem; border: 1px solid var(--concrete-2); border-radius: var(--radius); }
.spec-table { width: 100%; min-width: 480px; border-collapse: collapse; font-variant-numeric: tabular-nums; text-align: center; }
.spec-table caption { caption-side: top; background: var(--navy); color: #fff; font-family: var(--font-head); font-weight: 700; font-size: 1.15rem; text-align: left; padding: .75rem 1rem; }
.spec-table thead th { background: var(--concrete); color: var(--navy); font-family: var(--font-head); font-weight: 700; padding: .6rem .8rem; border: 1px solid var(--concrete-2); }
.spec-table tbody th, .spec-table tbody td { padding: .55rem .8rem; border: 1px solid var(--concrete-2); font-weight: 400; }
.spec-table tbody th { font-weight: 600; color: var(--navy); }
.spec-table tbody tr:nth-child(even) { background: #f7f8fa; }
.spec-table tbody tr:hover { background: #e9f0fb; }
.table-note { font-size: .95rem; color: var(--muted); }
.table-note i { color: var(--blue); }

/* Sidebar */
.solution-sidebar { position: sticky; top: 100px; display: grid; gap: 1.25rem; }
.side-box { border: 1px solid var(--concrete-2); border-radius: var(--radius); padding: 1.25rem; background: #fff; }
.side-title { font-size: 1.25rem; margin-bottom: .8rem; }
.side-list a { display: block; padding: .6rem .8rem; margin: 0 -.8rem; text-decoration: none; color: var(--navy); border-left: 4px solid transparent; font-weight: 600; }
.side-list a:hover { background: var(--concrete); }
.side-list a.active { border-left-color: var(--amber); background: var(--concrete); color: var(--blue); }
.side-cta { background: var(--navy); border-color: var(--navy); color: #dbe4f2; }
.side-cta .side-title { color: #fff; }
.side-phone { display: block; margin-top: .75rem; color: #fff; text-decoration: none; font-weight: 600; }
.side-phone i { color: var(--amber); }
@media (max-width: 991.98px) { .solution-sidebar { position: static; } }

/* Missão / visão / valores e números */
.mvv { height: 100%; border: 1px solid var(--concrete-2); border-top: 4px solid var(--blue); border-radius: var(--radius); padding: 1.6rem; background: #fff; }
.mvv i { font-size: 1.8rem; color: var(--blue); }
.mvv h3 { margin: .5rem 0 .8rem; font-size: 1.5rem; }
.mvv p { color: var(--muted); font-size: 1rem; }
.facts { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1px; background: var(--concrete-2); border: 1px solid var(--concrete-2); margin: 0 0 1rem; }
.facts div { background: #fff; padding: 1.1rem 1.2rem; }
.facts dt { font-family: var(--font-head); font-size: 1.9rem; font-weight: 700; color: var(--navy); line-height: 1.1; }
.facts dd { margin: .2rem 0 0; color: var(--muted); font-size: .95rem; }

/* ---------- Contato ---------- */
.contact-section { background: var(--navy); background-image: linear-gradient(135deg, var(--navy) 0%, var(--navy-2) 100%); color: #fff; }
.contact-list { display: grid; gap: .7rem; margin-top: 1.5rem; }
.contact-list li { display: flex; gap: .7rem; color: #e6ecf6; }
.contact-list i { color: var(--amber); font-size: 1.15rem; }
.contact-list a { color: #fff; text-decoration: none; }
.contact-list a:hover { color: var(--amber); }
.form-card { background: #fff; color: var(--ink); border-radius: var(--radius); padding: clamp(1.25rem, 3vw, 2rem); }
.form-card-light { border: 1px solid var(--concrete-2); }
.contact-cards { display: grid; gap: 1.25rem; margin-top: 1.75rem; }
.contact-cards li { display: flex; gap: 1rem; align-items: flex-start; }
.contact-cards > li > i { width: 46px; height: 46px; display: grid; place-items: center; background: var(--navy); color: var(--amber); font-size: 1.25rem; border-radius: var(--radius); flex: none; }
.contact-cards strong { display: block; font-family: var(--font-head); color: var(--navy); font-size: 1.15rem; }
.contact-cards a, .contact-cards span { display: block; color: var(--ink); text-decoration: none; }
.contact-cards a:hover { color: var(--blue); text-decoration: underline; }

.contact-form .form-label { font-weight: 600; color: var(--navy); margin-bottom: .3rem; }
.contact-form .form-control { border-radius: var(--radius); border-color: #b9c1cc; padding: .65rem .85rem; }
.contact-form .form-control:focus { border-color: var(--blue); box-shadow: 0 0 0 .22rem rgba(47,93,170,.25); }
.hp-field { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.form-config-warning { background: #fff6e0; border: 1px solid #f0cf85; color: #6b4a00; padding: .6rem .8rem; border-radius: var(--radius); font-size: .95rem; }
.form-status { padding: .8rem 1rem; border-radius: var(--radius); font-weight: 600; }
.form-status.is-success { background: #e7f6ec; color: #11602d; border: 1px solid #a5d9b8; }
.form-status.is-error { background: #fdecec; color: #8a1c1c; border: 1px solid #f0b4b4; }
.placeholder-box { border: 1px dashed var(--concrete-2); padding: 2rem; border-radius: var(--radius); background: var(--concrete); }

/* ---------- Faixa CTA ---------- */
.cta-band { background: var(--blue); color: #fff; padding: 2.6rem 0; }
.cta-band h2 { color: #fff; font-size: clamp(1.5rem, 2.6vw, 2.1rem); margin-bottom: .4rem; }
.cta-band p { color: #e2eaf7; }

/* ---------- Footer ---------- */
.site-footer { background: var(--navy); color: #c3cee1; }
.footer-main { padding-top: 4rem; padding-bottom: 3.5rem; }
.footer-logo { display: inline-block; background: #fff; padding: .6rem .9rem; border-radius: var(--radius); }
.footer-logo img { display: block; height: 46px; width: auto; }
.footer-about { margin: 1.2rem 0 1.2rem; font-size: 1rem; }
.footer-title { color: #fff; font-size: 1.25rem; margin-bottom: 1rem; }
.footer-title::after { content: ""; display: block; width: 32px; height: 3px; background: var(--amber); margin-top: .5rem; }
.footer-links { display: grid; gap: .5rem; margin: 0; }
.footer-links a, .footer-contact a { color: #c3cee1; text-decoration: none; }
.footer-links a:hover, .footer-contact a:hover { color: var(--amber); text-decoration: underline; }
.footer-contact { display: grid; gap: .7rem; margin: 0; }
.footer-contact li { display: flex; gap: .6rem; }
.footer-contact i { color: var(--amber); }
.social a, .social .is-placeholder { width: 40px; height: 40px; display: grid; place-items: center; border-radius: var(--radius); font-size: 1.15rem; }
.social a { background: rgba(255,255,255,.1); color: #fff; text-decoration: none; transition: background-color .2s, color .2s; }
.social a:hover { background: var(--amber); color: #1b1403; }
.social .is-placeholder { background: rgba(255,255,255,.05); color: #7f8fab; cursor: default; }
.footer-bottom { border-top: 1px solid rgba(255,255,255,.12); padding: 1.1rem 0; font-size: .92rem; }
.footer-legal a { color: #c3cee1; margin-left: 1.25rem; text-decoration: none; }
.footer-legal a:first-child { margin-left: 0; }
.footer-legal a:hover { color: var(--amber); text-decoration: underline; }
@media (min-width: 768px) { .footer-legal a:first-child { margin-left: 1.25rem; } }

/* ---------- WhatsApp flutuante ---------- */
.whatsapp-float { position: fixed; right: 18px; bottom: 18px; z-index: 1040; width: 56px; height: 56px; border-radius: 50%; display: grid; place-items: center; background: var(--whatsapp); color: #fff; font-size: 1.9rem; text-decoration: none; box-shadow: 0 4px 14px rgba(0,0,0,.3); transition: transform .2s; }
.whatsapp-float:hover { transform: scale(1.07); color: #fff; }

/* ---------- Lightbox ---------- */
.lb { position: fixed; inset: 0; z-index: 2000; background: rgba(7,15,30,.94); display: none; align-items: center; justify-content: center; padding: 3.5rem 1rem 4.5rem; }
.lb.is-open { display: flex; }
.lb-figure { margin: 0; max-width: min(1100px, 100%); max-height: 100%; display: flex; flex-direction: column; align-items: center; }
.lb-img { max-width: 100%; max-height: calc(100vh - 10rem); object-fit: contain; border-radius: var(--radius); background: #000; }
.lb-caption { color: #dbe4f2; margin-top: .8rem; text-align: center; font-size: .98rem; }
.lb-btn { position: absolute; background: rgba(255,255,255,.12); color: #fff; border: 1px solid rgba(255,255,255,.3); width: 48px; height: 48px; display: grid; place-items: center; font-size: 1.4rem; cursor: pointer; border-radius: var(--radius); transition: background-color .2s; }
.lb-btn:hover { background: var(--amber); color: #1b1403; }
.lb-close { top: 14px; right: 14px; }
.lb-prev { left: 14px; top: 50%; transform: translateY(-50%); }
.lb-next { right: 14px; top: 50%; transform: translateY(-50%); }
@media (max-width: 575.98px) { .lb-prev, .lb-next { top: auto; bottom: 14px; transform: none; } .lb-prev { left: 14px; } .lb-next { right: 14px; } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: .01ms !important; animation-duration: .01ms !important; scroll-behavior: auto !important; }
}

/* Evita rolagem horizontal: o gutter horizontal de .g-5 (3rem) excede o padding do .container no mobile */
@media (max-width: 991.98px) { .row.g-5 { --bs-gutter-x: 1.5rem; } }

/* Selo ISO 9001 */
.iso-badge { display: flex; align-items: center; gap: 1rem; margin: 1.5rem 0; padding: 1rem 1.2rem; border: 1px solid var(--concrete-2); border-left: 4px solid var(--amber); border-radius: var(--radius); background: #fff; max-width: 34rem; }
.iso-badge img { width: 84px; height: 84px; flex: none; }
.iso-badge strong { display: block; font-family: var(--font-head); font-size: 1.2rem; color: var(--navy); }
.iso-badge span { color: var(--muted); font-size: .98rem; }

/* Conteúdo legal */
.legal-content h2 { font-size: 1.45rem; margin: 2rem 0 .7rem; }
.legal-content p, .legal-content li { max-width: 75ch; }
.legal-content ul { padding-left: 1.2rem; }

/* Aviso de cookies */
.cookie-banner { position: fixed; left: 18px; bottom: 18px; z-index: 1060; width: min(460px, calc(100% - 36px)); background: var(--navy); color: #e6ecf6; border: 1px solid rgba(255,255,255,.18); border-top: 4px solid var(--amber); border-radius: var(--radius); padding: 1.1rem 1.2rem; box-shadow: 0 8px 28px rgba(0,0,0,.35); }
.cookie-banner[hidden] { display: none; }
.cookie-title { font-family: var(--font-head); font-weight: 700; color: #fff; font-size: 1.15rem; margin: 0 0 .3rem; }
.cookie-text { font-size: .95rem; margin: 0 0 .9rem; }
.cookie-text a { color: #fff; text-decoration: underline; }
.cookie-actions { display: flex; flex-wrap: wrap; gap: .6rem; }
.cookie-actions .btn { padding: .45rem 1.1rem; font-size: 1rem; }
.linklike { background: none; border: 0; padding: 0; margin-left: 1.25rem; color: #c3cee1; font: inherit; cursor: pointer; text-decoration: none; }
.linklike:hover { color: var(--amber); text-decoration: underline; }
@media (max-width: 575.98px) { .cookie-banner { left: 10px; right: 10px; bottom: 10px; width: auto; } }
