/* Custom Styles for Brain Disease Care Website */

/* Font Families */
body {
    font-family: 'Noto Sans KR', 'Noto Sans SC', 'Noto Sans JP', sans-serif;
}

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

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

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

::-webkit-scrollbar-thumb {
    background: #888;
    border-radius: 5px;
}

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

/* Navigation Active State */
.menu-link.active {
    background-color: #2563eb;
    color: white;
}

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

.hover-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
}

/* Button Styles */
.btn-primary {
    background-color: #2563eb;
    color: white;
    padding: 0.75rem 1.5rem;
    border-radius: 0.5rem;
    font-weight: 600;
    transition: background-color 0.3s ease;
}

.btn-primary:hover {
    background-color: #1d4ed8;
}

.btn-secondary {
    background-color: #7c3aed;
    color: white;
    padding: 0.75rem 1.5rem;
    border-radius: 0.5rem;
    font-weight: 600;
    transition: background-color 0.3s ease;
}

.btn-secondary:hover {
    background-color: #6d28d9;
}

/* Badge Styles */
.badge {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
    font-size: 0.875rem;
    font-weight: 600;
}

.badge-primary {
    background-color: #dbeafe;
    color: #1e40af;
}

.badge-success {
    background-color: #d1fae5;
    color: #065f46;
}

.badge-warning {
    background-color: #fef3c7;
    color: #92400e;
}

.badge-danger {
    background-color: #fee2e2;
    color: #991b1b;
}

/* Hospital Category Badges */
.badge-상급종합병원 {
    background-color: #dbeafe;
    color: #1e40af;
}

.badge-종합병원 {
    background-color: #e0e7ff;
    color: #3730a3;
}

.badge-재활전문병원 {
    background-color: #d1fae5;
    color: #065f46;
}

.badge-요양병원 {
    background-color: #fef3c7;
    color: #92400e;
}

.badge-한방병원 {
    background-color: #e7e5e4;
    color: #44403c;
}

.badge-일반병원 {
    background-color: #f3e8ff;
    color: #6b21a8;
}

.badge-전문병원 {
    background-color: #fee2e2;
    color: #991b1b;
}

/* Loading Animation */
@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

.animate-spin {
    animation: spin 1s linear infinite;
}

/* Fade In Animation */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

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

/* Pulse Animation */
@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.5;
    }
}

.pulse-animation {
    animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

/* Mobile Responsive */
@media (max-width: 768px) {
    /* General Page Headers */
    main h1 {
        font-size: 1.5rem !important;
        line-height: 1.3 !important;
    }
    
    main h2 {
        font-size: 1.25rem !important;
        line-height: 1.4 !important;
    }
    
    main h3 {
        font-size: 1.1rem !important;
        line-height: 1.4 !important;
    }
    
    main h4 {
        font-size: 1rem !important;
        line-height: 1.4 !important;
    }
    
    main p, main li, main div {
        font-size: 0.875rem !important;
        line-height: 1.5 !important;
    }
    
    /* Page Icons */
    main .text-6xl {
        font-size: 2.5rem !important;
    }
    
    main .text-5xl {
        font-size: 2rem !important;
    }
    
    main .text-4xl {
        font-size: 1.5rem !important;
    }
    
    main .text-3xl {
        font-size: 1.25rem !important;
    }
    
    main .text-2xl {
        font-size: 1.1rem !important;
    }
    
    main .text-xl {
        font-size: 1rem !important;
    }
    
    /* Padding and Margins */
    main .p-8 {
        padding: 1rem !important;
    }
    
    main .p-6 {
        padding: 0.875rem !important;
    }
    
    main .p-5 {
        padding: 0.75rem !important;
    }
    
    main .mb-12 {
        margin-bottom: 2rem !important;
    }
    
    main .mb-8 {
        margin-bottom: 1.5rem !important;
    }
    
    main .mb-6 {
        margin-bottom: 1rem !important;
    }
    
    main .mb-4 {
        margin-bottom: 0.75rem !important;
    }
    
    /* Tables */
    main table {
        font-size: 0.75rem !important;
    }
    
    main th, main td {
        padding: 0.5rem !important;
        font-size: 0.75rem !important;
    }
    
    /* Buttons */
    main button, main .btn {
        font-size: 0.875rem !important;
        padding: 0.5rem 1rem !important;
    }
    
    /* Cards and Containers */
    main .rounded-xl {
        border-radius: 0.75rem !important;
    }
    
    main .shadow-lg {
        box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1) !important;
    }
    
    /* Search Header */
    .search-header h1 {
        font-size: 1.5rem;
    }
    
    /* Hospital Grid */
    .hospital-grid {
        grid-template-columns: 1fr;
    }
    
    /* Search Box */
    .search-box {
        flex-direction: column;
    }
    
    .search-input {
        min-width: 100%;
        font-size: 16px !important; /* Prevent zoom on iOS */
    }
    
    /* Container Spacing */
    .container {
        padding-left: 1rem;
        padding-right: 1rem;
    }
    
    /* Number circles in lists */
    main .w-8.h-8 {
        width: 1.75rem !important;
        height: 1.75rem !important;
        font-size: 0.875rem !important;
    }
    
    /* Badges and Tags */
    main .badge, main .specialty-tag {
        font-size: 0.75rem !important;
        padding: 0.25rem 0.5rem !important;
    }
}

/* Print Styles */
@media print {
    .no-print {
        display: none !important;
    }
    
    nav,
    footer,
    .btn,
    button {
        display: none !important;
    }
}

/* Focus Styles for Accessibility */
button:focus,
a:focus,
input:focus,
select:focus,
textarea:focus {
    outline: 2px solid #2563eb;
    outline-offset: 2px;
}

/* Custom Select Styles */
select {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3E%3Cpath stroke='%236b7280' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='M6 8l4 4 4-4'/%3E%3C/svg%3E");
    background-position: right 0.5rem center;
    background-repeat: no-repeat;
    background-size: 1.5em 1.5em;
    padding-right: 2.5rem;
}

/* Tooltip */
.tooltip {
    position: relative;
    display: inline-block;
}

.tooltip .tooltip-text {
    visibility: hidden;
    width: 200px;
    background-color: #1f2937;
    color: #fff;
    text-align: center;
    border-radius: 6px;
    padding: 8px;
    position: absolute;
    z-index: 1;
    bottom: 125%;
    left: 50%;
    margin-left: -100px;
    opacity: 0;
    transition: opacity 0.3s;
    font-size: 0.875rem;
}

.tooltip:hover .tooltip-text {
    visibility: visible;
    opacity: 1;
}

/* Card Styles */
.card {
    background: white;
    border-radius: 0.75rem;
    box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06);
    padding: 1.5rem;
    transition: all 0.3s ease;
}

.card:hover {
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

/* Gradient Text */
.gradient-text {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* No Results Message */
.no-results {
    text-align: center;
    padding: 4rem 2rem;
    color: #6b7280;
}

.no-results-icon {
    font-size: 4rem;
    margin-bottom: 1rem;
}

.no-results h3 {
    font-size: 1.5rem;
    font-weight: 600;
    color: #374151;
    margin-bottom: 0.5rem;
}

.no-results p {
    font-size: 1rem;
    color: #6b7280;
}

/* Language Switcher */
.lang-btn {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
    user-select: none;
    position: relative;
    overflow: hidden;
}

.lang-btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(37, 99, 235, 0.1);
    transform: translate(-50%, -50%);
    transition: width 0.4s ease, height 0.4s ease;
}

.lang-btn:active::before {
    width: 120%;
    height: 120%;
}

.lang-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.lang-btn:active {
    transform: translateY(0);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.lang-btn.active {
    background: linear-gradient(135deg, #dbeafe 0%, #bfdbfe 100%) !important;
    color: #1e40af !important;
    font-weight: 700 !important;
    border: 2px solid #3b82f6;
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
}

/* Mobile-specific enhancements */
@media (max-width: 768px) {
    .lang-btn {
        min-width: 48px;
        min-height: 48px;
        font-size: 1.25rem;
        display: flex;
        align-items: center;
        justify-content: center;
    }
    
    .lang-btn:active {
        background: rgba(59, 130, 246, 0.2);
    }
    
    .lang-btn.active {
        transform: scale(1.1);
    }
}

/* Emergency Banner */
.emergency-banner {
    background: linear-gradient(135deg, #fee2e2 0%, #fecaca 100%);
    border-left: 4px solid #dc2626;
}

/* Section Divider */
.section-divider {
    height: 2px;
    background: linear-gradient(to right, transparent, #e5e7eb, transparent);
    margin: 3rem 0;
}

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

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

/* Responsive Video Container */
.video-container {
    position: relative;
    padding-bottom: 56.25%; /* 16:9 aspect ratio */
    height: 0;
    overflow: hidden;
}

.video-container iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}
