/* --- Base Variables & Setup --- */
:root {
  --primary-green: #2d6a4f;    /* Agricultural Green */
  --light-green: #40916c;      /* Hover Green */
  --dark-bg: #0b110d;          /* Deep Green/Black for premium feel */
  --surface-color: #141c16;    /* Slightly lighter than bg for cards/sections */
  --beige: #d8b76a;            /* Premium Sand/Gold color */
  --text-light: #f8f9fa;       /* Off-white */
  --text-muted: #adb5bd;       /* Muted text for paragraphs */
}

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

html, body {
  width: 100%;
  min-height: 100vh;
  background-color: var(--dark-bg);
  color: var(--text-light);
  font-family: 'Cairo', system-ui, -apple-system, sans-serif;
  overflow-x: hidden;
  scroll-behavior: smooth;
}

/* --- Premium Pill Navbar --- */
.premium-navbar {
  position: fixed;
  top: 32px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 100;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 12px;
  background: rgba(20, 20, 20, 0.45);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 100px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3), inset 0 1px 1px rgba(255, 255, 255, 0.1);
  transition: all 0.3s ease;
}

.premium-navbar:hover {
  background: rgba(25, 25, 25, 0.6);
  border-color: rgba(255, 255, 255, 0.25);
}

.nav-logo-img {
  height: 36px;
  width: auto;
  margin-left: 8px;
  object-fit: contain;
  filter: drop-shadow(0 2px 4px rgba(0,0,0,0.3));
}

.premium-navbar .nav-item {
  text-decoration: none;
  color: rgba(255, 255, 255, 0.85);
  font-size: 16px;
  font-weight: 600;
  padding: 8px 24px;
  border-radius: 100px;
  transition: all 0.3s ease;
  white-space: nowrap;
}

.premium-navbar .nav-item:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.12);
}

.premium-navbar .nav-item.active {
  color: #0b110d;
  background: var(--beige);
  font-weight: 800;
  box-shadow: 0 4px 15px rgba(216, 183, 106, 0.4);
}

@media (max-width: 600px) {
  .premium-navbar {
    top: 20px;
    padding: 6px 8px;
    gap: 4px;
    width: 94vw;
    justify-content: space-between;
  }
  .premium-navbar .nav-item {
    font-size: 13px;
    padding: 8px 10px;
    flex: 1;
    text-align: center;
  }
}

/* --- Hero Section --- */
.hero-section {
  position: relative;
  width: 100vw;
  height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.video-container {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
}

#hero-video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  pointer-events: none;
}

.video-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, rgba(11, 17, 13, 0.8) 0%, rgba(11, 17, 13, 0.4) 100%);
  z-index: 2;
}

.hero-content {
  position: relative;
  z-index: 3;
  text-align: center;
  padding: 0 20px;
  max-width: 850px;
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 1s ease-out, transform 1s ease-out;
}

.hero-content.visible {
  opacity: 1;
  transform: translateY(0);
}

.hero-content h1 {
  font-size: clamp(40px, 6vw, 76px);
  font-weight: 800;
  margin-bottom: 20px;
  color: var(--text-light);
  text-shadow: 0 4px 20px rgba(0,0,0,0.6);
  line-height: 1.2;
}

.hero-content p {
  font-size: clamp(18px, 2.5vw, 24px);
  font-weight: 600;
  color: var(--beige);
  margin-bottom: 40px;
  text-shadow: 0 2px 10px rgba(0,0,0,0.5);
  line-height: 1.6;
}

.hero-buttons {
  display: flex;
  gap: 20px;
  justify-content: center;
  flex-wrap: wrap;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 16px 36px;
  border-radius: 50px;
  font-size: 18px;
  font-weight: 800;
  text-decoration: none;
  transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
  cursor: pointer;
  border: 2px solid transparent;
}

.btn-primary {
  background-color: var(--primary-green);
  color: #fff;
  box-shadow: 0 8px 25px rgba(45, 106, 79, 0.5);
}

.btn-primary:hover {
  background-color: var(--light-green);
  transform: translateY(-4px);
  box-shadow: 0 12px 30px rgba(45, 106, 79, 0.7);
}

.btn-secondary {
  background-color: rgba(20, 28, 22, 0.6);
  backdrop-filter: blur(10px);
  color: var(--beige);
  border-color: var(--beige);
}

.btn-secondary:hover {
  background-color: var(--beige);
  color: var(--dark-bg);
  transform: translateY(-4px);
  box-shadow: 0 12px 30px rgba(216, 183, 106, 0.4);
}

/* --- Features Sections --- */
.features-wrapper {
  padding: 100px 0 0;
  background:
    radial-gradient(circle at 25% 18%, rgba(216, 183, 106, 0.06), transparent 28%),
    radial-gradient(circle at 82% 54%, rgba(45, 106, 79, 0.08), transparent 34%),
    var(--dark-bg);
  position: relative;
  z-index: 4; /* Above video */
  overflow: hidden;
}

.features-dot-grid {
  position: absolute;
  inset: 0;
  z-index: 1;
  width: 100%;
  height: 100%;
  opacity: 0.78;
  pointer-events: none;
}

.features-wrapper::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 2;
  background:
    linear-gradient(180deg, rgba(6, 18, 12, 0.30), transparent 18%, transparent 80%, rgba(6, 18, 12, 0.34)),
    radial-gradient(ellipse at center, transparent 0%, transparent 54%, rgba(6, 18, 12, 0.36) 100%);
  pointer-events: none;
}

.features-wrapper::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  background-image:
    radial-gradient(circle, rgba(216, 183, 106, 0.28) 0 1px, transparent 1.45px),
    radial-gradient(circle, rgba(45, 106, 79, 0.20) 0 1px, transparent 1.35px);
  background-position: 0 0, 17px 21px;
  background-size: 32px 32px, 52px 52px;
  opacity: 0.45;
  pointer-events: none;
}

.feature-section,
.features-wrapper .container,
.developers-showcase .container {
  position: relative;
  z-index: 3;
}

.container {
  max-width: 1400px; /* Made slightly larger for bigger images */
  margin: 0 auto;
  padding: 0 40px;
}

.feature-section {
  padding: 80px 0;
  border-bottom: 1px solid rgba(255,255,255,0.05);
}

.feature-section:last-child,
.feature-section:nth-of-type(3) {
  border-bottom: none;
}

.feature-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 60px;
}

/* Normal flow RTL: feature-image on right, text on left */
/* '.reverse' class RTL: feature-image on left, text on right */
.feature-content.reverse {
  flex-direction: row-reverse;
}

/* Increased flex ratio for larger image */
.feature-image {
  flex: 1.4;
  text-align: center;
  position: relative;
  display: grid;
  place-items: center;
  min-height: 320px;
  overflow: visible;
  border-radius: 28px;
}

.feature-image::before {
  content: "";
  position: absolute;
  inset: 5% 8%;
  z-index: 0;
  border-radius: 34px;
  background:
    radial-gradient(circle at 50% 50%, rgba(216, 183, 106, 0.11), transparent 44%),
    radial-gradient(circle at 20% 80%, rgba(45, 106, 79, 0.14), transparent 38%);
  filter: blur(18px);
  opacity: 0.9;
  pointer-events: none;
}

.feature-image img {
  position: relative;
  z-index: 2;
  width: 100%;
  height: auto;
  border-radius: 24px;
  box-shadow: 0 30px 60px rgba(0, 0, 0, 0.6), 0 0 40px rgba(45, 106, 79, 0.2);
  transition: transform 0.6s cubic-bezier(0.25, 0.8, 0.25, 1);
}

.feature-image img:hover {
  transform: scale(1.03) translateY(-10px);
}

.feature-text {
  flex: 1;
}

/* --- NEW CARD STYLES --- */
.feature-card {
  background: rgba(20, 28, 22, 0.85); /* Dark slightly greenish card */
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(216, 183, 106, 0.25); /* Subtle beige border */
  border-radius: 24px;
  padding: 45px 40px;
  box-shadow: 0 20px 50px rgba(0,0,0,0.5);
  position: relative;
  overflow: hidden;
}

/* Optional decorative glow inside card */
.feature-card::before {
  content: "";
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle at 50% 0%, rgba(45, 106, 79, 0.1), transparent 70%);
  pointer-events: none;
}

.feature-card h2 {
  font-size: clamp(28px, 3.5vw, 42px);
  color: var(--beige);
  margin-bottom: 24px;
  font-weight: 800;
  line-height: 1.3;
  position: relative;
}

/* Bullet Points */
.feature-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 18px;
  position: relative;
}

.feature-list li {
  position: relative;
  padding-right: 32px;
  color: #ffffff;
  font-size: clamp(16px, 1.8vw, 19px);
  font-weight: 600;
  line-height: 1.6;
}

.feature-list li::before {
  content: "✔";
  position: absolute;
  right: 0;
  top: 0;
  color: var(--beige);
  font-size: 18px;
  font-weight: 800;
}

/* --- Strong Scroll Reveal Animations --- */
.reveal-image {
  opacity: 0;
  transform: translateY(100px) scale(0.9);
  transition: opacity 1.2s cubic-bezier(0.16, 1, 0.3, 1), transform 1.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.reveal-image.active {
  opacity: 1;
  transform: translateY(0) scale(1);
}

/* Card slides in from the side based on layout direction */
.feature-content .reveal-card {
  opacity: 0;
  transform: translateX(-100px); /* Comes from the left in normal RTL (text on left) */
  transition: opacity 1.2s cubic-bezier(0.16, 1, 0.3, 1) 0.2s, transform 1.2s cubic-bezier(0.16, 1, 0.3, 1) 0.2s;
}

.feature-content.reverse .reveal-card {
  transform: translateX(100px); /* Comes from the right in reverse RTL (text on right) */
}

.feature-content .reveal-card.active,
.feature-content.reverse .reveal-card.active {
  opacity: 1;
  transform: translateX(0);
}


/* --- Tilvix Premium Banner --- */
.developers-showcase {
  padding: 80px 0 100px;
  background: transparent;
  position: relative;
  z-index: 3;
  overflow: visible;
}

.tilvix-premium-card {
  max-width: 900px;
  margin: 0 auto;
  background: linear-gradient(135deg, rgba(20, 28, 22, 0.9), rgba(45, 106, 79, 0.4));
  border: 1px solid rgba(216, 183, 106, 0.4);
  border-radius: 30px;
  padding: 60px 50px;
  display: flex;
  align-items: center;
  gap: 50px;
  box-shadow: 0 20px 50px rgba(0,0,0,0.6);
  transition: transform 0.4s ease, box-shadow 0.4s ease, border-color 0.4s ease;
}

.tilvix-premium-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 30px 60px rgba(0,0,0,0.8);
  border-color: var(--beige);
}

.tilvix-logo-wrapper {
  flex-shrink: 0;
}

.tilvix-logo-huge {
  height: 120px;
  width: auto;
  filter: drop-shadow(0 4px 15px rgba(0,0,0,0.5));
  transition: transform 0.4s ease;
}

.tilvix-premium-card:hover .tilvix-logo-huge {
  transform: scale(1.05) rotate(3deg);
}

.tilvix-info {
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.tilvix-title {
  font-size: clamp(36px, 5vw, 48px);
  color: #fff;
  font-weight: 800;
  margin-bottom: 15px;
  letter-spacing: 1px;
}

.tilvix-subtitle {
  color: var(--beige);
  font-size: clamp(20px, 3vw, 24px);
  font-weight: 600;
  margin-bottom: 30px;
  line-height: 1.5;
}

.btn-tilvix-large {
  display: inline-block;
  align-self: flex-start;
  padding: 14px 40px;
  border-radius: 50px;
  background: var(--beige);
  color: var(--dark-bg);
  text-decoration: none;
  font-weight: 800;
  font-size: 18px;
  transition: all 0.3s ease;
  box-shadow: 0 5px 15px rgba(216, 183, 106, 0.3);
}

.btn-tilvix-large:hover {
  background: #fff;
  transform: translateY(-3px);
  box-shadow: 0 8px 25px rgba(216, 183, 106, 0.5);
}

@media (max-width: 768px) {
  .tilvix-premium-card {
    flex-direction: column;
    text-align: center;
    padding: 40px 30px;
    gap: 30px;
  }
  
  .btn-tilvix-large {
    align-self: center;
  }
}

/* --- Responsive Features --- */
@media (max-width: 992px) {
  .feature-content, .feature-content.reverse {
    flex-direction: column;
    align-items: center;
    gap: 40px;
  }
  
  .feature-image {
    width: 100%;
    min-height: 250px;
  }

  .feature-image img {
    width: 90%;
    max-width: 600px;
  }

  .features-dot-grid {
    opacity: 0.72;
  }

  .feature-section {
    padding: 60px 0;
  }
  
  /* Unified mobile animation: slide up instead of from side */
  .feature-content .reveal-card,
  .feature-content.reverse .reveal-card {
    transform: translateY(50px);
  }
  
  .feature-card {
    text-align: right;
    padding: 35px 25px;
    width: 100%;
    max-width: 700px;
    margin: 0 auto;
  }
}

@media (max-width: 600px) {
  .hero-content h1 {
    font-size: 32px !important;
    margin-bottom: 12px;
  }

  .hero-content p {
    font-size: 16px !important;
    margin-bottom: 25px;
  }

  .hero-buttons {
    flex-direction: column;
    gap: 12px;
    width: 100%;
  }
  
  .btn {
    width: 100%;
    padding: 14px 20px;
    font-size: 16px;
  }
  
  .feature-image img {
    width: 100%;
    border-radius: 16px;
    display: block;
    margin: 0 auto;
  }

  .feature-image {
    min-height: 210px;
  }

  .features-dot-grid {
    opacity: 0.58;
  }

  .feature-card {
    padding: 25px 20px;
    border-radius: 16px;
  }

  .feature-card h2 {
    font-size: 26px !important;
    margin-bottom: 18px;
    text-align: center;
  }

  .feature-list li {
    font-size: 15px !important;
    padding-right: 28px;
    line-height: 1.7;
  }
  
  .feature-list li::before {
    font-size: 16px;
  }
}

/* =========================================
   PREMIUM SITE FOOTER
   ========================================= */
.site-footer {
  position: relative;
  background-image: url('../assets/images/footer_bg.png');
  background-size: cover;
  background-position: center bottom;
  background-repeat: no-repeat;
  color: #fff8e8;
  padding: 28px 5% 14px;
  margin-top: 0;
  border-radius: 40px 40px 0 0;
  box-shadow: 0 -10px 30px rgba(0, 0, 0, 0.4);
  overflow: hidden;
  z-index: 10;
}

.footer-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(12, 16, 11, 0.7) 0%, rgba(12, 16, 11, 0.95) 100%);
  z-index: 1;
}

.footer-content {
  position: relative;
  z-index: 2;
  max-width: 1000px;
  margin: 0 auto;
}

.footer-grid {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 32px;
  margin-bottom: 24px;
  text-align: center;
}

@media (min-width: 769px) {
  .footer-grid {
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
    text-align: right;
    max-width: 1200px;
    margin: 0 auto 30px;
  }
  
  .footer-logo {
    flex: 1;
    align-items: flex-start;
  }
  
  .footer-contact {
    flex: 1;
    align-items: center;
  }
  
  .footer-social {
    flex: 1;
    align-items: flex-end;
  }
}

.footer-logo {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}

.footer-logo-img {
  max-width: 350px;
  width: 100%;
  object-fit: contain;
  height: auto;
  filter: drop-shadow(0 4px 15px rgba(0,0,0,0.5));
}

.footer-logo h2 {
  color: var(--beige);
  font-size: 16px;
  font-weight: 600;
  margin: 0;
}

.footer-contact {
  display: flex;
  flex-direction: column;
  gap: 12px;
  align-items: center;
  justify-content: center;
}

.footer-contact p {
  margin: 0;
}

.footer-contact a {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: rgba(255, 248, 232, 0.85);
  text-decoration: none;
  font-size: 18px; /* Enlarged font size for numbers */
  font-weight: 500;
  transition: color 0.3s ease;
  direction: ltr;
}

.footer-contact a:hover {
  color: var(--beige);
}

.footer-contact a i {
  color: var(--beige);
  font-size: 24px; /* Enlarged icon */
  width: 28px;
  text-align: center;
}

.footer-social {
  display: flex;
  flex-direction: column; /* Changed to vertical */
  gap: 12px;
  justify-content: center;
  margin-top: 0;
}

.footer-social a {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 12px;
  width: 220px;
  padding: 10px 20px;
  border-radius: 12px;
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(216, 183, 106, 0.2);
  color: var(--beige);
  text-decoration: none;
  transition: all 0.3s ease;
}

.footer-social a i {
  font-size: 24px; /* Enlarged social icons */
  width: 30px;
  text-align: center;
}

.footer-social a span {
  display: inline-block;
  color: rgba(255, 248, 232, 0.9);
  font-size: 16px;
  font-weight: 500;
}

.footer-social a:hover {
  background: var(--beige);
  color: #12160e;
  transform: translateY(-3px);
}

.footer-bottom {
  border-top: 1px solid rgba(216, 183, 106, 0.15);
  padding-top: 10px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}

.copyright {
  text-align: center;
}

.footer-mini-logo {
  font-size: 18px;
  margin-bottom: 2px;
  opacity: 0.8;
}

.copyright .rights {
  color: rgba(255, 248, 232, 0.7);
  font-size: 13px;
  margin: 0;
  opacity: 0.7;
}

@media (min-width: 768px) {
  .footer-grid {
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
    text-align: right;
  }
  
  .footer-logo {
    align-items: flex-start;
  }
  
  .footer-contact {
    align-items: flex-start;
  }
  
  .footer-contact a {
    direction: rtl; /* Switch back to RTL for desktop layout if needed, though LTR is safer for mixed content */
  }
}

@media (max-width: 768px) {
  .site-footer {
    border-radius: 28px 28px 0 0;
    padding: 22px 5% 12px;
  }
  
  .footer-logo-img {
    max-width: 70px;
  }
  
  .footer-social a {
    width: 200px;
    padding: 8px 16px;
    font-size: 16px;
  }
  .footer-social a i {
    font-size: 20px;
  }
}
