/*
Theme Name: ذهب وعمارة
Author: WordPress Telex
Description: A luxury dark theme with gold accents designed for Arabic-speaking local businesses. Features full RTL support, dramatic obsidian-and-gold palette, and premium typography using Tajawal and Cairo.
Version: 0.1.0
Requires at least: 6.4
Tested up to: 6.8
Requires PHP: 7.4
License: GPLv2 or later
Text Domain: dhahab-wa-imarah
Tags: block-theme, full-site-editing, rtl-language-support, custom-colors

ذهب وعمارة — Gold & Architecture theme for premium local businesses
*/

/* Gold shimmer animation for buttons */
@keyframes goldShimmer {
    0% { background-position: -200% center; }
    100% { background-position: 200% center; }
}

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

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

/* Global body */
body {
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Sticky header */
.site-header-group {
    position: sticky;
    top: 0;
    z-index: 100;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    transition: background-color 0.3s ease, box-shadow 0.3s ease;
}

/* Navigation link hover effects */
.site-header-group .wp-block-navigation a {
    position: relative;
    transition: color 0.3s ease;
}

.site-header-group .wp-block-navigation a:hover {
    color: #F0D080 !important;
}

.site-header-group .wp-block-navigation a::after {
    content: '';
    position: absolute;
    bottom: -2px;
    right: 0;
    width: 0;
    height: 1px;
    background: linear-gradient(90deg, #C9A84C, #F0D080);
    transition: width 0.3s ease;
}

.site-header-group .wp-block-navigation a:hover::after {
    width: 100%;
}

/* Gold gradient text utility */
.gold-gradient-text {
    background: linear-gradient(135deg, #C9A84C 20%, #F7F2E8 50%, #F0D080 80%);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent !important;
}

/* Gold border accent on left (RTL: right) */
.gold-border-accent {
    border-right: 3px solid #C9A84C;
    padding-right: 1.5rem;
}

/* Card hover effects */
.service-cards .wp-block-column {
    transition: transform 0.4s ease, box-shadow 0.4s ease;
}

.service-cards .wp-block-column:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 40px rgba(201, 168, 76, 0.15);
}

/* Gold underline for section headings */
.gold-underline::after {
    content: '';
    display: block;
    width: 60px;
    height: 2px;
    background: linear-gradient(90deg, #C9A84C, #F0D080);
    margin-top: 1rem;
}

/* Project cards */
.project-card {
    overflow: hidden;
    position: relative;
}

.project-card img {
    transition: transform 0.6s ease, filter 0.6s ease;
}

.project-card:hover img {
    transform: scale(1.05);
    filter: brightness(0.7);
}

/* Button shimmer effect */
.wp-block-button.shimmer-btn .wp-block-button__link {
    background-size: 200% auto;
    background-image: linear-gradient(90deg, #C9A84C, #F0D080, #C9A84C);
    transition: all 0.4s ease;
}

.wp-block-button.shimmer-btn .wp-block-button__link:hover {
    animation: goldShimmer 1.5s ease infinite;
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(201, 168, 76, 0.3);
}

/* Outline button */
.wp-block-button.outline-gold .wp-block-button__link {
    background: transparent !important;
    border: 1px solid rgba(247, 242, 232, 0.4);
    color: #F7F2E8 !important;
    transition: all 0.3s ease;
}

.wp-block-button.outline-gold .wp-block-button__link:hover {
    border-color: #F0D080;
    color: #F0D080 !important;
}

/* Dot pattern overlay */
.dot-pattern-overlay {
    position: relative;
}

.dot-pattern-overlay::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image: radial-gradient(#C9A84C 1px, transparent 1px);
    background-size: 40px 40px;
    opacity: 0.04;
    pointer-events: none;
    z-index: 0;
}

/* Testimonial quote styling */
.testimonial-card {
    position: relative;
}

.testimonial-card::before {
    content: '\201D';
    position: absolute;
    top: -10px;
    right: 20px;
    font-size: 5rem;
    font-family: 'Tajawal', sans-serif;
    color: #C9A84C;
    opacity: 0.3;
    line-height: 1;
}

/* Equal cards layout */
.equal-cards > .wp-block-column {
    display: flex;
    flex-direction: column;
    flex-grow: 0;
}

.equal-cards > .wp-block-column > .wp-block-group {
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.equal-cards .cta-bottom {
    margin-top: auto;
    justify-content: center;
}

/* Footer margin reset */
.wp-site-blocks > footer {
    margin-block-start: 0;
}

/* ── Fixed Side Buttons ── */
.dhahab-fixed-side-buttons {
    position: fixed;
    left: 22px;
    top: 50%;
    transform: translateY(-50%);
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.dhahab-side-btn {
    position: relative;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    background: rgba(13, 13, 13, 0.85);
    border: 1px solid rgba(201, 168, 76, 0.5);
    color: #F0D080;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.4);
    transition: transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1),
                background 0.3s ease,
                border-color 0.3s ease,
                box-shadow 0.3s ease,
                color 0.3s ease;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

.dhahab-side-btn svg {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
    transition: transform 0.3s ease;
}

.dhahab-side-btn:hover {
    transform: scale(1.15);
    background: linear-gradient(135deg, #C9A84C, #F0D080);
    border-color: #F0D080;
    color: #0D0D0D;
    box-shadow: 0 0 20px rgba(201, 168, 76, 0.45), 0 8px 24px rgba(0, 0, 0, 0.3);
}

.dhahab-side-btn:hover svg {
    transform: scale(1.1);
}

.dhahab-side-btn:focus-visible {
    outline: 2px solid #F0D080;
    outline-offset: 3px;
}

/* Tooltip */
.dhahab-side-btn__tooltip {
    position: absolute;
    right: calc(100% + 14px);
    top: 50%;
    transform: translateY(-50%) translateX(8px);
    background: rgba(13, 13, 13, 0.92);
    border: 1px solid rgba(201, 168, 76, 0.4);
    color: #F0D080;
    font-family: 'Tajawal', sans-serif;
    font-size: 0.8rem;
    font-weight: 600;
    padding: 6px 14px;
    border-radius: 4px;
    white-space: nowrap;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.25s ease, transform 0.25s ease;
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
}

.dhahab-side-btn__tooltip::after {
    content: '';
    position: absolute;
    left: 100%;
    top: 50%;
    transform: translateY(-50%);
    border: 5px solid transparent;
    border-left-color: rgba(13, 13, 13, 0.92);
}

.dhahab-side-btn:hover .dhahab-side-btn__tooltip {
    opacity: 1;
    transform: translateY(-50%) translateX(0);
}

/* WhatsApp specific pulse */
.dhahab-side-btn--whatsapp {
    border-color: rgba(37, 211, 102, 0.5);
    color: #25D366;
}

.dhahab-side-btn--whatsapp:hover {
    background: linear-gradient(135deg, #25D366, #128C7E);
    border-color: #25D366;
    color: #fff;
    box-shadow: 0 0 20px rgba(37, 211, 102, 0.4), 0 8px 24px rgba(0, 0, 0, 0.3);
}

/* Phone specific ring animation on hover */
@keyframes phoneRing {
    0% { transform: rotate(0deg); }
    10% { transform: rotate(14deg); }
    20% { transform: rotate(-10deg); }
    30% { transform: rotate(10deg); }
    40% { transform: rotate(-6deg); }
    50% { transform: rotate(4deg); }
    60% { transform: rotate(0deg); }
    100% { transform: rotate(0deg); }
}

.dhahab-side-btn--phone:hover svg {
    animation: phoneRing 0.8s ease;
    transform: none;
}

/* Entrance animation */
@keyframes sideButtonsSlideIn {
    from {
        opacity: 0;
        transform: translateY(-50%) translateX(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(-50%) translateX(0);
    }
}

.dhahab-fixed-side-buttons {
    animation: sideButtonsSlideIn 0.6s cubic-bezier(0.34, 1.56, 0.64, 1) 0.5s both;
}

/* Stagger individual button entrance */
.dhahab-side-btn:nth-child(1) { animation: fadeInUp 0.4s ease 0.6s both; }
.dhahab-side-btn:nth-child(2) { animation: fadeInUp 0.4s ease 0.75s both; }
.dhahab-side-btn:nth-child(3) { animation: fadeInUp 0.4s ease 0.9s both; }
.dhahab-side-btn:nth-child(4) { animation: fadeInUp 0.4s ease 1.05s both; }
.dhahab-side-btn:nth-child(5) { animation: fadeInUp 0.4s ease 1.2s both; }
.dhahab-side-btn:nth-child(6) { animation: fadeInUp 0.4s ease 1.35s both; }

/* Mobile: bottom horizontal layout */
@media (max-width: 782px) {
    .dhahab-fixed-side-buttons {
        top: auto;
        bottom: 16px;
        left: 50%;
        right: auto;
        transform: translateX(-50%);
        flex-direction: row;
        gap: 12px;
        animation-name: sideButtonsMobileSlideIn;
    }

    @keyframes sideButtonsMobileSlideIn {
        from {
            opacity: 0;
            transform: translateX(-50%) translateY(20px);
        }
        to {
            opacity: 1;
            transform: translateX(-50%) translateY(0);
        }
    }

    .dhahab-side-btn {
        width: 44px;
        height: 44px;
    }

    .dhahab-side-btn svg {
        width: 18px;
        height: 18px;
    }

    .dhahab-side-btn__tooltip {
        display: none;
    }
}

/* Separator gold gradient */
.wp-block-separator.gold-sep {
    border-color: transparent !important;
    background: linear-gradient(90deg, transparent, #C9A84C, #F0D080, #C9A84C, transparent) !important;
    height: 1px !important;
    opacity: 0.5;
}

/* Scroll-triggered fade in */
@media (prefers-reduced-motion: no-preference) {
    .fade-in-section {
        animation: fadeInUp 0.8s ease both;
    }

    .fade-in-section:nth-child(2) { animation-delay: 0.1s; }
    .fade-in-section:nth-child(3) { animation-delay: 0.2s; }
    .fade-in-section:nth-child(4) { animation-delay: 0.3s; }
}

/* Cover block adjustments for hero */
.hero-cover .wp-block-cover__inner-container {
    max-width: 1280px;
    width: 100%;
}

/* Mobile adjustments */
@media (max-width: 782px) {
    .service-cards .wp-block-column {
        flex-basis: 100% !important;
    }

    .gold-border-accent {
        border-right-width: 2px;
        padding-right: 1rem;
    }
}