/* ========================
    Intro Animation & Hero
    ======================== */
.intro-animation {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    z-index: 10;
    opacity: 1;
    visibility: visible;
    transition: opacity 0.8s ease-out, visibility 0.8s;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    text-align: center;
    pointer-events: auto;
    background: #000000;
}

.intro-animation:not(.active) {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.intro-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 1.2s ease-in-out;
    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: column;
    text-align: center;
}

.intro-slide.active {
    opacity: 1;
}

.slide-background {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    transform: scale(1.1);
    transition: transform 2s ease-in-out;
    filter: brightness(0.5) contrast(1.2);
    background-blend-mode: hard-light;
}

.intro-slide.active .slide-background {
    transform: scale(1);
}

#slide-1 .slide-background {
    background-image: url('images/kyuhonsya.webp');
}

#slide-2 .slide-background {
    background-image: url('images/jyukuren.webp');
}

#slide-3 .slide-background {
    background-image: url('images/ippo.webp');
}

.intro-slide .slide-text {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
    width: 90%;
    max-width: 800px;
    z-index: 2;
    color: var(--text-white);
    opacity: 0;
    transition: opacity 0.8s ease-in-out 0.4s;
}

.intro-slide.active .slide-text {
    opacity: 1;
    transform: translate(-50%, -50%);
}

.slide-text h2 {
    font-size: 3.5rem;
    font-family: var(--font-heading);
    font-weight: 800;
    letter-spacing: 0.2em;
    color: var(--text-white);
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
    line-height: 1.2;
}

.slide-text p {
    font-size: 2rem;
    margin-top: 1.5rem;
    font-weight: 400;
    color: var(--accent-cyan);
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
    line-height: 1.6;
}

.skip-button {
    position: absolute;
    top: 20px;
    right: 20px;
    padding: 10px 20px;
    background: rgba(0, 0, 0, 0.7);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 5px;
    font-size: 0.9rem;
    font-family: var(--font-mono);
    cursor: pointer;
    z-index: 20;
    transition: all 0.3s ease;
    backdrop-filter: var(--glass-blur);
    font-weight: 700;
    color: var(--text-white);
    letter-spacing: 0.1em;
}

.skip-button:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: translateY(-2px);
}

.slide-final-content,
.hero-content {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 95%;
    max-width: 1000px;
    z-index: 2;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
}

.slide-final-content {
    opacity: 0;
    transition: opacity 0.8s ease-in-out 0.4s;
}

.intro-slide.active .slide-final-content {
    opacity: 1;
    transform: translate(-50%, -50%);
}

.hero-content {
    animation: heroEntrance 1.5s ease-out forwards;
}

@keyframes heroEntrance {
    from {
        opacity: 0;
        transform: translate(-50%, calc(-50% + 30px));
    }

    to {
        opacity: 1;
        transform: translate(-50%, -50%);
    }
}

.final-logo {
    width: 180px;
    margin: 0 auto 2rem;
    filter: drop-shadow(0 4px 10px rgba(0, 0, 0, 0.5));
}

.slide-final-content .h1-style,
.hero-content h1 {
    font-size: clamp(2rem, 4vw, 3.2rem);
    white-space: nowrap;
    font-family: var(--font-heading);
    font-weight: 800;
    margin-bottom: 1rem;
    letter-spacing: 0.15em;
    color: var(--text-white);
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
    line-height: 1.2;
}

.slide-final-content p,
.hero-content p {
    font-size: 1.5rem;
    font-weight: 400;
    color: var(--accent-cyan);
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
    line-height: 1.6;
    margin-bottom: 3rem;
}

.hero {
    height: 100vh;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    background: url('images/ippo.webp') center/cover no-repeat;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(11, 29, 58, 0.8) 0%, rgba(11, 29, 58, 0.5) 100%);
}

/* ========================
    Top Page Sections
    ======================== */
.premium-cards {
    max-width: 1400px;
    margin: 0 auto 8rem;
    display: flex;
    flex-wrap: wrap;
    gap: 3rem;
    justify-content: center;
    padding: 0 20px;
}

.premium-card {
    flex: 1 1 350px;
    max-width: 420px;
    background: var(--glass-panel);
    backdrop-filter: var(--glass-blur);
    border: var(--glass-border-cyan);
    border-radius: 12px;
    overflow: hidden;
    transition: all 0.4s ease;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.3);
    display: flex;
    flex-direction: column;
}

.premium-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.5);
    border-color: var(--accent-cyan);
}

.premium-card-image {
    width: 100%;
    height: 250px;
    overflow: hidden;
    flex-shrink: 0;
}

.premium-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s ease;
}

.premium-card:hover .premium-card-image img {
    transform: scale(1.05);
}

.premium-card-content {
    padding: 2.5rem;
    background: none;
    flex-grow: 1;
}

.premium-card h3 {
    font-size: 1.5rem;
    font-family: var(--font-heading);
    font-weight: 800;
    color: var(--accent-cyan);
    margin-bottom: 1.5rem;
    letter-spacing: 0.05em;
    display: flex;
    align-items: center;
    gap: 0.8rem;
}

.premium-card h3::before {
    content: '';
    display: inline-block;
    width: 6px;
    height: 25px;
    background: var(--accent-cyan);
    border-radius: 2px;
}

.premium-card p {
    font-size: 1.05rem;
    line-height: 1.8;
    color: var(--text-gray);
}

/* Services Grid */
.services-grid {
    max-width: 1400px;
    margin: 0 auto 8rem;
    padding: 0 2rem;
}

.service-grid-container {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 3rem;
}

.service-grid-item {
    background: var(--glass-panel);
    backdrop-filter: var(--glass-blur);
    border: var(--glass-border-cyan);
    border-radius: 12px;
    overflow: hidden;
    transition: all 0.4s ease;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.3);
}

.service-grid-item:hover {
    transform: translateY(-8px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.4);
    border-color: var(--accent-cyan);
}

.service-grid-image {
    width: 100%;
    height: 300px;
    overflow: hidden;
}

.service-grid-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s ease;
}

.service-grid-item:hover .service-grid-image img {
    transform: scale(1.05);
}

.service-grid-content {
    padding: 2.5rem;
}

.service-grid-content h3 {
    font-size: 1.5rem;
    font-family: var(--font-heading);
    font-weight: 800;
    color: var(--accent-cyan);
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.8rem;
}

.service-grid-content p {
    font-size: 1.05rem;
    line-height: 1.8;
    color: var(--text-gray);
}

/* Company Specs */
.company-specs {
    max-width: 1000px;
    margin: 0 auto 8rem;
    padding: 0 2rem;
}

.company-specs-table {
    width: 100%;
    background: var(--glass-panel);
    backdrop-filter: var(--glass-blur);
    border: var(--glass-border-cyan);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
    border-collapse: collapse;
}

.company-specs-table tbody tr {
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    transition: background 0.3s ease;
}

.company-specs-table tbody tr:hover {
    background: rgba(0, 144, 255, 0.05);
}

.company-specs-table th,
.company-specs-table td {
    padding: 1.5rem 2.5rem;
    vertical-align: middle;
}

.company-specs-table th {
    background: rgba(11, 29, 58, 0.8);
    font-family: var(--font-heading);
    font-weight: 700;
    color: var(--text-white);
    text-align: left;
    font-size: 1rem;
    border-right: 1px solid rgba(255, 255, 255, 0.05);
    min-width: 180px;
}

.company-specs-table td {
    color: var(--text-gray);
    font-size: 1.1rem;
}

.company-specs-table td strong {
    color: var(--text-white);
    font-weight: 700;
}

/* Company Overview */
.company-overview {
    max-width: 1200px;
    margin: 0 auto 8rem;
    padding: 0 2rem;
}

.company-overview-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 3rem;
}

.company-overview-item {
    background: var(--glass-panel);
    border: var(--glass-border-cyan);
    border-radius: 12px;
    padding: 3rem;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.3);
    transition: transform 0.3s ease;
}

.company-overview-item:hover {
    transform: translateY(-5px);
    border-color: var(--accent-cyan);
}

.company-overview-item h3 {
    font-size: 1.5rem;
    color: var(--accent-cyan);
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 1rem;
}

.company-overview-item p {
    font-size: 1.05rem;
    line-height: 1.8;
    color: var(--text-gray);
}

/* ========================
    Company History (Timeline)
    ======================== */
.company-history {
    padding: 4rem 2rem;
    max-width: 1000px;
    margin: 0 auto;
}

.timeline {
    position: relative;
    padding-left: 2rem;
    border-left: 2px solid var(--accent-cyan);
    margin-top: 3rem;
}

.timeline-item {
    position: relative;
    padding-bottom: 3rem;
}

.timeline-item::before {
    content: '';
    position: absolute;
    left: -2.4rem;
    top: 0.3rem;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: var(--accent-cyan);
    box-shadow: 0 0 10px var(--accent-cyan), 0 0 20px rgba(0, 240, 255, 0.4);
}

.timeline-year {
    font-family: var(--font-mono);
    font-size: 1.8rem;
    font-weight: 600;
    color: var(--accent-cyan);
    margin-bottom: 1rem;
    display: flex;
    align-items: baseline;
    gap: 1rem;
}

.timeline-year span {
    font-family: var(--font-body);
    font-size: 1rem;
    color: #a0aec0;
    font-weight: normal;
}

.timeline-content {
    background: var(--glass-panel);
    backdrop-filter: var(--glass-blur);
    border: var(--glass-border-cyan);
    border-radius: 16px;
    padding: 1.5rem 2rem;
    color: var(--text-white);
    transition: transform 0.3s ease;
}

.timeline-item:hover .timeline-content {
    transform: translateX(10px);
    border-color: rgba(0, 144, 255, 0.4);
}

.timeline-content ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.timeline-content li {
    margin-bottom: 0.8rem;
    position: relative;
    padding-left: 1.5rem;
}

.timeline-content li::before {
    content: '▹';
    position: absolute;
    left: 0;
    color: var(--accent-cyan);
}

.timeline-highlight {
    color: #fff;
    font-weight: bold;
}

/* ========================
    Global Network Map
    ======================== */
.global-network {
    max-width: 1200px;
    margin: 0 auto 8rem;
    padding: 0 2rem;
}

.global-network>.section-heading {
    padding-top: 0;
}

.global-network-map-container {
    position: relative;
    width: 100%;
    border-radius: 0;
    border-left: none;
    border-right: none;
    border-top: 1px solid rgba(255, 179, 0, 0.3);
    border-bottom: 1px solid rgba(255, 179, 0, 0.3);
    overflow: hidden;
    background: #000;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    margin-bottom: 3rem;
}

.global-network-map-wrapper {
    width: 100%;
    overflow: visible;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
}

.global-network-map-wrapper::-webkit-scrollbar {
    display: none;
}

.global-network-map {
    position: relative;
    width: 100%;
    height: auto !important;
    display: block;
    background: none;
    box-shadow: none;
    border: none;
    border-radius: 0;
    margin-bottom: 0; /* 250pxの強制余白を削除（0にリセット） */
    overflow: visible;
}

.global-network-map img {
    width: 100%;
    height: auto;
    display: block;
    pointer-events: none;
}

/* ========================
    Modern Global Network Map Nodes
    ======================== */
.modern-map-node {
    position: absolute;
    z-index: 30;
    width: 0px;
    height: 0px;
}

.node-pin {
    width: 16px;
    height: 16px;
    background: var(--map-accent, #ffb300);
    border-radius: 50%;
    position: absolute;
    top: 0;
    left: 0;
    transform: translate(-50%, -50%);
    box-shadow: 0 0 15px var(--map-accent, #ffb300), 0 0 30px rgba(255, 179, 0, 0.4);
}

.node-pin.pulse-node::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 100%;
    height: 100%;
    border: 2px solid var(--map-accent, #ffb300);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    animation: pulse-ring 2s infinite cubic-bezier(0.215, 0.61, 0.355, 1);
}

@keyframes pulse-ring {
    0% {
        width: 100%;
        height: 100%;
        opacity: 1;
    }

    100% {
        width: 400%;
        height: 400%;
        opacity: 0;
    }
}

.node-connection {
    position: absolute;
    background: var(--map-accent, #ffb300);
    box-shadow: 0 0 10px rgba(255, 179, 0, 0.6);
    transform-origin: 0 50%;
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: 5;
}

.node-connection.draw-line {
    opacity: 1;
    animation: draw-path 0.8s ease-out forwards;
}

@keyframes draw-path {
    0% {
        transform: scaleX(0);
    }

    100% {
        transform: scaleX(1);
    }
}

/* Specific line directions */
.line-right {
    top: -1px;
    left: 0;
    width: 80px;
    height: 2px;
    transform-origin: 0% 50%;
}

.line-left-up {
    top: -1px; left: 0;
    width: 275px;
    height: 2px;
    transform-origin: 0% 50%;
    transform: scaleX(0) rotate(-160.9deg);
}

.line-right-up {
    top: -1px;
    left: 0;
    width: 60px;
    height: 2px;
    transform-origin: 0% 50%;
    transform: scaleX(0) rotate(-45deg);
}

.line-right-down {
    top: -1px;
    left: 0;
    width: 368px;   /* パネル左端までの最短距離 */
    height: 2px;
    transform-origin: 0% 50%;
    transform: scaleX(0) rotate(-134.5deg); /* 左上方向へ伸ばす */
}

/* New lines for Vietnam and Philippines */
.line-up-long {
    top: -1px; left: 0;
    width: 386px;
    height: 2px;
    transform-origin: 0% 50%;
    transform: scaleX(0) rotate(162.2deg);
}

.line-left-down-1 {
    top: -1px; left: 0;
    width: 414px;
    height: 2px;
    transform-origin: 0% 50%;
    transform: scaleX(0) rotate(-149.8deg);
}
.line-right-down-long {
    top: -1px; left: 0;
    width: 205px;   /* 距離を再計算して短縮 */
    height: 2px;
    transform-origin: 0% 50%;
    transform: scaleX(0) rotate(-103.2deg); /* 角度を-103.2度に修正 */
}

.node-connection.draw-line.line-left-up {
    animation: draw-path-left-up 0.8s ease-out forwards;
}

@keyframes draw-path-left-up {
    0% { transform: scaleX(0) rotate(-160.9deg); }
    100% { transform: scaleX(1) rotate(-160.9deg); }
}

.node-connection.draw-line.line-right-up {
    animation: draw-path-right-up 0.8s ease-out forwards;
}

@keyframes draw-path-right-up {
    0% {
        transform: scaleX(0) rotate(-45deg);
    }

    100% {
        transform: scaleX(1) rotate(-45deg);
    }
}

.node-connection.draw-line.line-right-down {
    animation: draw-path-right-down 0.8s ease-out forwards;
}

@keyframes draw-path-right-down {
    0% { transform: scaleX(0) rotate(-134.5deg); }
    100% { transform: scaleX(1) rotate(-134.5deg); }
}

.node-connection.draw-line.line-up-long {
    animation: draw-path-up-long 0.8s ease-out forwards;
}

@keyframes draw-path-up-long {
    0% { transform: scaleX(0) rotate(162.2deg); }
    100% { transform: scaleX(1) rotate(162.2deg); }
}

.node-connection.draw-line.line-left-down-1 {
    animation: draw-path-left-down-1 0.8s ease-out forwards;
}

@keyframes draw-path-left-down-1 {
    0% { transform: scaleX(0) rotate(-149.8deg); }
    100% { transform: scaleX(1) rotate(-149.8deg); }
}

.node-connection.draw-line.line-right-down-long {
    animation: draw-path-right-down-long 0.8s ease-out forwards;
}

@keyframes draw-path-right-down-long {
    0% { transform: scaleX(0) rotate(-103.2deg); }
    100% { transform: scaleX(1) rotate(-103.2deg); }
}

.node-card {
    position: absolute;
    width: 260px;
    background: rgba(11, 29, 58, 0.85);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 179, 0, 0.4);
    border-radius: 8px;
    padding: 12px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.6), inset 0 0 15px rgba(255, 179, 0, 0.1);
    opacity: 1;
    transform: translateY(0);
    transition: all 0.6s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    z-index: 50;
}

.node-card::after {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: repeating-linear-gradient(0deg, rgba(255, 179, 0, 0.04) 0px, rgba(255, 179, 0, 0.04) 1px, transparent 1px, transparent 3px);
    pointer-events: none;
    border-radius: 8px;
}

.node-card.hidden-on-init {
    opacity: 0;
    transform: translateY(15px) scale(0.95);
    pointer-events: none;
}

/* Positioning based on line */
.card-right {
    top: -60px;
    left: 88px;
}

.card-left-up {
    bottom: 90px;   /* 65px + 25px = 90px */
    right: 130px;
}

.card-right-up {
    bottom: 35px;
    left: 45px;
}

.card-right-down {
    bottom: 203px;  /* ベトナムパネルと水平に並ぶための補正値 */
    right: -2px;    /* ベトナムパネルの右端から10px空けた位置 */
    left: auto;     /* 以前の数値をリセット */
    top: auto;      /* 以前の数値をリセット */
}

/* New Positions */
.card-up-long {
    bottom: -218px; /* -268px + 50px = -218px */
    right: 367px;   /* 横位置は維持 */
}

.card-left-down-1 {
    top: -408px;    /* -433px + 25px = -408px */
    right: 228px;   /* 233px - 5px = 228px */
}

.card-right-down-long {
    bottom: 203px;  /* 高さの維持 */
    right: -72px;   /* -52px - 20px = -72px (さらに右に20px移動) */
    top: auto;
    left: auto;
}

.card-image {
    width: 100%;
    height: 100px;
    border-radius: 4px;
    overflow: hidden;
    border: 1px solid rgba(255, 179, 0, 0.3);
}

.card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: brightness(0.95) contrast(1.1);
    transition: transform 0.4s ease;
}

.node-card:hover .card-image img {
    transform: scale(1.05);
}

.card-info h4 {
    font-family: var(--font-heading);
    color: var(--accent-cyan, #00f0ff);
    font-size: 1rem;
    margin-bottom: 6px;
    text-shadow: 0 0 5px rgba(0, 240, 255, 0.4);
    line-height: 1.3;
}

.card-info p {
    color: #e2e8f0;
    font-size: 0.85rem;
    line-height: 1.5;
}

/* Responsive map cards */
@media (max-width: 1024px) {
    .node-card {
        width: 220px;
    }

    .card-right {
        left: 70px;
    }

    .line-right {
        width: 60px;
    }
}

@media (max-width: 768px) {
    .node-card {
        width: 180px;
        padding: 10px;
    }

    .card-image {
        height: 80px;
    }

    .card-info h4 {
        font-size: 0.9rem;
    }

    .card-info p {
        font-size: 0.75rem;
    }
}

/* ========================
    Scroll Prompt
    ======================== */
.scroll-prompt {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 15;
    display: flex;
    flex-direction: column;
    align-items: center;
    color: var(--text-white);
    text-shadow: 1px 1px 4px rgba(0, 0, 0, 0.8);
    pointer-events: auto;
    font-family: var(--font-mono);
    font-size: 0.9rem;
    letter-spacing: 0.1em;
    animation: bounceUpDown 2s infinite ease-in-out;
}

.scroll-prompt-arrow {
    width: 20px;
    height: 32px;
    border: 2px solid rgba(255, 255, 255, 0.7);
    border-radius: 16px;
    margin-top: 8px;
    position: relative;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.5);
}

.scroll-prompt-arrow::before {
    content: '';
    position: absolute;
    top: 6px;
    left: 50%;
    transform: translateX(-50%);
    width: 4px;
    height: 8px;
    background: var(--accent-cyan);
    border-radius: 2px;
    animation: scrollWheel 2s infinite;
}

@keyframes bounceUpDown {

    0%,
    100% {
        transform: translate(-50%, 0);
    }

    50% {
        transform: translate(-50%, 8px);
    }
}

@keyframes scrollWheel {
    0% {
        top: 6px;
        opacity: 1;
        height: 4px;
    }

    50% {
        top: 12px;
        opacity: 1;
        height: 8px;
    }

    100% {
        top: 18px;
        opacity: 0;
        height: 4px;
    }
}

/* ========================
    Top Page Responsive
    ======================== */
@media (max-width: 1024px) {

    .service-grid-container,
    .company-overview-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {

    .slide-final-content h1,
    .hero-content h1 {
        font-size: clamp(1.2rem, 5vw, 1.8rem) !important;
        letter-spacing: 0.1em !important;
    }

    .slide-final-content p,
    .hero-content p {
        font-size: 1rem !important;
        margin-bottom: 2rem !important;
    }

    .final-logo {
        width: 120px !important;
        margin-bottom: 1.5rem !important;
    }

    .company-specs-table th,
    .company-specs-table td {
        padding: 1rem;
        display: block;
        width: 100%;
    }

    .company-specs-table th {
        border-right: none;
        border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    }
}

/* ========================
   Card Title Adjustments
   ======================== */
.premium-card-content h3 {
    letter-spacing: 0.02em !important;
    font-size: clamp(1rem, 2.5vw, 1.3rem) !important;
    white-space: nowrap;
}

@media (max-width: 768px) {
    .premium-card-content h3 {
        white-space: normal;
        /* スマホ等の極端に狭い画面では改行を許可 */
        word-break: keep-all;
        /* ただし単語の途中で1文字だけ落ちるのを防ぐ */
        overflow-wrap: anywhere;
    }
}

/* ========================
   Company History Timeline Toggle
   ======================== */
.hidden-history-wrapper {
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    transition: max-height 0.8s ease-in-out, opacity 0.8s ease-in-out;
}

.hidden-history-wrapper.is-open {
    max-height: 8000px; /* 中身が長くても見切れないように十分大きな数値を設定 */
    opacity: 1;
    margin-bottom: 2rem;
}

.history-toggle-btn {
    background: transparent;
    color: var(--accent-cyan);
    border: 1px solid var(--accent-cyan);
    padding: 10px 24px;
    font-size: 1rem;
    font-family: 'Noto Sans JP', sans-serif;
    border-radius: 30px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.history-toggle-btn:hover {
    background: var(--accent-cyan);
    color: #0b1120;
    box-shadow: 0 0 15px rgba(0, 240, 255, 0.4);
}

/* フジ・クリエイト（日本）ノード用の接続線（真下に伸ばす） */
.line-fuji-custom {
    top: 50%; left: 50%;
    width: 0;
    height: 2px;
    transform-origin: left center;
    transform: rotate(49.8deg); /* 真下から斜め方向に変更 */
    transition: width 0.5s ease;
}

.draw-line.line-fuji-custom {
    width: 170px;
}

/* フジ・クリエイト（日本）ノードのカード配置（左へ6px戻して計200px右へずらす） */
.card-fuji-custom {
    top: calc(50% + 130px);     /* 135px - 5px = 130px */
    right: calc(50% - 240px);    /* 250px - 10px = 240px */
    left: auto;
    transform: none !important;
}

/* スマホ・タブレット閲覧時の画面はみ出し防止 */
@media screen and (max-width: 992px) {
    .card-fuji-custom {
        top: calc(50% + 60px);
        right: -20px;
        width: 260px;
        transform: none !important; 
    }
}

/* フジ・クリエイト用線の専用アニメーション（真下への角度を維持） */
.node-connection.draw-line.line-fuji-custom {
    animation: draw-path-fuji 0.8s ease-out forwards;
}

@keyframes draw-path-fuji {
    0% { transform: scaleX(0) rotate(49.8deg); }
    100% { transform: scaleX(1) rotate(49.8deg); }
}

/* ========================
   Mobile Global Network
   ======================== */
.mobile-global-network {
    display: none !important;
}

@media (max-width: 768px) {
    .global-network-map-container {
        display: none !important;
    }
    
    .mobile-global-network {
        display: flex !important;
        flex-direction: column;
        gap: 1.5rem;
    }

    .mobile-node-card {
        background: var(--glass-panel);
        backdrop-filter: var(--glass-blur);
        border: var(--glass-border-cyan);
        border-radius: 12px;
        overflow: hidden;
        box-shadow: 0 10px 20px rgba(0, 0, 0, 0.3);
        display: flex;
        flex-direction: column;
    }

    .mobile-node-card a {
        text-decoration: none;
        color: inherit;
        display: block;
    }

    .mobile-node-card .card-image {
        width: 100%;
        height: 200px;
        overflow: hidden;
    }

    .mobile-node-card .card-image img {
        width: 100%;
        height: 100%;
        object-fit: cover;
    }

    .mobile-node-card .card-info {
        padding: 1.5rem;
    }

    .mobile-node-card h4 {
        color: var(--text-white);
        font-family: var(--font-heading);
        font-size: 1.2rem;
        margin-bottom: 0.5rem;
    }

    .mobile-node-card p {
        color: var(--text-gray);
        font-size: 0.95rem;
        line-height: 1.5;
    }
}

/* ==================================================
   Sustainability Dark Theme (Top Page Section)
   ================================================== */
.sustainability-top {
    width: 100%;
    padding: 6rem 20px;
    background: transparent; /* 黒いグラデーション背景を削除し透明化 */
    border: none; /* ボーダーを削除 */
    text-align: center;
}

.sustainability-top .content-wrapper {
    max-width: 900px;
    margin: 0 auto;
    background: var(--glass-panel); /* 他のセクションと同じ透明パネルを適用 */
    backdrop-filter: var(--glass-blur, blur(10px));
    border: var(--glass-border-cyan);
    border-radius: 20px;
    padding: 4rem 2rem;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
}

.sustainability-top h2 {
    font-size: 2.5rem;
    color: var(--text-white);
    font-family: var(--font-heading);
    font-weight: 800;
    margin-bottom: 1.5rem;
    letter-spacing: 0.1em;
}


.sustainability-top p {
    font-size: 1.15rem;
    color: var(--text-gray);
    line-height: 1.9;
    margin-bottom: 2.5rem;
}

@media screen and (max-width: 768px) {
    .sustainability-top {
        padding: 4rem 15px;
    }
    .sustainability-top .content-wrapper {
        padding: 3rem 1.5rem;
    }
    .sustainability-top p {
        font-size: 1.05rem;
    }
    .sustainability-top h2 {
        font-size: 1.8rem;
    }

}

/* ==============================================
   サステナビリティページ専用スタイル (横長ワイドパネル型)
   ============================================== */
.page-sustainability {
    color: var(--text-white);
}

.sustainability-intro {
    text-align: center;
    margin-bottom: 50px;
}

.dark-message-box {
    background: var(--glass-panel);
    backdrop-filter: var(--glass-blur, blur(10px));
    border: var(--glass-border-cyan);
    border-left: 6px solid var(--accent-cyan);
    padding: 30px 40px;
    border-radius: 8px;
    max-width: 900px;
    margin: 0 auto;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
}

.dark-message-box p {
    font-size: 1.15rem;
    line-height: 1.8;
    font-weight: bold;
    color: var(--text-white);
    margin: 0;
}

/* ★修正：縦長（ポートレート型）の3列並びを廃止し、横長（ワイド型）パネルの縦積みに変更 */
.themes-grid-dark {
    display: flex;
    flex-direction: column; /* 縦に積む */
    gap: 30px;
    max-width: 1000px; /* 横長パネルが美しく見える幅 */
    margin: 0 auto 80px;
}

.dark-theme-card {
    background: var(--glass-panel);
    backdrop-filter: var(--glass-blur, blur(10px));
    border: var(--glass-border-cyan);
    border-radius: 12px;
    display: flex;
    flex-direction: row; /* ★カード内を左（見出し）と右（本文）に分割 */
    overflow: hidden;
    transition: transform 0.3s ease, border-color 0.3s ease;
}

.dark-theme-card:hover {
    transform: translateY(-5px); /* 横長なので浮かせる距離を少し控えめに */
    border-color: var(--accent-cyan);
    box-shadow: 0 10px 25px rgba(0, 240, 255, 0.2);
}

/* 左側：見出しとアイコンのエリア */
.card-header-dark {
    background: rgba(0, 0, 0, 0.3);
    padding: 30px;
    width: 35%; /* 左側の幅 */
    border-bottom: none;
    border-right: 1px solid rgba(255, 255, 255, 0.05); /* 右側に区切り線 */
    display: flex;
    flex-direction: column;
    justify-content: center; /* 少ない文字数でも中央に配置 */
}

.card-header-dark h3 {
    font-size: 1.3rem;
    color: var(--accent-cyan);
    margin: 0 0 15px 0;
    line-height: 1.4;
}


.sdgs-icons {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.sdgs-icons img {
    width: 45px;
    height: 45px;
    object-fit: contain;
}

/* 右側：本文のエリア */
.card-body-dark {
    padding: 30px 40px;
    width: 65%; /* 右側の幅 */
    display: flex;
    flex-direction: column;
    justify-content: center; /* 上下中央揃えでスカスカ感を排除 */
}

.card-body-dark h4 {
    color: var(--text-white);
    font-size: 1.05rem;
    margin: 20px 0 10px 0;
    border-bottom: 1px dashed rgba(255, 255, 255, 0.2);
    padding-bottom: 8px;
}

.card-body-dark h4:first-child {
    margin-top: 0;
}

.card-body-dark p {
    font-size: 0.95rem;
    color: var(--text-gray);
    line-height: 1.7;
    margin: 0;
}

/* スマホ表示時は従来の縦積みに戻す */
@media (max-width: 768px) {
    .dark-theme-card {
        flex-direction: column;
    }
    .card-header-dark {
        width: 100%;
        border-right: none;
        border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    }
    .card-body-dark {
        width: 100%;
        padding: 25px;
    }
}