/**
 * Al-Alama Custom CSS
 * تنسيقات إضافية وتحسينات
 * 
 * @package Al-Alama
 */

/* ========================================
   Animations
   ======================================== */

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

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

.animate-fade-in {
    animation: fade-in 0.8s ease-out;
}

.animate-fade-in-delay {
    animation: fade-in 0.8s ease-out 0.2s both;
}

.animate-fade-in-delay-2 {
    animation: fade-in 0.8s ease-out 0.4s both;
}

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

/* ========================================
   Utilities
   ======================================== */

.line-clamp-2 {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.line-clamp-3 {
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* ========================================
   WordPress Blocks
   ======================================== */

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

.wp-block-quote {
    border-right: 4px solid var(--brand-orange);
    padding-right: 1.5rem;
    margin: 2rem 0;
    font-style: italic;
    color: var(--brand-gray);
}

.wp-block-code {
    background: #f5f5f5;
    border: 1px solid #ddd;
    border-radius: 0.5rem;
    padding: 1rem;
    overflow-x: auto;
    direction: ltr;
    text-align: left;
}

/* ========================================
   Navigation
   ======================================== */

.menu-item {
    position: relative;
}

.menu-item a {
    position: relative;
    padding-bottom: 0.25rem;
}

.menu-item a::after {
    content: '';
    position: absolute;
    bottom: 0;
    right: 0;
    width: 0;
    height: 2px;
    background: var(--brand-orange);
    transition: width 0.3s ease;
}

.menu-item a:hover::after,
.current-menu-item a::after {
    width: 100%;
}

/* ========================================
   Forms
   ======================================== */

input[type="text"],
input[type="email"],
input[type="tel"],
input[type="url"],
input[type="password"],
input[type="search"],
textarea,
select {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 2px solid #e5e7eb;
    border-radius: 0.5rem;
    font-size: 1rem;
    transition: border-color 0.3s ease;
}

input:focus,
textarea:focus,
select:focus {
    outline: none;
    border-color: var(--brand-blue);
}

label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: var(--brand-gray);
}

/* ========================================
   Pagination
   ======================================== */

.pagination {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    margin: 2rem 0;
}

.pagination .page-numbers {
    padding: 0.5rem 1rem;
    border: 2px solid #e5e7eb;
    border-radius: 0.5rem;
    color: var(--brand-gray);
    text-decoration: none;
    transition: all 0.3s ease;
}

.pagination .page-numbers:hover,
.pagination .page-numbers.current {
    background: var(--brand-blue);
    color: white;
    border-color: var(--brand-blue);
}

/* ========================================
   Comments
   ======================================== */

.comment-list {
    list-style: none;
    padding: 0;
}

.comment {
    background: #f9fafb;
    padding: 1.5rem;
    border-radius: 0.5rem;
    margin-bottom: 1rem;
}

.comment-author img {
    border-radius: 50%;
}

.comment-meta {
    font-size: 0.875rem;
    color: #6b7280;
    margin-bottom: 0.5rem;
}

.reply {
    margin-top: 1rem;
}

.reply a {
    color: var(--brand-orange);
    font-weight: 600;
}

/* ========================================
   Sidebar Widgets
   ======================================== */

.widget {
    margin-bottom: 2rem;
}

.widget ul {
    list-style: none;
    padding: 0;
}

.widget ul li {
    padding: 0.5rem 0;
    border-bottom: 1px solid #e5e7eb;
}

.widget ul li:last-child {
    border-bottom: none;
}

.widget ul li a {
    color: var(--brand-gray);
    text-decoration: none;
    transition: color 0.3s ease;
}

.widget ul li a:hover {
    color: var(--brand-orange);
}

/* ========================================
   Mobile Responsive
   ======================================== */

@media (max-width: 768px) {
    h1 {
        font-size: 2rem;
    }

    h2 {
        font-size: 1.75rem;
    }

    .container {
        padding-left: 1rem;
        padding-right: 1rem;
    }
}

/* ========================================
   Print Styles
   ======================================== */

@media print {
    header,
    footer,
    #sticky-whatsapp,
    .no-print {
        display: none !important;
    }

    body {
        background: white;
        color: black;
    }

    a {
        text-decoration: underline;
    }
}