/* ===========================================================
   Quinta da Cerca do Colégio — Alcobaça
   Shared stylesheet
   =========================================================== */

:root{
  --azulejo: #0c3688;
  --azulejo-dark: #082a68;
  --azulejo-light: #4a6bb0;
  --ink: #3a3a3a;
  --ink-soft: #666666;
  --cream: #fdfbf7;
  --paper: #ffffff;
  --line: #e4e0d8;
  --overlay: rgba(20, 20, 20, 0.5);
  --shadow: 0 10px 30px rgba(12, 54, 136, 0.08);

  --font-display: "Playfair Display", "Didot", Georgia, serif;
  --font-body: "Jost", "Helvetica Neue", Helvetica, Arial, sans-serif;

  --container: 1180px;
}

*,
*::before,
*::after{ box-sizing: border-box; }

html{ scroll-behavior: smooth; }

body{
  margin: 0;
  font-family: var(--font-body);
  font-weight: 300;
  color: var(--ink);
  background: var(--cream);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

img{ max-width: 100%; display: block; }

a{ color: inherit; text-decoration: none; }

h1, h2, h3, h4{
  font-family: var(--font-display);
  font-weight: 700;
  color: #1f1f1f;
  margin: 0 0 .5em;
  letter-spacing: .01em;
}

.eyebrow{
  font-family: var(--font-display);
  font-style: italic;
  font-weight: 400;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--azulejo);
  font-size: .95rem;
  display: block;
  margin-bottom: .6em;
}

.container{
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 24px;
}

.btn{
  display: inline-block;
  padding: .95em 2.2em;
  border: 1px solid var(--azulejo);
  color: var(--azulejo);
  background: transparent;
  font-family: var(--font-body);
  font-size: .82rem;
  letter-spacing: .14em;
  text-transform: uppercase;
  cursor: pointer;
  transition: background .25s ease, color .25s ease;
}
.btn:hover{ background: var(--azulejo); color: #fff; }
.btn-solid{ background: var(--azulejo); color: #fff; }
.btn-solid:hover{ background: var(--azulejo-dark); }
.btn-light{ border-color: rgba(255,255,255,.8); color: #fff; }
.btn-light:hover{ background: #fff; color: var(--azulejo); }

/* ---------- Top utility bar ---------- */
.topbar{
  background: var(--azulejo);
  color: #fff;
  font-size: .78rem;
  letter-spacing: .04em;
}
.topbar .container{
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 8px;
  padding-bottom: 8px;
  flex-wrap: wrap;
  gap: 8px;
}
.topbar a{ color: #fff; opacity: .9; }
.topbar a:hover{ opacity: 1; text-decoration: underline; }
.topbar .social{ display: flex; gap: 14px; align-items: center; }
.topbar svg{ width: 15px; height: 15px; fill: #fff; }

/* ---------- Header / nav ---------- */
.site-header{
  background: var(--paper);
  position: sticky;
  top: 0;
  z-index: 50;
  border-bottom: 1px solid var(--line);
}
.site-header .container{
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 10px;
  padding-bottom: 10px;
}
.brand{
  display: flex;
  align-items: center;
  gap: 12px;
}
.brand img{ width: 56px; height: 56px; }
.brand-text{
  font-family: var(--font-display);
  line-height: 1.1;
}
.brand-text .big{
  display: block;
  font-size: 1.15rem;
  font-weight: 700;
  letter-spacing: .04em;
}
.brand-text .small{
  display: block;
  font-size: .68rem;
  font-style: italic;
  letter-spacing: .1em;
  color: var(--ink-soft);
}

.nav{ display: flex; align-items: center; gap: 2px; }
.nav > ul{
  list-style: none;
  display: flex;
  margin: 0; padding: 0;
  gap: 6px;
}
.nav > ul > li{ position: relative; }
.nav a{
  display: block;
  padding: 10px 16px;
  font-size: .8rem;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--ink);
}
.nav > ul > li > a:hover,
.nav > ul > li.active > a{ color: var(--azulejo); }

.has-dropdown{ position: relative; }
.dropdown{
  position: absolute;
  top: 100%;
  left: 0;
  min-width: 220px;
  background: var(--paper);
  box-shadow: var(--shadow);
  border-top: 2px solid var(--azulejo);
  padding: 6px 0;
  opacity: 0;
  visibility: hidden;
  transform: translateY(6px);
  transition: all .2s ease;
  list-style: none;
  margin: 0;
}
.has-dropdown:hover .dropdown,
.has-dropdown:focus-within .dropdown{
  opacity: 1; visibility: visible; transform: translateY(0);
}
.dropdown a{ padding: 10px 20px; white-space: nowrap; }
.dropdown a:hover{ background: var(--cream); color: var(--azulejo); }

.nav-toggle{
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 6px;
}
.nav-toggle span{
  display: block;
  width: 24px;
  height: 2px;
  background: var(--ink);
  margin: 5px 0;
  transition: transform .2s ease, opacity .2s ease;
}

/* ---------- Hero ---------- */
.hero{
  position: relative;
  min-height: 86vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  color: #fff;
  background-size: cover;
  background-position: center;
  overflow: hidden;
}
.hero::after{
  content: "";
  position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(10,10,10,.35) 0%, rgba(10,10,10,.5) 55%, rgba(10,10,10,.65) 100%);
}
.hero-content{ position: relative; z-index: 2; padding: 0 20px; max-width: 760px; }
.hero-content .eyebrow{ color: #fff; opacity: .9; }
.hero h1{
  color: #fff;
  font-size: clamp(2.4rem, 6vw, 4.2rem);
  line-height: 1.05;
  margin-bottom: .3em;
}
.hero h1 small{
  display: block;
  font-size: .4em;
  font-style: italic;
  font-weight: 400;
  letter-spacing: .25em;
  text-transform: uppercase;
  margin-bottom: .2em;
}
.hero p{
  font-size: 1.08rem;
  font-weight: 300;
  max-width: 600px;
  margin: 0 auto 1.6em;
  opacity: .95;
}

.page-hero{
  position: relative;
  min-height: 42vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  color: #fff;
  background-size: cover;
  background-position: center;
}
.page-hero::after{ content:""; position:absolute; inset:0; background: rgba(10,10,10,.48); }
.page-hero-content{ position: relative; z-index: 2; }
.page-hero h1{ color: #fff; font-size: clamp(2rem, 5vw, 3rem); margin: 0; }
.breadcrumb{
  position: relative; z-index: 2;
  font-size: .78rem; letter-spacing: .12em; text-transform: uppercase;
  margin-top: .6em; opacity: .85;
}
.breadcrumb a:hover{ text-decoration: underline; }

/* ---------- Sections ---------- */
section{ padding: 90px 0; }
.section-alt{ background: var(--paper); }
.section-tight{ padding: 60px 0; }

.section-head{ text-align: center; max-width: 680px; margin: 0 auto 50px; }
.section-head p{ color: var(--ink-soft); }

.split{
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 70px;
  align-items: center;
}
.split.reverse .split-media{ order: 2; }
.split-media img{ width: 100%; height: 480px; object-fit: cover; box-shadow: var(--shadow); }
.split-text p{ color: var(--ink-soft); }

/* ---------- Event tiles (home) ---------- */
.tiles{
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 2px;
  background: var(--line);
}
.tile{
  position: relative;
  aspect-ratio: 3/4;
  overflow: hidden;
  display: block;
  color: #fff;
}
.tile img{
  width: 100%; height: 100%; object-fit: cover;
  transition: transform .5s ease;
}
.tile:hover img{ transform: scale(1.06); }
.tile::after{ content:""; position:absolute; inset:0; background: linear-gradient(180deg, rgba(0,0,0,0) 40%, rgba(0,0,0,.75) 100%); }
.tile span{
  position: absolute; left: 0; right: 0; bottom: 22px; z-index: 2;
  text-align: center;
  font-family: var(--font-display);
  font-size: 1.15rem;
  letter-spacing: .03em;
}

/* ---------- Event cards (eventos page) ---------- */
.cards{
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 34px;
}
.card{
  background: var(--paper);
  box-shadow: var(--shadow);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
.card img{ height: 280px; object-fit: cover; width: 100%; }
.card-body{ padding: 32px; }
.card-body p{ color: var(--ink-soft); }

/* ---------- Gallery ---------- */
.gallery{
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}
.gallery figure{ margin: 0; overflow: hidden; cursor: zoom-in; background: #eee; }
.gallery img{
  width: 100%; height: 260px; object-fit: cover;
  transition: transform .5s ease;
}
.gallery figure:hover img{ transform: scale(1.07); }

/* lightbox */
.lightbox{
  position: fixed; inset: 0; z-index: 200;
  background: rgba(10,10,10,.92);
  display: none;
  align-items: center; justify-content: center;
  padding: 30px;
}
.lightbox.open{ display: flex; }
.lightbox img{ max-width: 100%; max-height: 86vh; box-shadow: 0 20px 60px rgba(0,0,0,.5); }
.lightbox-close{
  position: absolute; top: 24px; right: 30px;
  color: #fff; font-size: 2rem; background: none; border: none; cursor: pointer; line-height: 1;
}
.lightbox-nav{
  position: absolute; top: 50%; transform: translateY(-50%);
  background: rgba(255,255,255,.1); border: none; color: #fff;
  width: 48px; height: 48px; font-size: 1.4rem; cursor: pointer;
}
.lightbox-nav:hover{ background: rgba(255,255,255,.22); }
.lightbox-prev{ left: 20px; }
.lightbox-next{ right: 20px; }

/* ---------- FAQ accordion ---------- */
.faq-groups{ max-width: 820px; margin: 0 auto; }
.faq-group-title{
  font-family: var(--font-display);
  font-style: italic;
  color: var(--azulejo);
  font-size: 1.15rem;
  margin: 40px 0 14px;
}
.faq-group-title:first-child{ margin-top: 0; }
.faq-item{ border-bottom: 1px solid var(--line); }
.faq-q{
  width: 100%;
  text-align: left;
  background: none;
  border: none;
  padding: 20px 4px;
  font-family: var(--font-body);
  font-size: 1.02rem;
  color: var(--ink);
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
}
.faq-q .plus{
  flex: none;
  width: 20px; height: 20px;
  position: relative;
}
.faq-q .plus::before,
.faq-q .plus::after{
  content: ""; position: absolute; background: var(--azulejo);
  transition: transform .25s ease;
}
.faq-q .plus::before{ left: 0; top: 50%; width: 100%; height: 1.5px; transform: translateY(-50%); }
.faq-q .plus::after{ top: 0; left: 50%; height: 100%; width: 1.5px; transform: translateX(-50%); }
.faq-item.open .faq-q .plus::after{ transform: translateX(-50%) rotate(90deg); opacity: 0; }
.faq-a{
  max-height: 0;
  overflow: hidden;
  transition: max-height .3s ease;
  color: var(--ink-soft);
  padding: 0 4px;
}
.faq-a p{ margin: 0 0 18px; }
.faq-item.open .faq-a{ max-height: 400px; }

/* ---------- Stats / capacity ---------- */
.stats{
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  text-align: center;
}
.stat{ padding: 30px 20px; background: var(--paper); box-shadow: var(--shadow); }
.stat .num{ font-family: var(--font-display); font-size: 2.4rem; color: var(--azulejo); display: block; }
.stat .label{ font-size: .85rem; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-soft); }

/* ---------- Services grid ---------- */
.services{
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 36px;
}
.service h3{ font-size: 1.15rem; display: flex; align-items: center; gap: 10px; }
.service h3 svg{ width: 22px; height: 22px; fill: var(--azulejo); flex: none; }
.service p{ color: var(--ink-soft); margin: 0; }

/* ---------- Band / CTA ---------- */
.band{
  background: var(--azulejo);
  color: #fff;
  text-align: center;
}
.band h2{ color: #fff; }
.band p{ color: rgba(255,255,255,.85); max-width: 560px; margin: 0 auto 1.8em; }

.band-photo{
  position: relative;
  color: #fff;
  text-align: center;
  background-size: cover;
  background-position: center;
}
.band-photo::after{ content:""; position:absolute; inset:0; background: rgba(8,26,70,.72); }
.band-photo .container{ position: relative; z-index: 2; }
.band-photo h2{ color: #fff; }
.band-photo p{ color: rgba(255,255,255,.85); max-width: 560px; margin: 0 auto 1.8em; }

/* ---------- Location list ---------- */
.loc-list{ list-style: none; margin: 0; padding: 0; }
.loc-list li{
  display: flex; justify-content: space-between; gap: 12px;
  padding: 14px 0; border-bottom: 1px solid var(--line);
  font-size: .95rem;
}
.loc-list li span:first-child{ font-family: var(--font-display); font-style: italic; }
.loc-list li span:last-child{ color: var(--ink-soft); }

.place-grid{
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}
.place{ text-align: center; }
.place img{ width: 100%; height: 170px; object-fit: cover; margin-bottom: 10px; }
.place span{ font-family: var(--font-display); font-style: italic; font-size: 1rem; }

/* ---------- Contact ---------- */
.contact-grid{
  display: grid;
  grid-template-columns: .9fr 1.1fr;
  gap: 60px;
}
.contact-info h3{ font-size: 1.2rem; margin-bottom: .2em; }
.contact-info .row{ margin-bottom: 26px; }
.contact-info .row .label{
  font-size: .75rem; letter-spacing: .12em; text-transform: uppercase; color: var(--azulejo);
  display: block; margin-bottom: 4px;
}
.contact-info .social-row{ display: flex; gap: 14px; margin-top: 10px; }
.contact-info .social-row a{
  width: 38px; height: 38px; border: 1px solid var(--line);
  display: flex; align-items: center; justify-content: center;
}
.contact-info .social-row svg{ width: 16px; height: 16px; fill: var(--azulejo); }

form.event-form{
  background: var(--paper);
  padding: 40px;
  box-shadow: var(--shadow);
}
.form-row{ display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.field{ margin-bottom: 18px; }
.field label{
  display: block; font-size: .75rem; letter-spacing: .08em; text-transform: uppercase;
  color: var(--ink-soft); margin-bottom: 6px;
}
.field input,
.field select,
.field textarea{
  width: 100%;
  border: none;
  border-bottom: 1px solid var(--line);
  background: transparent;
  padding: 10px 2px;
  font-family: var(--font-body);
  font-size: .95rem;
  color: var(--ink);
}
.field input:focus,
.field select:focus,
.field textarea:focus{ outline: none; border-color: var(--azulejo); }
.field textarea{ resize: vertical; min-height: 90px; }
.form-note{ font-size: .8rem; color: var(--ink-soft); margin-top: 14px; }
.form-success{
  display: none;
  background: #eef2fb;
  border-left: 3px solid var(--azulejo);
  padding: 16px 20px;
  margin-bottom: 20px;
  font-size: .92rem;
}
.form-success.show{ display: block; }

/* ---------- Footer ---------- */
.site-footer{
  background: #16294f;
  color: rgba(255,255,255,.8);
  padding: 60px 0 24px;
  font-size: .9rem;
}
.footer-grid{
  display: grid;
  grid-template-columns: 1.3fr 1fr 1fr;
  gap: 40px;
  padding-bottom: 36px;
  border-bottom: 1px solid rgba(255,255,255,.12);
}
.footer-brand{ display: flex; gap: 14px; align-items: flex-start; }
.footer-brand img{ width: 50px; height: 50px; }
.footer-brand h4{ color: #fff; font-size: 1rem; margin-bottom: .2em; }
.footer-brand p{ margin: 0; opacity: .75; font-size: .85rem; }
.site-footer h5{
  color: #fff; font-family: var(--font-body); font-weight: 400;
  letter-spacing: .1em; text-transform: uppercase; font-size: .78rem; margin-bottom: 16px;
}
.site-footer ul{ list-style: none; margin: 0; padding: 0; }
.site-footer li{ margin-bottom: 10px; }
.site-footer a:hover{ color: #fff; text-decoration: underline; }
.footer-social{ display: flex; gap: 12px; margin-top: 16px; }
.footer-social a{
  width: 34px; height: 34px; border: 1px solid rgba(255,255,255,.25);
  display: flex; align-items: center; justify-content: center;
}
.footer-social svg{ width: 15px; height: 15px; fill: #fff; }
.footer-bottom{
  display: flex; justify-content: space-between; align-items: center;
  padding-top: 22px; font-size: .78rem; opacity: .6; flex-wrap: wrap; gap: 10px;
}

/* ---------- Responsive ---------- */
@media (max-width: 980px){
  .split{ grid-template-columns: 1fr; gap: 36px; }
  .split.reverse .split-media{ order: 0; }
  .tiles{ grid-template-columns: repeat(2, 1fr); }
  .cards{ grid-template-columns: 1fr; }
  .gallery{ grid-template-columns: repeat(2, 1fr); }
  .services{ grid-template-columns: 1fr 1fr; }
  .stats{ grid-template-columns: 1fr; }
  .contact-grid{ grid-template-columns: 1fr; gap: 40px; }
  .footer-grid{ grid-template-columns: 1fr; gap: 28px; }
  .place-grid{ grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 760px){
  .nav-toggle{ display: block; }
  .nav{
    position: fixed; top: 77px; left: 0; right: 0; bottom: 0;
    background: var(--paper);
    flex-direction: column; align-items: stretch;
    padding: 10px 0;
    transform: translateX(100%);
    transition: transform .3s ease;
    overflow-y: auto;
  }
  .nav.open{ transform: translateX(0); }
  .nav > ul{ flex-direction: column; gap: 0; width: 100%; }
  .nav a{ padding: 14px 24px; border-bottom: 1px solid var(--line); }
  .dropdown{ position: static; box-shadow: none; border-top: none; opacity:1; visibility:visible; transform:none; display:none; }
  .has-dropdown.open .dropdown{ display: block; }
  .dropdown a{ padding-left: 40px; }
  .form-row{ grid-template-columns: 1fr; }
  .services{ grid-template-columns: 1fr; }
  .gallery{ grid-template-columns: repeat(2, 1fr); }
  .place-grid{ grid-template-columns: 1fr 1fr; }
  section{ padding: 60px 0; }
}
