/*
Theme Name:  Howedoing
Theme URI:   https://howedoing.com
Description: Custom theme for HOWEDOING — Research & Analysis on Prince Edward Island
Author:      HOWEDOING
Version:     1.0.0
Text Domain: howedoing
*/

/* ============================================================
   HOWEDOING WordPress Theme — PT Sans
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=PT+Sans:ital,wght@0,400;0,700;1,400&display=swap');

/* --- RESET & BASE ----------------------------------------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --navy:       #1B3A6B;
  --navy-mid:   #234F8F;
  --gold:       #C8A951;
  --gold-light: #E2C878;
  --white:      #FFFFFF;
  --off-white:  #F5F7FA;
  --gray:       #E2E8F0;
  --gray-dark:  #A0AEC0;
  --text:       #2D3748;
  --text-light: #718096;
  --danger:     #E53E3E;
  --success:    #38A169;
  --radius:     4px;
  --shadow:     0 2px 12px rgba(0,0,0,.10);
  --shadow-md:  0 4px 24px rgba(0,0,0,.15);
  --transition: .22s ease;
  --max-w:      1160px;
}

html { font-size: 16px; scroll-behavior: smooth; }
body {
  font-family: 'PT Sans', sans-serif;
  color: var(--text);
  background: var(--white);
  line-height: 1.65;
}
a { color: var(--navy-mid); text-decoration: none; transition: color var(--transition); }
a:hover { color: var(--gold); }
img { max-width: 100%; display: block; }
ul { list-style: none; }

/* --- UTILIDADES ------------------------------------------- */
.container   { max-width: var(--max-w); margin: 0 auto; padding: 0 24px; }
.section     { padding: 72px 0; }
.section-alt { background: var(--off-white); }
.text-center { text-align: center; }
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 28px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px; }

/* --- TIPOGRAFÍA ------------------------------------------- */
h1, h2, h3, h4 { font-family: 'PT Sans', sans-serif; font-weight: 700; line-height: 1.2; color: var(--navy); }
h1 { font-size: clamp(2rem, 5vw, 3.2rem); }
h2 { font-size: clamp(1.5rem, 3vw, 2.2rem); }
h3 { font-size: 1.3rem; }
p  { margin-bottom: 1rem; }
p:last-child { margin-bottom: 0; }
.section-title    { font-size: clamp(1.6rem, 3vw, 2rem); color: var(--navy); margin-bottom: .5rem; }
.section-subtitle { color: var(--text-light); font-size: 1.05rem; margin-bottom: 3rem; }

/* --- BOTONES ---------------------------------------------- */
.btn {
  display: inline-block;
  padding: 11px 26px;
  border-radius: var(--radius);
  font-family: 'PT Sans', sans-serif;
  font-size: .95rem;
  font-weight: 700;
  cursor: pointer;
  transition: background var(--transition), color var(--transition), transform .12s;
  border: 2px solid transparent;
  text-align: center;
}
.btn:hover { transform: translateY(-1px); }
.btn-primary { background: var(--navy); color: var(--white); border-color: var(--navy); }
.btn-primary:hover { background: var(--navy-mid); color: var(--white); }
.btn-gold { background: var(--gold); color: var(--navy); border-color: var(--gold); }
.btn-gold:hover { background: var(--gold-light); color: var(--navy); }
.btn-outline { background: transparent; color: var(--navy); border-color: var(--navy); }
.btn-outline:hover { background: var(--navy); color: var(--white); }
.btn-outline-white { background: transparent; color: var(--white); border-color: rgba(255,255,255,.7); }
.btn-outline-white:hover { background: var(--white); color: var(--navy); }
.btn-sm  { padding: 7px 16px; font-size: .85rem; }
.btn-lg  { padding: 14px 34px; font-size: 1.05rem; }
.btn-block { display: block; width: 100%; }

/* --- HERO (HOMEPAGE) -------------------------------------- */
.hwd-hero {
  position: relative;
  min-height: 100vh;
  background: var(--navy) center/cover no-repeat;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}
.hwd-hero-overlay {
  position: absolute;
  inset: 0;
  background: rgba(20, 40, 80, .45);
}
.hwd-hero-body {
  position: relative;
  z-index: 2;
  text-align: center;
  padding: 0 24px;
  display: flex;
  flex-direction: column;
  align-items: center;
}
.hwd-hero-logo {
  max-width: 180px;
  height: auto;
  margin-bottom: 24px;
  /* Logo ya es blanco sobre transparente */
  drop-shadow: 0 2px 12px rgba(0,0,0,.3);
}
.hwd-hero-title {
  font-size: clamp(2rem, 6vw, 4.5rem);
  font-weight: 700;
  color: var(--white);
  letter-spacing: 4px;
  text-shadow: 0 2px 20px rgba(0,0,0,.3);
  line-height: 1;
  text-align: center;
  width: 100%;
  max-width: 100%;
  overflow-wrap: break-word;
  word-break: break-word;
  padding: 0 16px;
  box-sizing: border-box;
}

/* Lang switcher en hero */
.hwd-lang-hero {
  position: absolute;
  top: 20px;
  right: 24px;
  z-index: 10;
  display: flex;
  gap: 6px;
}

/* --- NAV EN HERO ----------------------------------------- */
.hwd-hero-nav {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 3;
  background: rgba(27, 58, 107, .75);
  backdrop-filter: blur(6px);
  border-top: 1px solid rgba(255,255,255,.12);
}
.hwd-hero-nav ul,
.hwd-site-nav ul {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  padding: 0;
  margin: 0;
  list-style: none;
}
.hwd-hero-nav ul li a {
  display: block;
  padding: 18px 24px;
  color: rgba(255,255,255,.85);
  font-weight: 700;
  font-size: .92rem;
  letter-spacing: .5px;
  text-transform: uppercase;
  transition: color var(--transition), background var(--transition);
}
.hwd-hero-nav ul li a:hover,
.hwd-hero-nav ul li.current-menu-item > a { color: var(--gold); background: rgba(255,255,255,.06); }

/* --- HEADER INTERNO -------------------------------------- */
.hwd-site-header {
  background: var(--navy);
  box-shadow: 0 2px 16px rgba(0,0,0,.2);
  position: sticky;
  top: 0;
  z-index: 100;
}
.hwd-site-header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 24px;
  max-width: var(--max-w);
  margin: 0 auto;
  gap: 24px;
}
.hwd-site-logo {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  flex-shrink: 0;
}
.hwd-site-logo img,
.hwd-header-logo-img {
  height: 48px;
  width: auto;
  /* Logo ya es blanco sobre transparente — no necesita filtro */
}
.hwd-header-logo-text {
  color: var(--white);
  font-size: 1.2rem;
  font-weight: 800;
  letter-spacing: 2px;
  text-transform: uppercase;
  font-family: inherit;
}
.hwd-site-logo-name {
  color: var(--white);
  font-weight: 700;
  font-size: 1.15rem;
  letter-spacing: 2px;
}
.hwd-site-nav { flex: 1; }
.hwd-site-nav ul { justify-content: flex-end; }
.hwd-site-nav ul li a {
  display: block;
  padding: 22px 16px;
  color: rgba(255,255,255,.85);
  font-weight: 700;
  font-size: .88rem;
  letter-spacing: .5px;
  text-transform: uppercase;
  transition: color var(--transition), background var(--transition);
}
.hwd-site-nav ul li a:hover,
.hwd-site-nav ul li.current-menu-item > a { color: var(--gold); }
.hwd-site-nav ul li { margin: 0; padding: 0; }

/* Lang button en header interno */
.hwd-lang-switcher { display: flex; gap: 6px; }
.hwd-lang-btn {
  padding: 5px 12px;
  border: 1px solid rgba(255,255,255,.3);
  border-radius: var(--radius);
  color: rgba(255,255,255,.7);
  font-size: .8rem;
  font-weight: 700;
  background: transparent;
  cursor: pointer;
  transition: var(--transition);
  text-decoration: none;
}
.hwd-lang-btn.active, .hwd-lang-btn:hover {
  background: var(--gold);
  color: var(--navy);
  border-color: var(--gold);
}

/* Hamburger */
.hwd-nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  background: none;
  border: none;
  padding: 4px;
}
.hwd-nav-toggle span { display: block; width: 24px; height: 2px; background: var(--white); }

/* --- PAGE BANNER ----------------------------------------- */
.hwd-page-banner {
  background: var(--navy);
  padding: 56px 24px 48px;
  text-align: center;
}
.hwd-page-banner h1 { color: var(--white); font-size: clamp(1.8rem, 4vw, 2.8rem); }
.hwd-page-banner p  { color: rgba(255,255,255,.7); margin-top: .5rem; }
.hwd-breadcrumb {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-top: 12px;
  font-size: .85rem;
  color: rgba(255,255,255,.5);
}
.hwd-breadcrumb a { color: var(--gold-light); }
.hwd-breadcrumb span::before { content: '/'; margin-right: 8px; }

/* --- CARDS ----------------------------------------------- */
.hwd-card {
  background: var(--white);
  border: 1px solid var(--gray);
  border-radius: var(--radius);
  padding: 28px 24px;
  box-shadow: var(--shadow);
  transition: box-shadow var(--transition), transform var(--transition);
}
.hwd-card:hover { box-shadow: var(--shadow-md); transform: translateY(-2px); }

/* --- SUBSCRIPTION BOX ------------------------------------ */
.hwd-subscription-box {
  background: linear-gradient(135deg, var(--navy) 0%, var(--navy-mid) 100%);
  border-radius: var(--radius);
  padding: 40px;
  text-align: center;
  color: var(--white);
}
.hwd-subscription-box h2 { color: var(--white); margin-bottom: .5rem; }
.hwd-subscription-box p  { color: rgba(255,255,255,.75); margin-bottom: 1.5rem; }
.hwd-price-big {
  font-size: 3rem;
  font-weight: 700;
  color: var(--gold);
  line-height: 1;
}
.hwd-price-big small { font-size: 1.1rem; color: rgba(255,255,255,.6); }

/* --- REPORT CARDS ---------------------------------------- */
.hwd-reports-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 24px; }
.hwd-report-card {
  background: var(--white);
  border: 1px solid var(--gray);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  transition: box-shadow var(--transition), transform var(--transition);
}
.hwd-report-card:hover { box-shadow: var(--shadow-md); transform: translateY(-2px); }
.hwd-report-card-header { background: var(--navy); padding: 20px 22px; position: relative; }
.hwd-report-card-header h3 { color: var(--white); font-size: 1rem; line-height: 1.4; }
.hwd-lang-badge {
  position: absolute; top: 12px; right: 14px;
  background: var(--gold); color: var(--navy);
  font-size: .7rem; font-weight: 700;
  padding: 2px 8px; border-radius: 20px; letter-spacing: .5px;
}
.hwd-report-card-body { padding: 20px 22px; flex: 1; display: flex; flex-direction: column; gap: 12px; }
.hwd-report-card-body p { color: var(--text-light); font-size: .92rem; flex: 1; }
.hwd-report-date { font-size: .8rem; color: var(--gray-dark); }
.hwd-report-price { font-size: 1.5rem; font-weight: 700; color: var(--navy); }
.hwd-report-price span { font-size: .85rem; font-weight: 400; color: var(--text-light); }
.hwd-report-card-footer { padding: 16px 22px; border-top: 1px solid var(--gray); display: flex; gap: 10px; flex-wrap: wrap; }

/* --- PDF VIEWER ------------------------------------------ */
.hwd-pdf-viewer-wrap { width: 100%; height: 80vh; min-height: 500px; border: 1px solid var(--gray); border-radius: var(--radius); overflow: hidden; }
.hwd-pdf-viewer-wrap iframe { width: 100%; height: 100%; border: none; }
.hwd-pdf-controls {
  display: flex; align-items: center; gap: 12px;
  padding: 12px 16px; background: var(--navy);
  border-radius: var(--radius) var(--radius) 0 0;
  flex-wrap: wrap;
}
.hwd-pdf-controls span { color: rgba(255,255,255,.7); font-size: .9rem; }

/* --- FORMULARIOS ----------------------------------------- */
.hwd-form-group { margin-bottom: 1.2rem; }
.hwd-label { display: block; font-weight: 700; margin-bottom: .4rem; font-size: .92rem; color: var(--navy); }
.hwd-input {
  display: block; width: 100%; padding: 10px 14px;
  border: 1px solid var(--gray); border-radius: var(--radius);
  font-family: 'PT Sans', sans-serif; font-size: .95rem; color: var(--text); background: var(--white);
  transition: border-color var(--transition), box-shadow var(--transition);
}
.hwd-input:focus { outline: none; border-color: var(--navy-mid); box-shadow: 0 0 0 3px rgba(44,95,173,.15); }
textarea.hwd-input { resize: vertical; min-height: 120px; }
.hwd-hint  { font-size: .82rem; color: var(--text-light); margin-top: .3rem; }
.hwd-alert {
  padding: 14px 18px; border-radius: var(--radius);
  margin-bottom: 1.2rem; font-size: .95rem; border-left: 4px solid;
}
.hwd-alert-success { background: #F0FFF4; color: var(--success); border-color: var(--success); }
.hwd-alert-error   { background: #FFF5F5; color: var(--danger);  border-color: var(--danger); }
.hwd-alert-info    { background: #EBF8FF; color: var(--navy-mid); border-color: var(--navy-mid); }

/* --- FOOTER ---------------------------------------------- */
.hwd-footer {
  background: var(--navy);
  color: rgba(255,255,255,.7);
  padding: 52px 0 28px;
}
.hwd-footer-inner {
  max-width: var(--max-w); margin: 0 auto; padding: 0 24px;
  display: grid; grid-template-columns: 2fr 1fr 1fr;
  gap: 40px; margin-bottom: 36px;
}
.hwd-footer-logo-txt { font-size: 1.4rem; font-weight: 700; color: var(--white); letter-spacing: 3px; }
.hwd-footer-brand p  { font-size: .9rem; margin-top: .75rem; }
.hwd-footer-col h4   { color: var(--gold); font-size: .85rem; letter-spacing: 1px; text-transform: uppercase; margin-bottom: 1rem; }
.hwd-footer-col ul   { padding: 0; list-style: none; }
.hwd-footer-col ul li { margin-bottom: .45rem; }
.hwd-footer-col ul li a { color: rgba(255,255,255,.65); font-size: .9rem; }
.hwd-footer-col ul li a:hover { color: var(--gold); }
.hwd-footer-bottom {
  max-width: var(--max-w); margin: 0 auto;
  padding: 20px 24px 0; border-top: 1px solid rgba(255,255,255,.1);
  display: flex; justify-content: space-between; align-items: center;
  font-size: .82rem; flex-wrap: wrap; gap: 8px;
}

/* --- WP CONTENT STYLING ---------------------------------- */
.hwd-content h2 { margin: 1.5rem 0 .75rem; }
.hwd-content h3 { margin: 1.25rem 0 .5rem; }
.hwd-content p  { margin-bottom: 1rem; }
.hwd-content ul, .hwd-content ol { padding-left: 1.5rem; margin-bottom: 1rem; }
.hwd-content li { margin-bottom: .4rem; }
.hwd-content blockquote { border-left: 4px solid var(--gold); padding-left: 1.25rem; color: var(--text-light); margin: 1.5rem 0; }
.hwd-content img { border-radius: var(--radius); }
.hwd-content a { color: var(--navy-mid); text-decoration: underline; }

/* --- RESPONSIVE ------------------------------------------ */
@media (max-width: 900px) {
  .grid-3 { grid-template-columns: repeat(2, 1fr); }
  .hwd-footer-inner { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 680px) {
  .section { padding: 48px 0; }
  .grid-2, .grid-3 { grid-template-columns: 1fr; }
  .hwd-footer-inner { grid-template-columns: 1fr; gap: 28px; }
  .hwd-footer-bottom { flex-direction: column; text-align: center; }
  .hwd-site-header-inner { flex-wrap: wrap; }
  .hwd-site-nav { display: none; width: 100%; }
  .hwd-site-nav.open { display: block; }
  .hwd-site-nav ul { flex-direction: column; }
  .hwd-site-nav ul li a { padding: 14px 16px; border-bottom: 1px solid rgba(255,255,255,.07); }
  .hwd-nav-toggle { display: flex; }
  .hwd-hero-nav ul { flex-direction: column; }
  .hwd-hero-nav ul li a { padding: 14px 20px; border-bottom: 1px solid rgba(255,255,255,.08); text-align: center; }
  .hwd-subscription-box { padding: 28px 20px; }
  .hwd-pdf-viewer-wrap { height: 60vh; }
}
