/*
Theme Name: Dalil Directory
Theme URI: https://deleeli.com/
Author: Antigravity
Author URI: https://gemini.google.com/
Description: A premium, modern WordPress Directory Theme modeled after deleeli.com. Built with full RTL support, Bootstrap 5 compatibility, Cairo & Tajawal typography, glassmorphism elements, custom post types, AJAX ratings, and frontend submissions.
Version: 1.0.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: dalil
Domain Path: /languages
*/

:root {
    --primary-bg: #0b1120;
    --secondary-bg: #111a2e;
    --card-bg: rgba(22, 30, 49, 0.7);
    --border-color: rgba(255, 255, 255, 0.08);
    --text-primary: #f8fafc;
    --text-secondary: #94a3b8;
    --accent-teal: #0d9488;
    --accent-teal-hover: #14b8a6;
    --accent-gold: #eab308;
    --accent-gold-hover: #facc15;
    --danger-red: #ef4444;
    --font-cairo: 'Cairo', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    --font-tajawal: 'Tajawal', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
    --glass-blur: blur(12px);
    --header-bg: rgba(17, 26, 46, 0.85);
    --input-bg: rgba(17, 26, 46, 0.8);
    --accent-shadow: rgba(13, 148, 136, 0.25);
}

/* ==========================================================================
   DIRECTORY SKINS (10 STYLES CONFIGURABLE VIA CUSTOMIZER)
   ========================================================================== */

/* 1. Midnight Teal (Default) */
body.skin-midnight_teal {
    --primary-bg: #0b1120;
    --secondary-bg: #111a2e;
    --card-bg: rgba(22, 30, 49, 0.7);
    --border-color: rgba(255, 255, 255, 0.08);
    --text-primary: #f8fafc;
    --text-secondary: #94a3b8;
    --accent-teal: #0d9488;
    --accent-teal-hover: #14b8a6;
    --accent-gold: #eab308;
    --accent-gold-hover: #facc15;
    --header-bg: rgba(17, 26, 46, 0.85);
    --input-bg: rgba(17, 26, 46, 0.8);
    --accent-shadow: rgba(13, 148, 136, 0.25);
}

/* 2. Royal Emerald */
body.skin-royal_emerald {
    --primary-bg: #05140e;
    --secondary-bg: #0b2118;
    --card-bg: rgba(15, 41, 29, 0.7);
    --border-color: rgba(16, 185, 129, 0.15);
    --text-primary: #f0fdf4;
    --text-secondary: #a7f3d0;
    --accent-teal: #10b981;
    --accent-teal-hover: #34d399;
    --accent-gold: #fbbf24;
    --accent-gold-hover: #fcd34d;
    --header-bg: rgba(11, 33, 24, 0.85);
    --input-bg: rgba(11, 33, 24, 0.8);
    --accent-shadow: rgba(16, 185, 129, 0.25);
}

/* 3. Deep Ocean */
body.skin-deep_ocean {
    --primary-bg: #050b14;
    --secondary-bg: #0c1524;
    --card-bg: rgba(15, 28, 48, 0.7);
    --border-color: rgba(59, 130, 246, 0.15);
    --text-primary: #f0f9ff;
    --text-secondary: #bae6fd;
    --accent-teal: #2563eb;
    --accent-teal-hover: #3b82f6;
    --accent-gold: #fbbf24;
    --accent-gold-hover: #fcd34d;
    --header-bg: rgba(12, 21, 36, 0.85);
    --input-bg: rgba(12, 21, 36, 0.8);
    --accent-shadow: rgba(59, 130, 246, 0.25);
}

/* 4. Desert Gold */
body.skin-desert_gold {
    --primary-bg: #141009;
    --secondary-bg: #1f1a10;
    --card-bg: rgba(36, 29, 17, 0.7);
    --border-color: rgba(217, 119, 6, 0.15);
    --text-primary: #fffbeb;
    --text-secondary: #fde68a;
    --accent-teal: #d97706;
    --accent-teal-hover: #f59e0b;
    --accent-gold: #fbbf24;
    --accent-gold-hover: #fcd34d;
    --header-bg: rgba(31, 26, 16, 0.85);
    --input-bg: rgba(31, 26, 16, 0.8);
    --accent-shadow: rgba(217, 119, 6, 0.25);
}

/* 5. Amethyst Violet */
body.skin-amethyst_violet {
    --primary-bg: #0e0714;
    --secondary-bg: #170d24;
    --card-bg: rgba(29, 15, 46, 0.7);
    --border-color: rgba(168, 85, 247, 0.15);
    --text-primary: #faf5ff;
    --text-secondary: #e9d5ff;
    --accent-teal: #9333ea;
    --accent-teal-hover: #a855f7;
    --accent-gold: #fbbf24;
    --accent-gold-hover: #fcd34d;
    --header-bg: rgba(23, 13, 36, 0.85);
    --input-bg: rgba(23, 13, 36, 0.8);
    --accent-shadow: rgba(168, 85, 247, 0.25);
}

/* 6. Minimal Light */
body.skin-minimal_light {
    --primary-bg: #f8fafc;
    --secondary-bg: #f1f5f9;
    --card-bg: rgba(255, 255, 255, 0.95);
    --border-color: #cbd5e1;
    --text-primary: #0f172a;
    --text-secondary: #475569;
    --accent-teal: #0f766e;
    --accent-teal-hover: #0d9488;
    --accent-gold: #d97706;
    --accent-gold-hover: #f59e0b;
    --header-bg: rgba(241, 245, 249, 0.95);
    --input-bg: #ffffff;
    --accent-shadow: rgba(15, 118, 110, 0.15);
}
body.skin-minimal_light .glass-panel,
body.skin-minimal_light .card,
body.skin-minimal_light .directory-card,
body.skin-minimal_light .directory-top-navbar,
body.skin-minimal_light .directory-main-menu {
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -1px rgba(0, 0, 0, 0.03) !important;
}
body.skin-minimal_light .poll-bar {
    background: rgba(15, 118, 110, 0.15) !important;
}
body.skin-minimal_light .text-white {
    color: #0f172a !important;
}
body.skin-minimal_light .text-secondary {
    color: #475569 !important;
}
body.skin-minimal_light .form-text.text-secondary {
    color: #64748b !important;
}

/* 7. Sunset Orange */
body.skin-sunset_orange {
    --primary-bg: #140d0a;
    --secondary-bg: #211510;
    --card-bg: rgba(38, 23, 17, 0.7);
    --border-color: rgba(234, 88, 12, 0.15);
    --text-primary: #fff7ed;
    --text-secondary: #fed7aa;
    --accent-teal: #ea580c;
    --accent-teal-hover: #f97316;
    --accent-gold: #fbbf24;
    --accent-gold-hover: #fcd34d;
    --header-bg: rgba(33, 21, 16, 0.85);
    --input-bg: rgba(33, 21, 16, 0.8);
    --accent-shadow: rgba(234, 88, 12, 0.25);
}

/* 8. Forest Sage */
body.skin-forest_sage {
    --primary-bg: #10140d;
    --secondary-bg: #1b2115;
    --card-bg: rgba(30, 38, 23, 0.7);
    --border-color: rgba(101, 163, 13, 0.15);
    --text-primary: #f7fee7;
    --text-secondary: #d9f99d;
    --accent-teal: #65a30d;
    --accent-teal-hover: #84cc16;
    --accent-gold: #fbbf24;
    --accent-gold-hover: #fcd34d;
    --header-bg: rgba(27, 33, 21, 0.85);
    --input-bg: rgba(27, 33, 21, 0.8);
    --accent-shadow: rgba(101, 163, 13, 0.25);
}

/* 9. Crimson Velvet */
body.skin-crimson_velvet {
    --primary-bg: #140a0c;
    --secondary-bg: #211013;
    --card-bg: rgba(38, 17, 21, 0.7);
    --border-color: rgba(225, 29, 72, 0.15);
    --text-primary: #fff1f2;
    --text-secondary: #fecdd3;
    --accent-teal: #e11d48;
    --accent-teal-hover: #f43f5e;
    --accent-gold: #fbbf24;
    --accent-gold-hover: #fcd34d;
    --header-bg: rgba(33, 16, 19, 0.85);
    --input-bg: rgba(33, 16, 19, 0.8);
    --accent-shadow: rgba(225, 29, 72, 0.25);
}

/* 10. Cyberpunk Neon */
body.skin-cyberpunk_neon {
    --primary-bg: #090312;
    --secondary-bg: #130626;
    --card-bg: rgba(28, 5, 54, 0.75);
    --border-color: #ff007f;
    --text-primary: #00ffff;
    --text-secondary: #ff007f;
    --accent-teal: #ff007f;
    --accent-teal-hover: #00ffff;
    --accent-gold: #00ffff;
    --accent-gold-hover: #ff007f;
    --header-bg: rgba(19, 6, 38, 0.85);
    --input-bg: rgba(19, 6, 38, 0.8);
    --accent-shadow: rgba(255, 0, 127, 0.35);
}

body {
    background-color: var(--primary-bg);
    color: var(--text-primary);
    font-family: var(--font-tajawal);
    direction: rtl;
    text-align: right;
    overflow-x: hidden;
    line-height: 1.6;
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-cairo);
    color: var(--text-primary);
    font-weight: 600;
}

a {
    color: var(--accent-teal-hover);
    text-decoration: none;
    transition: color 0.2s ease, transform 0.2s ease;
}
a:hover {
    color: var(--accent-teal);
}

/* Glassmorphism Panels */
.glass-panel {
    background: var(--card-bg);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    border: 1px solid var(--border-color);
    border-radius: 12px;
}

/* Navbar CSS */
.directory-top-navbar {
    background: var(--header-bg);
    backdrop-filter: var(--glass-blur);
    border-bottom: 1px solid var(--border-color);
    padding: 0.75rem 0;
}
.directory-top-navbar .navbar-brand {
    font-family: var(--font-cairo);
    font-weight: 700;
    color: var(--text-primary);
    font-size: 1.5rem;
    text-shadow: 0 0 10px var(--accent-shadow);
}
.directory-top-navbar .nav-link {
    color: var(--text-secondary);
    font-weight: 500;
    transition: color 0.2s;
    margin-left: 1rem;
}
.directory-top-navbar .nav-link:hover {
    color: var(--accent-teal-hover);
}
.directory-top-navbar .nav-link i {
    margin-left: 0.35rem;
}

.logo-bar-wrapper {
    background: linear-gradient(135deg, var(--secondary-bg) 0%, var(--primary-bg) 100%);
    padding: 2rem 0;
    border-bottom: 1px solid var(--border-color);
}
.site-logo {
    max-height: 70px;
    filter: drop-shadow(0 0 8px var(--accent-shadow));
    transition: transform 0.3s ease;
}
.site-logo:hover {
    transform: scale(1.05);
}

.directory-main-menu {
    background: var(--header-bg);
    border-bottom: 1px solid var(--border-color);
    padding: 0.5rem 0;
}
.directory-main-navbar .nav-link {
    color: var(--text-primary);
    font-family: var(--font-cairo);
    font-weight: 600;
    font-size: 1rem;
    padding: 0.5rem 1rem !important;
}
.directory-main-navbar .nav-link:hover {
    color: var(--accent-teal-hover);
}
.directory-main-navbar .dropdown-menu {
    background-color: var(--secondary-bg);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    box-shadow: var(--shadow-lg);
    text-align: right;
}
.directory-main-navbar .dropdown-item {
    color: var(--text-secondary);
    font-family: var(--font-tajawal);
    font-size: 0.9rem;
    padding: 0.5rem 1.25rem;
    transition: all 0.2s;
}
.directory-main-navbar .dropdown-item:hover {
    background-color: var(--accent-teal);
    color: var(--text-primary);
    padding-right: 1.5rem;
}

/* Cards CSS */
.directory-card {
    background: var(--card-bg);
    backdrop-filter: var(--glass-blur);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    box-shadow: var(--shadow-md);
    overflow: hidden;
    margin-bottom: 1.5rem;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.directory-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg), 0 0 15px var(--accent-shadow);
}
.directory-card .card-header {
    background: var(--input-bg);
    border-bottom: 1px solid var(--border-color);
    padding: 1rem 1.25rem;
}
.directory-card .card-header h1 {
    font-size: 1.35rem;
    margin: 0;
    font-weight: 700;
    color: var(--text-primary);
    border-right: 4px solid var(--accent-teal);
    padding-right: 0.75rem;
}
.directory-card .card-body {
    padding: 1.5rem;
    color: var(--text-secondary);
}

/* Category Grid on Homepage */
.categories_with_sites h2 {
    font-size: 1.15rem;
    margin-bottom: 0.75rem;
    font-weight: 600;
}
.categories_with_sites h2 a {
    color: var(--text-primary);
}
.categories_with_sites h2 a:hover {
    color: var(--accent-teal-hover);
}

.incategory {
    background: var(--input-bg);
    border-radius: 8px;
    padding: 0.75rem 1rem;
    margin-bottom: 1.25rem;
    border: 1px solid rgba(255, 255, 255, 0.03);
}
.incategory ul {
    margin: 0;
    padding: 0;
}
.incategory li {
    display: inline-block;
    margin: 0.25rem 0.5rem;
}
.incategory li a {
    color: var(--text-secondary);
    font-size: 0.85rem;
    padding: 0.2rem 0.5rem;
    border-radius: 4px;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.04);
}
.incategory li a:hover {
    color: var(--text-primary);
    background: var(--accent-shadow);
    border-color: var(--accent-teal);
}

/* Pinned/Sticky sites styling */
.incategory li.sticky-site a {
    color: var(--accent-gold);
    background: rgba(234, 179, 8, 0.08);
    border-color: rgba(234, 179, 8, 0.25);
    font-weight: 600;
}
.incategory li.sticky-site a:hover {
    color: var(--text-primary);
    background: rgba(234, 179, 8, 0.2);
    border-color: var(--accent-gold-hover);
}
.incategory li.sticky-site i {
    animation: thumbtack-bounce 2s infinite ease-in-out;
}

@keyframes thumbtack-bounce {
    0%, 100% { transform: translateY(0) rotate(15deg); }
    50% { transform: translateY(-3px) rotate(-15deg); }
}

.sub_categories_with_sites ul {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    padding: 0;
    margin: 0;
    list-style: none;
}
.sub_categories_with_sites li a {
    display: inline-block;
    padding: 0.35rem 0.75rem;
    border-radius: 20px;
    background: var(--accent-shadow);
    border: 1px solid var(--border-color);
    color: var(--accent-teal-hover);
    font-size: 0.85rem;
    transition: all 0.25s;
}
.sub_categories_with_sites li a:hover {
    background: var(--accent-teal);
    color: var(--text-primary);
    box-shadow: 0 0 10px var(--accent-shadow);
}

/* Listings details view */
.site {
    background: var(--input-bg);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 1.25rem;
    margin-bottom: 1.25rem;
    transition: all 0.25s;
}
.site:hover {
    border-color: var(--accent-teal);
    background: var(--card-bg);
}
.site h1 {
    font-size: 1.2rem;
    margin-bottom: 0.5rem;
    font-weight: 600;
}
.site h1 a {
    color: var(--text-primary);
}
.site h1 a:hover {
    color: var(--accent-teal-hover);
}
.site p.url {
    margin-bottom: 0.5rem;
}
.site p.url a {
    font-size: 0.85rem;
    color: var(--text-secondary);
    word-break: break-all;
}
.site p.url a:hover {
    color: var(--accent-teal-hover);
}
.site p.meta {
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin-bottom: 1rem;
}
.site ul.list-inline {
    margin: 0;
    padding: 0;
}
.site ul.list-inline li {
    font-size: 0.8rem;
    color: var(--text-secondary);
    margin-left: 1rem;
}
.site ul.list-inline li i {
    margin-left: 0.25rem;
    color: var(--accent-teal-hover);
}

.site.category-sticky-site {
    border-color: rgba(234, 179, 8, 0.3);
    background: rgba(234, 179, 8, 0.02);
}
.site.category-sticky-site:hover {
    border-color: rgba(234, 179, 8, 0.6);
    background: rgba(234, 179, 8, 0.04);
}

/* Site Details Page styling */
.site_info ul {
    list-style: none;
    padding: 0;
    margin: 0;
}
.site_info li {
    padding: 0.75rem 0;
    border-bottom: 1px solid var(--border-color);
    font-size: 0.95rem;
    display: flex;
    align-items: center;
}
.site_info li:last-child {
    border-bottom: none;
}
.site_info li i {
    width: 24px;
    margin-left: 0.75rem;
    color: var(--accent-teal-hover);
    font-size: 1.1rem;
}
.site_info li strong {
    min-width: 120px;
    color: var(--text-primary);
}

/* Rating / Google search buttons */
.rate-site, .in-google-site {
    border-radius: 8px;
    transition: transform 0.25s;
}
.rate-site:hover, .in-google-site:hover {
    transform: translateY(-2px);
}
.rating_v {
    font-size: 1.5rem;
    margin: 0.5rem 0;
}
.rating_v span {
    cursor: pointer;
    transition: color 0.15s;
}
.rating_v span.filled {
    color: var(--accent-gold);
}
.rating_v span.empty {
    color: rgba(255, 255, 255, 0.15);
}

/* Widgets & Search styling */
.search input.form-control {
    background-color: var(--input-bg);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    border-radius: 8px;
    padding: 0.6rem 1rem;
}
.search input.form-control:focus {
    border-color: var(--accent-teal);
    box-shadow: 0 0 0 0.25rem var(--accent-shadow);
    background-color: var(--secondary-bg);
}
@font-face {
    font-family: 'Font Awesome 6 Free';
    font-display: swap;
}
@font-face {
    font-family: 'Font Awesome 6 Brands';
    font-display: swap;
}

.btn-primary {
    background-color: #0f766e !important;
    border-color: #0f766e !important;
    color: #ffffff !important;
    border-radius: 8px;
    padding: 0.6rem 1.5rem;
    font-weight: 700;
    transition: all 0.2s;
}
.btn-primary:hover, .btn-primary:focus {
    background-color: #0d9488 !important;
    border-color: #0d9488 !important;
    color: #ffffff !important;
    box-shadow: 0 0 10px var(--accent-shadow);
}

.list-group-item {
    background-color: transparent !important;
    border-bottom: 1px solid var(--border-color) !important;
    padding: 0.75rem 0;
    transition: padding-right 0.2s;
}
.list-group-item:last-child {
    border-bottom: none !important;
}
.list-group-item a {
    color: var(--text-secondary);
    font-size: 0.9rem;
    display: block;
}
.list-group-item a:hover {
    color: var(--text-primary);
    padding-right: 0.25rem;
}

/* Custom Poll widget */
.poll p {
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
}
.poll input[type="radio"] {
    margin-left: 0.5rem;
    accent-color: var(--accent-teal-hover);
}
.poll label {
    cursor: pointer;
}
.progress {
    background-color: rgba(255, 255, 255, 0.05);
    height: 10px;
    border-radius: 5px;
    overflow: hidden;
}

/* Footer structure */
.footer {
    background: var(--secondary-bg);
    border-top: 1px solid var(--border-color);
    padding: 2.5rem 0;
    margin-top: 4rem;
    text-align: center;
    color: var(--text-secondary);
}
.footer a {
    color: var(--text-primary);
}
.footer a:hover {
    color: var(--accent-teal-hover);
}
.footer p {
    margin-bottom: 0.5rem;
}
.footer .powered {
    font-size: 0.85rem;
}

/* Add Website submission form styling */
.form-wrapper {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 2rem;
}
.form-label {
    font-weight: 600;
    color: var(--text-primary);
    font-family: var(--font-cairo);
}
.form-control, .form-select {
    background-color: var(--input-bg);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    border-radius: 8px;
}
.form-control:focus, .form-select:focus {
    border-color: var(--accent-teal);
    background-color: var(--secondary-bg);
    color: var(--text-primary);
    box-shadow: 0 0 0 0.25rem var(--accent-shadow);
}

.directory-hr {
    border-top: 1px solid var(--border-color);
    opacity: 1;
}

/* Mobile Sidebar Menu overlay */
.overlay {
    height: 100%;
    width: 0;
    position: fixed;
    z-index: 2000;
    top: 0;
    right: 0;
    background-color: rgba(11, 17, 32, 0.95);
    backdrop-filter: var(--glass-blur);
    overflow-x: hidden;
    transition: 0.3s;
    border-left: 1px solid var(--border-color);
}
.overlay-content {
    position: relative;
    top: 10%;
    width: 100%;
    text-align: right;
    padding: 2rem;
}
.overlay a {
    padding: 8px;
    text-decoration: none;
    font-size: 1.25rem;
    color: var(--text-secondary);
    display: block;
    transition: 0.3s;
    font-family: var(--font-cairo);
}
.overlay a:hover, .overlay a:focus {
    color: var(--text-primary);
    padding-right: 15px;
}
.overlay .closebtn {
    position: absolute;
    top: 20px;
    left: 45px;
    font-size: 2.5rem;
    cursor: pointer;
    background: transparent;
    border: none;
    color: var(--text-secondary);
    line-height: 1;
    padding: 0;
}
.overlay .closebtn:hover, .overlay .closebtn:focus {
    color: var(--text-primary);
}
.overlay .dropdown-menu {
    background-color: rgba(255, 255, 255, 0.05);
    border: none;
    margin-top: 0.5rem;
    padding-right: 1rem;
}

@media screen and (max-height: 450px) {
    .overlay a {font-size: 20px}
    .overlay .closebtn {
        font-size: 40px;
        top: 15px;
        left: 35px;
    }
}

/* ==========================================================================
   DIRECTORY LAYOUTS (10 DESIGN DESIGNS CONFIGURABLE VIA CUSTOMIZER)
   ========================================================================== */

/* 1. layout_default (No override needed: standard columns) */

/* 2. layout_reverse (Reversed main container and sidebar columns) */
@media (min-width: 768px) {
    body.skin-layout_reverse .my-4 > .row {
        flex-direction: row-reverse !important;
    }
}

/* 3. layout_centered_branding (Centered header, brand logo, top links, and footer, no sidebars) */
body.skin-layout_centered_branding .directory-top-navbar .container {
    justify-content: center !important;
}
body.skin-layout_centered_branding .top-menu-align {
    margin: 0 auto !important;
    flex-grow: 0;
}
body.skin-layout_centered_branding .directory-top-navbar .form-inline {
    display: none !important;
}
body.skin-layout_centered_branding .logo-bar {
    flex-direction: column !important;
    justify-content: center !important;
    text-align: center !important;
    gap: 1rem;
}
body.skin-layout_centered_branding .logo {
    margin: 0 auto !important;
}
body.skin-layout_centered_branding .footer {
    text-align: center !important;
}

/* 4. layout_double_sidebar (3-column layout: Left Sidebar + Center Categories + Right Sidebar) */
@media (min-width: 992px) {
    body.skin-layout_double_sidebar .col-lg-3 {
        max-width: 25% !important;
        flex: 0 0 25% !important;
    }
    body.skin-layout_double_sidebar .col-lg-6 {
        max-width: 50% !important;
        flex: 0 0 50% !important;
    }
}

/* 5. layout_sidebar_bottom (Main category list on top full width, sidebar blocks side-by-side below) */
@media (min-width: 768px) {
    body.skin-layout_sidebar_bottom .my-4 > .row {
        display: flex !important;
        flex-direction: column !important;
    }
    body.skin-layout_sidebar_bottom .my-4 > .row > .col-md-8 {
        width: 100% !important;
        flex: 0 0 100% !important;
        max-width: 100% !important;
        margin-bottom: 2rem;
    }
    body.skin-layout_sidebar_bottom .my-4 > .row > .col-md-4 {
        width: 100% !important;
        flex: 0 0 100% !important;
        max-width: 100% !important;
        display: flex !important;
        flex-direction: row !important;
        gap: 1.5rem;
    }
    body.skin-layout_sidebar_bottom .my-4 > .row > .col-md-4 > .directory-card {
        flex: 1;
        margin-bottom: 0 !important;
    }
}
@media (max-width: 767px) {
    body.skin-layout_sidebar_bottom .my-4 > .row > .col-md-4 {
        display: flex !important;
        flex-direction: column !important;
    }
}

/* 6. layout_clean_compact (Compressed text sizes, padding, and spacing) */
body.skin-layout_clean_compact {
    font-size: 0.85rem !important;
}
body.skin-layout_clean_compact h1,
body.skin-layout_clean_compact h2,
body.skin-layout_clean_compact h3,
body.skin-layout_clean_compact .directory-card .card-header h1 {
    font-size: 1.1rem !important;
}
body.skin-layout_clean_compact .site {
    padding: 0.75rem 1rem !important;
    margin-bottom: 0.75rem !important;
}
body.skin-layout_clean_compact .directory-card .card-body {
    padding: 1rem !important;
}
body.skin-layout_clean_compact .incategory {
    padding: 0.5rem 0.75rem !important;
    margin-bottom: 0.75rem !important;
}
body.skin-layout_clean_compact .footer {
    padding: 1.5rem 0 !important;
    margin-top: 2rem !important;
}

/* 7. layout_modern_masonry (Dynamic multi-column masonry style for categories) */
@media (min-width: 768px) {
    body.skin-layout_modern_masonry .categories_with_sites .row {
        display: block !important;
        column-count: 2 !important;
        column-gap: 1.5rem !important;
    }
    body.skin-layout_modern_masonry .categories_with_sites .row > .col-md-6 {
        display: inline-block !important;
        width: 100% !important;
        max-width: 100% !important;
        flex: none !important;
        margin-bottom: 1.5rem !important;
    }
}

/* Footer Page Menu Centered Alignment */
.footer-links .list-inline {
    margin-left: 0;
    padding-left: 0;
}
.footer-links .list-inline-item {
    margin: 0 0.5rem;
}
.footer-links a {
    color: var(--text-secondary);
    font-weight: 500;
    font-size: 0.9rem;
    transition: color 0.2s;
}
.footer-links a:hover {
    color: var(--accent-teal-hover);
}

/* ==========================================================================
   RANK MATH BREADCRUMBS ADJUSTMENT
   ========================================================================== */
.rank-math-breadcrumbs {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--border-color);
    font-size: 0.9rem;
    padding: 0.5rem 1rem; /* py-2 px-3 */
    border-radius: 0.375rem; /* rounded */
    margin-bottom: 1.5rem;
}
.rank-math-breadcrumbs .rank-math-breadcrumb {
    margin: 0;
    padding: 0;
}
.rank-math-breadcrumbs p#breadcrumbs {
    margin: 0 !important;
    padding: 0 !important;
    color: var(--text-secondary);
    display: flex;
    flex-wrap: wrap;
    align-items: center;
}
.rank-math-breadcrumbs a {
    color: var(--accent-teal-hover) !important;
    transition: color 0.2s ease;
}
.rank-math-breadcrumbs a:hover {
    color: var(--accent-teal) !important;
    text-decoration: none;
}
.rank-math-breadcrumbs a i {
    margin-left: 0.35rem; /* Space after home icon */
}
.rank-math-breadcrumbs .custom-separator {
    margin: 0 0.5rem;
    color: var(--text-secondary);
    opacity: 0.5;
}
.rank-math-breadcrumbs .breadcrumb_last {
    color: var(--text-primary) !important;
    font-weight: 600;
}

/* ==========================================================================
   PERFORMANCE & CUMULATIVE LAYOUT SHIFT (CLS) STABILITY RULES
   ========================================================================== */
html {
    font-display: swap;
}

body {
    overflow-y: scroll;
}

main#primary {
    min-height: 650px;
}

.directory-card {
    min-height: 100px;
    contain: layout style;
}

.navbar {
    min-height: 56px;
}

.badge {
    display: inline-block;
    vertical-align: middle;
}

button.btn-primary {
    min-height: 44px;
}

