:root {
    --budo-black: #1a1a1a;
    --budo-white: #fafafa;
    --budo-gray: #6b7280;
    --budo-light-gray: #f3f4f6;
    --budo-accent: #dc2626;
    --budo-accent-light: #fecaca;
    --budo-paper: #fef3c7;
}

* {
    box-sizing: border-box;
}

html {
    overscroll-behavior: none;
}

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--budo-white);
    color: var(--budo-black);
    margin: 0;
    padding: 0;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Page Wrapper for Sticky Footer */
.page-wrapper {
    display: flex;
    flex-direction: column;
    flex: 1;
    min-height: 100vh;
}

/* Main content should grow to push footer down */
main {
    flex: 1 0 auto;
}

/* Footer should not shrink and stay at bottom */
.footer {
    flex-shrink: 0;
    width: 100%;
}

.font-jp {
    font-family: 'Noto Serif JP', serif;
}

/* Elegant navbar */
.navbar-budo {
    background-color: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.navbar-brand {
    font-family: 'Noto Serif JP', serif;
    font-weight: 600;
    font-size: 1.5rem;
    color: var(--budo-black) !important;
}

.nav-link {
    color: var(--budo-gray) !important;
    font-weight: 400;
    transition: color 0.3s ease;
}

.nav-link:hover {
    color: var(--budo-black) !important;
}

/* Hero section */
.hero-section {
    min-height: 80vh;
    display: flex;
    align-items: center;
    position: relative;
    overflow: hidden;
    padding-top: 80px; /* Account for fixed navbar */
}

@media (max-width: 768px) {
    .hero-section {
        min-height: auto;
        padding-top: 100px;
        padding-bottom: 3rem;
    }
}

.hero-section::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -20%;
    width: 80%;
    height: 200%;
    background: radial-gradient(ellipse, rgba(220, 38, 38, 0.03) 0%, transparent 70%);
    pointer-events: none;
}

.kanji-watermark {
    position: absolute;
    right: 5%;
    top: 50%;
    transform: translateY(-50%);
    font-family: 'Noto Serif JP', serif;
    font-size: 25rem;
    font-weight: 200;
    color: rgba(0, 0, 0, 0.02);
    line-height: 1;
    pointer-events: none;
    user-select: none;
}

@media (max-width: 768px) {
    .kanji-watermark {
        font-size: 12rem;
        right: 0;
        opacity: 0.5;
    }
}

.hero-title {
    font-family: 'Noto Serif JP', serif;
    font-weight: 600;
    font-size: 3.5rem;
    line-height: 1.2;
    margin-bottom: 1.5rem;
}

.hero-subtitle {
    font-size: 1.25rem;
    color: var(--budo-gray);
    font-weight: 300;
    max-width: 500px;
    line-height: 1.8;
}

/* Buttons */
.btn-budo {
    background-color: var(--budo-black);
    color: var(--budo-white);
    border: none;
    padding: 0.875rem 2rem;
    font-weight: 500;
    border-radius: 0.5rem;
    transition: all 0.3s ease;
}

.btn-budo:hover {
    background-color: var(--budo-accent);
    color: var(--budo-white);
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(220, 38, 38, 0.2);
}

.btn-budo-outline {
    background-color: transparent;
    color: var(--budo-black);
    border: 1px solid var(--budo-black);
    padding: 0.875rem 2rem;
    font-weight: 500;
    border-radius: 0.5rem;
    transition: all 0.3s ease;
}

.btn-budo-outline:hover {
    background-color: var(--budo-black);
    color: var(--budo-white);
}

/* Cards */
.budo-card {
    background: var(--budo-white);
    border: 1px solid rgba(0, 0, 0, 0.05);
    border-radius: 1rem;
    padding: 2rem;
    transition: all 0.3s ease;
}

.budo-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.08);
    border-color: transparent;
}

.card-icon {
    width: 60px;
    height: 60px;
    background: var(--budo-light-gray);
    border-radius: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: var(--budo-black);
    margin-bottom: 1.5rem;
    transition: all 0.3s ease;
}

.budo-card:hover .card-icon {
    background: var(--budo-accent);
    color: var(--budo-white);
}

/* Section styling */
.section-title {
    font-family: 'Noto Serif JP', serif;
    font-weight: 600;
    font-size: 2.5rem;
}

.section-subtitle {
    color: var(--budo-gray);
    font-size: 1.1rem;
    font-weight: 300;
}

/* Stats */
.stat-number {
    font-family: 'Noto Serif JP', serif;
    font-size: 3rem;
    font-weight: 600;
    color: var(--budo-black);
}

.stat-label {
    color: var(--budo-gray);
    font-size: 0.875rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

/* Quote section */
.quote-section {
    background: linear-gradient(135deg, var(--budo-light-gray) 0%, var(--budo-white) 100%);
    border-radius: 1.5rem;
    position: relative;
    overflow: hidden;
}

.quote-text {
    font-family: 'Noto Serif JP', serif;
    font-size: 1.5rem;
    font-weight: 400;
    line-height: 1.8;
    font-style: italic;
}

.quote-author {
    color: var(--budo-gray);
    font-weight: 500;
}

/* Footer */
.footer {
    background: var(--budo-black);
    color: var(--budo-white);
    padding: 3rem 0;
    margin-top: auto;
    flex-shrink: 0;
}

.footer h5,
.footer h6 {
    color: var(--budo-white);
}

.footer .text-muted {
    color: rgba(255, 255, 255, 0.6) !important;
}

.footer a {
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer a:hover {
    color: var(--budo-white);
}

.footer hr {
    border-color: rgba(255, 255, 255, 0.1);
}

.footer .legal-links {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.5rem 1rem;
}

.footer .legal-links a {
    color: rgba(255, 255, 255, 0.6);
    text-decoration: none;
    transition: color 0.3s ease;
    white-space: nowrap;
}

.footer .legal-links a:hover {
    color: var(--budo-white);
}

/* Footer responsive adjustments */
@media (max-width: 768px) {
    .footer {
        padding: 2rem 0;
        text-align: center;
    }
    
    .footer .row > div {
        margin-bottom: 1.5rem;
    }
    
    .footer .row > div:last-child {
        margin-bottom: 0;
    }
    
    .footer .legal-links {
        flex-direction: column;
        align-items: center;
        gap: 0.75rem;
    }
    
    .footer .legal-links a {
        margin: 0 !important;
    }
}

/* Divider */
.enso-divider {
    width: 60px;
    height: 60px;
    border: 2px solid var(--budo-black);
    border-radius: 50%;
    opacity: 0.1;
    margin: 0 auto;
}

/* Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.animate-fade-in {
    animation: fadeInUp 0.8s ease forwards;
}

.delay-1 { animation-delay: 0.1s; }
.delay-2 { animation-delay: 0.2s; }
.delay-3 { animation-delay: 0.3s; }
.delay-4 { animation-delay: 0.4s; }

.avatar {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    border: none;
    display: block;
}

/* Dojo Lead Avatar Styling */
.avatar-wrapper {
    position: relative;
    display: inline-block;
}

.avatar-wrapper.dojo-lead .avatar {
    border: 2px solid transparent;
    background: linear-gradient(white, white) padding-box,
                linear-gradient(135deg, #c9a961, #b8935e, #c9a961) border-box;
}

.avatar-wrapper.dojo-lead::after {
    content: '先';
    position: absolute;
    bottom: -2px;
    right: -4px;
    width: 16px;
    height: 16px;
    background: linear-gradient(135deg, #c9a961 0%, #b8935e 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 8px;
    font-family: 'Noto Serif JP', serif;
    color: white;
    font-weight: 600;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
    animation: sensei-pulse 2s ease-in-out infinite;
}

@keyframes sensei-pulse {
    0%, 100% {
        box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2), 0 0 0 0 rgba(201, 169, 97, 0.4);
    }
    50% {
        box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2), 0 0 0 4px rgba(201, 169, 97, 0);
    }
}

/* Larger avatar variant for dojo lead */
.avatar-wrapper.dojo-lead-lg .avatar {
    width: 48px;
    height: 48px;
    border: 3px solid transparent;
    background: linear-gradient(white, white) padding-box,
                linear-gradient(135deg, #c9a961, #b8935e, #c9a961) border-box;
}

.avatar-wrapper.dojo-lead-lg::after {
    content: '先生';
    width: auto;
    height: auto;
    padding: 2px 6px;
    border-radius: 10px;
    font-size: 9px;
    bottom: -4px;
    right: -8px;
}

/* Pagination */
.pagination {
    gap: 0.5rem;
}

.page-link {
    color: var(--budo-black);
    background-color: var(--budo-white);
    border: 1px solid rgba(0, 0, 0, 0.1);
    border-radius: 0.5rem;
    padding: 0.5rem 0.75rem;
    transition: all 0.3s ease;
}

.page-link:hover {
    color: var(--budo-white);
    background-color: var(--budo-black);
    border-color: var(--budo-black);
}

.page-link:focus {
    color: var(--budo-black);
    background-color: var(--budo-light-gray);
    border-color: var(--budo-black);
    box-shadow: 0 0 0 0.2rem rgba(26, 26, 26, 0.1);
}

.page-item.active .page-link {
    color: var(--budo-white);
    background-color: var(--budo-black);
    border-color: var(--budo-black);
}

.page-item.disabled .page-link {
    color: var(--budo-gray);
    background-color: var(--budo-light-gray);
    border-color: rgba(0, 0, 0, 0.05);
}

/* Toast Notification - Budo Style */
.budo-toast-container {
    position: fixed;
    top: 80px;
    right: 20px;
    z-index: 1100;
    animation: toastSlideIn 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.budo-toast-container.hiding {
    animation: toastSlideOut 0.3s ease forwards;
}

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

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

.budo-toast {
    background: var(--budo-white);
    border-radius: 1rem;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.15), 
                0 8px 20px rgba(0, 0, 0, 0.1);
    min-width: 320px;
    max-width: 400px;
    overflow: hidden;
    border: 1px solid rgba(0, 0, 0, 0.05);
}

.budo-toast-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 1.25rem 0.5rem;
}

.budo-toast-icon {
    width: 36px;
    height: 36px;
    background: linear-gradient(135deg, #dcfce7 0%, #bbf7d0 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #166534;
    font-size: 1.1rem;
}

.budo-toast-icon-error {
    background: linear-gradient(135deg, #fee2e2 0%, #fecaca 100%);
    color: #991b1b;
}

.budo-toast-icon-warning {
    background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
    color: #92400e;
}

.budo-toast-icon-info {
    background: linear-gradient(135deg, #dbeafe 0%, #bfdbfe 100%);
    color: #1e40af;
}

.budo-toast-close {
    background: none;
    border: none;
    color: var(--budo-gray);
    cursor: pointer;
    padding: 0.25rem;
    border-radius: 0.5rem;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.budo-toast-close:hover {
    background: var(--budo-light-gray);
    color: var(--budo-black);
}

.budo-toast-body {
    padding: 0.75rem 1.25rem 1.25rem;
}

.budo-toast-message {
    color: var(--budo-black);
    font-size: 0.9375rem;
    line-height: 1.5;
    margin-bottom: 0.5rem;
}

.budo-toast-message:last-child {
    margin-bottom: 0;
}

.budo-toast-progress {
    height: 3px;
    background: linear-gradient(90deg, var(--budo-accent) 0%, var(--budo-accent-light) 100%);
    animation: toastProgress 5s linear forwards;
}

@keyframes toastProgress {
    from {
        width: 100%;
    }
    to {
        width: 0%;
    }
}

/* Responsive toast */
@media (max-width: 576px) {
    .budo-toast-container {
        top: auto;
        bottom: 20px;
        right: 10px;
        left: 10px;
    }
    
    .budo-toast {
        min-width: auto;
        max-width: none;
        width: 100%;
    }
}

/* Notification Bell (Navbar) */
.notification-bell {
    position: relative;
    display: inline-flex;
    align-items: center;
}

.notification-bell i {
    font-size: 1.2rem;
}

.notification-badge {
    position: absolute;
    top: 0;
    right: 0;
    transform: translate(25%, -25%);
    background-color: var(--budo-accent);
    color: white;
    font-size: 0.65rem;
    font-weight: 600;
    min-width: 18px;
    height: 18px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 4px;
    box-shadow: 0 2px 4px rgba(220, 38, 38, 0.3);
}

/* Japanese-Style Breadcrumb Navigation */
.budo-breadcrumb {
    position: relative;
    display: inline-flex;
    align-items: center;
    padding: 0.75rem 2rem 0.75rem 1.5rem;
    background: linear-gradient(135deg, var(--budo-light-gray) 0%, rgba(255, 255, 255, 0.8) 50%, var(--budo-light-gray) 100%);
    border-radius: 0;
    margin-bottom: 1.5rem;
    /* Brush stroke effect with irregular edges */
    clip-path: polygon(
        0% 20%, 2% 0%, 8% 5%, 15% 0%, 25% 3%, 35% 0%, 45% 2%, 55% 0%, 
        65% 4%, 75% 0%, 85% 2%, 92% 0%, 98% 5%, 100% 15%, 
        100% 80%, 98% 100%, 92% 95%, 85% 100%, 75% 97%, 65% 100%, 
        55% 98%, 45% 100%, 35% 96%, 25% 100%, 15% 98%, 8% 100%, 2% 95%, 0% 85%
    );
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.budo-breadcrumb::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 4px;
    height: 60%;
    background: linear-gradient(180deg, transparent 0%, var(--budo-accent) 20%, var(--budo-accent) 80%, transparent 100%);
    border-radius: 2px;
    opacity: 0.6;
}

.budo-breadcrumb .breadcrumb {
    margin-bottom: 0;
    padding: 0;
    background: transparent;
    align-items: center;
}

.budo-breadcrumb .breadcrumb-item {
    font-family: 'Inter', sans-serif;
    font-size: 0.875rem;
    font-weight: 400;
    letter-spacing: 0.02em;
}

.budo-breadcrumb .breadcrumb-item + .breadcrumb-item::before {
    content: '';
    display: inline-block;
    width: 20px;
    height: 12px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 12'%3E%3Cpath d='M2 6 C4 4, 8 4, 10 6 C12 8, 16 8, 18 6 L22 6' stroke='%23dc2626' stroke-width='1.5' fill='none' stroke-linecap='round' opacity='0.4'/%3E%3Cpath d='M16 3 L22 6 L16 9' stroke='%23dc2626' stroke-width='1.5' fill='none' stroke-linecap='round' stroke-linejoin='round' opacity='0.4'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: center;
    background-size: contain;
    padding: 0;
    margin: 0 0.5rem;
    vertical-align: middle;
}

.budo-breadcrumb .breadcrumb-item a {
    color: var(--budo-gray);
    text-decoration: none;
    transition: all 0.3s ease;
    position: relative;
}

.budo-breadcrumb .breadcrumb-item a:hover {
    color: var(--budo-black);
}

.budo-breadcrumb .breadcrumb-item a:hover::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 100%;
    height: 2px;
    background: linear-gradient(90deg, var(--budo-accent), transparent);
    border-radius: 1px;
}

.budo-breadcrumb .breadcrumb-item.active {
    color: var(--budo-black);
    font-weight: 500;
    font-family: 'Noto Serif JP', serif;
}

/* Alternative: More subtle brush stroke variant */
.budo-breadcrumb-subtle {
    position: relative;
    display: inline-flex;
    align-items: center;
    padding: 0.625rem 1.5rem;
    background: transparent;
    margin-bottom: 1.5rem;
}

.budo-breadcrumb-subtle::before {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 2px;
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 200 4'%3E%3Cpath d='M0 2 Q10 0, 20 2 T40 2 T60 2 T80 2 T100 2 T120 2 T140 2 T160 2 T180 2 T200 2' stroke='%231a1a1a' stroke-width='2' fill='none' opacity='0.1'/%3E%3C/svg%3E");
    background-repeat: repeat-x;
    background-size: 200px 4px;
}

.budo-breadcrumb-subtle::after {
    content: '道';
    position: absolute;
    right: -1.5rem;
    top: 50%;
    transform: translateY(-50%);
    font-family: 'Noto Serif JP', serif;
    font-size: 1.25rem;
    color: rgba(0, 0, 0, 0.05);
    font-weight: 200;
}

.budo-breadcrumb-subtle .breadcrumb {
    margin-bottom: 0;
    padding: 0;
    background: transparent;
    align-items: center;
}

.budo-breadcrumb-subtle .breadcrumb-item {
    font-family: 'Inter', sans-serif;
    font-size: 0.875rem;
    font-weight: 400;
}

.budo-breadcrumb-subtle .breadcrumb-item + .breadcrumb-item::before {
    content: '·';
    color: var(--budo-gray);
    padding: 0 0.75rem;
    font-weight: 600;
}

.budo-breadcrumb-subtle .breadcrumb-item a {
    color: var(--budo-gray);
    text-decoration: none;
    transition: color 0.3s ease;
}

.budo-breadcrumb-subtle .breadcrumb-item a:hover {
    color: var(--budo-accent);
}

.budo-breadcrumb-subtle .breadcrumb-item.active {
    color: var(--budo-black);
    font-weight: 500;
}

/* Responsive breadcrumb */
@media (max-width: 576px) {
    .budo-breadcrumb {
        padding: 0.625rem 1.25rem 0.625rem 1rem;
    }
    
    .budo-breadcrumb .breadcrumb-item {
        font-size: 0.8125rem;
    }
    
    .budo-breadcrumb .breadcrumb-item + .breadcrumb-item::before {
        width: 16px;
        margin: 0 0.375rem;
    }
}
