/* Microrede — personalizações sobre o Porto (IT Services). O skin de cores é gerado por `php artisan theme:skin`. */

.header-logo img { height: auto; max-width: 100%; }
@media (max-width: 575px) {
    .header-logo img { width: 166px !important; height: 38px !important; }
}


/* Corpo das notícias (HTML vindo do Joomla, do editor ou da IA) */
.post-content { font-size: 1.05rem; line-height: 1.8; color: #444; }
.post-content img { max-width: 100%; height: auto; margin: 1rem 0; }
.post-content h2, .post-content h3, .post-content h4 { color: var(--dark); font-weight: 700; margin: 2rem 0 1rem; }
.post-content h2 { font-size: 1.6rem; }
.post-content h3 { font-size: 1.3rem; }
.post-content ul, .post-content ol { padding-left: 1.4rem; margin-bottom: 1.2rem; }
.post-content li { margin-bottom: .35rem; }
.post-content blockquote { border-left: 4px solid var(--primary); padding: .5rem 1.25rem; color: #555; font-style: italic; }
.post-content table { width: 100%; margin-bottom: 1rem; }
.post-content iframe { max-width: 100%; }
.post-source { border-left: 4px solid var(--secondary); background: var(--grey-100); padding: 1rem 1.25rem; font-size: .9rem; }

/* (ver .post-card) */
.custom-post-style-1 header.no-image { background: var(--primary); }
.post-card-meta { text-transform: uppercase; font-size: .75rem; letter-spacing: .03em; }

/* Tabelas de contratos */
.contract-card { border-top: 4px solid var(--primary); transition: transform .2s ease, box-shadow .2s ease; }
.contract-card:hover { transform: translateY(-4px); box-shadow: 0 15px 40px rgba(0, 0, 0, .1); }
.contract-card .price { font-size: 2.2rem; font-weight: 800; color: var(--primary); line-height: 1; }
.contract-card .price small { font-size: .9rem; font-weight: 500; color: #777; }
.contract-card ul li { padding: .45rem 0; border-bottom: 1px solid var(--grey-200); }
.contract-card.featured { border-top-color: var(--secondary); }

.cookie-bar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 9999; background: rgba(29, 43, 51, .97); }

.contact-form .form-control.error { box-shadow: 0 0 0 2px #dc3545 !important; }
.hp-field { position: absolute !important; left: -9999px !important; height: 1px; overflow: hidden; }

.sidebar .nav-list .nav-link { padding-left: 0; }
.pagination .page-link { color: var(--primary); }
.pagination .page-item.active .page-link { background-color: var(--primary); border-color: var(--primary); color: #fff; }

/* Valores (home): cartões com ícone */
.value-card { transition: transform .2s ease, box-shadow .2s ease; border-bottom: 3px solid var(--primary) !important; }
.value-card:hover { transform: translateY(-4px); box-shadow: 0 15px 40px rgba(0, 0, 0, .1) !important; }
.value-card-icon { display: inline-flex; align-items: center; justify-content: center; width: 72px; height: 72px; border-radius: 50%; background: var(--primary-rgba-10); color: var(--primary); font-size: 1.75rem; }

/* Cartões de notícias com altura uniforme */
.post-card header { aspect-ratio: 16 / 10; overflow: hidden; }
.post-card header img { width: 100%; height: 100%; object-fit: cover; aspect-ratio: auto; }
.post-card .post-card-title { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.post-card .post-card-excerpt { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }

/* Home "Quem somos": Cascading Images do Porto com as fotos da Microrede (mesma proporção) e contador de anos */
.about-cascade { display: block; padding: 40px 0 28% 0; }
.about-cascade .cascading-images { transform: none; width: 72%; }
.about-cascade img { display: block; width: 100%; height: auto; aspect-ratio: 16 / 10; object-fit: cover; }
.about-cascade-second { width: 100%; top: 58%; left: 38%; }
.about-cascade-badge { top: -40px; left: 72%; min-width: 170px; box-shadow: 0 15px 40px rgba(0, 0, 0, .2); }
.about-cascade-badge label { display: block; line-height: 1.3; }
@media (max-width: 575px) {
    .about-cascade { padding-top: 30px; }
    .about-cascade-badge { left: auto; right: -30%; top: -30px; min-width: 120px; padding: .9rem !important; }
    .about-cascade-badge strong { font-size: 2.2rem !important; }
}

.footer-legal a { color: rgba(255, 255, 255, .75); }
.footer-legal a:hover { color: #fff; }
.consent-map { min-height: 460px; }
.consent-map-placeholder { background: var(--grey-100); min-height: 460px; }
.legal-content h2 { font-size: 1.35rem; }
.legal-content table { background: #fff; }
.post-card header.overlay::before { top: 0; bottom: 0; height: auto; opacity: 1; background: linear-gradient(180deg, rgba(0, 0, 0, .15) 0%, rgba(0, 0, 0, .7) 100%); }

/* Correção da demo IT Services: as margens -50px só fazem sentido quando .body tem margem (>= 1440px) */
@media (min-width: 576px) and (max-width: 1439px) {
    .custom-section-full-width { margin-left: 0 !important; margin-right: 0 !important; }
}
.custom-section-svg { overflow: hidden; }
.pagination { flex-wrap: wrap; row-gap: .5rem; }
.post-card .post-card-title { font-size: 1.15rem !important; line-height: 1.35 !important; }
.custom-post-style-1 header.no-image { background: linear-gradient(135deg, var(--primary) 0%, var(--quaternary) 100%); position: relative; }
.post-card-placeholder { position: absolute; top: 18%; right: 8%; font-size: 4.5rem; color: rgba(255, 255, 255, .18); }
.post-content img[width] { height: auto; }

/* Etiquetas */
.post-tag { display: inline-block; padding: .3rem .75rem; border: 1px solid var(--grey-300); border-radius: 2rem; font-size: .8rem; color: var(--dark); background: #fff; text-decoration: none; transition: all .2s ease; }
.post-tag:hover { background: var(--primary); border-color: var(--primary); color: #fff; }
.post-tags .list-inline-item:not(:last-child) { margin-right: .35rem; }

/* Hero: crossfade entre 2 imagens de fundo (desktop); no mobile so a foto atual, sem animacao */
.hero-bg-slideshow { position: relative; }
.hero-bg-layer {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center;
    z-index: 0;
}
.hero-bg-layer-1 { opacity: 1; animation: heroBgFade1 16s ease-in-out infinite; }
.hero-bg-layer-2 { opacity: 0; animation: heroBgFade2 16s ease-in-out infinite; }
.hero-bg-slideshow > svg { position: relative; z-index: 1; }
.hero-bg-slideshow > .container { z-index: 2; }

@keyframes heroBgFade1 {
    0%, 42%   { opacity: 1; }
    50%, 92%  { opacity: 0; }
    100%      { opacity: 1; }
}
@keyframes heroBgFade2 {
    0%, 42%   { opacity: 0; }
    50%, 92%  { opacity: 1; }
    100%      { opacity: 0; }
}

@media (max-width: 767px), (prefers-reduced-motion: reduce) {
    .hero-bg-layer-1 { opacity: 1 !important; animation: none !important; }
    .hero-bg-layer-2 { display: none; }
}

/* Assistente VoiceNexus: o botão fica no canto inferior direito; o "voltar ao topo" do Porto passa para a esquerda */
html .scroll-to-top { right: auto; left: 10px; }
:root { --vn-inferior: calc(var(--cookie-bar-h, 0px) + 20px); }
.assistant-cta { display: inline-flex; align-items: center; gap: .5rem; }
/* Âncora /contactos#formulario: compensa o cabeçalho fixo */
#formulario { scroll-margin-top: 90px; }
