/* Base Styles */
:root {
    --primary-color: #1e88e5;
    /* Refreshing clear blue */
    --primary-light: #bbdefb;
    /* Pale blue */
    --primary-dark: #1565c0;
    /* Deeper blue for hover/contrast */
    --secondary-color: #ffb74d;
    /* Soft orange for accent CTA */
    --accent-color: #ffd54f;
    /* Bright yellow/gold */
    --text-color: #333333;
    --text-light: #666666;
    --bg-color: #fafdff;
    /* Extremely pale blue-white */
    --bg-light: #e3f2fd;
    /* Light blue background for sections */
    --white: #ffffff;
    --text-white: #ffffff;
    --border-color: #bbdefb;
    --shadow: 0 10px 30px rgba(30, 136, 229, 0.08);
    --hover-shadow: 0 15px 40px rgba(30, 136, 229, 0.15);
    --transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Noto Sans JP', 'Zen Kaku Gothic New', sans-serif;
    color: var(--text-color);
    background-color: var(--bg-color);
    line-height: 1.7;
    font-weight: 500;
    overflow-x: hidden;
}

h1,
h2,
h3,
h4,
h5,
h6,
.hero-title,
.section-title {
    font-family: 'Noto Serif JP', serif;
    font-weight: 700;
}

a {
    text-decoration: none;
    color: var(--primary-color);
    transition: var(--transition);
}

ul {
    list-style: none;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* Typography & Utilities */
.text-center {
    text-align: center;
}

.text-white {
    color: var(--text-white);
}

.bg-light {
    background-color: var(--bg-light);
}

.bg-primary-dark {
    background-color: var(--primary-dark);
}

.mt-4 {
    margin-top: 2rem;
}

.mt-5 {
    margin-top: 3rem;
}

.ml-2 {
    margin-left: 0.5rem;
}

.desktop-only {
    display: block;
}

@media (max-width: 768px) {
    .desktop-only {
        display: none;
    }
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.75rem 1.5rem;
    border-radius: 4px;
    /* Slightly sharp for professional feel */
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
    border: 2px solid transparent;
}

.btn-primary {
    background-color: var(--primary-color);
    color: var(--white);
    box-shadow: 0 4px 6px rgba(13, 59, 102, 0.2);
    font-weight: 700;
}

.btn-primary:hover {
    background-color: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(30, 136, 229, 0.3);
    color: var(--white);
}

.btn-secondary {
    background-color: var(--secondary-color);
    color: var(--white);
}

.btn-secondary:hover {
    background-color: #ffa726;
    transform: translateY(-2px);
    color: var(--white);
}

.btn-outline-primary {
    background-color: transparent;
    border-color: var(--primary-color);
    color: var(--primary-color);
}

.btn-outline-primary:hover {
    background-color: var(--primary-color);
    color: var(--white);
}

.btn-outline-light {
    background-color: transparent;
    border-color: var(--white);
    color: var(--white);
}

.btn-outline-light:hover {
    background-color: var(--white);
    color: var(--primary-color);
}

.btn-light {
    background-color: var(--white);
    color: var(--primary-color);
}

.btn-light:hover {
    background-color: #f1f1f1;
}

.btn-lg {
    padding: 1rem 2rem;
    font-size: 1.1rem;
}

.btn-full {
    width: 100%;
}

/* Layout */
.container {
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
}

.section {
    padding: 7.5rem 0;
}

.section-header {
    margin-bottom: 3.5rem;
}

.section-title {
    font-size: 2.5rem;
    color: var(--primary-color);
    margin-bottom: 1rem;
    position: relative;
    display: inline-block;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 50px;
    height: 3px;
    background-color: var(--accent-color);
}

.section-desc {
    color: var(--text-light);
    font-size: 1.1rem;
}

.grid-layout-2,
.grid-layout-3,
.footer-grid {
    display: grid;
    gap: 2rem;
}

.grid-layout-2 {
    grid-template-columns: repeat(2, 1fr);
}

.grid-layout-3 {
    grid-template-columns: repeat(3, 1fr);
}

@media (max-width: 992px) {
    .grid-layout-3 {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {

    .grid-layout-2,
    .grid-layout-3 {
        grid-template-columns: 1fr;
    }

    .section {
        padding: 3rem 0;
    }

    .section-title {
        font-size: 2rem;
    }
}

/* Animation Classes */
.fade-in-up {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

.fade-in-up.visible {
    opacity: 1;
    transform: translateY(0);
}

.delay-1 {
    transition-delay: 0.1s;
}

.delay-2 {
    transition-delay: 0.2s;
}

.delay-3 {
    transition-delay: 0.3s;
}

/* Header & Nav */
.header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    transition: var(--transition);
    padding: 1rem 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.header.blur-background {
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    /* Glassmorphism */
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    border-bottom: 1px solid var(--border-color);
}

.header-container {
    width: 95%;
    max-width: 1400px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo a {
    font-family: 'Noto Serif JP', serif;
    font-size: 1.5rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    color: var(--primary-color);
}

.logo-icon {
    color: var(--secondary-color);
    margin-right: 0.5rem;
    font-size: 1.8rem;
}

/* By default, hero header text is primary dark before scroll */
.header.hero-top:not(.blur-background) .logo a,
.header.hero-top:not(.blur-background) .main-nav a,
.header.hero-top:not(.blur-background) .menu-toggle {
    color: var(--primary-dark);
}

.header.hero-top:not(.blur-background) .logo-icon {
    color: var(--accent-color);
}

.main-nav ul {
    display: flex;
    gap: 2rem;
}

.main-nav a {
    font-weight: 500;
    position: relative;
    padding-bottom: 5px;
}

.main-nav a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--secondary-color);
    transition: width 0.3s ease;
}

.main-nav a:hover::after {
    width: 100%;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.header-actions .btn-primary {
    background-color: var(--secondary-color);
    border-color: var(--secondary-color);
    color: var(--white);
    box-shadow: 0 4px 12px rgba(244, 162, 97, 0.3);
}

.header-actions .btn-primary:hover {
    background-color: #e78c46;
    border-color: #e78c46;
    box-shadow: 0 6px 16px rgba(244, 162, 97, 0.4);
    color: var(--white);
}

.menu-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--primary-color);
}

.mobile-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    background-color: var(--white);
    box-shadow: 0 5px 10px rgba(0, 0, 0, 0.1);
    padding: 1rem;
}

.mobile-menu ul li {
    margin-bottom: 1rem;
}

.mobile-menu ul li:last-child {
    margin-bottom: 0;
}

.mobile-menu a:not(.btn) {
    display: block;
    padding: 0.5rem 0;
    font-weight: 500;
    border-bottom: 1px solid var(--border-color);
}

@media (max-width: 992px) {

    .main-nav,
    .header-actions .btn {
        display: none;
    }

    .menu-toggle {
        display: block;
    }

    .mobile-menu.active {
        display: block;
    }
}

/* Hero Section */
.hero {
    height: 100vh;
    min-height: 600px;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    background-image: url('https://images.unsplash.com/photo-1544078756-3c0c97805126?q=80&w=2072&auto=format&fit=crop');
    /* Oceanic/Ship background */
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    /* Parallax effect */
    color: var(--primary-dark);
    text-align: center;
    overflow: hidden;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(227, 242, 253, 0.85) 0%, rgba(187, 222, 251, 0.85) 100%);
}

.hero-content {
    position: relative;
    z-index: 10;
    max-width: 800px;
    padding: 0 20px;
}

.hero-title {
    font-size: clamp(2.5rem, 5vw, 4rem);
    line-height: 1.6;
    margin-bottom: 1.5rem;
    letter-spacing: 2px;
    /* text-shadow: 0 4px 12px rgba(30, 136, 229, 0.4); */
}

.hero-subtitle {
    font-size: 1.2rem;
    margin-bottom: 0.5rem;
    font-weight: 700;
    letter-spacing: 1px;
    /* text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3); */
}

.hero-buttons {
    display: flex;
    gap: 1.5rem;
    justify-content: center;
}

.scroll-downIndicator {
    position: absolute;
    bottom: 50px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 10;
    display: flex;
    flex-direction: column;
    align-items: center;
    opacity: 0.7;
    animation: bounce 2s infinite;
    color: var(--primary-dark);
}

.scroll-downIndicator p {
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    margin-bottom: 10px;
}

.mouse {
    width: 24px;
    height: 36px;
    border: 2px solid var(--primary-dark);
    border-radius: 12px;
    display: flex;
    justify-content: center;
    padding-top: 5px;
}

.wheel {
    width: 4px;
    height: 8px;
    background-color: var(--primary-dark);
    border-radius: 2px;
    animation: scroll 1.5s infinite;
}

@keyframes bounce {

    0%,
    20%,
    50%,
    80%,
    100% {
        transform: translateY(0) translateX(-50%);
    }

    40% {
        transform: translateY(-10px) translateX(-50%);
    }

    60% {
        transform: translateY(-5px) translateX(-50%);
    }
}

@keyframes scroll {
    0% {
        transform: translateY(0);
        opacity: 1;
    }

    100% {
        transform: translateY(15px);
        opacity: 0;
    }
}

@media (max-width: 768px) {
    .hero-title {
        font-size: 2.5rem;
    }

    .hero-subtitle {
        font-size: 1rem;
    }

    .hero-buttons {
        flex-direction: column;
        gap: 1rem;
    }
}

/* Group Notice Banner */
.group-banner {
    background-color: var(--primary-dark);
    color: var(--text-white);
    padding: 1.5rem 0;
    font-size: 1rem;
}

.group-links {
    margin-top: 0.5rem;
    display: flex;
    justify-content: center;
    gap: 1.5rem;
}

.group-link {
    color: var(--accent-color);
    font-weight: 500;
}

.group-link:hover {
    color: var(--white);
    text-decoration: underline;
}

@media (max-width: 768px) {
    .group-links {
        flex-direction: column;
        gap: 0.5rem;
        align-items: center;
    }
}

/* Cards (Core Services) */
.core-cards {
    margin-top: 2rem;
}

.card {
    background: var(--white);
    border-radius: 8px;
    padding: 2.5rem;
    box-shadow: var(--shadow);
    transition: var(--transition);
    border-top: 4px solid transparent;
    position: relative;
    overflow: hidden;
}

.card:hover {
    transform: translateY(-10px);
    box-shadow: var(--hover-shadow);
    border-top-color: var(--secondary-color);
}

.card-icon {
    font-size: 2.5rem;
    color: var(--primary-color);
    margin-bottom: 1.5rem;
    display: inline-block;
}

.card h3 {
    font-size: 1.5rem;
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.card p {
    color: var(--text-light);
    margin-bottom: 1.5rem;
}

.feature-list {
    margin-bottom: 1.5rem;
}

.feature-list li {
    margin-bottom: 0.5rem;
    font-size: 0.95rem;
}

.feature-list i {
    color: var(--secondary-color);
    margin-right: 0.5rem;
}

.link-arrow {
    display: inline-flex;
    align-items: center;
    font-weight: 700;
    color: var(--primary-color);
}

.link-arrow i {
    margin-left: 0.5rem;
    transition: transform 0.3s ease;
}

.link-arrow:hover i {
    transform: translateX(5px);
}

/* Stats Section */
.stats-section {
    position: relative;
    background-image: url('https://images.unsplash.com/photo-1494412574643-ff11b0a5c1c3?q=80&w=2070&auto=format&fit=crop');
    /* Ropes/Nautical subtle */
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
}

.stats-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(4, 20, 35, 0.9);
}

/* Scroll to top */
.scroll-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    background: rgba(30, 136, 229, 0.9);
}

.stats-section .container {
    position: relative;
    z-index: 10;
}

.stat-number {
    font-size: 4rem;
    font-family: 'Noto Serif JP', serif;
    font-weight: 700;
    color: var(--accent-color);
    line-height: 1;
    margin-bottom: 0.5rem;
}

.stat-plus {
    font-size: 2rem;
    vertical-align: super;
}

.stat-label {
    font-size: 1.1rem;
    font-weight: 500;
    letter-spacing: 1px;
}

/* Column Cards */
.column-card {
    background: var(--white);
    border-radius: 8px;
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: var(--transition);
}

.column-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--hover-shadow);
}

.column-img {
    position: relative;
    height: 220px;
    overflow: hidden;
}

.column-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.column-card:hover .column-img img {
    transform: scale(1.05);
}

.badge {
    position: absolute;
    top: 15px;
    left: 15px;
    background-color: var(--secondary-color);
    color: var(--white);
    padding: 0.3rem 0.8rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 700;
    z-index: 2;
}

.column-content {
    padding: 1.5rem;
}

.column-meta {
    font-size: 0.85rem;
    color: var(--text-light);
    margin-bottom: 0.5rem;
}

.column-title {
    font-size: 1.1rem;
    margin-bottom: 1rem;
    line-height: 1.5;
    font-weight: 700;
}

.column-title a {
    color: var(--text-color);
}

.column-title a:hover {
    color: var(--primary-color);
}

.column-excerpt {
    font-size: 0.95rem;
    color: var(--text-light);
}

/* Global CTA */
.global-cta {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-light) 100%);
    color: var(--white);
    padding: 6rem 0;
}

.cta-title {
    font-size: 2.5rem;
    margin-bottom: 1.5rem;
}

.cta-text {
    font-size: 1.2rem;
    margin-bottom: 2.5rem;
    opacity: 0.95;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.cta-actions {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
}

.cta-btn {
    display: flex;
    flex-direction: column;
    padding: 1rem 2.5rem;
}

.cta-btn i {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
}

.cta-sub {
    font-size: 0.85rem;
    font-weight: 400;
    opacity: 0.8;
}

@media (max-width: 768px) {
    .cta-actions {
        flex-direction: column;
        gap: 1rem;
    }

    .cta-title {
        font-size: 2rem;
    }
}

/* Footer */
.footer {
    background-color: var(--primary-dark);
    color: #a0aec0;
    padding: 4rem 0 0 0;
}

.footer-grid {
    grid-template-columns: 2fr 1fr 1fr;
    margin-bottom: 3rem;
}

.footer-logo {
    color: var(--white);
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
    font-family: 'Noto Serif JP', serif;
}

.footer-address,
.footer-contact {
    margin-bottom: 2rem;
    line-height: 1.8;
}

.footer-contact {
    background-color: rgba(244, 162, 97, 0.15);
    padding: 1.5rem;
    border-left: 4px solid var(--secondary-color);
    border-radius: 4px;
    display: inline-block;
}

.footer-links h4 {
    color: var(--white);
    font-size: 1.2rem;
    margin-bottom: 1.5rem;
}

.footer-links ul li {
    margin-bottom: 0.8rem;
}

.footer-links a {
    color: #a0aec0;
}

.footer-links a:hover {
    color: var(--accent-color);
    padding-left: 5px;
}

.footer-bottom {
    background-color: rgba(0, 0, 0, 0.2);
    text-align: center;
    padding: 1.5rem 0;
    font-size: 0.9rem;
}

@media (max-width: 768px) {
    .footer-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
}

/* AI Chat Floating UI */
#ai-chat-container {
    position: fixed;
    bottom: 30px;
    right: 30px;
    z-index: 9999;
}

#ai-chat-btn {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background-color: var(--secondary-color);
    color: white;
    border: none;
    box-shadow: 0 4px 15px rgba(244, 162, 97, 0.4);
    cursor: pointer;
    position: relative;
    transition: transform 0.3s ease, background-color 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
}

#ai-chat-btn:hover {
    transform: scale(1.1);
    background-color: #e78c46;
}

.chat-tooltip {
    position: absolute;
    right: 75px;
    top: 50%;
    transform: translateY(-50%);
    background-color: var(--primary-light);
    color: var(--primary-dark);
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 0.85rem;
    white-space: nowrap;
    opacity: 0;
    transition: opacity 0.3s;
    pointer-events: none;
}

#ai-chat-btn:hover .chat-tooltip {
    opacity: 1;
}

#ai-chat-window {
    position: absolute;
    bottom: 80px;
    right: 0;
    width: 350px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 5px 25px rgba(0, 0, 0, 0.2);
    overflow: hidden;
    transform-origin: bottom right;
    transition: transform 0.3s ease, opacity 0.3s ease;
    display: flex;
    flex-direction: column;
}

.chat-hidden {
    transform: scale(0);
    opacity: 0;
    pointer-events: none;
}

.chat-header {
    background-color: var(--primary-color);
    color: white;
    padding: 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.chat-title {
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 8px;
}

.status-dot {
    width: 8px;
    height: 8px;
    background-color: #4CAF50;
    border-radius: 50%;
    display: inline-block;
}

#chat-close-btn {
    background: none;
    border: none;
    color: white;
    cursor: pointer;
    font-size: 1.2rem;
}

.chat-body {
    height: 300px;
    padding: 15px;
    overflow-y: auto;
    background-color: #f9f9f9;
}

.message {
    margin-bottom: 15px;
}

.msg-bubble {
    padding: 10px 15px;
    border-radius: 12px;
    font-size: 0.9rem;
    line-height: 1.5;
    max-width: 85%;
    display: inline-block;
}

.ai-message .msg-bubble {
    background-color: white;
    border: 1px solid #eee;
    color: #333;
    border-top-left-radius: 0;
}

.user-message {
    text-align: right;
}

.user-message .msg-bubble {
    background-color: var(--primary-color);
    color: white;
    border-top-right-radius: 0;
}

.chat-suggestions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 10px;
}

.suggestion-btn {
    background: white;
    border: 1px solid var(--secondary-color);
    color: var(--secondary-color);
    border-radius: 15px;
    padding: 5px 10px;
    font-size: 0.8rem;
    cursor: pointer;
    transition: background-color 0.2s;
}

.suggestion-btn:hover {
    background: var(--secondary-color);
    color: white;
}

.chat-footer {
    display: flex;
    padding: 10px;
    border-top: 1px solid #eee;
    background: white;
}

#chat-input {
    flex: 1;
    border: none;
    padding: 10px;
    outline: none;
    font-size: 0.95rem;
}

#chat-send-btn {
    background: none;
    border: none;
    color: var(--primary-color);
    font-size: 1.2rem;
    cursor: pointer;
    padding: 0 10px;
}

@media (max-width: 480px) {
    #ai-chat-window {
        width: 300px;
        right: -10px;
    }
}