/* ===========================
   ROOT VARIABLES - ALBAQAMI OFFICE
=========================== */
:root {
    /* Brand Colors - من تصميم العميل */
    --primary: #081A33;        /* اللون الأساسي - أزرق داكن */
    --primary-dark: #050F1E;   /* نسخة أغمق */
    --accent: #A8B0BA;         /* اللون الثانوي - رمادي فضي */
    --accent-dark: #8B94A0;    /* نسخة أغمق */
    --gold: #D4AF37;           /* لمسة ذهبية للأناقة */
    
    /* Neutrals */
    --white: #ffffff;
    --light: #F8FAFC;
    --gray: #64748b;
    --gray-light: #e2e8f0;
    --dark: #0f172a;
    
    /* Shadows */
    --shadow-sm: 0 2px 12px rgba(8, 26, 51, .08);
    --shadow-md: 0 8px 32px rgba(8, 26, 51, .15);
    --shadow-lg: 0 16px 56px rgba(8, 26, 51, .22);
    --shadow-xl: 0 24px 72px rgba(8, 26, 51, .30);
    
    /* Radius */
    --radius: 12px;
    --radius-lg: 20px;
    --radius-xl: 32px;
    
    /* Transitions */
    --transition: all .4s cubic-bezier(.4, 0, .2, 1);
    --transition-fast: all .25s ease;
    
    /* Spacing */
    --section-padding: clamp(64px, 8vw, 120px);
    --container-padding: clamp(20px, 3vw, 40px);
}

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

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

body {
    font-family: 'Helvetica Neue', Arial, sans-serif;
    background: var(--white);
    color: var(--dark);
    line-height: 1.7;
    overflow-x: hidden;
}

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

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

ul, ol {
    list-style: none;
}

button {
    font-family: inherit;
    cursor: pointer;
    border: none;
    background: none;
}

/* ===========================
   UTILITY CLASSES
=========================== */
.container {
    width: 100%;
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 var(--container-padding);
}

.container-narrow {
    max-width: 1200px;
}

.section-pad {
    padding: var(--section-padding) 0;
}

.section-header {
    text-align: center;
    margin-bottom: clamp(48px, 6vw, 80px);
    animation: fadeInUp .8s ease;
}

.section-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: .5rem;
    font-size: .85rem;
    font-weight: 700;
    letter-spacing: .15em;
    text-transform: uppercase;
    color: var(--primary);
    background: linear-gradient(135deg, rgba(8, 26, 51, .06), rgba(168, 176, 186, .08));
    padding: .5rem 1.3rem;
    border-radius: 50px;
    margin-bottom: 1.2rem;
    border: 1px solid rgba(8, 26, 51, .08);
}

.section-title {
    font-size: clamp(2rem, 5vw, 3.5rem);
    font-weight: 900;
    color: var(--primary);
    line-height: 1.15;
    margin-bottom: 1.2rem;
    letter-spacing: -.02em;
}

.section-title span {
    background: linear-gradient(135deg, var(--primary), var(--accent-dark));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.section-subtitle {
    font-size: clamp(1rem, 2vw, 1.2rem);
    color: var(--gray);
    max-width: 720px;
    margin: 0 auto;
    line-height: 1.85;
}

/* ===========================
   BUTTONS
=========================== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: .6rem;
    padding: 1rem 2.2rem;
    border-radius: 50px;
    font-weight: 700;
    font-size: 1rem;
    border: none;
    cursor: pointer;
    transition: var(--transition);
    text-decoration: none;
    position: relative;
    overflow: hidden;
    white-space: nowrap;
}

.btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, .2);
    transform: translate(-50%, -50%);
    transition: width .6s, height .6s;
}

.btn:hover::before {
    width: 300px;
    height: 300px;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: #fff;
    box-shadow: 0 8px 32px rgba(8, 26, 51, .35);
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 48px rgba(8, 26, 51, .45);
}

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

.btn-outline:hover {
    background: var(--primary);
    color: #fff;
    transform: translateY(-3px);
    box-shadow: var(--shadow-md);
}

.btn-white {
    background: #fff;
    color: var(--primary);
    box-shadow: 0 6px 24px rgba(0, 0, 0, .12);
}

.btn-white:hover {
    background: var(--light);
    transform: translateY(-3px);
    box-shadow: 0 10px 32px rgba(0, 0, 0, .18);
}

.btn-gold {
    background: linear-gradient(135deg, var(--gold), #B8941F);
    color: var(--primary);
    box-shadow: 0 8px 32px rgba(212, 175, 55, .35);
}

.btn-gold:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 48px rgba(212, 175, 55, .50);
}

.btn i {
    font-size: 1.1rem;
}

/* ===========================
   CARDS
=========================== */
.card {
    background: #fff;
    border-radius: var(--radius-lg);
    padding: 0;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
    border: 1px solid rgba(8, 26, 51, .05);
    height: 100%;
    overflow: hidden;
}

.card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-lg);
    border-color: rgba(8, 26, 51, .12);
}

.card-image {
    width: 100%;
    height: 200px;
    overflow: hidden;
    position: relative;
}

.card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform .6s ease;
}

.card:hover .card-image img {
    transform: scale(1.1);
}

.card-image .card-icon {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 70px;
    height: 70px;
    background: rgba(8, 26, 51, .9);
    backdrop-filter: blur(8px);
    border-radius: var(--radius);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow-lg);
    border: 3px solid var(--gold);
    transition: var(--transition);
}

.card:hover .card-image .card-icon {
    transform: translate(-50%, -50%) scale(1.1) rotate(5deg);
    border-color: #fff;
    background: rgba(8, 26, 51, .95);
}

.card-image .card-icon i {
    font-size: 2rem;
    color: var(--gold);
}

.card-content {
    padding: clamp(1.5rem, 3vw, 2rem);
}

.card-title {
    font-size: 1.4rem;
    font-weight: 800;
    color: var(--primary);
    margin-bottom: .8rem;
}

.card-desc {
    color: var(--gray);
    line-height: 1.8;
    font-size: .95rem;
}

/* Cards without images - Why Us Section */
#why-us .card {
    padding: clamp(1.8rem, 3vw, 2.5rem);
}

#why-us .card-icon {
    position: static;
    transform: none;
    width: 64px;
    height: 64px;
    background: linear-gradient(135deg, var(--primary), var(--accent-dark));
    border-radius: var(--radius);
    margin-bottom: 1.5rem;
    border: none;
    box-shadow: var(--shadow-md);
}

#why-us .card:hover .card-icon {
    transform: scale(1.05) rotate(0);
}

#why-us .card-icon i {
    font-size: 2rem;
    color: #fff;
}

.card-icon::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-size: cover;
    background-position: center;
    opacity: .2;
    transition: var(--transition);
}

.card:hover .card-icon::before {
    opacity: .35;
    transform: scale(1.1);
}

.card-icon i {
    font-size: 2rem;
    color: #fff;
    position: relative;
    z-index: 1;
}

/* Call to Action Section */
.cta-section {
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    padding: 4rem 2rem;
    border-radius: var(--radius-xl);
    text-align: center;
    position: relative;
    overflow: hidden;
    margin-top: 4rem;
}

.cta-section::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(212, 175, 55, .1) 1px, transparent 1px);
    background-size: 40px 40px;
    opacity: .6;
}

.cta-section h3 {
    font-size: clamp(1.8rem, 4vw, 2.8rem);
    font-weight: 900;
    color: #fff;
    margin-bottom: 1.2rem;
    position: relative;
    z-index: 1;
}

.cta-section p {
    font-size: 1.15rem;
    color: rgba(255, 255, 255, .85);
    margin-bottom: 2rem;
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
    position: relative;
    z-index: 1;
}

.card-title {
    font-size: 1.4rem;
    font-weight: 800;
    color: var(--primary);
    margin-bottom: .8rem;
}

.card-desc {
    color: var(--gray);
    line-height: 1.8;
    font-size: .95rem;
}

/* ===========================
   GRID LAYOUTS
=========================== */
.grid-2 {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: clamp(1.5rem, 3vw, 2.5rem);
}

.grid-3 {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: clamp(2rem, 4vw, 3rem);
}

.grid-4 {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: clamp(1.5rem, 3vw, 2rem);
}

/* ===========================
   ANIMATIONS
=========================== */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-40px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(40px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes scaleIn {
    from {
        opacity: 0;
        transform: scale(.9);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-20px); }
}

/* ===========================
   RESPONSIVE UTILITIES
=========================== */
@media (max-width: 768px) {
    .grid-2,
    .grid-3,
    .grid-4 {
        grid-template-columns: 1fr;
    }
    
    .section-title {
        font-size: 2rem;
    }
    
    .btn {
        width: 100%;
        padding: 1rem 1.5rem;
    }
}

/* ===========================
   SCROLLBAR STYLING
=========================== */
::-webkit-scrollbar {
    width: 12px;
}

::-webkit-scrollbar-track {
    background: var(--light);
}

::-webkit-scrollbar-thumb {
    background: var(--accent);
    border-radius: 6px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--primary);
}

/* ===========================
   SELECTION STYLING
=========================== */
::selection {
    background: var(--primary);
    color: #fff;
}

::-moz-selection {
    background: var(--primary);
    color: #fff;
}
