/* Section Title - Service */
.is-style-section_ttl.-service::before {
    content: 'Service Lineup';
    display: block;
    color: #f59e0b; /* re-accent */
    margin-bottom: 0.75rem;
    position: static;
    background: none;
    width: auto;
    height: auto;
}

.is-style-section_ttl.-service::after {
    content: '';
    display: block;
    width: 3rem;
    height: 4px;
    background-color: #0077b6; /* re-main */
    margin: 1.5rem auto 0;
}

/* Service Cards - Corner Decoration */
.wp-block-media-text.-service-card {
    position: relative;
}

.wp-block-media-text.-service-card::before {
    content: '';
    position: absolute;
    top: -1rem;
    left: -1rem;
    width: 6rem;
    height: 6rem;
    border-top: 2px solid #0077b6; /* re-main */
    border-left: 2px solid #0077b6;
    z-index: 0;
    pointer-events: none;
}

/* Service Card - Reversed (2nd card) */
.wp-block-media-text.-service-card:nth-of-type(2) {
    direction: rtl;
}

.wp-block-media-text.-service-card:nth-of-type(2) > * {
    direction: ltr;
}

.wp-block-media-text.-service-card:nth-of-type(2)::before {
    top: auto;
    left: auto;
    bottom: -1rem;
    right: -1rem;
    border-top: none;
    border-left: none;
    border-bottom: 2px solid #0077b6; /* re-main */
    border-right: 2px solid #0077b6;
}

/* Service Card - Image Hover Animation */
.wp-block-media-text.-service-card .wp-block-media-text__media {
    overflow: hidden;
}

.wp-block-media-text.-service-card .wp-block-media-text__media img {
    transition: transform 0.7s ease;
}

.wp-block-media-text.-service-card .wp-block-media-text__media:hover img {
    transform: scale(1.1);
}

/* Service Card - Check Icon Color */
.-service-card .wp-block-media-text__content .swl-inline-icon {
    color: #f59e0b; /* re-accent */
}

/* ===========================================
   Reason Section - Why Choose Us
   =========================================== */

/* Reason Section Header - margin bottom */
.wp-block-group.is-row.is-content-justification-space-between.is-nowrap.is-layout-flex {
    margin-bottom: 3em;
}

/* Reason Image Wrapper */
.-reason-image-wrap {
    position: relative;
    overflow: hidden;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    margin-bottom: 1.5rem;
}

/* Reason Label - Top Left */
.-reason-label {
    position: absolute;
    top: 0;
    left: 0;
    background-color: #0077b6; /* re-main */
    color: #ffffff;
    padding: 0.5rem 1rem;
    z-index: 10;
    border-bottom: 1px solid rgba(255, 255, 255, 0.3);
    border-right: 1px solid rgba(255, 255, 255, 0.3);
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

.-reason-label p {
    margin: 0;
}

/* Reason Card Numbers - 01/02/03 labels via content */
.-reason-01 .-reason-label p,
.-reason-02 .-reason-label p,
.-reason-03 .-reason-label p {
    font-size: 0; /* Hide original text */
}

.-reason-01 .-reason-label p::before,
.-reason-02 .-reason-label p::before,
.-reason-03 .-reason-label p::before {
    font-size: 0.75rem; /* Restore size for generated content */
}

.-reason-01 .-reason-label p::before { content: 'Feature 01'; }
.-reason-02 .-reason-label p::before { content: 'Feature 02'; }
.-reason-03 .-reason-label p::before { content: 'Feature 03'; }

/* Reason Badge - Bottom Right */
.-reason-badge {
    position: absolute;
    bottom: 0;
    right: 0;
    background-color: #ffffff;
    padding: 1rem 1.25rem;
    box-shadow: 0 -4px 6px -1px rgba(0, 0, 0, 0.1);
    border-top: 4px solid #0077b6; /* re-main */
    z-index: 10;
    transform: translateY(0.5rem);
    transition: transform 0.5s ease;
    text-align: left;
}

.-reason-badge::before {
    display: block;
    font-size: 0.75rem; /* 12px - text-xs */
    color: #9ca3af;
    margin-bottom: 0.25rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

/* Badge labels for each reason card - using nth-child */
.-reason-card:nth-child(1) .-reason-badge::before { content: 'History'; }
.-reason-card:nth-child(2) .-reason-badge::before { content: 'Team'; }
.-reason-card:nth-child(3) .-reason-badge::before { content: 'Base'; }

.-reason-card:hover .-reason-badge {
    transform: translateY(0);
}

/* Reason Card Image Hover */
.-reason-image-wrap img {
    transition: transform 0.7s ease;
}

.-reason-card:hover .-reason-image-wrap img {
    transform: scale(1.05);
}

/* Reason Card Title */
.-reason-card h3,
.-reason-card h3.is-style-section_ttl,
.-reason-card h3 span {
    color: #0077b6 !important; /* re-main */
    transition: color 0.3s ease;
    font-weight: 400 !important;
}

.-reason-card h3,
.-reason-card h3.is-style-section_ttl {
    margin-top: 1rem !important;
    margin-bottom: 0.75rem !important;
    text-align: left !important;
}

/* Remove SWELL section_ttl decorations */
.-reason-card h3.is-style-section_ttl::before,
.-reason-card h3.is-style-section_ttl::after {
    display: none !important;
}

.-reason-card:hover h3,
.-reason-card:hover h3.is-style-section_ttl,
.-reason-card:hover h3 span {
    color: #f59e0b !important; /* re-accent */
}

/* Reason Card Text - Left Border */
.swell-block-column.-reason-card > p:last-of-type {
    border-left: 2px solid #ffffff;
    padding-left: 1rem;
    margin-top: 1rem;
    font-size: 0.875rem; /* 14px */
    font-weight: 300;
    line-height: 1.625;
    color: #4b5563; /* gray-600 */
}


/* ===========================================
   Service Section
   =========================================== */

/* Service Card - Title with Line Decoration */
.wp-block-media-text.-service-card .wp-block-media-text__content h3 {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.wp-block-media-text.-service-card .wp-block-media-text__content h3::before {
    content: '' !important;
    display: block !important;
    position: static !important;
    width: 3rem !important;
    height: 4px !important;
    background-color: #0077b6 !important; /* re-main */
    flex-shrink: 0;
}


/* ===========================================
   Works Section - Portfolio Grid
   =========================================== */

/* Grid Layout for Works Cards */
.-works-grid .swell-block-columns__inner {
    display: grid !important;
    grid-template-columns: 1fr 1fr;
    grid-template-rows: auto auto;
    gap: 2rem;
}

/* Medical Card - Spans 2 rows */
.-works-grid .swell-block-column:nth-child(1) {
    grid-row: span 2;
    position: relative;
    min-height: 600px;
    overflow: hidden;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
}
@media (min-width: 960px) {
    .-works-grid .swell-block-column:nth-child(1) {
        width: 100% !important;
    }
}

/* HR & Education Cards - PC専用 */
@media (min-width: 960px) {
    .-works-grid .swell-block-column:nth-child(2),
    .-works-grid .swell-block-column:nth-child(3) {
        width: 100% !important;
    }
}

/* Medical Card - Image wrapper (first group with is-row) */
.-works-grid .swell-block-column:nth-child(1) > .wp-block-group.is-row {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    margin: 0;
    padding: 0;
}

.-works-grid .swell-block-column:nth-child(1) > .wp-block-group.is-row .wp-block-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    margin: 0;
}

.-works-grid .swell-block-column:nth-child(1) > .wp-block-group.is-row .wp-block-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.7s ease;
}

.-works-grid .swell-block-column:nth-child(1):hover .wp-block-image img {
    transform: scale(1.05);
}

/* Medical Card - Label (p inside first group) */
.-works-grid .swell-block-column:nth-child(1) > .wp-block-group.is-row > p {
    position: absolute;
    top: 0;
    left: 0;
    background-color: #0077b6;
    color: #ffffff;
    padding: 0.75rem 1.5rem;
    z-index: 10;
    border-bottom: 1px solid rgba(255, 255, 255, 0.3);
    border-right: 1px solid rgba(255, 255, 255, 0.3);
    margin: 0;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    font-size: 0.75rem;
}

.-works-grid .swell-block-column:nth-child(1) > .wp-block-group.is-row > p strong {
    font-weight: 700;
}

/* Medical Card - Content Overlay (second group with is-stack) */
.-works-grid .swell-block-column:nth-child(1) > .wp-block-group.is-stack {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(to top, rgba(17, 24, 39, 0.9), transparent);
    padding: 3rem 2rem 2rem;
    z-index: 10;
}

.-works-grid .swell-block-column:nth-child(1) h3,
.-works-grid .swell-block-column:nth-child(1) h3.is-style-section_ttl {
    color: #ffffff !important;
    font-size: 1.875rem;
    margin-bottom: 0.5rem;
}

.-works-grid .swell-block-column:nth-child(1) h3.is-style-section_ttl::before,
.-works-grid .swell-block-column:nth-child(1) h3.is-style-section_ttl::after {
    display: none !important;
}

.-works-grid .swell-block-column:nth-child(1) > .wp-block-group.is-stack p {
    color: #e5e7eb;
    font-size: 0.875rem;
    line-height: 1.625;
    font-weight: 300;
    margin-bottom: 0.5rem;
}

.-works-grid .swell-block-column:nth-child(1) > .wp-block-group.is-stack p:last-child {
    color: #f59e0b;
    font-weight: 700;
    margin-bottom: 0;
}

/* HR & Education Cards - Small style */
.-works-grid .swell-block-column:nth-child(2),
.-works-grid .swell-block-column:nth-child(3) {
    display: flex;
    flex-direction: column;
}

/* Override SWELL is-row flexbox for image wrapper */
.-works-grid .swell-block-column:nth-child(2) > .wp-block-group.is-row,
.-works-grid .swell-block-column:nth-child(3) > .wp-block-group.is-row {
    display: block !important;
    position: relative;
    overflow: hidden;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    aspect-ratio: 16 / 9;
    height: auto;
    margin-bottom: 1rem;
}

.-works-grid .swell-block-column:nth-child(2) > .wp-block-group.is-row .wp-block-image,
.-works-grid .swell-block-column:nth-child(3) > .wp-block-group.is-row .wp-block-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    margin: 0;
}

.-works-grid .swell-block-column:nth-child(2) > .wp-block-group.is-row img,
.-works-grid .swell-block-column:nth-child(3) > .wp-block-group.is-row img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.7s ease;
}

.-works-grid .swell-block-column:nth-child(2):hover > .wp-block-group.is-row img,
.-works-grid .swell-block-column:nth-child(3):hover > .wp-block-group.is-row img {
    transform: scale(1.05);
}

/* HR & Education - Labels */
.-works-grid .swell-block-column:nth-child(2) > .wp-block-group.is-row > p,
.-works-grid .swell-block-column:nth-child(3) > .wp-block-group.is-row > p {
    position: absolute;
    top: 0;
    left: 0;
    background-color: rgba(255, 255, 255, 0.9);
    color: #0077b6;
    padding: 0.5rem 1rem;
    z-index: 10;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    font-size: 0.75rem;
    font-weight: 700;
    margin: 0;
}

/* HR & Education - Content */
.-works-grid .swell-block-column:nth-child(2) > .wp-block-group:last-child,
.-works-grid .swell-block-column:nth-child(3) > .wp-block-group:last-child {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
}

.-works-grid .swell-block-column:nth-child(2) h3,
.-works-grid .swell-block-column:nth-child(3) h3,
.-works-grid .swell-block-column:nth-child(2) h3.is-style-section_ttl,
.-works-grid .swell-block-column:nth-child(3) h3.is-style-section_ttl {
    color: #0077b6 !important;
    font-size: 1.25rem;
    transition: color 0.3s ease;
    margin-bottom: 0.25rem;
}

.-works-grid .swell-block-column:nth-child(2) h3.is-style-section_ttl::before,
.-works-grid .swell-block-column:nth-child(2) h3.is-style-section_ttl::after,
.-works-grid .swell-block-column:nth-child(3) h3.is-style-section_ttl::before,
.-works-grid .swell-block-column:nth-child(3) h3.is-style-section_ttl::after {
    display: none !important;
}

.-works-grid .swell-block-column:nth-child(2):hover h3,
.-works-grid .swell-block-column:nth-child(3):hover h3 {
    color: #f59e0b !important;
}

.-works-grid .swell-block-column:nth-child(2) > .wp-block-group:last-child p,
.-works-grid .swell-block-column:nth-child(3) > .wp-block-group:last-child p {
    color: #6b7280;
    font-size: 0.75rem;
    line-height: 1.5;
}

/* Responsive - Tablet and below */
@media (max-width: 959px) {
    .-works-grid .swell-block-columns__inner {
        grid-template-columns: 1fr;
        grid-template-rows: auto;
    }

    .-works-grid .swell-block-column:nth-child(1) {
        grid-row: span 1;
        min-height: 400px;
    }
}


/* ===========================================
   Contact Section - お問い合わせ
   =========================================== */

/* Contact Section Container */
.swell-block-fullWide.-contact {
    position: relative;
    overflow: hidden;
    background-color: #f8fafc !important; /* slate-50 */
    border-top: 2px solid #0077b6; /* re-main */
    padding-top: 7rem !important;
    padding-bottom: 7rem !important;
}

/* Blueprint Grid Pattern */
.swell-block-fullWide.-contact::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image:
        linear-gradient(#3bd8f7 1px, transparent 1px),
        linear-gradient(90deg, #3bd8f7 1px, transparent 1px);
    background-size: 40px 40px;
    opacity: 0.2;
    pointer-events: none;
    z-index: 0;
}

/* Contact Inner - ensure content is above grid */
.swell-block-fullWide.-contact .swell-block-fullWide__inner {
    position: relative;
    z-index: 1;
    text-align: center;
    max-width: 56rem; /* max-w-4xl */
}

/* Contact Title */
.swell-block-fullWide.-contact h2.is-style-section_ttl {
    margin-bottom: 2rem !important;
}

/* Remove SWELL section_ttl decorations for contact */
.swell-block-fullWide.-contact h2.is-style-section_ttl::before,
.swell-block-fullWide.-contact h2.is-style-section_ttl::after {
    display: none !important;
}

/* Contact Description */
.swell-block-fullWide.-contact p.has-text-align-center {
    margin-bottom: 4rem !important;
}

/* Contact CTA Button */
.swell-block-fullWide.-contact .swell-block-button .swell-block-button__link {
    display: inline-block;
    background-color: #f59e0b !important; /* re-accent */
    color: #ffffff !important;
    padding: 1.25rem 3rem !important;
    border: none !important;
    border-radius: 0 !important;
    box-shadow: 0 10px 15px -3px rgba(245, 158, 11, 0.4);
    transition: all 0.3s ease;
}

.swell-block-fullWide.-contact .swell-block-button .swell-block-button__link:hover {
    background-color: #0077b6 !important; /* re-main */
    box-shadow: 0 10px 15px -3px rgba(0, 119, 182, 0.4);
    transform: translateY(-2px);
}

/* Responsive - Mobile */
@media (max-width: 599px) {
    .swell-block-fullWide.-contact {
        padding-top: 4rem !important;
        padding-bottom: 4rem !important;
    }

    .swell-block-fullWide.-contact p.has-text-align-center {
        margin-bottom: 2.5rem !important;
    }

    .swell-block-fullWide.-contact .swell-block-button .swell-block-button__link {
        padding: 1rem 2rem !important;
    }
}


/* ===========================================
   Company Section - 会社概要
   =========================================== */

/* Company Section Container */
.swell-block-fullWide.-company {
    background-color: #ffffff !important;
}

/* Company Title with bottom border */
.swell-block-fullWide.-company h2.is-style-section_ttl {
    padding-bottom: 1rem;
    margin-bottom: 2.5rem !important;
    border-bottom: 1px solid #e5e7eb;
}

/* Remove SWELL section_ttl decorations */
.swell-block-fullWide.-company h2.is-style-section_ttl::before,
.swell-block-fullWide.-company h2.is-style-section_ttl::after {
    display: none !important;
}

/* Company Info Rows */
.swell-block-fullWide.-company .wp-block-group.is-row {
    margin-bottom: 1.5rem;
    gap: 1rem;
    align-items: flex-start;
}

/* Company Info - Label (COMPANY, LOCATION) */
.swell-block-fullWide.-company .wp-block-group.is-row > p:first-child {
    color: #6b7280;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    min-width: 100px;
    flex-shrink: 0;
}

/* Company Info - Value */
.swell-block-fullWide.-company .wp-block-group.is-row > p:last-child {
    flex: 1;
}

/* Map iframe container */
.swell-block-fullWide.-company .swell-block-column:last-child {
    min-height: 300px;
}

/* Map iframe styling */
.swell-block-fullWide.-company iframe {
    border: 1px solid #e5e7eb;
    filter: grayscale(100%);
    transition: filter 0.3s ease;
}

.swell-block-fullWide.-company iframe:hover {
    filter: grayscale(0%);
}

/* Responsive - Tablet and below */
@media (max-width: 959px) {
    .swell-block-fullWide.-company .swell-block-columns__inner {
        gap: 2rem;
    }
}
