/* Basic Reset */

.column-section {
    padding: 60px 20px; /* Section padding */
    background-color: #fff; /* Section background color */
    overflow: hidden; /* To handle the large 'Column' text */
}

.column-content-flex {
    display: flex;
    justify-content: space-between;
    gap: 30px; /* Gap between left and right columns */
    position: relative; /* Relative position for z-index */
    z-index: 1; /* Above 'Column' title */
}

/* Right side vertical text */
.column-right-text {
    flex-shrink: 0; /* Prevent shrinking */
    display: flex; /* Flexboxコンテナに設定 */
    flex-direction: row; /* 子要素を横に並べる */
    align-items: flex-start; /* 子要素の開始高さを揃える */
    gap: 15px; /* h3とpの間のスペース */
}

.column-right-text h3 {
    writing-mode: vertical-rl; /* Vertical writing mode, right to left */
    text-orientation: mixed; /* Maintain character orientation */
    font-size: 1.8em;
    font-weight: bold;
    color: #3b5998; /* Blue color */
    margin: 0; /* デフォルトマージンをリセット */
    line-height: 1.2;
}

.column-right-text p {
    writing-mode: vertical-rl; /* Vertical writing mode */
    text-orientation: mixed; /* Maintain character orientation */
    font-size: 1em;
    color: #555;
    line-height: 1.8;
    max-height: 350px; /* Fixed height to match image (adjust as needed) */
    overflow: hidden; /* Hide overflowing text */
    padding-left: 15px; /* Space between line and text */
    margin: 0; /* デフォルトマージンをリセット */
}

/* Left side main content */
.column-left-content {
    flex-grow: 1; /* Fill remaining space */
    padding-top: 20px; /* Adjust padding to match design */
}

.column-description {
    font-size: 1em;
    line-height: 1.8;
    color: #444;
    margin-bottom: 30px;
}

.column-cards {
    display: flex;
    gap: 20px; /* Gap between cards */
    flex-wrap: wrap; /* Allow cards to wrap */
    justify-content: center; /* Center cards on smaller screens */
    margin-bottom: 40px;
}

.column-card {
    background-color: #fff;
    border-radius: 8px;
    overflow: hidden; /* For rounded image corners */
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
    flex: 1 1 calc(33.333% - 20px); /* 3-column layout (accounting for gap) */
    max-width: calc(33.333% - 20px); /* Set max width */
    min-width: 280px; /* Minimum card width */
    text-align: left; /* Text alignment within card */
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.column-card:hover {
    transform: translateY(-5px); /* Move up slightly on hover */
    box-shadow: 0 8px 15px rgba(0, 0, 0, 0.2); /* Enhance shadow on hover */
}

.column-card-link { /* カード全体をリンクにするためのスタイル */
    display: block; /* img, p要素を内部に含めるため */
    text-decoration: none; /* デフォルトの下線を消す */
    color: inherit; /* テキスト色を親から継承 */
}

.column-card-image {
    width: 100%;
    height: 180px; /* Fixed image height */
    object-fit: cover; /* Cover container without distortion */
    display: block;
}

.column-card-date {
    font-size: 0.9em;
    color: #888;
    padding: 10px 15px 0;
}

.column-card-text {
    font-size: 1em;
    color: #333;
    line-height: 1.6;
    padding: 5px 15px 15px;
}

.column-button {
    display: block; /* Block level for centering */
    width: fit-content; /* Fit content width */
    margin: 0 auto; /* Center alignment */
    padding: 12px 30px;
    background-color: #3b5998; /* Blue color */
    color: #fff;
    font-size: 1.1em;
    font-weight: bold;
    text-decoration: none;
    border-radius: 50px; /* Rounded button */
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    transition: background-color 0.3s ease, transform 0.3s ease, box-shadow 0.3s ease;
}

.column-button:hover {
    background-color: #2e4a86; /* Darker blue on hover */
    transform: translateY(-3px); /* Move up slightly on hover */
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.3); /* Enhance shadow on hover */
}

/* Responsive Design */
@media (max-width: 992px) {
    .column-main-title {
        font-size: 6em; /* Adjust font size for smaller screens */
        top: -30px;
        left: 0;
        text-align: center;
    }

    .column-content-flex {
        flex-direction: column; /* Stack columns vertically */
        align-items: center; /* Center horizontally */
    }

    .column-right-text {
        padding-top: 0;
        margin-left: 0;
        margin-bottom: 30px; /* Add bottom margin */
        width: 100%;
        max-width: 600px; /* Max width for mobile */
        text-align: center;
        flex-direction: column; /* 見出しと文章を縦に並べる */
        gap: 0; /* 横並び時のギャップをリセット */
    }
    
    .column-right-text h3 {
        writing-mode: horizontal-tb; /* Switch to horizontal writing */
        text-orientation: unset; /* Reset text orientation */
        text-align: center; /* Center title */
        margin-left: 0;
        margin-bottom: 10px;
    }

    .column-right-text p {
        writing-mode: horizontal-tb; /* Switch to horizontal writing */
        text-orientation: unset; /* Reset text orientation */
        max-height: unset; /* Remove height constraint */
        overflow: visible; /* Show all content */
        border-left: none; /* Remove border */
        padding-left: 0;
    }

    .column-left-content {
        width: 100%;
        padding-top: 0;
    }

    .column-cards {
        flex-direction: column; /* Stack cards vertically */
        align-items: center; /* Center cards */
    }

    .column-card {
        max-width: 400px; /* Max width for mobile cards */
        width: 90%;
    }
}

@media (max-width: 576px) {
    .column-main-title {
        font-size: 4em; /* Further reduce font size */
        top: -10px;
    }

    .column-section {
        padding: 40px 15px;
    }

    .column-card-image {
        height: 150px; /* Adjust image height */
    }

    .column-button {
        font-size: 1em;
        padding: 10px 25px;
    }
}