/* 
  Itqan Business Services - Modern 3D Redesign
  Style: Modern Corporate, Minimal 3D, Glassmorphism
*/

@import url('https://fonts.googleapis.com/css2?family=Tajawal:wght@300;400;500;700;800&display=swap');

:root {
  /* Colors */
  --primary: #3F6F57;
  --primary-dark: #2A4F3C;
  --primary-light: #6E886E;
  --gold: #D7B15A;
  --gold-light: #E5C575;
  --gold-dark: #B59340;
  --gray-light: #CFCFCF;
  --gray-bg: #F4F6F8;
  --white: #FFFFFF;
  --dark: #1A1A1A;

  /* Gradients */
  --grad-main: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
  --grad-gold: linear-gradient(135deg, var(--gold) 0%, var(--gold-dark) 100%);
  --grad-dark-overlay: linear-gradient(to bottom, rgba(63, 111, 87, 0.95), rgba(42, 79, 60, 0.98));

  /* Glassmorphism */
  --glass-bg: rgba(255, 255, 255, 0.7);
  --glass-border: 1px solid rgba(255, 255, 255, 0.5);
  --glass-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.07);
  --glass-blur: blur(12px);

  /* Shadows */
  --shadow-sm: 0 4px 6px rgba(0, 0, 0, 0.05);
  --shadow-md: 0 10px 30px rgba(0, 0, 0, 0.08);
  --shadow-lg: 0 20px 50px rgba(0, 0, 0, 0.12);
  --shadow-gold: 0 10px 30px rgba(215, 177, 90, 0.3);

  /* Dimensions & Spacing */
  --container-width: 1240px;
  --header-height: 90px;
  --radius-lg: 24px;
  --radius-md: 16px;
  --radius-sm: 8px;

  /* Transitions */
  --ease: cubic-bezier(0.23, 1, 0.32, 1);
  --duration: 0.6s;
}

/* Reset & Basics */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  outline: none;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  font-family: 'Tajawal', sans-serif;
  background-color: var(--gray-bg);
  color: var(--dark);
  line-height: 1.7;
  direction: rtl;
  text-align: right;
  overflow-x: hidden;
}

a {
  text-decoration: none;
  color: inherit;
  transition: all 0.3s var(--ease);
}

ul {
  list-style: none;
}

img {
  max-width: 100%;
  display: block;
}

/* Utility Classes */
.container {
  width: 90%;
  max-width: var(--container-width);
  margin: 0 auto;
}

.flex-center {
  display: flex;
  align-items: center;
  justify-content: center;
}

.flex-between {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

/* Typography */
h1,
h2,
h3,
h4,
h5,
h6 {
  font-weight: 800;
  line-height: 1.3;
  margin-bottom: 1rem;
}

.text-gradient {
  background: var(--grad-gold);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.section-title {
  text-align: center;
  margin-bottom: 4rem;
  position: relative;
  z-index: 2;
}

.section-title h2 {
  font-size: 2.8rem;
  color: var(--primary-dark);
}

.section-title p {
  color: #666;
  max-width: 600px;
  margin: 0 auto;
  font-size: 1.1rem;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 14px 36px;
  border-radius: 50px;
  font-weight: 700;
  font-size: 1rem;
  cursor: pointer;
  transition: all 0.4s var(--ease);
  position: relative;
  overflow: hidden;
  border: none;
}

.btn-gold {
  background: var(--grad-gold);
  color: var(--white);
  box-shadow: 0 10px 20px rgba(215, 177, 90, 0.2);
}

.btn-gold:hover {
  transform: translateY(-3px);
  box-shadow: 0 15px 30px rgba(215, 177, 90, 0.4);
}

.btn-outline-white {
  background: transparent;
  color: var(--white);
  border: 2px solid rgba(255, 255, 255, 0.3);
}

.btn-outline-white:hover {
  background: var(--white);
  color: var(--primary);
  border-color: var(--white);
}

/* Navbar */
header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1000;
  transition: all 0.4s ease;
  padding: 20px 0;
}

header.scrolled {
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(10px);
  padding: 10px 0;
  box-shadow: var(--shadow-sm);
}

.logo {
  font-size: 1.8rem;
  font-weight: 800;
  color: var(--white);
  display: flex;
  align-items: center;
  gap: 10px;
}

header.scrolled .logo {
  color: var(--primary);
}

.nav-menu {
  display: flex;
  gap: 2rem;
}

.nav-link {
  color: rgba(255, 255, 255, 0.9);
  font-weight: 500;
  position: relative;
  font-size: 1.05rem;
}

header.scrolled .nav-link {
  color: var(--dark);
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: -5px;
  right: 0;
  width: 0;
  height: 2px;
  background: var(--gold);
  transition: width 0.3s ease;
}

.nav-link:hover::after {
  width: 100%;
}

/* Mobile Menu Toggle */
.mobile-toggle {
  display: none;
  font-size: 1.8rem;
  color: var(--white);
  cursor: pointer;
}

header.scrolled .mobile-toggle {
  color: var(--primary);
}

/* Hero Section */
.hero {
  position: relative;
  min-height: 100vh;
  padding-top: var(--header-height);
  display: flex;
  align-items: center;
  background: var(--grad-main);
  overflow: hidden;
}

.hero-bg-shape {
  position: absolute;
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, rgba(215, 177, 90, 0.1) 0%, rgba(255, 255, 255, 0) 70%);
  border-radius: 50%;
  top: -100px;
  right: -100px;
  animation: float 10s ease-in-out infinite;
}

.hero-content {
  position: relative;
  z-index: 5;
  color: var(--white);
  max-width: 600px;
}

.hero-content h1 {
  font-size: 4rem;
  margin-bottom: 20px;
}

.hero-content p {
  font-size: 1.25rem;
  opacity: 0.9;
  margin-bottom: 40px;
}

.hero-3d-img {
  position: absolute;
  left: -5%;
  top: 50%;
  transform: translateY(-50%);
  width: 55%;
  z-index: 2;
  animation: float 6s ease-in-out infinite;
}

/* Glass Cards */
.glass-card {
  background: var(--glass-bg);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border: var(--glass-border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  padding: 40px;
  transition: all 0.4s var(--ease);
}

.glass-card:hover {
  transform: translateY(-10px);
  box-shadow: var(--shadow-lg);
  border-color: rgba(255, 255, 255, 0.8);
}

/* Service Cards 3D */
.services-section {
  padding: 100px 0;
  position: relative;
}

.service-card-3d {
  background: var(--white);
  border-radius: var(--radius-lg);
  padding: 40px 30px;
  text-align: center;
  box-shadow: var(--shadow-md);
  transition: all 0.4s var(--ease);
  position: relative;
  overflow: hidden;
  z-index: 1;
}

.service-card-3d::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 5px;
  background: var(--grad-gold);
  z-index: 2;
}

.service-card-3d:hover {
  transform: translateY(-15px);
  box-shadow: var(--shadow-lg);
}

.icon-3d {
  height: 100px;
  /* Adjust based on image */
  margin: 0 auto 25px;
  transition: transform 0.4s var(--ease);
}

.service-card-3d:hover .icon-3d {
  transform: scale(1.1) rotate(5deg);
}

/* Animations */
@keyframes float {

  0%,
  100% {
    transform: translateY(0);
  }

  50% {
    transform: translateY(-20px);
  }
}

@keyframes pulse {
  0%, 100% {
    opacity: 1;
  }
  50% {
    opacity: 0.6;
  }
}

@keyframes fadeInRight {
  from {
    opacity: 0;
    transform: translateX(50px);
  }

  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.animate-up {
  opacity: 0;
  animation: fadeInUp 0.8s forwards;
}

.animate-delay-1 {
  animation-delay: 0.2s;
}

.animate-delay-2 {
  animation-delay: 0.4s;
}

.animate-delay-3 {
  animation-delay: 0.6s;
}

/* Responsive */
@media (max-width: 992px) {
  .hero {
    flex-direction: column;
    text-align: center;
    padding-top: 140px;
  }

  .hero-content {
    margin: 0 auto;
  }

  .hero-3d-img {
    position: relative;
    width: 80%;
    left: 0;
    transform: none;
    margin-top: 40px;
  }

  .nav-menu {
    position: fixed;
    top: 0;
    right: -100%;
    width: 80%;
    height: 100vh;
    background: var(--white);
    flex-direction: column;
    padding: 100px 40px;
    box-shadow: -10px 0 30px rgba(0, 0, 0, 0.1);
    transition: 0.4s ease;
  }

  .nav-menu.active {
    right: 0;
  }

  .nav-link {
    color: var(--dark);
    font-size: 1.2rem;
  }

  .mobile-toggle {
    display: block;
    z-index: 1001;
  }

  .mobile-toggle.active {
    color: var(--dark);
  }

  .section-title h2 {
    font-size: 2rem;
  }

  .card-grid {
    grid-template-columns: 1fr !important;
  }
}

/* --- Hero 3D Grid Background --- */
.hero-bg-grid {
  position: absolute;
  width: 200%;
  height: 200%;
  top: -50%;
  left: -50%;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.03) 1px, transparent 1px);
  background-size: 50px 50px;
  transform: perspective(500px) rotateX(60deg) translateY(0) translateZ(-200px);
  animation: gridMove 20s linear infinite;
  z-index: 1;
  pointer-events: none;
}

@keyframes gridMove {
  0% {
    transform: perspective(500px) rotateX(60deg) translateY(0) translateZ(-200px);
  }

  100% {
    transform: perspective(500px) rotateX(60deg) translateY(50px) translateZ(-200px);
  }
}

/* --- Floating Animation Classes --- */
.float-animation {
  animation: float 6s ease-in-out infinite;
}

.float-animation-delayed {
  animation: float 6s ease-in-out 3s infinite;
}

.bounce-in {
  animation: bounceIn 1s ease;
}

.fade-up {
  animation: fadeInUp 1s ease forwards;
}

@keyframes bounceIn {
  0% {
    transform: scale(0.8);
    opacity: 0;
  }

  60% {
    transform: scale(1.05);
    opacity: 1;
  }

  100% {
    transform: scale(1);
  }
}

.icon-hover-move i {
  transition: transform 0.3s;
}

.icon-hover-move:hover i {
  transform: translateX(-5px);
}

/* Stat Cards Hover Effect */
.stat-card:hover {
  border-color: var(--gold) !important;
  transform: translateY(-15px) !important;
  box-shadow: 0 30px 60px rgba(215, 177, 90, 0.2) !important;
}

.stat-card:hover div:first-child {
  transform: scale(1.15) rotate(-5deg);
}

/* Service Card Enhanced Hover */
.service-card-3d:hover {
  transform: translateY(-20px) !important;
  box-shadow: 0 30px 70px rgba(0,0,0,0.15) !important;
}

.service-card-3d:hover .icon-box {
  transform: scale(1.2) rotate(5deg) !important;
}

/* Link Arrow Animation */
.link-arrow {
  position: relative;
}

.link-arrow:hover {
  color: var(--gold) !important;
}

.link-arrow:hover i {
  transform: translateX(-5px);
}

/* Reveal Animation */
.reveal {
  opacity: 0;
  animation: fadeInUp 0.8s ease forwards;
}

.animate-delay-3 {
  animation-delay: 0.8s;
}

/* Ripple Effect */
.ripple {
  position: absolute;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.6);
  transform: scale(0);
  animation: ripple-animation 0.6s ease-out;
  pointer-events: none;
}

@keyframes ripple-animation {
  to {
    transform: scale(4);
    opacity: 0;
  }
}

/* Hover Lift Effect */
.hover-lift {
  transition: all 0.4s cubic-bezier(0.23, 1, 0.32, 1);
}

.hover-lift:hover {
  transform: translateY(-15px);
}

/* Section Padding */
.section-padding {
  padding: 80px 0;
}

/* Row Flex */
.row {
  display: flex;
  flex-wrap: wrap;
}

.col-text,
.col-img {
  flex: 1;
  min-width: 300px;
}

/* Responsive Adjustments */
@media (max-width: 768px) {
  .section-padding {
    padding: 60px 0;
  }

  .row {
    flex-direction: column;
  }

  .col-text,
  .col-img {
    flex: 1 100%;
  }

  .stat-card {
    min-width: 180px !important;
    padding: 25px 30px !important;
  }

  .stat-card h3 {
    font-size: 2rem !important;
  }

  .stat-card p {
    font-size: 0.95rem !important;
  }

  /* Hero Section Mobile */
  #hero-3d {
    height: auto !important;
    min-height: 100vh;
    padding: 100px 0 60px;
  }

  #hero-3d .container {
    padding: 40px 20px;
  }

  #hero-3d h1 {
    font-size: clamp(1.8rem, 4vw, 2.8rem) !important;
    margin-bottom: 20px !important;
  }

  #hero-3d p {
    font-size: clamp(0.95rem, 2vw, 1.15rem) !important;
    margin-bottom: 30px !important;
  }

  #hero-3d .btn {
    padding: 14px 30px !important;
    font-size: 0.95rem !important;
    width: 100%;
    max-width: 280px;
  }

  #hero-3d .fade-up:nth-of-type(2) {
    flex-direction: column;
    gap: 15px !important;
  }

  /* Trust Indicators Mobile */
  #hero-3d .fade-up:nth-of-type(3) {
    gap: 20px !important;
    font-size: 0.85rem !important;
  }

  #hero-3d .fade-up:nth-of-type(3) div {
    gap: 8px !important;
  }

  #hero-3d .fade-up:nth-of-type(3) i {
    font-size: 1.2rem !important;
  }

  /* Badge Mobile */
  #hero-3d span.animate-up {
    padding: 10px 20px !important;
    font-size: 0.9rem !important;
    margin-bottom: 20px !important;
  }

  /* Floating Shapes - Hide on Mobile */
  .shape-3d {
    display: none !important;
  }

  /* Hero Grid Background */
  .hero-bg-grid {
    opacity: 0.5 !important;
  }

  /* SVG Curve */
  #hero-3d svg {
    height: 60px !important;
  }

  /* Stats Section Mobile */
  .reveal {
    margin-top: -60px !important;
  }

  .glass-card {
    padding: 25px 20px !important;
  }

  .stat-card:hover {
    transform: translateY(-10px) !important;
  }

  /* Service Cards Mobile */
  .card-grid {
    grid-template-columns: 1fr !important;
    gap: 25px !important;
  }

  .service-card-3d {
    padding: 30px 20px !important;
  }

  .service-card-3d h3 {
    font-size: 1.2rem !important;
  }

  .service-card-3d p {
    font-size: 0.95rem !important;
  }

  /* About Section Mobile */
  .col-img {
    margin-top: 30px;
  }

  .col-img img {
    height: 300px !important;
  }

  /* Partners Mobile */
  .partners-grid {
    grid-template-columns: repeat(3, 1fr) !important;
    gap: 15px !important;
    padding: 25px 0 !important;
  }

  .partner-logo-item {
    aspect-ratio: 1 / 1 !important;
    padding: 12px !important;
    border-radius: 10px !important;
    min-height: 120px !important;
  }

  .partner-logo-item img {
    max-width: 90% !important;
    max-height: 90% !important;
  }

  /* CTA Section Mobile */
  .section-padding:last-of-type {
    padding: 60px 20px !important;
  }
}

/* --- Partners Grid Layout --- */
.partners-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 20px;
  padding: 40px 0;
  align-items: center;
  width: 100%;
}

.partner-logo-item {
  display: flex;
  align-items: center;
  justify-content: center;
  aspect-ratio: 1 / 1;
  background: white;
  padding: 15px;
  border-radius: 12px;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.06);
  border: 2px solid transparent;
  transition: all 0.4s ease;
  min-height: 150px;
}

.partner-logo-item img {
  max-width: 95%;
  max-height: 95%;
  object-fit: contain;
  display: block;
  filter: grayscale(100%);
  transition: all 0.4s ease;
}

.partner-logo-item:hover {
  background: #f9f9f9;
  border-color: var(--gold);
  box-shadow: 0 10px 25px rgba(215, 177, 90, 0.2);
  transform: translateY(-5px);
}

.partner-logo-item:hover img {
  filter: grayscale(0%);
  transform: scale(1.1);
}
