/* Custom Styles for Tsunagu Library */

:root {
    --primary-blue: #3B82F6;
    --primary-dark: #2563EB;
    --secondary-gray: #6B7280;
    --bg-light: #F9FAFB;
    --text-dark: #111827;
}

/* Typography */
body {
    font-family: 'Noto Sans JP', sans-serif;
    line-height: 1.7;
}

h1, h2, h3, h4, h5, h6 {
    font-family: 'Noto Serif JP', serif;
    font-weight: 600;
}

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

/* Navigation Enhancements */
nav {
    backdrop-filter: blur(10px);
    background-color: rgba(255, 255, 255, 0.95);
}

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

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

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

/* Button Animations */
.btn-primary {
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
}

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

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

/* Section Dividers */
.section-divider {
    position: relative;
    overflow: hidden;
}

.section-divider::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--primary-blue), transparent);
}

/* Team Member Cards */
.member-card {
    transition: all 0.3s ease;
    cursor: pointer;
}

.member-card:hover {
    transform: scale(1.05);
}

.member-card img {
    transition: filter 0.3s ease;
}

.member-card:hover img {
    filter: brightness(1.1);
}

/* Social Media Icons */
.social-icon {
    transition: all 0.3s ease;
}

.social-icon:hover {
    transform: rotate(360deg) scale(1.2);
}

/* Form Inputs */
input:focus, textarea:focus, select:focus {
    border-color: var(--primary-blue);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

/* Loading Animation */
.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(59, 130, 246, 0.3);
    border-radius: 50%;
    border-top-color: var(--primary-blue);
    animation: spin 1s ease-in-out infinite;
}

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

/* Badge Styles */
.badge-platinum {
    background: linear-gradient(135deg, #FFD700, #FFA500);
    color: white;
}

.badge-gold {
    background: linear-gradient(135deg, #FFA500, #FF8C00);
    color: white;
}

.badge-silver {
    background: linear-gradient(135deg, #C0C0C0, #A9A9A9);
    color: white;
}

.badge-bronze {
    background: linear-gradient(135deg, #CD7F32, #8B4513);
    color: white;
}

/* Rank Colors */
.rank-platinum {
    color: #FFD700;
    text-shadow: 0 0 10px rgba(255, 215, 0, 0.5);
}

.rank-gold {
    color: #FFA500;
    text-shadow: 0 0 10px rgba(255, 165, 0, 0.5);
}

.rank-silver {
    color: #C0C0C0;
    text-shadow: 0 0 10px rgba(192, 192, 192, 0.5);
}

.rank-bronze {
    color: #CD7F32;
    text-shadow: 0 0 10px rgba(205, 127, 50, 0.5);
}

/* Modal Backdrop */
.modal-backdrop {
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* Modal Content */
.modal-content {
    animation: slideUp 0.3s ease;
}

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

/* Responsive Image Gallery */
.image-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1rem;
}

/* Success Message */
.success-message {
    animation: slideDown 0.5s ease;
}

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

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

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

::-webkit-scrollbar-thumb {
    background: var(--primary-blue);
    border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--primary-dark);
}

/* Print Styles */
@media print {
    nav, footer, .no-print {
        display: none;
    }
    
    body {
        font-size: 12pt;
    }
    
    a {
        text-decoration: none;
        color: black;
    }
}

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

/* Focus Visible */
:focus-visible {
    outline: 2px solid var(--primary-blue);
    outline-offset: 2px;
}

/* Skip to Content Link */
.skip-to-content {
    position: absolute;
    top: -40px;
    left: 0;
    background: var(--primary-blue);
    color: white;
    padding: 8px;
    text-decoration: none;
    z-index: 100;
}

.skip-to-content:focus {
    top: 0;
}

/* Responsive Typography */
@media (max-width: 768px) {
    h1 { font-size: 2rem; }
    h2 { font-size: 1.75rem; }
    h3 { font-size: 1.5rem; }
    h4 { font-size: 1.25rem; }
    
    .hero-title {
        font-size: 2.5rem;
    }
}

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

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

.slide-in-left {
    animation: slideInLeft 0.5s ease;
}

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

.slide-in-right {
    animation: slideInRight 0.5s ease;
}

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

/* Pulse Animation for CTAs */
.pulse {
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(59, 130, 246, 0.7);
    }
    70% {
        box-shadow: 0 0 0 10px rgba(59, 130, 246, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(59, 130, 246, 0);
    }
}