/**
 * الشاعر الموسيقار أحمد الشوكي — عراب الموسيقى
 * Custom CSS — Additional Styles & Overrides
 *
 * @package Ahmed_El_Shouki
 * @author عبدالرازق خشبه
 * @version 1.0
 */

/* ========================================
   CUSTOM FONTS LOADING
   ======================================== */
@font-face {
    font-family: 'Amiri';
    font-style: normal;
    font-weight: 400;
    font-display: swap;
    src: local('Amiri'), local('Amiri-Regular');
}

@font-face {
    font-family: 'Amiri';
    font-style: normal;
    font-weight: 700;
    font-display: swap;
    src: local('Amiri Bold'), local('Amiri-Bold');
}

@font-face {
    font-family: 'Cairo';
    font-style: normal;
    font-weight: 400;
    font-display: swap;
    src: local('Cairo'), local('Cairo-Regular');
}

@font-face {
    font-family: 'Cairo';
    font-style: normal;
    font-weight: 600;
    font-display: swap;
    src: local('Cairo SemiBold'), local('Cairo-SemiBold');
}

@font-face {
    font-family: 'Cairo';
    font-style: normal;
    font-weight: 700;
    font-display: swap;
    src: local('Cairo Bold'), local('Cairo-Bold');
}

/* ========================================
   GUTENBERG BLOCK STYLES
   ======================================== */
.wp-block-quote {
    border-right: 4px solid var(--deep-gold);
    padding-right: 1.5rem;
    margin: 2rem 0;
    font-family: var(--font-arabic-heading);
    font-size: 1.2rem;
    color: var(--warm-ivory);
    font-style: italic;
}

.wp-block-quote cite {
    color: var(--deep-gold);
    font-size: 0.9rem;
    font-style: normal;
}

.wp-block-pullquote {
    border-top: 2px solid var(--deep-gold);
    border-bottom: 2px solid var(--deep-gold);
    padding: 2rem 0;
    margin: 3rem 0;
    font-family: var(--font-arabic-heading);
    color: var(--warm-ivory);
    text-align: center;
}

.wp-block-pullquote blockquote {
    border: none;
    padding: 0;
    font-size: 1.5rem;
}

.wp-block-pullquote cite {
    color: var(--deep-gold);
}

.wp-block-separator {
    border: none;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--deep-gold), transparent);
    margin: 3rem auto;
    max-width: 200px;
}

.wp-block-embed {
    margin: 2rem 0;
}

.wp-block-embed iframe {
    border-radius: 8px;
    max-width: 100%;
}

.wp-block-image img {
    border-radius: 8px;
}

.wp-block-gallery {
    display: grid;
    gap: 1rem;
}

/* ========================================
   POEM READING EXPERIENCE
   ======================================== */
.poem-content {
    font-family: var(--font-arabic-heading);
    font-size: 1.4rem;
    line-height: 2.8;
    color: var(--warm-ivory);
    text-align: center;
}

.poem-content p {
    margin-bottom: 2rem;
    text-indent: 0;
}

.poem-content .verse {
    margin-bottom: 1.5rem;
}

/* Reading progress bar */
.reading-progress {
    position: fixed;
    top: 0;
    left: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--deep-gold), var(--burgundy));
    z-index: 9999;
    transition: width 0.1s linear;
}

/* ========================================
   LIGHTBOX FOR GALLERY
   ======================================== */
.lightbox-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.9);
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.lightbox-overlay.active {
    opacity: 1;
    pointer-events: all;
}

.lightbox-overlay img {
    max-width: 90%;
    max-height: 90vh;
    border-radius: 8px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}

.lightbox-close {
    position: absolute;
    top: 20px;
    left: 20px;
    width: 40px;
    height: 40px;
    background: rgba(201, 166, 107, 0.2);
    border: 1px solid rgba(201, 166, 107, 0.3);
    border-radius: 50%;
    color: var(--warm-ivory);
    font-size: 1.2rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.lightbox-close:hover {
    background: var(--deep-gold);
    color: var(--midnight-navy);
}

/* ========================================
   BACK TO TOP BUTTON
   ======================================== */
.back-to-top {
    position: fixed;
    bottom: 2rem;
    left: 2rem;
    width: 45px;
    height: 45px;
    background: var(--deep-gold);
    color: var(--midnight-navy);
    border: none;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: 100;
    box-shadow: 0 4px 15px rgba(201, 166, 107, 0.3);
}

.back-to-top.visible {
    opacity: 1;
    visibility: visible;
}

.back-to-top:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(201, 166, 107, 0.4);
}

/* ========================================
   MOBILE MENU OVERLAY
   ======================================== */
.mobile-overlay {
    position: fixed;
    inset: 0;
    background: rgba(8, 17, 30, 0.7);
    z-index: 998;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.mobile-overlay.active {
    opacity: 1;
    pointer-events: all;
}

/* ========================================
   LOADING ANIMATION
   ======================================== */
.page-loader {
    position: fixed;
    inset: 0;
    background: var(--midnight-navy);
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: opacity 0.5s ease;
}

.page-loader.loaded {
    opacity: 0;
    pointer-events: none;
}

.loader-spinner {
    width: 50px;
    height: 50px;
    border: 3px solid rgba(201, 166, 107, 0.2);
    border-top-color: var(--deep-gold);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* ========================================
   RESPONSIVE AUDIO PLAYER
   ======================================== */
.audio-player audio {
    width: 100%;
    height: 40px;
    border-radius: 4px;
    outline: none;
}

.audio-player audio::-webkit-media-controls-panel {
    background: rgba(15, 26, 46, 0.8);
}

/* ========================================
   NOUVEAU ORNAMENTAL PATTERNS
   ======================================== */
.ornament-pattern {
    position: relative;
}

.ornament-pattern::before {
    content: '';
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    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='%23C9A66B' fill-opacity='0.03'%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");
    pointer-events: none;
    z-index: 0;
}

/* ========================================
   SPECIAL EFFECTS
   ======================================== */
.gold-glow {
    text-shadow: 0 0 20px rgba(201, 166, 107, 0.3);
}

.text-gradient-gold {
    background: linear-gradient(135deg, var(--warm-ivory), var(--deep-gold));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hover-lift {
    transition: transform 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.hover-lift:hover {
    transform: translateY(-8px);
}

/* ========================================
   WORDPRESS SPECIFIC
   ======================================== */
.wp-caption {
    max-width: 100%;
}

.wp-caption-text {
    font-size: 0.85rem;
    color: var(--text-muted);
    text-align: center;
    margin-top: 0.5rem;
}

.sticky {
    border-right: 3px solid var(--deep-gold);
}

.gallery-caption {
    font-size: 0.8rem;
    color: var(--text-muted);
}

/* ========================================
   SEARCH RESULTS
   ======================================== */
.search-results .page-banner h1 {
    font-size: 2rem;
}

/* ========================================
   404 PAGE
   ======================================== */
.error404 .site-main {
    min-height: 60vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 4rem 2rem;
}

.error404 h1 {
    font-size: 6rem;
    color: var(--deep-gold);
    line-height: 1;
}

/* ========================================
   YOUTUBE LAZY LOAD
   ======================================== */
.youtube-lazy {
    position: relative;
    padding-bottom: 56.25%;
    height: 0;
    cursor: pointer;
    background: var(--midnight-light);
    border-radius: 8px;
    overflow: hidden;
}

.youtube-lazy img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.youtube-lazy:hover img {
    transform: scale(1.05);
}

.youtube-lazy .play-button {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 68px;
    height: 48px;
    background: rgba(141, 31, 31, 0.85);
    border-radius: 10px;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.3s ease;
}

.youtube-lazy:hover .play-button {
    background: rgba(141, 31, 31, 1);
}

.youtube-lazy .play-button::after {
    content: '';
    width: 0;
    height: 0;
    border-style: solid;
    border-width: 10px 0 10px 18px;
    border-color: transparent transparent transparent white;
    margin-left: 3px;
}
