/*
Theme Name: NessLek 360°
Theme URI: https://nesslek.com.tn
Author: NessLek 360° Engineering Team
Author URI: https://nesslek.com.tn
Description: Custom child theme for NessLek 360° - engineered for premium brand positioning across 6 languages. Built on Astra parent theme.
Template: astra
Version: 1.0.0
License: Proprietary
Text Domain: nesslek
Tags: business, agency, multilingual, rtl-language-support
*/

/* ==========================================================================
   NESSLEK 360° — CUSTOM CHILD THEME
   ========================================================================== */

/* ==========================================================================
   1. BRAND TOKENS — CSS Variables
   ========================================================================== */
:root {
  /* Primary palette */
  --nl-navy:          #02133e;
  --nl-navy-deep:     #010b27;
  --nl-navy-light:    #1a2954;
  --nl-gold:          #e6a817;
  --nl-gold-bright:   #f0b832;
  --nl-gold-dark:     #c48f0f;
  --nl-red:           #990a09;
  --nl-white:         #ffffff;
  --nl-black:         #0a0a0a;

  /* Neutrals */
  --nl-grey-50:       #f8f9fb;
  --nl-grey-100:      #eef0f4;
  --nl-grey-200:      #d8dce5;
  --nl-grey-400:      #8b94a8;
  --nl-grey-600:      #4a5266;
  --nl-grey-900:      #1a1f2e;

  /* Typography */
  --nl-font-heading:  'Poppins', 'Segoe UI', -apple-system, sans-serif;
  --nl-font-body:     'Montserrat', 'Helvetica Neue', Arial, sans-serif;
  --nl-font-arabic:   'Tajawal', 'Cairo', 'Amiri', sans-serif;
  --nl-font-cjk:      'Noto Sans SC', 'PingFang SC', 'Microsoft YaHei', sans-serif;
  --nl-font-devanagari: 'Noto Sans Devanagari', 'Mukta', sans-serif;
  --nl-font-cyrillic: 'Montserrat', 'PT Sans', sans-serif;

  /* Spacing scale */
  --nl-space-xs:  0.5rem;
  --nl-space-sm:  1rem;
  --nl-space-md:  2rem;
  --nl-space-lg:  4rem;
  --nl-space-xl:  6rem;
  --nl-space-2xl: 10rem;

  /* Layout */
  --nl-container-max: 1280px;
  --nl-container-narrow: 880px;

  /* Effects */
  --nl-radius-sm: 4px;
  --nl-radius-md: 8px;
  --nl-radius-lg: 16px;
  --nl-shadow-sm:   0 2px 8px rgba(2, 19, 62, 0.06);
  --nl-shadow-md:   0 8px 24px rgba(2, 19, 62, 0.10);
  --nl-shadow-lg:   0 24px 64px rgba(2, 19, 62, 0.18);
  --nl-shadow-gold: 0 8px 32px rgba(230, 168, 23, 0.35);

  /* Transitions */
  --nl-ease:      cubic-bezier(0.4, 0, 0.2, 1);
  --nl-ease-out:  cubic-bezier(0.16, 1, 0.3, 1);
  --nl-duration:  0.3s;
}

/* ==========================================================================
   2. FONT IMPORTS
   ========================================================================== */
@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700;800;900&family=Montserrat:wght@300;400;500;600;700&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Tajawal:wght@300;400;500;700;900&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Noto+Sans+SC:wght@300;400;500;700;900&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Noto+Sans+Devanagari:wght@400;500;700&display=swap');

/* ==========================================================================
   3. WORDPRESS BLOCK EDITOR COLOR PALETTE INTEGRATION
   ========================================================================== */
.has-midnight-navy-color           { color: var(--nl-navy) !important; }
.has-midnight-navy-background-color{ background-color: var(--nl-navy) !important; }
.has-vivid-amber-color             { color: var(--nl-gold) !important; }
.has-vivid-amber-background-color  { background-color: var(--nl-gold) !important; }
.has-nesslek-red-color             { color: var(--nl-red) !important; }
.has-nesslek-red-background-color  { background-color: var(--nl-red) !important; }

/* ==========================================================================
   4. BASE TYPOGRAPHY
   ========================================================================== */
body {
  font-family: var(--nl-font-body);
  color: var(--nl-grey-900);
  line-height: 1.65;
  font-weight: 400;
  background-color: var(--nl-white);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

h1, h2, h3, h4, h5, h6,
.entry-title,
.site-title {
  font-family: var(--nl-font-heading);
  font-weight: 700;
  color: var(--nl-navy);
  line-height: 1.15;
  letter-spacing: -0.02em;
  margin-bottom: var(--nl-space-sm);
}

h1 { font-size: clamp(2.5rem, 5vw, 4.5rem); font-weight: 800; }
h2 { font-size: clamp(2rem, 4vw, 3rem);   font-weight: 700; }
h3 { font-size: clamp(1.5rem, 3vw, 2.25rem); }
h4 { font-size: clamp(1.25rem, 2vw, 1.5rem); }
h5 { font-size: 1.25rem; }
h6 { font-size: 1rem; text-transform: uppercase; letter-spacing: 0.1em; }

p { margin-bottom: 1rem; }

a {
  color: var(--nl-navy);
  text-decoration: none;
  transition: color var(--nl-duration) var(--nl-ease);
  border-bottom: 1px solid transparent;
}
a:hover {
  color: var(--nl-gold);
  border-bottom-color: var(--nl-gold);
}

/* Selection */
::selection { background-color: var(--nl-gold); color: var(--nl-navy); }

/* ==========================================================================
   5. LANGUAGE-SPECIFIC TYPOGRAPHY
   ========================================================================== */
html[lang^="ar"] body,
html[lang^="ar"] h1,
html[lang^="ar"] h2,
html[lang^="ar"] h3,
html[lang^="ar"] h4 {
  font-family: var(--nl-font-arabic);
  letter-spacing: 0;
}

html[lang^="zh"] body,
html[lang^="zh"] h1,
html[lang^="zh"] h2,
html[lang^="zh"] h3,
html[lang^="zh"] h4 {
  font-family: var(--nl-font-cjk);
  letter-spacing: 0;
}

html[lang^="hi"] body,
html[lang^="hi"] h1,
html[lang^="hi"] h2,
html[lang^="hi"] h3,
html[lang^="hi"] h4 {
  font-family: var(--nl-font-devanagari);
  letter-spacing: 0;
}

/* ==========================================================================
   6. RTL — ARABIC SUPPORT
   ========================================================================== */
html[dir="rtl"] body { text-align: right; }
html[dir="rtl"] .wp-block-columns { flex-direction: row-reverse; }
html[dir="rtl"] .wp-block-buttons { justify-content: flex-end; }
html[dir="rtl"] .wp-block-button__link { direction: rtl; }
html[dir="rtl"] .nesslek-hero { text-align: center; }
html[dir="rtl"] ul, html[dir="rtl"] ol { padding-right: 1.5rem; padding-left: 0; }

/* Keep brand names, phone numbers, emails LTR inside RTL pages */
html[dir="rtl"] .ltr-content,
html[dir="rtl"] a[href^="tel:"],
html[dir="rtl"] a[href^="mailto:"],
html[dir="rtl"] code {
  direction: ltr;
  display: inline-block;
  unicode-bidi: embed;
}

/* ==========================================================================
   7. BUTTONS
   ========================================================================== */
.wp-block-button__link,
.button,
button[type="submit"],
input[type="submit"] {
  font-family: var(--nl-font-heading);
  font-weight: 600;
  font-size: 1rem;
  letter-spacing: 0.02em;
  padding: 1rem 2.25rem;
  border-radius: var(--nl-radius-sm);
  text-transform: none;
  transition: all var(--nl-duration) var(--nl-ease);
  border: 2px solid transparent;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  text-decoration: none;
}

.wp-block-button__link {
  background-color: var(--nl-gold);
  color: var(--nl-navy);
}
.wp-block-button__link:hover {
  background-color: var(--nl-gold-bright);
  transform: translateY(-2px);
  box-shadow: var(--nl-shadow-gold);
  color: var(--nl-navy);
  border-bottom-color: transparent;
}

.wp-block-button.is-style-outline .wp-block-button__link {
  background-color: transparent;
  border: 2px solid currentColor;
}
.wp-block-button.is-style-outline .wp-block-button__link:hover {
  background-color: var(--nl-gold);
  border-color: var(--nl-gold);
  color: var(--nl-navy);
}

.nesslek-cta-primary .wp-block-button__link {
  background: linear-gradient(135deg, var(--nl-gold) 0%, var(--nl-gold-dark) 100%);
  color: var(--nl-navy);
  padding: 1.15rem 2.5rem;
  font-size: 1.05rem;
}

/* ==========================================================================
   8. HEADER + NAVIGATION
   ========================================================================== */
.site-header {
  background: var(--nl-white);
  box-shadow: var(--nl-shadow-sm);
  padding: 1rem 0;
  position: sticky;
  top: 0;
  z-index: 1000;
}

.site-header.scrolled {
  padding: 0.5rem 0;
  box-shadow: var(--nl-shadow-md);
}

.main-navigation a {
  font-family: var(--nl-font-heading);
  font-weight: 500;
  font-size: 0.95rem;
  color: var(--nl-navy) !important;
  letter-spacing: 0.01em;
  padding: 0.5rem 1rem;
  border-bottom: 2px solid transparent;
}

.main-navigation a:hover,
.main-navigation .current-menu-item > a {
  color: var(--nl-gold) !important;
  border-bottom-color: var(--nl-gold);
}

/* Submenu */
.main-navigation .sub-menu {
  background: var(--nl-navy);
  border-radius: var(--nl-radius-md);
  box-shadow: var(--nl-shadow-lg);
  min-width: 280px;
  padding: 0.5rem 0;
}
.main-navigation .sub-menu a {
  color: var(--nl-white) !important;
  padding: 0.75rem 1.5rem;
}
.main-navigation .sub-menu a:hover {
  color: var(--nl-gold) !important;
  background: var(--nl-navy-deep);
  border-bottom-color: transparent;
}

/* ==========================================================================
   9. HERO SECTION
   ========================================================================== */
.nesslek-hero {
  background: linear-gradient(135deg, var(--nl-navy) 0%, var(--nl-navy-deep) 100%) !important;
  position: relative;
  overflow: hidden;
  padding: 6rem 0;
}

.nesslek-hero::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -10%;
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, rgba(230, 168, 23, 0.15) 0%, transparent 70%);
  filter: blur(80px);
  pointer-events: none;
  animation: nesslek-float 12s ease-in-out infinite;
}

@keyframes nesslek-float {
  0%, 100% { transform: translate(0, 0) scale(1); }
  50%      { transform: translate(-30px, 30px) scale(1.1); }
}

.nesslek-hero h1 {
  color: var(--nl-white) !important;
  font-size: clamp(2.5rem, 6vw, 5rem);
  font-weight: 800;
  margin-bottom: 1.5rem;
  position: relative;
}

.nesslek-hero h1 strong,
.nesslek-hero h1 em {
  color: var(--nl-gold);
  font-style: normal;
}

/* ==========================================================================
   10. PILLARS SECTION
   ========================================================================== */
.nesslek-pillars {
  padding: var(--nl-space-xl) 0 !important;
  position: relative;
}

.nesslek-pillars .wp-block-column {
  padding: 2.5rem 2rem;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(230, 168, 23, 0.15);
  border-radius: var(--nl-radius-lg);
  transition: all 0.4s var(--nl-ease-out);
  position: relative;
  overflow: hidden;
}

.nesslek-pillars .wp-block-column::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 4px;
  height: 100%;
  background: var(--nl-gold);
  transform: scaleY(0);
  transform-origin: top;
  transition: transform 0.4s var(--nl-ease-out);
}

.nesslek-pillars .wp-block-column:hover {
  background: rgba(255, 255, 255, 0.06);
  border-color: var(--nl-gold);
  transform: translateY(-4px);
}

.nesslek-pillars .wp-block-column:hover::before {
  transform: scaleY(1);
}

.nesslek-pillars h3 {
  font-size: 5rem !important;
  font-weight: 800 !important;
  line-height: 1;
  color: var(--nl-gold) !important;
  margin-bottom: 1rem;
  font-family: var(--nl-font-heading);
}

.nesslek-pillars h4 {
  color: var(--nl-white) !important;
  font-size: 1.35rem;
  margin-bottom: 1rem;
}

.nesslek-pillars p {
  color: rgba(255, 255, 255, 0.85);
  font-size: 0.95rem;
}

.nesslek-pillars a {
  color: var(--nl-gold);
  font-weight: 600;
  border-bottom: none;
}
.nesslek-pillars a:hover { color: var(--nl-gold-bright); }

/* ==========================================================================
   11. WHY US SECTION
   ========================================================================== */
.nesslek-why {
  padding: var(--nl-space-xl) 0;
  background: var(--nl-grey-50);
}

.nesslek-why h4 {
  color: var(--nl-navy);
  position: relative;
  padding-bottom: 0.75rem;
  margin-bottom: 1rem;
}

.nesslek-why h4::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 32px;
  height: 3px;
  background: var(--nl-gold);
}

html[dir="rtl"] .nesslek-why h4::after { left: auto; right: 0; }

/* ==========================================================================
   12. VISNESS SECTION
   ========================================================================== */
.nesslek-visness {
  background: linear-gradient(135deg, var(--nl-navy-deep) 0%, var(--nl-navy) 50%, var(--nl-navy-light) 100%) !important;
  padding: var(--nl-space-xl) 0 !important;
  position: relative;
  overflow: hidden;
}

.nesslek-visness::before {
  content: 'VISNESS';
  position: absolute;
  font-size: 18rem;
  font-weight: 900;
  color: rgba(230, 168, 23, 0.04);
  letter-spacing: -0.05em;
  bottom: -3rem;
  right: -2rem;
  pointer-events: none;
  font-family: var(--nl-font-heading);
}

.nesslek-visness h2 {
  font-size: clamp(2rem, 4vw, 3.5rem) !important;
  font-weight: 800;
}

/* ==========================================================================
   13. PACK CARDS
   ========================================================================== */
.nesslek-packs { padding: var(--nl-space-xl) 0; background: var(--nl-grey-50); }

.nesslek-pack-grid { gap: 1.5rem; }

.nesslek-pack-grid .wp-block-column {
  background: var(--nl-white);
  padding: 2.5rem 1.75rem;
  border-radius: var(--nl-radius-lg);
  box-shadow: var(--nl-shadow-sm);
  border: 1px solid var(--nl-grey-100);
  transition: all 0.4s var(--nl-ease-out);
  position: relative;
}

.nesslek-pack-grid .wp-block-column:hover {
  transform: translateY(-8px);
  box-shadow: var(--nl-shadow-lg);
  border-color: var(--nl-gold);
}

.nesslek-pack-popular {
  border: 2px solid var(--nl-gold) !important;
  transform: scale(1.05);
  box-shadow: var(--nl-shadow-md);
  background: linear-gradient(180deg, var(--nl-white) 0%, #fffaf0 100%) !important;
}

.nesslek-pack-value {
  border: 2px solid var(--nl-navy) !important;
}

.nesslek-pack-apex {
  background: linear-gradient(180deg, var(--nl-navy) 0%, var(--nl-navy-deep) 100%) !important;
  color: var(--nl-white);
}
.nesslek-pack-apex h3,
.nesslek-pack-apex h2 { color: var(--nl-white) !important; }
.nesslek-pack-apex p, .nesslek-pack-apex li { color: rgba(255, 255, 255, 0.9); }
.nesslek-pack-apex ul { list-style: none; padding: 0; }
.nesslek-pack-apex li::before {
  content: '◆ ';
  color: var(--nl-gold);
  font-weight: bold;
}

.nesslek-pack-grid ul {
  list-style: none;
  padding: 0;
  margin: 1.5rem 0;
}
.nesslek-pack-grid li {
  padding: 0.5rem 0;
  border-bottom: 1px solid var(--nl-grey-100);
  font-size: 0.9rem;
}
.nesslek-pack-grid li::before {
  content: '✓ ';
  color: var(--nl-gold);
  font-weight: bold;
  margin-right: 0.4rem;
}

/* ==========================================================================
   14. FOUNDERS SECTION
   ========================================================================== */
.nesslek-founders {
  padding: var(--nl-space-xl) 0;
  background: var(--nl-grey-50);
}

.nesslek-pull-quote {
  font-family: var(--nl-font-heading);
  font-size: clamp(1.5rem, 3vw, 2.25rem);
  font-style: italic;
  font-weight: 500;
  color: var(--nl-navy);
  max-width: 900px;
  margin: 0 auto;
  line-height: 1.4;
  position: relative;
  padding: 2rem;
}

.nesslek-pull-quote::before {
  content: '"';
  position: absolute;
  top: -2rem;
  left: -1rem;
  font-size: 8rem;
  color: var(--nl-gold);
  font-family: Georgia, serif;
  line-height: 1;
  opacity: 0.4;
}

.nesslek-pull-quote cite {
  display: block;
  margin-top: 1.5rem;
  font-size: 1rem;
  font-style: normal;
  font-weight: 600;
  color: var(--nl-gold-dark);
  font-family: var(--nl-font-body);
}

.nesslek-founder-photo img {
  border-radius: var(--nl-radius-lg);
  box-shadow: var(--nl-shadow-md);
  border: 4px solid var(--nl-gold);
  max-width: 320px;
}

/* ==========================================================================
   15. FINAL CTA SECTION
   ========================================================================== */
.nesslek-final-cta {
  padding: var(--nl-space-xl) 0 !important;
  background: linear-gradient(135deg, var(--nl-navy) 0%, var(--nl-navy-deep) 100%) !important;
  position: relative;
  overflow: hidden;
}

.nesslek-final-cta::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 800px;
  height: 800px;
  background: radial-gradient(circle, rgba(230, 168, 23, 0.1) 0%, transparent 60%);
  transform: translate(-50%, -50%);
  filter: blur(60px);
}

.nesslek-final-cta h2 {
  font-size: clamp(2rem, 5vw, 4rem) !important;
  margin-bottom: 1.5rem;
}

/* ==========================================================================
   16. TRUST STRIP
   ========================================================================== */
.nesslek-trust-strip {
  padding: 3rem 0;
  background: var(--nl-white);
}

.nesslek-trust-strip h6 {
  color: var(--nl-grey-400);
  font-size: 0.75rem;
  margin-bottom: 2rem;
}

/* ==========================================================================
   17. FORMS (WPFORMS)
   ========================================================================== */
.wpforms-field-label,
label {
  font-family: var(--nl-font-heading);
  font-weight: 500;
  color: var(--nl-navy);
  margin-bottom: 0.5rem;
  display: block;
}

input[type="text"],
input[type="email"],
input[type="tel"],
input[type="number"],
input[type="url"],
textarea,
select {
  font-family: var(--nl-font-body);
  border: 2px solid var(--nl-grey-200);
  border-radius: var(--nl-radius-sm);
  padding: 0.85rem 1rem;
  font-size: 1rem;
  width: 100%;
  background: var(--nl-white);
  transition: border-color var(--nl-duration) var(--nl-ease);
}

input:focus, textarea:focus, select:focus {
  outline: none;
  border-color: var(--nl-gold);
  box-shadow: 0 0 0 4px rgba(230, 168, 23, 0.15);
}

/* ==========================================================================
   18. FOOTER
   ========================================================================== */
.site-footer {
  background: var(--nl-navy-deep) !important;
  color: var(--nl-grey-200);
  padding: var(--nl-space-lg) 0 var(--nl-space-sm);
}

.site-footer h3, .site-footer h4 {
  color: var(--nl-gold) !important;
  font-size: 1rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 1.5rem;
}

.site-footer a {
  color: var(--nl-grey-200);
  border-bottom: none;
  font-size: 0.95rem;
  display: inline-block;
  padding: 0.25rem 0;
}
.site-footer a:hover { color: var(--nl-gold); }

.site-footer .footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  margin-top: var(--nl-space-md);
  padding-top: var(--nl-space-sm);
  text-align: center;
  font-size: 0.85rem;
  color: var(--nl-grey-400);
}

/* ==========================================================================
   19. LANGUAGE SWITCHER (Polylang)
   ========================================================================== */
.lang-item a,
.pll-parent-menu-item > a {
  font-size: 0.85rem !important;
  padding: 0.4rem 0.75rem !important;
  text-transform: uppercase;
  font-weight: 600;
  letter-spacing: 0.05em;
}

.lang-item.current-lang a {
  color: var(--nl-gold) !important;
  background: rgba(230, 168, 23, 0.1);
  border-radius: var(--nl-radius-sm);
}

/* ==========================================================================
   20. WHATSAPP FLOATING BUTTON (Click to Chat plugin)
   ========================================================================== */
.ht-ctc-chat {
  background: linear-gradient(135deg, #25D366 0%, #128C7E 100%) !important;
  box-shadow: 0 8px 24px rgba(37, 211, 102, 0.4) !important;
  width: 60px !important;
  height: 60px !important;
}

.ht-ctc-chat:hover {
  transform: scale(1.1) translateY(-2px);
  box-shadow: 0 12px 32px rgba(37, 211, 102, 0.5) !important;
}

/* ==========================================================================
   21. BLOG / INSIGHTS POSTS
   ========================================================================== */
.entry-meta {
  font-family: var(--nl-font-heading);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-size: 0.8rem;
  color: var(--nl-grey-400);
}

.entry-title { color: var(--nl-navy); }
.entry-title a { color: inherit; border-bottom: none; }
.entry-title a:hover { color: var(--nl-gold); }

article.post {
  padding: var(--nl-space-md) 0;
  border-bottom: 1px solid var(--nl-grey-100);
}

/* ==========================================================================
   22. UTILITY CLASSES
   ========================================================================== */
.nesslek-gradient-text {
  background: linear-gradient(135deg, var(--nl-gold) 0%, var(--nl-gold-bright) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.nesslek-divider {
  height: 1px;
  background: linear-gradient(90deg, transparent 0%, var(--nl-gold) 50%, transparent 100%);
  margin: var(--nl-space-md) 0;
  border: none;
}

/* ==========================================================================
   23. RESPONSIVE BREAKPOINTS
   ========================================================================== */
@media (max-width: 1024px) {
  :root { --nl-space-xl: 4rem; }
  .nesslek-pack-popular { transform: none; }
}

@media (max-width: 768px) {
  :root { --nl-space-xl: 3rem; --nl-space-lg: 2.5rem; }
  h1 { font-size: 2.5rem !important; }
  h2 { font-size: 1.85rem !important; }
  .nesslek-pillars h3 { font-size: 3.5rem !important; }
  .wp-block-columns { flex-direction: column !important; }
  .wp-block-button__link { width: 100%; justify-content: center; }
}

/* ==========================================================================
   24. PRINT STYLES (for executive printouts)
   ========================================================================== */
@media print {
  .site-header, .site-footer, .nesslek-final-cta, .ht-ctc-chat { display: none; }
  body { color: black; background: white; }
  a { color: black; }
}

/* ==========================================================================
   25. ACCESSIBILITY — Focus indicators
   ========================================================================== */
:focus-visible {
  outline: 3px solid var(--nl-gold);
  outline-offset: 3px;
  border-radius: var(--nl-radius-sm);
}

.skip-link:focus {
  background: var(--nl-gold);
  color: var(--nl-navy);
  font-weight: 600;
  padding: 1rem 2rem;
  position: absolute;
  top: 1rem;
  left: 1rem;
  z-index: 9999;
}

/* ==========================================================================
   END OF NESSLEK 360° CHILD THEME
   ========================================================================== */
