/* ==========================================
   Fahed Group — Custom Styles
   ========================================== */

/* --- Base & Resets --- */
html {
    scroll-behavior: smooth;
    scroll-padding-top: 80px;
}

[x-cloak] {
    display: none !important;
}

::selection {
    background-color: #C5A254;
    color: #091D36;
}

/* --- Custom Scrollbar --- */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #091D36;
}

.dark ::-webkit-scrollbar-track {
    background: #111827;
}

::-webkit-scrollbar-thumb {
    background: #C5A254;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #D4B978;
}

/* --- Hero Section Parallax --- */
#home {
    perspective: 1px;
}

#home > .absolute:first-child img {
    will-change: transform;
}

/* --- Gold Line Accent --- */
.gold-line {
    position: relative;
}

.gold-line::after {
    content: '';
    position: absolute;
    bottom: -8px;
    left: 0;
    width: 60px;
    height: 3px;
    background: linear-gradient(90deg, #C5A254, #D4B978);
    border-radius: 2px;
}

[dir="rtl"] .gold-line::after {
    left: auto;
    right: 0;
}

/* --- Service Card Hover Effects --- */
.service-card {
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.service-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 25px 50px -12px rgba(15, 42, 74, 0.15);
}

/* --- Gallery Masonry Enhancement --- */
.columns-1 > div,
.columns-2 > div,
.columns-3 > div,
.columns-4 > div {
    break-inside: avoid;
}

/* --- Smooth Image Loading --- */
img {
    transition: opacity 0.3s ease;
}

img[loading="lazy"] {
    opacity: 0;
}

img[loading="lazy"].loaded,
img:not([loading="lazy"]) {
    opacity: 1;
}

/* --- Navigation Active State --- */
.nav-link.active {
    color: #C5A254 !important;
}

.nav-link.active span {
    width: 75% !important;
}

/* --- Counter Animation --- */
.counter {
    font-variant-numeric: tabular-nums;
}

/* --- Contact Form Focus Effects --- */
input:focus,
textarea:focus,
select:focus {
    outline: none;
}

/* --- Gradient Text --- */
.gradient-text {
    background: linear-gradient(135deg, #C5A254, #D4B978);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* --- Section Fade on Scroll --- */
.section-fade {
    will-change: opacity, transform;
}

/* --- Subtle Floating Animation --- */
@keyframes float {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-10px);
    }
}

.animate-float {
    animation: float 6s ease-in-out infinite;
}

/* --- Shimmer Loading Effect --- */
@keyframes shimmer {
    0% {
        background-position: -200% 0;
    }
    100% {
        background-position: 200% 0;
    }
}

.shimmer {
    background: linear-gradient(90deg, transparent, rgba(197, 162, 84, 0.1), transparent);
    background-size: 200% 100%;
    animation: shimmer 3s infinite;
}

/* --- Section Divider --- */
.section-divider {
    height: 1px;
    background: linear-gradient(90deg, transparent, #C5A254, transparent);
    opacity: 0.3;
}

/* --- Page Hero for standalone pages --- */
.page-hero {
    background: linear-gradient(135deg, #091D36 0%, #0F2A4A 50%, #1A3D5C 100%);
    position: relative;
    overflow: hidden;
}

.page-hero::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -20%;
    width: 60%;
    height: 200%;
    background: radial-gradient(ellipse, rgba(197, 162, 84, 0.08) 0%, transparent 70%);
    pointer-events: none;
}

[dir="rtl"] .page-hero::before {
    right: auto;
    left: -20%;
}

/* --- Dark Mode Specific --- */
.dark .service-card:hover {
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.4);
}

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

[dir="rtl"] .text-center {
    text-align: center;
}

/* --- Responsive Adjustments --- */
@media (max-width: 640px) {
    .font-heading {
        letter-spacing: -0.02em;
    }
}

/* --- Print Styles --- */
@media print {
    nav, .animate-bounce, footer {
        display: none;
    }

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