/**
 * Main Stylesheet for Nashrah Theme
 * Consolidated from inline styles across templates
 *
 * @package Nashrah
 * @version 1.0.0
 */

/* =====================================================
   CSS VARIABLES & ROOT STYLES
   ===================================================== */
@import url('https://fonts.googleapis.com/css2?family=Tajawal:wght@300;400;500;700;800;900&display=swap');

:root {
    --ct-primary: #ffffff;
    --ct-secondary: #f8f9fa;
    --ct-surface: #ffffff;
    --ct-border: rgba(12, 114, 162, 0.2);
    --ct-accent: #0c72a2;
    --ct-accent-light: #1a8bc4;
    --ct-accent-dark: #0a5d85;
    --ct-accent-gradient: linear-gradient(135deg, #0c72a2 0%, #1a8bc4 40%, #0a5d85 100%);
    --ct-accent-glow: 0 8px 24px rgba(12, 114, 162, 0.2), 0 0 22px rgba(12, 114, 162, 0.15);
    --ct-text: #212529;
    --ct-light: #e9ecef;
    --ct-muted: #6c757d;
    --ct-shadow: rgba(0, 0, 0, 0.1);
}

html {
    scroll-behavior: smooth;
}

body {
    background: linear-gradient(180deg, #ffffff 0%, #f8f9fa 100%);
    color: var(--ct-text);
    font-family: "Tajawal", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    font-weight: 400;
    line-height: 1.7;
    direction: rtl;
    overflow-x: hidden;
    font-size: clamp(1rem, 2vw, 1.125rem);
}

/* =====================================================
   RESPONSIVE TYPOGRAPHY
   ===================================================== */
h1, .h1 {
    font-size: clamp(1.875rem, 4.5vw, 3rem);
    font-weight: 800;
    line-height: 1.2;
    margin-bottom: 1.5rem;
}

h2, .h2 {
    font-size: clamp(1.5rem, 3.5vw, 2.25rem);
    font-weight: 700;
    line-height: 1.3;
    margin-bottom: 1.25rem;
}

h3, .h3 {
    font-size: clamp(1.25rem, 2.75vw, 1.875rem);
    font-weight: 700;
    line-height: 1.3;
    margin-bottom: 1rem;
}

h4, .h4 {
    font-size: clamp(1.125rem, 2.25vw, 1.5rem);
    font-weight: 600;
    line-height: 1.4;
    margin-bottom: 0.875rem;
}

h5, .h5 {
    font-size: clamp(1rem, 1.75vw, 1.25rem);
    font-weight: 600;
    line-height: 1.4;
    margin-bottom: 0.75rem;
}

h6, .h6 {
    font-size: clamp(0.9375rem, 1.5vw, 1.125rem);
    font-weight: 600;
    line-height: 1.5;
    margin-bottom: 0.625rem;
}

/* Bootstrap Display Classes - Responsive Overrides */
.display-1 {
    font-size: clamp(2.5rem, 6vw, 4rem) !important;
    font-weight: 800;
    line-height: 1.2;
}

.display-2 {
    font-size: clamp(2rem, 5.5vw, 3.5rem) !important;
    font-weight: 800;
    line-height: 1.2;
}

.display-3 {
    font-size: clamp(1.75rem, 5vw, 3rem) !important;
    font-weight: 700;
    line-height: 1.25;
}

.display-4 {
    font-size: clamp(1.5rem, 4.5vw, 2.5rem) !important;
    font-weight: 700;
    line-height: 1.25;
}

.display-5 {
    font-size: clamp(1.375rem, 4vw, 2.25rem) !important;
    font-weight: 700;
    line-height: 1.3;
}

.display-6 {
    font-size: clamp(1.25rem, 3.5vw, 2rem) !important;
    font-weight: 700;
    line-height: 1.3;
}

p {
    font-size: clamp(1rem, 1.5vw, 1.125rem);
    line-height: 1.7;
    margin-bottom: 1rem;
}

a {
    color: var(--ct-accent);
    text-decoration: none;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

a:hover,
a:focus {
    color: var(--ct-accent-light);
    text-decoration: none;
}

/* =====================================================
   UTILITY CLASSES
   ===================================================== */
.text-ct-accent {
    color: var(--ct-accent) !important;
    text-shadow: none;
}

.text-ct-muted {
    color: var(--ct-muted) !important;
}

.bg-ct-secondary {
    background-color: var(--ct-secondary) !important;
}

.bg-ct-surface {
    background-color: var(--ct-surface) !important;
}

.min-vh-50 {
    min-height: 50vh;
}

.shadow-xl {
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4), 0 0 40px rgba(12, 114, 162, 0.2);
}

/* =====================================================
   BUTTON STYLES
   ===================================================== */
.btn-ct-accent {
    background: var(--ct-accent-gradient);
    color: var(--ct-text);
    border: 2px solid var(--ct-accent);
    box-shadow: var(--ct-accent-glow);
    font-weight: 600;
    padding: 0.75rem 2rem;
    min-height: 48px;
    border-radius: 0.5rem;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-align: center;
}

.btn-ct-accent:hover,
.btn-ct-accent:focus {
    background: var(--ct-accent-gradient);
    color: var(--ct-text);
    border-color: var(--ct-accent-light);
    box-shadow: 0 14px 36px rgba(12, 114, 162, 0.45), 0 0 26px rgba(12, 114, 162, 0.35);
    transform: translateY(-2px);
}

.btn-ct-accent:focus-visible {
    outline: 2px solid var(--ct-accent);
    outline-offset: 3px;
}

.btn-outline-ct-accent {
    background: transparent;
    color: var(--ct-accent);
    border: 2px solid var(--ct-accent);
    font-weight: 600;
    padding: 0.75rem 2rem;
    min-height: 48px;
    border-radius: 0.5rem;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-align: center;
}

.btn-outline-ct-accent:hover,
.btn-outline-ct-accent:focus {
    background: var(--ct-accent);
    color: var(--ct-text);
    box-shadow: var(--ct-accent-glow);
    transform: translateY(-2px);
}

.btn-outline-ct-accent:focus-visible {
    outline: 2px solid var(--ct-accent);
    outline-offset: 3px;
}

/* =====================================================
   RESPONSIVE BUTTONS - MOBILE FULL WIDTH
   ===================================================== */
@media (max-width: 767.98px) {
    /* Full-width buttons on mobile for better UX */
    section .text-center .btn,
    section .text-center .btn-ct-accent,
    section .text-center .btn-outline-ct-accent,
    .alaw-services-cta .btn {
        width: 100%;
        max-width: 100%;
        display: inline-flex;
        justify-content: center;
        align-items: center;
    }
}

@media (max-width: 575.98px) {
    /* Standalone CTA buttons full-width on small mobile */
    .btn-lg {
        width: 100%;
        font-size: 1rem;
        padding: 1rem 1.5rem;
    }
}

/* =====================================================
   SECTION COMPONENTS
   ===================================================== */
.alaw-section-badge {
    display: inline-block;
    background: var(--ct-accent-gradient);
    color: var(--ct-text);
    padding: 0.5rem 1.5rem;
    border-radius: 2rem;
    font-size: 0.875rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    box-shadow: var(--ct-accent-glow);
}

.alaw-section-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(180deg, transparent 0%, rgba(12, 114, 162, 0.03) 50%, transparent 100%);
    pointer-events: none;
}

.alaw-section-number {
    display: inline-block;
    font-size: 5rem;
    font-weight: 900;
    line-height: 1;
    color: rgba(12, 114, 162, 0.15);
    position: absolute;
    top: -20px;
    right: -10px;
    z-index: 0;
}

.alaw-section-number-large {
    display: inline-block;
    font-size: 8rem;
    font-weight: 900;
    line-height: 1;
    color: rgba(12, 114, 162, 0.15);
    text-align: center;
}

/* =====================================================
   ANIMATIONS
   ===================================================== */
@keyframes fade-up {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.animate-fade-up {
    animation: fade-up 0.8s ease-out forwards;
    opacity: 0;
}

/* =====================================================
   RESPONSIVE SPACING UTILITIES
   ===================================================== */
.py-responsive {
    padding-top: clamp(3rem, 6vw, 5rem);
    padding-bottom: clamp(3rem, 6vw, 5rem);
}

.my-responsive {
    margin-top: clamp(2rem, 4vw, 3rem);
    margin-bottom: clamp(2rem, 4vw, 3rem);
}

.gap-responsive {
    gap: clamp(1rem, 2vw, 2rem);
}

/* Touch-Friendly Interactive Elements */
@media (hover: none) and (pointer: coarse) {
    .btn,
    button,
    a.btn-ct-accent,
    a.btn-outline-ct-accent {
        min-height: 48px;
        padding: 0.875rem 1.5rem;
    }

    /* Increase tap targets for links */
    a:not(.btn):not(.btn-ct-accent):not(.btn-outline-ct-accent) {
        padding: 0.25rem 0;
        display: inline-block;
    }
}

/* =====================================================
   RESPONSIVE UTILITIES
   ===================================================== */
@media (max-width: 991.98px) {
    .alaw-section-number-large {
        font-size: 5rem;
    }

    /* Better spacing for tablets */
    section {
        padding-top: clamp(3rem, 5vw, 4rem);
        padding-bottom: clamp(3rem, 5vw, 4rem);
    }
}

@media (max-width: 767.98px) {
    .min-vh-50 {
        min-height: auto;
    }

    .alaw-section-number {
        font-size: 3rem;
        top: -10px;
        right: -5px;
    }

    .alaw-section-number-large {
        font-size: 4rem;
    }

    /* Optimize container padding for mobile */
    .container {
        padding-left: 1.25rem;
        padding-right: 1.25rem;
    }

    /* Better button sizing on mobile */
    .btn,
    .btn-ct-accent,
    .btn-outline-ct-accent {
        width: 100%;
        max-width: 100%;
        padding: 1rem 1.5rem;
        min-height: 50px;
    }

    /* Optimize text for mobile readability */
    p {
        font-size: 1rem;
        line-height: 1.65;
    }
}

@media (max-width: 575.98px) {
    .alaw-section-badge {
        padding: 0.4rem 1rem;
        font-size: 0.75rem;
    }

    .container {
        padding-left: 1rem;
        padding-right: 1rem;
    }

    /* Smaller headings on very small screens */
    h1, .h1 {
        font-size: clamp(1.5rem, 5.5vw, 1.875rem);
    }

    h2, .h2 {
        font-size: clamp(1.25rem, 4.5vw, 1.625rem);
    }

    /* Compact spacing */
    section {
        padding-top: 2.5rem;
        padding-bottom: 2.5rem;
    }
}

/* =====================================================
   EXTRA SMALL DEVICES (≤375px)
   ===================================================== */
@media (max-width: 375px) {
    .container {
        padding-left: 0.875rem;
        padding-right: 0.875rem;
    }

    .btn,
    .btn-ct-accent,
    .btn-outline-ct-accent {
        padding: 0.875rem 1.25rem;
        min-height: 48px;
        font-size: 0.9375rem;
    }
}

/* =====================================================
   LANDSCAPE MOBILE OPTIMIZATION
   ===================================================== */
@media (max-height: 500px) and (orientation: landscape) {
    section {
        padding-top: 2rem;
        padding-bottom: 2rem;
    }

    .btn,
    .btn-ct-accent,
    .btn-outline-ct-accent {
        width: auto;
        min-height: 44px;
        padding: 0.75rem 1.5rem;
    }
}
