/* ===========================
   Linzcloud — Custom Styles
   =========================== */

/* Base */
html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Tajawal', sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Brand Gradient */
.bg-gradient-blue {
  background: linear-gradient(135deg, #1E3A8A 0%, #0EA5E9 100%);
}

.bg-gradient-soft {
  background: linear-gradient(180deg, #EFF6FF 0%, #FFFFFF 100%);
}

/* Hero Pattern (Subtle dots) */
.hero-pattern {
  background-image:
    radial-gradient(circle at 1px 1px, rgba(30, 58, 138, 0.08) 1px, transparent 0);
  background-size: 24px 24px;
}

/* Card Hover */
.card-hover {
  transition: transform 300ms ease, box-shadow 300ms ease, border-color 300ms ease;
}
.card-hover:hover {
  transform: translateY(-4px);
  box-shadow: 0 20px 25px -5px rgba(15, 23, 42, 0.1), 0 10px 10px -5px rgba(15, 23, 42, 0.04);
}

/* FAQ Accordion */
.faq-content {
  max-height: 0;
  overflow: hidden;
  transition: max-height 400ms ease, padding 300ms ease;
}
.faq-item.active .faq-content {
  max-height: 800px;
  padding-top: 0.5rem;
  padding-bottom: 1rem;
}
.faq-icon {
  transition: transform 300ms ease;
}
.faq-item.active .faq-icon {
  transform: rotate(45deg);
}

/* Fade-in on Scroll */
.fade-in {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 700ms ease, transform 700ms ease;
}
.fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}

/* Mobile Menu */
.mobile-menu {
  max-height: 0;
  overflow: hidden;
  transition: max-height 300ms ease;
}
.mobile-menu.open {
  max-height: 800px;
}

/* Logo image — keep crisp */
.logo-img {
  object-fit: contain;
}

/* Active Nav Link */
.nav-link {
  position: relative;
  transition: color 200ms ease;
}
.nav-link.active {
  color: #1E3A8A;
  font-weight: 700;
}
.nav-link.active::after {
  content: '';
  position: absolute;
  bottom: -6px;
  right: 0;
  left: 0;
  height: 2px;
  background-color: #0EA5E9;
  border-radius: 2px;
}

/* Pricing Card — Featured */
.pricing-featured {
  position: relative;
  z-index: 10;
}

@media (min-width: 768px) {
  .pricing-featured {
    transform: scale(1.04);
  }
}

/* Lucide icons baseline alignment */
[data-lucide] {
  vertical-align: middle;
  flex-shrink: 0;
}

/* Form Inputs Focus */
.form-input:focus {
  outline: none;
  border-color: #1E3A8A;
  box-shadow: 0 0 0 3px rgba(30, 58, 138, 0.15);
}

/* Print */
@media print {
  header, footer, .no-print { display: none !important; }
  body { color: #000; }
}

/* ============================
   Stats Section — Premium Design
   ============================ */

.stats-section {
  position: relative;
  overflow: hidden;
  background: linear-gradient(135deg, #1E3A8A 0%, #1e40af 50%, #0c2461 100%);
}

/* Grid pattern overlay */
.stats-pattern {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.05) 1px, transparent 1px);
  background-size: 50px 50px;
  pointer-events: none;
}

/* Glowing blobs */
.stats-blob {
  position: absolute;
  border-radius: 9999px;
  filter: blur(80px);
  pointer-events: none;
  opacity: 0.35;
}
.stats-blob-1 {
  top: -100px;
  right: 10%;
  width: 400px;
  height: 400px;
  background: #0EA5E9;
}
.stats-blob-2 {
  bottom: -100px;
  left: 10%;
  width: 350px;
  height: 350px;
  background: #38bdf8;
  opacity: 0.25;
}

/* Stat Card */
.stat-card {
  position: relative;
  padding: 1.5rem 1rem;
  background: rgba(255, 255, 255, 0.07);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 1.25rem;
  text-align: center;
  transition: transform 350ms cubic-bezier(0.4, 0, 0.2, 1),
              background 350ms ease,
              border-color 350ms ease,
              box-shadow 350ms ease;
  overflow: hidden;
}

@media (min-width: 768px) {
  .stat-card {
    padding: 2rem 1.5rem;
  }
}

.stat-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(14, 165, 233, 0.18), transparent 60%);
  opacity: 0;
  transition: opacity 350ms ease;
  pointer-events: none;
}

.stat-card:hover {
  transform: translateY(-6px);
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(14, 165, 233, 0.5);
  box-shadow: 0 20px 40px -10px rgba(0, 0, 0, 0.4),
              0 0 0 1px rgba(14, 165, 233, 0.3);
}

.stat-card:hover::before { opacity: 1; }

/* Stat Icon */
.stat-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 3rem;
  height: 3rem;
  margin-bottom: 1rem;
  background: linear-gradient(135deg, #0EA5E9 0%, #38bdf8 50%, #1E3A8A 100%);
  border-radius: 0.875rem;
  color: white;
  box-shadow: 0 8px 24px -4px rgba(14, 165, 233, 0.5),
              inset 0 1px 0 rgba(255, 255, 255, 0.2);
  position: relative;
  z-index: 1;
  transition: transform 350ms ease;
}

@media (min-width: 768px) {
  .stat-icon {
    width: 3.5rem;
    height: 3.5rem;
  }
}

.stat-card:hover .stat-icon {
  transform: scale(1.08) rotate(-4deg);
}

/* Stat Number — Gradient Text */
.stat-number {
  font-size: clamp(2.25rem, 5vw, 3.5rem);
  font-weight: 800;
  line-height: 1;
  margin-bottom: 0.5rem;
  position: relative;
  z-index: 1;
  background: linear-gradient(135deg, #ffffff 0%, #bae6fd 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.02em;
}

/* Stat Label */
.stat-label {
  color: #bae6fd;
  font-size: 0.875rem;
  font-weight: 500;
  position: relative;
  z-index: 1;
  line-height: 1.4;
}

@media (min-width: 768px) {
  .stat-label {
    font-size: 1rem;
  }
}

/* Bottom accent line */
.stat-card::after {
  content: '';
  position: absolute;
  bottom: 0;
  right: 50%;
  transform: translateX(50%);
  width: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, #0EA5E9, transparent);
  transition: width 400ms ease;
}

.stat-card:hover::after {
  width: 80%;
}

/* Section Badge */
.stats-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.375rem 1rem;
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 9999px;
  color: #e0f2fe;
  font-size: 0.875rem;
  font-weight: 700;
  margin-bottom: 1rem;
}

/* Scrollbar (cosmetic) */
::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}
::-webkit-scrollbar-track {
  background: #EFF6FF;
}
::-webkit-scrollbar-thumb {
  background: #1E3A8A;
  border-radius: 8px;
}
::-webkit-scrollbar-thumb:hover {
  background: #0EA5E9;
}

/* ============================
   Prose — long-form text pages
   ============================
   Used by page.php, single.php and single-project.php for content that comes
   from the editor rather than from a block. Tailwind's preflight strips list
   markers and heading sizes, so they are restored here for this scope only.
   Everything uses logical properties so it flips with the language. */

.prose-linzcloud h2 {
  font-size: 1.5rem;
  line-height: 1.3;
  font-weight: 700;
  color: #0F172A;
  margin-top: 2.5rem;
  margin-bottom: 1rem;
}

.prose-linzcloud h3 {
  font-size: 1.25rem;
  line-height: 1.4;
  font-weight: 700;
  color: #0F172A;
  margin-top: 2rem;
  margin-bottom: 0.75rem;
}

.prose-linzcloud h2:first-child,
.prose-linzcloud h3:first-child {
  margin-top: 0;
}

.prose-linzcloud p {
  margin-bottom: 1rem;
}

.prose-linzcloud ul,
.prose-linzcloud ol {
  margin-bottom: 1.25rem;
  padding-inline-start: 1.5rem;
}

.prose-linzcloud ul {
  list-style: disc;
}

.prose-linzcloud ol {
  list-style: decimal;
}

.prose-linzcloud li {
  margin-bottom: 0.5rem;
  padding-inline-start: 0.25rem;
}

.prose-linzcloud li::marker {
  color: #1E3A8A;
}

.prose-linzcloud a {
  color: #1E3A8A;
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.prose-linzcloud a:hover {
  color: #0EA5E9;
}

.prose-linzcloud strong {
  color: #0F172A;
  font-weight: 700;
}

.prose-linzcloud hr {
  margin-top: 2.5rem;
  margin-bottom: 2.5rem;
  border-color: #E2E8F0;
}

.prose-linzcloud table {
  width: 100%;
  margin-bottom: 1.5rem;
  border-collapse: collapse;
  font-size: 0.9375rem;
}

.prose-linzcloud th,
.prose-linzcloud td {
  border: 1px solid #E2E8F0;
  padding: 0.625rem 0.875rem;
  text-align: start;
}

.prose-linzcloud th {
  background-color: #EFF6FF;
  color: #0F172A;
  font-weight: 700;
}

/* ============================
   WordPress core classes
   ============================
   WordPress generates these class names itself — from the editor's alignment
   buttons, from image captions, from get_search_form(), from post_class().
   Tailwind's preflight leaves them completely unstyled, so an aligned image
   used to sit full width and .screen-reader-text used to render as visible
   text. Plain CSS on purpose: this file is not part of the Tailwind build.

   Floats stay physical. The editor's "align left" button means left in both
   languages, and the wrap margin belongs on the side the text flows past. */

.alignleft {
  float: left;
  margin-right: 1.5rem;
  margin-bottom: 1rem;
}

.alignright {
  float: right;
  margin-left: 1.5rem;
  margin-bottom: 1rem;
}

.aligncenter {
  display: block;
  margin-left: auto;
  margin-right: auto;
  margin-bottom: 1rem;
}

.alignnone {
  margin-bottom: 1rem;
  max-width: 100%;
  height: auto;
}

.alignwide,
.alignfull {
  margin-bottom: 1.5rem;
}

@media (max-width: 640px) {
  /* A floated image in a phone-width column leaves an unreadable text sliver. */
  .alignleft,
  .alignright {
    float: none;
    display: block;
    margin-left: auto;
    margin-right: auto;
  }
}

.wp-caption {
  max-width: 100%;
  margin-bottom: 1.5rem;
}

.wp-caption img {
  display: block;
  max-width: 100%;
  height: auto;
  border-radius: 0.75rem;
}

.wp-caption-text,
.gallery-caption,
figcaption {
  margin-top: 0.5rem;
  color: #64748B;
  font-size: 0.875rem;
  line-height: 1.6;
  text-align: center;
}

/* Visible only to screen readers. Core prints this class in the search form
   and in skip links, and an unstyled copy shows the label on the page. */
.screen-reader-text {
  border: 0;
  clip-path: inset(50%);
  height: 1px;
  width: 1px;
  margin: -1px;
  overflow: hidden;
  padding: 0;
  position: absolute;
  white-space: nowrap;
}

/* …except when focused, so keyboard users can see where they are. */
.screen-reader-text:focus {
  background-color: #FFFFFF;
  border-radius: 0.375rem;
  box-shadow: 0 0 0 2px #0EA5E9;
  clip-path: none;
  color: #1E3A8A;
  display: block;
  font-size: 0.875rem;
  font-weight: 700;
  height: auto;
  inset-inline-start: 1rem;
  line-height: normal;
  padding: 0.75rem 1.25rem;
  text-decoration: none;
  top: 1rem;
  width: auto;
  z-index: 100000;
}

/* Emitted by post_class(). No comment list ships with this theme yet, but the
   classes must exist so a future one inherits the theme's look. */
.sticky,
.bypostauthor {
  display: block;
}

/* Editor-inserted media inside long-form pages. */
.prose-linzcloud img,
.prose-linzcloud figure {
  max-width: 100%;
  height: auto;
}

.prose-linzcloud figure {
  margin-bottom: 1.5rem;
}

.prose-linzcloud img {
  border-radius: 0.75rem;
}

.prose-linzcloud blockquote {
  border-inline-start: 4px solid #0EA5E9;
  background-color: #EFF6FF;
  padding: 1rem 1.25rem;
  margin-bottom: 1.5rem;
  border-radius: 0 0.75rem 0.75rem 0;
  color: #0F172A;
}

.prose-linzcloud blockquote p:last-child {
  margin-bottom: 0;
}

/* Multi-page posts: wp_link_pages() output. */
.page-links {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
  margin-top: 2rem;
  font-weight: 700;
  font-size: 0.875rem;
}

.page-links a,
.page-links > span:not(.page-links-title) {
  border: 1px solid #E2E8F0;
  border-radius: 0.5rem;
  padding: 0.25rem 0.75rem;
  color: #1E3A8A;
  text-decoration: none;
}

.page-links a:hover {
  border-color: #0EA5E9;
  color: #0EA5E9;
}

.page-links > span:not(.page-links-title) {
  background-color: #1E3A8A;
  border-color: #1E3A8A;
  color: #FFFFFF;
}

.page-links-title {
  border: 0;
  padding: 0;
  color: #64748B;
  font-weight: 400;
}
