/* =============================================
   Definea.es — theme.css
   Mobile-first, Poppins + Inter
   ============================================= */

/* --- Google Fonts import --- */
@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@600;700;800&family=Inter:wght@400;500;600&display=swap');

/* --- Custom properties --- */
:root {
  --c-brand:     #0B2545;
  --c-accent:    #1B6CA8;
  --c-bg:        #f4f7fb;
  --c-surface:   #fff;
  --c-ink:       #0f1b2d;
  --c-ink-soft:  #3a4b61;
  --c-border:    #d8e2ef;
  --c-highlight: #e8f1fa;
  --radius:      10px;
  --shadow-sm:   0 1px 4px rgba(11,37,69,.08);
  --shadow-md:   0 4px 16px rgba(11,37,69,.13);
  --transition:  .18s ease;
}

/* --- Reset --- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 16px; scroll-behavior: smooth; }
body {
  font-family: 'Inter', system-ui, sans-serif;
  font-weight: 400;
  background: var(--c-bg);
  color: var(--c-ink);
  line-height: 1.65;
  min-height: 100vh;
}
img { display: block; max-width: 100%; height: auto; }
a { color: var(--c-accent); text-decoration: none; }
a:hover { text-decoration: underline; }
ul, ol { list-style: none; }
h1,h2,h3,h4,h5,h6 {
  font-family: 'Poppins', sans-serif;
  font-weight: 700;
  line-height: 1.25;
  color: var(--c-brand);
}

/* --- Shell / container --- */
.shell {
  max-width: 760px;
  margin: 0 auto;
  padding: 22px 16px;
}

/* --- Header / pfbrand --- */
.pfbrand {
  background: var(--c-surface);
  border-bottom: 1px solid var(--c-border);
  padding: 0 16px;
}
.pfbrand__inner {
  max-width: 960px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
  min-height: 56px;
}
.pfbrand__logo {
  display: flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
}
.pfbrand__logo img,
.pfbrand__logo svg { height: 36px; width: auto; }

/* --- Main nav --- */
.mnav {
  background: var(--c-brand);
  position: sticky;
  top: 0;
  z-index: 100;
  padding: 0 16px;
}
.mnav__inner {
  max-width: 960px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  overflow-x: auto;
  scrollbar-width: none;
  gap: 2px;
  min-height: 44px;
}
.mnav__inner::-webkit-scrollbar { display: none; }
.mnav a {
  color: rgba(255,255,255,.85);
  font-size: .78rem;
  font-weight: 500;
  font-family: 'Inter', sans-serif;
  white-space: nowrap;
  padding: 8px 12px;
  border-radius: 6px;
  transition: background var(--transition), color var(--transition);
  text-decoration: none;
}
.mnav a:hover,
.mnav a.active {
  background: rgba(255,255,255,.12);
  color: #fff;
}

/* --- Hero --- */
.hero {
  background: linear-gradient(135deg, #0B2545 0%, #1B6CA8 100%);
  border-radius: 18px;
  padding: 40px 24px 36px;
  margin-bottom: 32px;
  color: #fff;
  text-align: center;
}
.hero h1 {
  font-family: 'Poppins', sans-serif;
  font-weight: 800;
  font-size: clamp(1.5rem, 5vw, 2.2rem);
  color: #fff;
  margin-bottom: 10px;
}
.hero p {
  font-size: .97rem;
  color: rgba(255,255,255,.85);
  max-width: 520px;
  margin: 0 auto 20px;
}
.hero-search {
  display: flex;
  gap: 8px;
  max-width: 440px;
  margin: 0 auto;
}
.hero-search input {
  flex: 1;
  padding: 10px 14px;
  border-radius: 8px;
  border: none;
  font-size: .95rem;
  font-family: 'Inter', sans-serif;
  outline: none;
}
.hero-search button {
  padding: 10px 18px;
  background: #fff;
  color: var(--c-brand);
  border: none;
  border-radius: 8px;
  font-weight: 600;
  font-family: 'Inter', sans-serif;
  cursor: pointer;
  transition: opacity var(--transition);
}
.hero-search button:hover { opacity: .88; }

/* --- Grid & Tiles --- */
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 14px;
  margin-bottom: 32px;
}
.tile {
  background: var(--c-surface);
  border: 1px solid var(--c-border);
  border-radius: var(--radius);
  padding: 18px 16px 16px;
  text-align: center;
  transition: box-shadow var(--transition), transform var(--transition);
  cursor: pointer;
}
.tile:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-3px);
}
.tile a {
  text-decoration: none;
  color: inherit;
  display: block;
}
.tile__emoji { font-size: 2rem; margin-bottom: 8px; line-height: 1; }
.tile__label {
  font-family: 'Poppins', sans-serif;
  font-weight: 700;
  font-size: .95rem;
  color: var(--c-brand);
  margin-bottom: 4px;
}
.tile__desc {
  font-size: .77rem;
  color: var(--c-ink-soft);
  line-height: 1.4;
  margin-bottom: 8px;
}
.tile__count {
  font-size: .72rem;
  color: var(--c-accent);
  font-weight: 600;
}

/* --- Tile list (term list in hub) --- */
.tile-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 10px;
  margin-bottom: 28px;
}
.tile-list a {
  background: var(--c-surface);
  border: 1px solid var(--c-border);
  border-radius: 8px;
  padding: 12px 14px;
  font-size: .9rem;
  font-weight: 500;
  color: var(--c-ink);
  display: flex;
  align-items: center;
  gap: 8px;
  transition: box-shadow var(--transition), border-color var(--transition);
  text-decoration: none;
}
.tile-list a::before {
  content: '→';
  color: var(--c-accent);
  font-weight: 700;
  flex-shrink: 0;
}
.tile-list a:hover {
  border-color: var(--c-accent);
  box-shadow: var(--shadow-sm);
}

/* --- Breadcrumb --- */
.bc {
  font-size: .8rem;
  color: var(--c-ink-soft);
  margin-bottom: 18px;
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  align-items: center;
}
.bc a { color: var(--c-accent); text-decoration: none; }
.bc a:hover { text-decoration: underline; }
.bc span { color: var(--c-ink-soft); }

/* --- AdSense blocks --- */
.ad {
  min-height: 90px;
  background: var(--c-highlight);
  border-radius: 8px;
  margin: 20px 0;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}
.ad ins { display: block; width: 100%; }

/* --- Section titles --- */
.section-title {
  font-family: 'Poppins', sans-serif;
  font-weight: 700;
  font-size: 1.2rem;
  color: var(--c-brand);
  margin-bottom: 16px;
  padding-bottom: 8px;
  border-bottom: 2px solid var(--c-border);
}

/* --- Page image --- */
.pg-img {
  width: 100%;
  height: 260px;
  object-fit: cover;
  border-radius: var(--radius);
  margin: 0 0 22px;
}

/* --- Intro text --- */
.intro {
  font-size: .97rem;
  color: var(--c-ink-soft);
  line-height: 1.7;
  margin-bottom: 24px;
}

/* --- FAQ / details accordion --- */
details {
  background: var(--c-surface);
  border: 1px solid var(--c-border);
  border-radius: 8px;
  margin-bottom: 8px;
  overflow: hidden;
}
summary {
  font-family: 'Poppins', sans-serif;
  font-weight: 600;
  font-size: .95rem;
  color: var(--c-brand);
  padding: 14px 16px;
  cursor: pointer;
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
summary::-webkit-details-marker { display: none; }
summary::after {
  content: '+';
  font-size: 1.2rem;
  color: var(--c-accent);
  transition: transform var(--transition);
}
details[open] summary::after {
  content: '−';
}
details > div, details > p {
  padding: 0 16px 14px;
  font-size: .9rem;
  color: var(--c-ink-soft);
  line-height: 1.65;
}

/* --- Share bar --- */
.share-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 24px 0;
  align-items: center;
}
.share-bar__label {
  font-size: .8rem;
  font-weight: 600;
  color: var(--c-ink-soft);
  margin-right: 4px;
}
.share-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 7px 13px;
  border-radius: 6px;
  font-size: .78rem;
  font-weight: 600;
  font-family: 'Inter', sans-serif;
  cursor: pointer;
  border: none;
  transition: opacity var(--transition);
  text-decoration: none;
  color: #fff;
}
.share-btn:hover { opacity: .85; text-decoration: none; color: #fff; }
.share-btn--wa  { background: #25D366; }
.share-btn--x   { background: #000; }
.share-btn--fb  { background: #1877F2; }
.share-btn--tg  { background: #2AABEE; }
.share-btn--cp  { background: var(--c-ink-soft); }

/* --- Footer --- */
footer {
  background: var(--c-brand);
  color: rgba(255,255,255,.75);
  padding: 36px 16px 24px;
  margin-top: 48px;
  font-size: .82rem;
}
.footer__inner {
  max-width: 960px;
  margin: 0 auto;
}
.footer__brand {
  font-family: 'Poppins', sans-serif;
  font-weight: 700;
  font-size: 1.1rem;
  color: #fff;
  margin-bottom: 6px;
}
.footer__tagline {
  margin-bottom: 18px;
  color: rgba(255,255,255,.6);
}
.fnav {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 18px;
  margin-bottom: 20px;
}
.fnav a {
  color: rgba(255,255,255,.7);
  text-decoration: none;
  transition: color var(--transition);
}
.fnav a:hover { color: #fff; text-decoration: none; }
.footer__copy {
  border-top: 1px solid rgba(255,255,255,.1);
  padding-top: 14px;
  color: rgba(255,255,255,.45);
}

/* --- Responsive tweaks --- */
@media (max-width: 600px) {
  .shell { padding: 16px 12px; }
  .hero { padding: 28px 16px 24px; border-radius: 12px; }
  .grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .tile-list { grid-template-columns: 1fr; }
  .hero-search { flex-direction: column; }
  .pfbrand__inner { min-height: 48px; }
}
@media (min-width: 760px) {
  .shell { padding: 28px 24px; }
}
