/*
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
*/

@import url('https://fonts.googleapis.com/css2?family=Cairo:wght@300;400;600;700&family=Tajawal:wght@300;400;500;700&display=swap');

: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', sans-serif;
    --font-tajawal: 'Tajawal', 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);
}

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: rgba(17, 26, 46, 0.85);
    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 rgba(13, 148, 136, 0.4);
}
.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 rgba(13, 148, 136, 0.25));
    transition: transform 0.3s ease;
}
.site-logo:hover {
    transform: scale(1.05);
}

.directory-main-menu {
    background: rgba(17, 26, 46, 0.9);
    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 rgba(13, 148, 136, 0.1);
}
.directory-card .card-header {
    background: rgba(17, 26, 46, 0.5);
    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: rgba(17, 26, 46, 0.3);
    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: rgba(13, 148, 136, 0.2);
    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: rgba(13, 148, 136, 0.08);
    border: 1px solid rgba(13, 148, 136, 0.2);
    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 rgba(13, 148, 136, 0.3);
}

/* Listings details view */
.site {
    background: rgba(17, 26, 46, 0.4);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 1.25rem;
    margin-bottom: 1.25rem;
    transition: all 0.25s;
}
.site:hover {
    border-color: rgba(13, 148, 136, 0.3);
    background: rgba(17, 26, 46, 0.6);
}
.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: rgba(17, 26, 46, 0.8);
    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 rgba(13, 148, 136, 0.25);
    background-color: var(--secondary-bg);
}
.btn-primary {
    background-color: var(--accent-teal);
    border-color: var(--accent-teal);
    border-radius: 8px;
    padding: 0.6rem 1.5rem;
    font-weight: 600;
    transition: all 0.2s;
}
.btn-primary:hover, .btn-primary:focus {
    background-color: var(--accent-teal-hover);
    border-color: var(--accent-teal-hover);
    box-shadow: 0 0 10px rgba(13, 148, 136, 0.4);
}

.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: rgba(17, 26, 46, 0.8);
    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 rgba(13, 148, 136, 0.25);
}

.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;
}
.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;
    }
}
