/*
Theme Name: AFH Theme
Description: A magazine theme converted from Magzin HTML template
Author: AFH
Version: 1.0
*/

/* Theme styles will be loaded via assets/css/main.css */

/* CSS Variables for Language Switcher */
:root {
    --color-primary-rgb: 204, 102, 51;
    --color-primary: #cc6633;
    --color-text: #0E0E0F;
    --color-text-dark: #ffffff;
    --color-bg: #ffffff;
    --color-bg-dark: #1a1a1a;
    --color-border: #e5e5e5;
    --color-border-dark: #333333;
}

/* Custom Search Modal Improvements */
.popup-search {
    z-index: 1050;
}

.popup-search-content {
    background: #fff;
    border-radius: 12px;
    padding: 2.5rem;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
    max-height: 90vh;
    overflow-y: auto;
}

.popup-search .container-fluid {
    max-width: 1400px;
    padding: 2rem 1rem;
}

@media (max-width: 768px) {
    .popup-search .container-fluid {
        padding: 1rem 0.5rem;
    }
    
    .popup-search-content {
        padding: 1.5rem;
        border-radius: 8px;
    }
}

/* Ensure search form fields have proper spacing */
.popup-search .form-control {
    border-radius: 8px;
    padding: 0.75rem 1rem;
    font-size: 1rem;
}

.popup-search .btn {
    border-radius: 8px;
    padding: 0.75rem 1.5rem;
    font-weight: 500;
}

/* Staff Picks Section Styles */
.sec-staff-picks {
    background-color: #1a1a1a !important;
}

.card-staff-pick {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    padding: 1.5rem;
    transition: all 0.3s ease;
    height: 100%;
}

.card-staff-pick:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.2);
    transform: translateY(-5px);
}

.card-staff-pick-horizontal {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    transition: all 0.3s ease;
    height: 100%;
    min-height: 140px;
}

.card-staff-pick-horizontal:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.2);
    transform: translateY(-3px);
}

.card-staff-pick .card-title,
.card-staff-pick-horizontal .card-title {
    font-size: 1.1rem;
    line-height: 1.6;
    font-weight: 600;
}

.card-staff-pick-horizontal .card-title {
    font-size: 1rem;
}

.card-staff-pick .badge,
.card-staff-pick-horizontal .badge {
    background-color: #0066cc !important;
    color: white !important;
    font-size: 0.75rem;
    padding: 0.25rem 0.75rem;
    border-radius: 12px;
}

.card-staff-pick .card-text,
.card-staff-pick-horizontal .card-text {
    line-height: 1.6;
}

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

.rounded-start-16 {
    border-top-left-radius: 16px !important;
    border-bottom-left-radius: 16px !important;
}

/* Dark theme view more button */
.view-more.text-white .circle {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.view-more.text-white:hover .circle {
    background: rgba(255, 255, 255, 0.2);
}

.view-more.text-white .icon.arrow::before {
    border-left-color: white;
}

/* News in Category Section Styles */
.text-truncate-3 {
    display: -webkit-box;
    -webkit-line-clamp: 3;
    line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    line-height: 1.5;
}

.nav-tabs .nav-link {
    border: none;
    background: transparent;
    padding: 0.75rem 1rem;
    margin-bottom: 0.5rem;
    border-radius: 0;
    color: #666;
    transition: all 0.3s ease;
}

.nav-tabs .nav-link:hover,
.nav-tabs .nav-link.active {
    color: #0E0E0F;
    background: transparent;
    border: none;
    font-weight: 600;
}

.card-7 .card-corner {
    position: absolute;
    top: 0;
    right: 0;
    z-index: 2;
}

.card-7 .card-title {
    font-size: 1.1rem;
    line-height: 1.4;
    font-weight: 600;
    margin-bottom: 1rem;
    min-height: 2.8rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.swiper-sec-3-home-2 .swiper-slide {
    height: auto;
    min-height: 450px;
}

.swiper-sec-3-home-2 .card-7 {
    height: 100%;
    min-height: 450px;
}

.swiper-sec-3-home-2 .card-7 .card-body {
    height: 100%;
    display: flex;
    flex-direction: column;
    padding: 1.5rem;
}

.swiper-sec-3-home-2 .card-7 .card-img {
    flex: 1;
    min-height: 200px;
}

@media (max-width: 991px) {
    .nav-tabs {
        justify-content: center;
        margin-bottom: 1rem;
    }
    
    .nav-tabs .nav-link {
        padding: 0.5rem 0.75rem;
        font-size: 0.9rem;
    }
    
    .swiper-sec-3-home-2 .swiper-slide {
        min-height: 400px;
    }
    
    .swiper-sec-3-home-2 .card-7 {
        min-height: 400px;
    }
    
    .card-7 .card-title {
        font-size: 1rem;
        min-height: 2.4rem;
    }
}

@media (max-width: 576px) {
    .swiper-sec-3-home-2 .card-7 .card-body {
        padding: 1rem;
    }
    
    .card-7 .card-title {
        font-size: 0.95rem;
        min-height: 2rem;
    }
}

/* Language-specific adjustments */
.lang-ar {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

.lang-ar .card-7 .card-title {
    font-size: 1.15rem;
    line-height: 1.7;
    word-spacing: 0.1em;
}

/* RTL-specific fine-tuning (Bootstrap RTL handles main layout) */
[dir="rtl"] .lang-ar .card-7 .card-title {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    letter-spacing: 0.02em;
}

/* Improve category tags layout */
.popup-search .block-tag ul {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin: 0;
    padding: 0;
}

.popup-search .tag-item {
    border-radius: 20px;
    padding: 0.5rem 1rem;
    background: #f8f9fa;
    transition: all 0.3s ease;
}

.popup-search .tag-item:hover {
    background: #e9ecef;
    transform: translateY(-1px);
}

/* Recommended posts grid improvements */
.popup-search .swiper-popup-search .swiper-slide {
    height: auto;
}

.popup-search .article.card-10 {
    border-radius: 8px;
    overflow: hidden;
    background: #fff;
    border: 1px solid #e9ecef;
    transition: all 0.3s ease;
}

.popup-search .article.card-10:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
}

/* RTL Support for Staff Picks Section */
.rtl-enabled .card-staff-pick .card-title,
.rtl-enabled .card-staff-pick-horizontal .card-title {
    font-family: 'Cairo', 'Helvetica Neue', Arial, sans-serif;
    font-size: 1.15rem;
    line-height: 1.7;
    text-align: right;
    word-spacing: 0.1em;
}

.rtl-enabled .card-staff-pick .card-text,
.rtl-enabled .card-staff-pick-horizontal .card-text {
    text-align: right;
    line-height: 1.8;
}

.rtl-enabled .card-staff-pick .card-info,
.rtl-enabled .card-staff-pick-horizontal .card-info {
    justify-content: flex-start;
    text-align: right;
}

.rtl-enabled .card-staff-pick .badge,
.rtl-enabled .card-staff-pick-horizontal .badge {
    margin-left: 0.5rem;
    margin-right: 0;
}
