/* =================================== */
/* COMPANY PAGE STYLES */
/* =================================== */

/* --- Visual Section --- */
.company-visual {
    padding: 40px 0 20px;
    /* Adjusted: Top 40px, Bottom 20px */
    background: #fff;
    margin-top: 0;
}

.visual-grid {
    display: grid;
    /* Balanced Stylish Grid */
    grid-template-columns: 1.2fr 0.9fr 1.1fr 0.8fr;
    gap: 30px;
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 4%;
    align-items: center;
}

.visual-item {
    position: relative;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.05);
    width: 100%;
    /* Default fallback */
    aspect-ratio: 4/3;
    transition: transform 0.3s ease;
    animation: floatImage 6s ease-in-out infinite;
}

/* Harmonious Ratios (Classic Photo sizes) */
.visual-item:nth-child(1) {
    aspect-ratio: 3/2;
}

/* Standard Landscape */
.visual-item:nth-child(2) {
    aspect-ratio: 1/1;
}

/* Square */
.visual-item:nth-child(3) {
    aspect-ratio: 4/3;
}

/* Digital Camera */
.visual-item:nth-child(4) {
    aspect-ratio: 3/4;
}

/* Portrait */

/*
 * Layout Pattern: "Up and Down".
 * Even items shifted down to create staggered wave.
 * With Flex, this applies to items 2, 4.
 * Item 5 will be centered in the new row.
 */
/* Remove Stagger - Linear Layout */
.visual-item:nth-child(even) {
    margin-top: 0;
}

/* Staggered Animation Delays for organic feel */
.visual-item:nth-child(1) {
    animation-delay: 0s;
}

.visual-item:nth-child(2) {
    animation-delay: 1.5s;
}

.visual-item:nth-child(3) {
    animation-delay: 0.5s;
}

.visual-item:nth-child(4) {
    animation-delay: 2s;
}


@keyframes floatImage {
    0% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-10px);
    }

    /* Gentle float */
    100% {
        transform: translateY(0);
    }
}

.visual-item:hover {
    animation-play-state: paused;
    transform: translateY(-5px);
}

.visual-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* --- Section Titles --- */
/* Flex container for side-by-side title and subtitle */
.section-header-row {
    display: flex;
    align-items: baseline;
    gap: 20px;
    margin-bottom: 2rem;
}

.company-section-title {
    font-family: var(--font-en);
    font-size: 2.5rem;
    color: #333;
    margin-bottom: 0;
    /* Remove margin as it's handled by row */
    text-align: left;
    position: relative;
    display: inline-block;
}

.section-subtitle-inline {
    font-size: 1.1rem;
    color: #888;
    font-weight: 500;
}

.company-section-title::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: -5px;
    width: 60px;
    height: 4px;
    background-color: var(--color-yellow);
    border-radius: 2px;
}

/* --- Profile Section --- */
.company-profile {
    padding: 6rem 0;
    background: #fff;
}

/* 
 * User Requested: "Center balance" and "Not full width".
 */
.company-profile .container-wide {
    max-width: 960px !important;
    margin: 0 auto;
}

.profile-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 2rem;
}

.profile-table th,
.profile-table td {
    padding: 1rem 1rem;
    /* Tighter padding (was 1.25) */
    text-align: left;
    border-bottom: 1px solid #e0e0e0;
    /* Restored softer border */
    font-size: 1rem;
}

.profile-table tr {
    border-bottom: 1px solid #e0e0e0;
    /* Explicit row border */
}

.profile-table th {
    width: 25%;
    /* Narrower label column */
    font-weight: 700;
    color: #333;
    white-space: nowrap;
    vertical-align: top;
    /* Align top for multiple lines */
}

.profile-table td {
    width: 75%;
    color: #555;
    line-height: 1.8;
}

/* --- Access Section --- */
.company-access {
    padding: 6rem 0;
    background: #fcfcfc;
}

.company-access .container-wide {
    max-width: 1000px !important;
    margin: 0 auto;
}

.access-wrapper {
    display: flex;
    flex-wrap: wrap;
    gap: 60px;
    /* Increased gap */
    align-items: flex-start;
}

.access-info {
    flex: 1;
    min-width: 300px;
}

.access-label {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
    color: #333;
}

.access-label::before {
    content: '';
    display: block;
    width: 12px;
    height: 12px;
    background-color: var(--color-yellow);
    border-radius: 50%;
}

.access-address {
    font-size: 0.95rem;
    /* Reduced font size */
    line-height: 1.8;
    margin-bottom: 2rem;
}

.access-station {
    font-size: 1rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
}

.access-time-title {
    font-weight: 700;
    margin-bottom: 0.5rem;
    font-size: 1rem;
}

.access-time-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.access-time-list li {
    position: relative;
    padding-left: 1rem;
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
    line-height: 1.6;
    color: #555;
}

.access-time-list li::before {
    content: '-';
    position: absolute;
    left: 0;
}

.access-map {
    flex: 1.5;
    min-width: 300px;
    height: 400px;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
    /* Stronger shadow */
}

.access-map iframe {
    width: 100%;
    height: 100%;
    border: 0;
}

/* --- Responsive --- */
@media (max-width: 768px) {

    /* ========================================= */
    /* IMAGE SLIDESHOW - CSS ONLY */
    /* ========================================= */
    .company-visual {
        padding: 20px 0;
    }

    .visual-grid {
        display: block;
        position: relative;
        width: 100%;
        aspect-ratio: 4/3;
        overflow: hidden;
        margin: 0 auto;
        padding: 0 20px;
        box-sizing: border-box;
    }

    .visual-item {
        position: absolute;
        top: 0;
        left: 20px;
        right: 20px;
        width: calc(100% - 40px);
        height: 100%;
        aspect-ratio: 4/3;
        border-radius: 15px;
        opacity: 0;
        animation: slideShow 20s infinite;
    }

    /* Same size for all images */
    .visual-item:nth-child(1),
    .visual-item:nth-child(2),
    .visual-item:nth-child(3),
    .visual-item:nth-child(4) {
        aspect-ratio: 4/3;
    }

    /* Staggered slideshow timing */
    .visual-item:nth-child(1) {
        animation-delay: 0s;
    }

    .visual-item:nth-child(2) {
        animation-delay: 5s;
    }

    .visual-item:nth-child(3) {
        animation-delay: 10s;
    }

    .visual-item:nth-child(4) {
        animation-delay: 15s;
    }

    @keyframes slideShow {

        0%,
        5% {
            opacity: 0;
            transform: scale(1.02);
        }

        6%,
        25% {
            opacity: 1;
            transform: scale(1);
        }

        26%,
        100% {
            opacity: 0;
            transform: scale(0.98);
        }
    }

    /* ========================================= */
    /* PROFILE SECTION - ADD PADDING */
    /* ========================================= */
    .company-profile {
        padding: 3rem 0;
    }

    .company-profile .container-wide {
        padding: 0 25px !important;
    }

    .section-header-row {
        padding: 0;
        margin-bottom: 1.5rem;
    }

    .company-section-title {
        font-size: 2rem;
    }

    .profile-table {
        margin-top: 1rem;
    }

    .profile-table th,
    .profile-table td {
        display: block;
        width: 100%;
        padding: 0.5rem 0;
        border: none;
    }

    .profile-table th {
        margin-top: 1rem;
        color: var(--color-main);
        font-size: 0.85rem;
    }

    .profile-table td {
        font-size: 0.95rem;
    }

    .profile-table tr {
        border-bottom: 1px solid #ddd;
        display: block;
        padding-bottom: 1rem;
    }

    /* ========================================= */
    /* ACCESS SECTION - ADD PADDING + CENTER MAP */
    /* ========================================= */
    .company-access {
        padding: 3rem 0;
    }

    .company-access .container-wide {
        padding: 0 25px !important;
    }

    .access-wrapper {
        flex-direction: column;
        gap: 30px;
    }

    .access-info {
        min-width: auto;
        width: 100%;
    }

    .access-label {
        font-size: 1.2rem;
    }

    .access-address {
        font-size: 0.9rem;
    }

    .access-time-title {
        font-size: 0.95rem;
    }

    .access-time-list li {
        font-size: 0.85rem;
    }

    /* Map - Square and Centered */
    .access-map {
        width: 100%;
        min-width: auto;
        aspect-ratio: 1/1;
        height: auto;
        margin: 0 auto;
        border-radius: 15px;
    }

    .access-map iframe {
        width: 100%;
        height: 100%;
    }
}