/*
Theme Name: ArabClub Light
Theme URI: https://arabclub.nl
Author: ArabClub
Author URI: https://arabclub.nl
Description: A lightweight, fast Arabic RTL theme for ArabClub - horoscopes, tarot, and lifestyle content. Optimized for speed with minimal dependencies.
Version: 1.0.0
Requires at least: 6.0
Tested up to: 6.7
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: arabclub-light
Tags: rtl-language-support, right-to-left, blog, news, custom-menu, custom-logo, featured-images, translation-ready, one-column, two-columns
*/

/* ============================================
   CSS VARIABLES
   ============================================ */
:root {
  --ink: #1a1612;
  --parchment: #faf6f0;
  --sand: #f0e8da;
  --gold: #c8a45e;
  --gold-light: #e8d5a0;
  --gold-dark: #9a7b3a;
  --plum: #5c3d5e;
  --plum-light: #7a5a7c;
  --midnight: #1e1832;
  --star: #f4e3b2;
  --muted: #8c7e6e;
  --border: #e0d5c4;
  --white: #ffffff;
  --radius: 12px;
  --shadow-sm: 0 1px 3px rgba(26,22,18,0.06);
  --shadow-md: 0 4px 16px rgba(26,22,18,0.08);
  --shadow-lg: 0 8px 32px rgba(26,22,18,0.1);
  --transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

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

html { scroll-behavior: smooth; }

body {
  font-family: 'Noto Kufi Arabic', 'Amiri', sans-serif;
  background: var(--parchment);
  color: var(--ink);
  line-height: 1.8;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  direction: rtl;
}

a { color: inherit; text-decoration: none; transition: var(--transition); }
img { max-width: 100%; height: auto; display: block; }
ul, ol { list-style: none; }
h1, h2, h3, h4, h5, h6 { font-family: 'Amiri', serif; line-height: 1.5; }

.screen-reader-text {
  position: absolute; width: 1px; height: 1px;
  overflow: hidden; clip: rect(0,0,0,0);
  border: 0; padding: 0; margin: -1px;
}

/* ============================================
   LAYOUT
   ============================================ */
.container { max-width: 1200px; margin: 0 auto; padding: 0 24px; }

.content-grid {
  display: grid;
  grid-template-columns: 1fr 340px;
  gap: 32px;
  align-items: start;
}

/* ============================================
   HEADER
   ============================================ */
.site-header {
  background: var(--midnight);
  position: relative;
  overflow: hidden;
}

.header-stars {
  position: absolute;
  inset: 0;
  background-image:
    radial-gradient(1px 1px at 10% 20%, rgba(255,255,255,0.6) 0%, transparent 100%),
    radial-gradient(1.5px 1.5px at 30% 60%, rgba(255,255,255,0.4) 0%, transparent 100%),
    radial-gradient(1px 1px at 50% 10%, rgba(255,255,255,0.5) 0%, transparent 100%),
    radial-gradient(1.2px 1.2px at 70% 40%, rgba(255,255,255,0.3) 0%, transparent 100%),
    radial-gradient(1px 1px at 85% 70%, rgba(255,255,255,0.5) 0%, transparent 100%),
    radial-gradient(1.5px 1.5px at 20% 80%, rgba(255,255,255,0.35) 0%, transparent 100%),
    radial-gradient(1px 1px at 60% 85%, rgba(255,255,255,0.45) 0%, transparent 100%);
  animation: twinkle 4s ease-in-out infinite alternate;
}

@keyframes twinkle {
  0% { opacity: 0.6; }
  100% { opacity: 1; }
}

.header-inner {
  position: relative;
  z-index: 1;
  padding: 16px 0;
}

.top-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

/* Logo */
.site-logo {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--star);
}

.site-logo:hover { color: var(--gold-light); }

.logo-icon {
  width: 44px; height: 44px;
  display: flex; align-items: center; justify-content: center;
  font-size: 28px;
  filter: drop-shadow(0 0 8px rgba(200,164,94,0.5));
}

.logo-text {
  font-weight: 800;
  font-size: 1.35rem;
  font-family: 'Noto Kufi Arabic', sans-serif;
  letter-spacing: -0.02em;
}

.logo-text span {
  display: block;
  font-size: 0.65rem;
  font-weight: 300;
  color: var(--gold-light);
  letter-spacing: 0.15em;
  text-transform: uppercase;
}

.custom-logo-link img {
  max-height: 44px;
  width: auto;
}

/* Navigation */
.main-nav { padding: 8px 0 4px; }

.nav-menu {
  display: flex;
  gap: 4px;
  flex-wrap: wrap;
}

.nav-menu li { position: relative; }

.nav-menu a {
  display: block;
  padding: 6px 14px;
  color: rgba(255,255,255,0.7);
  font-size: 0.82rem;
  font-weight: 400;
  border-radius: 20px;
  white-space: nowrap;
}

.nav-menu a:hover,
.nav-menu .current-menu-item > a,
.nav-menu .current_page_item > a {
  color: var(--star);
  background: rgba(200,164,94,0.15);
}

/* Sub menus */
.nav-menu .sub-menu {
  display: none;
  position: absolute;
  top: 100%;
  right: 0;
  background: var(--midnight);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: var(--radius);
  min-width: 220px;
  padding: 8px;
  z-index: 100;
  box-shadow: var(--shadow-lg);
}

.nav-menu li:hover > .sub-menu { display: block; }

.nav-menu .sub-menu a {
  border-radius: 8px;
  padding: 8px 14px;
  font-size: 0.78rem;
}

/* Mobile menu toggle */
.menu-toggle {
  display: none;
  background: none;
  border: none;
  color: var(--star);
  font-size: 24px;
  cursor: pointer;
  padding: 8px;
  line-height: 1;
}

/* ============================================
   ZODIAC STRIP
   ============================================ */
.zodiac-strip {
  background: linear-gradient(180deg, var(--midnight) 0%, #2a2040 50%, var(--parchment) 100%);
  padding: 24px 0 48px;
  overflow: hidden;
}

.zodiac-grid {
  display: flex;
  gap: 12px;
  overflow-x: auto;
  padding: 0 24px 12px;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}
.zodiac-grid::-webkit-scrollbar { display: none; }

.zodiac-card {
  flex: 0 0 auto;
  width: 88px;
  text-align: center;
  scroll-snap-align: center;
  color: rgba(255,255,255,0.8);
  padding: 12px 8px;
  border-radius: var(--radius);
}

.zodiac-card:hover {
  background: rgba(200,164,94,0.12);
  color: var(--star);
  transform: translateY(-2px);
}

.zodiac-symbol {
  width: 52px; height: 52px;
  margin: 0 auto 8px;
  border-radius: 50%;
  background: rgba(200,164,94,0.1);
  border: 1.5px solid rgba(200,164,94,0.25);
  display: flex; align-items: center; justify-content: center;
  font-size: 22px;
  transition: var(--transition);
}

.zodiac-card:hover .zodiac-symbol {
  border-color: var(--gold);
  background: rgba(200,164,94,0.2);
  box-shadow: 0 0 16px rgba(200,164,94,0.25);
}

.zodiac-name { font-size: 0.72rem; font-weight: 600; line-height: 1.3; }
.zodiac-date { font-size: 0.6rem; color: rgba(255,255,255,0.4); margin-top: 2px; }

/* ============================================
   MAIN CONTENT AREA
   ============================================ */
.main-content {
  padding: 0 0 48px;
  margin-top: -24px;
}

/* Pages without zodiac strip need top spacing */
.page .main-content,
.single .main-content,
.search .main-content,
.archive .main-content,
.error404 .main-content {
  margin-top: 0;
  padding-top: 32px;
}

/* ============================================
   FEATURED POST
   ============================================ */
.featured-card {
  background: var(--white);
  border-radius: 16px;
  overflow: hidden;
  box-shadow: var(--shadow-lg);
  margin-bottom: 32px;
  animation: fadeUp 0.6s ease-out both;
}

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(16px); }
  to { opacity: 1; transform: translateY(0); }
}

.featured-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: linear-gradient(135deg, var(--gold), var(--gold-dark));
  color: white;
  font-size: 0.72rem;
  font-weight: 700;
  padding: 6px 16px;
  border-radius: 0 0 0 var(--radius);
}

.featured-thumb {
  width: 100%;
  aspect-ratio: 16/7;
  object-fit: cover;
}

.featured-body { padding: 24px 28px 28px; }

.featured-title {
  font-size: 1.6rem;
  font-weight: 700;
  margin-bottom: 12px;
}

.featured-title a:hover { color: var(--plum); }

.featured-meta {
  display: flex;
  align-items: center;
  gap: 16px;
  font-size: 0.78rem;
  color: var(--muted);
  margin-bottom: 16px;
}

.featured-excerpt {
  font-size: 0.92rem;
  color: #5a5248;
  line-height: 1.9;
}

.read-more {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 16px;
  padding: 10px 24px;
  background: var(--midnight);
  color: var(--star);
  font-size: 0.82rem;
  font-weight: 600;
  border-radius: 24px;
}

.read-more:hover {
  background: var(--plum);
  transform: translateX(-4px);
}

.read-more::before { content: '←'; transition: var(--transition); }
.read-more:hover::before { transform: translateX(-4px); }

/* ============================================
   SECTION TITLES
   ============================================ */
.section-title {
  font-size: 1.3rem;
  font-weight: 700;
  margin-bottom: 20px;
  padding-bottom: 12px;
  border-bottom: 2px solid var(--gold-light);
  display: flex;
  align-items: center;
  gap: 10px;
}

.section-title::before {
  content: '';
  width: 4px; height: 24px;
  background: var(--gold);
  border-radius: 2px;
  flex-shrink: 0;
}

/* ============================================
   POST LIST (archive/home)
   ============================================ */
.post-list { display: flex; flex-direction: column; gap: 16px; }

.post-item {
  display: grid;
  grid-template-columns: 100px 1fr;
  gap: 16px;
  background: var(--white);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
  animation: fadeUp 0.6s ease-out both;
}

.post-item:nth-child(1) { animation-delay: 0.1s; }
.post-item:nth-child(2) { animation-delay: 0.15s; }
.post-item:nth-child(3) { animation-delay: 0.2s; }
.post-item:nth-child(4) { animation-delay: 0.25s; }
.post-item:nth-child(5) { animation-delay: 0.3s; }

.post-item:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

.post-item a { color: inherit; }

.post-thumb {
  width: 100px; height: 100px;
  object-fit: cover;
  background: var(--sand);
}

.post-thumb-placeholder {
  width: 100px; height: 100px;
  background: var(--sand);
  display: flex; align-items: center; justify-content: center;
  font-size: 32px;
}

.post-info {
  padding: 12px 16px 12px 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.post-cat {
  font-size: 0.65rem;
  font-weight: 700;
  color: var(--gold-dark);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 4px;
}

.post-cat a { color: var(--gold-dark); }
.post-cat a:hover { color: var(--plum); }

.post-item-title {
  font-size: 0.95rem;
  font-weight: 700;
  line-height: 1.5;
}

.post-item-title a:hover { color: var(--plum); }

.post-date {
  font-size: 0.7rem;
  color: var(--muted);
  margin-top: 4px;
}

/* ============================================
   SINGLE POST
   ============================================ */
.single-post-header { margin-bottom: 24px; }

.single-post-title {
  font-size: 1.8rem;
  font-weight: 700;
  line-height: 1.5;
  margin-bottom: 12px;
  color: var(--ink);
}

.single-post-meta {
  display: flex;
  align-items: center;
  gap: 16px;
  font-size: 0.82rem;
  color: var(--muted);
  padding-bottom: 16px;
  margin-bottom: 20px;
  border-bottom: 1.5px solid var(--border);
}

.single-post-content {
  background: var(--white);
  padding: 32px;
  border-radius: 16px;
  box-shadow: var(--shadow-sm);
  margin-bottom: 32px;
}

.single-post-content .single-post-title {
  padding-bottom: 16px;
  border-bottom: 2px solid var(--gold-light);
  margin-bottom: 16px;
}

.single-post-content p {
  margin-bottom: 1.2em;
  font-size: 1rem;
  line-height: 2;
}

.single-post-content h2,
.single-post-content h3 {
  margin: 1.5em 0 0.8em;
  color: var(--ink);
}

.single-post-content h2 { font-size: 1.4rem; }
.single-post-content h3 { font-size: 1.15rem; }

.single-post-content img {
  border-radius: var(--radius);
  margin: 1em 0;
}

.single-post-content a { color: var(--plum); text-decoration: underline; }
.single-post-content a:hover { color: var(--gold-dark); }

.single-post-content ul,
.single-post-content ol {
  margin: 1em 0;
  padding-right: 24px;
  list-style: disc;
}

/* Post navigation */
.post-navigation {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-bottom: 32px;
}

.post-navigation a {
  display: block;
  padding: 16px 20px;
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  font-size: 0.85rem;
}

.post-navigation a:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

.nav-label {
  display: block;
  font-size: 0.7rem;
  color: var(--muted);
  margin-bottom: 4px;
}

/* ============================================
   SIDEBAR & WIDGETS
   ============================================ */
.sidebar { display: flex; flex-direction: column; gap: 24px; }

.widget {
  background: var(--white);
  border-radius: var(--radius);
  padding: 24px;
  box-shadow: var(--shadow-sm);
}

.widget-title,
.widget h3 {
  font-family: 'Amiri', serif;
  font-size: 1.05rem;
  font-weight: 700;
  margin-bottom: 16px;
  padding-bottom: 10px;
  border-bottom: 1.5px solid var(--border);
}

.widget ul { display: flex; flex-direction: column; }

.widget ul li {
  border-bottom: 1px solid var(--border);
}

.widget ul li:last-child { border-bottom: none; }

.widget ul li a {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 0;
  font-size: 0.85rem;
}

.widget ul li a:hover { color: var(--plum); padding-right: 8px; }

/* Tarot CTA Widget */
.tarot-cta {
  text-align: center;
  padding: 28px 20px;
  background: linear-gradient(135deg, var(--midnight) 0%, #2e2248 100%);
  border-radius: var(--radius);
  position: relative;
  overflow: hidden;
}

.tarot-cta::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    radial-gradient(1px 1px at 20% 30%, rgba(255,255,255,0.4) 0%, transparent 100%),
    radial-gradient(1px 1px at 70% 60%, rgba(255,255,255,0.3) 0%, transparent 100%),
    radial-gradient(1px 1px at 40% 80%, rgba(255,255,255,0.35) 0%, transparent 100%);
}

.tarot-icon { font-size: 48px; margin-bottom: 12px; position: relative; z-index: 1; }

.tarot-cta h3 {
  color: var(--star);
  font-family: 'Amiri', serif;
  font-size: 1.15rem;
  margin-bottom: 8px;
  position: relative;
  z-index: 1;
  border: none;
  padding: 0;
}

.tarot-cta p {
  color: rgba(255,255,255,0.6);
  font-size: 0.8rem;
  margin-bottom: 16px;
  position: relative;
  z-index: 1;
}

.tarot-btn {
  display: inline-block;
  padding: 10px 28px;
  background: var(--gold);
  color: var(--midnight);
  font-weight: 700;
  font-size: 0.82rem;
  border-radius: 24px;
  position: relative;
  z-index: 1;
}

.tarot-btn:hover { background: var(--star); transform: scale(1.05); }

/* ============================================
   PAGINATION
   ============================================ */
.pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
  margin-top: 32px;
}

.pagination .page-numbers {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px; height: 40px;
  border-radius: 50%;
  font-size: 0.85rem;
  font-weight: 600;
  background: var(--white);
  box-shadow: var(--shadow-sm);
}

.pagination .page-numbers.current {
  background: var(--midnight);
  color: var(--star);
}

.pagination .page-numbers:hover:not(.current) {
  background: var(--sand);
}

/* ============================================
   SEARCH FORM
   ============================================ */
.search-form {
  display: flex;
  gap: 0;
}

.search-form .search-field {
  flex: 1;
  padding: 10px 16px;
  border: 1.5px solid var(--border);
  border-radius: 0 var(--radius) var(--radius) 0;
  font-family: inherit;
  font-size: 0.85rem;
  background: var(--parchment);
  direction: rtl;
}

.search-form .search-field:focus {
  outline: none;
  border-color: var(--gold);
}

.search-form .search-submit {
  padding: 10px 20px;
  background: var(--midnight);
  color: var(--star);
  border: none;
  border-radius: var(--radius) 0 0 var(--radius);
  font-family: inherit;
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
}

.search-form .search-submit:hover { background: var(--plum); }

/* ============================================
   COMMENTS
   ============================================ */
.comments-area {
  background: var(--white);
  border-radius: var(--radius);
  padding: 24px;
  box-shadow: var(--shadow-sm);
}

.comments-title { font-size: 1.2rem; margin-bottom: 20px; }

.comment-list { margin-bottom: 24px; }

.comment-list .comment {
  padding: 16px 0;
  border-bottom: 1px solid var(--border);
}

.comment-author { font-weight: 700; font-size: 0.9rem; margin-bottom: 4px; }
.comment-meta { font-size: 0.72rem; color: var(--muted); margin-bottom: 8px; }
.comment-content p { font-size: 0.9rem; }

.comment-respond input[type="text"],
.comment-respond input[type="email"],
.comment-respond input[type="url"],
.comment-respond textarea {
  width: 100%;
  padding: 10px 16px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  font-family: inherit;
  font-size: 0.85rem;
  background: var(--parchment);
  margin-bottom: 12px;
  direction: rtl;
}

.comment-respond textarea { min-height: 120px; resize: vertical; }

.comment-respond input:focus,
.comment-respond textarea:focus {
  outline: none;
  border-color: var(--gold);
}

.comment-respond .submit {
  padding: 12px 32px;
  background: var(--midnight);
  color: var(--star);
  border: none;
  border-radius: 24px;
  font-family: inherit;
  font-weight: 700;
  font-size: 0.85rem;
  cursor: pointer;
}

.comment-respond .submit:hover { background: var(--plum); }

/* ============================================
   404 PAGE
   ============================================ */
.error-404 {
  text-align: center;
  padding: 80px 24px;
}

.error-404 .error-icon { font-size: 72px; margin-bottom: 24px; }
.error-404 h1 { font-size: 2rem; margin-bottom: 12px; }
.error-404 p { color: var(--muted); margin-bottom: 24px; }

/* ============================================
   FOOTER
   ============================================ */
.site-footer {
  background: var(--midnight);
  color: rgba(255,255,255,0.5);
  padding: 40px 0 24px;
  margin-top: 48px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 40px;
  margin-bottom: 32px;
}

.footer-brand .logo-text { font-size: 1.2rem; color: var(--star); }

.footer-desc {
  font-size: 0.82rem;
  line-height: 1.8;
  margin-top: 12px;
  color: rgba(255,255,255,0.4);
}

.footer-col-title {
  font-weight: 700;
  color: var(--star);
  font-size: 0.85rem;
  margin-bottom: 16px;
}

.footer-menu {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.footer-menu a {
  color: rgba(255,255,255,0.45);
  font-size: 0.8rem;
}

.footer-menu a:hover { color: var(--gold-light); }

.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.08);
  padding-top: 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.72rem;
}

.footer-bottom a { color: rgba(255,255,255,0.4); }

/* Footer widgets */
.footer-widgets .widget {
  background: transparent;
  padding: 0;
  box-shadow: none;
}

.footer-widgets .widget-title,
.footer-widgets .widget h3 {
  color: var(--star);
  border-bottom-color: rgba(255,255,255,0.1);
  font-size: 0.9rem;
}

.footer-widgets .widget ul li { border-bottom-color: rgba(255,255,255,0.06); }
.footer-widgets .widget ul li a { color: rgba(255,255,255,0.45); font-size: 0.8rem; }
.footer-widgets .widget ul li a:hover { color: var(--gold-light); }

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 900px) {
  .content-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; gap: 24px; }
  .post-navigation { grid-template-columns: 1fr; }
}

@media (max-width: 640px) {
  .menu-toggle { display: block; }

  .main-nav {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s ease;
  }

  .main-nav.open { max-height: 500px; }

  .nav-menu { flex-direction: column; gap: 0; }

  .nav-menu a {
    padding: 10px 14px;
    border-radius: 0;
    border-bottom: 1px solid rgba(255,255,255,0.06);
  }

  .nav-menu .sub-menu {
    position: static;
    border: none;
    padding: 0 16px;
    box-shadow: none;
  }

  .featured-title { font-size: 1.25rem; }
  .featured-body { padding: 20px; }

  .single-post-title { font-size: 1.4rem; }
  .single-post-content { padding: 20px; }

  .zodiac-card { width: 76px; }
  .zodiac-symbol { width: 44px; height: 44px; font-size: 18px; }

  .post-item { grid-template-columns: 80px 1fr; }
  .post-thumb, .post-thumb-placeholder { width: 80px; height: 80px; }

  .footer-bottom { flex-direction: column; gap: 8px; text-align: center; }
}

/* ============================================
   WORDPRESS ALIGNMENT CLASSES
   ============================================ */
.alignleft { float: right; margin: 0 0 1em 1.5em; }
.alignright { float: left; margin: 0 1.5em 1em 0; }
.aligncenter { display: block; margin: 1em auto; }
.alignwide { margin-right: -32px; margin-left: -32px; max-width: calc(100% + 64px); }
.alignfull { margin-right: -24px; margin-left: -24px; max-width: 100vw; width: 100vw; position: relative; right: 50%; margin-right: -50vw; }

.wp-caption { max-width: 100%; }
.wp-caption-text { font-size: 0.78rem; color: var(--muted); margin-top: 6px; text-align: center; }
.gallery { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin: 1em 0; }

/* ============================================
   PRINT
   ============================================ */
@media print {
  .site-header, .zodiac-strip, .sidebar, .site-footer, .post-navigation, .comments-area, .pagination { display: none; }
  body { background: white; }
  .single-post-content { box-shadow: none; }
}
