/* ===== GOOGLE FONTS ===== */
@import url("https://fonts.googleapis.com/css2?family=Tajawal:wght@200;300;400;500;700&display=swap");

/* ===== VARIABLES - UNIFIED BRAND IDENTITY ===== */
:root {
  --primary-green: #0f5132; /* الأخضر الداكن (الأساسي) */
  --secondary-green: #198754; /* أخضر متوسط */
  --light-green: #d1e7dd; /* أخضر فاتح للخلفيات */
  --white: #ffffff;
  --dark: #222;
  --gray: #666;
  --gold: #c5a059;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: "Tajawal", sans-serif;
  background-color: var(--white);
  color: var(--dark);
  direction: rtl;
  line-height: 1.6;
  overflow-x: hidden;
}

/* ===== GLOBAL LAYOUT ===== */
.container {
  width: 90%;
  max-width: 1200px;
  margin: auto;
}

.section {
  padding: 60px 0;
}

.section.light {
  background: var(--light-green);
}

h2 {
  text-align: center;
  margin-bottom: 30px;
  color: var(--primary-green);
  font-weight: 700;
}

h1, h3, h4, h5, h6 {
  color: var(--primary-green);
  font-weight: 700;
}

p {
  color: var(--gray);
}

a {
  color: var(--primary-green);
  text-decoration: none;
  transition: 0.3s;
}

a:hover {
  color: var(--secondary-green);
}

/* Buttons */
.btn-request, .btn-gold, .wa-send, #wa-send-btn {
  background: var(--primary-green);
  color: var(--white);
  border: none;
  padding: 12px 24px;
  border-radius: 8px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: 0.3s;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.btn-request:hover, .btn-gold:hover, .wa-send:hover, #wa-send-btn:hover {
  background: var(--secondary-green);
  transform: translateY(-2px);
}

.btn-request:active {
  transform: scale(0.97);
}
.phone,
.whatsapp,
.ltr {
  direction: ltr;
  unicode-bidi: embed;
}


/* ===== HEADER ===== */
#masthead {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 5%;
  background: var(--white);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.06);
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 9999;
  height: 70px;
}

.logo img {
  height: 50px;
  width: auto;
}

.nav-links ul {
  display: flex;
  gap: 25px;
  list-style: none;
}

.nav-links ul li a {
  color: var(--dark);
  font-weight: 600;
  position: relative;
  padding: 5px 0;
}

.nav-links ul li a::after {
  content: "";
  position: absolute;
  bottom: 0;
  right: 0;
  width: 0%;
  height: 2px;
  background: var(--primary-green);
  transition: 0.3s;
}

.nav-links ul li a:hover::after, .nav-links ul li a.active::after {
  width: 100%;
}

.header-left {
  display: flex;
  align-items: center;
  gap: 15px;
}

.btn-phone {
  font-size: 20px;
  color: var(--primary-green);
}

.nav-toggle {
  display: none;
  font-size: 28px;
  background: none;
  border: none;
  cursor: pointer;
  color: var(--primary-green);
}

#menu-close {
  display: none;
}

/* ===== HERO SECTION ===== */
.hero-container {
  position: relative;
  height: 100vh;
  width: 100%;
  overflow: hidden;
  background: #000;
}

.hero-container video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-container::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(15, 81, 50, 0.6) 0%, rgba(0, 0, 0, 0.7) 100%);
  z-index: 2;
  animation: heroOverlay 3s ease-in-out infinite;
}

@keyframes heroOverlay {
  0%, 100% { opacity: 0.6; }
  50% { opacity: 0.75; }
}

.hero-headline {
  position: absolute;
  top: 45%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 3;
  text-align: center;
  color: #fff;
  width: 90%;
}

.hero-headline h1 {
  font-size: clamp(24px, 5vw, 48px);
  line-height: 1.3;
  color: #fff;
  text-shadow: 0 4px 20px rgba(0,0,0,0.5);
  animation: slideInDown 1s ease-out;
  font-weight: 700;
  letter-spacing: 1px;
}

@keyframes slideInDown {
  from {
    opacity: 0;
    transform: translateY(-30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.video-caption {
  position: absolute;
  bottom: 20%;
  left: 0;
  width: 100%;
  z-index: 3;
  text-align: center;
  color: #fff;
}

.caption-lines .line {
  font-size: clamp(16px, 3vw, 24px);
  margin-bottom: 10px;
  opacity: 0;
  transform: translateY(20px);
  transition: 1s ease;
  animation: fadeInUp 1.2s ease-out forwards;
  text-shadow: 0 3px 15px rgba(0,0,0,0.4);
  font-weight: 500;
}

.caption-lines .line:nth-child(1) {
  animation-delay: 0.3s;
}

.caption-lines .line:nth-child(2) {
  animation-delay: 0.8s;
}

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

.caption-lines .line.show {
  opacity: 1;
  transform: translateY(0);
}

/* ===== SERVICES SECTION ===== */
.services {
  padding: 80px 0;
}

.services .cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 30px;
  margin-top: 40px;
}

.card {
  background: var(--white);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 8px 24px rgba(15, 81, 50, 0.08);
  transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  text-align: center;
  display: flex;
  flex-direction: column;
  border: 2px solid transparent;
  position: relative;
}

.card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--primary-green), var(--secondary-green));
  transform: scaleX(0);
  transition: transform 0.4s ease;
  transform-origin: right;
}

.card:hover::before {
  transform: scaleX(1);
  transform-origin: left;
}

.card:hover {
  transform: translateY(-12px);
  box-shadow: 0 16px 48px rgba(15, 81, 50, 0.15);
  border-color: var(--light-green);
}

.card img {
  width: 100%;
  height: 220px;
  object-fit: cover;
  transition: transform 0.4s ease;
}

.card:hover img {
  transform: scale(1.05);
}

.card-content {
  padding: 24px;
  flex-grow: 1;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.card h3 {
  margin-bottom: 12px;
  font-size: 22px;
  font-weight: 700;
  color: var(--primary-green);
  transition: color 0.3s ease;
}

.card:hover h3 {
  color: var(--secondary-green);
}

.card p {
  font-size: 14px;
  margin-bottom: 18px;
  color: var(--gray);
  line-height: 1.6;
  flex-grow: 1;
}

.card .btn-gold {
  margin-top: auto;
  width: 100%;
  padding: 12px 16px;
  font-size: 14px;
  font-weight: 600;
  transition: all 0.3s ease;
}

.stars {
  color: #ffc107;
  margin-bottom: 15px;
}

/* ===== ABOUT SECTION ===== */
.about-content {
  display: flex;
  align-items: center;
  gap: 50px;
  flex-wrap: wrap;
}

.about-text {
  flex: 1;
  min-width: 300px;
}

.about-image {
  flex: 1;
  min-width: 300px;
}

.about-image img {
  width: 100%;
  border-radius: 20px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.1);
}

/* ===== WHY US SECTION ===== */
.container-why {
  width: 90%;
  max-width: 1200px;
  margin: auto;
}

.grid-why {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 20px;
  margin-top: 30px;
}

.card-why {
  background: #f8f9fa;
  padding: 20px;
  border-radius: 12px;
  border-right: 4px solid var(--primary-green);
  font-weight: 600;
  transition: 0.3s;
}

.card-why:hover {
  background: var(--light-green);
}

/* ===== MODAL & CUSTOM SELECT ===== */
.wa-modal {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 10000;
  padding: 20px;
}

.wa-modal.show {
  display: flex;
}

.wa-modal-content {
  background: #fff;
  padding: 30px;
  border-radius: 20px;
  width: 100%;
  max-width: 500px;
  position: relative;
  animation: modalIn 0.4s ease;
}

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

#wa-close {
  position: absolute;
  top: 15px;
  left: 15px;
  font-size: 24px;
  cursor: pointer;
  color: var(--gray);
}

.wa-modal h2 {
  margin-bottom: 20px;
}

.wa-modal input, .wa-modal textarea, .wa-modal select {
  width: 100%;
  padding: 12px 15px;
  margin-bottom: 15px;
  border: 1px solid #ddd;
  border-radius: 10px;
  font-family: inherit;
  font-size: 15px;
}

.custom-select {
  position: relative;
  width: 100%;
  margin-bottom: 15px;
}

.custom-select .selected {
  padding: 12px 15px;
  border: 1px solid #ddd;
  border-radius: 10px;
  background: #fff;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.custom-select .selected::after {
  content: "▼";
  font-size: 12px;
  color: var(--gray);
}

.custom-select .options {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: #fff;
  border: 1px solid #ddd;
  border-radius: 10px;
  margin-top: 5px;
  list-style: none;
  max-height: 200px;
  overflow-y: auto;
  z-index: 10;
  display: none;
  box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.custom-select .options.show {
  display: block;
}

.custom-select .options li {
  padding: 12px 15px;
  cursor: pointer;
  transition: 0.2s;
  border-bottom: 1px solid #eee;
}

.custom-select .options li:last-child {
  border-bottom: none;
}

.custom-select .options li:hover {
  background: var(--light-green);
  color: var(--primary-green);
}

/* ===== FOOTER ===== */
.footer {
  background: #f1f1f1;
  padding: 60px 0 20px;
  margin-top: 50px;
}

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

.footer-section h3 {
  margin-bottom: 20px;
}

.footer-section p {
  margin-bottom: 10px;
}

.social-icons {
  display: flex;
  gap: 15px;
}

.social-icons a {
  width: 40px;
  height: 40px;
  background: var(--primary-green);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  transition: 0.3s;
}

.social-icons a:hover {
  background: var(--secondary-green);
  transform: translateY(-3px);
}

.footer-bottom {
  text-align: center;
  padding-top: 20px;
  border-top: 1px solid #ddd;
  font-size: 14px;
}

/* ===== FLOATING WHATSAPP ===== */
#waFloat {
  position: fixed;
  bottom: 30px;
  right: 30px;
  width: 60px;
  height: 60px;
  background: #25d366;
  color: #fff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 30px;
  box-shadow: 0 5px 15px rgba(0,0,0,0.2);
  z-index: 999;
  border: none;
  cursor: pointer;
  transition: 0.3s;
  opacity: 0;
  visibility: hidden;
}

#waFloat.show {
  opacity: 1;
  visibility: visible;
}

#waFloat:hover {
  transform: scale(1.1);
}

#waBubble {
  position: fixed;
  bottom: 100px;
  right: 30px;
  background: #fff;
  padding: 10px 20px;
  border-radius: 15px;
  box-shadow: 0 5px 15px rgba(0,0,0,0.1);
  font-size: 14px;
  z-index: 998;
  opacity: 0;
  visibility: hidden;
  transition: 0.3s;
}

#waBubble.show {
  opacity: 1;
  visibility: visible;
}

/* ===== MOBILE RESPONSIVE ===== */

/* ===== MEDIA QUERIES - UNIFIED BREAKPOINTS ===== */

/* Desktop Large (1024px and below) */
@media (max-width: 1024px) {
  .container {
    width: 95%;
  }
  
  .section {
    padding: 50px 0;
  }
  
  h1 { font-size: 2.2em; }
  h2 { font-size: 1.8em; }
  h3 { font-size: 1.4em; }
}

/* Tablet (768px and below) */
@media (max-width: 768px) {
  .container {
    width: 95%;
  }
  
  .section {
    padding: 40px 0;
  }
  
  h1 { font-size: 1.8em; }
  h2 { font-size: 1.4em; }
  h3 { font-size: 1.1em; }
  
  .footer-content {
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  }
  
  .blog-grid {
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  }
}

/* Mobile (480px and below) */
@media (max-width: 480px) {
  .container {
    width: 95%;
  }
  
  .section {
    padding: 30px 0;
  }
  
  h1 { font-size: 1.5em; }
  h2 { font-size: 1.2em; }
  h3 { font-size: 1em; }
  
  .footer-content {
    grid-template-columns: 1fr;
  }
  
  .blog-grid {
    grid-template-columns: 1fr;
  }
  
  button {
    padding: 10px 15px;
    font-size: 0.9em;
  }
  
  input, textarea {
    padding: 10px;
    font-size: 16px;
  }
}

/* Mobile Touch Devices */
@media (hover: none) and (pointer: coarse) {
  button:active {
    transform: scale(0.95);
  }
  
  .card:active {
    transform: translateY(-2px);
  }
}

/* ===== NAVIGATION TOGGLE FIX ===== */
@media (max-width: 768px) {
  .nav-toggle {
    display: block !important;
  }
  
  .nav-links {
    position: fixed;
    top: 70px;
    right: -100%;
    width: 100%;
    max-width: 400px;
    height: calc(100vh - 70px);
    background: white;
    flex-direction: column;
    padding: 20px;
    transition: right 0.3s ease-in-out;
    z-index: 998;
    box-shadow: -2px 0 10px rgba(0, 0, 0, 0.1);
    overflow-y: auto;
  }
  
  .nav-links.menu-open {
    right: 0;
  }
  
  .nav-links ul {
    flex-direction: column;
    gap: 15px;
  }
  
  .nav-links ul li a {
    display: block;
    padding: 12px 0;
    border-bottom: 1px solid #eee;
  }
  
  #menu-close {
    display: block;
    position: absolute;
    top: 15px;
    left: 20px;
    font-size: 28px;
    cursor: pointer;
    color: var(--dark);
  }
  
  .header-left {
    gap: 10px;
  }
  
  .btn-request {
    padding: 8px 12px;
    font-size: 0.9em;
  }
}
