/* ==========================================================================
   加工内容ページ専用スタイル
   ========================================================================== */

/* ヒーローセクション */
.page-template-page-processing .hero,
.page-id-26 .hero,
.page.processing .hero {
    height: 200px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
    background-image: url('../images/processing-hero.jpg');
    background-size: cover;
    background-position: center;
}

.page-template-page-processing .hero::before,
.page-id-26 .hero::before,
.page.processing .hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(15, 23, 42, 0.75);
}

.page-template-page-processing .hero-content,
.page-id-26 .hero-content,
.page.processing .hero-content {
    text-align: center;
    color: var(--white);
    position: relative;
    z-index: 2;
    padding: 0 2rem;
}

.page-template-page-processing .hero h1,
.page-id-26 .hero h1,
.page.processing .hero h1 {
    font-size: 2.5rem;
    font-weight: 900;
    margin: 0 0 0.5rem 0;
    text-shadow: 2px 2px 8px rgba(0,0,0,0.5);
}

.page-template-page-processing .hero .subtitle,
.page-id-26 .hero .subtitle,
.page.processing .hero .subtitle {
    font-size: 1.1rem;
    margin: 0;
    opacity: 0.95;
}

/* メインコンテンツ */
.page-template-page-processing main {
    background: var(--bg-light);
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 2rem;
}

/* 加工設備セクション */
.equipment-section {
    padding: 5rem 0;
    background: var(--white);
    position: relative;
    overflow: hidden;
}

.equipment-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--bg-gray), transparent);
}

.equipment-list {
    display: flex;
    flex-direction: column;
    gap: 0;
    width: 100%;
}

.equipment-item {
    position: relative;
    height: 500px;
    margin: 0;
    overflow: visible;
    cursor: pointer;
    transition: all 0.4s ease;
    opacity: 0;
    transform: translateY(30px);
}

.equipment-item.fade-in {
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

.equipment-item:nth-child(odd).fade-in {
    animation: slideInLeft 0.8s ease forwards;
}

.equipment-item:nth-child(even).fade-in {
    animation: slideInRight 0.8s ease forwards;
}

@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-50px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(50px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.equipment-item:hover {
    box-shadow: 0 0 50px rgba(0,0,0,0.1);
    z-index: 10;
}

.equipment-image {
    position: absolute;
    top: 0;
    width: 85%;
    height: 500px;
    overflow: hidden;
    background: var(--bg-gray);
}

.equipment-item:nth-child(odd) .equipment-image {
    left: 0;
}

.equipment-item:nth-child(even) .equipment-image {
    right: 0;
}

.equipment-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s ease;
    -webkit-touch-callout: none;
    -webkit-user-select: none;
    user-select: none;
}

.equipment-item:hover .equipment-image img {
    transform: scale(1.1);
}

.equipment-image::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, transparent 50%, rgba(30, 58, 138, 0.8));
    opacity: 0;
    transition: opacity 0.4s ease;
}

.equipment-item:hover .equipment-image::after {
    opacity: 1;
}

.equipment-content {
    position: absolute;
    bottom: 2rem;
    padding: 1.5rem 2rem;
    background: rgba(15, 23, 42, 0.95);
    backdrop-filter: blur(10px);
    color: var(--white);
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
    transition: all 0.3s ease;
    z-index: 10;
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.equipment-item:nth-child(odd) .equipment-content {
    left: 2rem;
}

.equipment-item:nth-child(even) .equipment-content {
    right: 2rem;
}

.equipment-item:hover .equipment-content {
    transform: scale(1.02);
    box-shadow: 0 15px 40px rgba(0,0,0,0.4);
}

.equipment-content h3 {
    font-size: 1.6rem;
    font-weight: 700;
    color: var(--white);
    margin: 0;
}

.arrow-btn {
    width: 45px;
    height: 45px;
    background: var(--white);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    border: none;
    flex-shrink: 0;
}

.arrow-btn i {
    color: var(--primary-color);
    font-size: 1.1rem;
    transition: transform 0.3s ease;
}

.arrow-btn:hover {
    background: rgba(255, 255, 255, 0.9);
    transform: scale(1.1);
}

.arrow-btn:hover i {
    transform: translateX(3px);
}

/* 加工内容詳細セクション */
.processing-section {
    padding: 3rem 0 5rem 0;
    background: var(--bg-light);
    position: relative;
}

.processing-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2.5rem;
    margin-top: 3rem;
}

.processing-item {
    display: flex;
    flex-direction: column;
    background: var(--white);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(15, 23, 42, 0.08);
    transition: all 0.4s ease;
}

.processing-item:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 30px rgba(15, 23, 42, 0.15);
}

.processing-image {
    width: 100%;
    height: 240px;
    overflow: hidden;
    background: var(--bg-light);
    position: relative;
}

.processing-image.clickable-image {
    cursor: pointer;
}

.processing-image.clickable-image img {
    cursor: pointer;
}

.processing-image::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(to bottom, transparent 0%, rgba(15, 23, 42, 0.05) 100%);
    transition: background 0.3s ease;
    pointer-events: none; /* クリックイベントを透過 */
}

.processing-image.clickable-image:hover::after {
    background: linear-gradient(to bottom, transparent 0%, rgba(15, 23, 42, 0.2) 100%);
}

.processing-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.processing-item:hover .processing-image img {
    transform: scale(1.08);
}

.processing-content {
    padding: 2rem 1.8rem;
    background: var(--white);
}

.processing-content h3 {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--primary-color);
    margin: 0 0 1rem 0;
    line-height: 1.4;
}

.processing-content p {
    font-size: 0.95rem;
    color: var(--text-light);
    margin: 0;
    line-height: 1.8;
}

/* お問い合わせCTAセクション */
.cta-section {
    background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
    padding: 5rem 0;
    position: relative;
    overflow: hidden;
}

.cta-section::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -10%;
    width: 500px;
    height: 500px;
    background: rgba(255,255,255,0.05);
    border-radius: 50%;
    animation: floatAnimation 15s ease-in-out infinite;
}

.cta-section::after {
    content: '';
    position: absolute;
    bottom: -30%;
    left: -5%;
    width: 300px;
    height: 300px;
    background: rgba(255,255,255,0.03);
    border-radius: 50%;
    animation: floatAnimation 20s ease-in-out infinite reverse;
}

@keyframes floatAnimation {
    0%, 100% {
        transform: translateY(0) rotate(0deg);
    }
    50% {
        transform: translateY(-20px) rotate(10deg);
    }
}

.cta-content {
    text-align: center;
    position: relative;
    z-index: 1;
}

.cta-content h2 {
    color: var(--white);
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.2);
}

.cta-content p {
    color: rgba(255,255,255,0.9);
    font-size: 1.2rem;
    margin-bottom: 3rem;
}

.cta-actions {
    display: flex;
    gap: 2rem;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    margin-bottom: 2rem;
}

.cta-phone {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    padding: 1.5rem 2.5rem;
    background: rgba(255,255,255,0.15);
    backdrop-filter: blur(10px);
    border: 2px solid rgba(255,255,255,0.3);
    border-radius: 60px;
    color: var(--white);
    text-decoration: none;
    transition: all 0.3s ease;
}

.cta-phone:hover {
    background: rgba(255,255,255,0.25);
    transform: translateY(-3px);
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
}

.cta-phone i {
    font-size: 1.5rem;
    background: var(--white);
    color: var(--primary-color);
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.cta-phone div {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.cta-label {
    font-size: 0.9rem;
    opacity: 0.9;
}

.cta-number {
    font-size: 1.8rem;
    font-weight: 700;
    letter-spacing: 0.05em;
}

.cta-button {
    display: inline-flex;
    align-items: center;
    gap: 1rem;
    padding: 1.2rem 2.5rem;
    background: var(--white);
    color: var(--primary-color);
    border-radius: 50px;
    text-decoration: none;
    font-weight: 600;
    font-size: 1.1rem;
    transition: all 0.3s ease;
    box-shadow: 0 5px 20px rgba(0,0,0,0.1);
}

.cta-button:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
}

.cta-button i {
    font-size: 1.2rem;
}

.cta-hours {
    color: rgba(255,255,255,0.8);
    font-size: 1rem;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.8rem 1.5rem;
    background: rgba(255,255,255,0.1);
    border-radius: 25px;
}

.cta-hours i {
    color: #60a5fa;
}

/* 画像拡大モーダル */
.image-modal {
    display: none;
    position: fixed;
    z-index: 10000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.95);
    overflow: hidden;
}

.image-modal.active {
    display: flex;
    align-items: center;
    justify-content: center;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.modal-close-btn {
    position: absolute;
    top: 20px;
    right: 35px;
    color: #fff;
    font-size: 40px;
    font-weight: bold;
    cursor: pointer;
    z-index: 10001;
    transition: all 0.3s ease;
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
}

.modal-close-btn:hover,
.modal-close-btn:focus {
    background: rgba(255, 255, 255, 0.1);
    transform: rotate(90deg);
}

.modal-content-wrapper {
    max-width: 90%;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    animation: zoomIn 0.3s ease;
}

@keyframes zoomIn {
    from {
        transform: scale(0.7);
        opacity: 0;
    }
    to {
        transform: scale(1);
        opacity: 1;
    }
}

.modal-image-content {
    max-width: 100%;
    max-height: 80vh;
    object-fit: contain;
    border-radius: 8px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.8);
}

.modal-caption {
    color: #fff;
    font-size: 1.2rem;
    text-align: center;
    padding: 1rem 2rem;
    background: rgba(0, 0, 0, 0.5);
    border-radius: 8px;
    max-width: 600px;
}

/* タブレット用レイアウト調整 */
@media (max-width: 1024px) {
    /* グリッドレイアウト変換 */
    .processing-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1.25rem;
    }

    /* 設備セクション調整 */
    .equipment-item {
        height: 400px;
    }

    .equipment-image {
        width: 100%;
    }

    .equipment-item:nth-child(odd) .equipment-image,
    .equipment-item:nth-child(even) .equipment-image {
        left: 0;
        right: 0;
    }

    .equipment-content {
        width: auto;
        bottom: 1rem;
        padding: 1rem 1.5rem;
    }

    .equipment-item:nth-child(odd) .equipment-content,
    .equipment-item:nth-child(even) .equipment-content {
        left: 1rem !important;
        right: 1rem !important;
        max-width: calc(100% - 2rem);
    }

    .equipment-content h3 {
        font-size: 1.25rem;
    }

    /* タッチ領域最適化 */
    .arrow-btn {
        width: 44px;
        height: 44px;
    }

    .arrow-btn i {
        font-size: 1rem;
    }

    /* 加工内容カード調整 */
    .processing-item {
        height: 280px;
    }

    .processing-content {
        padding: 1.1rem;
    }

    .processing-content h3 {
        font-size: 1.15rem;
    }
}

/* タブレット用調整 */
@media (max-width: 768px) {
    /* タイポグラフィ調整 */
    .hero-processing h1 {
        font-size: 2rem;
        line-height: 1.3;
    }

    .hero-processing .subtitle {
        font-size: 1.1rem;
    }

    .section-title {
        font-size: 1.75rem;
        margin-bottom: 0.5rem;
    }

    .section-title-en {
        font-size: 0.75rem;
        margin-bottom: 0.3rem;
    }

    .section-subtitle {
        font-size: 0.95rem;
        margin-bottom: 2rem;
        line-height: 1.6;
    }

    /* スペーシング調整 */
    .container {
        padding: 0 1rem;
    }

    .equipment-section,
    .processing-section {
        padding: 3rem 0;
    }

    .cta-section {
        padding: 3rem 0;
    }

    /* 加工内容グリッド - SP時は1列 */
    .processing-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
        margin-top: 2rem;
    }

    .processing-image {
        height: 220px;
    }

    .processing-content {
        padding: 1.5rem;
    }

    .processing-content h3 {
        font-size: 1.15rem;
        margin-bottom: 0.8rem;
    }

    .processing-content p {
        font-size: 0.9rem;
        line-height: 1.7;
    }

    /* CTA要素の調整 */
    .cta-content h2 {
        font-size: 1.75rem;
        line-height: 1.3;
        margin-bottom: 0.75rem;
    }

    .cta-content p {
        font-size: 1rem;
        margin-bottom: 2rem;
    }

    .cta-actions {
        flex-direction: column;
        gap: 1rem;
    }

    .cta-phone {
        width: 100%;
        justify-content: center;
        padding: 1.2rem 1.5rem;
    }

    .cta-phone i {
        width: 44px;
        height: 44px;
        font-size: 1.3rem;
    }

    .cta-label {
        font-size: 0.85rem;
    }

    .cta-number {
        font-size: 1.5rem;
    }

    .cta-button {
        width: 100%;
        justify-content: center;
        padding: 1rem 1.5rem;
        font-size: 1rem;
    }

    .cta-hours {
        font-size: 0.9rem;
        padding: 0.7rem 1.2rem;
    }
}

/* モバイル用調整 */
@media (max-width: 640px) {
    /* ヒーローセクション */
    .hero-processing {
        height: 150px;
    }

    .hero-processing h1 {
        font-size: 1.75rem;
        margin-bottom: 0.3rem;
    }

    .hero-processing .subtitle {
        font-size: 0.95rem;
    }

    /* セクションタイトル */
    .section-title {
        font-size: 1.5rem;
        padding-bottom: 0.75rem;
    }

    .section-title::after {
        width: 40px;
        height: 2px;
    }

    /* グリッドレイアウト */
    .processing-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
        margin-top: 2rem;
    }

    .processing-item {
        height: 250px;
    }

    .processing-content {
        padding: 1rem;
    }

    .processing-content h3 {
        font-size: 1.1rem;
    }

    .processing-content p {
        font-size: 0.8rem;
    }

    .processing-features li {
        font-size: 0.75rem;
        padding: 0.15rem 0;
    }

    /* 設備セクション */
    .equipment-item {
        height: auto;
        display: flex;
        flex-direction: column;
        margin-bottom: 2rem;
    }

    .equipment-image {
        position: relative;
        width: 100%;
        height: 250px;
        border-radius: 10px 10px 0 0;
        overflow: hidden;
    }

    .equipment-content {
        position: relative;
        bottom: auto;
        left: 0 !important;
        right: 0 !important;
        padding: 1rem 1.2rem;
        gap: 1rem;
        width: 100%;
        max-width: 100%;
        margin: 0;
        border-radius: 0 0 10px 10px;
    }

    .equipment-item:nth-child(odd) .equipment-content,
    .equipment-item:nth-child(even) .equipment-content {
        left: 0 !important;
        right: 0 !important;
        max-width: 100%;
    }

    .equipment-content h3 {
        font-size: 1.1rem;
    }

    .arrow-btn {
        width: 44px;
        height: 44px;
    }

    /* 画像拡大モーダル */
    .modal-close-btn {
        top: 10px;
        right: 10px;
        font-size: 32px;
        width: 44px;
        height: 44px;
    }

    .modal-content-wrapper {
        max-width: 95%;
    }

    .modal-image-content {
        max-height: 70vh;
    }

    .modal-caption {
        font-size: 1rem;
        padding: 0.75rem 1rem;
    }
}

/* 極小モバイル用追加調整 */
@media (max-width: 375px) {
    .hero-processing h1 {
        font-size: 1.5rem;
    }

    .hero-processing .subtitle {
        font-size: 0.875rem;
    }

    .section-title {
        font-size: 1.25rem;
    }

    .cta-content h2 {
        font-size: 1.5rem;
    }

    .cta-number {
        font-size: 1.25rem;
    }

    .processing-item {
        height: 220px;
    }

    .processing-content h3 {
        font-size: 1rem;
    }
}