/*
Theme Name: Phonebook & Directory Theme
Theme URI: http://example.com/
Author: Antigravity
Description: A premium, modern theme for directory and phonebook listings with full RTL/Arabic support.
Version: 1.6.12
Text Domain: pb-dir-theme
*/

:root {
  --primary: #009688;
  --primary-hover: #00796b;
  --secondary: #ffffff;
  --accent: #ffc107;
  --success: #10b981;
  --danger: #ef4444;
  --bg-main: #f8fafc;
  --glass-bg: rgba(255, 255, 255, 0.8);
  --glass-border: rgba(255, 255, 255, 0.2);
  --text-dark: #333;
  --text-muted: #64748b;
  --card-shadow:
    0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -1px rgba(0, 0, 0, 0.03);
  --card-hover-shadow:
    0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);

  /* Fluid Sizing */
  --header-padding: clamp(1rem, 3vw, 2rem);
  --container-padding: clamp(1rem, 5vw, 2.5rem);
  --fluid-h1: clamp(1.75rem, 5vw, 2.5rem);
  --fluid-h2: clamp(1.25rem, 4vw, 1.75rem);
}

.btn-primary-cta {
  background: var(--accent);
  color: #1e1b4b !important;
  padding: 10px 20px;
  border-radius: 10px;
  font-weight: 700;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
  border: none;
  font-size: 0.95rem;
  white-space: nowrap;
}

.btn-primary-cta:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.2);
  background: #f59e0b;
}

.btn-primary-cta i {
  font-size: 1.1rem;
}

* {
  box-sizing: border-box;
}

body {
  direction: rtl;
  text-align: right;
  font-family: "Cairo", "Outfit", "Segoe UI", Tahoma, sans-serif;
  background-color: var(--bg-main);
  color: var(--text-dark);
  margin: 0;
  padding: 0;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

input,
button,
textarea,
select {
  font-family: inherit;
}

.container-fluid {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 var(--container-padding);
}

header {
  background: linear-gradient(
    135deg,
    var(--primary-hover) 0%,
    var(--primary) 100%
  );
  padding: var(--header-padding) 0;
  color: white;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
  position: sticky;
  top: 0;
  z-index: 1000;
  backdrop-filter: blur(10px);
}

header .header-container {
  display: flex !important;
  flex-direction: row !important;
  justify-content: space-between !important;
  align-items: center !important;
  padding: 6px 1.25rem !important; /* Increased horizontal padding */
  gap: 0 !important;
  min-height: 44px !important; /* Even tinier */
}

@media (min-width: 992px) {
  header .header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.5rem 1.5rem;
    gap: 0.5rem;
  }
}

.site-branding {
  text-align: right;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.site-title {
  font-size: 1.2rem;
  font-weight: 800;
  margin: 0;
  line-height: 1;
}

.site-title a {
  color: white;
  text-decoration: none;
  font-weight: 700;
}

.site-description {
  color: #c7d2fe;
  font-size: 0.7rem;
  margin: 0;
  opacity: 0.8;
  display: none; /* Tiny Header: hidden on mobile */
}

@media (min-width: 992px) {
  .site-description {
    display: block;
    margin-top: 4px;
    font-size: 0.85rem;
  }
}

/* Navigation - Mobile First */
.menu-toggle {
  display: block;
  background: rgba(255, 255, 255, 0.15);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: white;
  padding: 8px 12px;
  border-radius: 10px;
  cursor: pointer;
  z-index: 10001;
  position: relative; /* Remove absolute for easier layout */
}

.menu-wrapper {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  width: 100%;
  background: rgba(0, 150, 136, 0.98);
  backdrop-filter: blur(20px);
  border-radius: 0 0 20px 20px;
  padding: 1.5rem;
  box-shadow: 0 25px 50px rgba(0, 0, 0, 0.3);
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  z-index: 9999;
  overflow-y: auto;
  max-height: 80vh;
}

.menu-wrapper.active {
  display: flex !important;
  visibility: visible !important;
  opacity: 1 !important;
  pointer-events: auto !important;
  flex-direction: column;
  gap: 1.5rem;
  animation: slideDown 0.3s ease-out;
}

@keyframes slideDown {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.main-navigation ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.main-navigation ul li a {
  color: white;
  text-decoration: none;
  font-weight: 600;
  font-size: 1.1rem;
  padding: 12px 1rem;
  border-radius: 8px;
  transition: all 0.2s;
  display: block;
}

.main-navigation ul li a:hover,
.main-navigation ul li.current-menu-item a {
  background: rgba(255, 255, 255, 0.15);
}

@media (min-width: 992px) {
  .menu-toggle {
    display: none;
  }

  .menu-wrapper {
    display: flex !important;
    position: static !important;
    width: auto !important;
    background: transparent !important;
    backdrop-filter: none !important;
    margin-top: 0 !important;
    padding: 0 !important;
    box-shadow: none !important;
    border: none !important;
    max-height: none !important;
    animation: none !important;
  }

  .mobile-only-cta {
    display: none !important;
  }

  .main-navigation ul {
    flex-direction: row;
    gap: 1.5rem;
  }

  .main-navigation ul li a {
    font-size: 1rem;
    padding: 8px 0;
    border-radius: 0;
  }

  .main-navigation ul li a:hover {
    background: transparent;
    color: var(--accent);
  }

  .main-navigation ul li.current-menu-item a {
    background: transparent;
    border-bottom: 2px solid var(--accent);
  }
}

@media (min-width: 992px) {
  .site-branding {
    text-align: right;
  }
  [direction="ltr"] .site-branding {
    text-align: left;
  }
}

main {
  padding: 60px 0;
}

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 340px), 1fr));
  gap: clamp(1rem, 4vw, 2.5rem);
}

.card {
  background: var(--glass-bg);
  backdrop-filter: blur(10px);
  border: 1px solid var(--glass-border);
  border-radius: 20px;
  padding: 30px;
  box-shadow: var(--card-shadow);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  display: flex;
  flex-direction: column;
  height: 100%;
}

.card:hover {
  transform: translateY(-8px);
  box-shadow: var(--card-hover-shadow);
}

.card-thumbnail {
  margin: -30px -30px 20px -30px;
  border-radius: 20px 20px 0 0;
  overflow: hidden;
  height: clamp(200px, 40vh, 380px);
}

.card-thumbnail img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.card:hover .card-thumbnail img {
  transform: scale(1.05);
}

.results-categories {
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 20px;
  margin-bottom: 50px;
}

.sub-term-nav {
  margin-top: 30px;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
}

.badge-outline {
  background: white !important;
  border: 1px solid #e2e8f0 !important;
  color: #64748b !important;
  text-decoration: none;
  transform: none;
  transition: all 0.2s;
}

.badge-outline:hover {
  border-color: var(--primary) !important;
  color: var(--primary) !important;
}

.badge-dark {
  background: var(--text-dark) !important;
  color: white !important;
  border: 1px solid var(--text-dark) !important;
  text-decoration: none;
  transform: none;
  transition: all 0.2s;
}

.badge-dark:hover {
  background: #000 !important;
  border-color: #000 !important;
  color: white !important;
}

.card h2 {
  font-size: 1.5rem;
  font-weight: 700;
  margin: 0;
  color: var(--text-dark);
}

.card-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 15px;
  gap: 15px;
}

.card-vote-badge {
  background: #e7f3ff;
  color: #1877f2;
  padding: 4px 12px;
  border-radius: 999px;
  font-size: 0.85rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
}

.card-vote-badge i {
  font-size: 0.9rem;
}

.card h2 a {
  color: inherit;
  text-decoration: none;
}

.card h2 a:hover {
  color: var(--primary);
}

.field-group {
  display: flex;
  align-items: center;
  margin-bottom: 12px;
  font-size: 0.95rem;
}

.field-label {
  font-weight: 600;
  color: var(--text-muted);
  min-width: 100px;
  display: flex;
  align-items: center;
}

.field-label i {
  margin-right: 8px;
  color: var(--primary);
  width: 20px;
}

.field-value {
  color: var(--text-dark);
  font-weight: 500;
  flex: 1;
}

.badge {
  display: inline-block;
  padding: 4px 12px;
  border-radius: 9999px;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  background: #e2e8f0;
  color: #475569;
  margin-bottom: 15px;
}

.badge-directory {
  background: #dcfce7;
  color: #166534;
}
.badge-phonebook {
  background: #dbeafe;
  color: #1e40af;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 24px;
  border-radius: 12px;
  font-weight: 600;
  text-decoration: none;
  transition: all 0.2s;
  cursor: pointer;
  border: none;
  margin-top: auto;
}

.btn-primary {
  background: var(--primary);
  color: white;
}

.btn-primary:hover {
  background: var(--primary-hover);
  box-shadow: 0 4px 10px rgba(79, 70, 229, 0.3);
}

/* Header CTA - Mobile First */
.header-cta {
  display: flex;
  flex-direction: column;
  gap: 12px;
  width: 100%;
  margin-top: 1rem;
}

.desktop-only-cta {
  display: none !important;
}

.mobile-only-cta {
  display: flex !important;
  margin-top: 1rem;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding-top: 1.5rem;
}

.header-cta .btn-primary-cta,
.header-cta .btn-download {
  display: flex;
  width: 100% !important;
  justify-content: center;
  padding: 12px 20px;
  max-width: none !important;
}

@media (min-width: 992px) {
  .desktop-only-cta {
    display: flex !important;
    width: auto;
    flex-direction: row;
  }

  .mobile-only-cta {
    display: none !important;
  }

  .header-cta {
    flex-direction: row;
    width: auto;
    margin-top: 0;
    gap: 10px;
  }

  .header-cta .btn-primary-cta,
  .header-cta .btn-download {
    width: auto !important;
    padding: 8px 16px;
    font-size: 0.85rem;
  }
}

.btn-download {
  background: #000;
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.2);
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 10px 20px;
  border-radius: 12px;
  font-weight: 700;
  text-decoration: none;
  font-family: "Outfit", sans-serif;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  font-size: 0.95rem;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
  white-space: nowrap;
}

/* Specific button padding handled in .header-cta block */

.btn-download.android i {
  color: #3ddc84; /* Android Green */
}

.btn-download.iphone i {
  color: #fff; /* Apple Silver/White */
}

.btn-download.facebook {
  background: var(--primary);
  border-color: var(--primary);
  color: var(--secondary);
}

.btn-download.facebook:hover {
  background: var(--primary-hover);
  border-color: var(--accent);
  color: var(--secondary);
}

.btn-download.facebook i {
  color: var(--secondary);
}

.btn-download.facebook:hover i {
  color: var(--accent);
}

.btn-download i {
  font-size: 1.2rem;
}

.btn-download .btn-text {
  display: flex;
  flex-direction: column;
  line-height: 1.1;
  text-align: right;
}

[direction="ltr"] .btn-download .btn-text {
  text-align: left;
}

.btn-download .btn-subtitle {
  font-size: 0.6rem;
  font-weight: 500;
  opacity: 0.8;
  text-transform: uppercase;
  letter-spacing: 0.02em;
}

.btn-download .btn-title {
  font-size: 0.9rem;
}

.btn-download:hover {
  background: #111;
  transform: translateY(-2px);
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.2);
  border-color: rgba(255, 255, 255, 0.4);
}

.btn-download.android:hover {
  border-color: #3ddc84;
}

@media (max-width: 992px) {
  header .header-container {
    flex-wrap: wrap;
  }
}

/* Individual Content Page Heading area */
.single-header {
  background: linear-gradient(
    135deg,
    var(--primary-hover) 0%,
    var(--primary) 100%
  );
  margin: -60px 0 60px 0; /* Negate main top padding to stick to header */
  padding: 60px 40px;
  text-align: center;
  color: white;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

.single-header h1 {
  color: #ffffff !important;
  font-size: 2.5rem;
  font-weight: 800;
  margin-bottom: 10px;
}

.single-header p {
  color: #c7d2fe;
  font-size: 1.1rem;
}

.single-header .badge {
  background: rgba(255, 255, 255, 0.1);
  color: white;
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.breadcrumb a {
  color: var(--primary);
  text-decoration: none;
  font-weight: 500;
}

.single-header .breadcrumb a {
  color: #c7d2fe;
}

.single-header .breadcrumb a:hover {
  color: white;
}

.single-header .breadcrumb .sep {
  margin: 0 10px;
  color: rgba(255, 255, 255, 0.3);
}

.single-header .breadcrumb .current {
  color: white;
  font-weight: 600;
}

.single-header .search-field::placeholder {
  color: rgba(255, 255, 255, 0.5);
}

.profile-section {
  display: grid;
  grid-template-columns: 300px 1fr;
  gap: 40px;
  background: white;
  border-radius: 24px;
  padding: 40px;
  box-shadow: var(--card-shadow);
  margin: 40px;
}

.profile-image img {
  width: 100%;
  height: auto;
  border-radius: 16px;
  object-fit: cover;
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
}

.info-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 20px;
}

.info-item {
  background: #f1f5f9;
  padding: 15px;
  border-radius: 12px;
}

.info-label {
  display: block;
  font-size: 0.8rem;
  text-transform: uppercase;
  color: var(--primary-hover);
  font-weight: 700;
  margin-bottom: 4px;
}

.social-links {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 20px;
}

.social-icon {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #fff;
  border: 1px solid #e2e8f0;
  color: var(--text-dark);
  text-decoration: none;
  transition: all 0.2s;
}

.social-icon:hover {
  background: var(--primary);
  color: white;
  transform: scale(1.1);
}

footer {
  background: #002e2a;
  color: #94a3b8;
  padding: 80px 0 0 0;
  text-align: right; /* RTL friendly default */
}

[direction="ltr"] footer {
  text-align: left;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 3rem;
  padding-bottom: 3rem;
}

@media (min-width: 768px) {
  .footer-grid {
    grid-template-columns: 1fr 1fr;
  }
}

@media (min-width: 1024px) {
  .footer-grid {
    grid-template-columns: 2fr 1fr 1.5fr;
  }
}

.footer-column h3 {
  color: white;
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: 24px;
  position: relative;
  padding-bottom: 12px;
}

.footer-column h3::after {
  content: "";
  position: absolute;
  bottom: 0;
  right: 0;
  width: 40px;
  height: 3px;
  background: var(--primary);
  border-radius: 2px;
}

[direction="ltr"] .footer-column h3::after {
  right: auto;
  left: 0;
}

.footer-logo {
  color: white;
  margin: 0 0 20px 0;
  font-size: 1.8rem;
  font-weight: 800;
}

.footer-description {
  line-height: 1.8;
  font-size: 1rem;
}

.footer-navigation ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.footer-navigation ul li {
  margin-bottom: 12px;
}

.footer-navigation ul li a {
  color: #94a3b8;
  text-decoration: none;
  transition: all 0.2s;
  display: inline-block;
}

.footer-navigation ul li a:hover {
  color: white;
  transform: translateX(-5px);
}

[direction="ltr"] .footer-navigation ul li a:hover {
  transform: translateX(5px);
}

.creator-link {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: rgba(255, 255, 255, 0.05);
  padding: 12px 20px;
  border-radius: 12px;
  color: white;
  text-decoration: none;
  font-weight: 600;
  transition: all 0.3s;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.creator-link:hover {
  background: var(--primary);
  border-color: var(--primary);
  transform: translateY(-3px);
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
}

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  padding: 30px 0;
  background: #011e1c;
}

.copyright {
  margin: 0;
  font-size: 0.9rem;
  text-align: center;
}

@media (max-width: 992px) {
  .footer-grid {
    grid-template-columns: 1fr 1fr;
    gap: 40px;
  }
  .footer-column.branding {
    grid-column: span 2;
  }
}

@media (max-width: 768px) {
  footer {
    padding-top: 60px;
  }
  .footer-grid {
    grid-template-columns: 1fr;
  }
  .footer-column.branding {
    grid-column: span 1;
  }
}

@media (max-width: 768px) {
  .profile-section {
    grid-template-columns: 1fr;
  }
  .profile-image {
    max-width: 300px;
    margin: 0 auto;
  }
}

/* Categories Page & Hierarchy */
.categories-hierarchy {
  padding-bottom: 80px;
}

.main-parent-card {
  border-top: 4px solid var(--primary);
  min-height: 400px;
}

.parent-icon {
  margin-right: 10px;
  color: var(--primary);
}

.sub-category-list {
  margin-top: 20px;
}

.sub-category-title {
  font-size: 0.8rem;
  text-transform: uppercase;
  color: var(--primary);
  letter-spacing: 0.05em;
  font-weight: 800;
  margin-bottom: 15px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.sub-category-title .line {
  flex-grow: 1;
  height: 1px;
  background: #e2e8f0;
}

.sub-categories-grid {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
}

.sub-category-item {
  background: #f8fafc;
  border-radius: 8px;
  padding: 8px 12px;
  border: 1px solid #f1f5f9;
  transition: all 0.2s;
}

.sub-category-item:hover {
  border-color: var(--primary);
  background: white;
}

.sub-category-item a {
  display: flex;
  justify-content: space-between;
  align-items: center;
  text-decoration: none;
  color: #475569;
  font-size: 0.9rem;
}

.sub-category-item .name {
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 80%;
}

.sub-category-item .badge-count {
  background: white;
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 0.75rem;
  color: #94a3b8;
  border: 1px solid #e2e8f0;
}

.more-sub-categories {
  text-align: center;
  margin-top: 10px;
}

.more-sub-categories a {
  font-size: 0.85rem;
  color: var(--primary);
  font-weight: 700;
  text-decoration: none;
}

.card-footer {
  margin-top: auto;
  padding-top: 20px;
}

.full-width {
  width: 100%;
}

.btn-pill {
  border-radius: 99px !important;
}

.empty-state {
  text-align: center;
  padding: 60px;
  background: white;
  border-radius: 20px;
}

.empty-state i {
  color: #e2e8f0;
  margin-bottom: 20px;
}

/* Category Search Component */
.category-search-container {
  max-width: 650px;
  margin: 20px auto 0;
  display: flex;
  gap: 15px;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  position: relative;
}

.search-input-wrapper {
  position: relative;
  flex: 1;
  min-width: 300px;
}

.search-input-wrapper i {
  position: absolute;
  left: 15px;
  top: 50%;
  transform: translateY(-50%);
  color: rgba(255, 255, 255, 0.5);
  z-index: 1;
}

.single-header .search-input-wrapper input {
  width: 100%;
  padding: 14px 20px 14px 45px;
  border-radius: 99px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  background: rgba(255, 255, 255, 0.1);
  color: white;
  font-size: 1rem;
  outline: none;
  transition: all 0.3s;
}

.single-header .search-input-wrapper input:focus {
  background: rgba(255, 255, 255, 0.2);
  border-color: white;
}

.single-header .search-input-wrapper input::placeholder {
  color: rgba(255, 255, 255, 0.6);
}

.ajax-search-results {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: white;
  border-radius: 16px;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
  z-index: 50;
  max-height: 400px;
  overflow-y: auto;
  border: 1px solid #e2e8f0;
  margin-top: 10px;
  text-align: right; /* RTL support */
}

.ajax-search-results.active {
  display: block;
}

.ajax-loading,
.ajax-no-results {
  padding: 20px;
  text-align: center;
  color: #64748b;
}

/* Section titles */
.section-title {
  font-size: 1.5rem;
  margin-bottom: 20px;
  color: var(--primary);
  padding-bottom: 10px;
  border-bottom: 2px solid #e2e8f0;
  display: flex;
  align-items: center;
}

.section-title i {
  margin-left: 10px;
}

/* Utilities */
.mt-10 {
  margin-top: 10px !important;
}
.mt-15 {
  margin-top: 15px !important;
}
.mt-20 {
  margin-top: 20px !important;
}
.mb-5 {
  margin-bottom: 5px !important;
}
.mb-10 {
  margin-bottom: 10px !important;
}
.mb-15 {
  margin-bottom: 15px !important;
}
.mb-20 {
  margin-bottom: 20px !important;
}
.mb-30 {
  margin-bottom: 30px !important;
}
.ml-10 {
  margin-left: 10px !important;
}
.mr-10 {
  margin-right: 10px !important;
}

.dot-clamp {
  display: -webkit-box;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
  line-clamp: 1;
  overflow: hidden;
}

.directory-description {
  margin-bottom: 15px;
  font-size: 0.95rem;
  color: #64748b;
  line-height: 1.6;
}

.whatsapp-link {
  color: #25d366 !important;
  text-decoration: none;
  font-weight: bold;
}

.whatsapp-link:hover {
  text-decoration: underline;
}

.phone-link {
  display: block;
  color: inherit;
  text-decoration: none;
  margin-bottom: 4px;
}

.phone-link:hover {
  color: var(--primary);
}

/* Page specific or UI specific */
.cat-card-link {
  display: block;
  text-decoration: none;
  color: inherit;
}

.cat-card {
  padding: 20px;
  text-align: center;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  transition: all 0.2s;
  background: white;
}

.cat-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
  border-color: var(--primary);
}

.cat-card i {
  color: var(--primary);
  margin-bottom: 15px;
}

.cat-card h3 {
  font-size: 1.1rem;
  margin-bottom: 5px;
  color: #1e293b;
}

.cat-count-badge {
  background: #e0f2fe;
  color: #0369a1;
  font-size: 0.8rem;
  padding: 4px 10px;
  border-radius: 99px;
  display: inline-block;
}

.btn-secondary {
  background: var(--secondary);
  color: white;
}

/* Single Post View Styles */
.nickname-text {
  color: #c7d2fe;
}

.profile-container {
  max-width: 800px;
  padding-bottom: 60px;
}

.avatar-wrapper {
  margin-bottom: 30px;
  text-align: center;
}

.avatar-circle {
  border-radius: 50%;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
  width: 150px;
  height: 150px;
  object-fit: cover;
}

.avatar-placeholder {
  background: #e0f2fe;
  width: 120px;
  height: 120px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #0369a1;
}

.info-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 24px;
}

.info-item {
  border-bottom: 1px solid #f1f5f9;
  padding-bottom: 15px;
}

.info-item:last-child {
  border-bottom: none;
}

.info-label {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.85rem;
  font-weight: 700;
  text-transform: uppercase;
  margin-bottom: 8px;
}

.info-label i {
  width: 20px;
  text-align: center;
}

.phone-link-large-wrapper {
  margin-bottom: 8px;
}

.phone-link-large {
  text-decoration: none;
  color: inherit;
  font-weight: 600;
  font-size: 1.1rem;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.phone-link-large:hover {
  color: var(--primary);
}

.phone-link-large i {
  opacity: 0.5;
}

.notes-container {
  margin-top: 30px;
  padding: 20px;
  background: #fffbeb;
  border-radius: 12px;
  border-left: 4px solid #f59e0b;
}

.p-40 {
  padding: 40px !important;
}

.w-100 {
  width: 100% !important;
}

.h-300 {
  height: 300px !important;
}
.container-narrow {
  max-width: 900px;
}

.page-content {
  padding: 40px;
}

.page-header {
  margin-bottom: 30px;
  border-bottom: 1px solid #e2e8f0;
  padding-bottom: 20px;
}

.page-header h1 {
  margin: 0;
  color: #fff;
  font-size: 2.5rem;
  text-align: center;
}

.entry-content {
  font-size: 1.1rem;
  line-height: 1.8;
  color: #334155;
}

.mb-40 {
  margin-bottom: 40px !important;
}

.container-medium {
  max-width: 600px;
}
.py-80 {
  padding: 80px 0 !important;
}
.p-60 {
  padding: 60px !important;
}
.mx-auto {
  margin-left: auto !important;
  margin-right: auto !important;
}
.card-narrow {
  max-width: 600px;
}
.icon-error {
  color: #fca5a5;
}
.font-3rem {
  font-size: 3rem !important;
}
.font-1-5rem {
  font-size: 1.5rem !important;
}
.font-1-1rem {
  font-size: 1.1rem !important;
}
.text-dark {
  color: #1e293b !important;
}
.text-muted {
  color: #475569 !important;
}
.text-slate {
  color: #64748b !important;
}
.text-center {
  text-align: center !important;
}

.flex-1 {
  flex: 1 !important;
}
.no-underline {
  text-decoration: none !important;
}
.color-inherit {
  color: inherit !important;
}
.text-left {
  text-align: left !important;
}

.search-form-pill {
  position: relative;
  width: 100%;
}

.search-form-pill .search-field {
  width: 100%;
  padding: 15px 50px 15px 15px;
  border-radius: 99px;
  border: 2px solid #e2e8f0;
  font-size: 1rem;
  outline: none;
  transition: border-color 0.2s;
}

.search-form-pill .search-field:focus {
  border-color: var(--primary);
}

.search-form-pill .search-submit {
  position: absolute;
  left: 15px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  font-size: 1.2rem;
  color: var(--primary);
  cursor: pointer;
}

/* AJAX Search Results */
.ajax-result-item {
  border-bottom: 1px solid #f1f5f9;
}

.ajax-result-item:last-child {
  border-bottom: none;
}

.ajax-result-link {
  display: flex !important;
  align-items: center;
  padding: 15px 20px !important;
  text-decoration: none !important;
  color: #1e293b !important;
  transition: background 0.2s;
}

.ajax-result-link:hover {
  background: #f8fafc;
}

.ajax-result-icon-wrapper {
  width: 40px;
  height: 40px;
  background: #f8fafc;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-left: 15px; /* RTL margin */
  color: #64748b;
}

.ajax-result-content {
  flex-grow: 1;
}

.ajax-result-title {
  font-weight: 600;
}

.ajax-result-meta {
  font-size: 0.8rem;
  color: #94a3b8;
}

.ajax-result-badge {
  font-size: 0.75rem;
  padding: 4px 10px;
  border-radius: 99px;
  white-space: nowrap;
}

.badge-cat {
  background: #e0f2fe;
  color: #0369a1;
}
.badge-dir {
  background: #f0fdf4;
  color: #15803d;
}

/* Single Post Styles */
.post-meta {
  margin-top: 15px;
  opacity: 0.8;
  font-size: 0.9rem;
}

.post-meta span {
  margin: 0 10px;
}

.post-thumbnail {
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

.post-thumbnail img {
  width: 100%;
  height: auto;
  display: block;
}

.post-footer {
  border-top: 1px solid #e2e8f0;
}

.badge-tag {
  background: #f1f5f9;
  color: #475569;
  text-decoration: none;
  padding: 4px 12px;
  border-radius: 99px;
  font-size: 0.8rem;
  margin-right: 5px;
  transition: all 0.2s;
}

.badge-tag:hover {
  background: var(--primary);
  color: white;
}

.post-navigation {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  margin-top: 20px;
}

.nav-tip {
  font-size: 0.8rem;
  color: var(--primary);
  font-weight: bold;
  display: block;
  margin-bottom: 5px;
}

.nav-title {
  font-weight: 600;
}

.pt-20 {
  padding-top: 20px !important;
}
/* Dashboard Styles */
.dashboard-container {
  background: transparent;
  padding: 20px !important;
}

.dashboard-header h1 {
  font-size: 2.5rem;
  font-weight: 800;
  margin-bottom: 5px;
  color: #fff;
}

.dashboard-header p {
  color: var(--text-muted);
  font-size: 1.1rem;
}

/* Mobile Bottom Tab Bar */
.mobile-bottom-bar {
  display: flex;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: white;
  box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.08);
  padding: 10px 0;
  z-index: 1000;
  justify-content: space-around;
  border-top: 1px solid #f1f5f9;
}

.mobile-bottom-bar .bottom-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  text-decoration: none;
  color: #64748b;
  font-size: 0.7rem;
  font-weight: 600;
  transition: color 0.2s;
  flex: 1;
}

.mobile-bottom-bar .bottom-item.active,
.mobile-bottom-bar .bottom-item:hover {
  color: var(--primary);
}

.mobile-bottom-bar .bottom-item i {
  font-size: 1.25rem;
}

@media (min-width: 992px) {
  .mobile-bottom-bar {
    display: none;
  }
}

/* Adjust footer and floats for bottom bar */
@media (max-width: 991px) {
  footer {
    padding-bottom: 80px !important;
  }
  .whatsapp-float {
    bottom: 90px !important;
  }
}

.whatsapp-float {
  position: fixed;
  bottom: 24px;
  right: 24px;
  background: #25d366;
  color: white;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
  box-shadow: 0 4px 12px rgba(37, 211, 102, 0.4);
  z-index: 999;
  transition: all 0.3s;
}

[direction="rtl"] .whatsapp-float {
  right: auto;
  left: 24px;
}

.whatsapp-float:hover {
  transform: scale(1.1) rotate(10deg);
  box-shadow: 0 8px 16px rgba(37, 211, 102, 0.5);
}

.table-responsive {
  margin-top: 10px;
}

.table-responsive table th {
  text-transform: uppercase;
  font-size: 0.75rem;
  letter-spacing: 0.05em;
  color: #333;
}

.action-btn {
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.action-btn:hover {
  transform: translateY(-3px);
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

/* ACF Form Premium Styling */
.edit-section .acf-form {
  max-width: 100%;
}

.edit-section .acf-field .acf-label label {
  font-size: 0.95rem;
  color: var(--text-dark);
  font-weight: 700;
}

.edit-section .acf-input input:focus,
.edit-section .acf-input textarea:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.1);
  outline: none;
}

.edit-section .acf-notice {
  background: #f0fdf4 !important;
  border: 1px solid #16a34a !important;
  color: #166534 !important;
  border-radius: 8px !important;
  padding: 15px !important;
  margin-bottom: 25px !important;
}

[direction="rtl"] .table-responsive table th,
[direction="rtl"] .table-responsive table td {
  text-align: right;
}

@media (max-width: 768px) {
  .dashboard-header {
    flex-direction: column;
    align-items: flex-start !important;
    gap: 20px;
  }
}

/* ==========================================================================
   DYNAMIC THEME STYLES (Moved from functions.php)
   ========================================================================== */
:root {
  --primary-color: var(--primary);
  --bg-light: #f8fafc;
  --text-main: #1e293b;
}

/* Category Grid & Cards */
.category-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 24px;
  margin: 20px 0;
}

.category-card {
  background: #fff;
  border-radius: 16px;
  padding: 24px;
  box-shadow: 0 4px 6px -1px rgb(0 0 0 / 0.1);
  transition: all 0.3s ease;
  border: 1px solid #e2e8f0;
  display: flex;
  flex-direction: column;
}

.category-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 10px 15px -3px rgb(0 0 0 / 0.1);
  border-color: var(--primary-color);
}

.category-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
}

.category-header h3 {
  margin: 0;
  font-size: 1.25rem;
  font-weight: 700;
}

.category-header h3 a {
  color: var(--text-main);
  text-decoration: none;
}

.category-header .count {
  background: #d2e9e6;
  color: var(--primary);
  padding: 2px 10px;
  border-radius: 999px;
  font-size: 0.85rem;
  font-weight: 600;
}

.sub-categories {
  list-style: none;
  padding: 0;
  margin: 0 0 20px 0;
  flex-grow: 1;
}

.sub-categories li {
  margin-bottom: 8px;
}

.sub-categories li a {
  color: #64748b;
  text-decoration: none;
  font-size: 0.95rem;
  transition: color 0.2s;
}

.sub-categories li a:hover {
  color: var(--primary-color);
}

.category-link {
  font-weight: 600;
  color: var(--primary-color);
  text-decoration: none;
  font-size: 0.9rem;
  display: flex;
  align-items: center;
  gap: 6px;
}

.category-link i {
  transform: rotate(180deg);
}

/* My Account Dropdown */
.my-account-dropdown {
  position: relative;
}

.my-account-dropdown > a {
  font-weight: 800 !important;
  color: var(--primary-color);
  display: flex;
  align-items: center;
  gap: 8px;
}

.menu-item-has-children .sub-menu {
  background: #ffffff;
  min-width: 220px;
  border-radius: 12px;
  box-shadow:
    0 10px 25px -5px rgba(0, 0, 0, 0.1),
    0 8px 10px -6px rgba(0, 0, 0, 0.1);
  padding: 10px 0;
  border: 1px solid #e2e8f0;
  list-style: none;
  position: absolute;
  top: 100%;
  left: 0;
  z-index: 999;
  display: none;
}

.menu-item-has-children:hover .sub-menu {
  display: block;
}

.menu-item-has-children .sub-menu li a {
  padding: 12px 20px !important;
  display: flex !important;
  align-items: center;
  gap: 12px;
  font-size: 0.95rem;
  color: #1e293b;
  transition: all 0.2s ease;
  text-decoration: none;
}

.menu-item-has-children .sub-menu li a:hover {
  background: #f8fafc;
  color: var(--primary-color) !important;
}

.menu-item-has-children .sub-menu li.logout-link {
  border-top: 1px solid #f1f5f9;
  margin-top: 5px;
  padding-top: 5px;
}

.login-btn {
  color: #fff !important;
  font-weight: 600;
}

.register-btn {
  background: var(--primary-color);
  color: #fff !important;
  padding: 8px 18px !important;
  border-radius: 10px;
  margin-right: 10px;
  font-weight: 700;
  transition: background-color 0.3s ease;
}

.register-btn:hover {
  background: #ffc107 !important;
  color: #1a1a1a !important;
}

[direction="rtl"] .register-btn {
  margin-right: 0;
  margin-left: 10px;
}

/* Interactive Assets (Voting/Sharing) */
.interactive-actions {
  display: flex;
  gap: 15px;
  margin: 25px 0;
  flex-wrap: wrap;
}

.action-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 24px;
  background-color: var(--bg-main);
  border: 2px solid #e2e8f0;
  border-radius: 50px;
  color: var(--text-dark);
  font-weight: 600;
  font-size: 1rem;
  cursor: pointer;
  transition: all 0.2s ease;
  font-family: inherit;
}

.action-btn:hover {
  background-color: #f1f5f9;
  border-color: #cbd5e1;
  transform: translateY(-2px);
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
}

.action-btn i {
  color: var(--secondary);
  transition: color 0.2s;
}

.btn-vote.voted {
  background-color: rgba(79, 70, 229, 0.1);
  border-color: var(--primary);
  color: var(--primary);
}

.btn-vote.voted i {
  color: var(--primary);
}

.btn-native-share i {
  color: var(--text-dark);
}

.share-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(45px, 1fr));
  gap: 10px;
  margin-top: 15px;
}

.share-icon {
  width: 45px;
  height: 45px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 1.2rem;
  text-decoration: none;
  transition: transform 0.2s;
}

.share-icon:hover {
  transform: translateY(-3px);
  opacity: 0.9;
}

.share-wa {
  background: #25d366;
}
.share-fb {
  background: #1877f2;
}
.share-tw {
  background: #1da1f2;
}
.share-li {
  background: #0077b5;
}
.share-ms {
  background: #0084ff;
}
.share-em {
  background: #ea4335;
}
.share-sms {
  background: #34b7f1;
}

@keyframes votePop {
  0% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.2);
  }
  100% {
    transform: scale(1);
  }
}

.vote-anim {
  animation: votePop 0.3s ease;
}

/* Dashboard Specific Helper Classes */
.dashboard-card {
  background: #fff;
  padding: 30px;
  border-radius: 16px;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

.dashboard-header-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 25px;
}

.status-badge {
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 600;
}

.empty-state {
  text-align: center;
  padding: 40px;
  background: #f8fafc;
  border-radius: 12px;
  border: 2px dashed #e2e8f0;
}

.empty-state i {
  font-size: 3rem;
  color: #cbd5e1;
  margin-bottom: 20px;
  display: block;
}

.max-w-1200 {
  max-width: 1200px;
}
.m-auto {
  margin: 0 auto;
}
.p-20-40 {
  padding: 40px 20px;
}
.mb-40 {
  margin-bottom: 40px;
}
.pb-20 {
  padding-bottom: 20px;
}
.bb-1 {
  border-bottom: 1px solid #e2e8f0;
}
.flex-between {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px;
}
.mt-0 {
  margin-top: 0;
}
.mb-25 {
  margin-bottom: 25px;
}
.text-muted {
  color: #64748b;
}
.text-dark {
  color: #1e293b;
}
.w-full {
  width: 100%;
}
.border-collapse {
  border-collapse: collapse;
}
.min-w-600 {
  min-width: 600px;
}
.bb-f1 {
  border-bottom: 1px solid #f1f5f9;
}
.bb-f2 {
  border-bottom: 2px solid #f1f5f9;
}
.p-15-10 {
  padding: 15px 10px;
}
.text-left {
  text-align: left;
}
.text-right {
  text-align: right;
}
.nowrap {
  white-space: nowrap;
}
.flex-gap-8 {
  display: flex;
  gap: 8px;
}
.flex-end {
  justify-content: flex-end;
}
.rounded-8 {
  border-radius: 8px;
}
.action-icon {
  width: 34px;
  height: 34px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  border-radius: 8px;
}
.action-btn-view {
  color: var(--primary-color);
  background: #eef2ff;
}
.action-btn-edit {
  color: #0891b2;
  background: #ecfeff;
}
.action-btn-delete {
  color: #dc2626;
  background: #fef2f2;
}
.action-btn-view:hover {
  background: #e0e7ff;
}
.action-btn-edit:hover {
  background: #cffafe;
}
.action-btn-delete:hover {
  background: #fee2e2;
}

/* Global Utilities */
.block {
  display: block;
}
.smaller {
  font-size: 0.85rem;
}
.larger {
  font-size: 1.1rem;
}
.mt-10 {
  margin-top: 10px;
}
.alert {
  padding: 15px;
  border-radius: 8px;
  border-width: 1px;
  border-style: solid;
}
.alert-success {
  background: #f0fdf4;
  border-color: #16a34a;
  color: #166534;
}
.alert-danger {
  background: #fef2f2;
  border-color: #dc2626;
  color: #991b1b;
}

/* Single Directory Styles */
.interactive-section {
  margin-top: 40px;
  border-top: 1px solid #e2e8f0;
  padding-top: 25px;
}
.social-proof {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-right: 15px;
  font-size: 0.9rem;
  color: #64748b;
}
.avatar-stack {
  display: flex;
  flex-direction: row-reverse;
}
.avatar-mini {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 2px solid #fff;
  overflow: hidden;
  margin-left: -10px;
  background: #e2e8f0;
}
.share-grid-compact {
  margin: 0;
  display: flex;
  align-items: center;
  gap: 8px;
}

/* Utils */
.text-inherit {
  color: inherit !important;
}
.no-decoration {
  text-decoration: none !important;
}
.block {
  display: block;
}
.mt-20 {
  margin-top: 20px;
}
.w-100 {
  width: 100%;
}
.h-300 {
  height: 300px;
}

/* Form & Layout Utilities */
.form-card {
  padding: 40px;
  border-radius: 24px;
  background: #fff;
  box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1);
}
.success-card {
  background: #ecfdf5;
  border: 1px solid #10b981;
  color: #065f46;
  padding: 30px;
  border-radius: 16px;
  text-align: center;
}
.form-group {
  margin-bottom: 20px;
}
.form-label {
  display: block;
  font-weight: 700;
  margin-bottom: 8px;
}
.form-control {
  width: 100%;
  padding: 12px;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  font-family: inherit;
}
.grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}
.max-w-800 {
  max-width: 800px;
}
.text-center {
  text-align: center;
}
.mb-30 {
  margin-bottom: 30px;
}
.mt-15 {
  margin-top: 15px;
}
.bold-700 {
  font-weight: 700;
}
.btn-full {
  width: 100%;
}
.m-0 {
  margin: 0;
}

/* Pagination Styles */
.pagination-container {
  display: flex;
  justify-content: center;
}

.pagination-container .page-numbers {
  display: flex;
  list-style: none;
  padding: 0;
  margin: 0;
  gap: 8px;
  align-items: center;
}

.pagination-container .page-numbers li {
  margin: 0;
}

.pagination-container .page-numbers li a,
.pagination-container .page-numbers li span {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: #fff;
  border: 1px solid #e2e8f0;
  color: #64748b;
  text-decoration: none;
  font-weight: 700;
  transition: all 0.2s;
}

.pagination-container .page-numbers li span.current {
  background: var(--primary-color);
  border-color: var(--primary-color);
  color: #fff;
}

.pagination-container .page-numbers li a:hover {
  border-color: var(--primary-color);
  color: var(--primary-color);
  background: #f8fafc;
}

.mt-40 {
  margin-top: 40px;
}
.p-60 {
  padding: 60px;
}
.empty-state-full {
  text-align: center;
}
.flex-gap-10 {
  display: flex;
  gap: 10px;
}
.flex-wrap {
  flex-wrap: wrap;
}
.mb-20 {
  margin-bottom: 20px;
}
.mr-10 {
  margin-right: 10px;
}

/* PWA Banner */
.pwa-subtitle {
  font-size: 0.75rem;
  opacity: 0.8;
}
.pwa-actions {
  display: flex;
  align-items: center;
}

/* Login Required UI */
.login-required-container {
  text-align: center;
  padding: 60px 20px;
  background: #fff;
  border-radius: 24px;
  box-shadow: 0 10px 30px -5px rgba(0, 0, 0, 0.05);
  border: 1px solid #e2e8f0;
  max-width: 600px;
  margin: 40px auto;
}
.login-required-container .icon-wrap {
  width: 80px;
  height: 80px;
  background: #eef2ff;
  color: var(--primary-color);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 24px;
  font-size: 2rem;
}
.login-required-title {
  color: #1e293b;
  font-size: 1.8rem;
  font-weight: 800;
  margin-bottom: 16px;
}
.login-required-desc {
  color: #64748b;
  font-size: 1.1rem;
  line-height: 1.6;
  margin-bottom: 32px;
  max-width: 400px;
  margin-left: auto;
  margin-right: auto;
}
.auth-actions {
  display: flex;
  gap: 16px;
  justify-content: center;
  flex-wrap: wrap;
}
.auth-btn {
  padding: 14px 32px;
  font-weight: 700;
  border-radius: 12px;
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  transition: all 0.2s;
}
.btn-outline.auth-btn {
  border: 2px solid #e2e8f0;
  color: #1e293b;
}
.btn-outline.auth-btn:hover {
  border-color: var(--primary-color);
  color: var(--primary-color);
}

/* Logout link in dropdown */
.logout-text {
  color: #dc2626 !important;
}

/* Login Page Custom Message */
.login-custom-msg {
  border-right-color: var(--primary-color);
  border-left: none;
  padding: 12px;
  background: #fff;
  margin-bottom: 20px;
}
.login-custom-msg-title {
  color: var(--primary-color);
  display: block;
  margin-bottom: 5px;
}

/* Extra Utilities */
.badge-lg {
  font-size: 1rem;
  padding: 8px 16px;
  margin-bottom: 15px;
  display: inline-block;
}
.text-dark {
  color: #1e293b;
}
.mb-10 {
  margin-bottom: 10px;
}
.p-20-40 {
  padding: 40px 20px;
}
.w-full {
  width: 100%;
}
.m-auto {
  margin: 0 auto;
}
.mb-40 {
  margin-bottom: 40px;
}

/* ACF Form Styles */
.acf-form {
  display: flex !important;
  flex-wrap: wrap !important;
  width: 100% !important;
  margin: 0 -12px !important;
  box-sizing: border-box !important;
}
.acf-field {
  width: 50% !important;
  padding: 0 12px !important;
  margin-bottom: 25px !important;
  box-sizing: border-box !important;
  float: none !important;
  clear: none !important;
  flex: none !important;
}
.acf-field[data-name="_post_title"],
.acf-field[data-name="post_title"],
.acf-field[data-name="_post_content"],
.acf-field[data-name="post_content"],
.acf-field[data-name="google_map"],
.acf-field[data-type="google_map"],
.acf-field[data-name="_thumbnail_id"],
.acf-field[data-name="directory_category_select"],
.acf-form-submit {
  width: 100% !important;
}
.acf-label label {
  display: block;
  font-weight: 700;
  margin-bottom: 8px;
  color: #334155;
}
.acf-input input[type="text"],
.acf-input input[type="email"],
.acf-input input[type="url"],
.acf-input input[type="number"],
.acf-input input[type="password"],
.acf-input textarea,
.acf-input select {
  width: 100%;
  padding: 12px;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  font-family: inherit;
  font-size: 1rem;
  transition: all 0.2s;
  background: #f8fafc;
}
.acf-input input:focus,
.acf-input textarea:focus,
.acf-input select:focus {
  border-color: var(--primary-color);
  outline: none;
  box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.1);
  background: #fff;
}
@media (max-width: 600px) {
  .acf-field {
    flex: 1 1 100%;
  }
}
.acf-map {
  height: 350px;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid #e2e8f0;
}
.acf-button {
  width: 100%;
  padding: 15px;
  font-size: 1.1rem;
  margin-top: 20px;
  border-radius: 12px;
  font-weight: 700;
}
ul.acf-checkbox-list {
  list-style: none;
  padding: 15px;
  margin: 0;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  max-height: 300px;
  overflow-y: auto;
}
ul.acf-checkbox-list li {
  margin-bottom: 8px;
}
ul.acf-checkbox-list ul.children {
  margin-right: 20px;
  padding-right: 10px;
  border-right: 2px solid #e2e8f0;
  margin-top: 8px;
  list-style: none;
}
ul.acf-checkbox-list label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 500 !important;
  cursor: pointer;
}
ul.acf-checkbox-list input[type="checkbox"] {
  width: 18px !important;
  height: 18px !important;
  accent-color: var(--primary-color);
}

/* Status Badge Variants */
.status-publish {
  background: #f0fdf4;
  color: #16a34a;
}
.status-pending {
  background: #fff7ed;
  color: #ea580c;
}
.status-draft {
  background: #f8fafc;
  color: #64748b;
}

/* PWA Install Banner */
#pwa-install-banner {
  position: fixed;
  bottom: 20px;
  left: 20px;
  right: 20px;
  background: #1e1b4b;
  color: white;
  padding: 16px;
  border-radius: 16px;
  display: none;
  justify-content: space-between;
  align-items: center;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.3);
  z-index: 9999;
  border: 1px solid rgba(255, 255, 255, 0.1);
  animation: slideUp 0.5s ease-out;
}
@keyframes slideUp {
  from {
    transform: translateY(100px);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}
#pwa-install-banner .text {
  display: flex;
  align-items: center;
  gap: 12px;
}
#pwa-install-banner .text i {
  font-size: 1.5rem;
  color: #3ddc84;
}
#pwa-install-banner button.install-btn {
  background: var(--primary-color);
  color: white;
  border: none;
  padding: 8px 16px;
  border-radius: 8px;
  font-weight: 700;
  cursor: pointer;
  font-family: inherit;
}
#pwa-install-banner .close-pwa {
  background: transparent;
  color: rgba(255, 255, 255, 0.5);
  border: none;
  font-size: 1.2rem;
  cursor: pointer;
  padding-left: 10px;
}

/* ==============================================================
   Single Directory Layout (70/30 Split)
============================================================== */
.directory-layout {
  display: flex;
  flex-direction: column;
  gap: 30px;
}

.directory-main-content {
  width: 100%;
}

.directory-sidebar {
  order: -1; /* Move to top on mobile */
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center; /* Center image and CV button content */
  gap: 15px;
}

@media (min-width: 992px) {
  .directory-layout {
    flex-direction: row;
    align-items: flex-start;
  }

  .directory-main-content {
    flex: 0 0 calc(70% - 15px);
    width: 70%;
  }

  .directory-sidebar {
    order: 0;
    flex: 0 0 calc(30% - 15px);
    width: 30%;
    position: sticky;
    top: 100px;
  }
}

/* Hide drawer buttons */
.sidebar-toggle-btn,
.sidebar-close-btn,
.sidebar-overlay {
  display: none !important;
}

.directory-sidebar .pb-lightbox img,
.directory-sidebar > img,
.directory-sidebar .avatar-placeholder {
  width: 100%;
  max-width: 350px; /* Force image to fit sidebar and not be full screen */
  height: auto;
  border-radius: 16px;
  box-shadow:
    0 10px 25px -5px rgba(0, 0, 0, 0.1),
    0 8px 10px -6px rgba(0, 0, 0, 0.05);
  object-fit: cover;
  transition: transform 0.3s ease;
}

@media (min-width: 992px) {
  .directory-sidebar .pb-lightbox img,
  .directory-sidebar > img {
    max-width: 100%;
  }
}

.directory-sidebar > img:hover,
.directory-sidebar .avatar-placeholder:hover {
  transform: translateY(-5px);
  box-shadow:
    0 20px 25px -5px rgba(0, 0, 0, 0.1),
    0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

.directory-sidebar .avatar-placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: #f1f5f9;
  color: #cbd5e1;
  min-height: 300px;
  border: 1px dashed #e2e8f0;
}

/* ==============================================================
   Modern Comments System
============================================================== */
.comments-area {
  background: #ffffff;
  border-radius: 16px;
  padding: 30px;
  box-shadow: var(--card-shadow);
  border: 1px solid #e2e8f0;
}

.comments-title {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text-dark);
  border-bottom: 2px solid #f1f5f9;
  padding-bottom: 15px;
}

.comment-list {
  padding: 0;
  margin: 0;
  list-style: none;
}

.comment-body {
  padding: 20px 0;
  border-bottom: 1px solid #f1f5f9;
}

.comment-list .parent > .comment-body {
  border-bottom: none;
  padding-bottom: 10px;
}

.comment-list .children {
  margin-right: 40px; /* RTL margin right */
  padding-right: 20px;
  border-right: 3px solid #f1f5f9;
}

.comment-author-avatar img {
  border-radius: 50%;
  margin-left: 15px; /* RTL margin left */
  border: 2px solid #f8fafc;
}

.comment-content-wrap {
  flex: 1;
  background: #f8fafc;
  padding: 15px 20px;
  border-radius: 12px;
  position: relative;
}

.comment-meta .comment-author b {
  color: var(--text-dark);
  font-size: 1.1rem;
}

.comment-text {
  font-size: 1rem;
  line-height: 1.6;
  color: #475569;
  margin-top: 5px;
}

.reply-btn {
  font-size: 0.85rem;
  transition: all 0.2s;
  cursor: pointer;
}

.reply-btn:hover {
  background-color: var(--primary);
  color: white;
  border-color: var(--primary);
}

.comment-form-comment label {
  display: block;
  font-weight: 600;
  margin-bottom: 5px;
}

.comment-form-comment textarea {
  width: 100%;
  border-radius: 12px;
  border: 2px solid #e2e8f0;
  padding: 15px;
  font-family: inherit;
  transition:
    border-color 0.2s,
    box-shadow 0.2s;
}

.comment-form-comment textarea:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.1);
  outline: none;
}

.btn-submit-comment {
  padding: 12px 30px;
  font-weight: 700;
  border-radius: 50px;
}

/* ==============================================================
   WhatsApp Floating Button
============================================================== */
.whatsapp-float {
  position: fixed;
  bottom: 24px;
  left: 24px;
  right: auto;
  width: 60px;
  height: 60px;
  background-color: #25d366;
  color: #fff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 35px;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.15);
  z-index: 9999;
  text-decoration: none;
  animation: pulse-wa 2s infinite;
  transition:
    background-color 0.3s,
    transform 0.3s;
}

.whatsapp-float:hover {
  background-color: #128c7e;
  transform: scale(1.05);
  color: #fff;
}

@keyframes pulse-wa {
  0% {
    box-shadow: 0 0 0 0 rgba(37, 211, 102, 0.7);
  }
  70% {
    box-shadow: 0 0 0 15px rgba(37, 211, 102, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(37, 211, 102, 0);
  }
}

/* ==============================================================
   ACF Form Custom Grid Layout (Add Business)
============================================================== */
form.acf-form-arabic .acf-fields {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  align-items: flex-start;
}

/* Remove default ACF borders and paddings for seamless styling */
form.acf-form-arabic .acf-fields > .acf-field {
  padding: 0 !important;
  margin: 0 !important;
  border: none !important;
  /* 1 input per row */
  flex: 1 1 100%;
}

/* Long text/map fields to ALWAYS span across full row */
form.acf-form-arabic .acf-fields > .acf-field[data-name="_post_title"],
form.acf-form-arabic .acf-fields > .acf-field[data-name="_post_content"],
form.acf-form-arabic .acf-fields > .acf-field[data-name="post_title"],
form.acf-form-arabic .acf-fields > .acf-field[data-name="post_content"],
form.acf-form-arabic .acf-fields > .acf-field-textarea,
form.acf-form-arabic .acf-fields > .acf-field-wysiwyg,
form.acf-form-arabic .acf-fields > .acf-field-image,
form.acf-form-arabic .acf-fields > .acf-field[data-name="address"],
form.acf-form-arabic .acf-fields > .acf-field[data-name="google_map"],
form.acf-form-arabic .acf-fields > .acf-field[data-name="google_map_url"],
form.acf-form-arabic .acf-fields > .acf-field[data-name="map"],
form.acf-form-arabic .acf-fields > .acf-field[data-name="_thumbnail_id"] {
  flex: 1 1 100%;
}

/* Form inputs beautification */
form.acf-form-arabic .acf-label label {
  font-weight: 600;
  color: var(--text-dark);
  margin-bottom: 8px;
  display: block;
}

form.acf-form-arabic input[type="text"],
form.acf-form-arabic input[type="email"],
form.acf-form-arabic input[type="url"],
form.acf-form-arabic input[type="number"],
form.acf-form-arabic textarea,
form.acf-form-arabic select {
  width: 100%;
  padding: 12px 15px;
  border: 1px solid #ddd;
  border-radius: 8px;
  font-family: inherit;
  transition:
    border-color 0.3s ease,
    box-shadow 0.3s ease;
}

form.acf-form-arabic input:focus,
form.acf-form-arabic textarea:focus,
form.acf-form-arabic select:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(0, 150, 136, 0.1);
  outline: none;
}

/* Submit Button */
form.acf-form-arabic .acf-form-submit {
  text-align: center;
  margin-top: 30px;
}

form.acf-form-arabic .acf-form-submit .btn-primary {
  padding: 12px 40px;
  font-size: 1.15rem;
  font-weight: 600;
  border-radius: 8px;
}

/* Responsive Layout Adjustments */
form.acf-form-arabic .acf-fields > .acf-field {
  flex: 1 1 100%;
}

form.acf-form-arabic .acf-fields {
  gap: 15px;
}

@media (min-width: 769px) {
  /* You can add multi-column field logic here if needed for desktop */
}

.page-template-page-add-business-acf .card {
  width: 100%;
}

@media (min-width: 992px) {
  .page-template-page-add-business-acf .card {
    width: 60%;
  }
}

.page-template-page-add-business-acf .card .acf-field {
  width: 100% !important;
}

/* Directory Gallery */
.directory-gallery {
  margin-top: 40px;
  padding-top: 40px;
  border-top: 1px solid #e2e8f0;
}

.gallery-grid .gallery-item:hover {
  transform: scale(1.03);
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
  border-color: var(--primary) !important;
}

/* Simple Lightbox */
.pb-lightbox-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.9);
  display: none;
  justify-content: center;
  align-items: center;
  z-index: 10000;
  padding: 20px;
}

.pb-lightbox-overlay.active {
  display: flex;
}

.pb-lightbox-content {
  position: relative;
  max-width: 90%;
  max-height: 90%;
}

.pb-lightbox-content img {
  max-width: 100%;
  max-height: 90vh;
  border-radius: 8px;
  box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.5);
}

.pb-lightbox-close {
  position: absolute;
  top: -40px;
  left: 0;
  color: white;
  font-size: 40px;
  cursor: pointer;
  background: none;
  border: none;
  z-index: 10001;
}

.pb-lightbox-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  color: white;
  font-size: 50px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 20px;
  z-index: 10001;
  transition: opacity 0.3s;
}

.pb-lightbox-nav:hover {
  opacity: 0.7;
}

.pb-lightbox-prev {
  left: -80px;
}

.pb-lightbox-next {
  right: -80px;
}

@media (max-width: 991px) {
  .pb-lightbox-nav {
    font-size: 40px;
    padding: 10px;
  }
  .pb-lightbox-prev {
    left: -40px;
  }
  .pb-lightbox-next {
    right: -40px;
  }
}

@media (max-width: 600px) {
  .pb-lightbox-nav {
    display: none; /* Swipe on mobile */
  }
}

/* Submission Form Enhancements */
.file-upload-wrapper:hover {
  border-color: var(--primary) !important;
  background: #f1f5f9 !important;
}

#gallery-preview div {
  background: #fff;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

.grid-5 {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
}

@media (max-width: 600px) {
  .grid-5 {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* ==============================================================
   CONTACT FORM 7 - PREMIUM STYLING (FIXED SELECTORS)
   ============================================================== */

/* Ensure the form has room */
.wpcf7 {
  margin: 30px 0;
}

/* Individual field wrappers created by CF7's <p> and <span> tags */
.wpcf7-form p {
  margin-bottom: 24px !important;
  position: relative;
}

/* Label styling */
.wpcf7-form label {
  display: block !important;
  font-weight: 700 !important;
  color: var(--text-dark) !important;
  margin-bottom: 8px !important;
  font-size: 0.95rem !important;
}

/* Core Inputs: Text, Email, Tel, URL, Number, Textarea */
.wpcf7-form-control.wpcf7-text,
.wpcf7-form-control.wpcf7-textarea,
.wpcf7-form-control.wpcf7-number,
.wpcf7-form-control.wpcf7-select,
.wpcf7-form-control.wpcf7-date {
  display: block !important;
  width: 100% !important;
  padding: 14px 18px !important;
  background-color: #ffffff !important;
  border: 1.5px solid #e2e8f0 !important;
  border-radius: 12px !important;
  font-family: inherit !important;
  font-size: 1rem !important;
  color: #1e293b !important;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05) !important;
  box-sizing: border-box !important;
}

/* Hover effect */
.wpcf7-form-control.wpcf7-text:hover,
.wpcf7-form-control.wpcf7-textarea:hover {
  border-color: #cbd5e1 !important;
}

/* Focus effect */
.wpcf7-form-control.wpcf7-text:focus,
.wpcf7-form-control.wpcf7-textarea:focus {
  outline: none !important;
  border-color: var(--primary) !important;
  background-color: #fff !important;
  box-shadow: 0 0 0 4px rgba(0, 150, 136, 0.1) !important;
  transform: translateY(-1px);
}

/* Textarea height adjustment */
.wpcf7-form-control.wpcf7-textarea {
  min-height: 180px !important;
  resize: vertical !important;
}

/* Submit Button */
.wpcf7-form-control.wpcf7-submit {
  background-color: var(--primary) !important;
  color: #ffffff !important;
  font-weight: 700 !important;
  font-size: 1.1rem !important;
  padding: 16px 45px !important;
  border: none !important;
  border-radius: 50px !important;
  cursor: pointer !important;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
  display: inline-block !important;
  box-shadow: 0 10px 15px -3px rgba(0, 150, 136, 0.3) !important;
  margin: 10px 0 !important;
  width: auto !important;
  min-width: 200px !important;
  -webkit-appearance: none;
  appearance: none;
}

.wpcf7-form-control.wpcf7-submit:hover {
  background-color: var(--primary-hover) !important;
  transform: translateY(-2px) !important;
  box-shadow: 0 15px 25px -5px rgba(0, 150, 136, 0.4) !important;
}

/* Response messaging */
.wpcf7-response-output {
  margin: 30px 0 0 !important;
  padding: 16px 24px !important;
  border-radius: 12px !important;
  font-weight: 600 !important;
  text-align: center !important;
  border: 2px solid transparent !important;
  font-size: 1rem !important;
}

/* Response types */
.wpcf7-mail-sent-ok {
  background-color: #ecfdf5 !important;
  border-color: #10b981 !important;
  color: #065f46 !important;
}

.wpcf7-validation-errors {
  background-color: #fffbeb !important;
  border-color: #f59e0b !important;
  color: #92400e !important;
}

.wpcf7-mail-sent-ng {
  background-color: #fef2f2 !important;
  border-color: #ef4444 !important;
  color: #991b1b !important;
}

/* Error bubbles */
.wpcf7-not-valid-tip {
  color: #ef4444 !important;
  font-size: 0.85rem !important;
  font-weight: 600 !important;
  margin-top: 5px !important;
  display: block !important;
}

/* Spinner adjustment */
.wpcf7-spinner {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  margin-left: 15px;
}

/* RTL Specific Overrides */
[direction="rtl"] .wpcf7-form label {
  text-align: right;
}

@media (max-width: 768px) {
  .wpcf7-form-control.wpcf7-submit {
    width: 100% !important;
  }
}

/* Custom Lightbox Styles */
.pb-lightbox-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.95);
  backdrop-filter: blur(10px);
  z-index: 99999;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: all 0.3s ease;
}

.pb-lightbox-overlay.active {
  opacity: 1;
  visibility: visible;
  pointer-events: all;
}

.pb-lightbox-container {
  position: relative;
  max-width: 90%;
  max-height: 90%;
}

.pb-lightbox-container img {
  max-width: 100%;
  max-height: 90vh;
  border-radius: 12px;
  box-shadow: 0 0 50px rgba(0, 0, 0, 0.5);
  display: block;
}

.pb-lightbox-close {
  position: absolute;
  top: -60px;
  right: 0;
  background: #fff;
  color: #000;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 20px;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
  transition: transform 0.2s;
  z-index: 100000;
}

[direction="rtl"] .pb-lightbox-close {
  right: auto;
  left: 0;
}

.pb-lightbox-close:hover {
  transform: scale(1.1);
  background: #ffc107;
}
