/* Honolulu Urgent Care Clinic - NIU Health Custom Styles */

/* Root Variables */
:root {
    --niu-blue: #2563eb;
    --niu-teal: #0891b2;
    --niu-dark: #1e293b;
    --niu-gray: #64748b;
    --font-inter: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

/* Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: var(--font-inter);
    line-height: 1.6;
    color: var(--niu-dark);
    scroll-behavior: smooth;
}

/* Typography Enhancements */
h1, h2, h3, h4, h5, h6 {
    font-weight: 600;
    line-height: 1.3;
}

/* Navigation Enhancements */
.sticky {
    position: sticky;
    top: 0;
    z-index: 50;
}

/* Dropdown Navigation */
.group:hover .group-hover\:opacity-100 {
    opacity: 1;
}

.group:hover .group-hover\:visible {
    visibility: visible;
}

/* Button Hover Effects */
.btn-primary {
    background: linear-gradient(135deg, var(--niu-blue), var(--niu-teal));
    transition: all 0.3s ease;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(37, 99, 235, 0.3);
}

/* 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);
}

/* Gradient Text */
.gradient-text {
    background: linear-gradient(135deg, var(--niu-blue), var(--niu-teal));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Hero Section Enhancements */
.hero-bg {
    background: linear-gradient(135deg, var(--niu-blue) 0%, var(--niu-teal) 100%);
    position: relative;
    overflow: hidden;
}

.hero-bg::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="grain" width="100" height="100" patternUnits="userSpaceOnUse"><circle cx="25" cy="25" r="1" fill="white" opacity="0.1"/><circle cx="75" cy="75" r="1" fill="white" opacity="0.1"/><circle cx="50" cy="10" r="1" fill="white" opacity="0.1"/><circle cx="10" cy="60" r="1" fill="white" opacity="0.1"/><circle cx="90" cy="40" r="1" fill="white" opacity="0.1"/></pattern></defs><rect width="100" height="100" fill="url(%23grain)"/></svg>');
    pointer-events: none;
}

/* Animation Classes */
.fade-in {
    animation: fadeIn 0.8s ease-in-out;
}

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

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

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

/* Form Enhancements */
.form-input {
    transition: all 0.3s ease;
}

.form-input:focus {
    border-color: var(--niu-blue);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.form-select:focus {
    border-color: var(--niu-blue);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

/* Icon Enhancements */
.icon-pulse {
    animation: pulse 2s infinite;
}

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

/* Service Cards */
.service-card {
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 2rem;
    transition: all 0.3s ease;
    background: white;
}

.service-card:hover {
    border-color: var(--niu-blue);
    box-shadow: 0 10px 30px rgba(37, 99, 235, 0.1);
    transform: translateY(-2px);
}

/* Feature Lists */
.feature-list {
    list-style: none;
}

.feature-list li {
    padding: 0.5rem 0;
    border-bottom: 1px solid #f1f5f9;
}

.feature-list li:last-child {
    border-bottom: none;
}

/* Alert Boxes */
.alert {
    padding: 1rem;
    border-radius: 8px;
    border: 1px solid;
    margin-bottom: 1rem;
}

.alert-info {
    background-color: #dbeafe;
    border-color: #93c5fd;
    color: #1e40af;
}

.alert-warning {
    background-color: #fed7d7;
    border-color: #fbb6ce;
    color: #c53030;
}

.alert-success {
    background-color: #d1fae5;
    border-color: #a7f3d0;
    color: #059669;
}

/* Loading States */
.loading {
    opacity: 0.6;
    pointer-events: none;
}

.spinner {
    border: 3px solid #f3f4f6;
    border-top: 3px solid var(--niu-blue);
    border-radius: 50%;
    width: 24px;
    height: 24px;
    animation: spin 1s linear infinite;
}

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

/* Mobile Menu Styles */
.mobile-menu-enter {
    animation: slideDown 0.3s ease-out;
}

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

/* Responsive Images */
.responsive-img {
    max-width: 100%;
    height: auto;
}

/* Accessibility Improvements */
.skip-link {
    position: absolute;
    top: -40px;
    left: 6px;
    background: var(--niu-blue);
    color: white;
    padding: 8px;
    text-decoration: none;
    z-index: 100;
}

.skip-link:focus {
    top: 6px;
}

/* Focus States */
.focus\:ring-niu-blue:focus {
    --tw-ring-color: rgba(37, 99, 235, 0.5);
}

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

/* Print Styles */
@media print {
    .no-print {
        display: none !important;
    }
    
    body {
        font-size: 12pt;
        line-height: 1.4;
    }
    
    h1, h2, h3 {
        page-break-after: avoid;
    }
}

/* High Contrast Mode Support */
@media (prefers-contrast: high) {
    .bg-gray-50 {
        background-color: #f8f9fa !important;
    }
    
    .text-gray-600 {
        color: #333 !important;
    }
}

/* 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 (Optional) */
@media (prefers-color-scheme: dark) {
    .dark-mode-support {
        background-color: #1a202c;
        color: #e2e8f0;
    }
}

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

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

::-webkit-scrollbar-thumb {
    background: var(--niu-gray);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--niu-blue);
}

/* Selection Styles */
::selection {
    background-color: rgba(37, 99, 235, 0.2);
    color: var(--niu-dark);
}

/* Table Styles */
.data-table {
    width: 100%;
    border-collapse: collapse;
}

.data-table th,
.data-table td {
    padding: 12px;
    text-align: left;
    border-bottom: 1px solid #e2e8f0;
}

.data-table th {
    background-color: #f8fafc;
    font-weight: 600;
}

/* Utility Classes */
.text-shadow {
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

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

/* Mobile Optimizations */
@media (max-width: 640px) {
    .mobile-center {
        text-align: center;
    }
    
    .mobile-full-width {
        width: 100%;
    }
    
    .mobile-text-sm {
        font-size: 0.875rem;
    }
}

/* Tablet Optimizations */
@media (min-width: 641px) and (max-width: 1024px) {
    .tablet-grid-2 {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 1rem;
    }
}

/* Desktop Enhancements */
@media (min-width: 1025px) {
    .desktop-hover-scale:hover {
        transform: scale(1.02);
    }
    
    .desktop-shadow-lg:hover {
        box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    }
}

/* Content Spacing */
.content-spacing > * + * {
    margin-top: 1.5rem;
}

/* Image Optimization */
.hero-image {
    object-fit: cover;
    object-position: center;
}

/* Button Loading State */
.btn-loading {
    position: relative;
    color: transparent;
}

.btn-loading::after {
    content: '';
    position: absolute;
    width: 16px;
    height: 16px;
    top: 50%;
    left: 50%;
    margin-left: -8px;
    margin-top: -8px;
    border: 2px solid transparent;
    border-top-color: currentColor;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

/* Custom Checkbox and Radio Styles */
.custom-checkbox,
.custom-radio {
    appearance: none;
    width: 18px;
    height: 18px;
    border: 2px solid #d1d5db;
    border-radius: 4px;
    background: white;
    cursor: pointer;
    position: relative;
}

.custom-radio {
    border-radius: 50%;
}

.custom-checkbox:checked,
.custom-radio:checked {
    background: var(--niu-blue);
    border-color: var(--niu-blue);
}

.custom-checkbox:checked::after {
    content: '✓';
    position: absolute;
    top: -2px;
    left: 2px;
    color: white;
    font-size: 12px;
    font-weight: bold;
}

/* Tooltip Styles */
.tooltip {
    position: relative;
    cursor: help;
}

.tooltip:hover::after {
    content: attr(data-tooltip);
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    background: var(--niu-dark);
    color: white;
    padding: 6px 10px;
    border-radius: 4px;
    font-size: 12px;
    white-space: nowrap;
    z-index: 1000;
}

/* Progress Bar */
.progress-bar {
    width: 100%;
    height: 8px;
    background: #e5e7eb;
    border-radius: 4px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--niu-blue), var(--niu-teal));
    transition: width 0.3s ease;
}

/* Badge Styles */
.badge {
    display: inline-flex;
    align-items: center;
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 500;
    line-height: 1;
}

.badge-primary {
    background: var(--niu-blue);
    color: white;
}

.badge-success {
    background: #10b981;
    color: white;
}

.badge-warning {
    background: #f59e0b;
    color: white;
}

.badge-error {
    background: #ef4444;
    color: white;
}

/* Card Layouts */
.card-grid {
    display: grid;
    gap: 1.5rem;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
}

.card {
    background: white;
    border-radius: 12px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    transition: all 0.3s ease;
}

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

.card-header {
    padding: 1.5rem 1.5rem 0;
}

.card-body {
    padding: 1.5rem;
}

.card-footer {
    padding: 0 1.5rem 1.5rem;
}

/* Responsive Typography Scale */
@media (max-width: 640px) {
    .responsive-text-4xl {
        font-size: 2rem;
        line-height: 2.5rem;
    }
    
    .responsive-text-6xl {
        font-size: 3rem;
        line-height: 3.5rem;
    }
}

@media (min-width: 641px) {
    .responsive-text-4xl {
        font-size: 2.25rem;
        line-height: 2.75rem;
    }
    
    .responsive-text-6xl {
        font-size: 3.75rem;
        line-height: 4.25rem;
    }
}

/* Performance Optimizations */
.gpu-accelerated {
    transform: translateZ(0);
    will-change: transform;
}

/* Error States */
.error-input {
    border-color: #ef4444;
    box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.1);
}

.error-text {
    color: #dc2626;
    font-size: 0.875rem;
    margin-top: 0.5rem;
}

/* Success States */
.success-input {
    border-color: #10b981;
    box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.1);
}

.success-text {
    color: #059669;
    font-size: 0.875rem;
    margin-top: 0.5rem;
}