/*
Theme Name: WorldWide10
Theme URI: https://worldwide10.com/
Description: Custom magazine theme for WorldWide10 — brand teal & black, white header with category dropdown, hero slider, auto-sliding category carousel, ad placement zones, animations. Rank Math compatible.
Author: WorldWide10
Version: 1.1.0
Requires at least: 6.0
Tested up to: 6.8
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: worldwide10
*/

/* =====================================================
   TOKENS — from logo: teal #009999 on black
   ===================================================== */
:root {
  --teal:     #009999;
  --teal-dk:  #007A7A;
  --teal-deep:#005C5C;
  --ink:      #0B0F12;
  --paper:    #FAFBFC;
  --gray:     #5C6B78;
  --hairline: #E3E8EC;
  --card:     #FFFFFF;

  --font-display: 'Space Grotesk', -apple-system, sans-serif;
  --font-body:    'Inter', -apple-system, BlinkMacSystemFont, sans-serif;

  --max: 1200px;
  --radius: 14px;
  --shadow: 0 10px 34px rgba(11,15,18,.09);
  --shadow-teal: 0 10px 30px rgba(0,153,153,.22);
}

/* =====================================================
   RESET / BASE
   ===================================================== */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
body {
  margin: 0; font-family: var(--font-body); font-size: 16.5px; line-height: 1.65;
  color: var(--ink); background: var(--paper);
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--teal-dk); text-decoration: none; }
a:hover { color: var(--ink); }
h1,h2,h3,h4,h5 {
  font-family: var(--font-display); font-weight: 700; line-height: 1.12;
  letter-spacing: -0.02em; margin: 1.3em 0 .45em;
}
h1 { font-size: clamp(1.9rem, 4.6vw, 3.1rem); }
h2 { font-size: clamp(1.4rem, 3vw, 1.9rem); }
h3 { font-size: 1.22rem; }
.wrap { max-width: var(--max); margin: 0 auto; padding: 0 20px; }
:focus-visible { outline: 3px solid var(--teal); outline-offset: 2px; }
.skip-link { position: absolute; left: -9999px; top: 0; background: var(--ink); color: #fff; padding: 10px 18px; z-index: 1000; }
.skip-link:focus { left: 0; color: #fff; }

/* =====================================================
   SCROLL-IN ANIMATIONS
   ===================================================== */
@keyframes ww10-up { from { opacity: 0; transform: translateY(22px); } to { opacity: 1; transform: none; } }
.anim { opacity: 0; }
.anim.in { animation: ww10-up .6s cubic-bezier(.2,.7,.3,1) forwards; }
.anim.d1.in { animation-delay: .08s; } .anim.d2.in { animation-delay: .16s; } .anim.d3.in { animation-delay: .24s; }

/* =====================================================
   HEADER — white, sticky, compact
   ===================================================== */
.site-head {
  background: #fff; position: sticky; top: 0; z-index: 900;
  border-bottom: 1px solid var(--hairline);
  box-shadow: 0 2px 14px rgba(11,15,18,.05);
}
.site-head-inner {
  display: flex; align-items: center; justify-content: space-between;
  gap: 18px; padding: 10px 20px; max-width: var(--max); margin: 0 auto;
}
.brand a { display: flex; align-items: center; gap: 10px; font-family: var(--font-display); font-weight: 700; font-size: 1.25rem; color: var(--ink); letter-spacing: -0.02em; }
.brand img { max-height: 46px; width: auto; }
.brand .brand-10 { background: var(--teal); color: #fff; padding: 1px 8px; border-radius: 7px; font-size: 1.05rem; }

.nav-main ul { display: flex; list-style: none; margin: 0; padding: 0; gap: 2px; }
.nav-main li { position: relative; }
.nav-main a {
  display: block; color: #33424E; font-size: .9rem; font-weight: 600;
  padding: 9px 12px; border-radius: 8px; transition: .15s;
}
.nav-main a:hover { color: var(--teal-dk); background: rgba(0,153,153,.08); }

/* Working dropdown */
.nav-main .menu-item-has-children > a::after,
.nav-main .page_item_has_children > a::after {
  content: ""; display: inline-block; margin-left: 6px;
  border: 4px solid transparent; border-top-color: currentColor; vertical-align: 2px;
}
.nav-main .sub-menu, .nav-main .children {
  display: block; visibility: hidden; opacity: 0; transform: translateY(8px);
  position: absolute; top: 100%; left: 0; min-width: 220px;
  background: #fff; border: 1px solid var(--hairline); border-radius: 12px;
  box-shadow: var(--shadow); padding: 8px; margin: 0; list-style: none;
  transition: opacity .18s ease, transform .18s ease, visibility .18s;
  max-height: 70vh; overflow-y: auto; z-index: 950;
}
.nav-main li:hover > .sub-menu, .nav-main li:focus-within > .sub-menu,
.nav-main li:hover > .children, .nav-main li:focus-within > .children {
  visibility: visible; opacity: 1; transform: translateY(0);
}
.nav-main .sub-menu a, .nav-main .children a { padding: 9px 12px; border-radius: 8px; font-weight: 500; }

.head-actions { display: flex; align-items: center; gap: 8px; }
.search-toggle, .menu-toggle { background: none; border: 0; color: #33424E; cursor: pointer; padding: 8px; border-radius: 8px; display: flex; }
.search-toggle:hover, .menu-toggle:hover { color: var(--teal-dk); background: rgba(0,153,153,.08); }
.menu-toggle { display: none; }

.search-bar { display: none; background: #fff; border-top: 1px solid var(--hairline); padding: 14px 20px; }
.search-bar.open { display: block; }
.search-bar form { max-width: 640px; margin: 0 auto; display: flex; gap: 10px; }
.search-bar input[type=search] { flex: 1; padding: 12px 16px; border-radius: 10px; border: 1.5px solid var(--hairline); font-size: 1rem; }
.search-bar button { background: var(--teal); color: #fff; border: 0; font-weight: 700; padding: 12px 22px; border-radius: 10px; cursor: pointer; }
.search-bar button:hover { background: var(--teal-dk); }

@media (max-width: 900px) {
  .menu-toggle { display: flex; }
  .nav-main { display: none; position: absolute; top: 100%; left: 0; right: 0; background: #fff; border-top: 1px solid var(--hairline); padding: 10px 20px 18px; box-shadow: var(--shadow); max-height: 75vh; overflow-y: auto; }
  .nav-main.open { display: block; }
  .nav-main ul { flex-direction: column; gap: 0; }
  .nav-main a { padding: 12px 8px; font-size: 1rem; }
  .nav-main .sub-menu, .nav-main .children { position: static; visibility: visible; opacity: 1; transform: none; box-shadow: none; border: 0; padding-left: 16px; max-height: none; }
}

/* =====================================================
   AD ZONES — clean, labeled placements
   ===================================================== */
.ad-zone { margin: 26px auto; text-align: center; }
.ad-zone .ad-label {
  display: block; font-size: .64rem; letter-spacing: .14em; text-transform: uppercase;
  color: #A5B1BB; margin-bottom: 6px;
}
.ad-zone > div, .ad-zone ins { margin: 0 auto; }
.ad-below-header { max-width: 970px; padding: 0 20px; }
.ad-in-content { max-width: 720px; }
.ad-below-post { max-width: 720px; margin: 34px auto; }
.ad-footer { max-width: 970px; padding: 0 20px; }

/* =====================================================
   BREADCRUMBS
   ===================================================== */
.crumbs { font-size: .82rem; color: var(--gray); margin: 14px 0 0; }
.crumbs a { color: var(--gray); }
.crumbs a:hover { color: var(--teal-dk); }

/* =====================================================
   HERO SLIDER
   ===================================================== */
.hero { position: relative; background: var(--ink); color: #fff; overflow: hidden; }
.hero-track { display: flex; transition: transform .6s cubic-bezier(.3,.7,.3,1); }
.hero-slide { flex: 0 0 100%; }
.hero-inner {
  max-width: var(--max); margin: 0 auto; padding: 42px 20px 52px;
  display: grid; grid-template-columns: 1.1fr .9fr; gap: 40px; align-items: center;
}
.hero-kicker { display: inline-flex; align-items: center; gap: 8px; color: var(--teal); font-weight: 700; font-size: .78rem; text-transform: uppercase; letter-spacing: .14em; margin-bottom: 12px; }
.hero-kicker::before { content: ""; width: 26px; height: 3px; background: var(--teal); }
.hero h2.hero-title { margin: 0 0 14px; color: #fff; font-size: clamp(1.7rem, 4.2vw, 2.8rem); }
.hero h2.hero-title a { color: #fff; }
.hero h2.hero-title a:hover { color: var(--teal); }
.hero-excerpt { color: #AEBDC7; font-size: .98rem; max-width: 52ch; }
.hero-cta { display: inline-block; margin-top: 20px; background: var(--teal); color: #fff; font-weight: 700; padding: 12px 24px; border-radius: 10px; transition: .15s; }
.hero-cta:hover { background: #fff; color: var(--ink); }
.hero-media img { border-radius: var(--radius); box-shadow: var(--shadow-teal); aspect-ratio: 16/10; object-fit: cover; width: 100%; }

.hero-dots { position: absolute; bottom: 16px; left: 50%; transform: translateX(-50%); display: flex; gap: 8px; z-index: 5; }
.hero-dots button { width: 9px; height: 9px; border-radius: 50%; border: 0; background: rgba(255,255,255,.35); cursor: pointer; padding: 0; transition: .2s; }
.hero-dots button.on { background: var(--teal); width: 24px; border-radius: 6px; }
.hero-arrows button {
  position: absolute; top: 50%; transform: translateY(-50%); z-index: 5;
  background: rgba(255,255,255,.1); color: #fff; border: 0; width: 40px; height: 40px;
  border-radius: 50%; cursor: pointer; font-size: 1.1rem; transition: .2s;
}
.hero-arrows button:hover { background: var(--teal); }
.hero-prev { left: 14px; } .hero-next { right: 14px; }
@media (max-width: 880px) {
  .hero-inner { grid-template-columns: 1fr; padding: 32px 20px 46px; gap: 20px; }
  .hero-media { order: -1; }
  .hero-arrows { display: none; }
}

/* =====================================================
   SECTION HEADINGS
   ===================================================== */
.sec-head { display: flex; align-items: baseline; justify-content: space-between; margin: 44px 0 20px; gap: 16px; }
.sec-head h2 { margin: 0; }
.sec-head h2 span { color: var(--teal-dk); }
.sec-head .sec-more { font-size: .88rem; font-weight: 700; white-space: nowrap; }

/* =====================================================
   TRENDING (numbered strip)
   ===================================================== */
.trend-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 16px; }
.trend-item { position: relative; padding-top: 6px; }
.trend-num { font-family: var(--font-display); font-weight: 700; font-size: 2.8rem; line-height: 1; color: var(--teal); letter-spacing: -0.04em; }
.trend-item h3 { font-size: .98rem; margin: 8px 0 5px; }
.trend-item h3 a { color: var(--ink); }
.trend-item h3 a:hover { color: var(--teal-dk); }
.trend-item .meta { font-size: .78rem; color: var(--gray); }
.trend-item + .trend-item { border-left: 1px solid var(--hairline); padding-left: 16px; }
@media (max-width: 980px) { .trend-grid { grid-template-columns: repeat(2, 1fr); } .trend-item + .trend-item { border-left: 0; padding-left: 0; } }
@media (max-width: 540px) { .trend-grid { grid-template-columns: 1fr; } }

/* =====================================================
   CATEGORY SLIDER — auto-sliding, graphic tiles
   ===================================================== */
.cat-slider { position: relative; overflow: hidden; margin-bottom: 30px; }
.cat-track { display: flex; gap: 16px; will-change: transform; }
.cat-tile {
  flex: 0 0 200px; border-radius: var(--radius); padding: 22px 18px 18px;
  color: #fff; position: relative; overflow: hidden; min-height: 130px;
  display: flex; flex-direction: column; justify-content: flex-end;
  background: linear-gradient(145deg, var(--teal-deep), var(--teal));
  transition: transform .25s, box-shadow .25s;
}
.cat-tile:nth-child(3n) { background: linear-gradient(145deg, #0B0F12, var(--teal-deep)); }
.cat-tile:nth-child(3n+1) { background: linear-gradient(145deg, var(--teal-dk), #00B3B3); }
.cat-tile:hover { transform: translateY(-4px); box-shadow: var(--shadow-teal); color: #fff; }
.cat-tile .cat-emoji { font-size: 2rem; line-height: 1; margin-bottom: auto; }
.cat-tile .cat-name { font-family: var(--font-display); font-weight: 700; font-size: 1.05rem; }
.cat-tile .cat-count { font-size: .76rem; opacity: .85; }
.cat-tile::after {
  content: "10"; position: absolute; right: -8px; top: -18px;
  font-family: var(--font-display); font-weight: 700; font-size: 5rem;
  color: rgba(255,255,255,.08); line-height: 1; pointer-events: none;
}

/* =====================================================
   POST CARDS
   ===================================================== */
.card-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
@media (max-width: 980px) { .card-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 620px) { .card-grid { grid-template-columns: 1fr; } }
.post-card {
  background: var(--card); border: 1px solid var(--hairline); border-radius: var(--radius);
  overflow: hidden; transition: box-shadow .22s, transform .22s;
  display: flex; flex-direction: column;
}
.post-card:hover { box-shadow: var(--shadow); transform: translateY(-4px); }
.post-card .card-thumb { aspect-ratio: 16/9; object-fit: cover; width: 100%; transition: transform .35s; }
.post-card:hover .card-thumb { transform: scale(1.03); }
.post-card a.thumb-link { overflow: hidden; display: block; }
.post-card .card-body { padding: 15px 18px 18px; display: flex; flex-direction: column; gap: 7px; flex: 1; }
.post-card .card-cat { font-size: .7rem; text-transform: uppercase; letter-spacing: .1em; font-weight: 700; color: var(--teal-dk); }
.post-card h3 { margin: 0; font-size: 1.06rem; }
.post-card h3 a { color: var(--ink); }
.post-card h3 a:hover { color: var(--teal-dk); }
.post-card .card-meta { margin-top: auto; font-size: .78rem; color: var(--gray); }

/* =====================================================
   SINGLE POST
   ===================================================== */
.single-hero { max-width: 800px; margin: 0 auto; padding: 26px 20px 0; }
.single-hero .post-cat { font-size: .76rem; font-weight: 700; text-transform: uppercase; letter-spacing: .12em; color: var(--teal-dk); }
.single-hero h1 { margin: 10px 0 12px; }
.single-hero .post-meta { color: var(--gray); font-size: .86rem; display: flex; flex-wrap: wrap; gap: 14px; }
.single-hero .post-meta .updated { color: var(--teal-dk); font-weight: 600; }
.single-feature { max-width: 980px; margin: 22px auto 0; padding: 0 20px; }
.single-feature img { border-radius: var(--radius); width: 100%; }
.entry { max-width: 720px; margin: 0 auto; padding: 8px 20px 36px; }
.entry > p:first-of-type { font-size: 1.1rem; }
.entry img { border-radius: 10px; margin: 8px 0; }
.entry blockquote { border-left: 4px solid var(--teal); margin: 1.5em 0; padding: 6px 0 6px 20px; color: var(--gray); font-style: italic; }
.entry table { border-collapse: collapse; width: 100%; font-size: .9rem; }
.entry table th, .entry table td { border: 1px solid var(--hairline); padding: 9px 12px; text-align: left; }
.entry table th { background: #EDF4F4; font-family: var(--font-display); }

.share { display: flex; gap: 9px; flex-wrap: wrap; margin: 30px 0; align-items: center; }
.share .share-label { font-weight: 700; font-size: .88rem; }
.share a { display: inline-flex; align-items: center; padding: 8px 14px; border-radius: 8px; color: #fff; font-size: .8rem; font-weight: 700; transition: .15s; }
.share a:hover { opacity: .85; color: #fff; transform: translateY(-2px); }
.share a.tw { background: #000; } .share a.fb { background: #1877F2; } .share a.wa { background: #25D366; }
.share a.pin { background: #E60023; } .share a.li { background: #0A66C2; }

.signup { background: var(--ink); color: #fff; border-radius: var(--radius); padding: 30px 26px; margin: 36px 0; text-align: center; position: relative; overflow: hidden; }
.signup::after { content: "10"; position: absolute; right: -10px; bottom: -32px; font-family: var(--font-display); font-weight: 700; font-size: 8.5rem; color: rgba(0,153,153,.18); line-height: 1; pointer-events: none; }
.signup h3 { color: #fff; margin: 0 0 6px; font-size: 1.32rem; }
.signup p { margin: 0 0 16px; color: #AEBDC7; font-size: .93rem; }
.signup form { display: flex; gap: 10px; max-width: 460px; margin: 0 auto; flex-wrap: wrap; justify-content: center; position: relative; z-index: 1; }
.signup input[type=email] { flex: 1 1 220px; padding: 12px 15px; border-radius: 10px; border: 0; font-size: 1rem; }
.signup button { background: var(--teal); color: #fff; border: 0; font-weight: 700; padding: 12px 24px; border-radius: 10px; cursor: pointer; font-size: 1rem; transition: .15s; }
.signup button:hover { background: #fff; color: var(--ink); }

.author-box { display: flex; gap: 16px; align-items: flex-start; background: var(--card); border: 1px solid var(--hairline); border-radius: var(--radius); padding: 20px; margin: 32px 0; }
.author-box img { width: 64px; height: 64px; border-radius: 50%; object-fit: cover; flex-shrink: 0; }
.author-box .a-name { font-family: var(--font-display); font-weight: 700; margin: 0 0 4px; font-size: 1.02rem; }
.author-box .a-name a { color: var(--ink); }
.author-box .a-desc { margin: 0; font-size: .9rem; color: var(--gray); }

.related { margin: 42px 0 18px; }
.related h3 { font-size: 1.42rem; margin: 0 0 18px; }
.related h3 span { color: var(--teal-dk); }

#totop { position: fixed; bottom: 24px; right: 24px; z-index: 950; width: 46px; height: 46px; border-radius: 12px; background: var(--teal); color: #fff; border: 0; cursor: pointer; font-size: 1.2rem; display: none; align-items: center; justify-content: center; box-shadow: var(--shadow-teal); transition: .15s; }
#totop:hover { background: var(--ink); }
#totop.show { display: flex; }

/* =====================================================
   ARCHIVE / SEARCH / PAGINATION / 404
   ===================================================== */
.archive-head { padding: 38px 0 4px; }
.archive-head .kicker { color: var(--teal-dk); font-weight: 700; font-size: .78rem; text-transform: uppercase; letter-spacing: .12em; }
.archive-head h1 { margin: 8px 0 6px; }
.archive-head p { color: var(--gray); max-width: 60ch; margin: 0; }
.pagination { display: flex; gap: 8px; justify-content: center; margin: 40px 0 64px; flex-wrap: wrap; }
.pagination .page-numbers { padding: 9px 15px; border: 1.5px solid var(--hairline); border-radius: 10px; font-weight: 600; color: var(--ink); font-size: .88rem; }
.pagination .page-numbers.current { background: var(--teal); color: #fff; border-color: var(--teal); }
.pagination .page-numbers:hover:not(.current) { border-color: var(--teal); color: var(--teal-dk); }
.err-404 { text-align: center; padding: 80px 20px 100px; }
.err-404 .big { font-family: var(--font-display); font-weight: 700; font-size: clamp(6rem, 18vw, 10rem); line-height: 1; color: var(--teal); letter-spacing: -0.05em; }
.err-404 p { color: var(--gray); }

/* =====================================================
   FOOTER — with logo + social
   ===================================================== */
.site-foot { background: var(--ink); color: #AEBDC7; margin-top: 70px; }
.foot-inner { max-width: var(--max); margin: 0 auto; padding: 48px 20px 26px; display: grid; grid-template-columns: 1.3fr 1fr 1fr; gap: 36px; }
.site-foot h4 { color: #fff; margin: 0 0 12px; font-size: .98rem; }
.site-foot ul { list-style: none; margin: 0; padding: 0; }
.site-foot li { margin: 0 0 8px; }
.site-foot a { color: #AEBDC7; font-size: .9rem; }
.site-foot a:hover { color: var(--teal); }
.foot-logo img { max-width: 120px; }
.foot-brand { font-family: var(--font-display); font-weight: 700; font-size: 1.25rem; color: #fff; display: flex; gap: 8px; align-items: center; margin-top: 12px; }
.foot-brand .brand-10 { background: var(--teal); color: #fff; padding: 1px 8px; border-radius: 7px; font-size: 1.05rem; }
.foot-tagline { font-size: .88rem; margin-top: 10px; max-width: 34ch; }
.foot-social { display: flex; gap: 10px; margin-top: 16px; }
.foot-social a { display: inline-flex; align-items: center; justify-content: center; width: 38px; height: 38px; border-radius: 10px; background: rgba(255,255,255,.08); color: #fff; transition: .15s; }
.foot-social a:hover { background: var(--teal); color: #fff; transform: translateY(-2px); }
.foot-base { border-top: 1px solid rgba(255,255,255,.1); text-align: center; padding: 18px 20px; font-size: .8rem; color: #7C8B98; }
@media (max-width: 760px) { .foot-inner { grid-template-columns: 1fr; gap: 26px; } }

/* =====================================================
   WP CORE CLASSES
   ===================================================== */
.alignleft { float: left; margin: 6px 24px 12px 0; }
.alignright { float: right; margin: 6px 0 12px 24px; }
.aligncenter { display: block; margin: 12px auto; }
.wp-caption { max-width: 100%; }
.wp-caption-text { font-size: .8rem; color: var(--gray); text-align: center; margin-top: 6px; }
.screen-reader-text { clip: rect(1px,1px,1px,1px); position: absolute !important; height: 1px; width: 1px; overflow: hidden; word-wrap: normal !important; }
.sticky {} .bypostauthor {} .gallery-caption {}
