/*
Theme Name: Gabriel Fernandes
Theme URI: https://gabriel-fernandes.com
Author: Gabriel Fernandes
Author URI: https://gabriel-fernandes.com
Description: Tema institucional para o site do Gabriel Fernandes — porta de entrada para o conteúdo, ebook, curso e produtos do canal sobre comunicação, conflitos e pessoas difíceis. Construído sobre a identidade visual do canal (verde-escuro, dourado e bege) com tipografia Playfair Display + Lato.
Version: 1.0
Requires at least: 6.0
Requires PHP: 7.4
Tested up to: 6.6
Text Domain: gabriel-fernandes
*/

:root{
  --bg: #F5F0E8;
  --text: #1A1A1A;
  --green: #2C6E49;
  --green-dark: #1f4f35;
  --gold: #C9A84C;
  --white: #FFFFFF;
  --max: 1140px;
}

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

html{ scroll-behavior:smooth; }

body{
  background: var(--bg);
  color: var(--text);
  font-family:'Lato', sans-serif;
  line-height:1.6;
  font-size:16px;
}

h1, h2, h3, .brand{
  font-family:'Playfair Display', serif;
  color: var(--green);
  line-height:1.2;
}

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

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

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

/* ---------- Header ---------- */
header{
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(245, 240, 232, 0.92);
  backdrop-filter: blur(6px);
  border-bottom: 1px solid rgba(44, 110, 73, 0.15);
}

/* keep header below the WP admin bar when logged in */
.admin-bar header{ top: 32px; }
@media screen and (max-width: 782px){
  .admin-bar header{ top: 46px; }
}

.nav{
  display:flex;
  align-items:center;
  justify-content:space-between;
  padding: 18px 24px;
  max-width: var(--max);
  margin:0 auto;
}

.brand{
  font-size: 1.4rem;
  font-weight:700;
  letter-spacing: 0.5px;
  display:flex;
  align-items:center;
  gap:10px;
}
.brand span{ color: var(--gold); }
.brand img{ max-height: 100px; }

.nav-links{
  display:flex;
  align-items:center;
  gap: 32px;
  list-style:none;
}

.nav-links li{ position:relative; }

.nav-links a{
  font-weight:500;
  font-size: 0.98rem;
  color: var(--text);
  position:relative;
  padding: 4px 0;
  transition: color .2s ease;
  display:inline-block;
}
.nav-links a:hover,
.nav-links .current-menu-item > a{ color: var(--green); }
.nav-links a::after{
  content:"";
  position:absolute;
  left:0; bottom:-2px;
  width:0; height:2px;
  background: var(--gold);
  transition: width .25s ease;
}
.nav-links a:hover::after,
.nav-links .current-menu-item > a::after{ width:100%; }

/* nested submenus (if added later in the WP menu) */
.nav-links ul{
  list-style:none;
  position:absolute;
  top: 100%;
  left:0;
  background: var(--white);
  min-width: 200px;
  padding: 10px 0;
  border-radius: 10px;
  box-shadow: 0 12px 30px rgba(44,110,73,0.15);
  display:none;
}
.nav-links li:hover > ul{ display:block; }
.nav-links ul li{ padding: 0 18px; }
.nav-links ul a::after{ display:none; }
.nav-links ul a{ display:block; padding: 8px 0; }

.nav-actions{ display:flex; align-items:center; gap:16px; }

.btn{
  display:inline-block;
  font-family:'Lato', sans-serif;
  font-weight:700;
  font-size: 0.95rem;
  padding: 11px 26px;
  border-radius: 999px;
  border: 2px solid transparent;
  cursor:pointer;
  transition: all .2s ease;
}
.btn-primary{
  background: var(--green);
  color: var(--white);
  border-color: var(--green);
}
.btn-primary:hover{
  background: var(--green-dark);
  border-color: var(--green-dark);
}
.btn-ghost{
  background: transparent;
  color: var(--green);
  border-color: var(--green);
}
.btn-ghost:hover{
  background: var(--green);
  color: var(--white);
}
.btn-gold{
  background: var(--gold);
  color: var(--text);
  border-color: var(--gold);
}
.btn-gold:hover{
  background: #b6953e;
  border-color: #b6953e;
}

.menu-toggle{
  display:none;
  background:none;
  border:none;
  font-size: 1.6rem;
  color: var(--green);
  cursor:pointer;
}

/* ---------- Hero ---------- */
.hero{
  padding: 110px 0 90px;
}
.hero .container{
  display:grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 56px;
  align-items:center;
}
.eyebrow{
  display:inline-block;
  font-weight:700;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  font-size: 0.78rem;
  color: var(--gold);
  background: rgba(201, 168, 76, 0.15);
  padding: 6px 16px;
  border-radius: 999px;
  margin-bottom: 22px;
}
.hero h1{
  font-size: 2.9rem;
  font-weight:700;
  margin-bottom: 22px;
}
.hero h1 em{
  font-style: normal;
  color: var(--gold);
}
.hero p.lead{
  font-size: 1.15rem;
  max-width: 540px;
  margin-bottom: 32px;
  color: #3a3a3a;
}
.hero-actions{ display:flex; gap:16px; flex-wrap:wrap; }

.hero-card{
  background: var(--white);
  border-radius: 22px;
  padding: 40px 34px;
  box-shadow: 0 18px 50px rgba(44, 110, 73, 0.12);
  border: 1px solid rgba(44, 110, 73, 0.08);
}
.hero-card .quote-mark{
  font-family:'Playfair Display', serif;
  font-size: 3.2rem;
  color: var(--gold);
  line-height: 0.6;
}
.hero-card p{
  font-family:'Playfair Display', serif;
  font-size: 1.35rem;
  color: var(--green);
  margin: 14px 0 18px;
}
.hero-card .author{
  font-weight:700;
  font-size: 0.95rem;
  color: var(--text);
}
.hero-card .author span{
  display:block;
  font-weight:400;
  font-size: 0.85rem;
  color: #6b6b6b;
}

/* ---------- Stats strip ---------- */
.stats{
  background: var(--green);
  color: var(--white);
  padding: 34px 0;
}
.stats .container{
  display:flex;
  flex-wrap:wrap;
  justify-content: space-between;
  gap: 24px;
  text-align:center;
}
.stat{ flex:1; min-width: 140px; }
.stat .num{
  font-family:'Playfair Display', serif;
  font-size: 2rem;
  font-weight:700;
  color: var(--gold);
}
.stat .label{
  font-size: 0.88rem;
  letter-spacing: 0.4px;
  opacity: 0.9;
}

/* ---------- Section generic ---------- */
section{ padding: 90px 0; }
.section-head{
  max-width: 640px;
  margin: 0 auto 56px;
  text-align:center;
}
.section-head .eyebrow{ display:inline-block; }
.section-head h2{
  font-size: 2.2rem;
  margin: 14px 0 16px;
}
.section-head p{
  color: #4a4a4a;
  font-size: 1.05rem;
}

/* ---------- About ---------- */
.about .container{
  display:grid;
  grid-template-columns: 0.85fr 1.15fr;
  gap: 60px;
  align-items:center;
}
.about-photo{
  background: linear-gradient(160deg, var(--green) 0%, var(--green-dark) 100%);
  border-radius: 24px;
  aspect-ratio: 4/5;
  display:flex;
  align-items:center;
  justify-content:center;
  color: rgba(255,255,255,0.65);
  font-family:'Playfair Display', serif;
  font-size: 1.1rem;
  text-align:center;
  padding: 24px;
  border: 6px solid var(--white);
  box-shadow: 0 20px 50px rgba(44,110,73,0.18);
  overflow:hidden;
}
.about-photo img{ width:100%; height:100%; object-fit:cover; border-radius: 18px; }
.about h2{ font-size: 2rem; margin-bottom: 18px; }
.about p{ margin-bottom: 16px; color:#3a3a3a; }
.about .pillars{
  display:grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-top: 28px;
}
.pillar{
  background: var(--white);
  border-radius: 14px;
  padding: 18px 20px;
  border-left: 4px solid var(--gold);
}
.pillar h4{
  font-family:'Playfair Display', serif;
  color: var(--green);
  font-size: 1.05rem;
  margin-bottom: 6px;
}
.pillar p{ font-size: 0.92rem; margin:0; color:#555; }

/* ---------- Products ---------- */
.products{ background: var(--white); }
.product-grid{
  display:grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
}
.product-card{
  background: var(--bg);
  border-radius: 20px;
  padding: 32px 28px;
  display:flex;
  flex-direction:column;
  gap: 14px;
  border: 1px solid rgba(44,110,73,0.1);
  transition: transform .25s ease, box-shadow .25s ease;
}
.product-card:hover{
  transform: translateY(-6px);
  box-shadow: 0 20px 40px rgba(44,110,73,0.14);
}
.product-card .tag{
  align-self:flex-start;
  font-size: 0.74rem;
  font-weight:700;
  letter-spacing: 0.5px;
  text-transform:uppercase;
  padding: 5px 14px;
  border-radius: 999px;
}
.tag-live{ background: rgba(44,110,73,0.15); color: var(--green); }
.tag-soon{ background: rgba(201,168,76,0.2); color: #8a6d1f; }
.product-card h3{ font-size: 1.35rem; }
.product-card p{ color:#555; font-size: 0.96rem; flex-grow:1; }
.product-card .cta{
  font-weight:700;
  color: var(--green);
  font-size: 0.92rem;
  display:inline-flex;
  align-items:center;
  gap: 6px;
}
.product-card .cta svg{ width:16px; height:16px; transition: transform .2s ease; }
.product-card:hover .cta svg{ transform: translateX(4px); }

/* ---------- Newsletter / CTA ---------- */
.cta-band{
  background: linear-gradient(135deg, var(--green) 0%, var(--green-dark) 100%);
  color: var(--white);
  border-radius: 28px;
  margin: 0 24px;
  padding: 60px 40px;
  text-align:center;
}
.cta-band-inner{ max-width: var(--max); margin:0 auto; }
.cta-band h2{ color: var(--white); font-size: 2rem; margin-bottom: 14px; }
.cta-band p{ color: rgba(255,255,255,0.85); max-width: 560px; margin: 30px auto 0; }
.cta-form{
  display:flex;
  justify-content:center;
  gap: 12px;
  flex-wrap:wrap;
}
.cta-form input{
  font-family:'Lato', sans-serif;
  padding: 13px 20px;
  border-radius: 999px;
  border: none;
  min-width: 280px;
  font-size: 0.96rem;
  color: var(--text);
}
.cta-form input:focus{ outline: 3px solid var(--gold); }

.form-message{
  display: none;
  margin-top: 28px;
  padding: 14px 28px;
  border-radius: 999px;
  font-size: 0.95rem;
  font-weight: 600;
  max-width: 480px;
  margin-left: auto;
  margin-right: auto;
}
.form-message--visible{ display: inline-block; }
.form-message--success{
  background: var(--gold);
  color: black !important;
}
.form-message--error{
  background: #C92A2A;
}

/* ---------- Footer ---------- */
footer{
  padding: 50px 0 30px;
  color: #555;
}
.footer-inner{
  display:flex;
  justify-content:space-between;
  align-items:center;
  flex-wrap:wrap;
  gap: 20px;
  border-top: 1px solid rgba(44,110,73,0.15);
  padding-top: 28px;
}
.footer-brand{ font-family:'Playfair Display', serif; color: var(--green); font-weight:700; }
.footer-links{ display:flex; gap:24px; list-style:none; flex-wrap:wrap; }
.footer-links a{ font-size: 0.9rem; color:#555; }
.footer-links a:hover{ color: var(--green); }
.footer-social{ display:flex; gap:14px; }
.footer-social a{
  width:38px; height:38px;
  border-radius:50%;
  background: var(--white);
  display:flex; align-items:center; justify-content:center;
  border: 1px solid rgba(44,110,73,0.15);
  color: var(--green);
  font-size: 0.85rem;
  font-weight:700;
}
.footer-social a:hover{ background: var(--green); color:var(--white); border-color:var(--green); }
.footer-bottom{
  text-align:center;
  font-size: 0.82rem;
  color:#888;
  margin-top: 24px;
}

/* ---------- Featured product card (ebook gratuito) ---------- */
.tag-free{ background: rgba(201,168,76,0.25); color: #7a5c10; }

.product-featured{
  grid-column: 1 / -1;
  background: linear-gradient(135deg, var(--green) 0%, var(--green-dark) 100%);
  border: none;
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
  padding: 38px 44px;
}
.product-featured:hover{
  transform: translateY(-4px);
  box-shadow: 0 24px 48px rgba(44,110,73,0.32);
}
.product-featured .tag-free{
  background: rgba(255,255,255,0.18);
  color: var(--white);
}
.product-featured h3{ color: var(--white); font-size: 1.5rem; }
.product-featured > p{ color: rgba(255,255,255,0.85); max-width: 560px; flex-grow: 1; }
.product-featured-action{ flex-shrink: 0; }

/* ---------- Popup ---------- */
.popup-overlay{
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.52);
  z-index: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  opacity: 0;
  pointer-events: none;
  transition: opacity .22s ease;
}
.popup-overlay.open{
  opacity: 1;
  pointer-events: auto;
}
.popup-card{
  background: var(--bg);
  border-radius: 24px;
  padding: 44px 40px;
  max-width: 460px;
  width: 100%;
  position: relative;
  box-shadow: 0 28px 64px rgba(0,0,0,0.22);
  transform: translateY(18px);
  transition: transform .22s ease;
}
.popup-overlay.open .popup-card{ transform: translateY(0); }
.popup-close{
  position: absolute;
  top: 16px; right: 20px;
  background: none;
  border: none;
  font-size: 1.4rem;
  color: #999;
  cursor: pointer;
  line-height: 1;
  padding: 4px 8px;
}
.popup-close:hover{ color: var(--text); }
.popup-eyebrow{
  display: inline-block;
  font-weight: 700;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  font-size: 0.74rem;
  color: var(--gold);
  background: rgba(201,168,76,0.15);
  padding: 5px 14px;
  border-radius: 999px;
  margin-bottom: 14px;
}
.popup-card h3{ font-size: 1.4rem; margin-bottom: 8px; }
.popup-desc{ color: #555; margin-bottom: 24px; font-size: 0.97rem; }
.popup-form{ display: flex; flex-direction: column; gap: 12px; }
.popup-form input{
  font-family: 'Lato', sans-serif;
  padding: 13px 20px;
  border-radius: 999px;
  border: 2px solid rgba(44,110,73,0.2);
  font-size: 0.96rem;
  color: var(--text);
  background: var(--white);
  width: 100%;
}
.popup-form input:focus{ outline: none; border-color: var(--green); }
.popup-fine{ font-size: 0.78rem; color: #888; text-align: center; }
.popup-msg{
  display: none;
  margin-top: 12px;
  font-size: 0.9rem;
  font-weight: 600;
  text-align: center;
  color: var(--green);
}
.popup-msg.visible{ display: block; }
.popup-msg.error{ color: #c0392b; }

/* ---------- Download page ---------- */
.ebook-download-body{
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 60px 24px;
}
.ebook-download-card{
  background: var(--white);
  border-radius: 24px;
  padding: 56px 48px;
  max-width: 520px;
  width: 100%;
  box-shadow: 0 20px 60px rgba(44,110,73,0.12);
  border: 1px solid rgba(44,110,73,0.08);
}
.ebook-download-card .check{ font-size: 3rem; margin-bottom: 16px; }
.ebook-download-card h1{ font-size: 1.8rem; margin-bottom: 12px; }
.ebook-download-card p{ color: #555; margin-bottom: 28px; font-size: 1rem; }

/* ---------- Responsive ---------- */
@media (max-width: 880px){
  .hero .container, .about .container{ grid-template-columns: 1fr; }
  .hero-card{ order:-1; }
  .product-grid{ grid-template-columns: 1fr 1fr; }
  .stat{ min-width: 45%; }
  .product-featured{ flex-direction: column; align-items: flex-start; padding: 32px 28px; }
  .product-featured-action{ width: 100%; }
  .product-featured-action .btn{ width: 100%; text-align: center; }
}

@media (max-width: 680px){
  .menu-toggle{ display:block; }
  .nav-links{
    position:absolute;
    top: 100%; left:0; right:0;
    background: var(--bg);
    flex-direction:column;
    align-items:flex-start;
    gap: 18px;
    padding: 24px;
    border-bottom: 1px solid rgba(44,110,73,0.15);
    display:none;
  }
  .nav-links.open{ display:flex; }
  .nav-links ul{ position:static; box-shadow:none; padding-left: 14px; display:block; }
  .nav-actions .btn-ghost{ display:none; }
  .hero h1{ font-size: 2.2rem; }
  .product-grid{ grid-template-columns: 1fr; }
  .stat{ min-width: 100%; }
  .cta-band{ margin: 0 12px; padding: 44px 24px; }
  .popup-card{ padding: 36px 24px; }
  .ebook-download-card{ padding: 40px 24px; }
}
