/*
Theme Name: CAGOR
Theme URI: https://cagor.net
Author: CAGOR - Chambre d Agriculture
Description: Theme WordPress institutionnel bilingue (FR/AR) pour la Chambre d Agriculture de la Region de l Oriental
Version: 1.1.0
Text Domain: cagor
Tags: bilingual, rtl-language-support, accessibility-ready, custom-header
Requires at least: 6.0
Requires PHP: 8.0
License: GNU General Public License v2 or later
*/

/* ===== DESIGN TOKENS ===== */
:root {
  --primary: #0A3D2E;
  --primary-dark: #051F1A;
  --secondary: #14532D;
  --accent: #D4A017;
  --accent-light: #E8B928;
  --cream: #FFF9F0;
  --white: #FFFFFF;
  --light-gray: #F5F5F5;
  --gray: #6B7280;
  --dark-gray: #1F2937;
  --success: #10B981;
  --error: #EF4444;
  --shadow-sm: 0 1px 2px rgba(0,0,0,0.05);
  --shadow-md: 0 4px 6px rgba(0,0,0,0.1);
  --shadow-lg: 0 10px 25px rgba(0,0,0,0.1);
  --shadow-xl: 0 20px 50px rgba(0,0,0,0.15);
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 12px;
  --max-width: 1400px;
  --transition: 200ms ease;
}

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

body {
  font-family: "Inter", sans-serif;
  font-size: 1rem;
  line-height: 1.6;
  color: var(--dark-gray);
  background: var(--white);
  -webkit-font-smoothing: antialiased;
}

/* ===== RTL / ARABIC ===== */
body.rtl, html[dir="rtl"] body {
  font-family: "Cairo", sans-serif;
  direction: rtl;
}

/* ===== ACCESSIBILITY ===== */
.skip-link {
  position: absolute; top: -100%; left: 0;
  background: var(--accent); color: var(--primary);
  padding: 8px 16px; z-index: 10000; font-weight: 600;
}
.skip-link:focus { top: 0; }

*:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 2px;
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}

/* ===== TYPOGRAPHY ===== */
h1, h2, h3, h4, h5, h6 {
  font-family: "Plus Jakarta Sans", sans-serif;
  font-weight: 700; line-height: 1.2; color: var(--primary);
}

html[dir="rtl"] h1, html[dir="rtl"] h2, html[dir="rtl"] h3,
html[dir="rtl"] h4, html[dir="rtl"] h5, html[dir="rtl"] h6 {
  font-family: "Cairo", sans-serif;
}

h1 { font-size: 3.5rem; font-weight: 800; }
h2 { font-size: 2.5rem; font-weight: 800; }
h3 { font-size: 1.4rem; }
h4 { font-size: 1.1rem; }

a { color: var(--primary); text-decoration: none; transition: color var(--transition); }
a:hover { color: var(--accent); }
p { margin-bottom: 1rem; }
img { max-width: 100%; height: auto; }

/* ===== LAYOUT ===== */
.container { max-width: var(--max-width); margin: 0 auto; padding: 0 20px; }
.section { padding: 80px 0; }
.section-title { text-align: center; margin-bottom: 50px; position: relative; }
.section-title::after {
  content: ""; display: block; width: 80px; height: 4px;
  background: linear-gradient(135deg, var(--accent), var(--accent-light));
  margin: 15px auto 0; border-radius: 2px;
}
.section-alt { background: var(--light-gray); }
.section-cream { background: var(--cream); }

.grid-2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(400px, 1fr)); gap: 30px; }
.grid-3 { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 30px; }
.grid-4 { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 20px; }

/* ===== TOPBAR ===== */
.topbar {
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  padding: 8px 0; font-size: 0.85rem; color: rgba(255,255,255,0.9);
}
.topbar .container { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 10px; }
.topbar a { color: rgba(255,255,255,0.9); }
.topbar a:hover { color: var(--accent); }
.topbar-contact { display: flex; gap: 20px; align-items: center; }
.topbar-contact i { margin-right: 5px; color: var(--accent); }
html[dir="rtl"] .topbar-contact i { margin-right: 0; margin-left: 5px; }

.lang-switcher { display: flex; gap: 5px; }
.lang-btn {
  background: transparent; border: 1px solid rgba(255,255,255,0.3);
  color: white; padding: 3px 10px; border-radius: var(--radius-sm);
  cursor: pointer; font-size: 0.8rem; font-weight: 600; transition: all var(--transition);
}
.lang-btn:hover, .lang-btn.active {
  background: var(--accent); color: var(--primary); border-color: var(--accent);
}

/* ===== HEADER ===== */
.site-header {
  background: var(--white); box-shadow: var(--shadow-md);
  position: sticky; top: 0; z-index: 1000; height: 80px;
}
.site-header .container { display: flex; justify-content: space-between; align-items: center; height: 100%; }
.logo { display: flex; align-items: center; gap: 12px; }
.logo img { width: 55px; height: 55px; object-fit: contain; }
.logo-text h1 { font-size: 1.1rem; color: var(--primary); line-height: 1.3; margin: 0; }
.logo-text small { font-size: 0.75rem; color: var(--gray); font-family: "Inter", sans-serif; }

/* ===== NAVIGATION ===== */
.main-nav ul { display: flex; list-style: none; gap: 5px; align-items: center; }
.main-nav a {
  padding: 8px 14px; font-size: 0.9rem; font-weight: 500;
  color: var(--dark-gray); border-radius: var(--radius-sm);
  transition: all var(--transition); position: relative;
}
.main-nav a:hover, .main-nav a.active { color: var(--primary); background: rgba(10,61,46,0.05); }
.main-nav a.active::after {
  content: ""; position: absolute; bottom: 0; left: 50%; transform: translateX(-50%);
  width: 60%; height: 2px; background: var(--accent);
}

.nav-dropdown { position: relative; }
.nav-dropdown .dropdown-menu {
  display: none; position: absolute; top: 100%; left: 0;
  background: var(--white); min-width: 220px; box-shadow: var(--shadow-lg);
  border-radius: var(--radius-md); padding: 8px 0; z-index: 100;
}
html[dir="rtl"] .nav-dropdown .dropdown-menu { left: auto; right: 0; }
.nav-dropdown:hover .dropdown-menu { display: block; }
.dropdown-menu a { display: block; padding: 10px 20px; border-radius: 0; }
.dropdown-menu a:hover { background: var(--light-gray); }

.hamburger {
  display: none; background: none; border: none; cursor: pointer;
  padding: 10px; flex-direction: column; gap: 5px;
}
.hamburger span { display: block; width: 25px; height: 2px; background: var(--primary); transition: all var(--transition); }

/* ===== HERO ===== */
.hero {
  min-height: 600px;
  background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 50%, #0D4B37 100%);
  display: flex; align-items: center; justify-content: center;
  text-align: center; position: relative; overflow: hidden; padding: 60px 20px;
}
.hero::before {
  content: ""; position: absolute; inset: 0;
  background: radial-gradient(circle at 20% 50%, rgba(212,160,23,0.1) 0%, transparent 50%),
    radial-gradient(circle at 80% 50%, rgba(212,160,23,0.05) 0%, transparent 50%);
}
.hero::after {
  content: ""; position: absolute; inset: 0;
  background: repeating-linear-gradient(45deg, transparent, transparent 10px, rgba(255,255,255,0.02) 10px, rgba(255,255,255,0.02) 20px);
}
.hero-content { position: relative; z-index: 1; max-width: 900px; }
.hero h1 { color: var(--white); font-size: 3.5rem; margin-bottom: 20px; animation: slideInDown 0.8s ease; }
.hero p { color: rgba(255,255,255,0.95); font-size: 1.3rem; margin-bottom: 30px; animation: slideInUp 0.8s 0.2s both; }
.hero-buttons { display: flex; gap: 15px; justify-content: center; flex-wrap: wrap; animation: slideInUp 0.8s 0.4s both; }
.hero-stats { display: flex; gap: 40px; justify-content: center; margin-top: 50px; flex-wrap: wrap; animation: slideInUp 0.8s 0.6s both; }
.stat-item {
  background: rgba(255,255,255,0.1); backdrop-filter: blur(10px);
  padding: 20px 30px; border-radius: var(--radius-md); border: 1px solid rgba(255,255,255,0.15);
}
.stat-item .number { font-family: "Plus Jakarta Sans", sans-serif; font-size: 2rem; font-weight: 800; color: var(--accent); display: block; }
.stat-item .label { color: rgba(255,255,255,0.85); font-size: 0.85rem; }

/* ===== BUTTONS ===== */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 12px 28px; border-radius: var(--radius-sm); font-weight: 600;
  font-size: 0.95rem; border: none; cursor: pointer;
  transition: all var(--transition); text-decoration: none; min-height: 44px;
}
.btn-primary { background: var(--accent); color: var(--primary); box-shadow: 0 4px 15px rgba(212,160,23,0.3); }
.btn-primary:hover { background: var(--accent-light); color: var(--primary); transform: translateY(-2px); box-shadow: 0 6px 20px rgba(212,160,23,0.4); }
.btn-secondary { background: transparent; color: var(--white); border: 2px solid var(--white); }
.btn-secondary:hover { background: var(--white); color: var(--primary); transform: translateY(-2px); }
.btn-outline { background: transparent; color: var(--primary); border: 2px solid var(--primary); }
.btn-outline:hover { background: var(--primary); color: var(--white); transform: translateY(-2px); }

/* ===== CARDS ===== */
.card {
  background: var(--white); border-radius: var(--radius-lg);
  padding: 40px 30px; box-shadow: var(--shadow-md); transition: all 0.3s ease; cursor: pointer;
}
.card:hover { transform: translateY(-8px); box-shadow: var(--shadow-xl); }
.card-service { border-top: 4px solid var(--accent); text-align: center; position: relative; overflow: hidden; }
.card-service::before {
  content: ""; position: absolute; top: -50px; right: -50px;
  width: 150px; height: 150px;
  background: linear-gradient(135deg, var(--accent), var(--accent-light));
  opacity: 0.08; border-radius: 50%;
}
.card-icon {
  width: 70px; height: 70px;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  border-radius: var(--radius-md); display: flex; align-items: center; justify-content: center;
  margin: 0 auto 20px; color: var(--white); font-size: 1.5rem; transition: transform 0.3s ease;
}
.card:hover .card-icon { transform: scale(1.1) rotate(5deg); }
.card h3 { margin-bottom: 12px; }
.card p { color: var(--gray); font-size: 0.95rem; }

.card-mission { border-left: 5px solid var(--accent); padding: 30px; }
html[dir="rtl"] .card-mission { border-left: none; border-right: 5px solid var(--accent); }
.card-mission:hover { transform: translateY(-5px); }

.card-news { padding: 0; overflow: hidden; }
.card-news-image {
  height: 200px; background: linear-gradient(135deg, var(--primary), var(--secondary));
  display: flex; align-items: center; justify-content: center; color: var(--white); font-size: 2rem;
}
.card-news-image img { width: 100%; height: 100%; object-fit: cover; }
.card-news-content { padding: 25px; }
.card-news-date {
  display: inline-block; background: rgba(10,61,46,0.08); color: var(--primary);
  padding: 4px 12px; border-radius: 20px; font-size: 0.8rem; font-weight: 600; margin-bottom: 12px;
}

/* ===== FORMS ===== */
.form-group { margin-bottom: 20px; }
.form-group label {
  display: block; font-family: "Plus Jakarta Sans", sans-serif;
  font-weight: 600; color: var(--primary); margin-bottom: 6px; font-size: 0.9rem;
}
.form-group input, .form-group select, .form-group textarea {
  width: 100%; padding: 12px; border: 2px solid var(--light-gray);
  border-radius: var(--radius-sm); font-size: 0.95rem; font-family: inherit;
  transition: all var(--transition); min-height: 44px;
}
.form-group input:focus, .form-group select:focus, .form-group textarea:focus {
  border-color: var(--accent); box-shadow: 0 0 0 3px rgba(212,160,23,0.1); outline: none;
}
.form-group textarea { min-height: 120px; resize: vertical; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.file-upload {
  border: 2px dashed var(--accent); border-radius: var(--radius-md); padding: 30px;
  text-align: center; cursor: pointer;
  background: linear-gradient(135deg, rgba(212,160,23,0.05), rgba(10,61,46,0.05));
  transition: all var(--transition);
}
.file-upload:hover { border-color: var(--primary); background: linear-gradient(135deg, rgba(212,160,23,0.1), rgba(10,61,46,0.1)); }
.file-upload i { font-size: 2.5rem; color: var(--accent); margin-bottom: 10px; }

/* ===== FOOTER ===== */
.site-footer { background: var(--primary); padding: 60px 0 20px; color: rgba(255,255,255,0.8); }
.footer-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 40px; margin-bottom: 40px; }
.site-footer h4 { font-size: 1.1rem; color: var(--accent); margin-bottom: 20px; }
.site-footer a { color: rgba(255,255,255,0.8); display: block; padding: 4px 0; transition: color var(--transition); }
.site-footer a:hover { color: var(--accent); }
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.2); padding-top: 20px;
  text-align: center; color: rgba(255,255,255,0.6); font-size: 0.85rem;
}

/* ===== BACK TO TOP ===== */
.back-to-top {
  position: fixed; bottom: 30px; right: 30px; width: 50px; height: 50px;
  background: var(--accent); color: var(--primary); border: none; border-radius: 50%;
  cursor: pointer; display: none; align-items: center; justify-content: center;
  font-size: 1.2rem; z-index: 999; box-shadow: var(--shadow-lg);
  transition: all var(--transition); min-height: 44px; min-width: 44px;
}
html[dir="rtl"] .back-to-top { right: auto; left: 30px; }
.back-to-top:hover { transform: translateY(-3px); box-shadow: var(--shadow-xl); background: var(--accent-light); }
.back-to-top.visible { display: flex; }

/* ===== SIDEBAR & BLOG ===== */
.sidebar .widget { background: var(--white); padding: 25px; border-radius: var(--radius-lg); box-shadow: var(--shadow-sm); margin-bottom: 25px; }
.sidebar .widget h4 { font-size: 1.1rem; margin-bottom: 15px; padding-bottom: 10px; border-bottom: 2px solid var(--accent); }
.blog-grid { display: grid; grid-template-columns: 1fr 350px; gap: 40px; }
.post-meta { display: flex; gap: 15px; color: var(--gray); font-size: 0.85rem; margin-bottom: 15px; flex-wrap: wrap; }
.post-meta i { color: var(--accent); margin-right: 4px; }

/* ===== PAGINATION ===== */
.pagination { display: flex; justify-content: center; gap: 5px; margin-top: 40px; }
.pagination a, .pagination span {
  display: flex; align-items: center; justify-content: center;
  width: 44px; height: 44px; border-radius: var(--radius-sm); font-weight: 600; transition: all var(--transition);
}
.pagination .current { background: var(--primary); color: var(--white); }
.pagination a:hover { background: var(--light-gray); color: var(--primary); }

/* ===== ANIMATIONS ===== */
@keyframes slideInDown { from { opacity: 0; transform: translateY(-30px); } to { opacity: 1; transform: translateY(0); } }
@keyframes slideInUp { from { opacity: 0; transform: translateY(30px); } to { opacity: 1; transform: translateY(0); } }
@keyframes fadeIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }
.animate-on-scroll { opacity: 0; transform: translateY(20px); transition: opacity 0.6s ease, transform 0.6s ease; }
.animate-on-scroll.visible { opacity: 1; transform: translateY(0); }

/* ===== RESPONSIVE ===== */
@media (max-width: 1024px) {
  h1 { font-size: 2.5rem; } h2 { font-size: 2rem; }
  .hero h1 { font-size: 2.5rem; } .site-header { height: 70px; }
  .blog-grid { grid-template-columns: 1fr; }
}

@media (max-width: 768px) {
  /* Topbar */
  .topbar .container { flex-direction: column; gap: 5px; text-align: center; }
  .topbar-contact { flex-wrap: wrap; justify-content: center; gap: 10px; }
  .lang-switcher { justify-content: center; }

  /* Header */
  .site-header { height: auto; padding: 10px 0; }
  .site-header .container { flex-wrap: wrap; gap: 10px; }
  .logo { flex: 1; min-width: 0; }
  .logo-text h1 { font-size: 0.95rem; }
  .logo-text small { display: none; }

  /* Nav */
  .hamburger { display: flex; }
  .main-nav { display: none; position: absolute; top: 100%; left: 0; right: 0; background: var(--white); box-shadow: var(--shadow-lg); padding: 15px 0; z-index: 999; }
  .main-nav.open { display: block; }
  .main-nav ul { flex-direction: column; padding: 0 20px; }
  .main-nav a { padding: 12px 0; display: block; }
  .nav-dropdown .dropdown-menu { position: static; box-shadow: none; padding-left: 20px; }

  /* Hero */
  .hero { min-height: 450px; padding: 50px 15px; }
  .hero h1 { font-size: 1.6rem; }
  .hero p { font-size: 1rem; }
  .hero-buttons { flex-direction: column; align-items: center; gap: 10px; }
  .hero-buttons .btn { width: 80%; max-width: 300px; justify-content: center; font-size: 0.9rem; padding: 12px 20px; }
  .hero-stats { gap: 10px; }
  .stat-item { padding: 12px 18px; }
  .stat-item .number { font-size: 1.4rem; }

  /* Sections */
  .section { padding: 40px 0; }
  .section-title { font-size: 1.5rem; margin-bottom: 30px; }
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
  .form-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; text-align: center; }

  /* Cards */
  .card { padding: 25px 20px; }
  .card-service { padding: 30px 20px; }
  .highlight-box { padding: 18px 20px; }

  /* Blog */
  .blog-grid { grid-template-columns: 1fr; }
}

@media (max-width: 480px) {
  h1 { font-size: 1.3rem; }
  h2 { font-size: 1.4rem; }
  .hero { min-height: 380px; padding: 35px 12px; }
  .hero h1 { font-size: 1.3rem; }
  .hero p { font-size: 0.9rem; }
  .hero-buttons .btn { width: 90%; font-size: 0.85rem; }
  .topbar { font-size: 0.7rem; padding: 5px 0; }
  .topbar-contact { gap: 6px; font-size: 0.7rem; }
  .logo img { width: 38px; height: 38px; }
  .logo-text h1 { font-size: 0.8rem; }
  .card { padding: 20px 15px; }
  .card-icon { width: 55px; height: 55px; font-size: 1.2rem; }
  .container { padding: 0 12px; }
  .section { padding: 30px 0; }
  .section-title { font-size: 1.3rem; margin-bottom: 25px; }
  .btn { padding: 10px 20px; font-size: 0.85rem; }
  .form-group input, .form-group select, .form-group textarea { font-size: 16px; } /* Prevent iOS zoom */
  .file-upload { padding: 20px; }
  .footer-bottom { font-size: 0.75rem; }
  .back-to-top { width: 42px; height: 42px; bottom: 20px; right: 20px; }
  html[dir="rtl"] .back-to-top { right: auto; left: 20px; }
}

/* ===== ENHANCED DESIGN - NOTABLE IMPROVEMENTS ===== */

/* Nav link animated underline (like original cagor.net) */
.main-nav a::after {
  content: "";
  position: absolute;
  bottom: 0; left: 50%;
  width: 0; height: 2px;
  background: var(--accent);
  transition: width 0.3s ease, left 0.3s ease;
}
.main-nav a:hover::after, .main-nav a.active::after {
  width: 60%; left: 20%;
}

/* Hero enhanced depth with pattern overlay */
.hero { position: relative; }
.hero-content h1 { text-shadow: 0 2px 20px rgba(0,0,0,0.3); letter-spacing: -0.02em; }
.hero-content p { text-shadow: 0 1px 10px rgba(0,0,0,0.2); }

/* Stat items glass morphism */
.stat-item {
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.stat-item:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 30px rgba(0,0,0,0.2);
}

/* Card progressive shadow on hover */
.card {
  border: 1px solid rgba(0,0,0,0.04);
  transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
}
.card:hover {
  border-color: rgba(212,160,23,0.2);
}

/* Service card icon pulse on hover */
.card-service:hover .card-icon {
  box-shadow: 0 0 0 8px rgba(10,61,46,0.1);
}

/* Mission card icon */
.card-mission h3 i.fas {
  font-size: 1.1rem;
  color: var(--accent);
}

/* About section highlight box */
.highlight-box {
  background: linear-gradient(135deg, rgba(10,61,46,0.05), rgba(212,160,23,0.05));
  border-left: 4px solid var(--accent);
  padding: 25px 30px;
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
  margin: 25px 0;
}
html[dir="rtl"] .highlight-box {
  border-left: none;
  border-right: 4px solid var(--accent);
  border-radius: var(--radius-md) 0 0 var(--radius-md);
}

/* Empty state for sections without content */
.empty-state {
  text-align: center; padding: 60px 20px;
  color: var(--gray);
}
.empty-state i {
  font-size: 3rem; color: var(--accent); opacity: 0.5;
  margin-bottom: 15px; display: block;
}
.empty-state p { font-size: 1.1rem; max-width: 400px; margin: 0 auto; }

/* Section divider decoration */
.section-title h2 { position: relative; display: inline-block; }

/* Contact card enhanced */
.card-contact {
  text-align: center;
  border: 1px solid rgba(10,61,46,0.08);
  transition: all 0.3s ease;
}
.card-contact:hover {
  border-color: var(--accent);
  background: var(--cream);
}
.card-contact .card-icon {
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.card-contact:hover .card-icon {
  transform: scale(1.15);
  box-shadow: 0 0 0 10px rgba(10,61,46,0.08);
}

/* Topbar enhanced */
.topbar {
  border-bottom: 2px solid var(--accent);
}

/* Header logo animation */
.logo:hover img {
  transform: scale(1.05);
  transition: transform 0.3s ease;
}
.logo img { transition: transform 0.3s ease; }

/* Page link cards */
.link-card {
  display: flex; align-items: center; gap: 15px;
  padding: 15px 20px; background: var(--white);
  border-radius: var(--radius-md); border: 1px solid var(--light-gray);
  transition: all 0.3s ease; cursor: pointer;
}
.link-card:hover {
  border-color: var(--accent); transform: translateX(5px);
  box-shadow: var(--shadow-md);
}
html[dir="rtl"] .link-card:hover { transform: translateX(-5px); }
.link-card i { font-size: 1.5rem; color: var(--accent); min-width: 30px; text-align: center; }
.link-card span { font-weight: 600; color: var(--primary); }

/* Smooth page transitions */
.section { position: relative; }
.section + .section { border-top: none; }

/* Better news empty state */
.news-empty {
  grid-column: 1 / -1;
  background: var(--cream);
  border-radius: var(--radius-lg);
  padding: 50px; text-align: center;
}
.news-empty i { font-size: 2.5rem; color: var(--accent); opacity: 0.6; }
.news-empty p { margin-top: 15px; color: var(--gray); font-size: 1rem; }

/* Footer social icons */
.social-link {
  display: inline-flex; align-items: center; justify-content: center;
  width: 40px; height: 40px; background: rgba(255,255,255,0.1);
  border-radius: 50%; color: white; margin-right: 8px;
  transition: all 0.3s ease;
}
.social-link:hover {
  background: var(--accent); color: var(--primary);
  transform: translateY(-3px);
}

/* Print styles */
@media print {
  .topbar, .site-header, .site-footer, .back-to-top, .hero { display: none; }
  body { font-size: 12pt; color: #000; }
  .section { padding: 20px 0; }
}

/* ===== WORDPRESS ===== */
.alignnone { margin: 5px 20px 20px 0; }
.aligncenter { display: block; margin: 5px auto; }
.alignright { float: right; margin: 5px 0 20px 20px; }
.alignleft { float: left; margin: 5px 20px 20px 0; }
.wp-caption { max-width: 100%; }
.wp-caption-text { font-size: 0.85rem; color: var(--gray); }
.screen-reader-text { clip: rect(1px,1px,1px,1px); position: absolute; height: 1px; width: 1px; overflow: hidden; }

/* ===== RTL RESPONSIVE FIXES ===== */
html[dir="rtl"] body {
  overflow-x: hidden;
}

html[dir="rtl"] .container {
  overflow-x: hidden;
}

@media (max-width: 768px) {
  html[dir="rtl"] .main-nav {
    left: 0;
    right: 0;
  }

  html[dir="rtl"] .hero {
    padding: 50px 15px;
  }

  html[dir="rtl"] .hero-content {
    max-width: 100%;
  }

  html[dir="rtl"] .hero-buttons {
    flex-direction: column;
    align-items: center;
  }

  html[dir="rtl"] .grid-2,
  html[dir="rtl"] .grid-3,
  html[dir="rtl"] .grid-4 {
    grid-template-columns: 1fr;
  }

  html[dir="rtl"] .form-grid {
    grid-template-columns: 1fr;
  }

  html[dir="rtl"] .site-header .container {
    flex-wrap: wrap;
  }

  html[dir="rtl"] .topbar .container {
    flex-direction: column;
    text-align: center;
  }

  html[dir="rtl"] .footer-grid {
    grid-template-columns: 1fr;
    text-align: center;
  }

  html[dir="rtl"] table {
    display: block;
    overflow-x: auto;
  }

  html[dir="rtl"] .card {
    overflow: hidden;
    word-wrap: break-word;
  }
}

@media (max-width: 480px) {
  html[dir="rtl"] .hero h1 {
    font-size: 1.3rem;
  }

  html[dir="rtl"] .section-title {
    font-size: 1.3rem;
  }
}

/* Global overflow fix for all devices */
html, body {
  max-width: 100vw;
  overflow-x: hidden;
}

.hero-content, .section, .container {
  max-width: 100%;
}

/* WordPress pagination fix */
.nav-links {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
  margin-top: 40px;
  flex-wrap: wrap;
}
.nav-links a, .nav-links span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 40px;
  height: 40px;
  padding: 0 12px;
  border-radius: 8px;
  font-weight: 600;
  text-decoration: none;
  color: var(--primary);
  background: var(--white);
  border: 1px solid var(--light-gray);
  transition: all 0.2s;
}
.nav-links .current {
  background: var(--primary);
  color: var(--white);
  border-color: var(--primary);
}
.nav-links a:hover {
  background: var(--light-gray);
}
