/*
Theme Name: FAHLACOM Educational Theme
Theme URI: https://fahlacom.com
Author: FAHLACOM
Description: قالب FAHLACOM التعليمي - مطابق 100% للتصميم الأصلي مع دعم Elementor
Version: 2.0.0
Requires at least: 5.8
Tested up to: 6.5
Requires PHP: 7.4
License: GNU General Public License v2 or later
Text Domain: fahlacom
*/

/* ============================================================
   كل CSS منقول حرفياً من الكود الأصلي — لا تعديل
   ============================================================ */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Cairo', sans-serif;
    background-color: #ffffff;
    color: #333;
    line-height: 1.6;
}

/* Colors */
:root {
    --purple: #6B3FA0;
    --mango: #FFB347;
    --white: #FFFFFF;
    --light-gray: #F5F5F5;
    --gray: #666666;
}

/* Global styles */
h1, h2, h3, h4 {
    font-weight: 700;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

section {
    padding: 60px 0;
}

.section-title {
    font-size: 36px;
    color: var(--purple);
    text-align: center;
    margin-bottom: 40px;
    position: relative;
}

.section-title::after {
    content: '';
    display: block;
    width: 80px;
    height: 4px;
    background: var(--mango);
    margin: 10px auto 0;
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 10px 20px;
    border-radius: 30px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
    font-family: 'Cairo', sans-serif;
}

.btn-purple {
    background: var(--purple);
    color: var(--white);
}

.btn-purple:hover {
    background: #5a3380;
    color: var(--white);
    text-decoration: none;
}

.btn-mango {
    background: var(--mango);
    color: var(--purple);
}

.btn-mango:hover {
    background: #e09e3f;
    color: var(--purple);
    text-decoration: none;
}

.btn-outline {
    background: transparent;
    border: 2px solid var(--purple);
    color: var(--purple);
}

.btn-outline:hover {
    background: var(--purple);
    color: var(--white);
    text-decoration: none;
}

/* Header */
header {
    background: var(--white);
    border-bottom: 4px solid var(--mango);
    position: sticky;
    top: 0;
    z-index: 9999;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.header-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 20px;
    max-width: 1400px;
    margin: 0 auto;
}

.logo {
    font-size: 24px;
    font-weight: 700;
    color: var(--purple);
    text-decoration: none;
    display: flex;
    align-items: center;
}

.logo i {
    color: var(--mango);
    margin-left: 8px;
    font-size: 28px;
}

.logo img {
    height: 50px;
    width: auto;
    margin-left: 8px;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 20px;
    margin: 0;
    padding: 0;
}

.nav-menu a {
    color: var(--purple);
    text-decoration: none;
    font-weight: 600;
    font-size: 16px;
    transition: color 0.3s;
}

.nav-menu a:hover,
.nav-menu .current-menu-item > a,
.nav-menu .current_page_item > a {
    color: var(--mango);
}

.header-buttons {
    display: flex;
    gap: 10px;
    align-items: center;
}

.mobile-toggle {
    display: none;
    font-size: 24px;
    color: var(--purple);
    cursor: pointer;
    background: none;
    border: none;
    padding: 5px;
}

/* Mobile nav panel */
.mobile-nav-panel {
    display: none;
    background: var(--white);
    border-top: 1px solid #eee;
    padding: 16px 20px;
}

.mobile-nav-panel.open {
    display: block;
}

.mobile-nav-panel .nav-menu {
    flex-direction: column;
    gap: 0;
}

.mobile-nav-panel .nav-menu li {
    border-bottom: 1px solid #eee;
}

.mobile-nav-panel .nav-menu a {
    display: block;
    padding: 12px 0;
}

.mobile-nav-panel .header-buttons {
    margin-top: 14px;
    flex-direction: column;
}

.mobile-nav-panel .header-buttons .btn {
    text-align: center;
}

/* Footer */
footer {
    background: var(--purple);
    color: var(--white);
    border-top: 4px solid var(--mango);
    padding: 40px 0 20px;
}

.footer-columns {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.footer-column h3 {
    font-size: 20px;
    margin-bottom: 15px;
    color: var(--mango);
}

.footer-column ul {
    list-style: none;
    margin: 0;
    padding: 0;
}

.footer-column ul li {
    margin-bottom: 8px;
}

.footer-column a {
    color: var(--white);
    text-decoration: none;
}

.footer-column a:hover {
    text-decoration: underline;
    color: var(--mango);
}

.social-icons {
    display: flex;
    gap: 15px;
    margin-top: 15px;
    flex-wrap: wrap;
}

.social-icons a {
    display: inline-flex;
    width: 40px;
    height: 40px;
    background: var(--mango);
    color: var(--white);
    border-radius: 50%;
    text-align: center;
    line-height: 40px;
    align-items: center;
    justify-content: center;
    transition: transform 0.3s;
    text-decoration: none;
    font-size: 16px;
}

.social-icons a:hover {
    transform: scale(1.1);
    color: var(--white);
}

.newsletter input {
    padding: 10px;
    border: none;
    border-radius: 20px;
    width: 100%;
    margin-bottom: 10px;
    font-family: 'Cairo', sans-serif;
    font-size: 14px;
}

.newsletter .newsletter-msg {
    font-size: 13px;
    margin-top: 6px;
}

.copyright {
    text-align: center;
    margin-top: 40px;
    color: var(--mango);
    font-size: 14px;
    padding: 0 20px;
}

/* Cards */
.card {
    background: var(--white);
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0,0,0,0.05);
    transition: all 0.3s ease;
    height: 100%;
}

.card:hover {
    box-shadow: 0 20px 40px rgba(107,63,160,0.15);
    transform: scale(1.02);
}

.card-image {
    width: 100%;
    height: 160px;
    object-fit: cover;
    display: block;
}

.card-content {
    padding: 20px;
}

.card-title {
    font-size: 22px;
    font-weight: 700;
    margin-bottom: 8px;
}

.card-description {
    color: var(--gray);
    margin-bottom: 15px;
    font-size: 14px;
}

.card-link {
    color: var(--purple);
    font-weight: 600;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.card-link:hover {
    text-decoration: underline;
}

/* Grid */
.grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
}

/* Responsive */
@media (max-width: 1024px) {
    .grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .nav-menu,
    .header-buttons {
        display: none;
    }
    .mobile-toggle {
        display: block;
    }
    .footer-columns {
        grid-template-columns: 1fr;
        text-align: center;
    }
    .footer-columns .social-icons {
        justify-content: center;
    }
    .grid {
        grid-template-columns: 1fr;
    }
    .section-title {
        font-size: 28px;
    }
    .hero h1 {
        font-size: 32px;
    }
    .hero p {
        font-size: 18px;
    }
}

/* Hero */
.hero {
    height: 600px;
    background-image: linear-gradient(135deg, rgba(107,63,160,0.8) 0%, rgba(255,179,71,0.8) 100%), url('https://picsum.photos/1920/600?random=1');
    background-size: cover;
    background-position: center;
    display: flex;
    align-items: center;
    color: var(--white);
}

.hero-content {
    max-width: 600px;
    padding: 0 20px;
}

.hero h1 {
    font-size: 48px;
    margin-bottom: 15px;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
}

.hero p {
    font-size: 24px;
    margin-bottom: 30px;
}

/* Carousel */
.carousel {
    position: relative;
    overflow: hidden;
}

.carousel-container {
    display: flex;
    transition: transform 0.5s ease;
}

.carousel-item {
    flex: 0 0 calc(33.333% - 20px);
    margin: 0 10px;
}

@media (max-width: 768px) {
    .carousel-item {
        flex: 0 0 calc(100% - 20px);
    }
}

.carousel-controls {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-top: 30px;
}

.carousel-control {
    background: var(--purple);
    color: var(--white);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background 0.3s;
    border: none;
    font-size: 14px;
}

.carousel-control:hover {
    background: var(--mango);
    color: var(--purple);
}

/* Tabs */
.tabs {
    display: flex;
    gap: 10px;
    margin-bottom: 30px;
    flex-wrap: wrap;
}

.tab {
    padding: 10px 20px;
    background: var(--light-gray);
    border-radius: 30px;
    cursor: pointer;
    transition: all 0.3s;
    font-weight: 600;
    font-family: 'Cairo', sans-serif;
    border: none;
    font-size: 15px;
    color: #333;
}

.tab.active {
    background: var(--purple);
    color: var(--white);
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}

/* Accordion */
.accordion-item {
    border-bottom: 1px solid #ddd;
}

.accordion-header {
    padding: 15px;
    background: var(--light-gray);
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-weight: 600;
    color: var(--purple);
    font-size: 15px;
    transition: background 0.2s;
}

.accordion-header:hover {
    background: #ede0ff;
}

.accordion-content {
    padding: 15px;
    display: none;
    font-size: 14px;
    color: #444;
    line-height: 1.7;
}

.accordion-item.active .accordion-content {
    display: block;
}

/* Progress bar */
.progress-item {
    margin-bottom: 20px;
}

.progress-label {
    display: flex;
    justify-content: space-between;
    margin-bottom: 5px;
    font-weight: 600;
    color: var(--purple);
    font-size: 14px;
}

.progress-bar {
    height: 10px;
    background: var(--light-gray);
    border-radius: 10px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: var(--mango);
    width: 0%;
    border-radius: 10px;
    transition: width 1.2s ease;
}

/* Page sections styling */
.page-section {
    padding: 60px 0;
    border-bottom: 1px dashed #ccc;
}

.page-section:last-child {
    border-bottom: none;
}

.page-heading {
    font-size: 32px;
    color: var(--purple);
    margin-bottom: 30px;
    text-align: center;
}

/* Badge */
.badge {
    background: var(--mango);
    color: var(--purple);
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
    display: inline-block;
}

/* Sidebar filter */
.filter-sidebar {
    background: var(--light-gray);
    border-radius: 16px;
    padding: 20px;
    margin-bottom: 30px;
}

.filter-sidebar h3 {
    color: var(--purple);
    font-size: 18px;
    margin-bottom: 14px;
}

.filter-sidebar label {
    display: block;
    margin-bottom: 8px;
    cursor: pointer;
    font-size: 14px;
}

/* Kids section */
.kids-bg {
    background: linear-gradient(135deg, #ffecd2 0%, #fcb69f 100%);
}

/* Helper classes */
.text-center { text-align: center; }
.mt-30 { margin-top: 30px; }
.mb-20 { margin-bottom: 20px; }

/* ============================================================
   Elementor compatibility — keep original look inside editor
   ============================================================ */
.elementor-page header,
.elementor-page footer {
    /* preserved by theme */
}

.elementor-widget-container {
    font-family: 'Cairo', sans-serif;
}

/* Remove Elementor default padding that breaks hero */
.elementor-widget-fahlacom-hero .elementor-widget-container,
.elementor-widget-fahlacom-channels .elementor-widget-container,
.elementor-widget-fahlacom-section-banner .elementor-widget-container {
    padding: 0 !important;
    margin: 0 !important;
}
