/* =========================================
   Global Trade Solutions - Complete Stylesheet
   ========================================= */

/* 1. Variables */
:root {
    --color-primary: #003366;
    --color-secondary: #004d99;
    --color-accent: #007bff;
    --color-text: #333333;
    --color-white: #ffffff;
    --color-bg: #f4f6f8;
    --font-main: 'Noto Sans JP', sans-serif;
    --font-en: 'Montserrat', sans-serif;
    --radius: 3px;
    --shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

/* 2. Reset */
*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: var(--font-main);
    font-size: 16px;
    line-height: 1.8;
    color: var(--color-text);
    background: var(--color-bg);
}

a {
    text-decoration: none;
    color: inherit;
}

ul {
    list-style: none;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* 3. Container & Section */
.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.section {
    padding: 80px 0;
    background: white;
}

.bg-light {
    background: #f8f9fa !important;
}

/* 4. Buttons - WHITE TEXT ON BLUE */
.btn {
    display: inline-block;
    padding: 1rem 2.5rem;
    background: var(--color-secondary);
    color: #ffffff !important;
    /* WHITE TEXT */
    font-weight: 700;
    border-radius: var(--radius);
    border: 2px solid var(--color-secondary);
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn:hover {
    background: transparent;
    color: var(--color-secondary) !important;
}

.btn-outline {
    background: transparent;
    color: var(--color-secondary) !important;
    border: 2px solid var(--color-secondary);
}

.btn-outline:hover {
    background: var(--color-secondary);
    color: #ffffff !important;
}

/* White outline for dark backgrounds (e.g. header, CTA) */
.btn-outline-white {
    background: transparent;
    color: #ffffff !important;
    border: 2px solid #ffffff;
}

.btn-outline-white:hover {
    background: #ffffff;
    color: var(--color-primary) !important;
}

.btn-white {
    background: white;
    color: var(--color-primary) !important;
    border: 2px solid white;
}

.btn-white:hover {
    background: transparent;
    color: white !important;
}

/* 5. Header */
header {
    background: var(--color-primary);
    color: white;
    padding: 15px 0;
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
}

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

.logo {
    font-size: 1.5rem;
    font-weight: 700;
    font-family: var(--font-en);
}

.logo span {
    color: var(--color-accent);
}

.nav-menu {
    display: flex;
    gap: 30px;
    align-items: center;
}

.nav-link {
    color: rgba(255, 255, 255, 0.9);
    font-size: 0.95rem;
}

.nav-link:hover,
.nav-link.active {
    color: white;
}

.menu-toggle {
    display: none;
    font-size: 1.5rem;
    color: white;
    cursor: pointer;
    margin-left: auto;
    /* Push to right edge */
}

/* 6. Hero Slider - WHITE TEXT */
.hero-slider {
    position: relative;
    height: 100vh;
    overflow: hidden;
}

.slider-container {
    height: 100%;
    width: 100%;
    position: relative;
}

.slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    opacity: 0;
    transition: opacity 1.5s ease-in-out;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
}

.slide.active {
    opacity: 1;
    z-index: 2;
}

.slide .hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    /* Dark overlay for text visibility */
    z-index: 1;
}

.slide .hero-content {
    position: relative;
    z-index: 2;
    padding: 0 20px;
}

/* HERO TEXT - FORCE WHITE */
.hero-title {
    font-family: var(--font-main);
    font-weight: 700;
    font-size: 3.5rem;
    line-height: 1.2;
    margin-bottom: 20px;
    text-shadow: 0 4px 15px rgba(0, 0, 0, 0.8);
    letter-spacing: 0.05em;
    color: #ffffff !important;
    /* FORCE WHITE */
}

.hero-subtitle {
    font-family: var(--font-en);
    font-size: 1.2rem;
    font-weight: 400;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.8);
    color: #ffffff !important;
    /* FORCE WHITE */
}

/* Scroll Indicator */
.scroll-indicator {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 10;
    color: white;
    font-family: var(--font-en);
    font-size: 0.8rem;
    letter-spacing: 0.2em;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
}

.scroll-indicator .line {
    width: 1px;
    height: 60px;
    background: white;
    animation: scrollDown 2s infinite;
}

@keyframes scrollDown {
    0% {
        transform: scaleY(0);
        transform-origin: top;
    }

    50% {
        transform: scaleY(1);
        transform-origin: top;
    }

    51% {
        transform: scaleY(1);
        transform-origin: bottom;
    }

    100% {
        transform: scaleY(0);
        transform-origin: bottom;
    }
}

/* 7. Layout - Side by Side */
.row {
    display: flex;
    flex-wrap: wrap;
    margin: 0 -15px;
}

.col-md-6 {
    flex: 0 0 100%;
    max-width: 100%;
    padding: 0 15px;
    box-sizing: border-box;
}

/* Spacing handled via padding on columns */

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

/* Flex Direction - Default is Column (Mobile First) */
.flex-md-row {
    flex-direction: column;
}

.flex-md-row-reverse {
    flex-direction: column;
}

/* Desktop: Side by Side Layout */
@media (min-width: 769px) {
    .flex-md-row {
        flex-direction: row !important;
    }

    .flex-md-row-reverse {
        flex-direction: row-reverse !important;
    }

    .col-md-6 {
        flex: 0 0 50%;
        max-width: 50%;
        padding: 0 30px;
    }

    .gap-lg .col-md-6 {
        padding: 0 30px;
    }
}

/* Section Typography */
.section-subtitle {
    color: var(--color-secondary);
    font-weight: 700;
    display: block;
    margin-bottom: 10px;
    font-family: var(--font-en);
    letter-spacing: 2px;
    text-transform: uppercase;
    font-size: 0.9rem;
}

.section-title {
    font-size: 2.2rem;
    margin-bottom: 0.5rem;
    font-weight: 700;
    color: var(--color-primary);
}

.section-lead {
    font-size: 1.4rem;
    margin-bottom: 1.5rem;
    font-weight: 500;
    color: var(--color-primary);
}

.section-text {
    line-height: 1.8;
    color: #555;
    margin-bottom: 1.5rem;
}

/* Decorators */
.image-wrapper {
    position: relative;
}

.decorator-box {
    position: absolute;
    top: -15px;
    right: -15px;
    width: 100px;
    height: 100px;
    background: var(--color-secondary);
    z-index: -1;
    border-radius: var(--radius);
}

.decorator-primary {
    background: var(--color-primary);
    top: auto;
    bottom: -15px;
    right: auto;
    left: -15px;
}

.decorator-accent {
    background: var(--color-accent);
    top: -15px;
    left: -15px;
    right: auto;
}

/* Utilities */
.rounded-img {
    border-radius: var(--radius);
}

.shadow-lg {
    box-shadow: var(--shadow);
}

.w-100 {
    width: 100%;
}

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

.text-white {
    color: white !important;
}

.text-white-op80 {
    color: rgba(255, 255, 255, 0.8) !important;
}

.mb-2 {
    margin-bottom: 1rem;
}

.mb-3 {
    margin-bottom: 1.5rem;
}

.mb-4 {
    margin-bottom: 2rem;
}

.mb-5 {
    margin-bottom: 3rem;
}

.mt-4 {
    margin-top: 1.5rem;
}

/* 8. Product Cards */
.card-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
}

.card {
    background: white;
    border-radius: var(--radius);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    overflow: hidden;
    transition: transform 0.3s ease;
}

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

.product-card {
    display: block;
    text-decoration: none;
    color: inherit;
}

.card-img-placeholder {
    height: 180px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1.2rem;
    color: #555;
}

.card-content {
    padding: 20px;
}

.card-content h3 {
    margin-bottom: 10px;
    font-size: 1.1rem;
    color: var(--color-primary);
}

.card-content p {
    font-size: 0.9rem;
    color: #666;
}

/* 9. CTA Section - Modern Compact Design */
.cta-section {
    padding: 40px 0;
    background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-secondary) 100%);
    color: white;
}

.cta-section .container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
}

@media (min-width: 769px) {
    .cta-section .container {
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
        gap: 40px;
    }
}

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

@media (min-width: 769px) {
    .cta-content {
        text-align: left;
        flex: 1;
    }
}

.cta-title {
    font-size: 1.5rem;
    margin-bottom: 8px;
    font-weight: 700;
    color: white;
}

.cta-text {
    font-size: 0.95rem;
    margin: 0;
    color: rgba(255, 255, 255, 0.85);
    line-height: 1.6;
}

.cta-actions {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
    flex-shrink: 0;
}

@media (min-width: 769px) {
    .cta-actions {
        flex-direction: row;
        gap: 30px;
    }
}

.cta-contact-info {
    display: flex;
    flex-direction: column;
    align-items: center;
    color: rgba(255, 255, 255, 0.9);
    font-size: 0.85rem;
}

@media (min-width: 769px) {
    .cta-contact-info {
        align-items: flex-start;
        border-left: 1px solid rgba(255, 255, 255, 0.3);
        padding-left: 25px;
    }
}

.cta-contact-info p {
    margin: 0 0 3px 0;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    opacity: 0.8;
}

.cta-phone {
    font-size: 1.3rem;
    font-family: var(--font-en);
    font-weight: 700;
    color: white;
    text-decoration: none;
}

.cta-phone:hover {
    text-decoration: underline;
}

.cta-hours {
    font-size: 0.75rem;
    opacity: 0.7;
}

/* 10. Page Header */
.page-header {
    background-color: var(--color-primary);
    background-size: cover;
    background-position: center;
    color: white;
    padding: 100px 0;
    text-align: center;
    margin-top: 60px;
    position: relative;
    overflow: hidden;
}

.page-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 51, 102, 0.7);
    z-index: 1;
}

.page-header .container {
    position: relative;
    z-index: 2;
}

.page-title {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 10px;
    color: white !important;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.page-header p {
    font-family: var(--font-en);
    letter-spacing: 0.1em;
    color: rgba(255, 255, 255, 0.9);
}

/* 11. Footer */
footer {
    background: #001a33;
    color: white;
    padding: 60px 0 20px;
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 40px;
    margin-bottom: 40px;
}

.footer-logo {
    font-size: 1.8rem;
    font-weight: 700;
    font-family: var(--font-en);
    display: block;
    margin-bottom: 15px;
}

.footer-nav ul {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

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

.footer-nav a:hover {
    color: white;
}

.copyright {
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.6);
}

/* 12. Forms - Reduced Spacing */
.form-group {
    margin-bottom: 15px;
}

.form-label {
    display: block;
    margin-bottom: 5px;
    font-weight: 700;
    font-size: 0.9rem;
}

.form-control {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #ddd;
    border-radius: var(--radius);
    font-size: 1rem;
    font-family: var(--font-main);
}

.form-control:focus {
    outline: none;
    border-color: var(--color-primary);
}

/* 13. Clean CSS Classes (Replacing Inline Styles) */
.brand-sub {
    font-size: 0.9rem;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.7);
}

.news-ticker {
    margin-top: -30px;
    position: relative;
    z-index: 10;
    background: white;
    padding: 20px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
    border-radius: var(--radius);
}

/* 14. Responsive - Mobile Only */
@media (max-width: 768px) {
    .col-md-6 {
        flex: 0 0 100%;
        max-width: 100%;
    }

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

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

    .menu-toggle {
        display: block;
        z-index: 1001;
    }

    .nav-menu {
        position: fixed;
        top: 0;
        right: -100%;
        flex-direction: column;
        background: var(--color-primary);
        width: 80%;
        max-width: 300px;
        height: 100vh;
        text-align: center;
        padding-top: 80px;
        transition: 0.3s ease-in-out;
        box-shadow: -2px 0 10px rgba(0, 0, 0, 0.2);
        z-index: 1000;
    }

    .nav-menu.active {
        right: 0;
    }

    .hero-title {
        font-size: 2rem;
    }

    .gap-lg {
        gap: 30px;
    }
}

/* 15. New Utilities for Refactoring */
.mobile-only {
    display: none;
}

@media (max-width: 768px) {
    .mobile-only {
        display: block;
    }
}

.news-ticker-container {
    margin-top: -30px;
    position: relative;
    z-index: 10;
    background: white;
    padding: 20px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
    border-radius: var(--radius);
}

.news-ticker-inner {
    display: flex;
    align-items: center;
    gap: 20px;
}

.news-label {
    background: var(--color-primary);
    color: white;
    padding: 4px 10px;
    font-size: 0.8rem;
    border-radius: 2px;
}

.news-date {
    color: #888;
    margin-right: 10px;
}

.news-list {
    font-size: 0.9rem;
    margin: 0;
    padding: 0;
}

/* News Ticker Scroll Animation */
.news-ticker-scroll {
    flex: 1;
    overflow: hidden;
    position: relative;
    height: 1.5em;
}

.news-ticker-items {
    list-style: none;
    margin: 0;
    padding: 0;
}

.news-ticker-item {
    display: none;
    font-size: 0.9rem;
    animation: fadeInUp 0.4s ease;
}

.news-ticker-item.active {
    display: block;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

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

.alert {
    padding: 15px;
    border-radius: 4px;
    margin-bottom: 20px;
    border: 1px solid transparent;
}

.alert-success {
    background: #d4edda;
    color: #155724;
    border-color: #c3e6cb;
}

.alert-danger {
    background: #f8d7da;
    color: #721c24;
    border-color: #f5c6cb;
}

.text-danger {
    color: #dc3545 !important;
}

.validation-error {
    color: #dc3545;
    font-size: 0.85rem;
    display: none;
    margin-top: 5px;
}

/* Contact Flow Steps */
.contact-steps {
    display: flex;
    justify-content: center;
    margin-bottom: 40px;
    gap: 10px;
}

.step-item {
    background: #e9ecef;
    color: #6c757d;
    padding: 10px 20px;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 700;
    position: relative;
}

.step-item.active {
    background: var(--color-primary);
    color: white;
}

.privacy-box {
    height: 150px;
    overflow-y: scroll;
    border: 1px solid #ddd;
    padding: 15px;
    margin-bottom: 15px;
    font-size: 0.9rem;
    background: #f9f9f9;
}

.confirm-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 30px;
}

.confirm-table th,
.confirm-table td {
    padding: 15px;
    border-bottom: 1px solid #eee;
    text-align: left;
}

.confirm-table th {
    width: 30%;
    background: #f8f9fa;
    font-weight: 700;
    color: var(--color-primary);
}

/* Form Layout Improvements */
.form-section {
    background: #fff;
    padding: 40px;
    border-radius: 8px;
    box-shadow: 0 2px 15px rgba(0, 0, 0, 0.08);
    margin-bottom: 30px;
}

.form-section-title {
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--color-primary);
    color: var(--color-primary);
}

.form-row {
    display: flex;
    gap: 20px;
    margin-bottom: 20px;
}

.form-row>.form-group {
    flex: 1;
}

@media (max-width: 768px) {
    .form-row {
        flex-direction: column;
        gap: 0;
    }

    .form-section {
        padding: 25px 20px;
    }
}

/* News Page Styles */
.news-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.news-list-item {
    border-bottom: 1px solid #eee;
    padding: 20px 0;
}

.news-list-item:last-child {
    border-bottom: none;
}

.news-list-item a {
    display: flex;
    align-items: flex-start;
    gap: 20px;
    color: inherit;
    text-decoration: none;
    transition: opacity 0.2s;
}

.news-list-item a:hover {
    opacity: 0.7;
}

.news-list-date {
    color: #888;
    font-size: 0.9rem;
    white-space: nowrap;
}

.news-list-title {
    font-weight: 500;
}

.news-detail-header {
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 1px solid #eee;
}

.news-detail-date {
    color: #888;
    font-size: 0.9rem;
    margin-bottom: 10px;
}

.news-detail-title {
    font-size: 1.8rem;
    font-weight: 700;
    line-height: 1.4;
}

.news-detail-content {
    line-height: 2;
    font-size: 1rem;
}

.news-detail-content p {
    margin-bottom: 1.5rem;
}

.back-link {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    color: var(--color-primary);
    margin-top: 40px;
}

/* Recruit Page */
.page-header-recruit {
    background-image: url('../images/recruit_jp.png');
}

.job-box {
    max-width: 800px;
    margin: 0 auto;
    background: white;
    padding: 40px;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.job-title {
    border-bottom: 2px solid var(--color-secondary);
    padding-bottom: 10px;
    display: inline-block;
}

.job-dl {
    display: grid;
    grid-template-columns: 150px 1fr;
    gap: 20px;
    margin-bottom: 20px;
}

.job-dt {
    font-weight: bold;
}

.spacer-40 {
    height: 40px;
}

@media (max-width: 768px) {
    .job-dl {
        grid-template-columns: 1fr;
        gap: 5px;
    }
}

/* 16. Additional Utilities for Clean HTML */
.nav-btn-contact {
    padding: 0.5rem 1.5rem;
    border-width: 1px;
}

.content-narrow {
    max-width: 800px;
    margin: 0 auto;
}

.line-height-loose {
    line-height: 2;
}

.bg-alt {
    background-color: var(--color-background-alt);
}

.flex-center-gap {
    display: flex;
    gap: 20px;
    justify-content: center;
}

.btn-back {
    border-color: #ccc;
    color: #555 !important;
}

.alert-success h3 {
    margin-top: 0;
    font-size: 1.5rem;
}

.btn-lg {
    min-width: 250px;
    padding: 15px 30px;
    font-size: 1.1rem;
}

.map-placeholder {
    background: #ddd;
    height: 300px;
    max-width: 800px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #666;
    border-radius: 8px;
}

.footer-address {
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.7);
    margin-bottom: 20px;
}

.privacy-link {
    text-decoration: underline;
    color: var(--color-primary);
}

.entry-btn-wrapper {
    margin-top: 30px;
}

.error-list {
    margin: 0;
    padding-left: 20px;
}

.privacy-label {
    cursor: pointer;
}

/* Radio & Checkbox Groups */
.radio-group,
.checkbox-group {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
}

.radio-label,
.checkbox-label {
    display: flex;
    align-items: center;
    gap: 5px;
    cursor: pointer;
    padding: 8px 15px;
    background: #f8f9fa;
    border-radius: 4px;
    border: 1px solid #ddd;
    transition: all 0.2s;
}

.radio-label:hover,
.checkbox-label:hover {
    background: #e9ecef;
    border-color: var(--color-primary);
}

.radio-label input,
.checkbox-label input {
    margin: 0;
}