/* --- Responsive Overrides & Section Specific Styles --- */

/* Header Desktop Nav */
.desktop-nav {
    display: none;
}

@media (min-width: 992px) {
    .desktop-nav {
        display: block;
    }

    .menu-toggle {
        display: none;
    }
}

/* Header links overrides */
.nav-list {
    display: flex;
    gap: 30px;
}

.nav-link {
    font-weight: 500;
    position: relative;
    padding: 5px 0;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--primary);
    transition: var(--transition);
}

body[dir="rtl"] .nav-link::after {
    left: auto;
    right: 0;
}

.nav-link:hover::after,
.nav-link.active::after {
    width: 100%;
}

.logo {
    display: flex;
    align-items: baseline;
    font-size: 1.75rem;
    font-weight: 800;
    color: var(--dark);
}

.header:not(.scrolled) .logo,
.header:not(.scrolled) .nav-link,
.header:not(.scrolled) .lang-btn,
.header:not(.scrolled) .menu-toggle {
    color: var(--white);
}

.logo-dot {
    color: var(--primary);
}

.lang-switcher {
    display: flex;
    gap: 5px;
    background: rgba(0, 0, 0, 0.05);
    padding: 4px;
    border-radius: 20px;
}

.header.scrolled .lang-switcher {
    background: var(--light);
}

.lang-btn {
    padding: 4px 10px;
    border-radius: 15px;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--dark-muted);
}

.lang-btn.active {
    background-color: var(--white);
    color: var(--primary);
    box-shadow: var(--shadow-sm);
}

.header:not(.scrolled) .lang-btn.active {
    background-color: var(--primary);
    color: var(--white);
}

/* Sidebar contents */
.close-sidebar {
    position: absolute;
    top: 25px;
    right: 30px;
    font-size: 1.5rem;
    color: var(--dark);
}

body[dir="rtl"] .close-sidebar {
    right: auto;
    left: 30px;
}

.mobile-nav-list {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.mobile-nav-link {
    font-size: 1.25rem;
    font-weight: 600;
    display: block;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--border);
}

/* Hero */
.hero {
    height: 100vh;
    min-height: 600px;
    display: flex;
    align-items: center;
    position: relative;
    padding-top: var(--header-height);
}

.hero-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    background-image: linear-gradient(rgba(17, 24, 39, 0.8), rgba(17, 24, 39, 0.7)), url('../assets/images/hero-bg.jpg');
    background-size: cover;
    background-position: center;
}

.hero-content {
    max-width: 800px;
    text-align: center;
    margin: 0 auto;
    color: var(--white);
}

.hero-subtitle {
    font-size: 1.125rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: var(--primary-light);
    margin-bottom: 20px;
}

.hero-title {
    font-size: clamp(2.5rem, 5vw, 4.5rem);
    margin-bottom: 40px;
    line-height: 1.1;
    color: #ffffff;
}

.highlight-wrapper {
    position: relative;
    display: inline-block;
    white-space: nowrap;
}

.highlight-text {
    position: relative;
    z-index: 1;
    color: var(--primary-light);
}

.hand-drawn-underline {
    position: absolute;
    bottom: -15px;
    left: -5%;
    width: 110%;
    height: 30px;
    z-index: 0;
    pointer-events: none;
}

/* About grid */
.about-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 50px;
    align-items: center;
}

@media (min-width: 992px) {
    .about-grid {
        grid-template-columns: 1fr 1fr;
    }
}

.video-wrapper {
    position: relative;
    padding-bottom: 56.25%;
    height: 0;
    overflow: hidden;
    border-radius: 16px;
    box-shadow: var(--shadow-lg);
}

.video-wrapper iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.about-text {
    margin-bottom: 30px;
    color: var(--text-muted);
}

/* Scholarships Slider */
.scholarships-slider-container {
    overflow-x: auto;
    padding: 20px 0;
}

/* Custom Scrollbar for Scholarships */
.scholarships-slider-container::-webkit-scrollbar {
    height: 8px;
}

.scholarships-slider-container::-webkit-scrollbar-track {
    background: var(--light);
    border-radius: 10px;
}

.scholarships-slider-container::-webkit-scrollbar-thumb {
    background: var(--primary);
    border-radius: 10px;
}

.scholarships-track {
    display: flex;
    gap: 30px;
    width: max-content;
    padding: 10px;
}

.scholarship-card {
    background: var(--white);
    border-radius: 16px;
    width: 350px;
    box-shadow: var(--shadow-md);
    transition: var(--transition);
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.scholarship-card:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-lg);
}

.card-img-wrapper {
    position: relative;
    height: 200px;
    overflow: hidden;
}

.card-img-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.scholarship-card:hover .card-img-wrapper img {
    transform: scale(1.1);
}

.card-badge {
    position: absolute;
    top: 15px;
    right: 15px;
    background: var(--primary);
    color: var(--white);
    padding: 6px 16px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
}

body[dir="rtl"] .card-badge {
    right: auto;
    left: 15px;
}

.card-body {
    padding: 25px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.card-title {
    font-size: 1.25rem;
    margin-bottom: 15px;
}

.card-meta {
    display: flex;
    justify-content: space-between;
    margin-bottom: 15px;
    color: var(--text-muted);
    font-size: 0.9rem;
}

.meta-item i {
    color: var(--primary);
    margin-right: 5px;
}

body[dir="rtl"] .meta-item i {
    margin-right: 0;
    margin-left: 5px;
}

.card-deadline {
    margin-bottom: 25px;
    font-size: 0.95rem;
    padding: 10px;
    background: var(--light);
    border-radius: 8px;
    text-align: center;
}

/* Steps */
.steps-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
}

.step-card {
    background: var(--white);
    padding: 40px 30px;
    border-radius: 16px;
    text-align: center;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
    position: relative;
    border: 1px solid var(--border);
}

.step-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-md);
    border-color: var(--primary);
}

.step-icon {
    width: 80px;
    height: 80px;
    background: var(--primary-light);
    color: var(--primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    margin: 0 auto 25px;
    position: relative;
}

.step-number {
    position: absolute;
    top: -5px;
    right: -5px;
    background: var(--dark);
    color: var(--white);
    width: 30px;
    height: 30px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.85rem;
    font-weight: 700;
    border: 2px solid var(--white);
}

.step-title {
    margin-bottom: 15px;
    font-size: 1.25rem;
}

.step-desc {
    color: var(--text-muted);
    font-size: 0.95rem;
}

/* Masonry */
.masonry-grid {
    column-count: 2;
    column-gap: 15px;
}

@media (min-width: 992px) {
    .masonry-grid {
        column-count: 4;
    }
}

.masonry-item {
    position: relative;
    border-radius: 16px;
    overflow: hidden;
    cursor: pointer;
    margin-bottom: 15px;
    break-inside: avoid;
    display: inline-block;
    width: 100%;
}

.masonry-item.type-1 {
    aspect-ratio: 435 / 608;
}

.masonry-item.type-2 {
    aspect-ratio: 401 / 415;
}

.masonry-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.masonry-item:hover img {
    transform: scale(1.1);
}

.masonry-item .overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(rgba(0, 0, 0, 0.1), rgba(0, 0, 0, 0.8));
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 20px;
}

.play-btn {
    width: 60px;
    height: 60px;
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(5px);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: var(--white);
    transition: var(--transition);
    margin-bottom: auto;
    margin-top: auto;
}

.masonry-item:hover .play-btn {
    background: var(--primary);
    transform: scale(1.1);
}

.student-info {
    width: 100%;
    text-align: left;
    margin-top: auto;
}

body[dir="rtl"] .student-info {
    text-align: right;
}

.student-info h3 {
    color: var(--white);
    margin-bottom: 5px;
    font-size: 1.25rem;
}

.student-info p {
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.9rem;
}

/* FAQ */
.faq-accordion {
    max-width: 800px;
    margin: 0 auto;
}

.accordion-item {
    margin-bottom: 15px;
    border: 1px solid var(--border);
    border-radius: 8px;
    overflow: hidden;
}

.accordion-header {
    width: 100%;
    text-align: left;
    padding: 20px;
    background: var(--white);
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-weight: 600;
    font-size: 1.1rem;
    color: var(--dark);
    transition: var(--transition);
}

body[dir="rtl"] .accordion-header {
    text-align: right;
}

.accordion-header:hover {
    background: var(--light);
}

.accordion-header[aria-expanded="true"] {
    background: var(--primary);
    color: var(--white);
}

.accordion-icon {
    transition: transform 0.3s ease;
}

.accordion-header[aria-expanded="true"] .accordion-icon {
    transform: rotate(45deg);
}

.accordion-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease-out;
    background: var(--white);
}

.accordion-content p {
    padding: 20px;
    color: var(--text-muted);
    border-top: 1px solid var(--border);
}

/* Blogs */
.blogs-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

.blog-card {
    background: var(--white);
    border-radius: 16px;
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
}

.blog-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-md);
}

.blog-img {
    height: 200px;
    overflow: hidden;
}

.blog-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.blog-card:hover .blog-img img {
    transform: scale(1.05);
}

.blog-content {
    padding: 25px;
}

.blog-meta {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-bottom: 10px;
}

.blog-title {
    font-size: 1.25rem;
    margin-bottom: 15px;
}

.blog-excerpt {
    color: var(--text-muted);
    margin-bottom: 20px;
    font-size: 0.95rem;
}

.read-more {
    font-weight: 600;
    color: var(--primary);
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.read-more:hover {
    gap: 10px;
}

/* Team */
.team-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
}

.team-card {
    text-align: center;
}

.team-img {
    position: relative;
    border-radius: 16px;
    overflow: hidden;
    margin-bottom: 20px;
    aspect-ratio: 1/1;
}

.team-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.team-social {
    position: absolute;
    bottom: -50px;
    left: 0;
    width: 100%;
    background: rgba(0, 0, 0, 0.7);
    padding: 15px 0;
    display: flex;
    justify-content: center;
    gap: 15px;
    transition: bottom 0.3s ease;
}

.team-card:hover .team-social {
    bottom: 0;
}

.team-social a {
    color: var(--white);
    font-size: 1.2rem;
}

.team-social a:hover {
    color: var(--primary);
}

.team-info h3 {
    margin-bottom: 5px;
}

.team-role {
    color: var(--primary);
    font-weight: 500;
}

/* Contact */
.contact-wrapper {
    display: grid;
    grid-template-columns: 1fr;
    gap: 50px;
}

@media (min-width: 992px) {
    .contact-wrapper {
        grid-template-columns: 1fr 1fr;
    }
}

.contact-title {
    color: var(--white);
    font-size: 2.5rem;
    margin-bottom: 15px;
}

.contact-desc {
    color: rgba(255, 255, 255, 0.7);
    margin-bottom: 40px;
}

.contact-details {
    display: flex;
    flex-direction: column;
    gap: 25px;
    margin-bottom: 40px;
}

.contact-item {
    display: flex;
    align-items: flex-start;
    gap: 20px;
}

.icon-box {
    width: 50px;
    height: 50px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    color: var(--primary);
    flex-shrink: 0;
}

.icon-box.whatsapp-color {
    color: #25D366;
}

.contact-form-container {
    background: var(--white);
    padding: 40px;
    border-radius: 16px;
    box-shadow: var(--shadow-lg);
}

.social-icons {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
}

.follow-us h4 {
    color: var(--white);
    margin-bottom: 15px;
}

/* Footer Links */
.footer-bio {
    color: rgba(255, 255, 255, 0.6);
    margin-top: 20px;
}

.footer-links h4,
.footer-bottom-social h4 {
    margin-bottom: 20px;
    color: var(--white);
    font-size: 1.2rem;
}

.footer-links ul {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.footer-links a {
    color: rgba(255, 255, 255, 0.6);
}

.footer-links a:hover {
    color: var(--primary);
    padding-left: 5px;
}

body[dir="rtl"] .footer-links a:hover {
    padding-left: 0;
    padding-right: 5px;
}

@media (min-width: 1000px) {
    .modal-content {
        padding-bottom: 506.25px;
    }
}