/*
Theme Name:  TechIntegry — Elementor
Theme URI:   https://techintegry.com
Description: Integration Technology — Elementor Theme Builder edition. Minimal base theme with brand tokens. Design everything via Elementor Theme Builder.
Version:     1.0.0
Author:      Integration Technology
Author URI:  https://techintegry.com
Text Domain: techintegry-el
Tags:        elementor, full-site-editing, custom-colors, custom-fonts, rtl-language-support
*/

/* ============================================================
   BRAND DESIGN TOKENS
   ============================================================ */
:root {
  /* Primary palette */
  --ti-primary:        #3D3DE8;
  --ti-primary-dark:   #2C2CC4;
  --ti-primary-light:  #EEEEFF;

  /* Neutrals */
  --ti-white:          #FFFFFF;
  --ti-bg:             #FAFAFA;
  --ti-bg-light:       #F4F4F8;
  --ti-border:         #E5E5EF;
  --ti-text-dark:      #0D0D1A;
  --ti-text-body:      #2D2D3A;
  --ti-text-muted:     #6B6B80;

  /* Typography */
  --ti-font-en:        'Alexandria', system-ui, sans-serif;
  --ti-font-ar:        'Alexandria', system-ui, sans-serif;
  --ti-radius-sm:      6px;
  --ti-radius-md:      10px;
  --ti-radius-lg:      16px;
  --ti-radius-xl:      24px;

  /* Shadows */
  --ti-shadow-sm:      0 1px 3px rgba(0,0,0,.06), 0 1px 2px rgba(0,0,0,.04);
  --ti-shadow-md:      0 4px 16px rgba(61,61,232,.08);
  --ti-shadow-lg:      0 12px 40px rgba(61,61,232,.12);
}

/* ============================================================
   RESET & BASE
   ============================================================ */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html {
  font-size: 16px;
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: 'Alexandria', system-ui, sans-serif;
  color: var(--ti-text-body);
  background: var(--ti-white);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

[dir="rtl"] body { font-family: 'Alexandria', system-ui, sans-serif; }

img, video { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }
button { cursor: pointer; border: none; background: none; }

/* ============================================================
   ELEMENTOR OVERRIDES
   ============================================================ */

/* Full-width sections */
.elementor-section.elementor-section-stretched {
  left: 0 !important;
  right: 0 !important;
}

/* Remove default Elementor link underlines */
.elementor-widget-text-editor a,
.elementor-widget-heading a { text-decoration: none; }

/* ============================================================
   GLOBAL UTILITY CLASSES (available inside Elementor)
   ============================================================ */

/* Buttons */
.ti-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 28px;
  border-radius: 8px;
  font-weight: 600;
  font-size: .9375rem;
  transition: all .2s ease;
  cursor: pointer;
  white-space: nowrap;
}
.ti-btn-primary {
  background: var(--ti-primary);
  color: #fff;
  box-shadow: 0 4px 14px rgba(61,61,232,.25);
}
.ti-btn-primary:hover { background: var(--ti-primary-dark); transform: translateY(-1px); }
.ti-btn-ghost {
  border: 1.5px solid var(--ti-border);
  color: var(--ti-text-dark);
  background: transparent;
}
.ti-btn-ghost:hover { border-color: var(--ti-primary); color: var(--ti-primary); }
.ti-btn-outline-white {
  border: 1.5px solid rgba(255,255,255,.5);
  color: #fff;
  background: transparent;
}
.ti-btn-outline-white:hover { background: rgba(255,255,255,.1); }

/* Badge */
.ti-badge {
  display: inline-flex;
  align-items: center;
  padding: 5px 14px;
  background: var(--ti-primary-light);
  color: var(--ti-primary);
  border-radius: 100px;
  font-size: .8125rem;
  font-weight: 600;
  letter-spacing: .02em;
}

/* Stats */
.ti-stat strong { font-size: clamp(2rem, 5vw, 3rem); font-weight: 800; color: #fff; display: block; line-height: 1; }
.ti-stat span   { font-size: .9375rem; color: rgba(255,255,255,.75); margin-top: 6px; display: block; }

/* Cards */
.ti-card {
  background: var(--ti-white);
  border: 1px solid var(--ti-border);
  border-radius: var(--ti-radius-lg);
  padding: 32px;
  transition: box-shadow .2s, transform .2s;
}
.ti-card:hover { box-shadow: var(--ti-shadow-lg); transform: translateY(-2px); }

/* Testimonial */
.ti-testimonial {
  background: var(--ti-white);
  border: 1px solid var(--ti-border);
  border-radius: var(--ti-radius-lg);
  padding: 28px;
}
.ti-testimonial-text { font-size: 1rem; color: var(--ti-text-body); line-height: 1.7; font-style: italic; margin-bottom: 20px; }
.ti-testimonial-author { display: flex; align-items: center; gap: 12px; }
.ti-testimonial-avatar {
  width: 44px; height: 44px;
  border-radius: 50%;
  background: var(--ti-primary-light);
  color: var(--ti-primary);
  font-weight: 700; font-size: .9375rem;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.ti-testimonial-name  { font-weight: 700; font-size: .9375rem; color: var(--ti-text-dark); }
.ti-testimonial-role  { font-size: .8125rem; color: var(--ti-text-muted); }

/* FAQ */
.ti-faq-item { border-bottom: 1px solid var(--ti-border); }
.ti-faq-question {
  width: 100%; display: flex; justify-content: space-between; align-items: center;
  padding: 18px 0; font-size: 1rem; font-weight: 600;
  color: var(--ti-text-dark); background: none; border: none; cursor: pointer; text-align: left;
}
[dir="rtl"] .ti-faq-question { text-align: right; flex-direction: row-reverse; }
.ti-faq-answer { display: none; padding: 0 0 18px; color: var(--ti-text-muted); line-height: 1.7; font-size: .9375rem; }
.ti-faq-item.open .ti-faq-answer { display: block; }
.ti-faq-icon { font-size: 1.25rem; color: var(--ti-primary); flex-shrink: 0; }

/* CTA Banner (blue) */
.ti-cta-banner {
  background: var(--ti-primary);
  border-radius: var(--ti-radius-xl);
  padding: 72px 56px;
  text-align: center;
}
.ti-cta-banner h2 { color: #fff; margin-bottom: 16px; }
.ti-cta-banner p  { color: rgba(255,255,255,.8); max-width: 540px; margin: 0 auto 32px; font-size: 1.0625rem; }

/* Process step cards */
.ti-step-card { border: 1px solid var(--ti-border); border-radius: var(--ti-radius-lg); padding: 28px; }
.ti-step-num  { font-size: 2rem; font-weight: 900; color: var(--ti-primary); line-height: 1; margin-bottom: 12px; }
.ti-step-card h3 { font-size: 1.0625rem; font-weight: 700; color: var(--ti-text-dark); margin-bottom: 8px; }
.ti-step-card p  { font-size: .875rem; color: var(--ti-text-muted); line-height: 1.6; }

/* Partners strip */
.ti-partners { display: flex; flex-wrap: wrap; gap: 32px 48px; align-items: center; justify-content: center; padding: 32px 0; }
.ti-partner   { font-size: .875rem; font-weight: 700; color: var(--ti-text-muted); letter-spacing: .04em; text-transform: uppercase; }

/* Forms */
.ti-form-input,
.ti-form-textarea {
  width: 100%; padding: 12px 16px;
  border: 1.5px solid var(--ti-border);
  border-radius: var(--ti-radius-md);
  font-size: .9375rem; font-family: inherit;
  color: var(--ti-text-dark);
  background: var(--ti-white);
  transition: border-color .2s;
  outline: none;
}
.ti-form-input:focus,
.ti-form-textarea:focus { border-color: var(--ti-primary); }
[dir="rtl"] .ti-form-input,
[dir="rtl"] .ti-form-textarea { text-align: right; direction: rtl; }

/* ============================================================
   HEADER (fallback when Elementor template not set)
   ============================================================ */
.ti-header-fallback {
  position: sticky; top: 0; z-index: 999;
  background: rgba(255,255,255,.95);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--ti-border);
  padding: 0 24px;
  height: 68px;
  display: flex; align-items: center; justify-content: space-between;
}
.ti-header-logo { font-size: 1.125rem; font-weight: 800; color: var(--ti-primary); }

/* ============================================================
   404 PAGE
   ============================================================ */
.ti-404 { min-height: 70vh; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; padding: 80px 24px; }
.ti-404 h1 { font-size: clamp(2rem,6vw,4rem); font-weight: 900; color: var(--ti-text-dark); margin: 16px 0 12px; }
.ti-404 p  { font-size: 1.125rem; color: var(--ti-text-muted); max-width: 480px; margin: 0 auto 32px; }
.ti-404-actions { display: flex; gap: 12px; flex-wrap: wrap; justify-content: center; }

/* ============================================================
   BLOG HUB  (home.php — /blog/)
   ============================================================ */
.cp-wrap { max-width: 1200px; margin: 0 auto; padding: 0 24px 80px; }
.cp-hero { padding: 72px 0 48px; text-align: center; }
.cp-badge { display: inline-block; background: #EEEEFF; color: #3D3DE8; font-size: .78rem; font-weight: 700; padding: 6px 16px; border-radius: 999px; letter-spacing: .06em; margin-bottom: 18px; text-transform: uppercase; }
.cp-hero h1 { font-size: clamp(1.9rem,4vw,2.8rem); font-weight: 800; color: #0d0d1a; line-height: 1.2; margin: 0 0 16px; }
.cp-lead { font-size: 1.05rem; color: #6B6B80; max-width: 600px; margin: 0 auto; line-height: 1.75; }

.blg-grid { display: grid; grid-template-columns: repeat(3,1fr); gap: 28px; margin-top: 48px; }
.blg-card { display: flex; flex-direction: column; background: #fff; border: 1.5px solid #EBEBF5; border-radius: 16px; overflow: hidden; text-decoration: none; color: inherit; transition: box-shadow .2s, border-color .2s, transform .2s; }
.blg-card:hover { box-shadow: 0 8px 32px rgba(61,61,232,.1); border-color: #3D3DE8; transform: translateY(-3px); }
.blg-card-img { height: 200px; background: linear-gradient(135deg,#EEEEFF 0%,#dde 100%); background-size: cover; background-position: center; flex-shrink: 0; }
.blg-card-body { padding: 24px; flex: 1; display: flex; flex-direction: column; }
.blg-card-body h3 { font-size: 1rem; font-weight: 700; color: #0d0d1a; margin: 0 0 10px; line-height: 1.4; }
.blg-card-body p { font-size: .875rem; color: #6B6B80; line-height: 1.65; flex: 1; margin: 0 0 16px; }
.blg-card-foot { display: flex; justify-content: space-between; align-items: center; margin-top: auto; padding-top: 12px; border-top: 1px solid #F0F0F8; }
.blg-card-date { font-size: .78rem; color: #9B9BAD; }
.blg-read-link { font-size: .85rem; font-weight: 700; color: #3D3DE8; }
.blg-pagination { margin-top: 56px; text-align: center; }
.blg-pagination .nav-links { display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; }
.blg-pagination .page-numbers { display: inline-flex; align-items: center; justify-content: center; width: 40px; height: 40px; border-radius: 8px; border: 1.5px solid #EBEBF5; font-size: .9rem; font-weight: 600; color: #0d0d1a; text-decoration: none; transition: background .15s, color .15s; }
.blg-pagination .page-numbers.current,
.blg-pagination .page-numbers:hover { background: #3D3DE8; color: #fff; border-color: #3D3DE8; }

/* ============================================================
   PROJECTS HUB  (archive-ti_project.php — /projects/)
   ============================================================ */
.prj-stats { display: flex; gap: 0; background: #F7F7FE; border-radius: 16px; padding: 36px 48px; margin: 0 0 56px; flex-wrap: wrap; }
.prj-stat { flex: 1; text-align: center; min-width: 120px; }
.prj-stat strong { display: block; font-size: 2.2rem; font-weight: 900; color: #3D3DE8; line-height: 1; margin-bottom: 6px; }
.prj-stat span { font-size: .875rem; color: #6B6B80; font-weight: 500; }
.prj-stat-div { width: 1px; background: #DDDDF5; margin: 8px 0; }

.prj-section { margin-top: 0; }
.prj-grid { display: grid; grid-template-columns: repeat(3,1fr); gap: 28px; }
.prj-card { display: flex; flex-direction: column; background: #fff; border: 1.5px solid #EBEBF5; border-radius: 16px; overflow: hidden; text-decoration: none; color: inherit; transition: box-shadow .2s, border-color .2s, transform .2s; }
.prj-card:hover { box-shadow: 0 8px 32px rgba(61,61,232,.12); border-color: #3D3DE8; transform: translateY(-3px); }
.prj-img { height: 200px; background: linear-gradient(135deg,#3D3DE8 0%,#6060F8 100%); overflow: hidden; position: relative; flex-shrink: 0; }
.prj-img img { width: 100%; height: 100%; object-fit: cover; }
.prj-body { padding: 24px; flex: 1; display: flex; flex-direction: column; }
.prj-body h3 { font-size: 1rem; font-weight: 700; color: #0d0d1a; margin: 0 0 10px; line-height: 1.4; }
.prj-body p { font-size: .875rem; color: #6B6B80; line-height: 1.65; flex: 1; margin: 0 0 16px; }
.prj-foot { display: flex; justify-content: space-between; align-items: center; margin-top: auto; padding-top: 12px; border-top: 1px solid #F0F0F8; }
.prj-tag { display: inline-block; font-size: .75rem; font-weight: 700; color: #3D3DE8; background: #EEEEFF; padding: 4px 10px; border-radius: 99px; }
.prj-link { font-size: .85rem; font-weight: 700; color: #3D3DE8; white-space: nowrap; }
.prj-cta { background: linear-gradient(135deg,#2C2CE0 0%,#5C5CF0 100%); border-radius: 20px; padding: 56px 40px; text-align: center; color: #fff; margin-top: 72px; }
.prj-cta h2 { font-size: 2rem; font-weight: 800; margin: 0 0 14px; }
.prj-cta p { font-size: 1rem; opacity: .9; max-width: 520px; margin: 0 auto 28px; line-height: 1.7; }
.prj-cta-btns { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }
.prj-cta-btn-white { padding: 14px 32px; background: #fff; color: #2C2CE0; border-radius: 8px; font-weight: 700; text-decoration: none; font-size: .95rem; }
.prj-cta-btn-outline { padding: 14px 32px; background: transparent; color: #fff; border: 2px solid rgba(255,255,255,.6); border-radius: 8px; font-weight: 700; text-decoration: none; font-size: .95rem; }

/* Empty-state helpers */
.prj-empty { text-align: center; padding: 80px 24px; color: #6B6B80; }
.prj-empty a { color: #3D3DE8; font-weight: 600; }

@media (max-width: 900px) {
  .blg-grid, .prj-grid { grid-template-columns: repeat(2,1fr); }
  .prj-stats { padding: 28px 24px; }
}
@media (max-width: 600px) {
  .blg-grid, .prj-grid { grid-template-columns: 1fr; }
  .prj-cta { padding: 40px 24px; margin-top: 48px; }
  .prj-cta h2 { font-size: 1.5rem; }
}

/* ============================================================
   RTL GLOBAL
   ============================================================ */
[dir="rtl"] .ti-btn { flex-direction: row-reverse; }
[dir="rtl"] .ti-cta-banner { direction: rtl; }
[dir="rtl"] .ti-card { text-align: right; }
[dir="rtl"] .ti-step-card { text-align: right; }
[dir="rtl"] .ti-testimonial-author { flex-direction: row-reverse; }
[dir="rtl"] .ti-partners { flex-direction: row-reverse; }

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 768px) {
  .ti-cta-banner { padding: 48px 28px; }
  .ti-404-actions { flex-direction: column; align-items: center; }
}
