/* Arabic Fonts and RTL Support */
* {
    font-family: 'Noto Sans Arabic', Arial, sans-serif;
}

body {
    direction: rtl;
    text-align: right;
}

/* Custom Colors */
:root {
    --primary-color: #1B365D;
    --secondary-color: #2E5A7E;
    --gold-color: #D4A574;
    --success-color: #28a745;
    --warning-color: #ffc107;
    --danger-color: #dc3545;
    --light-color: #f8f9fa;
    --dark-color: #343a40;
}

.bg-primary {
    background-color: var(--primary-color) !important;
}

.btn-gold {
    background-color: var(--gold-color);
    border-color: var(--gold-color);
    color: white;
}

.btn-gold:hover {
    background-color: #c5965f;
    border-color: #c5965f;
    color: white;
}

.text-gold {
    color: var(--gold-color) !important;
}

.bg-gold {
    background-color: var(--gold-color) !important;
}

/* News Ticker */
.news-ticker-container {
    background: var(--gold-color);
    color: white;
    padding: 8px 0;
    overflow: hidden;
    position: relative;
    z-index: 1000;
}

.news-ticker {
    white-space: nowrap;
    overflow: hidden;
}

.news-ticker-content {
    display: inline-block;
    animation: scroll-left 60s linear infinite;
    padding-left: 100%;
}

.news-item {
    margin-left: 50px;
    font-weight: 500;
    font-size: 0.95rem;
}

@keyframes scroll-left {
    0% {
        transform: translate3d(100%, 0, 0);
    }

    100% {
        transform: translate3d(-100%, 0, 0);
    }
}

@media (max-width: 768px) {
    .news-ticker-content {
        animation: scroll-left 40s linear infinite;
    }

    .news-item {
        margin-left: 30px;
        font-size: 0.85rem;
    }
}

/* Hero Section */
.hero-section {
    height: 100vh;
    background: linear-gradient(rgba(16, 223, 126, 0.8), rgba(13, 156, 144, 0.8)),
        url('images/ph-7.jpg') center/cover;
    display: flex;
    align-items: center;
    position: relative;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(27, 54, 93, 0.7);
    display: flex;
    align-items: center;
}

.school-logo {
    animation: fadeInDown 1s ease-out;
}

@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-50px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Section Titles */
.section-title {
    color: var(--primary-color);
    font-weight: 700;
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.title-underline {
    width: 60px;
    height: 4px;
    background: var(--gold-color);
    margin: 0 auto 2rem;
    border-radius: 2px;
}

/* About Cards */
.about-card {
    background: white;
    border-radius: 15px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    border: 1px solid #f0f0f0;
}

.about-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
}

/* Education Cards */
.education-card {
    background: white;
    border-radius: 15px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    overflow: hidden;
}

.education-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
}

.education-card .card-header {
    padding: 2rem;
    border-bottom: none;
}

/* Staff Cards */
.staff-card {
    background: white;
    border-radius: 15px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    overflow: hidden;
    height: 300px;
}

.staff-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
}

.staff-img {
    padding: 20px;
}

.staff-img img {
    width: 120px;
    height: 120px;
    object-fit: cover;
    border: 4px solid var(--gold-color);
}

/* News Cards */
.news-card {
    background: white;
    border-radius: 15px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    overflow: hidden;
}

.news-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
}

.news-img {
    height: 353px;
    overflow: hidden;
}

.news-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.news-card:hover .news-img img {
    transform: scale(1.05);
}

.news-date {
    color: var(--gold-color);
}

/* Gallery */
.gallery-item {
    position: relative;
    overflow: hidden;
    border-radius: 10px;
    cursor: pointer;
}

.gallery-item img {
    width: 100%;
    height: 250px;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.gallery-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(27, 54, 93, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.gallery-overlay i {
    color: white;
    font-size: 2rem;
}

.gallery-item:hover img {
    transform: scale(1.1);
}

.gallery-item:hover .gallery-overlay {
    opacity: 1;
}

/* Contact Section */
.contact-icon {
    width: 50px;
    height: 50px;
    background: var(--primary-color);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-left: 15px;
    flex-shrink: 0;
}

.contact-icon i {
    color: white;
    font-size: 1.2rem;
}

.contact-item h6 {
    color: var(--primary-color);
    font-weight: 600;
}

.map-container {
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
}

/* Social Links */
.social-link {
    width: 45px;
    height: 45px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    text-decoration: none;
    transition: transform 0.3s ease;
}

.social-link:hover {
    transform: translateY(-3px);
    color: white;
}

.social-link.twitter {
    background: #1da1f2;
}

.social-link.facebook {
    background: #4267b2;
}

.social-link.instagram {
    background: #e4405f;
}

.social-link.youtube {
    background: #ff0000;
}

/* Navbar */
.navbar {
    background: var(--primary-color) !important;
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.1);
}

.navbar-brand {
    font-size: 1.4rem;
}

.nav-link {
    font-weight: 500;
    transition: color 0.3s ease;
}

.nav-link:hover {
    color: var(--gold-color) !important;
}

/* Smooth Scrolling */
html {
    scroll-behavior: smooth;
}

/* Responsive Design */
@media (max-width: 768px) {
    .hero-section {
        height: 80vh;
    }

    .section-title {
        font-size: 2rem;
    }

    .display-4 {
        font-size: 2.5rem;
    }

    .staff-img img {
        width: 100px;
        height: 100px;
    }

    .gallery-item img {
        height: 200px;
    }

    .contact-item {
        text-align: center;
        flex-direction: column;
        gap: 10px;
    }

    .contact-icon {
        margin-left: 0;
    }
}

@media (max-width: 576px) {
    .hero-section {
        height: 70vh;
    }

    .navbar-brand {
        font-size: 1rem;
    }

    .section-title {
        font-size: 1.8rem;
    }

    .display-4 {
        font-size: 2rem;
    }
}

/* Animation Classes */
.fade-in {
    transform: translateY(30px);
    transition: all 0.6s ease;
}

.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Loading Animation */
.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255, 255, 255, .3);
    border-radius: 50%;
    border-top-color: #fff;
    animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* Modal Customizations */
.modal-content {
    border-radius: 15px;
    border: none;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
}

.modal-header {
    border-bottom: 1px solid #eee;
    border-radius: 15px 15px 0 0;
}

.modal-body img {
    border-radius: 10px;
}

/* Button Enhancements */
.btn {
    border-radius: 25px;
    font-weight: 500;
    transition: all 0.3s ease;
}

.btn:hover {
    transform: translateY(-2px);
}

/* Card Enhancements */
.card {
    border: none;
    border-radius: 15px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.08);
}

/* Spacing Utilities */
.py-6 {
    padding-top: 5rem;
    padding-bottom: 5rem;
}

/* Text Color Utilities */
.text-muted {
    color: #6c757d !important;
}

/* Back to Top Button */
.back-to-top {
    position: fixed;
    bottom: 30px;
    left: 30px;
    width: 50px;
    height: 50px;
    background: var(--gold-color);
    color: white;
    border-radius: 50%;
    display: none;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    z-index: 999;
    transition: all 0.3s ease;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.2);
}

.back-to-top:hover {
    background: var(--primary-color);
    color: white;
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
}

@media (max-width: 768px) {
    .back-to-top {
        bottom: 20px;
        left: 20px;
        width: 45px;
        height: 45px;
        font-size: 1rem;
    }
}

/* Accordion Custom Styles */
.accordion-item {
    border: none;
    margin-bottom: 15px;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 3px 15px rgba(0, 0, 0, 0.08);
}

.accordion-button {
    background-color: var(--primary-color);
    color: white;
    font-weight: 600;
    font-size: 1.1rem;
    padding: 1.2rem 1.5rem;
    border: none;
    box-shadow: none;
}

.accordion-button:not(.collapsed) {
    background-color: var(--gold-color);
    color: white;
    box-shadow: none;
}

.accordion-button:hover {
    background-color: var(--secondary-color);
}

.accordion-button:focus {
    box-shadow: none;
    border: none;
}

.accordion-button::after {
    filter: brightness(0) invert(1);
    margin-right: auto;
    margin-left: 0;
}

.accordion-body {
    background-color: #f8f9fa;
    padding: 2rem 1.5rem;
}

.staff-section-header {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    padding: 1rem;
    border-radius: 8px;
    margin-bottom: 1.5rem;
    text-align: center;
}

.staff-section-header h4 {
    margin: 0;
    font-weight: 600;
}
