/*
Theme Name: Dorba LMS Theme
Theme URI: https://gheras.sa
Author: Dorba Association
Description: قالب دربة - متوافق مع Elementor و Tutor LMS
Version: 2.1.0
Text Domain: gheras-theme
*/

:root {
    --primary: #213b70;
    --primary-light: #3258a8;
    --accent: #3bb1bd;
    --accent-light: #5cccd7;
    --tertiary: #87ba4d;
    --quaternary: #b5ce27;
    --bg-white: #fff;
    --bg-light: #f8fafc;
    --text-dark: #1e293b;
    --text-gray: #64748b;
    --border: #e2e8f0;
    --shadow: 0 4px 12px rgba(33, 59, 112, 0.08);
    --radius: 16px;
    /* More playful/child-friendly radius */
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    direction: rtl;
    scroll-behavior: smooth;
}

body {
    font-family: 'Changa', -apple-system, sans-serif;
    background: var(--bg-white);
    color: var(--text-dark);
    line-height: 1.6;
}

a {
    color: inherit;
    text-decoration: none;
}

img {
    max-width: 100%;
    height: auto;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
}

/* Header */
.site-header {
    background: var(--bg-white);
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 64px;
}

.site-logo {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.site-logo img {
    width: 40px;
    height: 40px;
    border-radius: 6px;
}

.site-logo span {
    font-weight: 700;
    font-size: 1.1rem;
    color: var(--primary);
}

.main-nav {
    display: none;
    gap: 1.5rem;
}

@media (min-width: 992px) {
    .main-nav {
        display: flex;
    }
}

.nav-link {
    font-weight: 500;
    color: var(--text-gray);
    padding: 0.25rem 0;
}

.nav-link:hover,
.nav-link.active {
    color: var(--primary);
}

.header-actions {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

.mobile-menu-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: transparent;
    cursor: pointer;
}

@media (min-width: 992px) {
    .mobile-menu-btn {
        display: none;
    }
}

.mobile-menu {
    display: none;
    padding: 1rem 0;
    border-top: 1px solid var(--border);
}

.mobile-menu.active {
    display: block;
}

.mobile-nav-list {
    list-style: none;
}

.mobile-nav-list .nav-link {
    display: block;
    padding: 0.75rem 0;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.625rem 1.25rem;
    border: none;
    border-radius: 50px;
    font-family: inherit;
    font-size: 0.875rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
}

.btn-primary {
    background: var(--accent);
    color: #fff;
}

.btn-primary:hover {
    background: var(--accent-light);
}

.btn-secondary {
    background: var(--bg-light);
    color: var(--text-dark);
    border: 1px solid var(--border);
}

.btn-outline {
    background: transparent;
    color: var(--primary);
    border: 2px solid var(--primary);
}

.btn-outline:hover {
    background: var(--primary);
    color: #fff;
}

.btn-sm {
    padding: 0.5rem 1rem;
    font-size: 0.8125rem;
}

.btn-lg {
    padding: 0.875rem 1.75rem;
    font-size: 1rem;
}

/* Button Icons */
.btn i {
    font-size: 0.875em;
}

.btn-sm i {
    font-size: 0.75rem;
}

/* Mobile Menu Auth Links */
.mobile-auth-divider {
    border-top: 1px solid var(--border);
    margin: 0.5rem 0;
    padding: 0;
}

.nav-link i {
    margin-left: 0.5rem;
}

.nav-link-highlight {
    color: var(--accent) !important;
    font-weight: 600;
}

.nav-link-highlight:hover {
    color: var(--accent-light) !important;
}

/* Hero */
.hero-section {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
    color: #fff;
    padding: 4rem 0;
    text-align: center;
}

.hero-title {
    font-size: clamp(1.5rem, 4vw, 2.25rem);
    font-weight: 800;
    margin-bottom: 0.75rem;
}

.hero-description {
    opacity: 0.9;
    margin-bottom: 1.5rem;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.hero-buttons {
    display: flex;
    gap: 0.75rem;
    justify-content: center;
    flex-wrap: wrap;
}

.hero-buttons .btn-primary {
    background: #fff;
    color: var(--primary);
}

/* Stats Section */
.stats-section {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
    padding: 3rem 0;
    color: #fff;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 2rem;
    text-align: center;
}

@media (max-width: 768px) {
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1.5rem;
    }
}

@media (max-width: 480px) {
    .stats-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
}

.stat-item {
    padding: 1rem;
    transition: transform 0.3s ease;
}

.stat-item:hover {
    transform: translateY(-5px);
}

.stat-number {
    font-size: 2.5rem;
    font-weight: 800;
    margin-bottom: 0.5rem;
    line-height: 1;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

@media (max-width: 768px) {
    .stat-number {
        font-size: 2rem;
    }
}

.stat-label {
    font-size: 0.9rem;
    opacity: 0.9;
    font-weight: 500;
}

/* Counter Animation */
.stat-number.counted {
    animation: countPulse 0.3s ease-out;
}

@keyframes countPulse {
    0% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.1);
    }

    100% {
        transform: scale(1);
    }
}

/* Sections */
.section {
    padding: 3rem 0;
}

.section-light {
    background: var(--bg-light);
}

.section-header {
    text-align: center;
    margin-bottom: 2rem;
}

.section-badge {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    background: rgba(0, 168, 132, 0.1);
    color: var(--accent);
    border-radius: 50px;
    font-size: 0.75rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.section-title {
    font-size: clamp(1.25rem, 3vw, 1.75rem);
    font-weight: 800;
    margin-bottom: 0.5rem;
}

.section-title span {
    color: var(--accent);
}

.section-subtitle {
    color: var(--text-gray);
    max-width: 500px;
    margin: 0 auto;
    font-size: 0.9375rem;
}

/* Grid */
.grid {
    display: grid;
    gap: 1.5rem;
}

.grid-2,
.grid-3,
.grid-4 {
    grid-template-columns: 1fr;
}

@media (min-width: 640px) {

    .grid-2,
    .grid-3,
    .grid-4 {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 992px) {
    .grid-3 {
        grid-template-columns: repeat(3, 1fr);
    }

    .grid-4 {
        grid-template-columns: repeat(4, 1fr);
    }
}

/* Cards */
.card {
    background: var(--bg-white);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
    transition: box-shadow 0.2s;
}

.card:hover {
    box-shadow: var(--shadow);
}

.card-image {
    height: 160px;
    background: var(--bg-light);
    display: flex;
    align-items: center;
    justify-content: center;
}

.card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.card-body {
    padding: 1rem;
}

.card-title {
    font-size: 1rem;
    font-weight: 700;
    margin-bottom: 0.375rem;
}

.card-title a:hover {
    color: var(--accent);
}

.card-text {
    font-size: 0.875rem;
    color: var(--text-gray);
}

/* Feature Cards */
.feature-card {
    background: var(--bg-white);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.5rem;
    text-align: center;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.feature-card:hover {
    border-color: var(--accent);
    box-shadow: var(--shadow);
}

.feature-icon {
    width: 56px;
    height: 56px;
    margin: 0 auto 1rem;
    background: rgba(0, 168, 132, 0.1);
    border-radius: var(--radius);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--accent);
}

.feature-icon svg {
    width: 24px;
    height: 24px;
}

.feature-title {
    font-size: 1rem;
    font-weight: 700;
    margin-bottom: 0.375rem;
}

.feature-text {
    font-size: 0.875rem;
    color: var(--text-gray);
}

/* Stats */
.stats-section {
    background: var(--primary);
    color: #fff;
    padding: 2.5rem 0;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
    text-align: center;
}

@media (min-width: 768px) {
    .stats-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

.stat-number {
    font-size: 2rem;
    font-weight: 800;
    color: var(--accent-light);
}

.stat-label {
    font-size: 0.875rem;
    opacity: 0.9;
}

/* Footer */
.site-footer {
    background: var(--text-dark);
    color: #fff;
    padding: 2.5rem 0 1.5rem;
}

.footer-grid {
    display: grid;
    gap: 1.5rem;
    margin-bottom: 1.5rem;
}

@media (min-width: 768px) {
    .footer-grid {
        grid-template-columns: 2fr 1fr 1fr 1.5fr;
    }
}

.footer-logo {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.75rem;
}

.footer-logo img {
    width: 36px;
    height: 36px;
    border-radius: 6px;
}

.footer-logo span {
    font-weight: 700;
}

.footer-description {
    font-size: 0.875rem;
    opacity: 0.8;
    margin-bottom: 1rem;
}

.social-links {
    display: flex;
    gap: 0.5rem;
}

.social-link {
    width: 32px;
    height: 32px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.social-link:hover {
    background: var(--accent);
    border-color: var(--accent);
}

.social-link svg {
    width: 14px;
    height: 14px;
}

.footer-column h4 {
    font-size: 0.9375rem;
    margin-bottom: 0.75rem;
}

.footer-links {
    list-style: none;
}

.footer-links li {
    margin-bottom: 0.375rem;
}

.footer-links a {
    font-size: 0.875rem;
    opacity: 0.8;
}

.footer-links a:hover {
    opacity: 1;
    color: var(--accent-light);
}

.contact-info {
    list-style: none;
}

.contact-info li {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
    font-size: 0.875rem;
    opacity: 0.8;
}

.contact-info svg {
    width: 16px;
    height: 16px;
    min-width: 16px;
    color: var(--accent-light);
}

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: 1rem;
    text-align: center;
    font-size: 0.8125rem;
    opacity: 0.7;
}

/* Page Header */
.page-header {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
    color: #fff;
    padding: 2.5rem 0;
    text-align: center;
}

.page-title {
    font-size: clamp(1.25rem, 4vw, 1.75rem);
    font-weight: 800;
}

/* Utilities */
.text-center {
    text-align: center;
}

.text-muted {
    color: var(--text-gray);
}

.mt-4 {
    margin-top: 1rem;
}

.mt-6 {
    margin-top: 1.5rem;
}

.mb-4 {
    margin-bottom: 1rem;
}

.flex {
    display: flex;
}

.items-center {
    align-items: center;
}

.justify-center {
    justify-content: center;
}

.gap-4 {
    gap: 1rem;
}

.flex-wrap {
    flex-wrap: wrap;
}

/* Elementor Compatibility */
.elementor-page .site-header,
.elementor-page .site-footer {
    display: block;
}

.elementor-section {
    direction: rtl;
}

/* Icon Styles - Font Awesome Support */
.feature-icon i,
.feature-icon .fa,
.feature-icon .fas,
.feature-icon .far,
.feature-icon .fab {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
}

/* Dashicons Support */
.feature-icon .dashicons {
    font-size: 24px;
    width: 24px;
    height: 24px;
}

/* Admin Bar Support */
body.admin-bar .site-header {
    top: 32px;
}

@media (max-width: 782px) {
    body.admin-bar .site-header {
        top: 46px;
    }
}

/* Elementor Edit Link in Admin Bar */
#wpadminbar .elementor-edit-link a {
    color: #00a884 !important;
}

#wpadminbar .elementor-edit-link a:hover {
    color: #00c49a !important;
}

#wpadminbar .elementor-edit-link .ab-icon {
    margin-left: 5px;
}

/* RTL Icon Adjustments */
[dir="rtl"] .feature-icon {
    margin-left: auto;
    margin-right: 0;
}

/* Elementor Full Width Support */
.elementor-page .site-main,
.elementor-page #content {
    padding: 0;
    margin: 0;
}

.elementor-page article.elementor-page {
    width: 100%;
}

/* Social Links Icons */
.social-link i {
    font-size: 14px;
}

/* Contact Info Icons */
.contact-info i {
    font-size: 16px;
    min-width: 16px;
    color: var(--accent-light);
}

/* Elementor Canvas Template */
.elementor-canvas {
    background: var(--bg-white);
}

.elementor-canvas .elementor-section {
    direction: rtl;
}

/* Elementor Full Width Template */
.elementor-full-width {
    padding: 0;
    margin: 0;
    width: 100%;
}

/* Font Awesome Icon Fix */
.fa-solid,
.fa-brands,
.fas,
.fab,
.far {
    font-family: "Font Awesome 6 Free", "Font Awesome 6 Brands", FontAwesome !important;
    font-weight: 900;
    font-style: normal;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

.fa-brands {
    font-family: "Font Awesome 6 Brands" !important;
    font-weight: 400;
}

/* Ensure icons display properly */
.feature-icon i,
.social-link i,
.contact-info i {
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

/* Card image icon centering */
.card-image i {
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Bundle Cards */
.bundle-card {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.bundle-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
}

.bundle-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    font-size: 0.875rem;
    color: #666;
    margin-bottom: 1rem;
}

.bundle-meta span {
    display: flex;
    align-items: center;
    gap: 0.35rem;
}

.bundle-meta i {
    font-size: 0.75rem;
    color: var(--accent);
}

/* Card Image with Thumbnail */
.card-image {
    height: 180px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    position: relative;
}

.card-image::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: inherit;
    z-index: 0;
}

.card-image i {
    position: relative;
    z-index: 1;
}

/* No Bundles Message */
.no-bundles {
    grid-column: 1 / -1;
    text-align: center;
    padding: 3rem;
    background: var(--bg-light);
    border-radius: 12px;
}

.no-bundles i {
    font-size: 3rem;
    color: #ccc;
    margin-bottom: 1rem;
    display: block;
}

.no-bundles p {
    color: #666;
    margin: 0;
}

/* Dropdown Menu Styles */
.nav-item {
    position: relative;
    display: flex;
    align-items: center;
}

.dropdown-menu {
    position: absolute;
    top: 100%;
    right: 0;
    min-width: 280px;
    background: var(--bg-white);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: all 0.3s ease;
    z-index: 9999;
    padding: 0.75rem;
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.nav-item:hover .dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.dropdown-item {
    display: flex !important;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1rem !important;
    color: var(--text-dark) !important;
    border-radius: 8px;
    transition: all 0.2s;
}

.dropdown-item:hover {
    background: var(--bg-light);
    color: var(--primary) !important;
    transform: translateX(-4px);
}

.dropdown-icon {
    width: 32px;
    height: 32px;
    background: rgba(59, 177, 189, 0.1);
    color: var(--accent);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.875rem;
}

.dropdown-item:hover .dropdown-icon {
    background: var(--accent);
    color: #fff;
}

/* Enhancing Services Page for Richness */
.service-rich-card {
    background: #fff;
    border-radius: var(--radius);
    padding: 3rem 2rem;
    position: relative;
    overflow: hidden;
    border: 1px solid var(--border);
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.service-rich-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.08);
    border-color: var(--accent);
}

.service-rich-card::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 100%;
    height: 6px;
    background: linear-gradient(90deg, var(--primary), var(--accent));
}

.service-icon-wrapper {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: var(--bg-light);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.5rem;
    font-size: 2rem;
    color: var(--primary);
    transition: all 0.3s ease;
}

.service-rich-card:hover .service-icon-wrapper {
    background: var(--primary);
    color: #fff;
    transform: rotateY(180deg);
}

.service-title-rich {
    font-size: 1.5rem;
    font-weight: 800;
    margin-bottom: 1rem;
    color: var(--primary);
}

.service-text-rich {
    color: var(--text-gray);
    line-height: 1.8;
    margin-bottom: auto;
}

.service-link-rich {
    margin-top: 1.5rem;
    font-weight: 700;
    color: var(--accent);
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.service-link-rich:hover {
    color: var(--primary);
}

/* Animations & Kinetic Feel */
@keyframes float {
    0% {
        transform: translateY(0px);
    }

    50% {
        transform: translateY(-10px);
    }

    100% {
        transform: translateY(0px);
    }
}

.hero-image-animate {
    animation: float 6s ease-in-out infinite;
}

/* Child Friendly Enhancements */
.section-title {
    position: relative;
    display: inline-block;
}

.section-title::after {
    content: '';
    display: block;
    width: 60px;
    height: 4px;
    background: var(--quaternary);
    margin: 0.5rem auto 0;
    border-radius: 4px;
}