/*
Theme Name: Custom Juwa 2 Official
Theme URI: https://juwa2official.com
Author: Elric
Author URI: https://openai.com
Description: Custom dark WordPress theme for Juwa 2 Official with red preheader, dark header, dynamic content templates, and Juwa-style footer.
Version: 1.0.0
Text Domain: juwa2official
*/

:root {
  --bg: #050505;
  --bg-soft: #0b0b0b;
  --panel: #111111;
  --panel-2: #181818;
  --panel-3: #202020;
  --text: #ffffff;
  --muted: #b8b8b8;
  --muted-2: #8f8f8f;
  --border: rgba(255, 255, 255, 0.08);
  --border-2: rgba(255, 255, 255, 0.12);
  --red: #eb2424;
  --red-dark: #ca1d1d;
  --red-soft: #ff5959;
  --shadow: 0 16px 40px rgba(0, 0, 0, .35);
  --radius: 18px;
  --container: 1240px;
  --header-h: 84px;
}

* {
  box-sizing: border-box;
}

html {
  margin: 0;
  padding: 0;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--text);
  font-family: Arial, Helvetica, sans-serif;
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body.admin-bar .site-header {
  top: 32px;
}

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

a {
  color: var(--text);
  text-decoration: none;
  transition: .25s ease;
}

a:hover {
  opacity: .92;
}

.site-wrap {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: linear-gradient(180deg, #030303 0%, #070707 100%);
}

.site-main {
  flex: 1;
}

.container {
  width: min(var(--container), calc(100% - 32px));
  margin: 0 auto;
}

.narrow-container {
  width: min(920px, calc(100% - 32px));
  margin: 0 auto;
}

/* Preheader */
.site-preheader {
  background: var(--red);
  color: #fff;
  text-align: center;
  padding: 9px 16px;
  font-size: 14px;
  font-weight: 700;
  line-height: 1.3;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 999;
  background: #000;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.site-header-inner {
  min-height: var(--header-h);
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 24px;
}

.site-branding-wrap {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  min-width: 0;
}

.site-branding {
  display: flex;
  align-items: center;
  gap: 16px;
  min-width: 0;
}

.site-branding .custom-logo-link,
.footer-brand .custom-logo-link {
  display: block;
  line-height: 1;
}

.site-branding img,
.footer-brand img,
.site-branding .custom-logo,
.footer-brand .custom-logo {
  max-height: 44px;
  width: auto;
}

.site-title {
  margin: 0;
  font-size: 18px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .02em;
  line-height: 1.1;
  white-space: nowrap;
}

.site-title a {
  display: inline-block;
}

.main-navigation-wrap {
  display: flex;
  justify-content: center;
  align-items: center;
}

.main-navigation .menu {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 38px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.main-navigation .menu li {
  margin: 0;
  padding: 0;
  position: relative;
}

.main-navigation .menu a {
  color: #fff;
  font-size: 16px;
  font-weight: 700;
  display: inline-block;
  padding: 8px 0;
}

.main-navigation .current-menu-item>a::after,
.main-navigation .current_page_item>a::after,
.main-navigation .current-menu-ancestor>a::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -8px;
  height: 2px;
  background: var(--red);
}

.header-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
}

.btn-header-faq {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 8px 18px;
  border-radius: 12px;
  font-size: 14px;
  font-weight: 700;
  border: 1px solid rgba(255, 255, 255, .3);
  color: #fff;
  background: transparent;
  transition: .25s ease;
}

.btn-header-faq:hover {
  background: rgba(255, 255, 255, .08);
  opacity: 1;
}

.btn-header-play {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 8px 20px;
  border-radius: 12px;
  font-size: 14px;
  font-weight: 700;
  background: var(--red);
  color: #fff;
  border: 1px solid var(--red);
  transition: .25s ease;
}

.btn-header-play:hover {
  opacity: .9;
}

.btn-header-play svg {
  flex-shrink: 0;
}

.menu-toggle {
  display: none;
  background: none;
  border: 1px solid rgba(255, 255, 255, .18);
  color: #fff;
  padding: 8px 10px;
  border-radius: 10px;
  cursor: pointer;
  font-weight: 700;
  line-height: 1;
}

/* Shared content */
.content-area {
  padding: 62px 0;
}

.page-header,
.entry-header,
.archive-header {
  margin-bottom: 28px;
}

.page-title,
.entry-title,
.archive-title {
  margin: 0 0 12px;
  font-size: clamp(30px, 4vw, 46px);
  line-height: 1.08;
  font-weight: 900;
  letter-spacing: -.02em;
}

.entry-meta,
.archive-description,
.page-intro {
  color: var(--muted);
  font-size: 15px;
}

.page-content,
.entry-content,
.archive-content {
  color: #ececec;
  font-size: 16px;
}

.page-content p,
.entry-content p {
  margin: 0 0 18px;
}

.page-content a,
.entry-content a {
  color: var(--red-soft);
}

.page-content h2,
.entry-content h2,
.page-content h3,
.entry-content h3,
.page-content h4,
.entry-content h4 {
  margin: 30px 0 12px;
  line-height: 1.2;
}

.page-content ul,
.entry-content ul,
.page-content ol,
.entry-content ol {
  margin: 0 0 20px 24px;
}

/* Front page */
.home-hero {
  position: relative;
  min-height: min(78vh, 860px);
  display: flex;
  align-items: center;
  overflow: hidden;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.home-hero video,
.home-hero .hero-fallback {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.home-hero .hero-fallback {
  background: radial-gradient(circle at center, #191919 0%, #070707 70%, #000 100%);
}

.home-hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(0, 0, 0, .82) 0%, rgba(0, 0, 0, .58) 44%, rgba(0, 0, 0, .78) 100%), linear-gradient(180deg, rgba(0, 0, 0, .2) 0%, rgba(0, 0, 0, .55) 100%);
}

.home-hero-inner {
  position: relative;
  z-index: 2;
  padding: 110px 0 96px;
}

.home-hero-copy {
  max-width: 740px;
}

.hero-kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  border-radius: 999px;
  background: rgba(255, 255, 255, .07);
  border: 1px solid rgba(255, 255, 255, .13);
  color: #fff;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: .04em;
  text-transform: uppercase;
  margin-bottom: 20px;
}

.home-hero-title {
  margin: 0;
  font-size: clamp(40px, 6.5vw, 72px);
  line-height: 1.02;
  font-weight: 900;
  letter-spacing: -.04em;
}

.home-hero-text {
  margin: 18px 0 0;
  max-width: 680px;
  color: #ebebeb;
  font-size: 18px;
}

.hero-buttons {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  margin-top: 28px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 50px;
  padding: 0 24px;
  border-radius: 999px;
  font-weight: 800;
  border: 1px solid transparent;
  transition: .25s ease;
}

.btn:hover {
  transform: translateY(-2px);
  opacity: 1;
}

.btn-primary {
  background: linear-gradient(135deg, var(--red) 0%, #ff4b4b 100%);
  color: #fff;
  box-shadow: 0 12px 26px rgba(235, 36, 36, .24);
}

.btn-secondary {
  background: rgba(255, 255, 255, .04);
  border-color: rgba(255, 255, 255, .18);
  color: #fff;
}

.home-editor-section {
  padding: 70px 0;
}

.home-panel {
  background: linear-gradient(180deg, var(--panel-2) 0%, var(--panel) 100%);
  border: 1px solid var(--border);
  border-radius: 24px;
  box-shadow: var(--shadow);
  padding: 30px;
}

.home-latest-posts {
  padding: 70px 0 10px;
}

.section-heading {
  text-align: center;
  margin-bottom: 26px;
}

.section-heading h2 {
  margin: 0 0 10px;
  font-size: clamp(28px, 4vw, 42px);
  line-height: 1.08;
  font-weight: 900;
  letter-spacing: -.02em;
}

.section-heading p {
  margin: 0;
  color: var(--muted);
  font-size: 16px;
}

.posts-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.post-card {
  background: linear-gradient(180deg, var(--panel-2) 0%, var(--panel) 100%);
  border: 1px solid var(--border);
  border-radius: 22px;
  overflow: hidden;
  box-shadow: var(--shadow);
}

.post-card-thumb img {
  width: 100%;
  aspect-ratio: 16/10;
  object-fit: cover;
}

.post-card-content {
  padding: 22px;
}

.post-card-meta {
  color: var(--muted);
  font-size: 13px;
  margin-bottom: 10px;
}

.post-card-title {
  margin: 0 0 12px;
  font-size: 24px;
  line-height: 1.18;
  font-weight: 800;
}

.post-card-title a {
  color: #fff;
}

.post-card-excerpt {
  color: #e7e7e7;
  margin-bottom: 18px;
  font-size: 15px;
}

.read-more {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 16px;
  border-radius: 999px;
  background: var(--red);
  color: #fff;
  font-weight: 800;
}

/* Footer */
.site-footer {
  margin-top: 70px;
  background: #000;
  border-top: 1px solid rgba(255, 255, 255, .06);
}

.footer-top {
  padding: 50px 0 30px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.45fr .85fr .85fr;
  gap: 28px;
  align-items: start;
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: 14px;
}

.footer-brand-text {
  font-size: 16px;
  font-weight: 800;
  text-transform: uppercase;
}

.footer-copy {
  margin-top: 12px;
  color: var(--muted);
  font-size: 14px;
}

.footer-col h3 {
  margin: 0 0 14px;
  font-size: 16px;
  font-weight: 800;
  text-transform: uppercase;
}

.footer-col ul,
.footer-col .menu {
  list-style: none;
  margin: 0;
  padding: 0;
}

.footer-col li {
  margin: 0 0 10px;
}

.footer-col a {
  color: #fff;
  font-size: 15px;
}

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, .06);
  padding: 16px 0 20px;
}

.footer-bottom-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 18px;
  flex-wrap: wrap;
}

.footer-warning {
  color: #fff;
  font-size: 14px;
  font-weight: 700;
}

.footer-legal {
  color: var(--muted);
  font-size: 14px;
}

/* Core */
.wp-block-image,
figure {
  margin: 0 0 20px;
}

.wp-block-button__link,
.wp-element-button {
  border-radius: 999px;
  font-weight: 800;
}

blockquote {
  margin: 24px 0;
  padding: 18px 22px;
  border-left: 4px solid var(--red);
  background: rgba(255, 255, 255, .03);
  border-radius: 0 14px 14px 0;
}

hr {
  border: none;
  border-top: 1px solid rgba(255, 255, 255, .08);
  margin: 30px 0;
}

input,
textarea,
select {
  width: 100%;
  background: #0f0f0f;
  color: #fff;
  border: 1px solid rgba(255, 255, 255, .1);
  border-radius: 12px;
  padding: 14px 16px;
}

button,
input[type="submit"] {
  background: var(--red);
  color: #fff;
  border: none;
  border-radius: 999px;
  padding: 12px 20px;
  font-weight: 800;
  cursor: pointer;
}

@media (max-width: 1100px) {
  .main-navigation .menu {
    gap: 26px;
  }

  .posts-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 860px) {
  body.admin-bar .site-header {
    top: 46px;
  }

  .site-header-inner {
    grid-template-columns: 1fr auto;
    gap: 16px;
    min-height: 76px;
  }

  .main-navigation-wrap {
    order: 3;
    grid-column: 1 / -1;
    justify-content: flex-start;
  }

  .menu-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }

  .main-navigation {
    display: none;
    width: 100%;
    background: #000;
    border-top: 1px solid rgba(255, 255, 255, .06);
    padding: 8px 0 14px;
  }

  .main-navigation.active {
    display: block;
  }

  .main-navigation .menu {
    flex-direction: column;
    align-items: flex-start;
    gap: 0;
  }

  .main-navigation .menu li {
    width: 100%;
  }

  .main-navigation .menu a {
    display: block;
    width: 100%;
    padding: 12px 0;
  }

  .main-navigation .current-menu-item>a::after,
  .main-navigation .current_page_item>a::after,
  .main-navigation .current-menu-ancestor>a::after {
    display: none;
  }

  .btn-header-faq {
    display: none;
  }

  .posts-grid {
    grid-template-columns: 1fr;
  }

  .footer-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .site-title {
    font-size: 16px;
    max-width: 190px;
    white-space: normal;
  }

  .site-branding img,
  .site-branding .custom-logo,
  .footer-brand img,
  .footer-brand .custom-logo {
    max-height: 38px;
  }

  .home-hero-inner {
    padding: 90px 0 78px;
  }

  .home-hero-title {
    font-size: 42px;
  }

  .home-hero-text {
    font-size: 16px;
  }

  .content-area,
  .home-editor-section,
  .home-latest-posts {
    padding: 56px 0;
  }

  .home-panel {
    padding: 22px;
  }

  .footer-bottom-inner {
    flex-direction: column;
    align-items: flex-start;
  }

  .site-preheader {
    font-size: 12px;
    padding: 9px 10px;
  }
}

/* ═══ WhatsApp Floating Widget ═══════════════════════════════ */
.floating-socials {
  position: fixed;
  bottom: 20px;
  right: 20px;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.floating-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  box-shadow: 0 4px 20px rgba(0, 0, 0, .4);
  transition: all .3s ease;
  position: relative;
}

.floating-btn:hover {
  transform: scale(1.1);
  opacity: 1;
}

.floating-btn:active {
  transform: scale(.95);
}

.floating-whatsapp {
  background: #25D366;
}

.floating-ping {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: #25D366;
  animation: float-ping 2s cubic-bezier(0, 0, .2, 1) infinite;
  pointer-events: none;
}

@keyframes float-ping {
  0% {
    opacity: .5;
    transform: scale(1);
  }

  75%,
  100% {
    opacity: 0;
    transform: scale(1.6);
  }
}

/* ═══ Full-Width Content Support ═════════════════════════════ */
.page-content .full-width-section,
.entry-content .full-width-section {
  width: 100vw;
  position: relative;
  left: 50%;
  right: 50%;
  margin-left: -50vw;
  margin-right: -50vw;
}

.home-panel.full-width-panel {
  border-radius: 0;
  border-left: none;
  border-right: none;
}