/*
Theme Name: Noor Prime
Theme URI: https://noorprimetrading.com
Author: Shahzad
Author URI: https://autonomoustech.ca
Description: Official WordPress theme for Noor Prime Trading & Services — a construction and maintenance contractor in Doha, Qatar. Elementor-compatible, bilingual (EN/AR), RTL-ready.
Version: 1.0.0
Requires at least: 6.0
Tested up to: 6.7
Requires PHP: 8.0
License: Proprietary
Text Domain: noor-prime
Tags: business, elementor, rtl-language, custom-colors, custom-menu, featured-images, footer-widgets, full-width-template, theme-options, translation-ready
*/

/* ============================================================
   CSS CUSTOM PROPERTIES
   ============================================================ */
:root {
  --primary:          #8A1538;
  --primary-dark:     #6b1029;
  --primary-light:    #a01a43;
  --accent:           #D4AF37;
  --accent-dark:      #b8961e;
  --accent-light:     #e8c84a;

  --background:       #F8F9FA;
  --foreground:       #2F2F2F;
  --card-bg:          #ffffff;
  --border-color:     #E0E0E0;
  --input-bg:         #ffffff;
  --muted:            #E0E0E0;
  --muted-fg:         #666666;

  --success:          #27AE60;
  --destructive:      #E74C3C;
  --warning:          #E67E22;

  --sidebar-bg:       #2F2F2F;
  --sidebar-text:     #ffffff;

  --radius:           6px;
  --radius-sm:        4px;
  --radius-lg:        8px;

  --font-body:        'Open Sans', sans-serif;
  --font-heading:     'Montserrat', sans-serif;
  --font-arabic:      'Cairo', 'Almarai', sans-serif;

  --shadow-subtle:    0 2px 8px rgba(0,0,0,0.08);
  --shadow-medium:    0 4px 12px rgba(0,0,0,0.12);
  --shadow-hover:     0 8px 16px rgba(0,0,0,0.15);

  --transition:       all 0.3s ease;
  --container-max:    1400px;
}

/* ============================================================
   DARK MODE
   ============================================================ */
[data-theme="dark"] {
  --background:     #1a1a1a;
  --foreground:     #f2f2f2;
  --card-bg:        #212121;
  --border-color:   #333333;
  --input-bg:       #333333;
  --muted:          #333333;
  --muted-fg:       #999999;
}

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

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  background-color: var(--background);
  color: var(--foreground);
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* RTL body */
body.rtl,
html[dir="rtl"] body {
  direction: rtl;
  text-align: right;
  font-family: var(--font-arabic);
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: var(--primary);
  text-decoration: none;
  transition: var(--transition);
}

a:hover {
  color: var(--accent);
}

ul, ol {
  list-style: none;
}

/* ============================================================
   TYPOGRAPHY
   ============================================================ */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  font-weight: 700;
  line-height: 1.2;
  color: var(--foreground);
}

html[dir="rtl"] h1,
html[dir="rtl"] h2,
html[dir="rtl"] h3,
html[dir="rtl"] h4,
html[dir="rtl"] h5,
html[dir="rtl"] h6 {
  font-family: var(--font-arabic);
}

h1 { font-size: clamp(2.25rem, 5vw, 3.5rem); letter-spacing: 0.5px; }
h2 { font-size: clamp(1.75rem, 4vw, 2.5rem); letter-spacing: 0.3px; }
h3 { font-size: clamp(1.25rem, 3vw, 1.75rem); letter-spacing: 0.2px; }
h4 { font-size: 1.25rem; }
h5 { font-size: 1.1rem; }
h6 { font-size: 1rem; }

p {
  margin-bottom: 1rem;
  line-height: 1.7;
}

p:last-child {
  margin-bottom: 0;
}

strong { font-weight: 600; }

small { font-size: 0.875rem; line-height: 1.5; }

/* ============================================================
   LAYOUT
   ============================================================ */
.npt-container {
  width: 100%;
  max-width: var(--container-max);
  margin-left: auto;
  margin-right: auto;
  padding-left: 1.5rem;
  padding-right: 1.5rem;
}

@media (min-width: 768px) {
  .npt-container {
    padding-left: 2rem;
    padding-right: 2rem;
  }
}

.section-padding {
  padding-top: 3rem;
  padding-bottom: 3rem;
}

@media (min-width: 768px) {
  .section-padding {
    padding-top: 5rem;
    padding-bottom: 5rem;
  }
}

/* ============================================================
   BUTTONS
   ============================================================ */
.btn-corporate {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background-color: var(--accent);
  color: #ffffff;
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 0.875rem;
  padding: 0.625rem 1.25rem;
  border-radius: var(--radius-sm);
  border: 2px solid transparent;
  cursor: pointer;
  transition: var(--transition);
  text-decoration: none;
  white-space: nowrap;
  line-height: 1;
}

@media (min-width: 768px) {
  .btn-corporate {
    font-size: 1rem;
    padding: 0.75rem 1.5rem;
    border-radius: var(--radius);
  }
}

.btn-corporate:hover {
  background-color: var(--accent-dark);
  color: #ffffff;
  box-shadow: var(--shadow-hover);
  transform: translateY(-1px);
}

.btn-corporate:active {
  transform: scale(0.98);
}

.btn-corporate-outline {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background-color: transparent;
  color: var(--primary);
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 0.875rem;
  padding: 0.625rem 1.25rem;
  border-radius: var(--radius-sm);
  border: 2px solid var(--primary);
  cursor: pointer;
  transition: var(--transition);
  text-decoration: none;
}

@media (min-width: 768px) {
  .btn-corporate-outline {
    font-size: 1rem;
    padding: 0.75rem 1.5rem;
    border-radius: var(--radius);
  }
}

.btn-corporate-outline:hover {
  background-color: var(--primary);
  color: #ffffff;
}

.btn-white {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background-color: #ffffff;
  color: var(--primary);
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 1rem;
  padding: 0.75rem 1.5rem;
  border-radius: var(--radius);
  border: 2px solid #ffffff;
  cursor: pointer;
  transition: var(--transition);
  text-decoration: none;
}

.btn-white:hover {
  background-color: transparent;
  color: #ffffff;
}

/* ============================================================
   CARDS
   ============================================================ */
.card-corporate {
  background-color: var(--card-bg);
  border-radius: var(--radius);
  padding: 1.5rem;
  box-shadow: var(--shadow-subtle);
  transition: var(--transition);
}

@media (min-width: 768px) {
  .card-corporate {
    border-radius: var(--radius-lg);
    padding: 2rem;
  }
}

.card-corporate:hover {
  box-shadow: var(--shadow-hover);
  transform: translateY(-4px);
}

/* ============================================================
   FORM INPUTS
   ============================================================ */
.input-corporate {
  width: 100%;
  background-color: var(--input-bg);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  padding: 0.75rem 1rem;
  color: var(--foreground);
  font-family: var(--font-body);
  font-size: 1rem;
  transition: var(--transition);
  outline: none;
}

@media (min-width: 768px) {
  .input-corporate {
    border-radius: var(--radius);
  }
}

.input-corporate::placeholder {
  color: var(--muted-fg);
}

.input-corporate:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(138, 21, 56, 0.15);
}

/* ============================================================
   SHADOWS
   ============================================================ */
.shadow-subtle { box-shadow: var(--shadow-subtle); }
.shadow-medium { box-shadow: var(--shadow-medium); }
.shadow-hover  { box-shadow: var(--shadow-hover); }

/* ============================================================
   SCROLL REVEAL ANIMATION
   ============================================================ */
.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ============================================================
   SECTION HEADERS
   ============================================================ */
.section-header {
  text-align: center;
  margin-bottom: 3rem;
}

.section-label {
  display: inline-block;
  font-family: var(--font-heading);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 0.75rem;
}

.section-title {
  color: var(--primary);
  margin-bottom: 1rem;
}

.section-subtitle {
  font-size: 1.125rem;
  color: var(--muted-fg);
  max-width: 600px;
  margin: 0 auto;
}

/* ============================================================
   HERO SECTIONS
   ============================================================ */
.page-hero {
  position: relative;
  background-color: var(--primary);
  color: #ffffff;
  padding: 4rem 0 3rem;
  overflow: hidden;
}

.page-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
  opacity: 0.95;
}

.page-hero .npt-container {
  position: relative;
  z-index: 1;
}

.page-hero h1 {
  color: #ffffff;
  margin-bottom: 1rem;
}

.page-hero p {
  color: rgba(255,255,255,0.85);
  font-size: 1.125rem;
  max-width: 600px;
}

/* ============================================================
   BREADCRUMBS
   ============================================================ */
.breadcrumb {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.5rem;
  font-size: 0.875rem;
  color: rgba(255,255,255,0.7);
  margin-bottom: 1rem;
}

.breadcrumb a {
  color: rgba(255,255,255,0.8);
  text-decoration: none;
}

.breadcrumb a:hover {
  color: var(--accent);
}

.breadcrumb .sep {
  color: rgba(255,255,255,0.5);
}

.breadcrumb .current {
  color: var(--accent);
}

/* ============================================================
   GRID UTILITIES
   ============================================================ */
.grid-2 {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
}

.grid-3 {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
}

.grid-4 {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
}

@media (min-width: 640px) {
  .grid-2 { grid-template-columns: repeat(2, 1fr); }
  .grid-3 { grid-template-columns: repeat(2, 1fr); }
}

@media (min-width: 1024px) {
  .grid-2 { grid-template-columns: repeat(2, 1fr); }
  .grid-3 { grid-template-columns: repeat(3, 1fr); }
  .grid-4 { grid-template-columns: repeat(4, 1fr); }
}

/* ============================================================
   BADGE
   ============================================================ */
.badge {
  display: inline-block;
  background-color: var(--accent);
  color: #ffffff;
  font-size: 0.75rem;
  font-weight: 600;
  padding: 0.25rem 0.625rem;
  border-radius: 999px;
  letter-spacing: 0.5px;
}

.badge-primary {
  background-color: var(--primary);
}

.badge-outline {
  background-color: transparent;
  color: var(--primary);
  border: 1px solid var(--primary);
}

/* ============================================================
   DIVIDER
   ============================================================ */
.gold-divider {
  width: 64px;
  height: 4px;
  background-color: var(--accent);
  border-radius: 2px;
  margin: 1rem 0;
}

.gold-divider.center {
  margin: 1rem auto;
}

/* ============================================================
   RTL UTILITIES
   ============================================================ */
html[dir="rtl"] .rtl-mirror {
  transform: scaleX(-1);
}

/* ============================================================
   ACCESSIBILITY
   ============================================================ */
:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 2px;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  white-space: nowrap;
  border-width: 0;
}

/* ============================================================
   WORDPRESS CORE STYLES COMPATIBILITY
   ============================================================ */
.alignnone  { margin: 0.5rem 1rem 0.5rem 0; }
.aligncenter { display: block; margin: 0.5rem auto; }
.alignright { float: right; margin: 0.5rem 0 0.5rem 1rem; }
.alignleft  { float: left; margin: 0.5rem 1rem 0.5rem 0; }

.wp-caption { max-width: 100%; }
.wp-caption-text { font-size: 0.875rem; color: var(--muted-fg); text-align: center; }

.sticky { /* WordPress sticky post */ }
.gallery-caption { }
.bypostauthor { }

/* Gutenberg alignment */
.wp-block-image img { border-radius: var(--radius); }
