/* Australian-themed decorative elements */
.section::before {
    content: '';
    position: absolute;
    top: -50px;
    left: 50%;
    transform: translateX(-50%);
    width: 100px;
    height: 100px;
    background: url('data:image/svg+xml,<svg viewBox="0 0 100 100" xmlns="http://www.w3.org/2000/svg"><path d="M50,20 C30,20 20,40 20,60 C20,80 50,80 50,80 C50,80 80,80 80,60 C80,40 70,20 50,20" fill="none" stroke="%23CC7722" stroke-width="2" opacity="0.1"/></svg>') no-repeat center;
    opacity: 0.3;
    pointer-events: none;
}

/* Additional animations */
@keyframes float {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-10px); }
}

@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-50px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(50px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* Draw cards hover effects */
.draw-card {
    animation: fadeInUp 0.6s ease-out;
}

.draw-card .btn {
    position: relative;
    overflow: hidden;
}

.draw-card .btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.draw-card .btn:hover::before {
    width: 300px;
    height: 300px;
}

/* Testimonial animations */
.testimonial {
    animation: slideInLeft 0.8s ease-out;
}

.testimonial:nth-child(even) {
    animation: slideInRight 0.8s ease-out;
}

/* Leader cards special effects */
.leader-card:nth-child(1) {
    background: linear-gradient(135deg, #FFF8E1, #FFFDE7);
    box-shadow: 0 5px 20px rgba(255, 193, 7, 0.3);
}

.leader-card:nth-child(1) .rank {
    background: linear-gradient(45deg, #FFD700, #FFA000);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.leader-card:nth-child(2) {
    background: linear-gradient(135deg, #F5F5F5, #EEEEEE);
    box-shadow: 0 5px 20px rgba(158, 158, 158, 0.3);
}

.leader-card:nth-child(2) .rank {
    background: linear-gradient(45deg, #C0C0C0, #757575);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.leader-card:nth-child(3) {
    background: linear-gradient(135deg, #FFF3E0, #FFE0B2);
    box-shadow: 0 5px 20px rgba(205, 127, 50, 0.3);
}

.leader-card:nth-child(3) .rank {
    background: linear-gradient(45deg, #CD7F32, #8B4513);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Support logos hover animation */
.support-logos img {
    filter: grayscale(0);
    transition: all 0.3s;
}

.support-logos img:hover {
    filter: grayscale(0) brightness(1.1);
}

/* Hero background pattern */
.hero::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 100px;
    background: url('data:image/svg+xml,<svg viewBox="0 0 1200 100" xmlns="http://www.w3.org/2000/svg"><path d="M0,50 Q300,0 600,50 T1200,50 L1200,100 L0,100 Z" fill="%23F4E4C1"/></svg>') no-repeat bottom center/cover;
    pointer-events: none;
}

/* Custom scrollbar */
::-webkit-scrollbar {
    width: 12px;
}

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

::-webkit-scrollbar-thumb {
    background: linear-gradient(to bottom, #CC7722, #E06B3C);
    border-radius: 6px;
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(to bottom, #E06B3C, #CC7722);
}

/* Form styles for other pages */
.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    color: #0F4336;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 1rem;
    border: 2px solid #E0E0E0;
    border-radius: 10px;
    font-size: 1rem;
    transition: all 0.3s;
    background: white;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    outline: none;
    border-color: #006994;
    box-shadow: 0 0 0 3px rgba(0, 105, 148, 0.1);
}

.form-group input.error,
.form-group textarea.error {
    border-color: #D32F2F;
}

.error-message {
    color: #D32F2F;
    font-size: 0.875rem;
    margin-top: 0.5rem;
    display: none;
}

.error-message.show {
    display: block;
}

/* Loading spinner */
.spinner {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-top-color: white;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Success message */
.success-message {
    background: #44D362;
    color: white;
    padding: 1rem;
    border-radius: 10px;
    margin-bottom: 1rem;
    display: none;
    animation: slideInDown 0.5s ease-out;
}

.success-message.show {
    display: block;
}

@keyframes slideInDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Responsive improvements */
@media (max-width: 600px) {
    .section {
        padding: 3rem 1rem;
    }

    .hero h1 {
        line-height: 1.2;
    }

    .btn {
        padding: 0.8rem 1.5rem;
        font-size: 1rem;
    }

    .draw-card,
    .testimonial,
    .faq {
        padding: 1.5rem;
    }

    .support-logos img {
        height: 40px;
    }
}

/* Print styles */
@media print {
    header,
    footer,
    .btn,
    .popup-overlay,
    .age-popup,
    .cookie-popup {
        display: none !important;
    }

    body {
        background: white;
    }

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

/* Accessibility improvements */
.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* Focus styles */
a:focus,
button:focus,
input:focus,
textarea:focus,
select:focus {
    outline: 3px solid #006994;
    outline-offset: 2px;
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .btn-primary {
        border: 2px solid currentColor;
    }

    .draw-card,
    .testimonial,
    .leader-card {
        border: 2px solid currentColor;
    }
}

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