/*
  Gay Daddy Meet - Global Styles
  All styles live here to avoid duplication or conflicts.
  Typography uses system fonts for fast rendering and readability.
*/

:root {
  --bg: #0f1440;
  --bg-2: #172055;
  --gradient: linear-gradient(90deg, #6a5af9 0%, #9b59ff 50%, #ff7ad9 100%);
  --text: #111827;
  --muted: #4b5563;
  --white: #ffffff;
  --brand: #6a5af9;
  --accent: #ff7ad9;
  --success: #10b981;
  --warning: #f59e0b;
  --danger: #ef4444;
  --border: #e5e7eb;
  --card: #f8fafc;
}

/* CSS Reset */
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
html, body { margin: 0; padding: 0; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, Cantarell, "Helvetica Neue", Arial, sans-serif;
  color: var(--text);
  background: #fff;
  line-height: 1.7;
}

img { max-width: 100%; display: block; }
a { color: var(--brand); text-decoration: none; }
a:hover { color: #4c45d6; }

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

/* Header */
header.site-header {
  background: var(--gradient);
  color: var(--white);
  position: sticky;
  top: 0; z-index: 1000;
}
.nav {
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px 0;
}
.brand { display: flex; align-items: center; gap: 12px; }
.brand img { width: 36px; height: 36px; border-radius: 8px; }
.brand .name { font-weight: 700; letter-spacing: .3px; }
/* Ensure brand link doesn't change header colors */
.brand.brand-link { color: inherit; text-decoration: none; }
.brand.brand-link:hover { color: inherit; }
.brand.brand-link:focus { outline: none; }

.menu { display: flex; align-items: center; gap: 16px; }
.menu a { color: var(--white); font-weight: 600; padding: 8px 10px; border-radius: 6px; }
.menu a:hover { background: rgba(255,255,255,.12); }

/* Mobile menu toggle (hidden on desktop) */
.menu-toggle { display: none; background: rgba(255,255,255,.14); color: var(--white); border: none; padding: 8px 12px; border-radius: 8px; cursor: pointer; font-weight: 700; }

/* Mobile overlay close button (hidden by default) */
.menu-close { display: none; }

.cta-join { background: var(--white); color: var(--bg); padding: 8px 14px; border-radius: 8px; font-weight: 700; }
.cta-join:hover { background: #ffdff3; }

/* Language dropdown */
.lang { position: relative; }
.lang-toggle { display: flex; align-items: center; gap: 8px; background: rgba(255,255,255,.14); color: var(--white); border: none; padding: 8px 12px; border-radius: 8px; cursor: pointer; }
.lang-menu { position: absolute; top: 42px; right: 0; width: 320px; background: var(--white); color: var(--text); border: 1px solid var(--border); border-radius: 10px; box-shadow: 0 12px 24px rgba(17,24,39,.18); display: none; max-height: 380px; overflow: auto; }
.lang.open .lang-menu { display: block; }
.lang-menu a { display: flex; align-items: center; gap: 8px; padding: 10px 12px; border-bottom: 1px solid var(--border); color: var(--text); }
.lang-menu a:last-child { border-bottom: 0; }
.lang-menu a:hover { background: #f3f4f6; }
/* Language dropdown group title */
.lang-menu .group-title { padding: 8px 12px; font-weight: 800; font-size: 12px; text-transform: uppercase; letter-spacing: .2px; color: #6b7280; background: #f9fafb; border-bottom: 1px solid var(--border); }

/* Hero */
.hero { position: relative; background: url('images/hero.jpg') center/cover no-repeat; }
.hero::before { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(15,20,64,.85) 0%, rgba(15,20,64,.55) 45%, rgba(15,20,64,.25) 100%); }
.hero .wrap { position: relative; padding: 90px 0 70px; color: var(--white); }
.hero h1 { font-size: 42px; line-height: 1.2; margin: 0 0 16px; }
.hero p { max-width: 800px; font-size: 18px; }
.hero .actions { margin-top: 24px; display: flex; gap: 12px; flex-wrap: wrap; }
.hero-center .wrap { text-align: center; }
.hero-center p { margin-left: auto; margin-right: auto; }
.hero-center .actions { justify-content: center; }
.btn { display: inline-flex; align-items: center; gap: 10px; padding: 12px 16px; border-radius: 10px; border: none; cursor: pointer; font-weight: 700; }
.btn-primary { background: var(--accent); color: var(--bg); }
.btn-light { background: rgba(255,255,255,.2); color: var(--white); }

/* Stats */
.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-top: 28px; }
.stat { background: rgba(255,255,255,.12); backdrop-filter: blur(6px); border: 1px solid rgba(255,255,255,.25); color: var(--white); padding: 18px; border-radius: 12px; }
.stat .num { font-size: 28px; font-weight: 800; }
.stat .label { font-size: 13px; opacity: .9; }

/* Sections */
section { padding: 60px 0; }
.section-title { font-size: 32px; text-align: center; margin: 0 0 10px; }
.section-sub { text-align: center; color: var(--muted); max-width: 780px; margin: 0 auto 34px; }
/* Generic grid utilities (used by safety-tips and legal pages) */
.grid { display: grid; gap: 18px; }
.grid-2 { grid-template-columns: 1fr 1fr; }
.table-wrap { overflow-x: auto; }

/* About page hero layout and image sizing */
.about-page .country-hero { padding: 64px 0 32px; background: linear-gradient(180deg, #eef2ff 0%, #f8fafc 100%); }
.about-page .country-hero .container { display: grid; grid-template-columns: 1.2fr 0.8fr; gap: 24px; align-items: center; }
.about-page .country-hero h1 { font-size: 40px; line-height: 1.2; margin: 0 0 12px; text-align: center; }
.about-page .country-hero p.lead { font-size: 18px; color: var(--muted); text-align: center; }
.about-page .country-hero .hero-cta { text-align: center; margin-top: 14px; }
.about-page .hero-image img { width: 100%; height: 320px; object-fit: cover; border-radius: 16px; box-shadow: 0 8px 20px rgba(17,24,39,.12); }

/* Global CTA banner and join button styles */
.cta-banner { background: var(--bg-2); color: var(--white); border-radius: 18px; padding: 28px; box-shadow: 0 16px 30px rgba(17,24,39,.18); }
.cta-banner .title { font-size: 26px; font-weight: 800; margin: 0 0 10px; }
.cta-banner p { margin: 0 0 16px; color: #e5e7eb; }
.btn-join { background: var(--accent); color: var(--bg); border: none; padding: 12px 18px; border-radius: 999px; font-weight: 800; letter-spacing: .2px; cursor: pointer; }
.btn-join:hover { filter: brightness(1.05); box-shadow: 0 10px 22px rgba(255,122,217,.35); }

/* Fixed CTA on mobile screens */
.cta-fixed { display: none; position: fixed; left: 16px; right: 16px; bottom: 16px; z-index: 1200; background: var(--gradient); color: var(--bg); border-radius: 999px; text-align: center; padding: 12px 18px; font-weight: 900; box-shadow: 0 16px 30px rgba(17,24,39,.25); }
.cta-fixed a { color: var(--bg); }

/* Feature grid */
.features { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.feature { background: var(--card); border: 1px solid var(--border); border-radius: 12px; padding: 18px; display: grid; grid-template-columns: 60px 1fr; gap: 14px; align-items: start; }
.feature svg { width: 56px; height: 56px; }
.feature h3 { margin: 0 0 6px; font-size: 18px; grid-column: 2; }
/* Some pages use .title instead of h3 */
.feature .title { font-size: 18px; font-weight: 700; margin: 0 0 6px; grid-column: 2; }
/* Ensure description text spans the second column, not under the icon */
.feature p { margin: 0; color: var(--muted); grid-column: 2; }
/* In case lists are used inside feature cards */
.feature ul { grid-column: 2; margin: 0; padding-left: 18px; }

/* Cards grid */
.cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.card { background: var(--white); border: 1px solid var(--border); border-radius: 12px; overflow: hidden; }
.card > img { width: 100%; height: 200px; object-fit: cover; display: block; }
.card .body { padding: 16px; }
.card h3 { margin: 6px 0 10px; }
.card p { color: var(--muted); }
.card .links { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 8px; }
.chip { display: inline-block; border: 1px solid var(--border); color: var(--muted); padding: 6px 10px; border-radius: 999px; font-size: 13px; }

/* Centering helpers for sections using cards */
.cards.centered { max-width: 900px; margin-left: auto; margin-right: auto; }
.cards.single-center { grid-template-columns: 1fr; justify-items: center; }
.cards.single-center > .card { max-width: 640px; width: 100%; }

/* Centering helper for features grid (desktop) */
.features.centered { max-width: 900px; margin-left: auto; margin-right: auto; }

/* Testimonials */
.testimonials { display: grid; grid-template-columns: repeat(2, 1fr); gap: 18px; }
.quote { background: var(--card); border: 1px solid var(--border); border-radius: 12px; padding: 16px; }
.quote strong { color: var(--bg-2); }

/* Blog preview */
.blog-preview { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }

/* CTA */
.cta { background: var(--bg-2); color: var(--white); border-radius: 18px; padding: 34px; text-align: center; }

/* Footer */
footer.site-footer { background: #1f2937; color: #cbd5e1; }
.footer-grid { display: grid; grid-template-columns: 1.6fr 1fr 1fr 1fr; gap: 24px; padding: 32px 0; align-items: start; }
.footer-brand { display: flex; gap: 12px; align-items: flex-start; }
.footer-brand img { width: 32px; height: 32px; border-radius: 8px; }
.footer-brand .site-name { font-weight: 800; color: #fff; }
.footer-brand p { margin: 8px 0 0; color: #94a3b8; font-size: 14px; line-height: 1.6; }
.footer-col h4 { margin: 0 0 10px; font-size: 16px; color: #f59e0b; }
.footer-col ul { list-style: none; padding: 0; margin: 0; }
.footer-col li { margin: 8px 0; }
.footer-col a { color: #cbd5e1; }
.footer-col a:hover { color: #ffffff; }
.footer-bottom { border-top: 1px solid rgba(148,163,184,.25); padding: 14px 0 22px; }
.copyright { text-align: center; font-size: 13px; color: #94a3b8; }

/* Responsive */
@media (max-width: 992px) {
  .features, .cards, .blog-preview { grid-template-columns: repeat(2, 1fr); }
  .stats { grid-template-columns: 1fr 1fr; }
  .testimonials { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .footer-brand { grid-column: span 2; }

  /* Mobile navigation overlay widened to ≤992px for tablets/large phones */
  .menu { display: none; }
  .menu.open { display: grid !important; grid-template-columns: 1fr; gap: 16px; position: fixed; inset: 0; background: #fff; padding: 70px 24px 24px; z-index: 1200; overflow-y: auto; }
  .menu.open a { color: #3f3d56; font-weight: 600; font-size: 18px; padding: 12px 8px; border-radius: 8px; }
  .menu.open .cta-join { background: #5f55c8; color: #fff; justify-self: start; }
  .menu.open .lang { margin-top: 8px; }
  .menu.open .lang-toggle { background: #ececf9; color: #3f3d56; font-weight: 700; }
  .menu.open .lang-menu { position: static; width: 100%; right: auto; top: auto; box-shadow: 0 12px 24px rgba(17,24,39,.12); max-height: none; }
  .menu.open .lang-menu .group-title { position: sticky; top: 0; z-index: 1; }
  .menu-toggle { display: flex; align-items: center; gap: 8px; cursor: pointer; }
  .menu-close.show { display: block; position: fixed; top: 14px; right: 16px; z-index: 1300; background: transparent; border: none; font-size: 28px; color: #3f3d56; line-height: 1; cursor: pointer; }
  body.menu-open { overflow: hidden; }
}
@media (max-width: 720px) {
  /* Keep other mobile fine‑tuning at ≤720px */
  .hero .wrap { padding: 70px 0 50px; }
  .features, .cards, .blog-preview { grid-template-columns: 1fr; }
.card > img { height: 150px; }
  .stats { grid-template-columns: 1fr; }
  .section-title { font-size: 28px; }
  /* Mobile footer center alignment across all pages */
  .footer-grid { grid-template-columns: 1fr; justify-items: center; text-align: center; }
  .footer-brand { grid-column: auto; align-items: center; }
  .footer-col { text-align: center; }
  .footer-bottom { text-align: center; }
  /* About page hero responsive */
  .about-page .country-hero .container { grid-template-columns: 1fr; }
  .about-page .hero-image img { height: 220px; }
  /* Show fixed CTA on mobile */
.cta-fixed { display: block; }
}

/* Steps list for browse page (text-only, easy to scan) */
.steps { counter-reset: step; list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.steps li { background: var(--white); border: 1px solid var(--border); border-radius: 12px; padding: 16px; box-shadow: 0 6px 14px rgba(15,23,42,.06); }
.steps li::before { counter-increment: step; content: counter(step);
  display: inline-flex; align-items: center; justify-content: center; width: 28px; height: 28px;
  background: var(--gradient); color: var(--bg); font-weight: 900; border-radius: 999px; margin-right: 8px; }
.steps .step-title { font-weight: 800; margin: 0 0 8px; display: flex; align-items: center; }
.steps p { color: var(--muted); margin: 0; }

/* Country directory groups (nav-style lists inside cards) */
.country-list { list-style: none; padding: 0; margin: 0; }
.country-list li { border-bottom: 1px solid var(--border); }
.country-list li:last-child { border-bottom: 0; }
.country-list a { display: block; padding: 10px 12px; color: var(--text); }
.country-list a:hover { background: #f9fafb; }

/* Responsive adjustments */
@media (max-width: 960px) {
  .steps { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 680px) {
  .steps { grid-template-columns: 1fr; }
}

/* ============================
   Sitemap Page (scoped styles)
   ============================ */
.sitemap-page {
  --sitemap-bg: #2b1b1f;
  --sitemap-card: #3a1f26;
  --sitemap-border: #5b3340;
  --sitemap-text: #f8e7ea;
  --sitemap-sub: #e6cfd4;
  --sitemap-accent: #f59e0b;
  --sitemap-chip: #c5161f;
}
.sitemap-page .sitemap-sections { display: grid; gap: 22px; }
.sitemap-page .sitemap-section {
  background: var(--sitemap-card);
  color: var(--sitemap-text);
  border: 1px solid var(--sitemap-border);
  border-radius: 18px;
  padding: 22px;
  box-shadow: 0 10px 24px rgba(0,0,0,.22);
}
.sitemap-page .sitemap-header h2 {
  margin: 0 0 12px;
  font-size: 22px;
  color: var(--sitemap-text);
}
.sitemap-page .sitemap-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.sitemap-page h3 { margin: 2px 0 10px; font-size: 16px; color: var(--sitemap-sub); }
.sitemap-page .sitemap-list { list-style: none; padding: 0; margin: 0; }
.sitemap-page .sitemap-list li { margin: 6px 0; }
.sitemap-page .sitemap-list a { color: var(--sitemap-text); display: inline-flex; align-items: center; gap: 8px; padding: 6px 8px; border-radius: 8px; }
.sitemap-page .sitemap-list a:hover { background: rgba(255,255,255,.06); }
.sitemap-page .sitemap-list.cols { columns: 2; }

.sitemap-page .sitemap-quick { text-align: center; }
.sitemap-page .sitemap-chips { display: inline-flex; gap: 10px; flex-wrap: wrap; margin: 6px auto 0; }
.sitemap-page .chip.primary { background: var(--sitemap-chip); color: #fff; border: none; }
.sitemap-page .chip.primary:hover { filter: brightness(1.1); }

.sitemap-page .sitemap-stats { padding: 12px 0 0; }
.sitemap-page .stats-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.sitemap-page .stat-card { background: var(--sitemap-card); border: 1px solid var(--sitemap-border); border-radius: 14px; padding: 16px; text-align: center; color: var(--sitemap-text); }
.sitemap-page .stat-card .num { font-size: 20px; font-weight: 900; color: var(--sitemap-accent); }
.sitemap-page .stat-card .label { font-size: 12px; color: var(--sitemap-sub); }

@media (max-width: 992px) {
  .sitemap-page .sitemap-grid { grid-template-columns: repeat(2, 1fr); }
  .sitemap-page .stats-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 680px) {
  .sitemap-page .sitemap-grid { grid-template-columns: 1fr; }
  .sitemap-page .sitemap-list.cols { columns: 1; }
  .sitemap-page .stats-grid { grid-template-columns: 1fr 1fr; }
}

/* Modern table styles (inspired by sugardaddymeet.com aesthetics) */
.country-table, .table {
  width: 100%;
  border-collapse: collapse;
  background: #ffffff;
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
  margin: 16px 0 24px;
  table-layout: auto;
}
.country-table thead th, .table thead th {
  background: #f9fafb;
  color: #374151;
  font-weight: 800;
  font-size: 14px;
  letter-spacing: .2px;
  padding: 12px 14px;
  border-bottom: 1px solid var(--border);
}
.country-table tbody td, .table tbody td {
  padding: 12px 14px;
  border-bottom: 1px solid var(--border);
  color: var(--text);
}
.country-table tbody tr:nth-child(even), .table tbody tr:nth-child(even) { background: #fbfdff; }
.country-table tbody tr:hover, .table tbody tr:hover { background: #f3f4f6; }

/* Responsive table: allow horizontal scroll on small screens */
@media (max-width: 720px) {
  .country-table, .table { display: block; overflow-x: auto; -webkit-overflow-scrolling: touch; }
  .country-table thead, .table thead { position: sticky; top: 0; z-index: 1; }
  .country-table th, .country-table td, .table th, .table td { white-space: nowrap; }
}

/* Page polish: checklist spacing and readable paragraphs */
.checklist { list-style: none; padding-left: 0; margin: 12px 0 18px; }
.checklist li { position: relative; padding-left: 24px; margin: 8px 0; }
.checklist li::before { content: "✔"; position: absolute; left: 0; top: 0; color: var(--success); font-weight: 900; }

/* Improve paragraph rhythm */
.section .container p { margin: 10px 0; }

/* Utility */
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); border: 0; }

/* Simple icon badges for stats */
.badge { display: inline-block; background: #eef2ff; color: var(--brand); padding: 4px 8px; border-radius: 6px; font-weight: 700; font-size: 12px; }

/* Common utility classes */
.text-center { text-align: center; }
.mt-16 { margin-top: 16px; }

/* Country directory cards (uniform image sizing and layout) */
.country-directory { margin-top: 16px; }
.country-group { margin-bottom: 40px; }
.country-group h3 { margin: 0 0 14px; font-size: 22px; }
.country-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.country-card { display: block; background: var(--white); border: 1px solid var(--border); border-radius: 12px; overflow: hidden; color: var(--text); }
.country-card:hover { box-shadow: 0 8px 20px rgba(17,24,39,.10); transform: translateY(-1px); transition: box-shadow .18s ease, transform .18s ease; }
.country-card img { width: 100%; height: 160px; object-fit: cover; display: block; }
.country-card .content { padding: 14px; }
.country-card h4 { margin: 6px 0 8px; font-size: 18px; }
.country-card p { margin: 0; color: var(--muted); font-size: 14px; line-height: 1.6; }

/* App page visuals */
.app-section { padding: 60px 0; }
.app-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.app-grid .tile { background: var(--white); border: 1px solid var(--border); border-radius: 12px; overflow: hidden; }
.app-grid .tile img { width: 100%; height: 160px; object-fit: cover; }
.app-grid .tile .body { padding: 14px; }
.faq-list { list-style: none; padding-left: 0; }
.faq-list li { margin: 12px 0; }
.faq-list h4 { margin: 0 0 6px; font-size: 18px; }
.faq-list p { margin: 0; color: var(--muted); }

/* Responsive adjustments for new grids */
@media (max-width: 992px) {
  .country-grid, .app-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 720px) {
  .country-grid, .app-grid { grid-template-columns: 1fr; }
  .country-card img, .app-grid .tile img { height: 140px; }
}