/* Nowaty IT Corporation - Modern website styles */
:root {
  --primary: #0d6efd;
  --primary-dark: #0a58ca;
  --accent: #00d4aa;
  --dark: #0f172a;
  --dark-soft: #1e293b;
  --body-bg: #f8fafc;
  --font-sans: 'Outfit', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-mono: 'JetBrains Mono', monospace;
  --shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
  --shadow-lg: 0 10px 40px rgba(0, 0, 0, 0.12);
  --radius: 12px;
  --radius-lg: 20px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-sans);
  font-size: 1rem;
  line-height: 1.6;
  color: #334155;
  background: var(--body-bg);
  overflow-x: hidden;
}

/* Top bar */
.top-bar {
  background: var(--dark);
  font-size: 0.875rem;
}

.top-bar a:hover {
  color: var(--accent) !important;
}

/* Navbar */
.navbar {
  background: rgba(15, 23, 42, 0.95) !important;
  backdrop-filter: blur(10px);
  padding: 0.75rem 0;
  transition: background 0.3s, box-shadow 0.3s;
}

.navbar.scrolled {
  background: rgba(15, 23, 42, 0.98) !important;
  box-shadow: var(--shadow);
}

.navbar-brand {
  font-size: 1.35rem;
  color: #fff !important;
}

.logo-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  color: #fff;
  font-weight: 700;
  border-radius: 8px;
  font-family: var(--font-mono);
}

.navbar .nav-link {
  color: rgba(255, 255, 255, 0.85) !important;
  font-weight: 500;
  padding: 0.5rem 0.75rem !important;
  border-radius: 8px;
  transition: color 0.2s, background 0.2s;
}

.navbar .nav-link:hover,
.navbar .nav-link:focus {
  color: var(--accent) !important;
  background: rgba(255, 255, 255, 0.06);
}

/* Hero */
.hero-carousel {
  position: relative;
  /* min-height: 85vh;*/
  height: 730px;
}

.hero-carousel .carousel-item {
 /* min-height: 85vh;*/
 height: 730px;
}

.hero-slide {
  /* min-height: 85vh;*/
  height: 730px;
  display: flex;
  align-items: center;
  background-size: cover;
  background-position: center;
  position: relative;
}

.hero-slide::before {
  content: '';
  position: absolute;
  inset: 0;
  /*background: linear-gradient(135deg, rgba(15, 23, 42, 0.92) 0%, rgba(30, 41, 59, 0.85) 100%);*/
  background: linear-gradient(90deg,rgba(0,204,255,.5) 0%,rgba(119,9,121,.5) 44%,rgba(232,176,84,.5) 100%);
  z-index: 0;
}
.hero-slide::after {
  content: '';
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  z-index: 1;
  background: rgba(0, 0, 0, .4);
}

.hero-slide .container {
  position: relative;
  z-index: 2;
}

.hero-slide-1 { background-image: linear-gradient(135deg, #0f172a 0%, #1e3a5f 50%, #0f172a 100%); }
.hero-slide-2 { background-image: linear-gradient(135deg, #1e293b 0%, #0f172a 50%, #1e3a5f 100%); }
.hero-slide-3 { background-image: linear-gradient(135deg, #0f172a 0%, #1e293b 50%, #0d3d56 100%); }

.min-vh-80 {
  min-height: 80vh;
}

.hero-title {
  font-size: clamp(2rem, 5vw, 3rem);
  font-weight: 700;
  color: #fff;
  margin-bottom: 1rem;
  line-height: 1.2;
}

.hero-subtitle {
  font-size: 1.15rem;
  color: rgba(255, 255, 255, 0.85);
  margin-bottom: 1.5rem;
  max-width: 480px;
}

.hero-carousel .btn-primary {
  background: linear-gradient(135deg, var(--primary), #0a58ca);
  border: none;
  font-weight: 600;
  padding: 0.75rem 1.5rem;
  box-shadow: 0 4px 15px rgba(13, 110, 253, 0.4);
}

.hero-carousel .btn-primary:hover {
  background: linear-gradient(135deg, #0a58ca, #084298);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(13, 110, 253, 0.45);
}

.hero-illustration {
  font-size: 12rem;
  color: rgba(0, 212, 170, 0.15);
  line-height: 1;
}

.carousel-control-prev,
.carousel-control-next {
  width: 50px;
  height: 50px;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(255, 255, 255, 0.1);
  border-radius: 50%;
  opacity: 1;
  transition: background 0.2s;
}

.carousel-control-prev { left: 1rem; }
.carousel-control-next { right: 1rem; }

.carousel-control-prev:hover,
.carousel-control-next:hover {
  background: rgba(255, 255, 255, 0.2);
}

.carousel-indicators [data-bs-target] {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.4);
  border: none;
}

.carousel-indicators .active {
  background: var(--accent);
  transform: scale(1.2);
}

/* Sections */
.section-py {
  padding: 4.5rem 0;
  animation: sectionReveal 0.5s ease-out both;
}

@keyframes sectionReveal {
  from { opacity: 0; transform: translateY(16px); }
  to { opacity: 1; transform: translateY(0); }
}

.section-title {
  font-size: clamp(1.75rem, 3vw, 2.25rem);
  font-weight: 700;
  color: var(--dark);
  margin-bottom: 0.5rem;
}

/* About tabs */
.nav-tabs-about .nav-link {
  color: #64748b;
  font-weight: 500;
  border: none;
  border-bottom: 2px solid transparent;
  padding: 0.6rem 1rem;
  margin-right: 0.25rem;
}

.nav-tabs-about .nav-link:hover {
  color: var(--primary);
}

.nav-tabs-about .nav-link.active {
  color: var(--primary);
  background: transparent;
  border-bottom-color: var(--primary);
}

.skill-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.skill-tags .badge {
  font-weight: 500;
  padding: 0.4rem 0.75rem;
}

.bg-primary-subtle {
  background: rgba(13, 110, 253, 0.12);
}

.value-icon {
  width: 56px;
  height: 56px;
  margin: 0 auto;
  background: linear-gradient(135deg, rgba(13, 110, 253, 0.15), rgba(0, 212, 170, 0.15));
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  color: var(--primary);
}

/* Stats */
.stats-section {
  background: linear-gradient(135deg, var(--dark) 0%, var(--dark-soft) 100%);
  position: relative;
  overflow: hidden;
}

.stats-section::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -20%;
  width: 60%;
  height: 200%;
  background: radial-gradient(ellipse, rgba(0, 212, 170, 0.08) 0%, transparent 70%);
  pointer-events: none;
}

.stat-card {
  padding: 1.5rem;
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.08);
  transition: transform 0.2s, background 0.2s;
}

.stat-card:hover {
  background: rgba(255, 255, 255, 0.08);
  transform: translateY(-4px);
}

.stat-icon {
  font-size: 2rem;
  color: var(--accent);
  margin-bottom: 0.5rem;
}

.stat-number {
  font-size: 2rem;
  font-weight: 700;
  color: #fff;
  font-family: var(--font-mono);
}

.stat-label {
  font-size: 0.9rem;
  color: rgba(255, 255, 255, 0.7);
}

/* Services */
#services {
  position: relative;
  background: url('/images/services.jpeg') no-repeat center;
  background-size: cover;
  background-attachment: fixed;
}

#services .section-title {
  color: #fff;
}

#services .lead {
  color: #fff !important;
}

.service-card {
  border-radius: var(--radius-lg);
  transition: transform 0.25s, box-shadow 0.25s;
}

.service-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-lg) !important;
}

.service-icon-wrap {
  width: 64px;
  height: 64px;
  margin: 0 auto;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.75rem;
  color: #fff;
}

.service-card .card-body h3 {
  color: var(--dark);
}

/* Projects */
#projects {background: url('/images/patterns/pattern19.png') repeat 0 0;}

.project-card {
  border-radius: var(--radius);
  transition: transform 0.2s, box-shadow 0.2s;
}

.project-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg) !important;
}

.project-thumb {
  height: 180px;
  background-color: #cbd5e1;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}

.project-item.hide {
  display: none !important;
}

.filter-btn.active {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
}

.btn-load-more {
  font-weight: 600;
  border-radius: 50px;
  transition: transform 0.2s, box-shadow 0.2s;
}

.btn-load-more:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 16px rgba(13, 110, 253, 0.35);
}

#projectLoadMoreWrap.d-none {
  display: none !important;
}

/* Project preview modal */
#projectPreviewModal .project-preview-image-wrap img {
  max-height: 70vh;
  object-fit: contain;
  width: 100%;
}

#projectPreviewModal .project-preview-content {
  white-space: pre-wrap;
  line-height: 1.6;
}

#projectPreviewModal .modal-footer.d-none {
  display: none !important;
}

/* Team */
.team-card {
  border-radius: var(--radius-lg);
  transition: transform 0.2s, box-shadow 0.2s;
}

.team-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg) !important;
}

.team-avatar {
  width: 100px;
  height: 100px;
  margin: 0 auto;
  background: linear-gradient(135deg, rgba(13, 110, 253, 0.15), rgba(0, 212, 170, 0.15));
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.5rem;
  color: var(--primary);
}

.team-card a {
  color: var(--dark);
  text-decoration: none;
  font-weight: 600;
}

.team-card a:hover {
  color: var(--primary);
}

/* Accordion */
.accordion-button {
  font-weight: 600;
  color: var(--dark);
  background: #fff !important;
}

.accordion-button:not(.collapsed) {
  color: var(--primary);
  box-shadow: none;
}

.accordion-button:focus {
  box-shadow: none;
  border-color: rgba(0,0,0,.125);
}

/* Contact */
#contact {
  background: rgba(255, 255, 255, 1) url('/images/patterns/pattern6.png') 0 0 repeat;
  opacity: .9;
  position: relative;
}
#contact .container {
  position: relative;
  z-index: 2;
}
#contact:after {
  content: "";
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  z-index: -98;
  background: url('/images/Contact_mail.png') 50% 60px no-repeat;
  opacity: .3;
  filter: opacity(30);
  z-index: 1;
}

#contact .card {
  border-radius: var(--radius-lg);
  background: rgba(255, 255, 255, 0.5);
}

/* Clients */
.client-placeholder {
  background: rgba(255, 255, 255, 0.08);
  color: rgba(255, 255, 255, 0.6);
  font-size: 0.9rem;
}

/* Visitors */
#visitors {background: #00ccff; padding: 4.5rem 0; }
.VisitorsMap {position: relative;padding-bottom: 40%;}
@media (max-width: 767px) {.VisitorsMap {padding-bottom: 66.67%;}}

/* Footer */
.footer {
  background: var(--dark);
}

.footer a:hover {
  color: var(--accent) !important;
}

/* Scroll to top */
.scroll-to-top {
  position: fixed;
  bottom: 1.5rem;
  right: 1.5rem;
  width: 48px;
  height: 48px;
  background: var(--primary);
  color: #fff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  box-shadow: var(--shadow);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s, visibility 0.3s, transform 0.2s;
  z-index: 1000;
}

.scroll-to-top.visible {
  opacity: 1;
  visibility: visible;
}

.scroll-to-top:hover {
  color: #fff;
  transform: translateY(-3px);
  box-shadow: 0 6px 20px rgba(13, 110, 253, 0.4);
}

/* Animations (optional enhancement) */
.animate-fade-up {
  animation: fadeUp 0.8s ease-out forwards;
}

.delay-1 { animation-delay: 0.15s; opacity: 0; }
.delay-2 { animation-delay: 0.6s; opacity: 0; }
.delay-3 { animation-delay: 0.9s; opacity: 0; }
.delay-4 { animation-delay: 1.2s; opacity: 0; }

@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* RTL */
body.rtl,
[dir="rtl"] {
  text-align: right;
  font-family: 'Tajawal', 'Outfit', sans-serif;
}

body.rtl .navbar-nav,
[dir="rtl"] .navbar-nav {
  margin-right: auto;
  margin-left: 0;
}

body.rtl .ms-auto,
[dir="rtl"] .navbar .ms-auto {
  margin-left: 0 !important;
  margin-right: auto !important;
}

body.rtl .me-1,
body.rtl .me-2,
[dir="rtl"] .me-1,
[dir="rtl"] .me-2 {
  margin-left: 0.25rem;
  margin-right: 0;
}

body.rtl .scroll-to-top,
[dir="rtl"] .scroll-to-top {
  right: auto;
  left: 1.5rem;
}

body.rtl .accordion-button::after {
  margin-left: 0;
  margin-right: auto;
}

/* Lang switcher */
.btn-lang {
  background: none;
  border: none;
  color: rgba(255,255,255,0.7);
  cursor: pointer;
  font-size: 0.9rem;
  padding: 0.2rem 0.4rem;
  transition: color 0.2s;
}

.btn-lang:hover,
.btn-lang.active {
  color: var(--accent);
}

/* Value icons with image fallback */
.value-icon {
  overflow: hidden;
}

.value-icon .value-img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.value-icon i {
  font-size: 1.5rem;
}

/* Team photo */
.team-avatar {
  overflow: hidden;
}

.team-photo {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Client logos */
.client-logo-wrap {
  padding: 1rem;
  min-height: 80px;
  display: flex;
  align-items: center;
  justify-content: center;
  filter: grayscale(1);
  opacity: 0.85;
  transition: filter 0.3s, opacity 0.3s;
}

.client-logo-wrap:hover {
  filter: grayscale(0);
  opacity: 1;
}

.client-logo-wrap.placeholder {
  background: rgba(255,255,255,0.08);
  color: rgba(255,255,255,0.5);
  font-size: 0.85rem;
}

.project-card {
  animation: cardReveal 0.5s ease-out both;
}

.project-card:nth-child(1) { animation-delay: 0.05s; }
.project-card:nth-child(2) { animation-delay: 0.1s; }
.project-card:nth-child(3) { animation-delay: 0.15s; }
.project-card:nth-child(4) { animation-delay: 0.2s; }
.project-card:nth-child(5) { animation-delay: 0.25s; }
.project-card:nth-child(6) { animation-delay: 0.3s; }
.project-card:nth-child(7) { animation-delay: 0.35s; }
.project-card:nth-child(8) { animation-delay: 0.4s; }

@keyframes cardReveal {
  from {
    opacity: 0;
    transform: translateY(24px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

/* Responsive */
@media (max-width: 991.98px) {
  .section-py {
    padding: 3rem 0;
  }

  .hero-illustration {
    font-size: 6rem;
  }
}

@media (max-width: 575.98px) {
  .hero-title {
    font-size: 1.75rem;
  }

  .hero-subtitle {
    font-size: 1rem;
  }

  .stat-number {
    font-size: 1.5rem;
  }

  .hero-carousel .carousel-item {
    height: 503px;
  }

  .hero-slide {
    height: 503px;
  }

  .hero-carousel {
    height: 503px;
  }

  .carousel-control-prev, .carousel-control-next {top: auto; bottom: 0;}
}
