/* ==========================================
   Responsive Styles for Mobile & Tablet
   ========================================== */

/* Tablet (max-width: 768px) */
@media screen and (max-width: 768px) {
    /* ==========================================
       Display Control
       ========================================== */
    .mobile-only {
        display: inline;
    }

    /* ==========================================
       Page Header Image - Layout Structure
       ========================================== */
    .page-header-image__container {
        flex-direction: row;
    }

    .page-header-image__image {
        flex: 1;
    }

    .page-header-image__content {
        flex: 0 0 auto;
        padding: 0 15px;
        padding-top: 40vh;
        min-width: 80px;
        align-items: center;
    }

    .page-header-image__title {
        font-size: 24px;
        writing-mode: vertical-rl;
        text-orientation: upright;
        letter-spacing: 0.2em;
    }

    /* ==========================================
       Typography - Critical Adjustments
       ========================================== */
    .hero__description p {
        line-height: 2.0 !important;
    }

    /* ==========================================
       Layout Structure - Column Conversion
       ========================================== */
    .content-row {
        flex-direction: column-reverse;
    }

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

    .content-row__image {
        width: 100%;
    }

    .content-row__image-placeholder {
        width: 100%;
        min-height: 300px; /* タブレットでの最小高さ */
    }

    .card-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .workshop-info__grid {
        grid-template-columns: 1fr;
    }
}

/* Mobile (max-width: 480px) */
@media screen and (max-width: 480px) {
    /* Hero Slider */
    .hero-slider {
        height: 100vh;
    }

    /* Hero Slider Catchphrase */
    .hero-slider__catchphrase {
        bottom: 100px;
        left: 20px;
        font-size: 30px;
    }

    .hero-slider__catchphrase-en {
        font-size: 14px;
        margin-top: 4px;
    }

    /* Page Header Image */
    .page-header-image {
        height: 60vh;
    }

    .page-header-image__container {
        flex-direction: row;
    }

    .page-header-image__title {
        font-size: 20px;
        writing-mode: vertical-rl;
        text-orientation: upright;
        letter-spacing: 0.2em;
    }

    .page-header-image__content {
        padding: 0 10px;
        padding-top: 40vh;
        min-width: 70px;
        align-items: center;
    }

    /* Header */
    .header {
        padding: 12px 15px;
    }

    .header__logo {
        font-size: 20px;
    }

    /* Hero Section */
    .hero {
        padding: 40px 15px;
    }

    .hero__title {
        font-size: 20px;
        margin-bottom: 15px;
    }

    .hero__description {
        font-size: 13px;
    }

    /* Page Title */
    .page-title {
        padding: 30px 15px;
    }

    .page-title__main {
        font-size: 20px;
    }

    .page-title__vertical {
        display: none;
    }

    /* Section */
    .section {
        padding: 40px 15px;
    }

    .section__title {
        font-size: 18px;
        margin-bottom: 25px;
    }

    /* Content Row */
    .content-row {
        gap: 40px;
        margin-bottom: 40px;
    }

    .content-row__title {
        font-size: 22px;
        margin-bottom: 15px;
    }

    .content-row__description {
        font-size: 13px;
        margin-bottom: 20px;
    }

    .content-row__btn {
        padding: 10px 30px;
        font-size: 13px;
    }

    .content-row__image {
        width: 100%;
    }

    .content-row__image-placeholder {
        width: 100%;
        min-height: 250px; /* モバイルでの最小高さを保証 */
    }

    /* Stats */
    .stats {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .stats__number {
        font-size: 32px;
    }

    .stats__label {
        font-size: 13px;
    }

    /* Card Grid */
    .card-grid {
        grid-template-columns: repeat(2, 1fr);
        grid-gap: 20px; /* 古いSafari対応 */
        gap: 20px;
    }

    .card__content {
        padding: 15px;
    }

    .card__category {
        font-size: 11px;
    }

    .card__title {
        font-size: 14px;
        margin-bottom: 10px;
    }

    .card__price {
        font-size: 13px;
    }

    /* Pagination */
    .pagination {
        gap: 10px;
        margin-top: 40px;
    }

    .pagination__btn,
    .pagination__number {
        padding: 6px 10px;
        font-size: 13px;
    }

    /* Form */
    .form {
        padding: 0;
    }

    .form__group {
        margin-bottom: 25px;
    }

    .form__label {
        font-size: 13px;
        margin-bottom: 8px;
    }

    .form__input,
    .form__textarea {
        padding: 10px 12px;
        font-size: 13px;
    }

    .form__textarea {
        min-height: 300px;
    }

    .form__submit {
        padding: 12px 30px;
        font-size: 14px;
        max-width: 100%;
    }

    /* Workshop Info */
    .workshop-info__details {
        gap: 25px;
    }

    .workshop-info__map {
        height: 250px;
    }

    /* Footer */
    .footer {
        padding: 30px 15px 20px;
    }

    .footer__content {
        grid-template-columns: 1fr;
        gap: 25px;
        margin-bottom: 25px;
    }

    /* Hide Menu column and PROGRESS description on mobile */
    .footer__column:nth-child(2) {
        display: none;
    }

    .footer__column:first-child .footer__text {
        display: none;
    }

    .footer__column:nth-child(3) .footer__column-title {
        display: none;
    }

    .footer__column-title {
        font-size: 14px;
        margin-bottom: 15px;
    }

    .footer__link {
        font-size: 12px;
        margin-bottom: 10px;
    }

    .footer__bottom {
        padding-top: 20px;
        font-size: 11px;
    }

    /* Container */
    .container {
        padding: 0 15px;
    }

    /* Utility Classes */
    .mb-40 {
        margin-bottom: 25px;
    }

    .mb-60 {
        margin-bottom: 40px;
    }
}

/* ==========================================
   Landscape Mobile Optimization
   ========================================== */
@media screen and (max-width: 812px) and (orientation: landscape) {
    .hero {
        padding: 40px 20px;
    }

    .section {
        padding: 40px 20px;
    }

    .page-title {
        padding: 30px 20px;
    }
}

/* ==========================================
   Print Styles
   ========================================== */
@media print {
    .header,
    .footer,
    .form__submit,
    .pagination {
        display: none;
    }

    body {
        background-color: white;
        color: black;
    }

    a {
        text-decoration: underline;
    }
}
