/**
 * Public Pages Shared Styles
 * تصميم مشترك للصفحات العامة
 */

/* Tajawal font loaded via local tajawal.css in HTML */

/* === Base Layout === */
html, body {
    height: 100%;
    margin: 0;
    padding: 0;
}
body {
    font-family: 'Tajawal', 'Segoe UI', sans-serif;
    display: flex;
    flex-direction: column;
    background: #f0f2f5;
    padding-bottom: 0 !important;
}
.main-content {
    flex: 1 0 auto;
    padding-bottom: 2rem;
}

/* === Page Loader === */
.page-loader {
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 99999;
    transition: opacity 0.6s ease, visibility 0.6s ease;
}
.page-loader.hidden { opacity: 0; visibility: hidden; }
.page-loader .loader-logo {
    max-width: 160px; max-height: 110px;
    margin-bottom: 24px;
    animation: loaderPulse 1.5s ease-in-out infinite;
    filter: drop-shadow(0 4px 20px rgba(0,0,0,0.3));
}
.page-loader .loader-spinner {
    width: 40px; height: 40px;
    border: 3px solid rgba(233,196,106,0.2);
    border-top: 3px solid #e9c46a;
    border-radius: 50%;
    animation: loaderSpin 0.8s linear infinite;
}
.page-loader .loader-text {
    margin-top: 16px;
    color: rgba(255,255,255,0.7);
    font-size: 0.95rem;
    font-weight: 500;
    letter-spacing: 0.5px;
}
@keyframes loaderSpin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}
@keyframes loaderPulse {
    0%, 100% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.05); opacity: 0.85; }
}

/* === Navbar === */
.public-navbar {
    background: linear-gradient(135deg, #1a1a2e 0%, #0f3460 100%);
    padding: 0.8rem 0;
    box-shadow: 0 4px 20px rgba(0,0,0,0.15);
    position: sticky;
    top: 0;
    z-index: 1000;
}
.public-navbar .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.public-navbar .navbar-brand {
    color: #fff;
    font-weight: 700;
    font-size: 1.25rem;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 10px;
    transition: opacity 0.3s;
}
.public-navbar .navbar-brand:hover { opacity: 0.9; color: #fff; }
.public-navbar .navbar-brand img {
    max-height: 60px;
    filter: drop-shadow(0 2px 8px rgba(0,0,0,0.2));
}
.public-navbar .nav-links {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}
.public-navbar .nav-link-item {
    color: rgba(255,255,255,0.8);
    text-decoration: none;
    padding: 8px 14px;
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 500;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    gap: 5px;
}
.public-navbar .nav-link-item:hover,
.public-navbar .nav-link-item.active {
    color: #fff;
    background: rgba(255,255,255,0.1);
}
.btn-login-nav {
    background: linear-gradient(135deg, #e9c46a, #f4a261);
    color: #1a1a2e;
    border: none;
    padding: 9px 22px;
    border-radius: 10px;
    font-weight: 700;
    font-size: 0.9rem;
    transition: all 0.3s;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 6px;
    box-shadow: 0 4px 15px rgba(233,196,106,0.3);
}
.btn-login-nav:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(233,196,106,0.4);
    color: #1a1a2e;
}

/* === Page Header / Hero === */
.page-header {
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%);
    padding: 3rem 0 2.5rem;
    color: #fff;
    margin-bottom: 2.5rem;
    position: relative;
    overflow: hidden;
}
.page-header::before {
    content: '';
    position: absolute;
    top: -50%; right: -30%;
    width: 60%; height: 200%;
    background: radial-gradient(circle, rgba(233,196,106,0.06) 0%, transparent 70%);
    pointer-events: none;
}
.page-header h1 {
    font-size: 2rem;
    font-weight: 800;
    margin: 0;
    position: relative;
    z-index: 1;
}
.page-header p {
    margin: 0.6rem 0 0;
    opacity: 0.8;
    font-size: 1.05rem;
    position: relative;
    z-index: 1;
}
.page-header .breadcrumb-nav {
    margin-top: 1rem;
    position: relative;
    z-index: 1;
}
.page-header .breadcrumb-nav a {
    color: #e9c46a;
    text-decoration: none;
    font-size: 0.85rem;
}
.page-header .breadcrumb-nav a:hover { text-decoration: underline; }
.page-header .breadcrumb-nav span {
    color: rgba(255,255,255,0.5);
    font-size: 0.85rem;
    margin: 0 6px;
}

/* === Section Titles === */
.section-title {
    font-size: 1.4rem;
    font-weight: 800;
    color: #1a1a2e;
    margin-bottom: 1.5rem;
    padding-bottom: 0.75rem;
    border-bottom: 3px solid #0f3460;
    display: inline-block;
}

/* === Cards (Courses) === */
.course-card {
    border: none;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 2px 12px rgba(0,0,0,0.06);
    transition: all 0.3s;
    height: 100%;
    background: #fff;
    border: 1px solid rgba(0,0,0,0.04);
    display: flex;
    flex-direction: column;
}
.course-card:hover {
    box-shadow: 0 12px 35px rgba(15,52,96,0.12);
    transform: translateY(-4px);
}
.course-img {
    height: 200px;
    background: linear-gradient(135deg, #f0f4ff, #e8ecf4);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}
.course-img img {
    width: 100%; height: 100%;
    object-fit: contain;
    transition: transform 0.4s;
}
.course-card:hover .course-img img {
    transform: scale(1.05);
}
.course-img i {
    font-size: 3rem;
    color: #c7d2e0;
}
.course-body {
    padding: 1.1rem;
}
.course-title {
    font-size: 0.95rem;
    font-weight: 700;
    color: #1a1a2e;
    margin-bottom: 0.4rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    line-height: 1.5;
}
.course-teacher {
    font-size: 0.8rem;
    color: #64748b;
    margin-bottom: 0.5rem;
}
.course-teacher a {
    color: #0f3460;
    text-decoration: none;
    font-weight: 500;
}
.course-teacher a:hover { text-decoration: underline; }
.course-price {
    font-size: 1.05rem;
    font-weight: 800;
    color: #10b981;
}

/* === Cards (Teachers) === */
.teacher-card {
    background: #fff;
    border-radius: 16px;
    padding: 1.5rem;
    text-align: center;
    box-shadow: 0 2px 12px rgba(0,0,0,0.06);
    transition: all 0.3s;
    height: 100%;
    text-decoration: none;
    display: block;
    border: 1px solid rgba(0,0,0,0.04);
}
.teacher-card:hover {
    box-shadow: 0 12px 35px rgba(15,52,96,0.12);
    transform: translateY(-4px);
    text-decoration: none;
}
.teacher-avatar {
    width: 72px; height: 72px;
    border-radius: 50%;
    background: linear-gradient(135deg, #1a1a2e, #0f3460);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 0.75rem;
    color: #fff;
    font-size: 1.75rem;
    font-weight: 700;
    box-shadow: 0 4px 15px rgba(15,52,96,0.2);
}
.teacher-name {
    font-size: 1rem;
    font-weight: 700;
    color: #1a1a2e;
    margin-bottom: 0.25rem;
}
.teacher-courses {
    font-size: 0.8rem;
    color: #64748b;
    margin: 0;
}

/* === Category Pills === */
.category-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: #fff;
    color: #1a1a2e;
    padding: 8px 18px;
    border-radius: 25px;
    margin: 4px;
    font-size: 0.85rem;
    font-weight: 500;
    transition: all 0.3s;
    border: 1px solid #e4e7ec;
    box-shadow: 0 1px 3px rgba(0,0,0,0.04);
}
.category-pill:hover {
    background: linear-gradient(135deg, #1a1a2e, #0f3460);
    color: #fff;
    border-color: #0f3460;
    transform: translateY(-1px);
}
.category-pill .badge {
    background: #0f3460;
    color: #fff;
    font-size: 0.7rem;
    padding: 3px 8px;
    border-radius: 12px;
}
.category-pill:hover .badge {
    background: #e9c46a;
    color: #1a1a2e;
}

/* === Content Cards (About, Privacy, Contact) === */
.content-card {
    background: #fff;
    border-radius: 16px;
    padding: 2rem;
    box-shadow: 0 2px 12px rgba(0,0,0,0.06);
    border: 1px solid rgba(0,0,0,0.04);
    margin-bottom: 1.5rem;
}
.content-card h3, .content-card h4 {
    color: #1a1a2e;
    font-weight: 700;
}
.content-card h3 i, .content-card h4 i {
    color: #0f3460;
}

/* === Info Cards (Features, Stats) === */
.info-card {
    background: #fff;
    border-radius: 16px;
    padding: 1.5rem;
    text-align: center;
    box-shadow: 0 2px 12px rgba(0,0,0,0.06);
    border: 1px solid rgba(0,0,0,0.04);
    transition: all 0.3s;
    height: 100%;
}
.info-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 35px rgba(15,52,96,0.1);
}
.info-card-icon {
    width: 60px; height: 60px;
    background: linear-gradient(135deg, #f0f4ff, #e8ecf4);
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1rem;
    font-size: 1.5rem;
    color: #0f3460;
    transition: all 0.3s;
}
.info-card:hover .info-card-icon {
    background: linear-gradient(135deg, #1a1a2e, #0f3460);
    color: #e9c46a;
}
.info-card h5 {
    font-weight: 700;
    color: #1a1a2e;
    margin-bottom: 0.5rem;
}
.info-card p {
    color: #64748b;
    font-size: 0.9rem;
    margin: 0;
    line-height: 1.6;
}

/* === Contact Form === */
.contact-form .form-group {
    margin-bottom: 1.2rem;
}
.contact-form label {
    display: flex;
    align-items: center;
    gap: 6px;
    font-weight: 600;
    color: #1a1a2e;
    margin-bottom: 0.5rem;
    font-size: 0.95rem;
}
.contact-form label i {
    color: #0f3460;
    font-size: 0.85rem;
}
.contact-form .form-control {
    padding: 14px 16px;
    border: 2px solid #e4e7ec;
    border-radius: 12px;
    font-size: 1rem;
    font-family: 'Tajawal', sans-serif;
    transition: all 0.3s;
    background: #fff;
}
.contact-form .form-control:hover {
    border-color: #c7d2e0;
}
.contact-form .form-control:focus {
    border-color: #0f3460;
    box-shadow: 0 0 0 4px rgba(15,52,96,0.1);
}
.contact-form .btn-submit {
    padding: 14px 32px;
    background: linear-gradient(135deg, #1a1a2e, #0f3460);
    color: #fff;
    border: none;
    border-radius: 12px;
    font-size: 1.05rem;
    font-weight: 700;
    font-family: 'Tajawal', sans-serif;
    cursor: pointer;
    transition: all 0.3s;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}
.contact-form .btn-submit:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(15,52,96,0.3);
}

/* === Contact Info Cards === */
.contact-info-card {
    background: linear-gradient(135deg, #1a1a2e, #0f3460);
    color: #fff;
    border-radius: 16px;
    padding: 1.5rem;
    text-align: center;
    height: 100%;
    transition: all 0.3s;
}
.contact-info-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 30px rgba(15,52,96,0.3);
}
.contact-info-card i {
    font-size: 1.8rem;
    color: #e9c46a;
    margin-bottom: 0.8rem;
}
.contact-info-card h6 {
    font-weight: 700;
    margin-bottom: 0.3rem;
}
.contact-info-card p {
    font-size: 0.85rem;
    color: rgba(255,255,255,0.8);
    margin: 0;
}

/* === Alerts === */
.alert-custom {
    padding: 14px 18px;
    border-radius: 12px;
    font-size: 0.9rem;
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 10px;
}
.alert-danger-custom {
    background: #fef2f2;
    color: #991b1b;
    border: 1px solid #fecaca;
}
.alert-success-custom {
    background: #ecfdf5;
    color: #065f46;
    border: 1px solid #a7f3d0;
}

/* === Empty State === */
.empty-state {
    text-align: center;
    padding: 3rem;
    color: #98a2b3;
}
.empty-state i {
    font-size: 3.5rem;
    margin-bottom: 1rem;
    color: #c7d2e0;
}
.empty-state p {
    font-size: 1rem;
    font-weight: 500;
}

/* === Footer === */
.public-footer {
    background: linear-gradient(135deg, #1a1a2e, #0f1c33);
    color: #94a3b8;
    padding: 2.5rem 0 2rem;
    flex-shrink: 0;
    margin: 0 !important;
}
.footer-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    color: #fff;
    font-weight: 700;
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
}
.footer-brand img {
    max-height: 40px;
    width: auto;
    display: inline-block;
    object-fit: contain;
}
.footer-desc {
    font-size: 0.85rem;
    color: rgba(255,255,255,0.5);
    margin-bottom: 1.5rem;
    line-height: 1.6;
}
.footer-title {
    color: #fff;
    font-weight: 700;
    margin-bottom: 0.8rem;
    font-size: 0.98rem;
}
.footer-links {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1rem;
}
.footer-links-vertical {
    flex-direction: column;
}
.footer-links a {
    color: rgba(255,255,255,0.6);
    text-decoration: none;
    font-size: 0.85rem;
    padding: 6px 12px;
    border-radius: 8px;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    gap: 5px;
}
.footer-links a:hover {
    color: #fff;
    background: rgba(255,255,255,0.08);
}
.footer-divider {
    border-top: 1px solid rgba(255,255,255,0.08);
    margin: 1.5rem 0;
}
.footer-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}
.footer-copyright {
    font-size: 0.8rem;
    color: rgba(255,255,255,0.4);
}
.footer-secure {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.8rem;
    color: #10b981;
}
.footer-secure i { font-size: 0.75rem; }

/* === Responsive === */
@media (max-width: 991px) {
    .public-navbar .nav-links .nav-link-item span {
        display: none;
    }
}

@media (max-width: 768px) {
    .public-navbar .container {
        flex-wrap: wrap;
        gap: 8px;
    }
    .public-navbar .navbar-brand {
        font-size: 1.1rem;
    }
    .public-navbar .navbar-brand img {
        max-height: 50px;
    }
    .public-navbar .nav-links {
        gap: 0.2rem;
    }
    .public-navbar .nav-link-item {
        padding: 6px 8px;
        font-size: 0.8rem;
    }
    .btn-login-nav {
        padding: 7px 16px;
        font-size: 0.85rem;
    }
    .page-header {
        padding: 2rem 0 1.5rem;
        margin-bottom: 1.5rem;
    }
    .page-header h1 {
        font-size: 1.5rem;
    }
    .page-header p {
        font-size: 0.9rem;
    }
    .section-title {
        font-size: 1.2rem;
    }
    .content-card {
        padding: 1.2rem;
    }
    /* عرض أفقي للبطاقات على الموبايل */
    .course-card {
        flex-direction: row;
    }
    .course-img {
        width: 40%;
        min-width: 130px;
        max-width: 180px;
        height: auto !important;
        min-height: 160px;
        border-radius: 16px 0 0 16px;
    }
    .course-body {
        flex: 1;
        display: flex;
        flex-direction: column;
        justify-content: center;
    }
    .footer-bottom {
        flex-direction: column;
        text-align: center;
    }
    .footer-links {
        justify-content: center;
    }
    .footer-links-vertical a {
        width: 100%;
        justify-content: center;
        min-height: 40px;
    }
    .public-footer {
        padding: 2rem 0 1.6rem;
    }
    .public-footer .col-md-4 {
        margin-bottom: 0.85rem;
    }
}

@media (max-width: 480px) {
    .page-header h1 { font-size: 1.3rem; }
    .page-header p { font-size: 0.85rem; }
    .category-pill { padding: 5px 12px; font-size: 0.8rem; }
    .public-footer {
        padding: 1.7rem 0 1.4rem;
    }
    .footer-brand {
        justify-content: center;
        text-align: center;
    }
    .footer-desc,
    .footer-title {
        text-align: center;
    }
    .footer-links {
        margin-bottom: 0.7rem;
    }
    .footer-links a {
        font-size: 0.83rem;
        padding: 7px 10px;
    }
}
