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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Hiragino Sans', 'Hiragino Kaku Gothic ProN', Meiryo, sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f8fafc;
}

/* Hero Section */
.hero {
    background: linear-gradient(135deg, rgba(30, 58, 138, 0.95) 0%, rgba(59, 130, 246, 0.95) 100%), url('../images/hero-background.jpg');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    color: white;
    padding: 4.5rem 1.5rem 3.5rem;
    text-align: center;
}

.hero-content {
    max-width: 760px;
    margin: 0 auto;
}

.hero h2 {
    font-size: clamp(1.9rem, 1.2rem + 2.2vw, 2.6rem);
    font-weight: 800;
    margin-bottom: 1rem;
    line-height: 1.25;
    letter-spacing: 0.01em;
    text-wrap: balance;
}

.hero-title {
    display: grid;
    gap: 0.65rem;
    justify-items: center;
}

.hero-title-top {
    display: inline-flex;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
    justify-content: center;
}

.hero-year {
    font-size: clamp(1.5rem, 1.1rem + 1.6vw, 2.1rem);
    font-weight: 800;
    letter-spacing: 0.02em;
}

.hero-title-main {
    font-size: clamp(2rem, 1.3rem + 2.8vw, 3rem);
    line-height: 1.2;
}

.hero-kicker {
    display: inline-block;
    font-size: 0.85rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.16em;
    padding: 0.5rem 0.95rem;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.32);
    box-shadow: 0 8px 20px rgba(15, 23, 42, 0.18);
}

.hero-subtitle {
    font-size: clamp(1.05rem, 0.9rem + 0.6vw, 1.25rem);
    margin-bottom: 2.5rem;
    opacity: 0.95;
    max-width: 680px;
    margin-left: auto;
    margin-right: auto;
}

.hero-badges {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 1.25rem;
    margin: 2rem auto 0;
    max-width: 720px;
}

.badge {
    background: rgba(96, 130, 210, 0.45);
    border: 1px solid rgba(255, 255, 255, 0.18);
    backdrop-filter: blur(10px);
    padding: 1.1rem 1.6rem;
    border-radius: 16px;
    font-weight: 600;
    text-align: center;
    box-shadow: 0 12px 26px rgba(15, 23, 42, 0.18);
}

.badge-number {
    display: block;
    font-size: 2rem;
    font-weight: 800;
    color: #fbbf24;
}

/* Container */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

/* Section */
.section {
    padding: 4rem 0;
}

.section-title {
    text-align: center;
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 1rem;
    color: #1e293b;
}

.section-subtitle {
    text-align: center;
    font-size: 1.1rem;
    color: #64748b;
    margin-bottom: 3rem;
}

/* Tab Navigation */
.tab-nav {
    display: flex;
    justify-content: center;
    gap: 1rem;
    flex-wrap: wrap;
    margin-bottom: 3rem;
    padding: 0 1rem;
}

.tab-button {
    background: white;
    border: 2px solid #e2e8f0;
    padding: 0.75rem 1.5rem;
    border-radius: 50px;
    font-size: 1rem;
    font-weight: 600;
    color: #64748b;
    cursor: pointer;
    transition: all 0.3s ease;
}

.tab-button:hover {
    border-color: #2563eb;
    color: #2563eb;
    transform: translateY(-2px);
}

.tab-button.active {
    background: #2563eb;
    border-color: #2563eb;
    color: white;
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.3);
}

/* School Grid */
.school-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 2rem;
    margin-bottom: 3rem;
}

/* School Card */
.school-card {
    background: white;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
    display: none;
}

.school-card.visible {
    display: block;
}

.school-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.15);
}

.school-banner {
    width: 100%;
    aspect-ratio: 4 / 3;
    min-height: 320px;
    background: #f1f5f9;
    position: relative;
    display: block;
    padding: 0;
    overflow: hidden;
}

.school-banner a {
    display: block;
    width: 100%;
    height: 100%;
}

.school-banner a img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    object-position: center;
    display: block;
}

.school-banner > img {
    position: absolute;
    width: 1px;
    height: 1px;
    opacity: 0;
    pointer-events: none;
}

.school-content {
    padding: 1.5rem;
}

.school-header {
    margin-bottom: 1rem;
}

.school-title-row {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    flex-wrap: wrap;
}

.school-name {
    font-size: 1.5rem;
    font-weight: 700;
    color: #1e293b;
    margin: 0;
    line-height: 1.1;
}

.school-tagline {
    font-size: 1rem;
    color: #2563eb;
    font-weight: 600;
    margin-top: 0.35rem;
    margin-bottom: 1rem;
}

.school-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.tag {
    background: #dbeafe;
    color: #1e40af;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.875rem;
    font-weight: 500;
}

.tag.highlight {
    background: #fef3c7;
    color: #92400e;
}

.school-features {
    margin-bottom: 1.5rem;
}

.school-features h4 {
    font-size: 1rem;
    font-weight: 600;
    color: #475569;
    margin-bottom: 0.75rem;
}

.features-list {
    list-style: none;
}

.features-list li {
    padding-left: 1.5rem;
    margin-bottom: 0.5rem;
    position: relative;
    color: #64748b;
    font-size: 0.95rem;
}

.features-list li::before {
    content: "✓";
    position: absolute;
    left: 0;
    color: #10b981;
    font-weight: 700;
}

.school-target {
    background: #fff7ed;
    border: 1px solid #fed7aa;
    border-left: 6px solid #f97316;
    padding: 1rem 1.25rem;
    margin-bottom: 1.5rem;
    border-radius: 10px;
    box-shadow: 0 6px 16px rgba(249, 115, 22, 0.08);
}

.school-target h4 {
    font-size: 1rem;
    font-weight: 600;
    color: #c2410c;
    margin-bottom: 0.4rem;
}

.school-target p {
    font-size: 0.95rem;
    color: #3f4754;
    line-height: 1.6;
}

.school-cta {
    display: flex;
    gap: 0.75rem;
}

.btn {
    flex: 1;
    padding: 0.875rem 1.5rem;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    text-align: center;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.3s ease;
    border: none;
}

.btn-primary {
    background: linear-gradient(135deg, #f97316 0%, #ea580c 100%);
    color: white;
    box-shadow: 0 4px 12px rgba(249, 115, 22, 0.3);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(249, 115, 22, 0.4);
}

.btn-secondary {
    background: white;
    color: #2563eb;
    border: 2px solid #2563eb;
}

.btn-secondary:hover {
    background: #eff6ff;
}

.btn-line {
    background: linear-gradient(135deg, #22c55e 0%, #16a34a 100%);
    color: white;
    box-shadow: 0 4px 12px rgba(34, 197, 94, 0.3);
}

.btn-line:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(34, 197, 94, 0.4);
}

.cta-note {
    font-size: 1rem;
    color: #0f172a;
    margin-bottom: 1.25rem;
    font-weight: 600;
}

.cta-actions {
    display: flex;
    gap: 0.9rem;
    flex-wrap: wrap;
    justify-content: center;
}

.cta-actions .btn {
    flex: 1 1 220px;
    max-width: 260px;
}

/* Ranking Badge */
.ranking-badge {
    display: inline-flex;
    align-items: center;
    position: relative;
    background: linear-gradient(135deg, #0ea5e9 0%, #16a34a 100%);
    color: #ffffff;
    padding: 0.35rem 0.85rem;
    border-radius: 999px;
    font-weight: 800;
    font-size: 0.9rem;
    line-height: 1.1;
    box-shadow: 0 8px 20px rgba(14, 165, 233, 0.2), inset 0 0 0 1px rgba(255, 255, 255, 0.5);
    letter-spacing: 0.3px;
    border: 1px solid rgba(15, 23, 42, 0.08);
    margin: 0;
}

.ranking-badge[hidden] {
    display: none;
}

.ranking-badge::after {
    content: "";
    position: absolute;
    inset: 1px;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.18);
    pointer-events: none;
}

.school-card {
    position: relative;
}

/* Footer */
.footer {
    background: #1e293b;
    color: white;
    padding: 3rem 0 1.5rem;
    margin-top: 4rem;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1.5rem;
    text-align: center;
}

.footer p {
    color: #94a3b8;
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
}

/* Responsive */
@media (max-width: 768px) {
    .hero {
        padding: 3.5rem 1.25rem 3rem;
    }

    .hero h2 {
        font-size: clamp(1.6rem, 1.1rem + 2.5vw, 2rem);
    }

    .hero-title-top {
        gap: 0.75rem;
    }

    .hero-year {
        font-size: clamp(1.35rem, 1.05rem + 2vw, 1.8rem);
    }

    .hero-title-main {
        font-size: clamp(1.8rem, 1.2rem + 3vw, 2.4rem);
    }
    
    .hero-subtitle {
        font-size: 1rem;
    }
    
    .hero-badges {
        gap: 0.75rem;
    }
    
    .badge {
        padding: 0.75rem 1rem;
    }
    
    .badge-number {
        font-size: 1.5rem;
    }
    
    .school-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .school-banner {
        aspect-ratio: 16 / 9;
        min-height: 0;
    }
    
    .tab-nav {
        gap: 0.5rem;
    }
    
    .tab-button {
        padding: 0.5rem 1rem;
        font-size: 0.9rem;
    }
    
    .section-title {
        font-size: 1.5rem;
    }
}

/* Loading Animation */
.loading {
    text-align: center;
    padding: 3rem;
    color: #64748b;
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 3rem;
    color: #64748b;
}

.empty-state p {
    font-size: 1.1rem;
}
