/* ==========================================
   فتحية محمد كريم للستائر والمجالس
   Custom Stylesheet
   ========================================== */

:root {
    --gold: #C6A55C;
    --gold-light: #D4B978;
    --gold-dark: #A88B3D;
    --beige: #F7F3ED;
    --beige-dark: #E8E0D0;
    --dark: #1A1A2E;
    --dark-brown: #2C1810;
}

html {
    scroll-behavior: smooth;
    scroll-padding-top: 80px;
}

body {
    font-family: 'Tajawal', 'Cairo', sans-serif;
    line-height: 1.75;
    overflow-x: hidden;
}

[dir="rtl"] { text-align: right; }
[dir="ltr"] { text-align: left; }

/* --- Navbar --- */
.navbar-scrolled {
    background: rgba(255, 255, 255, 0.98) !important;
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.1);
    backdrop-filter: blur(10px);
}

.nav-link {
    position: relative;
    font-weight: 600;
    color: #2C1810;
    transition: color 0.3s;
    padding: 0.5rem 0;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    right: 0;
    width: 0;
    height: 2px;
    background: var(--gold);
    transition: width 0.3s;
}

.nav-link:hover::after,
.nav-link.active::after {
    width: 100%;
}

.nav-link:hover,
.nav-link.active {
    color: var(--gold);
}

[dir="ltr"] .nav-link::after {
    right: auto;
    left: 0;
}

/* --- Hero --- */
.hero-overlay {
    background: linear-gradient(135deg, rgba(44, 24, 16, 0.85) 0%, rgba(26, 26, 46, 0.7) 100%);
}

.hero-pattern {
    background-image: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23C6A55C' fill-opacity='0.08'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
}

/* --- Animations --- */
@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(30px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes fadeInRight {
    from { opacity: 0; transform: translateX(30px); }
    to { opacity: 1; transform: translateX(0); }
}

@keyframes fadeInLeft {
    from { opacity: 0; transform: translateX(-30px); }
    to { opacity: 1; transform: translateX(0); }
}

@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

@keyframes pulse-gold {
    0%, 100% { box-shadow: 0 0 0 0 rgba(198, 165, 92, 0.4); }
    50% { box-shadow: 0 0 0 15px rgba(198, 165, 92, 0); }
}

@keyframes shimmer {
    0% { background-position: -200% center; }
    100% { background-position: 200% center; }
}

.animate-fade-up { animation: fadeInUp 0.8s ease forwards; }
.animate-fade-right { animation: fadeInRight 0.8s ease forwards; }
.animate-fade-left { animation: fadeInLeft 0.8s ease forwards; }
.animate-float { animation: float 3s ease-in-out infinite; }
.animate-pulse-gold { animation: pulse-gold 2s ease-in-out infinite; }

/* Scroll Reveal */
.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}
.reveal.active {
    opacity: 1;
    transform: translateY(0);
}

.reveal-right {
    opacity: 0;
    transform: translateX(50px);
    transition: all 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}
.reveal-right.active {
    opacity: 1;
    transform: translateX(0);
}

.reveal-left {
    opacity: 0;
    transform: translateX(-50px);
    transition: all 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}
.reveal-left.active {
    opacity: 1;
    transform: translateX(0);
}

.stagger-1 { transition-delay: 0.1s; }
.stagger-2 { transition-delay: 0.2s; }
.stagger-3 { transition-delay: 0.3s; }
.stagger-4 { transition-delay: 0.4s; }
.stagger-5 { transition-delay: 0.5s; }
.stagger-6 { transition-delay: 0.6s; }

/* --- Cards --- */
.service-card {
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid transparent;
}
.service-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 60px rgba(198, 165, 92, 0.15);
    border-color: var(--gold-light);
}

.feature-card {
    transition: all 0.3s ease;
}
.feature-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
}

/* --- Image Placeholders --- */
.img-placeholder {
    background: linear-gradient(135deg, #E8DFD0 0%, #D4C9B8 50%, #C6B99A 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.img-placeholder::before {
    content: '';
    position: absolute;
    inset: 0;
    background: repeating-linear-gradient(
        45deg,
        transparent,
        transparent 10px,
        rgba(198, 165, 92, 0.06) 10px,
        rgba(198, 165, 92, 0.06) 20px
    );
}

.img-placeholder i {
    position: relative;
    z-index: 1;
    color: var(--gold);
    opacity: 0.4;
}

.img-placeholder-dark {
    background: linear-gradient(135deg, #3D2B1F 0%, #2C1810 50%, #1A1A2E 100%);
}
.img-placeholder-dark i {
    color: var(--gold-light);
    opacity: 0.3;
}

/* --- Gallery --- */
.gallery-item {
    overflow: hidden;
    border-radius: 12px;
    cursor: pointer;
    position: relative;
    transition: all 0.4s ease;
}
.gallery-item:hover {
    transform: scale(1.03);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.15);
}

.gallery-item .overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(44, 24, 16, 0.8) 0%, transparent 60%);
    opacity: 0;
    transition: opacity 0.3s;
    display: flex;
    align-items: flex-end;
    padding: 1.5rem;
}
.gallery-item:hover .overlay {
    opacity: 1;
}

.gallery-grid-item {
    transition: opacity 0.4s, transform 0.4s;
}

.filter-btn {
    padding: 0.5rem 1.5rem;
    border-radius: 50px;
    border: 2px solid var(--beige-dark);
    background: transparent;
    color: var(--dark-brown);
    font-family: 'Cairo', sans-serif;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
}
.filter-btn:hover,
.filter-btn.active {
    background: var(--gold);
    border-color: var(--gold);
    color: white;
}

/* --- Lightbox --- */
.lightbox {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.95);
    z-index: 9999;
    display: none;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s;
}
.lightbox.active {
    display: flex;
    opacity: 1;
}

.lightbox-content {
    max-width: 90vw;
    max-height: 90vh;
    border-radius: 12px;
    overflow: hidden;
}

.lightbox-close {
    position: fixed;
    top: 20px;
    right: 20px;
    color: white;
    font-size: 2rem;
    cursor: pointer;
    z-index: 10000;
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    border: none;
    transition: background 0.3s;
}
.lightbox-close:hover {
    background: rgba(255, 255, 255, 0.25);
}

/* --- Before/After Slider --- */
.ba-container {
    position: relative;
    overflow: hidden;
    border-radius: 16px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.12);
}

.ba-img {
    width: 100%;
    height: 280px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.ba-before-wrap {
    position: absolute;
    top: 0;
    right: 0;
    width: 50%;
    height: 100%;
    overflow: hidden;
    z-index: 2;
    border-left: 3px solid var(--gold);
}

[dir="ltr"] .ba-before-wrap {
    right: auto;
    left: 0;
    border-left: none;
    border-right: 3px solid var(--gold);
}

.ba-before-wrap .ba-img {
    position: absolute;
    top: 0;
    right: 0;
    width: 200%;
}

[dir="ltr"] .ba-before-wrap .ba-img {
    right: auto;
    left: 0;
}

.ba-label {
    position: absolute;
    bottom: 15px;
    padding: 4px 16px;
    border-radius: 50px;
    font-size: 0.875rem;
    font-weight: 700;
    z-index: 5;
}

.ba-label-before {
    right: 15px;
    background: rgba(220, 38, 38, 0.85);
    color: white;
}

.ba-label-after {
    left: 15px;
    background: rgba(22, 163, 74, 0.85);
    color: white;
}

[dir="ltr"] .ba-label-before {
    right: auto;
    left: 15px;
}
[dir="ltr"] .ba-label-after {
    left: auto;
    right: 15px;
}

/* --- Testimonials --- */
.testimonial-card {
    transition: all 0.3s ease;
}
.testimonial-card:hover {
    transform: translateY(-5px);
}

.stars {
    color: #F59E0B;
}

/* --- WhatsApp Float --- */
.whatsapp-float {
    position: fixed;
    bottom: 30px;
    left: 30px;
    z-index: 1000;
    width: 60px;
    height: 60px;
    background: #25D366;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.8rem;
    box-shadow: 0 4px 15px rgba(37, 211, 102, 0.4);
    transition: all 0.3s;
    text-decoration: none;
}

[dir="ltr"] .whatsapp-float {
    left: auto;
    right: 30px;
}

.whatsapp-float:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 25px rgba(37, 211, 102, 0.5);
    color: white;
}

/* --- Back to Top --- */
.back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    z-index: 1000;
    width: 50px;
    height: 50px;
    background: var(--gold);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.2rem;
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s;
    border: none;
}

[dir="ltr"] .back-to-top {
    right: auto;
    left: 30px;
}

.back-to-top.visible {
    opacity: 1;
    visibility: visible;
}
.back-to-top:hover {
    background: var(--gold-dark);
    transform: translateY(-3px);
}

/* --- Section Divider --- */
.section-divider {
    width: 80px;
    height: 3px;
    background: linear-gradient(to left, var(--gold), var(--gold-dark));
    border-radius: 3px;
}

/* --- Mobile Menu --- */
.mobile-menu {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 100;
    display: none;
    opacity: 0;
    transition: opacity 0.3s;
}
.mobile-menu.active {
    display: block;
    opacity: 1;
}

.mobile-menu-content {
    position: fixed;
    top: 0;
    right: -320px;
    width: 300px;
    height: 100%;
    background: white;
    z-index: 101;
    transition: right 0.3s ease;
    overflow-y: auto;
    box-shadow: -5px 0 20px rgba(0, 0, 0, 0.15);
}

[dir="ltr"] .mobile-menu-content {
    right: auto;
    left: -320px;
    transition: left 0.3s ease;
    box-shadow: 5px 0 20px rgba(0, 0, 0, 0.15);
}

.mobile-menu.active .mobile-menu-content {
    right: 0;
}
[dir="ltr"] .mobile-menu.active .mobile-menu-content {
    right: auto;
    left: 0;
}

/* --- Form --- */
.form-input {
    width: 100%;
    padding: 0.875rem 1.25rem;
    border: 2px solid var(--beige-dark);
    border-radius: 10px;
    font-family: 'Cairo', sans-serif;
    font-size: 1rem;
    transition: all 0.3s;
    background: white;
}
.form-input:focus {
    outline: none;
    border-color: var(--gold);
    box-shadow: 0 0 0 4px rgba(198, 165, 92, 0.1);
}

/* --- Scrollbar --- */
::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-track { background: var(--beige); }
::-webkit-scrollbar-thumb { background: var(--gold); border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: var(--gold-dark); }

/* --- Gold Gradient Text --- */
.text-gradient-gold {
    background: linear-gradient(135deg, var(--gold) 0%, var(--gold-light) 50%, var(--gold-dark) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* --- Counter --- */
.counter {
    font-size: 3rem;
    font-weight: 800;
    color: var(--gold);
    line-height: 1;
}

/* --- Badge --- */
.badge-gold {
    display: inline-block;
    background: linear-gradient(135deg, var(--gold) 0%, var(--gold-light) 100%);
    color: white;
    padding: 0.25rem 1rem;
    border-radius: 50px;
    font-size: 0.875rem;
    font-weight: 600;
}

/* --- Page Hero --- */
.page-hero {
    min-height: 350px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    position: relative;
}

/* --- Responsive --- */
@media (max-width: 768px) {
    .hero-title { font-size: 2rem !important; }
    .section-title { font-size: 1.75rem !important; }
    .whatsapp-float {
        bottom: 20px;
        left: 20px;
        width: 55px;
        height: 55px;
        font-size: 1.5rem;
    }
    .back-to-top {
        bottom: 20px;
        right: 20px;
        width: 45px;
        height: 45px;
    }
    .counter { font-size: 2.25rem; }
    .ba-img { height: 200px; }
}

@media (max-width: 480px) {
    .hero-title { font-size: 1.6rem !important; }
    .section-title { font-size: 1.5rem !important; }
}
