/*
 * Homepage Specific Styles - PrepCenter Theme (Final Version)
 */

/* ==========================================================================
   General Section Styling
   ========================================================================== */
.section-title-container {
    text-align: center;
}
.section-title {
    font-size: clamp(2rem, 4vw, 2.5rem);
    color: var(--primary);
    position: relative;
    display: inline-block;
}
.section-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 4px;
    background: var(--accent);
    border-radius: 4px;
}

/* ==========================================================================
   Hero Section (Final Version)
   ========================================================================== */
.hero-section-final {
    padding: 0px 0;
    background: linear-gradient(135deg, var(--surface-2) 0%, var(--bg) 100%);
    overflow: hidden;
    text-align: center;
}
.hero-main-title-row {
    margin-bottom: 5px;
}
.hero-main-title {
    font-size: clamp(2.2rem, 5vw, 3rem);
    font-weight: 800;
    line-height: 1.3;
    color: var(--text);
    text-align: left;

}
.hero-content-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    align-items: center;
    text-align: left;
    margin-bottom: 20px;
}
.hero-text-col p {
    font-size: 1rem;
    line-height: 1.6;
    color: var(--muted);
    margin: 0 0 15px 0;
}
.hero-image-col img {
    max-width: 100%;
    height: 250px;
    border-radius: var(--radius);
}
.hero-buttons-row {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    justify-content: left;
}
/* Custom Button Styles */
.hero-buttons-row .btn {
    padding: 0.8rem 1.5rem;
    font-size: 0.95rem;
}
.btn.btn-accent {
    background: var(--accent);
    color: var(--primary);
    box-shadow: 0 8px 20px color-mix(in oklab,var(--accent),transparent 65%);
}
.btn.btn-accent:hover {
    background: color-mix(in oklab,var(--accent),#000 10%);
}
.btn.btn-outline {
    background: transparent;
    border: 1px solid var(--muted);
    color: var(--text);
}
.btn.btn-outline:hover {
    background: var(--surface);
    border-color: var(--accent);
}


/* ==========================================================================
   Partners & Countries Sliders (Marquee Effect)
   ========================================================================== */
.partners-section, .countries-section {
    background-color: var(--surface-2);
}
.university-slider, .country-slider {
    padding: 20px 0;
}
/* Hide pagination as it's not needed for marquee effect */
.university-slider .swiper-pagination,
.country-slider .swiper-pagination {
    display: none;
}
.swiper-container {
    overflow: hidden; /* Ensure slides stay within the box */
}
.swiper-slide {
    display: flex;
    justify-content: center;
    align-items: center;
    height: auto;
}
.slider-item-link {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 15px;
    text-align: center;
}

/* University Logos */
.slider-item-logo {
    max-height: 70px;
    width: auto;
    object-fit: contain;
    filter: grayscale(100%);
    opacity: 0.7;
    transition: filter 0.3s ease, opacity 0.3s ease;
}
.slider-item-link:hover .slider-item-logo {
    filter: grayscale(0%);
    opacity: 1;
}

/* Country Flags */
.slider-item-flag {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    object-fit: cover;
    border: 4px solid var(--surface);
    box-shadow: var(--shadow);
    transition: transform 0.3s ease;
}
.slider-item-link:hover .slider-item-flag {
    transform: scale(1.1);
}
.slider-item-title {
    font-size: 1rem;
    font-weight: 600;
    color: var(--muted);
    transition: color 0.3s ease;
}
.slider-item-link:hover .slider-item-title {
    color: var(--accent);
}


/* ==========================================================================
   Articles & Videos Section
   ========================================================================== */
.media-section {
    background-color: var(--surface);
}
.media-grid {
    display: grid;
    grid-template-columns: 1fr 1.5fr;
    gap: 50px;
    align-items: flex-start;
}
.media-col-title {
    font-size: 1.5rem;
    color: var(--primary);
    margin: 0 0 10px 0;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--accent);
}
.latest-articles-list { list-style: none; padding: 0; margin: 0; }
.latest-articles-list li { margin-bottom: 10px; }
.latest-articles-list a {
    display: block;
    padding: 12px 15px;
    background-color: var(--card);
    border-radius: 8px;
    border-left: 3px solid transparent;
    transition: all 0.2s ease-in-out;
}
.latest-articles-list a:hover {
    transform: translateX(5px);
    background-color: var(--surface-2);
    border-left-color: var(--accent);
    color: var(--text);
}
.latest-videos-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}
.video-card {
    background: var(--card);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.video-card:hover { transform: translateY(-5px); box-shadow: 0 12px 35px rgba(0,0,0,0.3); }
.video-card-img { width: 100%; height: 150px; object-fit: cover; display: block; }
.video-card-title { font-size: 0.9rem; font-weight: 600; line-height: 1.4; padding: 15px; margin: 0; }
.video-card:hover .video-card-title { color: var(--accent); }

/* ==========================================================================
   Responsive
   ========================================================================== */
@media (max-width: 992px) {
    .hero-content-grid { grid-template-columns: 1fr; text-align: center; }
    .hero-text-col { order: 2; }
    .hero-image-col { order: 1; margin-bottom: 30px; }
    .media-grid { grid-template-columns: 1fr; }
}
@media (max-width: 768px) {
    .latest-videos-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 480px) {
    .latest-videos-grid { grid-template-columns: 1fr; }
}


/* ==========================================================================
   News & Events Ticker Section (Final Robust Fix)
   ========================================================================== */
.news-events-ticker-section {
    background-color: var(--surface-2);
    padding: 15px 0;
    border-bottom: 1px solid color-mix(in oklab, var(--text), transparent 92%);
}

.ticker-wrapper {
    display: flex;
    align-items: center;
    gap: 15px; /* Increased gap for better spacing */
}

.ticker-label {
    /* First column */
    flex-shrink: 0;
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--accent);
    white-space: nowrap;
}

.ticker-content {
    /* Second column: this is the key */
    flex-grow: 1;
    overflow: hidden; /* This clips the animation perfectly */
    height: 30px;
    display: flex;
    align-items: center;
}

.ticker-content ul {
    /* The list is now a simple inline-block, not positioned absolutely */
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    gap: 40px;
    /* The animation is now on the transform property */
    animation: ticker-scroll-final 25s linear infinite;
    width: max-content; /* Ensure the ul has a width based on its content */
}

.ticker-content ul:hover {
    animation-play-state: paused;
}

.ticker-content li {
    white-space: nowrap;
    font-size: 1rem;
}

.ticker-content a {
    color: var(--muted);
    text-decoration: none;
    transition: color 0.2s ease;
}

.ticker-content a:hover {
    color: var(--text);
}

/* The New, More Robust Animation */
@keyframes ticker-scroll-final {
    0% {
        /* Start completely off-screen to the right */
        transform: translateX(100%);
    }
    100% {
        /* End completely off-screen to the left */
        transform: translateX(-100%);
    }
}