/* SoftecNova - Section-Specific Styles */

/* ===== HEADER ===== */
.header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: var(--z-fixed);
  background: var(--glass-bg);
  backdrop-filter: var(--backdrop-blur);
  border-bottom: 1px solid var(--glass-border);
  transition: all var(--transition-normal);
}

.header.scrolled {
  background: rgba(255, 255, 255, 0.95);
  box-shadow: var(--shadow-md);
}

[data-theme="dark"] .header.scrolled {
  background: rgba(17, 24, 39, 0.95);
}

.header-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--spacing-4) 0;
}

.header-logo {
  height: 36px;
  width: auto;
  transition: opacity var(--transition-fast);
}

.header-logo:hover {
  opacity: 0.8;
}

.header-nav {
  display: none;
  gap: var(--spacing-1);
}

@media (min-width: 1024px) {
  .header-nav {
    display: flex;
  }
}

.header-actions {
  display: none;
  align-items: center;
  gap: var(--spacing-4);
}

@media (min-width: 1024px) {
  .header-actions {
    display: flex;
  }
}

.mobile-menu-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  background: transparent;
  border: none;
  cursor: pointer;
  color: var(--color-gray-700);
  position: relative;
  z-index: 60; /* Higher than header and menu */
}

@media (min-width: 1024px) {
  .mobile-menu-btn {
    display: none;
  }
}

.mobile-menu {
  position: fixed;
  top: 72px;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(255, 255, 255, 0.98);
  backdrop-filter: var(--backdrop-blur);
  padding: var(--spacing-6);
  transform: translateX(100%);
  transition: transform var(--transition-normal);
  overflow-y: auto;
  z-index: var(--z-modal); /* Ensure menu is on top of other content */
}

[dir="rtl"] .mobile-menu {
  transform: translateX(-100%);
}

.mobile-menu.open {
  transform: translateX(0);
}

[data-theme="dark"] .mobile-menu {
  background: rgba(17, 24, 39, 0.98);
}

.mobile-nav {
  display: flex;
  flex-direction: column;
  gap: var(--spacing-2);
}

.mobile-nav-link {
  display: block;
  padding: var(--spacing-3) var(--spacing-4);
  font-size: var(--text-lg);
  font-weight: 500;
  color: var(--color-gray-700);
  border-radius: var(--radius-lg);
  transition: all var(--transition-fast);
}

.mobile-nav-link:hover,
.mobile-nav-link.active {
  background: var(--color-gray-100);
  color: var(--color-primary);
}

[data-theme="dark"] .mobile-nav-link:hover,
[data-theme="dark"] .mobile-nav-link.active {
  background: var(--color-gray-800);
}

/* ===== HERO SECTION ===== */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  padding-top: 80px;
}

.hero-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.hero-bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(30, 58, 138, 0.5) 0%, rgba(109, 40, 217, 0.5) 100%);
}

.hero-overlay-dark {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.2);
}

.hero-content {
  position: relative;
  z-index: 10;
  text-align: center;
  max-width: 900px;
  margin: 0 auto;
  padding: var(--spacing-8);
}

.hero-card {
  background: var(--glass-bg);
  backdrop-filter: var(--backdrop-blur);
  border-radius: var(--radius-3xl);
  border: 1px solid var(--glass-border);
  padding: var(--spacing-12);
  box-shadow: var(--shadow-2xl);
  transition: all var(--transition-slower);
}

.hero-card:hover {
  background: rgba(255, 255, 255, 0.15);
  transform: scale(1.02);
}

.hero-title {
  font-size: var(--text-4xl);
  font-weight: 700;
  color: var(--color-white);
  margin-bottom: var(--spacing-6);
  line-height: 1.2;
}

@media (min-width: 768px) {
  .hero-title {
    font-size: var(--text-6xl);
  }
}

.hero-subtitle {
  font-size: var(--text-lg);
  color: rgba(255, 255, 255, 0.9);
  margin-bottom: var(--spacing-8);
  line-height: 1.7;
}

@media (min-width: 768px) {
  .hero-subtitle {
    font-size: var(--text-xl);
  }
}

.hero-cta {
  display: flex;
  flex-direction: column;
  gap: var(--spacing-4);
  justify-content: center;
  align-items: center;
}

@media (min-width: 640px) {
  .hero-cta {
    flex-direction: row;
  }
}

/* Floating elements in hero */
.hero .floating-element {
  transition: background var(--transition-normal);
}

.hero .floating-element:hover {
  background: rgba(96, 165, 250, 0.3);
}

/* ===== ABOUT SECTION ===== */
.about {
  position: relative;
  padding: var(--spacing-20) 0;
  background: var(--gradient-section);
  overflow: hidden;
}

.about-grid {
  display: grid;
  gap: var(--spacing-12);
  align-items: center;
}

@media (min-width: 768px) {
  .about-grid {
    grid-template-columns: 1fr 1fr;
  }
}

.about-content {
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: var(--backdrop-blur);
  border-radius: var(--radius-2xl);
  padding: var(--spacing-8);
  border: 1px solid var(--glass-border-light);
  box-shadow: var(--shadow-xl);
}

.about-title {
  font-size: var(--text-3xl);
  color: #111827;
  margin-bottom: var(--spacing-6);
  font-weight: 800;
}

@media (min-width: 768px) {
  .about-title {
    font-size: var(--text-4xl);
  }
}

.about-description {
  font-size: var(--text-lg);
  color: #1f2937;
  margin-bottom: var(--spacing-6);
  line-height: 1.7;
  font-weight: 600;
}

.about-features {
  display: flex;
  flex-direction: column;
  gap: var(--spacing-3);
  margin-bottom: var(--spacing-8);
}

.about-feature {
  display: flex;
  align-items: center;
  gap: var(--spacing-3);
}

.about-feature-dot {
  width: 8px;
  height: 8px;
  background: var(--gradient-primary);
  border-radius: var(--radius-full);
  flex-shrink: 0;
}

.about-feature-text {
  font-weight: 700;
  color: #111827;
}

.about-image-wrapper {
  position: relative;
}

.about-image-card {
  background: var(--glass-bg-light);
  backdrop-filter: var(--backdrop-blur);
  border-radius: var(--radius-3xl);
  padding: var(--spacing-8);
  border: 1px solid var(--glass-border-light);
  box-shadow: var(--shadow-2xl);
}

.about-image {
  width: 100%;
  border-radius: var(--radius-2xl);
  box-shadow: var(--shadow-lg);
}

/* ===== SERVICES SECTION ===== */
.services {
  position: relative;
  padding: var(--spacing-20) 0;
  background: var(--gradient-section);
  overflow: hidden;
}

.services-header {
  text-align: center;
  margin-bottom: var(--spacing-16);
}

.services-header-card {
  display: inline-block;
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: var(--backdrop-blur);
  border-radius: var(--radius-2xl);
  padding: var(--spacing-8);
  border: 1px solid var(--glass-border-light);
  box-shadow: var(--shadow-xl);
  max-width: 800px;
  transition: all var(--transition-slow);
}

.services-header-card:hover {
  background: rgba(255, 255, 255, 0.92);
  box-shadow: var(--shadow-2xl);
}

.services-title {
  font-size: var(--text-3xl);
  color: #111827;
  margin-bottom: var(--spacing-4);
  font-weight: 800;
}

@media (min-width: 768px) {
  .services-title {
    font-size: var(--text-4xl);
  }
}

.services-subtitle {
  font-size: var(--text-xl);
  color: #1f2937;
  font-weight: 600;
}

.services-grid {
  display: grid;
  gap: var(--spacing-8);
}

@media (min-width: 768px) {
  .services-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 1024px) {
  .services-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

.service-card {
  height: 100%;
  display: flex;
  flex-direction: column;
}

.service-card .card-content {
  flex: 1;
  display: flex;
  flex-direction: column;
}

.service-card .card-description {
  flex: 1;
}

.service-image-wrapper {
  position: relative;
  overflow: hidden;
}

/* ===== STATISTICS SECTION ===== */
.statistics {
  padding: var(--spacing-16) 0;
  background: var(--gradient-primary);
}

.statistics-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--spacing-8);
}

@media (min-width: 768px) {
  .statistics-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

.stat-item {
  text-align: center;
}

.stat-value {
  font-size: var(--text-4xl);
  font-weight: 800;
  color: var(--color-white);
  background: none;
  -webkit-text-fill-color: var(--color-white);
}

@media (min-width: 768px) {
  .stat-value {
    font-size: var(--text-5xl);
  }
}

.stat-label {
  color: rgba(255, 255, 255, 0.9);
  font-size: var(--text-base);
}

/* ===== FAQ SECTION ===== */
.faq {
  position: relative;
  padding: var(--spacing-20) 0;
  background: var(--gradient-section);
  overflow: hidden;
}

.faq-header {
  text-align: center;
  margin-bottom: var(--spacing-16);
}

.faq-header-card {
  display: inline-block;
  background: rgba(255, 255, 255, 0.88);
  backdrop-filter: var(--backdrop-blur);
  border-radius: var(--radius-2xl);
  padding: var(--spacing-8);
  border: 1px solid var(--glass-border-light);
  box-shadow: var(--shadow-xl);
  max-width: 800px;
  transition: all var(--transition-slow);
}

.faq-header-card:hover {
  background: rgba(255, 255, 255, 0.5);
  box-shadow: var(--shadow-2xl);
}

.faq-title {
  font-size: var(--text-3xl);
  color: #111827;
  margin-bottom: var(--spacing-4);
  font-weight: 800;
}

@media (min-width: 768px) {
  .faq-title {
    font-size: var(--text-4xl);
  }
}

.faq-subtitle {
  font-size: var(--text-xl);
  color: #1f2937;
  font-weight: 600;
}

.faq-content {
  max-width: 900px;
  margin: 0 auto;
}

.faq-cta {
  margin-top: var(--spacing-12);
  text-align: center;
}

.faq-cta-card {
  background: var(--gradient-primary);
  border-radius: var(--radius-2xl);
  padding: var(--spacing-8);
  color: var(--color-white);
  box-shadow: var(--shadow-xl);
  max-width: 600px;
  margin: 0 auto;
}

.faq-cta-title {
  font-size: var(--text-2xl);
  font-weight: 700;
  margin-bottom: var(--spacing-4);
  color: var(--color-white);
}

.faq-cta-text {
  color: rgba(255, 255, 255, 0.9);
  margin-bottom: var(--spacing-6);
}

/* ===== CONTACT / CTA SECTION ===== */
.contact {
  position: relative;
  padding: var(--spacing-20) 0;
  background: var(--gradient-primary);
  overflow: hidden;
}

.contact-grid {
  display: grid;
  gap: var(--spacing-12);
  align-items: center;
}

@media (min-width: 768px) {
  .contact-grid {
    grid-template-columns: 1fr 1fr;
  }
}

.contact-content {
  background: var(--glass-bg);
  backdrop-filter: var(--backdrop-blur);
  border-radius: var(--radius-2xl);
  padding: var(--spacing-8);
  border: 1px solid var(--glass-border);
  box-shadow: var(--shadow-xl);
}

.contact-title {
  font-size: var(--text-3xl);
  color: var(--color-white);
  margin-bottom: var(--spacing-6);
}

@media (min-width: 768px) {
  .contact-title {
    font-size: var(--text-4xl);
  }
}

.contact-description {
  font-size: var(--text-xl);
  color: rgba(255, 255, 255, 0.9);
  margin-bottom: var(--spacing-8);
  line-height: 1.7;
}

.contact-features {
  margin-top: var(--spacing-8);
  padding-top: var(--spacing-6);
  border-top: 1px solid rgba(255, 255, 255, 0.2);
}

.contact-feature {
  display: flex;
  align-items: center;
  gap: var(--spacing-3);
  color: rgba(255, 255, 255, 0.9);
  margin-bottom: var(--spacing-3);
}

.contact-feature-dot {
  width: 8px;
  height: 8px;
  background: var(--color-white);
  border-radius: var(--radius-full);
  flex-shrink: 0;
}

.contact-image-wrapper {
  position: relative;
}

.contact-image-card {
  background: var(--glass-bg);
  backdrop-filter: var(--backdrop-blur);
  border-radius: var(--radius-3xl);
  padding: var(--spacing-8);
  border: 1px solid var(--glass-border);
  box-shadow: var(--shadow-2xl);
}

.contact-image {
  width: 100%;
  border-radius: var(--radius-2xl);
  box-shadow: var(--shadow-lg);
}

/* Floating stats on contact image */
.contact-floating-stat {
  position: absolute;
  background: var(--glass-bg-light);
  backdrop-filter: var(--backdrop-blur-light);
  border-radius: var(--radius-2xl);
  padding: var(--spacing-4);
  box-shadow: var(--shadow-lg);
  border: 1px solid var(--glass-border-light);
  text-align: center;
}

.contact-floating-stat-value {
  font-size: var(--text-2xl);
  font-weight: 700;
  color: var(--color-white);
}

.contact-floating-stat-label {
  font-size: var(--text-sm);
  color: rgba(255, 255, 255, 0.8);
}

/* ===== FOOTER ===== */
.footer {
  background: var(--color-gray-900);
  color: var(--color-white);
  position: relative;
  overflow: hidden;
}

.footer-content {
  padding: var(--spacing-16) 0;
}

.footer-grid {
  display: grid;
  gap: var(--spacing-8);
}

@media (min-width: 768px) {
  .footer-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 1024px) {
  .footer-grid {
    grid-template-columns: 2fr 1fr 1fr 1fr;
  }
}

.footer-brand {
  max-width: 300px;
}

.footer-logo {
  height: 32px;
  margin-bottom: var(--spacing-4);
}

.footer-description {
  color: var(--color-gray-400);
  line-height: 1.7;
  margin-bottom: var(--spacing-6);
}

.footer-contact-item {
  display: flex;
  align-items: center;
  gap: var(--spacing-2);
  color: var(--color-gray-400);
  font-size: var(--text-sm);
  margin-bottom: var(--spacing-2);
  transition: color var(--transition-fast);
}

.footer-contact-item:hover {
  color: var(--color-white);
}

.footer-contact-item svg {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}

.footer-social {
  display: flex;
  gap: var(--spacing-3);
  margin-top: var(--spacing-6);
}

.footer-title {
  font-size: var(--text-lg);
  font-weight: 600;
  margin-bottom: var(--spacing-4);
  color: var(--color-white);
}

.footer-links {
  display: flex;
  flex-direction: column;
  gap: var(--spacing-2);
}

.footer-link {
  color: var(--color-gray-400);
  font-size: var(--text-base);
  transition: color var(--transition-fast);
  cursor: pointer;
  background: none;
  border: none;
  text-align: left;
  padding: 0;
}

[dir="rtl"] .footer-link {
  text-align: right;
}

.footer-link:hover {
  color: var(--color-white);
}

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding: var(--spacing-8) 0;
}

.footer-bottom-content {
  display: flex;
  flex-direction: column;
  gap: var(--spacing-4);
  align-items: center;
  text-align: center;
}

@media (min-width: 768px) {
  .footer-bottom-content {
    flex-direction: row;
    justify-content: space-between;
    text-align: left;
  }
  
  [dir="rtl"] .footer-bottom-content {
    text-align: right;
  }
}

.footer-copyright {
  color: var(--color-gray-400);
  font-size: var(--text-sm);
}

.footer-legal-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: var(--spacing-4);
}

@media (min-width: 768px) {
  .footer-legal-links {
    justify-content: flex-end;
  }
  
  [dir="rtl"] .footer-legal-links {
    justify-content: flex-start;
  }
}

.footer-legal-link {
  color: var(--color-gray-400);
  font-size: var(--text-sm);
  transition: color var(--transition-fast);
}

.footer-legal-link:hover {
  color: var(--color-white);
}

/* ===== SCROLL TO TOP BUTTON ===== */
.scroll-to-top {
  position: fixed;
  bottom: var(--spacing-8);
  right: var(--spacing-8);
  width: 48px;
  height: 48px;
  background: var(--gradient-primary);
  color: var(--color-white);
  border: none;
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: var(--shadow-lg);
  opacity: 0;
  visibility: hidden;
  transform: translateY(20px);
  transition: all var(--transition-normal);
  z-index: var(--z-sticky);
}

[dir="rtl"] .scroll-to-top {
  right: auto;
  left: var(--spacing-8);
}

.scroll-to-top.visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.scroll-to-top:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-xl);
}

.scroll-to-top svg {
  width: 24px;
  height: 24px;
}

/* ===== LANGUAGE TOGGLE ===== */
.lang-toggle {
  padding: var(--spacing-2) var(--spacing-4);
  background: var(--glass-bg);
  backdrop-filter: var(--backdrop-blur-light);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-full);
  color: var(--color-gray-700);
  font-size: var(--text-sm);
  font-weight: 500;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.lang-toggle:hover {
  background: var(--glass-bg-light);
}

[data-theme="dark"] .lang-toggle {
  color: var(--color-gray-300);
}

/* ===== THEME TOGGLE ===== */
.theme-toggle {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--glass-bg);
  backdrop-filter: var(--backdrop-blur-light);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-full);
  color: var(--color-gray-700);
  cursor: pointer;
  transition: all var(--transition-fast);
}

.theme-toggle:hover {
  background: var(--glass-bg-light);
}

[data-theme="dark"] .theme-toggle {
  color: var(--color-gray-300);
}

.theme-toggle svg {
  width: 20px;
  height: 20px;
}

.theme-toggle .icon-sun {
  display: none;
}

.theme-toggle .icon-moon {
  display: block;
}

[data-theme="dark"] .theme-toggle .icon-sun {
  display: block;
}

[data-theme="dark"] .theme-toggle .icon-moon {
  display: none;
}

/* ===== RTL / ARABIC DARKER TEXT STYLES ===== */
[dir="rtl"] .hero-title,
[dir="rtl"] .hero-subtitle {
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

[dir="rtl"] .about-title,
[dir="rtl"] .about-description,
[dir="rtl"] .about-feature-text {
  color: var(--color-gray-900);
  font-weight: 600;
}

[dir="rtl"] .about-content {
  background: rgba(255, 255, 255, 0.85);
}

[dir="rtl"] .services-title,
[dir="rtl"] .services-subtitle,
[dir="rtl"] .card-title,
[dir="rtl"] .card-description {
  color: var(--color-gray-900);
}

[dir="rtl"] .services-header-card {
  background: rgba(255, 255, 255, 0.8);
}

[dir="rtl"] .card {
  background: rgba(255, 255, 255, 0.7);
}

[dir="rtl"] .card:hover {
  background: rgba(255, 255, 255, 0.85);
}

[dir="rtl"] .faq-title,
[dir="rtl"] .faq-subtitle {
  color: var(--color-gray-900);
}

[dir="rtl"] .faq-header-card {
  background: rgba(255, 255, 255, 0.85);
}

[dir="rtl"] .accordion {
  background: rgba(255, 255, 255, 0.85);
}

[dir="rtl"] .accordion-trigger span,
[dir="rtl"] .accordion-body {
  color: var(--color-gray-800);
  font-weight: 500;
}

[dir="rtl"] .accordion-body {
  font-weight: 400;
  color: var(--color-gray-700);
}

[dir="rtl"] .stat-value {
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

[dir="rtl"] .stat-label {
  font-weight: 600;
}

[dir="rtl"] .contact-title,
[dir="rtl"] .contact-description {
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

[dir="rtl"] .contact-feature span {
  font-weight: 500;
}

[dir="rtl"] .footer-description,
[dir="rtl"] .footer-link,
[dir="rtl"] .footer-contact-item {
  color: var(--color-gray-300);
}

[dir="rtl"] .footer-title {
  font-weight: 700;
}

/* Dark theme RTL adjustments */
[data-theme="dark"][dir="rtl"] .about-content,
[data-theme="dark"][dir="rtl"] .services-header-card,
[data-theme="dark"][dir="rtl"] .faq-header-card,
[data-theme="dark"][dir="rtl"] .accordion {
  background: rgba(0, 0, 0, 0.6);
}

[data-theme="dark"][dir="rtl"] .card {
  background: rgba(0, 0, 0, 0.5);
}

[data-theme="dark"][dir="rtl"] .about-title,
[data-theme="dark"][dir="rtl"] .about-description,
[data-theme="dark"][dir="rtl"] .about-feature-text,
[data-theme="dark"][dir="rtl"] .services-title,
[data-theme="dark"][dir="rtl"] .services-subtitle,
[data-theme="dark"][dir="rtl"] .card-title,
[data-theme="dark"][dir="rtl"] .card-description,
[data-theme="dark"][dir="rtl"] .faq-title,
[data-theme="dark"][dir="rtl"] .faq-subtitle,
[data-theme="dark"][dir="rtl"] .accordion-trigger span,
[data-theme="dark"][dir="rtl"] .accordion-body {
  color: var(--color-gray-100);
}
