/* ============================================
   TUITION SOLUTION & IT SOLUTION
   Custom Stylesheet
   ============================================ */

/* ---- Reset & Base ---- */
*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
}

body {
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* ---- Focus Visible (WCAG) ---- */
:focus-visible {
    outline: 3px solid #f97316;
    outline-offset: 2px;
    border-radius: 4px;
}

/* Remove default outline and rely on focus-visible */
:focus:not(:focus-visible) {
    outline: none;
}

/* ---- Selection Color ---- */
::selection {
    background-color: #1e40af;
    color: #ffffff;
}

/* ---- Scrollbar Styling ---- */
::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-track {
    background: #f1f5f9;
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, #1e40af, #f97316);
    border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(180deg, #1e3a8a, #ea580c);
}

/* ---- Hero Pattern Background ---- */
.hero-pattern {
    background-image: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.15'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
}

/* ---- Animations ---- */
@keyframes float {
    0%, 100% {
        transform: translateY(0) scale(1);
    }
    50% {
        transform: translateY(-20px) scale(1.05);
    }
}

@keyframes float-delayed {
    0%, 100% {
        transform: translateY(0) scale(1);
    }
    50% {
        transform: translateY(-15px) scale(1.03);
    }
}

@keyframes bounce-slow {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-8px);
    }
}

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

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes pulse-ring {
    0% {
        transform: scale(0.33);
        opacity: 1;
    }
    80%, 100% {
        opacity: 0;
    }
}

.animate-float {
    animation: float 6s ease-in-out infinite;
}

.animate-float-delayed {
    animation: float-delayed 8s ease-in-out infinite;
    animation-delay: 2s;
}

.animate-bounce-slow {
    animation: bounce-slow 3s ease-in-out infinite;
}

.animate-slide-up {
    animation: slideUp 0.6s ease-out forwards;
}

.animate-fade-in {
    animation: fadeIn 0.5s ease-out forwards;
}

/* ---- Navigation Styles ---- */
.nav-link.active {
    color: #1e40af;
    background-color: #eff6ff;
}

.mobile-nav-link.active {
    color: #1e40af;
    background-color: #eff6ff;
}

/* Header scroll effect */
.header-scrolled {
    background-color: rgba(255, 255, 255, 0.98) !important;
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.1) !important;
}

/* ---- Course Filter Buttons ---- */
.course-filter-btn {
    background-color: #f1f5f9;
    color: #64748b;
    border: 2px solid transparent;
}

.course-filter-btn:hover {
    background-color: #e2e8f0;
    color: #475569;
}

.course-filter-btn.active {
    background-color: #1e40af;
    color: #ffffff;
    border-color: #1e40af;
    box-shadow: 0 4px 15px rgba(30, 64, 175, 0.3);
}

/* ---- Course Card Filtering ---- */
.course-card {
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.course-card.hidden-card {
    opacity: 0;
    transform: scale(0.8);
    pointer-events: none;
    position: absolute;
    visibility: hidden;
}

.course-card.visible-card {
    opacity: 1;
    transform: scale(1);
    pointer-events: auto;
    position: relative;
    visibility: visible;
}

/* ---- Testimonials Slider ---- */
#testimonials-track {
    will-change: transform;
}

.testimonial-dot {
    width: 10px;
    height: 10px;
    background-color: #cbd5e1;
    border-radius: 50%;
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
    padding: 0;
}

.testimonial-dot:hover {
    background-color: #94a3b8;
}

.testimonial-dot.active {
    background-color: #1e40af;
    width: 30px;
    border-radius: 10px;
}

/* ---- Form Styles ---- */
input:invalid:not(:placeholder-shown),
select:invalid:not([value=""]) {
    border-color: #ef4444;
}

.error-message.visible {
    display: block !important;
}

input:valid:not(:placeholder-shown) {
    border-color: #22c55e;
}

/* ---- Back to Top Button ---- */
#back-to-top.visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

#back-to-top {
    transform: translateY(20px);
}

/* ---- Loading Skeleton ---- */
.skeleton {
    background: linear-gradient(90deg, #f1f5f9 25%, #e2e8f0 50%, #f1f5f9 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
}

@keyframes shimmer {
    0% {
        background-position: 200% 0;
    }
    100% {
        background-position: -200% 0;
    }
}

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

    .animate-float,
    .animate-float-delayed,
    .animate-bounce-slow {
        animation: none;
    }

    [data-aos] {
        opacity: 1 !important;
        transform: none !important;
        transition: none !important;
    }
}

/* ---- High Contrast Mode (WCAG) ---- */
@media (prefers-contrast: high) {
    .course-filter-btn.active {
        border: 3px solid #000000;
    }

    a:focus-visible,
    button:focus-visible {
        outline: 3px solid #000000;
        outline-offset: 3px;
    }
}

/* ---- Print Styles ---- */
@media print {
    header,
    #back-to-top,
    .fab.fa-whatsapp,
    footer {
        display: none !important;
    }

    body {
        color: #000;
        background: #fff;
    }

    section {
        page-break-inside: avoid;
    }
}

/* ---- Responsive Overrides ---- */
@media (max-width: 640px) {
    .hero-pattern {
        opacity: 0.05;
    }

    #testimonials-track > div {
        width: 100% !important;
    }
}

@media (min-width: 641px) and (max-width: 1023px) {
    #testimonials-track > div {
        width: 50% !important;
    }
}

@media (min-width: 1024px) {
    #testimonials-track > div {
        width: 33.3333% !important;
    }
}

/* ---- Smooth Image Loading ---- */
img {
    opacity: 0;
    transition: opacity 0.3s ease;
}

img.loaded {
    opacity: 1;
}

/* ---- WhatsApp Button Pulse ---- */
a[aria-label="Chat on WhatsApp"]::before {
    content: '';
    position: absolute;
    inset: -4px;
    border-radius: 50%;
    border: 2px solid #22c55e;
    animation: pulse-ring 2s cubic-bezier(0.215, 0.61, 0.355, 1) infinite;
}

/* ---- Gradient Text Helper ---- */
.gradient-text {
    background: linear-gradient(135deg, #1e40af, #f97316);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* ---- Card Hover Effects ---- */
.card-hover {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.card-hover:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
}

/* ============================================
   STUDENTS PHOTO SLIDER (Infinite Scroll)
   ============================================ */
.students-slider-wrapper {
    overflow: hidden;
    width: 100%;
    position: relative;
    padding: 10px 0;
}

.students-slider-wrapper::before,
.students-slider-wrapper::after {
    content: '';
    position: absolute;
    top: 0;
    bottom: 0;
    width: 100px;
    z-index: 2;
    pointer-events: none;
}

.students-slider-wrapper::before {
    left: 0;
    background: linear-gradient(to right, #ffffff 0%, transparent 100%);
}

.students-slider-wrapper::after {
    right: 0;
    background: linear-gradient(to left, #ffffff 0%, transparent 100%);
}

.students-slider-track {
    display: flex;
    gap: 24px;
    animation: studentSlide 30s linear infinite;
    width: max-content;
}

.students-slider-track:hover {
    animation-play-state: paused;
}

.student-slide {
    flex-shrink: 0;
    width: 220px;
}

.student-card {
    width: 220px;
    height: 280px;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.08);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    position: relative;
}

.student-card:hover {
    transform: scale(1.05);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.15);
}

.student-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 1;
}

@keyframes studentSlide {
    0% {
        transform: translateX(0);
    }
    100% {
        transform: translateX(-50%);
    }
}

/* Mobile adjustments for slider */
@media (max-width: 640px) {
    .student-slide {
        width: 160px;
    }

    .student-card {
        width: 160px;
        height: 210px;
        border-radius: 16px;
    }

    .students-slider-track {
        gap: 16px;
        animation-duration: 20s;
    }

    .students-slider-wrapper::before,
    .students-slider-wrapper::after {
        width: 40px;
    }
}

@media (min-width: 641px) and (max-width: 1023px) {
    .student-slide {
        width: 190px;
    }

    .student-card {
        width: 190px;
        height: 250px;
    }
}

/* ---- Course Outline Accordion ---- */
.course-accordion summary {
    cursor: pointer;
    list-style: none;
}

.course-accordion summary::-webkit-details-marker {
    display: none;
}

.course-accordion summary .chevron-icon {
    transition: transform 0.3s ease;
}

.course-accordion[open] summary .chevron-icon {
    transform: rotate(180deg);
}

.course-accordion .accordion-content {
    animation: accordionSlideDown 0.3s ease-out;
}

@keyframes accordionSlideDown {
    from {
        opacity: 0;
        max-height: 0;
    }
    to {
        opacity: 1;
        max-height: 2000px;
    }
}
/* ---- SaaS UI & Glassmorphism Utilities Added ---- */
html {
    scroll-behavior: smooth;
}

body {
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

.details-content {
    transition: max-height 0.4s ease-in-out, opacity 0.4s ease-in-out;
}

/* Enhancing existing accordions (from <details> component) to slide smoothly */
details[open] summary ~ * {
  animation: sweep 0.4s ease-in-out;
}

@keyframes sweep {
  0% { opacity: 0; transform: translateY(-10px); }
  100% { opacity: 1; transform: translateY(0); }
}

::selection {
    background-color: #4f46e5;
    color: #ffffff;
}

/* ============================================
   HERO TYPING ANIMATION
   ============================================ */
.typing-cursor {
    animation: blinkCursor 0.7s step-end infinite;
    font-weight: 400;
}

@keyframes blinkCursor {
    0%, 100% { opacity: 1; }
    50% { opacity: 0; }
}

/* ============================================
   FLOATING GEOMETRIC SHAPES
   ============================================ */
@keyframes floatShape {
    0%, 100% { transform: translateY(0) rotate(0deg); }
    50% { transform: translateY(-25px) rotate(10deg); }
}

@keyframes floatShapeDelayed {
    0%, 100% { transform: translateY(0) rotate(45deg); }
    50% { transform: translateY(-18px) rotate(55deg); }
}

@keyframes pulseDot {
    0%, 100% { opacity: 0.3; transform: scale(1); }
    50% { opacity: 1; transform: scale(1.8); }
}

.animate-float-shape {
    animation: floatShape 7s ease-in-out infinite;
}

.animate-float-shape-delayed {
    animation: floatShapeDelayed 9s ease-in-out infinite;
    animation-delay: 1.5s;
}

.animate-pulse-dot {
    animation: pulseDot 4s ease-in-out infinite;
}

/* ============================================
   ANNOUNCEMENT TICKER
   ============================================ */
.ticker-wrapper {
    overflow: hidden;
    width: 100%;
    position: relative;
}

.ticker-track {
    display: flex;
    gap: 0;
    width: max-content;
    animation: tickerScroll 40s linear infinite;
}

.ticker-track:hover {
    animation-play-state: paused;
}

.ticker-item {
    flex-shrink: 0;
    color: #ffffff;
    font-weight: 600;
    font-size: 0.85rem;
    padding: 0 3rem;
    white-space: nowrap;
    letter-spacing: 0.02em;
}

@keyframes tickerScroll {
    0% { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}

/* ============================================
   PROCESS STEP ICON HOVER
   ============================================ */
.process-step-icon {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.process-step-icon:hover {
    transform: scale(1.15) rotate(-5deg);
}

/* Mobile ticker */
@media (max-width: 640px) {
    .ticker-item {
        font-size: 0.75rem;
        padding: 0 2rem;
    }
    .ticker-track {
        animation-duration: 25s;
    }
}
