/* ============================================================
   Papanegas — Centro de Apoio ao Estudo
   Réplica do tema "Appointment Pro" (esquema green) de papanegas.pt
   Cores exatas do tema: #7aa228 / #649403 / #21202e / #8f969c / #242526
   ============================================================ */

:root {
  --primary: #7aa228;
  --primary-dark: #649403;
  --dark: #21202e;
  --text: #8f969c;
  --heading: #242526;
  --menu-link: #1b1b1b;
  --border: #e7e7e7;
  --white: #ffffff;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  font-family: "Open Sans", sans-serif;
  font-size: 15px;
  line-height: 1.7;
  color: var(--text);
  background: var(--white);
}

img { max-width: 100%; }

a { color: var(--primary); text-decoration: none; transition: all .2s; }
a:hover { color: var(--primary-dark); text-decoration: none; }

h1, h2, h3, h4, h5, h6 { color: var(--heading); line-height: 1.3; }

.container {
  width: 100%;
  max-width: 1170px;
  margin: 0 auto;
  padding: 0 15px;
}

/* ---------- Barra de topo (banner de campanha) ---------- */
.top-header-widget {
  background: var(--dark);
  padding: 10px 0;
  text-align: center;
}
.top-header-widget img {
  max-width: 360px;
  width: 100%;
  height: auto;
  display: inline-block;
}

/* ---------- Navbar ---------- */
.navbar {
  background: var(--white);
  border-bottom: 1px solid var(--border);
  position: relative;
  z-index: 100;
}
.navbar .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
}
.navbar-brand {
  padding: 10px 0;
  display: block;
}
.navbar-brand img { height: 64px; width: auto; display: block; }

.nav-toggle {
  display: none;
  background: none;
  border: 1px solid var(--primary);
  border-radius: 4px;
  color: var(--primary);
  font-size: 20px;
  padding: 4px 12px;
  cursor: pointer;
}

.nav-menu {
  display: flex;
  align-items: center;
  list-style: none;
}
.nav-menu > li > a {
  display: block;
  padding: 9px 15px;
  color: var(--menu-link);
  font-size: 14px;
  font-weight: 600;
}
.nav-menu > li > a:hover {
  color: var(--white);
  background: var(--primary);
}
.nav-menu > li > a.active {
  color: var(--white);
  background: var(--primary);
}
.nav-menu .social a {
  color: var(--menu-link);
  font-size: 16px;
  padding: 9px 15px;
  display: block;
}
.nav-menu .social a:hover { color: var(--white); background: var(--primary); }

/* ---------- Slider (carousel) ---------- */
.homepage-mycarousel { position: relative; }
.carousel { position: relative; overflow: hidden; }
.carousel .item { display: none; position: relative; }
.carousel .item.active { display: block; animation: fadeSlide .8s ease; }
@keyframes fadeSlide { from { opacity: .4; } to { opacity: 1; } }
.carousel .item > img { width: 100%; height: auto; display: block; }

.slide-caption {
  position: absolute;
  top: 38%;
  left: 0;
  right: 0;
  margin: 0 auto;
}
.slide-text-bg1 h2 {
  color: var(--heading);
  font-size: 30px;
  font-weight: 400;
  margin-bottom: 18px;
}
.slide-btn-area-sm { margin-top: 10px; }
.slide-btn-sm {
  display: inline-block;
  background: var(--primary);
  color: var(--white);
  font-size: 13px;
  padding: 10px 25px;
  border-radius: 3px;
}
.slide-btn-sm:hover { background: var(--primary-dark); color: var(--white); }

.carousel-indicators {
  position: absolute;
  bottom: 15px;
  left: 50%;
  transform: translateX(-50%);
  list-style: none;
  display: flex;
  gap: 6px;
  z-index: 5;
}
.carousel-indicators li {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  border: 1px solid #fff;
  background: transparent;
  cursor: pointer;
}
.carousel-indicators li.active { background: #fff; }

/* ---------- Faixa de contactos (verde) ---------- */
.top-contact-detail-section {
  background: var(--primary);
  padding: 20px 0;
}
.top-contact-detail-section .row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}
.contact-area .media { display: flex; align-items: flex-start; }
.contact-area .contact-icon {
  color: var(--white);
  font-size: 45px;
  line-height: 45px;
  margin-right: 20px;
  flex-shrink: 0;
}
.contact-area h6 {
  color: var(--white);
  font-size: 14px;
  font-weight: 600;
  margin: 0 0 7px;
}
.contact-area h4 {
  color: var(--white);
  font-size: 20px;
  font-weight: 600;
  margin: 0;
}
.contact-area h4 a { color: var(--white); }
.contact-area h4 a:hover { color: var(--dark); }

/* ---------- Secção de serviços ---------- */
.service-section { padding: 80px 0 30px; }
.section-heading-title {
  text-align: center;
  margin-bottom: 60px;
}
.section-heading-title h1 {
  font-size: 36px;
  font-weight: 400;
  color: var(--heading);
}
.service-section .row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 30px;
}
.service-area { padding-bottom: 45px; }
.service-area .media { display: flex; align-items: flex-start; }
.service-icon {
  margin-right: 30px;
  flex-shrink: 0;
}
.service-icon a {
  color: var(--primary);
  font-size: 40px;
  line-height: 40px;
}
.service-icon a:hover { color: var(--primary-dark); }
.service-area h3 {
  font-size: 20px;
  font-weight: 600;
  margin: 0 0 10px;
}
.service-area h3 a { color: var(--heading); }
.service-area h3 a:hover { color: var(--primary); }

/* ---------- Callout ---------- */
.callout-section { background: #cccccc; }
.callout-section .overlay {
  background: rgba(0, 0, 0, 0.7);
  padding: 80px 0;
}
.callout-section h1 {
  color: var(--white);
  font-size: 36px;
  font-weight: 400;
  margin-bottom: 25px;
}
.callout-btn2 {
  display: inline-block;
  background: var(--primary);
  color: var(--white);
  font-size: 20px;
  padding: 14px 35px;
  border-radius: 3px;
}
.callout-btn2:hover { background: var(--primary-dark); color: var(--white); }

/* ---------- Cabeçalho das páginas interiores ---------- */
.page-title-section { background: var(--primary); }
.page-title-section .overlay { padding: 40px 0; }
.page-title-section .row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
}
.page-title h1 {
  color: var(--white);
  font-size: 36px;
  font-weight: 400;
}
.page-breadcrumb {
  list-style: none;
  display: flex;
  color: var(--white);
  font-size: 15px;
}
.page-breadcrumb a { color: var(--white); }
.page-breadcrumb a:hover { color: var(--dark); }
.page-breadcrumb li.active { color: rgba(255,255,255,.85); }

/* ---------- Conteúdo das páginas ---------- */
.page-builder { padding: 60px 0; }

/* ---------- Formulários ---------- */
.form-wrap { max-width: 760px; margin: 0 auto; }
fieldset {
  border: none;
  border-top: 2px solid var(--primary);
  margin-bottom: 30px;
  padding-top: 18px;
}
legend {
  padding-right: 14px;
  font-weight: 700;
  color: var(--heading);
  font-size: 17px;
}
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.form-group { margin-bottom: 16px; }
.form-group label {
  display: block;
  font-weight: 600;
  color: var(--heading);
  font-size: 14px;
  margin-bottom: 6px;
}
.required::after { content: " *"; color: #d33; }
input[type="text"], input[type="tel"], input[type="email"], select, textarea {
  width: 100%;
  padding: 10px 14px;
  border: 1px solid #d7d7d7;
  border-radius: 3px;
  font-size: 15px;
  font-family: inherit;
  color: var(--heading);
  background: #fff;
}
input:focus, select:focus, textarea:focus {
  outline: none;
  border-color: var(--primary);
}
.radio-group { display: flex; gap: 26px; }
.radio-group label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 400;
  color: var(--text);
  cursor: pointer;
}
input[type="radio"], input[type="checkbox"] { accent-color: var(--primary); width: 17px; height: 17px; }
.field-error {
  display: none;
  color: #d33;
  font-size: 13px;
  margin-top: 4px;
}
.form-group.invalid .field-error { display: block; }
.form-group.invalid input, .form-group.invalid select, .form-group.invalid textarea { border-color: #d33; }
.form-note { font-size: 13px; font-style: italic; margin: 6px 0 22px; }
.btn-submit {
  display: inline-block;
  background: var(--primary);
  color: var(--white);
  font-size: 15px;
  font-weight: 600;
  padding: 12px 30px;
  border: none;
  border-radius: 3px;
  cursor: pointer;
}
.btn-submit:hover { background: var(--primary-dark); }
.form-success {
  display: none;
  background: #eef6df;
  border: 1px solid var(--primary);
  color: #4d6a15;
  border-radius: 3px;
  padding: 16px 20px;
  margin-bottom: 24px;
}
.form-success.show { display: block; }
.hp-field {
  position: absolute !important;
  left: -9999px !important;
  width: 1px !important;
  height: 1px !important;
  opacity: 0;
}

/* ---------- Regulamento ---------- */
.doc-box { max-width: 860px; margin: 0 auto; }
.doc-box h3 { margin: 26px 0 10px; font-size: 20px; font-weight: 600; }
.doc-box ol { margin: 0 0 10px 22px; }
.doc-box li { margin-bottom: 6px; }
.doc-download {
  display: flex;
  align-items: center;
  gap: 16px;
  background: #f5f5f5;
  border-radius: 3px;
  padding: 20px;
  margin-bottom: 34px;
}
.doc-download .fa {
  color: var(--primary);
  font-size: 40px;
}

/* ---------- Contactos ---------- */
.contact-layout {
  display: grid;
  grid-template-columns: 1fr 1.4fr;
  gap: 40px;
  align-items: start;
}
.contact-card ul { list-style: none; }
.contact-card li {
  display: flex;
  gap: 16px;
  align-items: flex-start;
  padding: 14px 0;
  border-bottom: 1px solid #f0f0f0;
}
.contact-card li:last-child { border-bottom: none; }
.contact-card .fa {
  color: var(--primary);
  font-size: 28px;
  width: 34px;
  text-align: center;
  flex-shrink: 0;
  margin-top: 4px;
}
.contact-card h4 { font-size: 16px; font-weight: 600; }
.map-placeholder {
  margin-top: 24px;
  border-radius: 3px;
  overflow: hidden;
  border: 1px solid var(--border);
}

/* ---------- Rodapé ---------- */
.footer-copyright-section {
  background: var(--white);
  border-top: 1px solid var(--border);
  color: var(--text);
  font-size: 15px;
}
.footer-copyright-section .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
}
.footer-copyright { padding: 30px 0; }
.footer-contact-social {
  list-style: none;
  display: flex;
  gap: 14px;
}
.footer-contact-social a {
  color: #727272;
  font-size: 15px;
}
.footer-contact-social a:hover { color: var(--primary); }

/* ---------- Voltar ao topo ---------- */
#toTop {
  position: fixed;
  right: 22px;
  bottom: 22px;
  width: 42px;
  height: 42px;
  border-radius: 3px;
  border: none;
  background: var(--primary);
  color: #fff;
  font-size: 18px;
  cursor: pointer;
  display: none;
  z-index: 90;
}
#toTop.show { display: block; }
#toTop:hover { background: var(--primary-dark); }

/* ---------- Responsivo ---------- */
@media (max-width: 991px) {
  .top-contact-detail-section .row,
  .service-section .row { grid-template-columns: 1fr; }
  .contact-layout { grid-template-columns: 1fr; }
  .slide-text-bg1 h2 { font-size: 22px; margin-bottom: 8px; }
  .slide-caption { top: 25%; }
}

@media (max-width: 768px) {
  .nav-toggle { display: block; }
  .nav-menu {
    display: none;
    width: 100%;
    flex-direction: column;
    align-items: stretch;
    padding: 10px 0;
  }
  .nav-menu.open { display: flex; }
  .form-row { grid-template-columns: 1fr; }
  .slide-btn-sm { font-size: 11px; padding: 6px 14px; }
  .slide-text-bg1 h2 { font-size: 16px; }
  .page-title-section .row { justify-content: flex-start; }
}

/* ---------- Custo das chamadas (Decreto-Lei n.º 59/2021) ---------- */
.call-cost {
  display: block;
  font-size: 12px;
  font-weight: 400;
  font-style: normal;
  line-height: 1.4;
  color: var(--text);
}
/* Sobre a faixa verde os textos são brancos */
.top-contact-detail-section .call-cost { color: rgba(255, 255, 255, .8); }

/* ---------- Rodapé: ligações legais ---------- */
.footer-legal {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 2px 18px;
  padding: 30px 0;
  margin: 0 auto;
}
.footer-legal a { color: #727272; font-size: 14px; }
.footer-legal a:hover { color: var(--primary); }

/* ---------- Consentimento nos formulários ---------- */
.checkbox-label {
  display: flex !important;
  align-items: flex-start;
  gap: 10px;
  font-weight: 400 !important;
  color: var(--text) !important;
  cursor: pointer;
}
.checkbox-label input[type="checkbox"] { flex-shrink: 0; margin-top: 3px; }
.checkbox-label .req-star { color: #d33; }

/* ---------- Páginas legais ---------- */
.legal-box { max-width: 860px; margin: 0 auto; }
.legal-box h2 { margin: 30px 0 10px; font-size: 22px; font-weight: 700; }
.legal-box h3 { margin: 22px 0 8px; font-size: 17px; font-weight: 600; }
.legal-box p { margin-bottom: 12px; }
.legal-box ul, .legal-box ol { margin: 0 0 12px 22px; }
.legal-box li { margin-bottom: 6px; }
.legal-updated { font-size: 13px; font-style: italic; margin-bottom: 26px; }

/* ---------- Banner de cookies ---------- */
.cookie-banner {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 200;
  background: var(--dark);
  color: rgba(255,255,255,.85);
  padding: 18px 0;
  box-shadow: 0 -3px 12px rgba(0,0,0,.25);
}
.cookie-banner .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
}
.cookie-banner p { margin: 0; font-size: 14px; flex: 1 1 420px; }
.cookie-banner a { color: var(--primary); text-decoration: underline; }
.cookie-actions { display: flex; gap: 10px; flex-shrink: 0; }
.cookie-btn {
  font-family: inherit;
  font-size: 14px;
  font-weight: 600;
  padding: 9px 22px;
  border-radius: 3px;
  border: none;
  cursor: pointer;
}
.cookie-btn.accept { background: var(--primary); color: var(--white); }
.cookie-btn.accept:hover { background: var(--primary-dark); }
.cookie-btn.reject {
  background: transparent;
  color: rgba(255,255,255,.85);
  border: 1px solid rgba(255,255,255,.4);
}
.cookie-btn.reject:hover { border-color: #fff; color: #fff; }

/* ---------- Mapa: consentimento para carregar o Google Maps ---------- */
.map-consent {
  background: #f5f5f5;
  padding: 46px 24px;
  text-align: center;
}
.map-consent .fa {
  color: var(--primary);
  font-size: 40px;
  margin-bottom: 12px;
}
.map-consent p { max-width: 440px; margin: 0 auto 18px; font-size: 14px; }
.map-placeholder iframe[data-src] { display: none; }

/* ---------- Responsivo (blocos acrescentados acima) ---------- */
@media (max-width: 768px) {
  .footer-copyright-section .container { justify-content: center; text-align: center; }
  .footer-copyright { padding: 24px 0 8px; }
  .footer-legal { justify-content: center; padding: 0 0 14px; }
  .footer-contact-social { padding-bottom: 24px; }
  .cookie-banner .container { flex-direction: column; align-items: stretch; }
  .cookie-actions { justify-content: flex-end; }
}
