/*
Theme Name: Euro University of Bahrain
Theme URI: https://eub.edu.bh
Author: EUB
Author URI: https://eub.edu.bh
Description: Unified Child theme for EUB - News, Blog, & RTL Optimization
Version: 1.0.3
Template: unicamp
Text Domain: sub
*/

/* -------------------------------------------------------------------------- */
/* 1. GLOBAL UI & TEXT ALIGNMENT                                              */
/* -------------------------------------------------------------------------- */

p.elementor-image-box-description {
    text-align: center;
}

.entry-title {
    text-align: left;
}
html[lang="ar"] .entry-title {
    text-align: right;
}

/* -------------------------------------------------------------------------- */
/* 2. MASTER RTL ICON FIXES (ANTI-CONFLICT VERSION)                           */
/* -------------------------------------------------------------------------- */

/* Standardizing Font behavior to resolve "Glyph bbox" errors */
.far, .fa-regular, .fal, .fa-light, .fas, .fa-solid, .fab, .fa-brands {
    text-rendering: optimizeLegibility !important;
    -webkit-font-smoothing: antialiased !important;
    font-display: swap !important;
}

/* Forces Solid icons in Arabic while preserving visibility */
html[lang="ar"] .far, 
html[lang="ar"] .fa-regular,
html[lang="ar"] .fal,
html[lang="ar"] .fa-light,
html[lang="ar"] .fas,
html[lang="ar"] .fa-solid,
html[lang="ar"] .unicamp-icon i {
    font-family: "Font Awesome 6 Free", "Font Awesome 5 Free" !important;
    font-weight: 900 !important;
    display: inline-block;
    font-style: normal;
}

/* Fix for Brand Icons - Separate from Solid fix to avoid glyph mismatch */
html[lang="ar"] .fab, 
html[lang="ar"] .fa-brands {
    font-family: "Font Awesome 6 Brands", "Font Awesome 5 Brands" !important;
    font-weight: 400 !important;
}

/* Hard-coded Glyph Safety Net */
html[lang="ar"] .fa-angle-down:before { content: "\f107" !important; }
html[lang="ar"] .fa-angle-up:before   { content: "\f106" !important; }
html[lang="ar"] .fa-envelope:before   { content: "\f0e0" !important; }
html[lang="ar"] .fa-phone:before      { content: "\f095" !important; }

/* -------------------------------------------------------------------------- */
/* 3. UNIFIED BLOG FILTER TOOLBAR                                             */
/* -------------------------------------------------------------------------- */

.custom-blog-filters {
    display: flex;
    flex-direction: row;
    flex-wrap: nowrap;
    align-items: stretch;
    gap: 0;
    width: 100%;
    margin-bottom: 30px;
}

.custom-blog-filters .filter-wrapper {
    flex-grow: 1;
    position: relative;
    background: #f2f2f2;
    border-inline-end: 1px solid #e1e1e1;
}

.custom-blog-filters select {
    width: 100%;
    height: 50px;
    border: none;
    background: transparent;
    padding: 0 40px 0 20px;
    -webkit-appearance: none;
    appearance: none;
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23333' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 15px center;
    background-size: 16px;
    cursor: pointer;
    outline: none;
}

html[lang="ar"] .custom-blog-filters select {
    padding: 0 20px 0 40px;
    background-position: left 15px center;
}

/* -------------------------------------------------------------------------- */
/* 4. BUTTONS: EUB RED / HOVER BLACK                                          */
/* -------------------------------------------------------------------------- */

.custom-blog-filters button, 
.eub-clear-btn,
#uni-filter-btn {
    flex-shrink: 0;
    width: auto;
    min-width: 140px;
    height: 50px;
    background-color: #C0392B !important; 
    color: #fff !important;
    border: none;
    font-weight: bold;
    text-transform: uppercase;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.custom-blog-filters button:hover, 
.eub-clear-btn:hover,
#uni-filter-btn:hover {
    background-color: #333 !important; 
    transform: translateY(-2px);
}

/* -------------------------------------------------------------------------- */
/* 5. "NO RESULTS" ERROR                                                      */
/* -------------------------------------------------------------------------- */

#eub-empty-results {
    display: none; 
    flex-direction: column;
    align-items: center !important;
    justify-content: center !important;
    text-align: center !important;
    width: 100% !important;
    min-height: 400px !important; 
    padding: 100px 20px !important;
}

.eub-error-text {
    font-size: 20px !important;
    color: #333 !important;
    line-height: 1.6 !important;
}

.eub-error-text strong {
    font-size: 32px !important;
    color: #C0392B !important;
    display: block;
    margin-bottom: 10px;
}

/* -------------------------------------------------------------------------- */
/* 6. ARABIC MENU & NAVIGATION FIXES                                          */
/* -------------------------------------------------------------------------- */

html[lang="ar"] .elementor-nav-menu .menu-item-has-children > a.elementor-item {
    display: inline-flex !important;
    flex-direction: row-reverse !important;
    align-items: center !important;
    justify-content: flex-end !important;
}

html[lang="ar"] .elementor-nav-menu .sub-arrow {
    margin-left: 8px !important;
    margin-right: 0 !important;
}

/* -------------------------------------------------------------------------- */
/* 7. MOBILE RESPONSIVENESS                                                   */
/* -------------------------------------------------------------------------- */

@media (max-width: 768px) {
    .custom-blog-filters { flex-direction: column; gap: 10px; }
    .custom-blog-filters .filter-wrapper { border-inline-end: none; }
    .custom-blog-filters button { width: 100%; }
}


