/*
Theme Name: New Al Abed
Theme URI: https://newalabed.com
Author: New Al Abed
Author URI: https://newalabed.com
Description: قالب موقع نيو آل عبد - حلول أمنية ذكية (أقفال فنادق، أقفال ذكية، خزائن آمنة). يدعم اللغتين العربية والإنجليزية.
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: new-al-abed
Tags: rtl-language-support, one-column, two-columns, custom-logo, custom-menu
*/

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Cairo', 'Inter', sans-serif;
  background: #f8f9fa;
  color: #1a1a2e;
  line-height: 1.7;
  direction: rtl;
}

body.en {
  font-family: 'Inter', 'Cairo', sans-serif;
  direction: ltr;
}

body.en .hero-content h2,
body.en .hero-content p {
  direction: ltr;
}

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

a { text-decoration: none; color: inherit; }
ul { list-style: none; }
img { max-width: 100%; }

/* =============================
   HEADER
   ============================= */
header {
  position: fixed;
  top: 0;
  width: 100%;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(0, 0, 0, 0.05);
  z-index: 1000;
  transition: box-shadow 0.3s;
}

header.scrolled {
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
}

.logo h1 {
  font-size: 1.5rem;
  font-weight: 900;
  color: #1a1a2e;
  letter-spacing: -0.5px;
  margin: 0;
}

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

.tagline {
  display: block;
  font-size: 0.7rem;
  color: #888;
  font-weight: 400;
  margin-top: -2px;
}

nav,
.site-nav {
  display: flex;
  align-items: center;
  gap: 32px;
}

nav a,
.site-nav a {
  font-size: 0.9rem;
  font-weight: 600;
  color: #333;
  transition: color 0.2s;
  position: relative;
}

nav a::after,
.site-nav a::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 2px;
  background: #c9a84c;
  transition: width 0.3s;
}

body.en nav a::after,
body.en .site-nav a::after {
  left: 0;
  right: auto;
}

nav a:hover,
.site-nav a:hover { color: #c9a84c; }
nav a:hover::after,
.site-nav a:hover::after { width: 100%; }

.lang-btn {
  background: none;
  border: 2px solid #c9a84c;
  color: #c9a84c;
  font-weight: 700;
  padding: 6px 16px;
  border-radius: 6px;
  cursor: pointer;
  font-size: 0.8rem;
  transition: all 0.2s;
  font-family: inherit;
}

.lang-btn:hover {
  background: #c9a84c;
  color: #fff;
}

.hamburger {
  display: none;
  background: none;
  border: none;
  font-size: 1.5rem;
  cursor: pointer;
  color: #1a1a2e;
}

/* =============================
   HERO
   ============================= */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  background: linear-gradient(135deg, #0f0f1a 0%, #1a1a2e 50%, #16213e 100%);
  color: #fff;
  position: relative;
  overflow: hidden;
  padding-top: 72px;
}

.hero::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -20%;
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, rgba(201, 168, 76, 0.15), transparent);
  border-radius: 50%;
}

.hero-content {
  position: relative;
  z-index: 1;
  text-align: center;
  max-width: 700px;
  margin: 0 auto;
}

.hero-content h2 {
  font-size: 3.2rem;
  font-weight: 900;
  margin-bottom: 16px;
  line-height: 1.2;
}

.hero-content h2 span { color: #c9a84c; }

.hero-content p {
  font-size: 1.1rem;
  color: rgba(255, 255, 255, 0.7);
  margin-bottom: 8px;
}

.hero-desc {
  font-size: 1rem;
  color: rgba(255, 255, 255, 0.5);
  margin: 16px 0 32px;
  max-width: 500px;
  margin-left: auto;
  margin-right: auto;
}

.btn-primary {
  display: inline-block;
  background: #c9a84c;
  color: #1a1a2e;
  padding: 14px 36px;
  border-radius: 8px;
  font-weight: 700;
  font-size: 1rem;
  border: none;
  cursor: pointer;
  transition: all 0.3s;
  font-family: inherit;
}

.btn-primary:hover {
  background: #b8952e;
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(201, 168, 76, 0.3);
}

/* =============================
   SECTION HEADER
   ============================= */
.section-header {
  text-align: center;
  margin-bottom: 48px;
}

.section-header h2 {
  font-size: 2.2rem;
  font-weight: 900;
  color: #1a1a2e;
  margin-bottom: 8px;
  position: relative;
  display: inline-block;
  margin-top: 0;
}

.section-header h2::after {
  content: '';
  display: block;
  width: 60px;
  height: 3px;
  background: #c9a84c;
  margin: 12px auto 0;
  border-radius: 2px;
}

.section-header p {
  color: #666;
  font-size: 1rem;
  margin-top: 8px;
}

/* =============================
   PRODUCTS
   ============================= */
.products {
  padding: 100px 0;
  background: #fff;
}

.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 32px;
}

.product-card {
  background: #fff;
  border-radius: 16px;
  overflow: hidden;
  border: 1px solid #eee;
  transition: all 0.3s;
  display: flex;
  flex-direction: column;
}

.product-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.08);
  border-color: #c9a84c;
}

.product-img {
  height: 200px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #f8f9fa, #e9ecef);
}

.product-img .featured-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.icon-placeholder {
  font-size: 4rem;
}

.product-info {
  padding: 28px;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.product-info h3 {
  font-size: 1.3rem;
  font-weight: 700;
  margin-bottom: 8px;
  color: #1a1a2e;
  margin-top: 0;
}

.product-info p {
  color: #666;
  font-size: 0.9rem;
  margin-bottom: 16px;
}

.features {
  margin-bottom: 20px;
}

.features li {
  padding: 4px 0;
  font-size: 0.85rem;
  color: #555;
}

.features li::before {
  content: '✓';
  color: #c9a84c;
  font-weight: bold;
  margin-left: 8px;
}

body.en .features li::before {
  margin-left: 0;
  margin-right: 8px;
}

.btn-secondary {
  display: inline-block;
  padding: 10px 24px;
  border: 2px solid #c9a84c;
  color: #c9a84c;
  border-radius: 6px;
  font-weight: 600;
  font-size: 0.85rem;
  transition: all 0.2s;
  font-family: inherit;
  align-self: flex-start;
  margin-top: auto;
}

.btn-secondary:hover {
  background: #c9a84c;
  color: #fff;
}

/* =============================
   WHY US
   ============================= */
.why-us {
  padding: 80px 0;
  background: #f8f9fa;
}

.features-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 32px;
}

.feature-item {
  text-align: center;
  padding: 32px 20px;
  background: #fff;
  border-radius: 12px;
  border: 1px solid #eee;
  transition: all 0.3s;
}

.feature-item:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.06);
}

.fi-icon {
  font-size: 2.5rem;
  margin-bottom: 16px;
}

.feature-item h4 {
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 8px;
  color: #1a1a2e;
  margin-top: 0;
}

.feature-item p {
  font-size: 0.85rem;
  color: #666;
}

/* =============================
   ABOUT
   ============================= */
.about {
  padding: 100px 0;
  background: #fff;
}

.about-content {
  max-width: 800px;
  margin: 0 auto;
  text-align: center;
}

.about-text p {
  font-size: 1.05rem;
  color: #555;
  margin-bottom: 16px;
  line-height: 1.9;
}

.about-tag {
  font-size: 1.5rem;
  font-weight: 900;
  color: #1a1a2e;
  margin-bottom: 12px;
  margin-top: 0;
}

.about-list-title {
  font-size: 1.1rem;
  font-weight: 700;
  color: #1a1a2e;
  margin: 24px 0 12px;
  margin-top: 24px;
}

.about-list {
  list-style: none;
  margin: 0 auto 24px;
  display: inline-block;
  text-align: right;
}

body.en .about-list {
  text-align: left;
}

.about-list li {
  padding: 6px 0;
  font-size: 0.95rem;
  color: #555;
}

.about-tagline {
  font-weight: 700;
  color: #c9a84c;
  font-size: 1.2rem;
}

/* =============================
   CONTACT
   ============================= */
.contact {
  padding: 100px 0;
  background: #f8f9fa;
}

.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1.5fr;
  gap: 48px;
  max-width: 1000px;
  margin: 0 auto;
}

.contact-info {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.ci-item {
  display: flex;
  align-items: flex-start;
  gap: 16px;
}

.ci-icon {
  font-size: 1.5rem;
  flex-shrink: 0;
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #fff;
  border-radius: 10px;
  border: 1px solid #eee;
}

.ci-item strong {
  display: block;
  font-size: 0.85rem;
  color: #888;
  margin-bottom: 2px;
}

.ci-item p {
  font-size: 1rem;
  color: #1a1a2e;
  font-weight: 600;
}

.contact-form {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.contact-form input,
.contact-form textarea {
  padding: 14px 16px;
  border: 1px solid #ddd;
  border-radius: 8px;
  font-size: 0.95rem;
  font-family: inherit;
  background: #fff;
  transition: border-color 0.2s;
}

.contact-form input:focus,
.contact-form textarea:focus {
  outline: none;
  border-color: #c9a84c;
}

.contact-form button {
  align-self: flex-start;
}

/* =============================
   NEWSLETTER
   ============================= */
.newsletter {
  padding: 60px 0;
  background: linear-gradient(135deg, #0f0f1a, #1a1a2e);
  color: #fff;
  text-align: center;
}

.newsletter h3 {
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 8px;
  margin-top: 0;
}

.newsletter p {
  color: rgba(255, 255, 255, 0.6);
  font-size: 0.9rem;
  margin-bottom: 24px;
}

.newsletter-form {
  display: flex;
  max-width: 440px;
  margin: 0 auto;
  gap: 0;
}

.newsletter-form input {
  flex: 1;
  padding: 14px 18px;
  border: none;
  border-radius: 8px 0 0 8px;
  font-size: 0.95rem;
  font-family: inherit;
  direction: inherit;
}

body.en .newsletter-form input {
  border-radius: 0 8px 8px 0;
}

.newsletter-form button {
  padding: 14px 28px;
  background: #c9a84c;
  color: #1a1a2e;
  border: none;
  border-radius: 0 8px 8px 0;
  font-weight: 700;
  font-size: 0.95rem;
  cursor: pointer;
  transition: background 0.2s;
  font-family: inherit;
}

body.en .newsletter-form button {
  border-radius: 8px 0 0 8px;
}

.newsletter-form button:hover {
  background: #b8952e;
}

/* =============================
   FOOTER
   ============================= */
footer {
  background: #0a0a14;
  color: rgba(255, 255, 255, 0.7);
  padding: 60px 0 0;
}

.footer-inner {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 40px;
  margin-bottom: 40px;
}

.footer-col h4 {
  color: #fff;
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 16px;
  margin-top: 0;
}

.footer-col p,
.footer-col a {
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.5);
  display: block;
  margin-bottom: 8px;
  transition: color 0.2s;
}

.footer-col a:hover {
  color: #c9a84c;
}

.social-links {
  display: flex;
  gap: 12px;
}

.social-links a {
  padding: 8px 16px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 6px;
  font-size: 0.8rem;
}

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  padding: 20px 0;
  text-align: center;
  font-size: 0.8rem;
  color: rgba(255, 255, 255, 0.3);
}

/* =============================
   BLOG / POSTS (index, single, page)
   ============================= */
.site-main {
  padding-top: 120px;
  padding-bottom: 80px;
  min-height: 60vh;
}

.blog-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 32px;
}

.blog-card {
  background: #fff;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid #eee;
}

.blog-card .blog-body {
  padding: 20px;
}

.blog-card h2 {
  font-size: 1.2rem;
  margin-bottom: 8px;
}

.blog-card h2 a { color: #1a1a2e; }
.blog-card h2 a:hover { color: #c9a84c; }

.blog-meta {
  font-size: 0.8rem;
  color: #888;
  margin-bottom: 8px;
}

.single-entry,
.page-entry {
  background: #fff;
  border-radius: 12px;
  padding: 32px;
  border: 1px solid #eee;
}

.single-entry h1,
.page-entry h1 {
  font-size: 2rem;
  margin-bottom: 16px;
}

.single-entry img,
.page-entry img {
  border-radius: 8px;
}

.single-entry .post-thumbnail,
.page-entry .post-thumbnail {
  margin-bottom: 20px;
}

/* =============================
   GALLERY
   ============================= */
.gallery {
  padding: 100px 0;
  background: #fff;
}

.gallery-sub {
  color: #666;
  font-size: 1rem;
}

.gallery-viewer {
  max-width: 900px;
  margin: 0 auto;
}

.gallery-title {
  text-align: center;
  margin-bottom: 24px;
}

.gallery-title h3 {
  font-size: 1.5rem;
  font-weight: 700;
  color: #1a1a2e;
}

.gallery-main {
  display: flex;
  align-items: center;
  gap: 16px;
}

.gallery-main-img {
  flex: 1;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid #eee;
  background: #f8f9fa;
  min-height: 300px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.gallery-main-img img {
  width: 100%;
  height: 420px;
  object-fit: cover;
  display: block;
}

.gallery-nav {
  width: 48px;
  height: 48px;
  flex-shrink: 0;
  border-radius: 50%;
  background: #fff;
  border: 2px solid #c9a84c;
  color: #c9a84c;
  font-size: 1.2rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
  font-family: inherit;
}

.gallery-nav:hover {
  background: #c9a84c;
  color: #fff;
}

.gallery-thumbs {
  display: flex;
  justify-content: center;
  gap: 12px;
  margin-top: 24px;
  flex-wrap: wrap;
}

.gallery-thumbs img {
  width: 80px;
  height: 60px;
  object-fit: cover;
  border-radius: 8px;
  cursor: pointer;
  border: 2px solid transparent;
  transition: border-color 0.2s, opacity 0.2s;
  opacity: 0.6;
}

.gallery-thumbs img:hover {
  opacity: 1;
}

.gallery-thumbs img.active {
  border-color: #c9a84c;
  opacity: 1;
}

.gallery-empty {
  text-align: center;
  padding: 40px;
  color: #888;
  font-size: 1rem;
  background: #f8f9fa;
  border-radius: 12px;
  border: 1px dashed #ccc;
  max-width: 600px;
  margin: 0 auto;
}

/* =============================
   RESPONSIVE
   ============================= */
@media (max-width: 768px) {
  header nav,
  .site-nav {
    display: none;
    position: absolute;
    top: 72px;
    left: 0;
    right: 0;
    background: #fff;
    flex-direction: column;
    padding: 20px;
    border-bottom: 1px solid #eee;
    gap: 16px;
    z-index: 999;
  }

  header nav.open,
  .site-nav.open {
    display: flex;
  }

  .hamburger {
    display: block;
  }

  .hero-content h2 {
    font-size: 2rem;
  }

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

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

  .features-row {
    grid-template-columns: 1fr 1fr;
  }

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

  .gallery-main-img img {
    height: 280px;
  }
}

@media (max-width: 480px) {
  .features-row {
    grid-template-columns: 1fr;
  }

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

  .section-header h2 {
    font-size: 1.6rem;
  }
}
