/* Modern polish layer: layout, motion, and depth refinements only.
   Reuses the existing color tokens (--primary-color, --secondary-color, etc.)
   and font (--font-primary) from styles.css - no new colors or fonts. */

html {
    scroll-behavior: smooth;
}

@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

:focus-visible {
    outline: 3px solid var(--secondary-color);
    outline-offset: 2px;
}

/* Smoother, springier motion for interactive elements site-wide */
.btn,
.feature-box,
.testimonial-content,
.contact-card,
.career-card,
.vacancy-card,
.homework-search-card,
.homework-card,
.navbar-nav .nav-link {
    transition: transform 0.35s cubic-bezier(0.22, 1, 0.36, 1),
        box-shadow 0.35s cubic-bezier(0.22, 1, 0.36, 1),
        background-color 0.25s ease,
        color 0.25s ease,
        border-color 0.25s ease;
}

.btn {
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.06);
}

.btn:hover {
    transform: translateY(-2px);
}

.btn:active {
    transform: translateY(0);
}

.btn-primary,
.btn-apply {
    box-shadow: 0 10px 24px -12px rgba(63, 81, 181, 0.55);
}

.btn-apply {
    box-shadow: 0 10px 24px -12px rgba(255, 152, 0, 0.55);
}

.feature-box:hover,
.testimonial-content:hover {
    transform: translateY(-8px);
}

/* Hero: soften the flat dark overlay into a subtle brand-tinted gradient */
.video-overlay {
    background: linear-gradient(
        180deg,
        rgba(33, 33, 33, 0.55) 0%,
        rgba(63, 81, 181, 0.42) 55%,
        rgba(33, 33, 33, 0.68) 100%
    );
}

.hero-content {
    animation: heroRise 0.9s cubic-bezier(0.22, 1, 0.36, 1) both;
}

@keyframes heroRise {
    from {
        opacity: 0;
        transform: translateY(24px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

[data-aos] {
    transition-timing-function: cubic-bezier(0.22, 1, 0.36, 1) !important;
}

.btn i {
    margin-right: 6px;
}

/* CTA section: give the flat primary fill a touch of depth */
.cta-section {
    position: relative;
    background: linear-gradient(135deg, var(--primary-color), #303f9f);
    overflow: hidden;
}

.cta-section::before {
    content: "";
    position: absolute;
    inset: -40% -10% auto auto;
    width: 60%;
    padding-bottom: 60%;
    border-radius: 50%;
    background: rgba(255, 152, 0, 0.14);
    pointer-events: none;
}

.cta-section .container {
    position: relative;
}

.cta-section .btn-success {
    box-shadow: 0 10px 24px -12px rgba(0, 0, 0, 0.45);
}

/* ------------------------------------------------------------------------ */
/* Homework page modernization                                              */
/* ------------------------------------------------------------------------ */

.homework-search-bar {
    background: linear-gradient(135deg, rgba(63, 81, 181, 0.07), rgba(255, 152, 0, 0.05));
    border-bottom: 1px solid rgba(63, 81, 181, 0.08);
    box-shadow: none;
}

.homework-search-title {
    display: flex;
    align-items: center;
    gap: 12px;
}

.homework-search-title .title-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border-radius: 14px;
    background: linear-gradient(135deg, var(--primary-color), #5c6bc0);
    color: var(--white-color);
    font-size: 1.1rem;
    flex: 0 0 auto;
}

.homework-search-card {
    position: relative;
    overflow: hidden;
}

.homework-search-card::before {
    content: "";
    position: absolute;
    inset: 0 0 auto 0;
    height: 4px;
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
}

.homework-search-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 16px 40px rgba(15, 23, 42, 0.12);
}

.homework-card {
    overflow: hidden;
    border: 1px solid rgba(15, 23, 42, 0.06);
}

.homework-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 16px 32px rgba(15, 23, 42, 0.1);
}

.homework-card .card-header {
    background: linear-gradient(120deg, var(--primary-color), #5c6bc0) !important;
    border: none;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.homework-card .card-header .hw-date-badge {
    background: rgba(255, 255, 255, 0.18);
    border-radius: 999px;
    padding: 3px 12px;
    font-size: 0.8rem;
    font-weight: 500;
}

.homework-card img {
    transition: transform 0.5s cubic-bezier(0.22, 1, 0.36, 1);
    cursor: zoom-in;
}

.homework-card:hover img {
    transform: scale(1.015);
}

.homework-empty-state {
    text-align: center;
    padding: 60px 20px;
    border-radius: 14px;
    background: var(--light-color);
}

.homework-empty-state i {
    font-size: 2.5rem;
    color: var(--primary-color);
    opacity: 0.55;
    margin-bottom: 14px;
    display: block;
}

.pagination .page-link {
    border-radius: 999px !important;
    margin: 0 3px;
    border: none;
    color: var(--primary-color);
}

.pagination .page-item.active .page-link {
    background-color: var(--primary-color);
    color: var(--white-color);
    box-shadow: 0 6px 16px -6px rgba(63, 81, 181, 0.6);
}

/* ------------------------------------------------------------------------ */
/* Home page redesign - feature cards, about, stats, testimonials, downloads */
/* ------------------------------------------------------------------------ */

.section-title h2 {
    letter-spacing: -0.01em;
}

.section-subtitle {
    color: var(--gray-color);
}

.feature-box {
    border: 1px solid rgba(15, 23, 42, 0.05);
}

.feature-box .icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 76px;
    height: 76px;
    border-radius: 22px;
    background: linear-gradient(135deg, rgba(63, 81, 181, 0.12), rgba(255, 152, 0, 0.1));
}

.feature-box .icon i {
    font-size: 2rem;
    background: linear-gradient(135deg, var(--primary-color), #5c6bc0);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* About section */
.about-image {
    box-shadow: 0 20px 45px -20px rgba(15, 23, 42, 0.35);
}

.about-image:hover img {
    transform: scale(1.05);
}

.about-features .feature {
    padding: 10px 14px;
    border-radius: 12px;
    background: var(--light-color);
    transition: background-color 0.25s ease, transform 0.25s ease;
}

.about-features .feature:hover {
    background: rgba(63, 81, 181, 0.08);
    transform: translateX(3px);
}

.about-features .feature i {
    flex: 0 0 auto;
}

/* Counter / stats section */
.counter-box {
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.12);
    backdrop-filter: blur(6px);
    transition: transform 0.35s cubic-bezier(0.22, 1, 0.36, 1), background-color 0.35s ease;
}

.counter-box:hover {
    transform: translateY(-6px);
    background: rgba(255, 255, 255, 0.1);
}

.counter-box .icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 60px;
    height: 60px;
    border-radius: 16px;
    background: rgba(255, 152, 0, 0.18);
}

.counter-box .icon i {
    font-size: 1.6rem;
    color: var(--secondary-color);
}

.counter-box h3 {
    font-weight: 800;
}

/* Testimonials - the slider markup was never wired up with a JS carousel,
   so this is styled as a plain responsive grid of quote cards instead. */
.testimonials-slider {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 20px;
}

.testimonial-item {
    padding: 0;
}

.testimonial-content {
    position: relative;
    height: 100%;
    padding-top: 46px;
}

.testimonial-content::before {
    content: "\201C";
    position: absolute;
    top: 6px;
    left: 24px;
    font-size: 3.2rem;
    line-height: 1;
    font-family: Georgia, serif;
    color: rgba(63, 81, 181, 0.22);
}

@media (max-width: 991px) {
    .testimonials-slider {
        grid-template-columns: 1fr;
    }
}

/* Download-our-app section (replaces the old single-button CTA) */
.app-downloads-section {
    position: relative;
    padding: 80px 0;
    background: linear-gradient(135deg, var(--primary-color), #303f9f);
    overflow: hidden;
    color: var(--white-color);
}

.app-downloads-section::before {
    content: "";
    position: absolute;
    inset: -40% -10% auto auto;
    width: 55%;
    padding-bottom: 55%;
    border-radius: 50%;
    background: rgba(255, 152, 0, 0.14);
    pointer-events: none;
}

.app-downloads-section .container {
    position: relative;
}

.app-downloads-section .section-title h2,
.app-downloads-section .section-title p {
    color: var(--white-color);
}

.app-downloads-section .section-title h2::after {
    background: var(--secondary-color);
}

.download-cards {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 22px;
    margin-top: 40px;
}

@media (max-width: 991px) {
    .download-cards {
        grid-template-columns: 1fr;
    }
}

.download-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    padding: 32px 24px;
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.16);
    backdrop-filter: blur(6px);
    text-align: center;
    text-decoration: none;
    color: var(--white-color);
    transition: transform 0.35s cubic-bezier(0.22, 1, 0.36, 1), background-color 0.3s ease, box-shadow 0.35s ease;
}

.download-card:hover {
    transform: translateY(-8px);
    background: rgba(255, 255, 255, 0.15);
    box-shadow: 0 20px 40px -18px rgba(0, 0, 0, 0.5);
    color: var(--white-color);
}

.download-card .download-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 68px;
    height: 68px;
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.14);
    font-size: 1.8rem;
}

.download-card h3 {
    margin: 4px 0 0;
    font-size: 1.15rem;
}

.download-card p {
    margin: 0;
    font-size: 0.88rem;
    color: rgba(255, 255, 255, 0.8);
}

.download-card .download-version {
    display: inline-block;
    margin-top: 4px;
    padding: 3px 12px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.16);
    font-size: 0.76rem;
    font-weight: 600;
}

.download-card.is-unavailable {
    opacity: 0.55;
    cursor: not-allowed;
    pointer-events: none;
}

.download-card.is-unavailable:hover {
    transform: none;
}
