/*
Theme Name: Fahad Almansour Consultant Office
Theme URI: https://fahadalmansourconsulting.com
Description: مكتب فهد المنصور للاستشارات - IT Consulting WordPress theme with bilingual AR/EN support (Arabic-first)
Version: 2.0.0
Author: Fahad Almansour Consultant Office
Author URI: https://fahadalmansourconsulting.com
Text Domain: fsc
Requires at least: 6.0
Tested up to: 6.4
Requires PHP: 8.0
License: Proprietary
*/

/* ========================================
   CSS Variables (Design Tokens)
   ======================================== */
:root {
    /* White Premium Theme Colors - Updated Brand Palette */
    --bg-primary: #FFFFFF;
    --bg-section: #F8FAFC;
    --text-primary: #0F172A;
    --text-muted: #64748B;
    --border: #E2E8F0;
    --accent: #0F172A;
    --accent-hover: #1E293B;
    --success: #059669;

    /* Legacy aliases for compatibility */
    --bg: var(--bg-primary);
    --bg-soft: var(--bg-section);
    --text: var(--text-primary);
    --muted: var(--text-muted);

    /* Primary Accent - Deep Navy */
    --navy: #0F172A;
    --navy-2: #1E293B;
    --green: #059669;

    /* Slate Color Palette (legacy compatibility) */
    --slate-50: #F8FAFC;
    --slate-100: #F1F5F9;
    --slate-200: #E2E8F0;
    --slate-300: #cbd5e1;
    --slate-400: #94a3b8;
    --slate-500: #516077;
    --slate-600: #475569;
    --slate-700: #334155;
    --slate-800: #1E293B;
    --slate-900: #0F172A;
    --slate-950: #020617;

    /* Brand Colors - Updated */
    --brand-navy-dark: #0F172A;
    --brand-navy-mid: #1E293B;
    --brand-slate-dark: #334155;
    --brand-slate-mid: #64748B;
    --brand-slate-light: #94A3B8;
    --brand-white-soft: #F8FAFC;

    /* Semantic Colors */
    --bg-secondary: var(--bg-section);
    --text-secondary: var(--text-muted);
    --border-color: var(--border);
    --border-color-dark: var(--slate-300);

    /* Button Colors */
    --btn-primary-bg: var(--accent);
    --btn-primary-text: #ffffff;
    --btn-primary-hover: var(--accent-hover);
    --btn-secondary-bg: #ffffff;
    --btn-secondary-text: var(--text-primary);
    --btn-secondary-border: var(--border);

    /* Spacing Scale */
    --space-1: 0.25rem;
    --space-2: 0.5rem;
    --space-3: 0.75rem;
    --space-4: 1rem;
    --space-5: 1.25rem;
    --space-6: 1.5rem;
    --space-8: 2rem;
    --space-10: 2.5rem;
    --space-12: 3rem;
    --space-16: 4rem;
    --space-20: 5rem;

    /* Border Radius */
    --radius-sm: 0.375rem;
    --radius-md: 0.5rem;
    --radius-lg: 0.75rem;
    --radius-xl: 1rem;
    --radius-2xl: 1.5rem;
    --radius-3xl: 1.5rem;
    --radius-full: 9999px;
    --radius: 16px;

    /* Premium Shadows - Apple-style subtle */
    --shadow-sm: 0 1px 3px rgba(15, 23, 42, 0.04);
    --shadow-md: 0 4px 12px rgba(15, 23, 42, 0.06);
    --shadow-lg: 0 12px 24px rgba(15, 23, 42, 0.08);
    --shadow-xl: 0 20px 40px rgba(15, 23, 42, 0.10);

    /* Container */
    --container-max: 1280px;

    /* Transitions */
    --transition-fast: 150ms ease;
    --transition-base: 200ms ease;
    --transition-slow: 300ms ease;
}

/* ========================================
   Base Styles & Reset
   ======================================== */
*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    font-family: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    color: var(--text-primary);
    background-color: var(--bg-primary);
    line-height: 1.6;
    margin: 0;
    padding: 0;
}

/* RTL Arabic Font */
[dir="rtl"] body {
    font-family: 'Tajawal', 'Inter', system-ui, sans-serif;
}

/* Global Focus States - Accessibility */
:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 3px;
}

:focus:not(:focus-visible) {
    outline: none;
}

a {
    color: inherit;
    text-decoration: none;
}

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

/* ========================================
   Layout Utilities
   ======================================== */
.min-h-screen { min-height: 100vh; }
.max-w-7xl { max-width: 80rem; margin-left: auto; margin-right: auto; }
.max-w-5xl { max-width: 64rem; margin-left: auto; margin-right: auto; }
.max-w-4xl { max-width: 56rem; margin-left: auto; margin-right: auto; }
.max-w-3xl { max-width: 48rem; margin-left: auto; margin-right: auto; }
.max-w-2xl { max-width: 42rem; margin-left: auto; margin-right: auto; }
.max-w-md { max-width: 28rem; }
.mx-auto { margin-left: auto; margin-right: auto; }

/* Spacing */
.px-4 { padding-left: var(--space-4); padding-right: var(--space-4); }
.px-6 { padding-left: var(--space-6); padding-right: var(--space-6); }
.px-8 { padding-left: var(--space-8); padding-right: var(--space-8); }
.py-4 { padding-top: var(--space-4); padding-bottom: var(--space-4); }
.py-6 { padding-top: var(--space-6); padding-bottom: var(--space-6); }
.py-8 { padding-top: var(--space-8); padding-bottom: var(--space-8); }
.py-10 { padding-top: var(--space-10); padding-bottom: var(--space-10); }
.py-12 { padding-top: var(--space-12); padding-bottom: var(--space-12); }
.py-16 { padding-top: var(--space-16); padding-bottom: var(--space-16); }
.py-20 { padding-top: var(--space-20); padding-bottom: var(--space-20); }
.py-24 { padding-top: 6rem; padding-bottom: 6rem; } /* 96px - Apple-style */
.py-32 { padding-top: 8rem; padding-bottom: 8rem; } /* 128px - Hero sections */
.p-4 { padding: var(--space-4); }
.p-6 { padding: var(--space-6); }
.p-8 { padding: var(--space-8); }
.p-10 { padding: var(--space-10); }
.pt-12 { padding-top: var(--space-12); }
.pt-20 { padding-top: var(--space-20); }
.pb-20 { padding-bottom: var(--space-20); }
.mb-1 { margin-bottom: var(--space-1); }
.mb-2 { margin-bottom: var(--space-2); }
.mb-3 { margin-bottom: var(--space-3); }
.mb-4 { margin-bottom: var(--space-4); }
.mb-6 { margin-bottom: var(--space-6); }
.mb-8 { margin-bottom: var(--space-8); }
.mb-10 { margin-bottom: var(--space-10); }
.mb-12 { margin-bottom: var(--space-12); }
.mb-16 { margin-bottom: var(--space-16); }
.mt-4 { margin-top: var(--space-4); }
.mt-6 { margin-top: var(--space-6); }
.mt-8 { margin-top: var(--space-8); }
.mt-0\.5 { margin-top: 0.125rem; }
.ml-2 { margin-left: var(--space-2); }
.ml-7 { margin-left: 1.75rem; }
.mr-2 { margin-right: var(--space-2); }
.pt-4 { padding-top: var(--space-4); }
.pt-6 { padding-top: var(--space-6); }
.pt-8 { padding-top: var(--space-8); }
.gap-1 { gap: var(--space-1); }
.gap-2 { gap: var(--space-2); }
.gap-3 { gap: var(--space-3); }
.gap-4 { gap: var(--space-4); }
.gap-6 { gap: var(--space-6); }
.gap-8 { gap: var(--space-8); }
.gap-12 { gap: var(--space-12); }
.space-y-2 > * + * { margin-top: var(--space-2); }
.space-y-3 > * + * { margin-top: var(--space-3); }
.space-y-4 > * + * { margin-top: var(--space-4); }
.space-y-6 > * + * { margin-top: var(--space-6); }
.space-y-8 > * + * { margin-top: var(--space-8); }

/* Display & Flexbox */
.hidden { display: none; }
.block { display: block; }
.inline-block { display: inline-block; }
.inline-flex { display: inline-flex; }
.flex { display: flex; }
.flex-col { flex-direction: column; }
.flex-row { flex-direction: row; }
.flex-wrap { flex-wrap: wrap; }
.flex-1 { flex: 1 1 0%; }
.flex-shrink-0 { flex-shrink: 0; }
.items-start { align-items: flex-start; }
.items-center { align-items: center; }
.justify-center { justify-content: center; }
.justify-between { justify-content: space-between; }

/* Grid */
.grid { display: grid; }
.grid-cols-1 { grid-template-columns: repeat(1, minmax(0, 1fr)); }

/* Text Alignment */
.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }

/* Positioning */
.relative { position: relative; }
.absolute { position: absolute; }
.fixed { position: fixed; }
.top-0 { top: 0; }
.left-0 { left: 0; }
.right-0 { right: 0; }
.z-50 { z-index: 50; }

/* ========================================
   Typography
   ======================================== */
/* Text sizes - Apple-inspired scale */
.text-xs { font-size: 0.75rem; line-height: 1.4; }
.text-sm { font-size: 0.875rem; line-height: 1.5; }
.text-base { font-size: 1rem; line-height: 1.6; }
.text-lg { font-size: 1.125rem; line-height: 1.7; }
.text-xl { font-size: 1.25rem; line-height: 1.6; }
.text-2xl { font-size: 1.5rem; line-height: 1.4; letter-spacing: -0.01em; }
.text-3xl { font-size: 1.875rem; line-height: 1.3; letter-spacing: -0.015em; }
.text-4xl { font-size: 2.25rem; line-height: 1.2; letter-spacing: -0.02em; }
.text-5xl { font-size: 3rem; line-height: 1.1; letter-spacing: -0.02em; }
.text-6xl { font-size: 3.75rem; line-height: 1.05; letter-spacing: -0.025em; }

/* Font weights */
.font-light { font-weight: 300; }
.font-normal { font-weight: 400; }
.font-medium { font-weight: 500; }
.font-semibold { font-weight: 600; }
.font-bold { font-weight: 700; }

/* Letter spacing */
.tracking-tighter { letter-spacing: -0.04em; }
.tracking-tight { letter-spacing: -0.025em; }
.tracking-normal { letter-spacing: 0; }
.tracking-wide { letter-spacing: 0.025em; }
.tracking-wider { letter-spacing: 0.1em; }

/* Line height */
.leading-none { line-height: 1; }
.leading-tight { line-height: 1.25; }
.leading-snug { line-height: 1.375; }
.leading-normal { line-height: 1.5; }
.leading-relaxed { line-height: 1.625; }
.leading-loose { line-height: 1.75; }

.whitespace-nowrap { white-space: nowrap; }
.underline { text-decoration: underline; }

/* Colors */
.text-white { color: #ffffff; }
.text-slate-300 { color: var(--slate-300); }
.text-slate-400 { color: var(--slate-400); }
.text-slate-500 { color: var(--slate-500); }
.text-slate-600 { color: var(--slate-600); }
.text-slate-700 { color: var(--slate-700); }
.text-slate-900 { color: var(--slate-900); }
.text-red-600 { color: #dc2626; }

/* ========================================
   Background & Border
   ======================================== */
.bg-white { background-color: #ffffff; }
.bg-slate-50 { background-color: var(--slate-50); }
.bg-slate-900 { background-color: var(--slate-900); }
.bg-slate-400 { background-color: var(--slate-400); }
.bg-white\/95 { background-color: rgba(255, 255, 255, 0.95); }

.border { border-width: 1px; border-style: solid; }
.border-t { border-top-width: 1px; border-top-style: solid; }
.border-b { border-bottom-width: 1px; border-bottom-style: solid; }
.border-slate-200 { border-color: var(--slate-200); }
.border-slate-300 { border-color: var(--slate-300); }
.border-red-500 { border-color: #ef4444; }
.border-transparent { border-color: transparent; }

.rounded-sm { border-radius: var(--radius-sm); }
.rounded-md { border-radius: var(--radius-md); }
.rounded-lg { border-radius: var(--radius-lg); }
.rounded-xl { border-radius: var(--radius-xl); }
.rounded-2xl { border-radius: var(--radius-2xl); }
.rounded-3xl { border-radius: var(--radius-3xl); }
.rounded-full { border-radius: var(--radius-full); }

.backdrop-blur-sm { backdrop-filter: blur(4px); }

/* ========================================
   Components: Buttons
   ======================================== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.875rem 1.75rem;
    font-weight: 500;
    font-size: 0.9375rem;
    border-radius: var(--radius-full);
    transition: all var(--transition-base);
    cursor: pointer;
    text-decoration: none;
    border: 1px solid transparent;
    line-height: 1.25;
}

.btn-primary {
    background-color: var(--btn-primary-bg);
    color: var(--btn-primary-text);
}

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

.btn-secondary {
    background-color: var(--btn-secondary-bg);
    color: var(--btn-secondary-text);
    border-color: var(--btn-secondary-border);
}

.btn-secondary:hover {
    background-color: var(--slate-50);
    border-color: var(--slate-400);
}

/* Ghost Button - Transparent minimal style */
.btn-ghost {
    background: transparent;
    color: var(--slate-600);
    border: none;
    padding: 0.75rem 1rem;
}

.btn-ghost:hover {
    color: var(--text-primary);
    background: var(--slate-50);
}

/* ========================================
   Components: Forms
   ======================================== */
.form-input,
input[type="text"],
input[type="email"],
input[type="tel"],
input[type="url"],
select,
textarea {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 1px solid var(--slate-300);
    border-radius: var(--radius-xl);
    font-size: 1rem;
    line-height: 1.5;
    background-color: #ffffff;
    transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
}

.form-input:focus,
input:focus,
select:focus,
textarea:focus {
    outline: none;
    border-color: var(--slate-900);
    box-shadow: 0 0 0 3px rgba(15, 23, 42, 0.1);
}

textarea {
    resize: none;
    min-height: 120px;
}

input[type="checkbox"] {
    width: 1rem;
    height: 1rem;
    accent-color: var(--slate-900);
}

label {
    display: block;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--slate-900);
    margin-bottom: 0.5rem;
}

/* ========================================
   Components: Cards
   ======================================== */
.card {
    background-color: #ffffff;
    border: 1px solid var(--slate-200);
    border-radius: var(--radius-2xl);
    padding: var(--space-8);
    transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
}

.card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 40px rgba(15, 23, 42, 0.1);
    border-color: var(--slate-300);
}

.card-alt {
    background-color: var(--slate-50);
    border: 1px solid var(--slate-200);
    border-radius: var(--radius-2xl);
    padding: var(--space-8);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.card-alt:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.08);
}

/* ========================================
   Components: Prose (Content)
   ======================================== */
.prose {
    color: var(--slate-700);
    line-height: 1.75;
}

.prose h2 {
    color: var(--slate-900);
    font-size: 1.5rem;
    font-weight: 500;
    margin-top: 2rem;
    margin-bottom: 1rem;
}

.prose h3 {
    color: var(--slate-900);
    font-size: 1.25rem;
    font-weight: 500;
    margin-top: 1.5rem;
    margin-bottom: 0.75rem;
}

.prose p {
    margin-bottom: 1.25rem;
}

.prose ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.prose a {
    color: var(--slate-900);
    text-decoration: underline;
    font-weight: 500;
}

.prose a:hover {
    color: var(--slate-700);
}

/* ========================================
   Header Styles
   ======================================== */
.site-header {
    height: 5rem;
}

.site-header .h-20 {
    height: 5rem;
}

/* ========================================
   Logo Styles
   ======================================== */
.fsc-logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    text-decoration: none;
}

.fsc-logo-icon {
    flex-shrink: 0;
    transition: transform 0.2s ease;
}

.fsc-logo:hover .fsc-logo-icon {
    transform: scale(1.05);
}

.fsc-logo-text {
    display: flex;
    flex-direction: column;
    font-family: 'Inter', system-ui, sans-serif;
    line-height: 1.3;
}

.fsc-logo-name {
    font-weight: 700;
    font-size: 1.125rem;
    color: #0F172A;
    letter-spacing: -0.01em;
}

.fsc-logo-tagline {
    font-weight: 400;
    font-size: 0.6rem;
    color: #9CA3AF;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    margin-top: 0.125rem;
}

/* Footer Logo */
.fsc-footer-logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.fsc-footer-logo .fsc-logo-name {
    font-size: 1.25rem;
}

.fsc-footer-logo .fsc-logo-tagline {
    font-size: 0.55rem;
}

/* Dark Background Logo (for dark headers/sections) */
.bg-dark .fsc-logo-icon line,
.bg-dark .fsc-logo-icon circle {
    stroke: #ffffff;
    fill: #ffffff;
}

.bg-dark .fsc-logo-name {
    color: #ffffff;
}

.bg-dark .fsc-logo-tagline {
    color: #8a9ba8;
}

/* Responsive Logo */
@media (max-width: 640px) {
    .fsc-logo-name {
        font-size: 0.95rem;
    }

    .fsc-logo-icon {
        width: 28px;
        height: 28px;
    }

    .fsc-logo-tagline {
        display: none;
    }
}

/* ========================================
   Utility: Width & Height
   ======================================== */
.w-full { width: 100%; }
.w-2 { width: 0.5rem; }
.w-4 { width: 1rem; }
.w-5 { width: 1.25rem; }
.w-6 { width: 1.5rem; }
.w-8 { width: 2rem; }
.w-10 { width: 2.5rem; }
.w-12 { width: 3rem; }
.w-16 { width: 4rem; }
.w-1\.5 { width: 0.375rem; }
.h-2 { height: 0.5rem; }
.h-4 { height: 1rem; }
.h-5 { height: 1.25rem; }
.h-6 { height: 1.5rem; }
.h-8 { height: 2rem; }
.h-10 { height: 2.5rem; }
.h-12 { height: 3rem; }
.h-16 { height: 4rem; }
.h-20 { height: 5rem; }
.h-1\.5 { height: 0.375rem; }
.min-w-\[140px\] { min-width: 140px; }

/* Overflow & Visibility */
.overflow-hidden { overflow: hidden; }
.overflow-x-auto { overflow-x: auto; }
.overflow-y-auto { overflow-y: auto; }
.inset-0 { top: 0; right: 0; bottom: 0; left: 0; }

/* Opacity */
.opacity-0 { opacity: 0; }
.opacity-50 { opacity: 0.5; }
.opacity-75 { opacity: 0.75; }
.opacity-100 { opacity: 1; }
.opacity-\[0\.02\] { opacity: 0.02; }

/* Uppercase & Tracking */
.uppercase { text-transform: uppercase; }
.tracking-wider { letter-spacing: 0.05em; }

/* Additional Sizing */
.aspect-video { aspect-ratio: 16 / 9; }
.resize-none { resize: none; }
.cursor-pointer { cursor: pointer; }

/* Background Slate 100 */
.bg-slate-100 { background-color: var(--slate-100); }
.bg-slate-200 { background-color: var(--slate-200); }

/* Text Slate 200 */
.text-slate-200 { color: var(--slate-200); }

/* ========================================
   Transitions
   ======================================== */
.transition-colors {
    transition-property: color, background-color, border-color;
    transition-timing-function: ease;
    transition-duration: 200ms;
}

.transition-all {
    transition-property: all;
    transition-timing-function: ease;
    transition-duration: 200ms;
}

/* ========================================
   Hover States
   ======================================== */
.hover\:text-slate-700:hover { color: var(--slate-700); }
.hover\:text-slate-900:hover { color: var(--slate-900); }
.hover\:bg-slate-50:hover { background-color: var(--slate-50); }
.hover\:bg-slate-800:hover { background-color: var(--slate-800); }
.hover\:border-slate-400:hover { border-color: var(--slate-400); }

/* ========================================
   Responsive Breakpoints
   ======================================== */
@media (min-width: 640px) {
    .sm\:flex-row { flex-direction: row; }
    .sm\:grid-cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .sm\:grid-cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .sm\:text-5xl { font-size: 3rem; line-height: 1; }
    .sm\:text-6xl { font-size: 3.75rem; line-height: 1; }
}

@media (min-width: 768px) {
    .md\:grid-cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .md\:grid-cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (min-width: 1024px) {
    .lg\:hidden { display: none; }
    .lg\:flex { display: flex; }
    .lg\:block { display: block; }
    .lg\:grid-cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .lg\:grid-cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .lg\:grid-cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
    .lg\:flex-row { flex-direction: row; }
    .lg\:flex-initial { flex: 0 1 auto; }
    .lg\:col-span-2 { grid-column: span 2 / span 2; }
    .lg\:w-auto { width: auto; }
}

/* ========================================
   RTL Support
   ======================================== */
[dir="rtl"] {
    text-align: right;
}

[dir="rtl"] .flex-row {
    flex-direction: row-reverse;
}

[dir="rtl"] .ml-7 {
    margin-left: 0;
    margin-right: 1.75rem;
}

[dir="rtl"] .space-x-1 > * + * {
    margin-left: 0;
    margin-right: 0.25rem;
}

[dir="rtl"] .space-x-2 > * + * {
    margin-left: 0;
    margin-right: 0.5rem;
}

/* RTL Logo Font */
[dir="rtl"] .fsc-logo-text,
[dir="rtl"] .fsc-footer-logo .fsc-logo-text {
    font-family: 'Tajawal', 'Inter', system-ui, sans-serif;
}

/* Rotation utility */
.rotate-180 {
    transform: rotate(180deg);
}

/* Flip directional arrows for RTL */
[dir="rtl"] .rtl-flip {
    transform: scaleX(-1);
}

/* Tailwind rtl: prefix utilities (active only in RTL) */
[dir="rtl"] .rtl\:rotate-180 {
    transform: rotate(180deg);
}

[dir="rtl"] .rtl\:ml-0 {
    margin-left: 0;
}

[dir="rtl"] .rtl\:mr-2 {
    margin-right: 0.5rem;
}

/* Margin direction swaps */
[dir="rtl"] .ml-2 { margin-left: 0; margin-right: 0.5rem; }
[dir="rtl"] .mr-2 { margin-right: 0; margin-left: 0.5rem; }
[dir="rtl"] .ml-3 { margin-left: 0; margin-right: 0.75rem; }
[dir="rtl"] .mr-3 { margin-right: 0; margin-left: 0.75rem; }
[dir="rtl"] .ml-4 { margin-left: 0; margin-right: 1rem; }

/* Padding direction swaps */
[dir="rtl"] .pl-4 { padding-left: 0; padding-right: 1rem; }
[dir="rtl"] .pr-12 { padding-right: 0; padding-left: 3rem; }
[dir="rtl"] .pl-6 { padding-left: 0; padding-right: 1.5rem; }
[dir="rtl"] .pr-6 { padding-right: 0; padding-left: 1.5rem; }

/* Search button position (absolute right → left in RTL) */
[dir="rtl"] .search-form .right-3 {
    right: auto;
    left: 0.75rem;
}

/* Footer: keep LTR for phone/email/URL values */
[dir="rtl"] .site-footer a[href^="mailto:"],
[dir="rtl"] .site-footer a[href^="tel:"] {
    direction: ltr;
    unicode-bidi: embed;
}

/* Border direction swap */
[dir="rtl"] .border-l {
    border-left: 0;
    border-right-width: 1px;
    border-right-style: solid;
}

/* ========================================
   Cookie Consent Banner
   ======================================== */
.cookie-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 9999;
    background-color: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(8px);
    border-top: 1px solid var(--slate-200);
    padding: 1.5rem;
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.1);
}

.cookie-banner.hidden {
    display: none;
}

/* ========================================
   Print & PDF Styles - Professional Output
   ======================================== */
@media print {
    /* Hide non-essential elements */
    .site-header,
    .site-footer,
    .cookie-banner,
    #mobile-menu,
    .btn,
    button,
    form,
    .no-print,
    nav,
    .social-links,
    [role="navigation"] {
        display: none !important;
    }

    /* Reset background and colors for print */
    * {
        background: white !important;
        color: black !important;
        box-shadow: none !important;
        text-shadow: none !important;
    }

    body {
        font-family: 'Georgia', 'Times New Roman', serif;
        font-size: 11pt;
        line-height: 1.6;
        margin: 0;
        padding: 20mm;
        color: #000 !important;
    }

    /* Page setup */
    @page {
        size: A4;
        margin: 20mm 15mm;
    }

    @page :first {
        margin-top: 10mm;
    }

    /* Typography for print */
    h1 {
        font-size: 24pt;
        font-weight: 700;
        margin-bottom: 12pt;
        page-break-after: avoid;
        border-bottom: 2pt solid #000;
        padding-bottom: 8pt;
    }

    h2 {
        font-size: 18pt;
        font-weight: 600;
        margin-top: 24pt;
        margin-bottom: 12pt;
        page-break-after: avoid;
    }

    h3 {
        font-size: 14pt;
        font-weight: 600;
        margin-top: 18pt;
        margin-bottom: 8pt;
        page-break-after: avoid;
    }

    p {
        margin-bottom: 10pt;
        orphans: 3;
        widows: 3;
    }

    /* Links - show URL in print */
    a[href^="http"]:after {
        content: " (" attr(href) ")";
        font-size: 9pt;
        color: #666 !important;
    }

    a[href^="mailto"]:after {
        content: " (" attr(href) ")";
        font-size: 9pt;
    }

    /* Tables for print */
    table {
        border-collapse: collapse;
        width: 100%;
        page-break-inside: avoid;
    }

    th, td {
        border: 1pt solid #333;
        padding: 8pt;
        text-align: left;
    }

    th {
        background-color: #f0f0f0 !important;
        font-weight: 600;
    }

    /* Images */
    img {
        max-width: 100% !important;
        page-break-inside: avoid;
    }

    /* Page breaks */
    .page-break {
        page-break-before: always;
    }

    .avoid-break {
        page-break-inside: avoid;
    }

    /* Print header (logo) */
    .print-header {
        display: block !important;
        text-align: center;
        margin-bottom: 20pt;
        border-bottom: 1pt solid #ccc;
        padding-bottom: 15pt;
    }

    .print-header img {
        max-height: 60pt;
    }

    /* Print footer */
    .print-footer {
        display: block !important;
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        text-align: center;
        font-size: 9pt;
        color: #666 !important;
        border-top: 1pt solid #ccc;
        padding-top: 8pt;
    }

    /* Contact info block for print */
    .print-contact-block {
        display: block !important;
        background: #f9f9f9 !important;
        border: 1pt solid #ddd;
        padding: 15pt;
        margin: 20pt 0;
    }

    /* Lists */
    ul, ol {
        margin-left: 20pt;
        margin-bottom: 12pt;
    }

    li {
        margin-bottom: 4pt;
    }

    /* Sections */
    section {
        page-break-inside: avoid;
        margin-bottom: 20pt;
    }

    /* Grid to single column */
    .grid {
        display: block !important;
    }

    .grid > * {
        margin-bottom: 15pt;
    }
}

/* ========================================
   PDF-Ready Document Styles
   ======================================== */
.pdf-document {
    max-width: 210mm;
    margin: 0 auto;
    padding: 20mm;
    background: white;
    font-family: 'Inter', -apple-system, sans-serif;
}

.pdf-document .pdf-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 2px solid var(--slate-200);
    padding-bottom: 1rem;
    margin-bottom: 2rem;
}

.pdf-document .pdf-logo {
    height: 48px;
    width: auto;
}

.pdf-document .pdf-meta {
    text-align: right;
    font-size: 0.875rem;
    color: var(--slate-600);
}

.pdf-document .pdf-title {
    font-size: 2rem;
    font-weight: 300;
    color: var(--slate-900);
    margin-bottom: 0.5rem;
}

.pdf-document .pdf-subtitle {
    font-size: 1.125rem;
    color: var(--slate-600);
    margin-bottom: 2rem;
}

.pdf-document .pdf-section {
    margin-bottom: 2rem;
    page-break-inside: avoid;
}

.pdf-document .pdf-section-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--slate-900);
    border-bottom: 1px solid var(--slate-200);
    padding-bottom: 0.5rem;
    margin-bottom: 1rem;
}

.pdf-document .pdf-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 1.5rem;
}

.pdf-document .pdf-table th,
.pdf-document .pdf-table td {
    padding: 0.75rem 1rem;
    text-align: left;
    border-bottom: 1px solid var(--slate-200);
}

.pdf-document .pdf-table th {
    background-color: var(--slate-50);
    font-weight: 600;
    color: var(--slate-900);
}

.pdf-document .pdf-footer {
    margin-top: 3rem;
    padding-top: 1rem;
    border-top: 1px solid var(--slate-200);
    font-size: 0.75rem;
    color: var(--slate-500);
    text-align: center;
}

/* ========================================
   Enhanced Form Styles
   ======================================== */

/* Form Container */
.fsc-form {
    background: white;
    border-radius: 1.5rem;
    padding: 2rem;
    border: 1px solid var(--slate-200);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
}

/* Form Groups */
.form-group {
    margin-bottom: 1.5rem;
}

.form-group:last-child {
    margin-bottom: 0;
}

/* Labels */
.form-label {
    display: block;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--slate-900);
    margin-bottom: 0.5rem;
}

.form-label .required {
    color: #ef4444;
    margin-left: 0.25rem;
}

/* Input Fields */
.form-input,
.form-select,
.form-textarea {
    width: 100%;
    padding: 0.875rem 1rem;
    font-size: 1rem;
    line-height: 1.5;
    color: var(--slate-900);
    background-color: white;
    border: 1px solid var(--slate-300);
    border-radius: 0.75rem;
    transition: all 0.2s ease;
    -webkit-appearance: none;
    appearance: none;
}

.form-input:hover,
.form-select:hover,
.form-textarea:hover {
    border-color: var(--slate-400);
}

.form-input:focus,
.form-select:focus,
.form-textarea:focus {
    outline: none;
    border-color: var(--slate-900);
    box-shadow: 0 0 0 3px rgba(15, 23, 42, 0.1);
}

/* Placeholder */
.form-input::placeholder,
.form-textarea::placeholder {
    color: var(--slate-400);
}

/* Select Dropdown */
.form-select {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%2364748b'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M19 9l-7 7-7-7'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 1rem center;
    background-size: 1.25rem;
    padding-right: 3rem;
}

[dir="rtl"] .form-select {
    background-position: left 1rem center;
    padding-right: 1rem;
    padding-left: 3rem;
}

/* Textarea */
.form-textarea {
    min-height: 120px;
    resize: vertical;
}

/* Radio & Checkbox Cards */
.form-card {
    position: relative;
    cursor: pointer;
}

.form-card input {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

.form-card-content {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    padding: 1rem;
    border: 1px solid var(--slate-300);
    border-radius: 0.75rem;
    transition: all 0.2s ease;
    background: white;
}

.form-card:hover .form-card-content {
    border-color: var(--slate-400);
    background-color: var(--slate-50);
}

.form-card input:checked + .form-card-content {
    border-color: var(--slate-900);
    background-color: var(--slate-50);
    box-shadow: 0 0 0 1px var(--slate-900);
}

.form-card input:focus + .form-card-content {
    box-shadow: 0 0 0 3px rgba(15, 23, 42, 0.1);
}

/* Radio Circle */
.form-radio-circle {
    width: 1.25rem;
    height: 1.25rem;
    border: 2px solid var(--slate-300);
    border-radius: 50%;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.form-card input:checked + .form-card-content .form-radio-circle {
    border-color: var(--slate-900);
    background-color: var(--slate-900);
}

.form-card input:checked + .form-card-content .form-radio-circle::after {
    content: '';
    width: 0.5rem;
    height: 0.5rem;
    background: white;
    border-radius: 50%;
}

/* Checkbox Square */
.form-checkbox-square {
    width: 1.25rem;
    height: 1.25rem;
    border: 2px solid var(--slate-300);
    border-radius: 0.25rem;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.form-card input:checked + .form-card-content .form-checkbox-square {
    border-color: var(--slate-900);
    background-color: var(--slate-900);
}

.form-card input:checked + .form-card-content .form-checkbox-square::after {
    content: '';
    width: 0.625rem;
    height: 0.375rem;
    border: 2px solid white;
    border-top: none;
    border-right: none;
    transform: rotate(-45deg);
    margin-top: -2px;
}

/* Card Text */
.form-card-text {
    flex: 1;
}

.form-card-title {
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--slate-900);
}

.form-card-desc {
    font-size: 0.75rem;
    color: var(--slate-500);
    margin-top: 0.125rem;
}

/* Grid Options */
.form-options-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.75rem;
}

@media (max-width: 640px) {
    .form-options-grid {
        grid-template-columns: 1fr;
    }
}

/* Size Options (Compact) */
.form-size-option {
    text-align: center;
    padding: 0.875rem 1rem;
}

.form-size-option .form-card-title {
    font-size: 1rem;
    font-weight: 600;
}

/* Form Validation States */
.form-input.is-valid,
.form-select.is-valid,
.form-textarea.is-valid {
    border-color: #22c55e;
}

.form-input.is-valid:focus,
.form-select.is-valid:focus,
.form-textarea.is-valid:focus {
    box-shadow: 0 0 0 3px rgba(34, 197, 94, 0.1);
}

.form-input.is-invalid,
.form-select.is-invalid,
.form-textarea.is-invalid {
    border-color: #ef4444;
}

.form-input.is-invalid:focus,
.form-select.is-invalid:focus,
.form-textarea.is-invalid:focus {
    box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.1);
}

/* Error Message */
.form-error {
    display: none;
    font-size: 0.75rem;
    color: #ef4444;
    margin-top: 0.5rem;
}

.form-group.has-error .form-error {
    display: block;
}

.form-group.has-error .form-input,
.form-group.has-error .form-select,
.form-group.has-error .form-textarea {
    border-color: #ef4444;
}

/* Success Message */
.form-success {
    display: none;
    font-size: 0.75rem;
    color: #22c55e;
    margin-top: 0.5rem;
}

.form-group.has-success .form-success {
    display: block;
}

/* Helper Text */
.form-helper {
    font-size: 0.75rem;
    color: var(--slate-500);
    margin-top: 0.5rem;
}

/* Consent Box */
.form-consent {
    background-color: var(--slate-50);
    border-radius: 0.75rem;
    padding: 1rem;
}

.form-consent label {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    cursor: pointer;
}

.form-consent input[type="checkbox"] {
    width: 1.125rem;
    height: 1.125rem;
    margin-top: 0.125rem;
    accent-color: var(--slate-900);
}

.form-consent span {
    font-size: 0.875rem;
    color: var(--slate-700);
    line-height: 1.5;
}

.form-consent a {
    color: var(--slate-900);
    text-decoration: underline;
}

.form-consent a:hover {
    text-decoration: none;
}

/* Submit Button */
.form-submit {
    width: 100%;
    padding: 1rem 2rem;
    font-size: 1rem;
    font-weight: 600;
    color: white;
    background-color: var(--slate-900);
    border: none;
    border-radius: 0.75rem;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.form-submit:hover {
    background-color: var(--slate-800);
    transform: translateY(-1px);
}

.form-submit:active {
    transform: translateY(0);
}

.form-submit:disabled {
    background-color: var(--slate-400);
    cursor: not-allowed;
    transform: none;
}

/* Loading State */
.form-submit.is-loading {
    position: relative;
    color: transparent;
}

.form-submit.is-loading::after {
    content: '';
    position: absolute;
    width: 1.25rem;
    height: 1.25rem;
    border: 2px solid white;
    border-top-color: transparent;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Form Footer Text */
.form-footer-text {
    text-align: center;
    font-size: 0.875rem;
    color: var(--slate-500);
    margin-top: 1rem;
}

/* ========================================
   Form Success/Error Overlays
   ======================================== */
.form-result-overlay {
    display: none;
    position: absolute;
    inset: 0;
    background: rgba(255, 255, 255, 0.95);
    border-radius: 1.5rem;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 2rem;
    animation: fadeIn 0.3s ease;
}

.form-result-overlay.is-visible {
    display: flex;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.form-result-icon {
    width: 4rem;
    height: 4rem;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.5rem;
}

.form-result-icon.success {
    background-color: #dcfce7;
    color: #22c55e;
}

.form-result-icon.error {
    background-color: #fef2f2;
    color: #ef4444;
}

.form-result-icon svg {
    width: 2rem;
    height: 2rem;
}

.form-result-title {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--slate-900);
    margin-bottom: 0.5rem;
}

.form-result-message {
    font-size: 1rem;
    color: var(--slate-600);
    margin-bottom: 1.5rem;
    max-width: 300px;
}

.form-result-action {
    padding: 0.75rem 1.5rem;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--slate-900);
    background: white;
    border: 1px solid var(--slate-300);
    border-radius: 0.5rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.form-result-action:hover {
    background-color: var(--slate-50);
}

/* ========================================
   Printable Contact Card
   ======================================== */
.contact-card-print {
    display: none;
}

@media print {
    .contact-card-print {
        display: block !important;
        page-break-inside: avoid;
        border: 1pt solid #ccc;
        padding: 20pt;
        margin: 20pt 0;
    }

    .contact-card-print .card-header {
        display: flex;
        align-items: center;
        gap: 15pt;
        border-bottom: 1pt solid #eee;
        padding-bottom: 15pt;
        margin-bottom: 15pt;
    }

    .contact-card-print .card-logo {
        width: 60pt;
        height: 60pt;
    }

    .contact-card-print .card-company {
        font-size: 16pt;
        font-weight: 700;
    }

    .contact-card-print .card-tagline {
        font-size: 10pt;
        color: #666;
    }

    .contact-card-print .card-details {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 10pt;
    }

    .contact-card-print .card-item {
        margin-bottom: 8pt;
    }

    .contact-card-print .card-label {
        font-size: 8pt;
        color: #888;
        text-transform: uppercase;
        letter-spacing: 0.5pt;
    }

    .contact-card-print .card-value {
        font-size: 11pt;
        color: #333;
    }
}

/* ========================================
   Proposal/Quote Template Styles
   ======================================== */
.proposal-template {
    max-width: 800px;
    margin: 0 auto;
    padding: 2rem;
    background: white;
}

.proposal-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    border-bottom: 2px solid var(--slate-900);
    padding-bottom: 1.5rem;
    margin-bottom: 2rem;
}

.proposal-logo {
    height: 48px;
}

.proposal-info {
    text-align: right;
}

.proposal-number {
    font-size: 0.875rem;
    color: var(--slate-500);
}

.proposal-date {
    font-size: 0.875rem;
    color: var(--slate-900);
    font-weight: 500;
}

.proposal-title {
    font-size: 2rem;
    font-weight: 300;
    color: var(--slate-900);
    margin-bottom: 0.5rem;
}

.proposal-client {
    background: var(--slate-50);
    padding: 1.5rem;
    border-radius: 0.75rem;
    margin-bottom: 2rem;
}

.proposal-client-label {
    font-size: 0.75rem;
    color: var(--slate-500);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 0.5rem;
}

.proposal-client-name {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--slate-900);
}

.proposal-section {
    margin-bottom: 2rem;
}

.proposal-section-title {
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--slate-900);
    border-bottom: 1px solid var(--slate-200);
    padding-bottom: 0.5rem;
    margin-bottom: 1rem;
}

.proposal-table {
    width: 100%;
    border-collapse: collapse;
}

.proposal-table th,
.proposal-table td {
    padding: 1rem;
    text-align: left;
    border-bottom: 1px solid var(--slate-200);
}

.proposal-table th {
    background: var(--slate-50);
    font-weight: 600;
    font-size: 0.875rem;
    color: var(--slate-900);
}

.proposal-table .text-right {
    text-align: right;
}

.proposal-total {
    display: flex;
    justify-content: flex-end;
    margin-top: 1rem;
}

.proposal-total-box {
    background: var(--slate-900);
    color: white;
    padding: 1rem 2rem;
    border-radius: 0.5rem;
}

.proposal-total-label {
    font-size: 0.875rem;
    opacity: 0.8;
}

.proposal-total-amount {
    font-size: 1.5rem;
    font-weight: 600;
}

.proposal-footer {
    margin-top: 3rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--slate-200);
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
}

.proposal-signature {
    border-top: 1px solid var(--slate-300);
    padding-top: 0.5rem;
    margin-top: 3rem;
}

.proposal-signature-label {
    font-size: 0.75rem;
    color: var(--slate-500);
}

/* RTL Support for Forms */
[dir="rtl"] .form-select {
    background-position: left 1rem center;
    padding-left: 3rem;
    padding-right: 1rem;
}

[dir="rtl"] .form-card-content {
    flex-direction: row-reverse;
}

[dir="rtl"] .proposal-header {
    flex-direction: row-reverse;
}

[dir="rtl"] .proposal-info {
    text-align: left;
}

[dir="rtl"] .proposal-table .text-right {
    text-align: left;
}

[dir="rtl"] .proposal-footer {
    direction: rtl;
}
