/* ============================
   Global Styles
   ============================ */
:root {
    --primary-color: #2c5aa0;
    --secondary-color: #5b9bd5;
    --accent-color: #a5c9ea;
    --dark-color: #1a1a1a;
    --light-color: #f8f9fa;
    --text-color: #333;
    --text-muted: #6c757d;
    --border-color: #e9ecef;
}

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

body {
    font-family: 'Noto Sans JP', 'Roboto', sans-serif;
    line-height: 1.6;
    color: var(--text-color);
    padding-top: 80px; /* Account for fixed navbar */
}

/* ============================
   Typography
   ============================ */
h1, h2, h3, h4, h5, h6 {
    font-weight: 500;
    line-height: 1.3;
    margin-bottom: 1rem;
}

.display-4, .display-5 {
    font-weight: 700;
}

.lead {
    font-size: 1.1rem;
    color: var(--text-muted);
}

/* ============================
   Navigation
   ============================ */
.navbar {
    transition: all 0.3s ease;
    padding: 1rem 0;
}

.navbar-brand img {
    transition: all 0.3s ease;
}

.navbar-nav .nav-link {
    font-weight: 500;
    padding: 0.5rem 1rem;
    transition: all 0.3s ease;
    color: var(--text-color);
}

.navbar-nav .nav-link:hover {
    color: var(--primary-color);
    transform: translateY(-2px);
}

.navbar-nav .nav-link.active {
    color: var(--primary-color);
    font-weight: 600;
}

.navbar-toggler {
    border: none;
    padding: 4px 8px;
}

.navbar-toggler:focus {
    box-shadow: none;
}

/* Admin Login Button */
.admin-login-link {
    transition: all 0.3s ease;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex !important;
    align-items: center;
    justify-content: center;
    margin-left: 0.5rem;
}

.admin-login-link:hover {
    background: rgba(108, 117, 125, 0.1);
    color: var(--primary-color) !important;
    transform: scale(1.1);
}

/* Mobile Navigation */
@media (max-width: 991.98px) {
    .navbar-collapse {
        margin-top: 1rem;
        padding-top: 1rem;
        border-top: 1px solid var(--border-color);
    }
    
    .navbar-nav .nav-link {
        padding: 0.75rem 0;
        border-bottom: 1px solid var(--border-color);
    }
    
    .navbar-nav .nav-link:last-child {
        border-bottom: none;
    }
    
    .admin-login-link {
        width: auto;
        height: auto;
        border-radius: 8px;
        padding: 0.75rem 1rem;
        margin-left: 0;
        justify-content: flex-start;
    }
    
    .admin-login-link::after {
        content: ' 管理者ログイン';
        margin-left: 0.5rem;
    }
}

/* ============================
   Hero Section
   ============================ */
.hero-section {
    position: relative;
}

.hero-slide {
    min-height: 80vh;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    display: flex;
    align-items: center;
    position: relative;
}

.hero-slide-static {
    min-height: 80vh;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    position: relative;
}

.hero-content h1 {
    color: var(--dark-color);
    margin-bottom: 1.5rem;
    line-height: 1.2;
}

.hero-content .text-primary {
    color: var(--primary-color) !important;
}

.hero-buttons .btn {
    margin-bottom: 1rem;
    transition: all 0.3s ease;
    font-weight: 600;
}

.hero-buttons .btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(44, 90, 160, 0.3);
}

.hero-image img {
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

.hero-image img:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
}

/* Placeholder for hero image */
.hero-image::before {
    content: '';
    display: block;
    width: 100%;
    height: 400px;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    border-radius: 15px;
    position: relative;
}

/* Carousel Customization */
.carousel-indicators {
    bottom: 20px;
}

.carousel-indicators [data-bs-target] {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    margin: 0 5px;
    background-color: rgba(255, 255, 255, 0.5);
    border: 2px solid rgba(255, 255, 255, 0.8);
    transition: all 0.3s ease;
}

.carousel-indicators .active {
    background-color: #ffc107;
    border-color: #ffc107;
    transform: scale(1.2);
}

.carousel-control-prev,
.carousel-control-next {
    width: 5%;
    opacity: 0.8;
    transition: all 0.3s ease;
}

.carousel-control-prev:hover,
.carousel-control-next:hover {
    opacity: 1;
}

.carousel-control-prev-icon,
.carousel-control-next-icon {
    width: 30px;
    height: 30px;
    background-size: 100%, 100%;
    border-radius: 50%;
    background-color: rgba(0, 0, 0, 0.3);
    padding: 8px;
}

/* News Cards Hover Effect */
.news-card-hover {
    transition: all 0.3s ease;
}

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

.card-img-top-wrapper {
    overflow: hidden;
    border-radius: 0.375rem 0.375rem 0 0;
}

.news-card-hover:hover .card-img-top {
    transform: scale(1.05);
    transition: transform 0.3s ease;
}

.hero-image::after {
    content: 'Hero Image Placeholder';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: white;
    font-size: 1.2rem;
    font-weight: 500;
    text-align: center;
}

/* ============================
   Buttons
   ============================ */
.btn {
    border-radius: 50px;
    padding: 0.75rem 2rem;
    font-weight: 500;
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

.btn-primary {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
}

.btn-primary:hover {
    background-color: var(--secondary-color);
    border-color: var(--secondary-color);
    transform: translateY(-2px);
}

.btn-outline-primary {
    color: var(--primary-color);
    border-color: var(--primary-color);
}

.btn-outline-primary:hover {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
    transform: translateY(-2px);
}

/* ============================
   Cards
   ============================ */
.card {
    transition: all 0.3s ease;
    border-radius: 15px;
}

.card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.1);
}

.card-hover {
    transition: all 0.3s ease;
    cursor: pointer;
}

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

.card-hover .card-title {
    transition: color 0.3s ease;
}

.card-hover:hover .card-title {
    color: var(--primary-color);
}

.card-body {
    padding: 2rem;
}

.card-title {
    color: var(--dark-color);
    font-weight: 600;
}

/* ============================
   Services Section
   ============================ */
.service-item {
    padding: 1.5rem 0;
    transition: all 0.3s ease;
}

.service-item:hover {
    transform: translateX(10px);
}

.service-icon {
    min-width: 60px;
}

.service-content h5 {
    color: var(--dark-color);
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.service-hover {
    transition: all 0.3s ease;
    cursor: pointer;
}

.service-hover:hover {
    transform: translateX(10px);
}

.service-hover:hover .service-content h5 {
    color: var(--primary-color);
}

/* ============================
   News Section
   ============================ */
.badge {
    font-size: 0.75rem;
    padding: 0.5rem 1rem;
    border-radius: 20px;
}

.badge.bg-primary {
    background-color: var(--primary-color) !important;
}

.badge.bg-success {
    background-color: #28a745 !important;
}

.badge.bg-warning {
    background-color: #ffc107 !important;
    color: var(--dark-color) !important;
}

/* ============================
   Footer
   ============================ */
footer {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%) !important;
    position: relative;
}

footer::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.1);
    z-index: 1;
}

footer > * {
    position: relative;
    z-index: 2;
}

footer h5 {
    color: white;
    font-weight: 600;
    margin-bottom: 1.5rem;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

footer p,
footer .text-muted {
    color: rgba(255, 255, 255, 0.9) !important;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

footer a {
    text-decoration: none;
    transition: all 0.3s ease;
    color: rgba(255, 255, 255, 0.8) !important;
}

footer a:hover {
    color: white !important;
    transform: translateX(5px);
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}

footer ul li {
    margin-bottom: 0.5rem;
}

footer hr {
    border-color: rgba(255, 255, 255, 0.2) !important;
    opacity: 1;
}

.social-links a {
    display: inline-block;
    width: 40px;
    height: 40px;
    line-height: 40px;
    text-align: center;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.15);
    transition: all 0.3s ease;
    color: white !important;
    border: 2px solid rgba(255, 255, 255, 0.2);
}

.social-links a:hover {
    background-color: rgba(255, 255, 255, 0.25);
    transform: translateY(-3px);
    border-color: rgba(255, 255, 255, 0.4);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

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

.fade-in-up {
    animation: fadeInUp 0.6s ease-out;
}

/* ============================
   Responsive Design
   ============================ */
@media (max-width: 768px) {
    body {
        padding-top: 70px;
    }
    
    .hero-section {
        min-height: 70vh;
        padding: 2rem 0;
    }
    
    .hero-content h1 {
        font-size: 2rem;
    }
    
    .hero-buttons .btn {
        width: 100%;
        margin-bottom: 1rem;
    }
    
    .service-item {
        text-align: center;
        margin-bottom: 2rem;
    }
    
    .service-item:hover {
        transform: translateY(-5px);
    }
}

@media (max-width: 576px) {
    .container {
        padding-left: 1rem;
        padding-right: 1rem;
    }
    
    .hero-content h1 {
        font-size: 1.75rem;
    }
    
    .display-5 {
        font-size: 2rem;
    }
    
    .card-body {
        padding: 1.5rem;
    }
}

/* ============================
   Utility Classes
   ============================ */
.text-primary {
    color: var(--primary-color) !important;
}

.bg-primary {
    background-color: var(--primary-color) !important;
}

.border-primary {
    border-color: var(--primary-color) !important;
}

.shadow-custom {
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.rounded-custom {
    border-radius: 15px;
}

/* Smooth scrolling for anchor links */
html {
    scroll-behavior: smooth;
}

/* Loading animation */
.loading {
    opacity: 0;
    transition: opacity 0.3s ease;
}

.loading.loaded {
    opacity: 1;
}
