:root {
    --color-primary: #1a4d2e;
    /* Deep Forest Green */
    --color-secondary: #c5a059;
    /* Earthy Gold */
    --color-accent: #00d4ff;
    /* Tech/Mobility Blue */
    --color-bg: #f8fafc;
    --color-text: #1e293b;
    --color-text-light: #64748b;
    --color-white: #ffffff;

    --font-jp: 'Noto Sans JP', sans-serif;
    --font-en: 'Outfit', sans-serif;

    --spacing-xs: 4px;
    --spacing-sm: 8px;
    --spacing-md: 16px;
    --spacing-lg: 32px;
    --spacing-xl: 64px;

    --radius-md: 12px;
    --radius-lg: 24px;

    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.1);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
}

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

body {
    font-family: var(--font-jp);
    background-color: var(--color-bg);
    color: var(--color-text);
    line-height: 1.6;
    overflow-x: hidden;
}

h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: var(--font-en);
    font-weight: 700;
    line-height: 1.2;
}

a {
    text-decoration: none;
    color: inherit;
    transition: all 0.3s ease;
}

/* Utilities */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 var(--spacing-md);
}

.section-padding {
    padding: var(--spacing-xl) 0;
}

.text-center {
    text-align: center;
}

.text-primary {
    color: var(--color-primary);
}

.text-secondary {
    color: var(--color-secondary);
}

.flex-center {
    display: flex;
    justify-content: center;
    align-items: center;
}

/* Utilities */
.sp-br {
    display: none;
}

@media (max-width: 768px) {
    .sp-br {
        display: inline;
    }
}

/* Visual Enhancements */
.visual-block {
    margin: 40px 0;
    text-align: center;
}

.visual-img {
    width: 100%;
    max-width: 800px;
    height: auto;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    object-fit: cover;
}

.visual-video-wrapper {
    width: 100%;
    max-width: 350px;
    height: 530px;
    /* Further reduced to strictly hide footer */
    margin: 0 auto;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    overflow: hidden;
    background: #000;
    position: relative;
}

.visual-video-wrapper iframe {
    width: 100%;
    height: 100%;
    /* Force tall height to push footer away */
    border: none;
    display: block;
    margin-top: -68px;
    /* Hide header */
    transform: translateY(-2px);
    /* Fine tuning */
}

.gallery-section {
    background: #fff;
    overflow: hidden;
}

.gallery-slider-wrapper {
    overflow: hidden;
    width: 100%;
    padding: 40px 0;
    /* Add vertical padding regarding spacing */
    mask-image: linear-gradient(to right, transparent, black 10%, black 90%, transparent);
    -webkit-mask-image: linear-gradient(to right, transparent, black 10%, black 90%, transparent);
}

.gallery-track {
    display: flex;
    gap: 24px;
    width: max-content;
    animation: scroll 40s linear infinite;
}

.gallery-item {
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-md);
    height: 300px;
    /* Increased height for impact */
    flex-shrink: 0;
    width: 400px;
    /* Fixed width for consistent slider */
    position: relative;
    transition: transform 0.3s ease;
}

.gallery-track:hover .gallery-track {
    animation-play-state: paused;
}

@keyframes scroll {
    0% {
        transform: translateX(0);
    }

    100% {
        transform: translateX(calc(-400px * 3 - 24px * 3));
        /* Scroll logic: width + gap * number of unique items */
    }
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.gallery-item:hover img {
    transform: scale(1.05);
}

.usage-hero-img {
    width: 100%;
    height: 300px;
    object-fit: cover;
    border-radius: var(--radius-lg);
    margin-bottom: 40px;
    box-shadow: var(--shadow-md);
}

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

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.animate-up {
    animation: fadeInUp 0.8s ease-out forwards;
    opacity: 0;
}

.delay-1 {
    animation-delay: 0.1s;
}

.delay-2 {
    animation-delay: 0.2s;
}

.delay-3 {
    animation-delay: 0.3s;
}

/* Navbar */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    padding: var(--spacing-md) 0;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
}

.navbar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--color-primary);
    display: flex;
    align-items: center;
    gap: 8px;
}

.nav-links {
    display: flex;
    gap: var(--spacing-lg);
}

.nav-links a {
    font-weight: 500;
    color: var(--color-text);
    position: relative;
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--color-secondary);
    transition: width 0.3s ease;
}

.nav-links a:hover::after {
    width: 100%;
}

/* Language Switcher */
.lang-switcher {
    display: flex;
    align-items: center;
    gap: 8px;
    background: rgba(0, 0, 0, 0.04);
    padding: 4px 12px;
    border-radius: 20px;
    margin-left: 20px;
    font-size: 0.85rem;
    font-weight: 700;
}

.lang-btn {
    background: none;
    border: none;
    cursor: pointer;
    color: var(--color-text-light);
    padding: 2px 4px;
    transition: color 0.2s, background 0.2s;
    border-radius: 4px;
    font-family: inherit;
    font-weight: 700;
}

.lang-btn.active {
    color: var(--color-primary);
}

.lang-btn:hover:not(.active) {
    color: var(--color-text);
}

.lang-divider {
    color: #cbd5e1;
    font-weight: 300;
}

@media (max-width: 768px) {
    .lang-switcher {
        margin-left: auto;
        margin-right: 15px;
    }
}

/* Hamburger Menu */
.menu-toggle {
    display: none;
    cursor: pointer;
    z-index: 1001;
    padding: 10px;
    margin-right: -10px;
    /* Offset padding for alignment */
}

.menu-toggle .bar {
    display: block;
    width: 25px;
    height: 3px;
    margin: 5px auto;
    transition: all 0.3s ease-in-out;
    background-color: var(--color-primary);
    border-radius: 3px;
}

/* Hero Section */
.hero {
    min-height: 100vh;
    background: linear-gradient(rgba(0, 0, 0, 0.3), rgba(0, 0, 0, 0.3)), url('assets/hero-bg.jpg');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: white;
    padding-top: 100px;
    padding-bottom: 40px;
}

@media (max-width: 768px) {
    .hero {
        padding-top: 120px;
        padding-bottom: 60px;
        background-attachment: scroll;
        /* Better performance on mobile */
        background-position: center center;
    }
}

.hero-content {
    z-index: 2;
    padding: var(--spacing-md);
}

.hero h1 {
    font-size: clamp(2.5rem, 5vw, 4.5rem);
    margin-bottom: var(--spacing-md);
    text-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
}

.hero p {
    font-size: 1.25rem;
    margin-bottom: 40px;
    opacity: 0.9;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

.hero-btns {
    display: flex;
    gap: 16px;
    justify-content: center;
    flex-wrap: wrap;
}

.btn {
    display: inline-block;
    padding: 12px 32px;
    border-radius: 50px;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.btn-primary {
    background: var(--color-secondary);
    color: white;
    box-shadow: 0 4px 15px rgba(197, 160, 89, 0.4);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(197, 160, 89, 0.6);
}

/* Sections */
.section-title {
    font-size: 2.5rem;
    margin-bottom: var(--spacing-xl);
    text-align: center;
    position: relative;
    padding-bottom: 16px;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 3px;
    background: var(--color-secondary);
}

/* Features Grid */
.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: var(--spacing-lg);
}

.feature-card {
    background: white;
    padding: var(--spacing-lg);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: 1px solid rgba(0, 0, 0, 0.05);
}

.feature-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.feature-icon {
    font-size: 2.5rem;
    color: var(--color-primary);
    margin-bottom: var(--spacing-md);
}

/* Station List */
.station-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: var(--spacing-md);
}

/* Hide location sort buttons on desktop */
@media (min-width: 769px) {

    #btn-nearest-station,
    #btn-nearest-manned {
        display: none !important;
    }
}

.station-item {
    background: white;
    padding: var(--spacing-md);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    gap: 12px;

    box-shadow: var(--shadow-sm);
}

/* Station List */
.station-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: var(--spacing-md);
}

.station-item {
    background: white;
    padding: var(--spacing-md);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    gap: 12px;
    box-shadow: var(--shadow-sm);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.station-item:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

/* Station Grid & Cards (for Detail Modal and Detailed Pages) */
.station-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: var(--spacing-lg);
}

.station-card {
    background: white;
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    flex-direction: column;
    border: 1px solid rgba(0, 0, 0, 0.05);
    height: 100%;
}

.station-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-md);
}

.station-card-image {
    width: 100%;
    height: 180px;
    background: linear-gradient(45deg, var(--color-primary), var(--color-secondary));
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 2.5rem;
}

.station-card-info {
    padding: var(--spacing-md);
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.station-card-name {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--color-primary);
    margin-bottom: 8px;
}

.station-card-address {
    font-size: 0.85rem;
    color: var(--color-text-light);
    margin-bottom: 16px;
    display: flex;
    align-items: flex-start;
    gap: 8px;
}

.station-card-actions {
    margin-top: auto;
}

.station-card-btn {
    display: block;
    width: 100%;
    padding: 10px;
    text-align: center;
    background: var(--color-bg);
    color: var(--color-primary);
    border: 1px solid rgba(26, 77, 46, 0.1);
    border-radius: var(--radius-md);
    font-size: 0.85rem;
    font-weight: 600;
    transition: all 0.2s ease;
    text-decoration: none;
}

.station-card-btn:hover {
    background: var(--color-primary);
    color: white;
}

/* Mobility Cards (TukTuk, Bus) */
.mobility-card {
    display: flex;
    flex-direction: column;
    background: white;
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-md);
    margin-bottom: var(--spacing-lg);
}

@media (min-width: 768px) {
    .mobility-card {
        flex-direction: row;
        align-items: center;
    }
}

.mobility-img {
    flex: 1;
    height: 300px;
    background-size: cover;
    background-position: center;
}

.mobility-content {
    flex: 1;
    padding: var(--spacing-lg);
}

/* Footer */
footer {
    background: var(--color-primary);
    color: white;
    padding: var(--spacing-xl) 0;
    margin-top: var(--spacing-xl);
}

footer a {
    color: rgba(255, 255, 255, 0.8);
}

footer a:hover {
    color: white;
}

/* Responsive */
@media (max-width: 768px) {
    .nav-links {
        position: fixed;
        left: -100%;
        top: 70px;
        flex-direction: column;
        background-color: rgba(255, 255, 255, 0.98);
        width: 100%;
        height: calc(100vh - 70px);
        text-align: center;
        transition: 0.3s;
        box-shadow: 0 10px 27px rgba(0, 0, 0, 0.05);
        z-index: 1000;
        padding: var(--spacing-xl) 0;
        gap: var(--spacing-lg);
        display: flex;
        /* Show as flex when active */
    }

    .nav-links.active {
        left: 0;
    }

    .nav-links a {
        font-size: 1.2rem;
    }

    .menu-toggle {
        display: block;
    }

    .menu-toggle.is-active .bar:nth-child(2) {
        opacity: 0;
    }

    .menu-toggle.is-active .bar:nth-child(1) {
        transform: translateY(8px) rotate(45deg);
    }

    .menu-toggle.is-active .bar:nth-child(3) {
        transform: translateY(-8px) rotate(-45deg);
    }

    /* Simplified mobile nav for now */
    .hero h1 {
        font-size: 2.5rem;
        line-height: 1.6;
        margin-bottom: 40px;
    }

    .modal-grid {
        grid-template-columns: 1fr;
    }

    .modal-content {
        padding: 25px;
    }

    .modal-title-area h2 {
        font-size: 1.5rem;
    }

    .modal-hero {
        height: 180px;
    }

    .hero-btns {
        flex-direction: column;
        align-items: center;
        gap: 12px;
    }

    .hero-btns .btn {
        width: 100%;
        max-width: 300px;
    }

    /* Modal Mobile Adjustments */
    .modal-container {
        max-height: 95vh;
        border-radius: var(--radius-md);
    }

    .modal-hero {
        height: 180px;
    }

    .modal-content {
        padding: 24px 20px;
    }

    .modal-title-area {
        margin-bottom: 20px;
    }

    .modal-title-area h2 {
        font-size: 1.5rem;
    }

    .modal-description {
        font-size: 0.95rem;
        margin-bottom: 24px;
        line-height: 1.7;
    }

    .modal-grid {
        grid-template-columns: 1fr;
        gap: 30px;
    }

    .info-table th,
    .info-table td {
        display: block;
        width: 100%;
        padding: 10px 12px;
    }

    .info-table th {
        background: transparent;
        color: var(--color-primary);
        font-size: 0.8rem;
        padding-bottom: 2px;
        border-bottom: none;
    }

    .info-table td {
        font-size: 1rem;
        padding-top: 2px;
        margin-bottom: 4px;
    }

    .modal-map {
        height: 200px;
    }

    .info-table tr:last-child {
        border-bottom: none;
    }
}

/* Map iframe */
#map {
    width: 100%;
    height: 600px;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    margin-top: var(--spacing-lg);
}

.mobile-ride-container {
    display: none;
}

@media (max-width: 768px) {
    #map {
        height: 550px;
        border-radius: var(--radius-md);
    }

    .mobile-ride-container {
        display: flex;
        justify-content: center;
        margin-top: var(--spacing-md);
    }

    .btn-mobile-ride {
        width: 100%;
        max-width: 300px;
        padding: 16px 32px;
        font-size: 1.1rem;
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 10px;
        background: var(--color-primary);
        color: white;
        border: none;
        box-shadow: 0 4px 15px rgba(26, 77, 46, 0.3);
    }
}

/* Modal Styles */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(5px);
    z-index: 2000;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.modal-overlay.active {
    display: flex;
}

.modal-container {
    background: white;
    width: 100%;
    max-width: 900px;
    max-height: 90vh;
    border-radius: var(--radius-lg);
    overflow-y: auto;
    position: relative;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.2);
    animation: modalFadeIn 0.3s ease-out;
}

@keyframes modalFadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.modal-close {
    position: absolute;
    top: 20px;
    right: 20px;
    width: 40px;
    height: 40px;
    background: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 10;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    border: none;
    font-size: 1.2rem;
    color: var(--color-text);
    transition: all 0.2s;
}

.modal-close:hover {
    background: var(--color-bg);
    transform: scale(1.1);
}

.modal-hero {
    width: 100%;
    height: 250px;
    background: #e2e8f0;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #94a3b8;
    font-weight: 700;
    font-size: 1.5rem;
    position: relative;
}

.modal-hero img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.modal-content {
    padding: 40px;
}

.modal-title-area {
    margin-bottom: 30px;
}

.modal-title-area h2 {
    font-size: 2rem;
    color: var(--color-primary);
    margin-bottom: 8px;
}

.modal-title-area .location-sub {
    font-size: 0.95rem;
    color: var(--color-text-light);
}

.modal-description {
    font-size: 1rem;
    line-height: 1.8;
    color: var(--color-text);
    margin-bottom: 30px;
}

.modal-grid {
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    gap: 40px;
}

.info-section h3,
.access-section h3 {
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 15px;
    padding-left: 12px;
    border-left: 4px solid #00a859;
    /* bLink Green */
    color: var(--color-text);
}

.info-table {
    width: 100%;
    border-collapse: collapse;
}

.info-table tr {
    border-bottom: 1px solid #f1f5f9;
}

.info-table th {
    text-align: left;
    padding: 12px 15px;
    font-weight: 500;
    color: var(--color-text-light);
    width: 120px;
    background: #f8fafc;
}

.info-table td {
    padding: 12px 15px;
    color: var(--color-text);
    font-weight: 500;
}

.modal-map {
    width: 100%;
    height: 250px;
    background: #f1f5f9;
    border-radius: var(--radius-md);
    overflow: hidden;
    margin-bottom: 15px;
}

.modal-address {
    font-size: 0.85rem;
    color: var(--color-text-light);
    line-height: 1.5;
}

.modal-footer {
    margin-top: 40px;
}

.btn-reserve {
    display: block;
    width: 100%;
    padding: 18px;
    background: #00a859;
    /* bLink Green */
    color: white;
    text-align: center;
    border-radius: var(--radius-md);
    font-weight: 700;
    font-size: 1.1rem;
    text-decoration: none;
    transition: background 0.2s;
}

.btn-reserve:hover {
    background: #008f4c;
}


/* Storytelling & Problem/Solution Sections */
.story-section {
    background: white;
    overflow: hidden;
}

.problem-solution-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    align-items: stretch;
    margin-top: 48px;
}

.problem-area {
    background: #f8fafc;
    padding: 40px;
    border-radius: var(--radius-lg);
    border-left: 5px solid #cbd5e1;
}

.solution-area {
    background: linear-gradient(135deg, rgba(26, 77, 46, 0.05), rgba(26, 77, 46, 0.1));
    padding: 40px;
    border-radius: var(--radius-lg);
    border-left: 5px solid var(--color-primary);
    position: relative;
}

.solution-area::after {
    content: "✓ Solution";
    position: absolute;
    top: -15px;
    right: 20px;
    background: var(--color-primary);
    color: white;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 700;
}

.problem-item,
.solution-item {
    display: flex;
    gap: 15px;
    margin-bottom: 24px;
}

.problem-item i {
    color: #94a3b8;
    margin-top: 5px;
}

.solution-item i {
    color: var(--color-primary);
    margin-top: 5px;
}

.problem-item p,
.solution-item p {
    margin: 0;
    font-size: 0.95rem;
    line-height: 1.6;
}

.problem-item strong {
    color: var(--color-text);
    display: block;
    margin-bottom: 4px;
}

.solution-item strong {
    color: var(--color-primary);
    display: block;
    margin-bottom: 4px;
}

/* Seamless Map Enhancement */
.map-story-content {
    display: grid;
    grid-template-columns: 1fr 1.5fr;
    gap: 40px;
    align-items: center;
    margin-top: 48px;
}

@media (max-width: 992px) {

    .problem-solution-grid,
    .map-story-content {
        grid-template-columns: 1fr;
    }
}

/* Center Manned Stations */
#manned-stations {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: var(--spacing-md);
}

#manned-stations .station-item {
    flex: 0 1 300px;
    width: 100%;
}