/* Animation System for Important Dates and Court Documents */
/* Pure CSS Keyframe Animations - No JavaScript Required */
/*
 * ALL PAGE ANIMATIONS NOW USE PURE CSS KEYFRAMES
 * 
 * These animations auto-trigger on page load - no JavaScript needed!
 * The animations.js file has been removed - all animations are now CSS-only.
 * 
 * Pages using pure CSS animations:
 * - Home (home-summary, info-block-card, paragraph-fade-in, table-fade-in)
 * - Contact (contact-card, contact-section)
 * - Login (login-wrapper, login-title, login-summary, login-field, login-button, openlogin-wrapper, openlogin-card)
 * - FAQ (faq-wrapper, faq-title, faq-search, faq-expand-button, faq-group, faq-accordion-item)
 * - ImportantDates (dates-card, dates-header, dates-table, date-row)
 * - CourtDocuments (documents-card, documents-header, document-item)
 * 
 * Keyframes:
 * - fadeInUp: Standard fade up (30px)
 * - fadeInUpSmall: Small fade up (20px) 
 * - fadeInUpMedium: Medium fade up (40px)
 * - fadeInUpMinimal: Minimal fade up (15px)
 * - fadeInUpDocument: Document fade up (25px)
 * 
 * Staggered animations use nth-child/nth-of-type selectors for sequential delays.
 * All animations respect prefers-reduced-motion for accessibility.
 * 
 * Benefits:
 * - No DOM load dependency - animations start immediately
 * - No JavaScript required - works even if JS fails
 * - Better performance - hardware-accelerated
 * - Reusable keyframes - easy to apply to other pages
 * - Consistent timing - same approach across all pages
 */

/* Keyframe Definitions */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInUpSmall {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInUpMedium {
    from {
        opacity: 0;
        transform: translateY(40px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInUpMinimal {
    from {
        opacity: 0;
        transform: translateY(15px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInUpDocument {
    from {
        opacity: 0;
        transform: translateY(25px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Home Page - Pure CSS Keyframe Animations */
/* Auto-triggers on page load - no JavaScript needed */
.home-summary {
    animation: fadeInUpSmall 1s ease-out both;
    animation-delay: 0.1s;
}

.info-block-card {
    animation: fadeInUpMedium 0.6s ease-out both;
}

/* Stagger info block cards */
.info-block-card:nth-of-type(1) {
    animation-delay: 0.3s;
}

.info-block-card:nth-of-type(2) {
    animation-delay: 0.5s;
}

.info-block-card:nth-of-type(3) {
    animation-delay: 0.7s;
}

.info-block-card:nth-of-type(4) {
    animation-delay: 0.9s;
}

.info-block-card:nth-of-type(5) {
    animation-delay: 1.1s;
}

/* Info Block Content - Paragraphs and Tables */
.paragraph-fade-in {
    animation: fadeInUpMinimal 0.4s ease-out both;
}

.paragraph-fade-in:nth-of-type(1) {
    animation-delay: 0.1s;
}

.paragraph-fade-in:nth-of-type(2) {
    animation-delay: 0.15s;
}

.paragraph-fade-in:nth-of-type(3) {
    animation-delay: 0.2s;
}

.paragraph-fade-in:nth-of-type(4) {
    animation-delay: 0.25s;
}

.paragraph-fade-in:nth-of-type(5) {
    animation-delay: 0.3s;
}

.table-fade-in {
    animation: fadeInUpSmall 0.5s ease-out both;
    animation-delay: 0.2s;
}

/* Contact Page - Pure CSS Keyframe Animations */
/* Auto-triggers on page load - no JavaScript needed */
.contact-card {
    animation: fadeInUpMedium 0.8s ease-out both;
    animation-delay: 0.1s;
}

.contact-section {
    animation: fadeInUpSmall 0.6s ease-out both;
}

/* Stagger contact sections */
.contact-section:nth-of-type(1) {
    animation-delay: 0.3s;
}

.contact-section:nth-of-type(2) {
    animation-delay: 0.45s;
}

.contact-section:nth-of-type(3) {
    animation-delay: 0.6s;
}

.contact-section:nth-of-type(4) {
    animation-delay: 0.75s;
}

.contact-section:nth-of-type(5) {
    animation-delay: 0.9s;
}

.contact-section:nth-of-type(6) {
    animation-delay: 1.05s;
}

/* Contact content (email, phone, address text) - additional animation for visibility */
.contact-content {
    animation: fadeInUpMinimal 0.5s ease-out both;
}

/* Stagger contact content to appear slightly after their section headers */
.contact-section:nth-of-type(2) .contact-content {
    animation-delay: 0.5s;
}

.contact-section:nth-of-type(4) .contact-content {
    animation-delay: 0.8s;
}

.contact-section:nth-of-type(6) .contact-content {
    animation-delay: 1.1s;
}

/* Login Page - Pure CSS Keyframe Animations */
/* Auto-triggers on page load - no JavaScript needed */
.login-wrapper {
    animation: fadeInUpMedium 0.8s ease-out both;
    animation-delay: 0.1s;
}

.login-title {
    animation: fadeInUpSmall 0.6s ease-out both;
    animation-delay: 0.2s;
}

.login-summary {
    animation: fadeInUpSmall 0.6s ease-out both;
    animation-delay: 0.3s;
}

.login-field {
    animation: fadeInUpMinimal 0.5s ease-out both;
}

/* Stagger login form fields */
.login-field:nth-of-type(1) {
    animation-delay: 0.4s;
}

.login-field:nth-of-type(2) {
    animation-delay: 0.5s;
}

.login-button {
    animation: fadeInUpSmall 0.6s ease-out both;
    animation-delay: 0.6s;
}

/* Open Login Overlay - Pure CSS Keyframe Animations */
.openlogin-wrapper {
    animation: fadeInUpMedium 0.8s ease-out both;
    animation-delay: 0.1s;
}

.openlogin-card {
    animation: fadeInUpMedium 0.8s ease-out both;
    animation-delay: 0.2s;
}

.openlogin-question {
    animation: fadeInUpSmall 0.6s ease-out both;
    animation-delay: 0.3s;
}

.openlogin-buttons {
    animation: fadeInUpSmall 0.6s ease-out both;
    animation-delay: 0.4s;
}

/* FAQ Page - Pure CSS Keyframe Animations */
/* Auto-triggers on page load - no JavaScript needed */
.faq-wrapper {
    animation: fadeInUpMedium 0.8s ease-out both;
    animation-delay: 0.1s;
}

.faq-title {
    animation: fadeInUpSmall 0.6s ease-out both;
    animation-delay: 0.2s;
}

.faq-search {
    animation: fadeInUpSmall 0.6s ease-out both;
    animation-delay: 0.3s;
}

.faq-expand-button {
    animation: fadeInUpSmall 0.6s ease-out both;
    animation-delay: 0.4s;
}

.faq-group {
    animation: fadeInUp 0.7s ease-out both;
}

/* Stagger FAQ groups */
.faq-group:nth-of-type(1) {
    animation-delay: 0.5s;
}

.faq-group:nth-of-type(2) {
    animation-delay: 0.6s;
}

.faq-group:nth-of-type(3) {
    animation-delay: 0.7s;
}

.faq-group:nth-of-type(4) {
    animation-delay: 0.8s;
}

.faq-group:nth-of-type(5) {
    animation-delay: 0.9s;
}

.faq-group-title {
    animation: fadeInUpSmall 0.5s ease-out both;
    animation-delay: 0.1s;
}

.faq-group-description {
    animation: fadeInUpMinimal 0.4s ease-out both;
    animation-delay: 0.2s;
}

.faq-accordion-item {
    animation: fadeInUpMinimal 0.4s ease-out both;
}

/* Stagger accordion items within FAQ groups */
.faq-group .faq-accordion-item:nth-child(1) {
    animation-delay: 0.3s;
}

.faq-group .faq-accordion-item:nth-child(2) {
    animation-delay: 0.4s;
}

.faq-group .faq-accordion-item:nth-child(3) {
    animation-delay: 0.5s;
}

.faq-group .faq-accordion-item:nth-child(4) {
    animation-delay: 0.6s;
}

.faq-group .faq-accordion-item:nth-child(5) {
    animation-delay: 0.7s;
}

.faq-group .faq-accordion-item:nth-child(6) {
    animation-delay: 0.8s;
}

.faq-group .faq-accordion-item:nth-child(7) {
    animation-delay: 0.9s;
}

.faq-group .faq-accordion-item:nth-child(8) {
    animation-delay: 1.0s;
}

.faq-group .faq-accordion-item:nth-child(9) {
    animation-delay: 1.1s;
}

.faq-group .faq-accordion-item:nth-child(10) {
    animation-delay: 1.2s;
}

/* Stagger accordion items that are direct children of faq-wrapper (not in groups) */
.faq-wrapper > .faq-accordion-item:nth-child(1) {
    animation-delay: 0.5s;
}

.faq-wrapper > .faq-accordion-item:nth-child(2) {
    animation-delay: 0.6s;
}

.faq-wrapper > .faq-accordion-item:nth-child(3) {
    animation-delay: 0.7s;
}

.faq-wrapper > .faq-accordion-item:nth-child(4) {
    animation-delay: 0.8s;
}

.faq-wrapper > .faq-accordion-item:nth-child(5) {
    animation-delay: 0.9s;
}

/* Base animation classes - Still using transitions for backward compatibility (if needed elsewhere) */
.animate-fade-in {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.animate-fade-in.animate {
    opacity: 1;
    transform: translateY(0);
}

.fade-in-up {
    animation: fadeInUp 0.8s ease-out both;
    animation-delay: 0.1s;
}

/* Important Dates - Pure CSS Keyframe Animations */
/* Auto-triggers on page load - no JavaScript needed */
.dates-card {
    animation: fadeInUpMedium 0.8s ease-out both;
    animation-delay: 0.1s;
}

.dates-header {
    animation: fadeInUpSmall 0.6s ease-out both;
}

/* Stagger header animations - headers are direct children of dates-card */
.dates-card > h3.dates-header {
    animation-delay: 0.2s;
}

.dates-card > p.dates-header {
    animation-delay: 0.3s;
}

.dates-table {
    animation: fadeInUp 0.7s ease-out both;
    animation-delay: 0.4s;
}

/* Stagger date row animations */
/* Note: First tr in table is header (no date-row class), so date-rows start at nth-child(2) */
.date-row {
    animation: fadeInUpMinimal 0.4s ease-out both;
}

.date-row:nth-child(2) {
    animation-delay: 0.5s;
}

.date-row:nth-child(3) {
    animation-delay: 0.6s;
}

.date-row:nth-child(4) {
    animation-delay: 0.7s;
}

.date-row:nth-child(5) {
    animation-delay: 0.8s;
}

.date-row:nth-child(6) {
    animation-delay: 0.9s;
}

.date-row:nth-child(7) {
    animation-delay: 1.0s;
}

.date-row:nth-child(8) {
    animation-delay: 1.1s;
}

.date-row:nth-child(9) {
    animation-delay: 1.2s;
}

.date-row:nth-child(10) {
    animation-delay: 1.3s;
}

.date-row:nth-child(11) {
    animation-delay: 1.4s;
}

/* Court Documents - Pure CSS Keyframe Animations */
/* Auto-triggers on page load - no JavaScript needed */
.documents-card {
    animation: fadeInUpMedium 0.8s ease-out both;
    animation-delay: 0.1s;
}

.documents-header {
    animation: fadeInUpSmall 0.6s ease-out both;
}

/* Stagger header animations - headers are direct children of documents-card */
.documents-card > h3.documents-header {
    animation-delay: 0.2s;
}

.documents-card > p.documents-header {
    animation-delay: 0.3s;
}

/* Stagger document item animations */
.document-item {
    animation: fadeInUpDocument 0.5s ease-out both;
}

.document-item:nth-child(1) {
    animation-delay: 0.4s;
}

.document-item:nth-child(2) {
    animation-delay: 0.5s;
}

.document-item:nth-child(3) {
    animation-delay: 0.6s;
}

.document-item:nth-child(4) {
    animation-delay: 0.7s;
}

.document-item:nth-child(5) {
    animation-delay: 0.8s;
}

.document-item:nth-child(6) {
    animation-delay: 0.9s;
}

.document-item:nth-child(7) {
    animation-delay: 1.0s;
}

.document-item:nth-child(8) {
    animation-delay: 1.1s;
}

.document-item:nth-child(9) {
    animation-delay: 1.2s;
}

.document-item:nth-child(10) {
    animation-delay: 1.3s;
}

/* Fallback for when animations don't work */
.animate-fade-in,
.fade-in-up,
.home-summary,
.info-block-card,
.paragraph-fade-in,
.table-fade-in,
.contact-card,
.contact-section,
.contact-content,
.login-wrapper,
.login-title,
.login-summary,
.login-field,
.login-button,
.openlogin-wrapper,
.openlogin-card,
.openlogin-question,
.openlogin-buttons,
.faq-wrapper,
.faq-title,
.faq-search,
.faq-expand-button,
.faq-group,
.faq-group-title,
.faq-group-description,
.faq-accordion-item,
.dates-card,
.dates-header,
.dates-table,
.date-row,
.documents-card,
.documents-header,
.document-item {
    /* Ensure content is visible even without animations */
    will-change: opacity, transform;
}

/* Animation disabled state for users who prefer reduced motion */
@media (prefers-reduced-motion: reduce) {
    .animate-fade-in,
    .fade-in-up,
    .home-summary,
    .info-block-card,
    .paragraph-fade-in,
    .table-fade-in,
    .contact-card,
    .contact-section,
    .contact-content,
    .login-wrapper,
    .login-title,
    .login-summary,
    .login-field,
    .login-button,
    .openlogin-wrapper,
    .openlogin-card,
    .openlogin-question,
    .openlogin-buttons,
    .faq-wrapper,
    .faq-title,
    .faq-search,
    .faq-expand-button,
    .faq-group,
    .faq-group-title,
    .faq-group-description,
    .faq-accordion-item,
    .dates-card,
    .dates-header,
    .dates-table,
    .date-row,
    .documents-card,
    .documents-header,
    .document-item {
        opacity: 1 !important;
        transform: none !important;
        transition: none !important;
        animation: none !important;
    }
}

/* Force visibility for debugging */
.debug-animations .animate-fade-in,
.debug-animations .fade-in-up,
.debug-animations .home-summary,
.debug-animations .info-block-card,
.debug-animations .paragraph-fade-in,
.debug-animations .table-fade-in,
.debug-animations .contact-card,
.debug-animations .contact-section,
.debug-animations .contact-content,
.debug-animations .login-wrapper,
.debug-animations .login-title,
.debug-animations .login-summary,
.debug-animations .login-field,
.debug-animations .login-button,
.debug-animations .openlogin-wrapper,
.debug-animations .openlogin-card,
.debug-animations .openlogin-question,
.debug-animations .openlogin-buttons,
.debug-animations .faq-wrapper,
.debug-animations .faq-title,
.debug-animations .faq-search,
.debug-animations .faq-expand-button,
.debug-animations .faq-group,
.debug-animations .faq-group-title,
.debug-animations .faq-group-description,
.debug-animations .faq-accordion-item,
.debug-animations .dates-card,
.debug-animations .dates-header,
.debug-animations .dates-table,
.debug-animations .date-row,
.debug-animations .documents-card,
.debug-animations .documents-header,
.debug-animations .document-item {
    opacity: 1 !important;
    transform: none !important;
}
