/*
 * Tuwaiq Theme - Custom Styles
 * Complements theme.json with styles that can't be expressed in JSON
 */

/* ═══════════════════════════════════════════
   BASE
   ═══════════════════════════════════════════ */

html {
    direction: rtl;
    scroll-behavior: smooth;
}

body {
    font-family: 'Cairo', sans-serif;
    font-size: 18px;
    line-height: 1.8;
    color: #2d3748;
}

/* ═══════════════════════════════════════════
   TYPOGRAPHY
   ═══════════════════════════════════════════ */

h1, h2, h3, h4, h5, h6 {
    font-family: 'Cairo', sans-serif;
    font-weight: 700;
    line-height: 1.4;
    color: #1a1a1a;
}

.font-en, [lang="en"] {
    font-family: 'Inter', sans-serif;
    direction: ltr;
    display: inline;
    unicode-bidi: isolate;
    line-height: 1.6;
}

/* ═══════════════════════════════════════════
   HEADER
   ═══════════════════════════════════════════ */

.tuwaiq-header {
    position: sticky;
    top: 0;
    z-index: 50;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    background-color: rgba(255, 255, 255, 0.95) !important;
}

/* Telegram CTA Button in Header */
.tuwaiq-telegram-btn {
    display: none;
}

@media (min-width: 640px) {
    .tuwaiq-telegram-btn {
        display: inline-flex;
    }
    
    .tuwaiq-telegram-btn a {
        display: inline-flex;
        align-items: center;
        gap: 0.5rem;
        padding: 0.625rem 1.25rem;
        border-radius: 0.5rem;
        font-weight: 600;
        font-size: 0.875rem;
        color: #ffffff !important;
        background: linear-gradient(135deg, #0088cc 0%, #229ED9 100%);
        box-shadow: 0 2px 8px rgba(0, 136, 204, 0.3);
        white-space: nowrap;
        transition: all 0.3s ease;
        text-decoration: none !important;
    }
    
    .tuwaiq-telegram-btn a:hover {
        transform: translateY(-2px);
        box-shadow: 0 4px 12px rgba(0, 136, 204, 0.5);
    }
}

/* ═══════════════════════════════════════════
   CARDS
   ═══════════════════════════════════════════ */

.tuwaiq-article-card,
.tuwaiq-category-card,
.tuwaiq-feature-card {
    transition: all 0.3s ease-in-out;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    overflow: hidden;
}

.tuwaiq-article-card:hover,
.tuwaiq-category-card:hover,
.tuwaiq-feature-card:hover {
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
    transform: translateY(-4px);
}

.tuwaiq-category-card {
    position: relative;
}

.tuwaiq-category-card img {
    transition: transform 0.3s ease;
}

.tuwaiq-category-card:hover img {
    transform: scale(1.05);
}

.tuwaiq-card-badge {
    position: absolute;
    top: 0.75rem;
    inset-inline-start: 0.75rem;
    z-index: 10;
    margin: 0 !important;
}

/* ═══════════════════════════════════════════
   BUTTONS
   ═══════════════════════════════════════════ */

.wp-block-button__link {
    font-family: 'Cairo', sans-serif;
    transition: all 0.3s ease;
}

.wp-block-button__link:hover {
    transform: translateY(-2px);
    opacity: 0.9;
}

/* ═══════════════════════════════════════════
   FOOTER
   ═══════════════════════════════════════════ */

.tuwaiq-footer a {
    color: #ffffff !important;
    text-decoration: none;
    transition: color 0.3s ease;
}

.tuwaiq-footer a:hover {
    color: #ff6633 !important;
}

.tuwaiq-footer-links {
    list-style: none !important;
    padding: 0 !important;
    margin: 0;
}

.tuwaiq-footer-links li {
    padding: 0;
    margin-bottom: 0.625rem;
}

.tuwaiq-footer-links a {
    color: #ffffff !important;
    text-decoration: none;
    transition: color 0.3s ease;
}

.tuwaiq-footer-links a:hover {
    color: #ff6633 !important;
}

/* ═══════════════════════════════════════════
   NAVIGATION
   ═══════════════════════════════════════════ */

.wp-block-navigation a {
    font-family: 'Cairo', sans-serif;
    font-weight: 600;
    transition: color 0.3s ease;
}

.wp-block-navigation a:hover {
    color: #000000;
}

.wp-block-navigation__submenu-container {
    min-width: 16rem;
    max-height: 70vh;
    overflow-y: auto;
    border-radius: 0.5rem;
    border: 1px solid #dce3ed;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
}

/* ═══════════════════════════════════════════
   BADGE STYLES
   ═══════════════════════════════════════════ */

.is-style-tuwaiq-badge {
    display: inline-block;
    font-size: 0.75rem;
    font-weight: 700;
    padding: 0.25rem 0.75rem;
    border-radius: 0.25rem;
    background: #000000;
    color: #ffffff;
}

/* ═══════════════════════════════════════════
   BLOCKQUOTE / TIP
   ═══════════════════════════════════════════ */

.wp-block-quote,
blockquote {
    border-inline-start: 0 !important;
    border-inline-end: 4px solid #ff6633;
    background: rgba(255, 102, 51, 0.05);
    padding: 1.25rem;
    border-radius: 0.5rem;
    margin: 1.5rem 0;
}

/* ═══════════════════════════════════════════
   PROMO CODE STYLES
   ═══════════════════════════════════════════ */

.tuwaiq-promo-code {
    font-family: 'Inter', monospace;
    letter-spacing: 3px;
    font-weight: 700;
    font-size: 1.5rem;
    user-select: all;
    direction: ltr;
    display: inline;
}

/* ═══════════════════════════════════════════
   ANIMATIONS
   ═══════════════════════════════════════════ */

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

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

.animate-fade-in {
    animation: fadeIn 0.6s ease-out forwards;
}

.animate-slide-up {
    animation: slideUp 0.6s ease-out forwards;
}

/* ═══════════════════════════════════════════
   RESPONSIVE
   ═══════════════════════════════════════════ */

@media (max-width: 768px) {
    body {
        font-size: 16px;
    }
    
    .wp-block-columns {
        flex-direction: column !important;
    }
    
    .tuwaiq-footer .wp-block-columns {
        gap: 2rem !important;
    }
}

/* ═══════════════════════════════════════════
   IMAGES
   ═══════════════════════════════════════════ */

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

img[loading="lazy"] {
    content-visibility: auto;
}

/* ═══════════════════════════════════════════
   SOCIAL LINKS
   ═══════════════════════════════════════════ */

.wp-block-social-links .wp-social-link {
    transition: all 0.3s ease;
}

.wp-block-social-links .wp-social-link:hover {
    transform: translateY(-3px);
    background: #ff6633 !important;
}

/* ═══════════════════════════════════════════
   DETAILS / ACCORDION (FAQ)
   ═══════════════════════════════════════════ */

details {
    background: #ffffff;
}

details summary {
    font-family: 'Cairo', sans-serif;
    cursor: pointer;
    user-select: none;
}

details[open] summary {
    margin-bottom: 0.5rem;
}

/* ═══════════════════════════════════════════
   SEARCH
   ═══════════════════════════════════════════ */

.wp-block-search__input {
    font-family: 'Cairo', sans-serif;
    text-align: right;
    direction: rtl;
}

/* ═══════════════════════════════════════════
   PAGINATION
   ═══════════════════════════════════════════ */

.wp-block-query-pagination-numbers .page-numbers {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.5rem;
    height: 2.5rem;
    border: 1px solid #dce3ed;
    border-radius: 0.5rem;
    font-weight: 700;
    font-size: 0.875rem;
    transition: all 0.2s ease;
}

.wp-block-query-pagination-numbers .page-numbers.current {
    background: #ff6633;
    color: #ffffff;
    border-color: #ff6633;
}

.wp-block-query-pagination-numbers .page-numbers:hover:not(.current) {
    background: #f7fafc;
}
