/* Custom styles for CopaAid website */

/* Font family */
body {
    font-family: 'Pretendard', -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', 'Cantarell', sans-serif;
}

/* Elegant divider styles */
.elegant-divider {
    position: relative;
    margin: 2rem 0;
}

.elegant-divider::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, #3b82f6, #6366f1, #3b82f6, transparent);
    transform: translateY(-50%);
}

.elegant-divider .divider-content {
    position: relative;
    display: inline-block;
    background: linear-gradient(135deg, #dbeafe, #e0e7ff);
    padding: 0.75rem 1.5rem;
    border-radius: 9999px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    border: 1px solid rgba(59, 130, 246, 0.2);
}

.elegant-divider .divider-content span {
    font-weight: 600;
    color: #1e40af;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    font-size: 0.875rem;
}

/* Smooth scrolling */
html {
    scroll-behavior: smooth;
}

/* Navigation styles */
.nav-link {
    transition: all 0.3s ease;
}

.nav-link:hover {
    transform: translateY(-1px);
}

/* Mobile menu animation */
#mobile-menu {
    transition: all 0.3s ease;
}

/* Page sections */
.page-section {
    transition: all 0.3s ease;
}

/* Button hover effects */
button {
    transition: all 0.2s ease;
}

button:hover {
    transform: translateY(-1px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
}

/* Card hover effects */
.card-hover {
    transition: all 0.3s ease;
}

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

/* Form focus styles */
input:focus, select:focus, textarea:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

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

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

::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #a8a8a8;
}

/* Loading animation */
.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid #f3f3f3;
    border-top: 3px solid #3498db;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Fade in animation */
.fade-in {
    animation: fadeIn 0.5s ease-in;
}

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

/* Service card styles */
.service-card {
    transition: all 0.3s ease;
    border: 1px solid #e5e7eb;
}

.service-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
    border-color: #3b82f6;
}

/* Filter panel sticky positioning */
.filter-panel {
    position: sticky;
    top: 100px;
}

/* Result count animation */
.result-count {
    transition: all 0.3s ease;
}

/* Custom radio and checkbox styles */
input[type="radio"], input[type="checkbox"] {
    accent-color: #3b82f6;
}

/* Gradient backgrounds */
.gradient-bg {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.gradient-bg-2 {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
}

.gradient-bg-3 {
    background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
}

/* Responsive text sizes */
@media (max-width: 640px) {
    .text-responsive {
        font-size: 1.5rem;
    }
}

@media (min-width: 641px) {
    .text-responsive {
        font-size: 2rem;
    }
}

@media (min-width: 1024px) {
    .text-responsive {
        font-size: 3rem;
    }
}

/* Custom animations */
.bounce-in {
    animation: bounceIn 0.6s ease-out;
}

@keyframes bounceIn {
    0% {
        opacity: 0;
        transform: scale(0.3);
    }
    50% {
        opacity: 1;
        transform: scale(1.05);
    }
    70% {
        transform: scale(0.9);
    }
    100% {
        opacity: 1;
        transform: scale(1);
    }
}

/* Slide in from left */
.slide-in-left {
    animation: slideInLeft 0.5s ease-out;
}

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

/* Slide in from right */
.slide-in-right {
    animation: slideInRight 0.5s ease-out;
}

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

/* Pulse animation for important elements */
.pulse {
    animation: pulse 2s infinite;
}

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

/* Custom focus styles for accessibility */
.focus-visible:focus {
    outline: 2px solid #3b82f6;
    outline-offset: 2px;
}

/* Print styles */
@media print {
    .no-print {
        display: none !important;
    }
    
    body {
        font-size: 12pt;
        line-height: 1.4;
    }
    
    .page-section {
        page-break-inside: avoid;
    }
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .service-card {
        border: 2px solid #000;
    }
    
    button {
        border: 2px solid #000;
    }
}

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

/* Dark mode support (if needed in future) */
@media (prefers-color-scheme: dark) {
    /* Dark mode styles can be added here if needed */
}

/* Quiz System Styles */
.progress-circle {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 2px solid #d1d5db;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    color: #9ca3af;
    background: white;
    transition: all 0.3s ease;
}

.progress-circle.active {
    border-color: #3b82f6;
    color: #3b82f6;
    background: #eff6ff;
    transform: scale(1.1);
    box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.1);
}

.progress-circle.completed {
    border-color: #10b981;
    background: #10b981;
    color: white;
}

.option-card {
    position: relative;
    transition: all 0.2s ease;
}

.option-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.option-card.selected {
    border-color: #3b82f6;
    background: #eff6ff;
}

.option-card.selected::after {
    content: '✓';
    position: absolute;
    top: 10px;
    right: 10px;
    width: 24px;
    height: 24px;
    background: #3b82f6;
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: bold;
}

.answer-section {
    min-height: 300px;
}

.options-container.grid {
    max-height: 500px;
    overflow-y: auto;
    padding: 10px;
}

/* Radio card specific styles */
.radio-card {
    min-width: 200px;
}

/* Checkbox card specific styles */
.checkbox-card {
    min-height: 60px;
}

/* Custom utility classes */
.text-shadow {
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.backdrop-blur {
    backdrop-filter: blur(10px);
}

/* Service status indicators */
.status-available {
    color: #10b981;
    background-color: #d1fae5;
}

.status-limited {
    color: #f59e0b;
    background-color: #fef3c7;
}

.status-full {
    color: #ef4444;
    background-color: #fee2e2;
}

/* Database Table Styles */
#database-table {
    font-size: 0.875rem;
}

#database-table thead {
    position: sticky;
    top: 0;
    background: #f9fafb;
    z-index: 10;
}

#database-table th {
    background: #f9fafb;
}

#database-table tbody tr {
    border-bottom: 1px solid #e5e7eb;
}

#database-table tbody tr:last-child {
    border-bottom: none;
}

/* Filter Panel Styles */
.filter-group {
    border-bottom: 1px solid #e5e7eb;
    padding-bottom: 0.5rem;
}

.filter-group:last-child {
    border-bottom: none;
}

.filter-checkbox {
    cursor: pointer;
    width: 1rem;
    height: 1rem;
}

/* Collapsible Filter Styles */
details.filter-group {
    border-bottom: 1px solid #e5e7eb;
    padding: 0.5rem 0;
}

details.filter-group summary {
    list-style: none;
    user-select: none;
}

details.filter-group summary::-webkit-details-marker {
    display: none;
}

details.filter-group[open] summary .details-arrow {
    transform: rotate(180deg);
}

details.filter-group summary:hover {
    background-color: #f9fafb;
    padding-left: 0.5rem;
    padding-right: 0.5rem;
    margin-left: -0.5rem;
    margin-right: -0.5rem;
    border-radius: 0.375rem;
}

/* "All" checkbox special styling */
.filter-checkbox-all {
    cursor: pointer;
    width: 1rem;
    height: 1rem;
}

.filter-checkbox-all:checked {
    background-color: #3b82f6;
    border-color: #3b82f6;
}

label:has(.filter-checkbox-all) {
    font-weight: 500;
}

label:has(.filter-checkbox-all:checked) {
    background-color: #eff6ff;
    border-color: #3b82f6;
}

/* Scrollbar for filter groups */
.filter-group > div[class*="max-h-"] {
    scrollbar-width: thin;
    scrollbar-color: #d1d5db #f3f4f6;
}

.filter-group > div[class*="max-h-"]::-webkit-scrollbar {
    width: 6px;
}

.filter-group > div[class*="max-h-"]::-webkit-scrollbar-track {
    background: #f3f4f6;
    border-radius: 3px;
}

.filter-group > div[class*="max-h-"]::-webkit-scrollbar-thumb {
    background: #d1d5db;
    border-radius: 3px;
}

.filter-group > div[class*="max-h-"]::-webkit-scrollbar-thumb:hover {
    background: #9ca3af;
}

/* Database table hover effect */
#database-table tbody tr:hover {
    background-color: #f9fafb;
    cursor: pointer;
}

/* Counter animation styles */
.counter {
    transition: all 0.3s ease;
    display: inline-block;
}

.counter.animated {
    animation: counterPulse 0.6s ease-out;
}

@keyframes counterPulse {
    0% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.1);
    }
    100% {
        transform: scale(1);
    }
}

/* Language Switcher Styles */
.language-switcher {
    position: relative;
}

#language-dropdown {
    animation: fadeInDown 0.2s ease-out;
}

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

.language-option:hover {
    background-color: #eff6ff;
}

.language-option.active {
    background-color: #dbeafe;
    color: #2563eb;
    font-weight: 600;
}

#language-arrow.rotate {
    transform: rotate(180deg);
}

#mobile-language-arrow.rotate {
    transform: rotate(180deg);
}

/* Mobile Language Dropdown Animation */
#mobile-language-dropdown {
    animation: slideDown 0.2s ease-out;
}

@keyframes slideDown {
    from {
        opacity: 0;
        max-height: 0;
    }
    to {
        opacity: 1;
        max-height: 400px;
    }
}

.mobile-language-option.active {
    background-color: #dbeafe;
    color: #2563eb;
    font-weight: 600;
}

/* Responsive table */
@media (max-width: 1024px) {
    #database-table {
        font-size: 0.75rem;
    }
    
    #database-table th,
    #database-table td {
        padding: 0.5rem;
    }
}

/* Loading states */
.skeleton {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: loading 1.5s infinite;
}

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

