:root {
    --color-bg: #ffffff;
    --color-bg-light: #f9f9f9;
    --color-text-main: #222222;
    --color-text-muted: #666666;
    --color-border: #e2e2e2;
    --color-accent: #000000;

    --font-sans: 'Noto Sans JP', sans-serif;
    --transition-fast: 0.3s ease;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* Horizontal scroll fix applied to html and body */
html,
body {
    scroll-behavior: smooth;
    font-size: 16px;
    font-family: var(--font-sans);
    overflow-x: hidden;
    width: 100%;
    position: relative;
}

body {
    background-color: var(--color-bg);
    background-image: linear-gradient(rgba(255, 255, 255, 0.92), rgba(255, 255, 255, 0.92)), url('images/hasselblad.jpg');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    background-repeat: no-repeat;
    color: var(--color-text-main);
    line-height: 1.8;
}

/* Scroll Animations */
.fade-in {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s cubic-bezier(0.25, 0.8, 0.25, 1), transform 0.8s cubic-bezier(0.25, 0.8, 0.25, 1);
}

.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Utilities */
/* FIX: padding-left/right ensures modern-section 8rem top padding is NOT wiped out! */
.container {
    max-width: 1100px;
    margin: 0 auto;
    padding-left: 5%;
    padding-right: 5%;
}

.container-md {
    max-width: 1000px;
}

.text-center {
    text-align: center;
}

.text-justify {
    text-align: justify;
}

.text-left {
    text-align: left;
}

.text-muted {
    color: var(--color-text-muted);
}

.text-bold {
    font-weight: 700;
}

.text-sm {
    font-size: 0.85rem;
}

.text-lg {
    font-size: 1.15rem;
}

.fw-bold {
    font-weight: 700;
}

.fw-normal {
    font-weight: 400;
}

.mb-0 {
    margin-bottom: 0;
}

.mb-1 {
    margin-bottom: 0.25rem;
}

.mb-2 {
    margin-bottom: 0.5rem;
}

.mb-3 {
    margin-bottom: 1rem;
}

.mb-4 {
    margin-bottom: 2rem;
}

.mb-5 {
    margin-bottom: 3.5rem;
}

.mt-2 {
    margin-top: 0.5rem;
}

.mt-3 {
    margin-top: 1rem;
}

.mt-4 {
    margin-top: 2rem;
}

.mt-5 {
    margin-top: 4rem;
}

.ml-2 {
    margin-left: 0.5rem;
}

.mx-auto {
    margin-left: auto;
    margin-right: auto;
}

.pt-2 {
    padding-top: 0.5rem;
}

.pt-4 {
    padding-top: 2rem;
}

.pt-5 {
    padding-top: 3.5rem;
}

.pb-0 {
    padding-bottom: 0 !important;
}

.pb-3 {
    padding-bottom: 1rem;
}

.py-5 {
    padding: 3rem 0;
}

.bg-light {
    background-color: rgba(249, 249, 249, 0.6); /* Translucent slightly gray */
    border-top: 1px solid var(--color-border);
    border-bottom: 1px solid var(--color-border);
}

.bg-pattern {
    position: relative;
    background-color: rgba(244, 244, 244, 0.5); /* Translucent soft gray */
    z-index: 1;
}

.border-none {
    border: none !important;
}

.border-top {
    border-top: 1px solid var(--color-border);
}

.d-none {
    display: none;
}

.d-block {
    display: block;
}

@media (min-width: 1200px) {
    .d-md-none {
        display: none !important;
    }
}

a {
    color: var(--color-accent);
    text-decoration: none;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
    filter: grayscale(100%);
}

h1,
h2,
h3,
h4,
h5 {
    font-weight: 700;
    line-height: 1.4;
    color: var(--color-text-main);
}

/* Header & Nav */
.top-header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    padding: 1rem 0;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    z-index: 100;
    border-bottom: 1px solid var(--color-border);
}

.header-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1400px;
    margin: 0 auto;
    padding-left: 5%;
    padding-right: 5%;
}

.logo {
    font-size: 1.25rem;
    font-weight: 800;
    letter-spacing: 0.1em;
    z-index: 102;
}

.global-nav ul {
    display: flex;
    gap: 2rem;
    list-style: none;
    margin: 0;
    padding: 0;
}

.global-nav a {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    color: var(--color-text-main);
    font-size: 0.85rem;
    font-weight: 500;
    transition: var(--transition-fast);
}

.global-nav a:hover {
    color: var(--color-text-muted);
}

.nav-en {
    font-size: 0.7rem;
    color: var(--color-text-muted);
    font-family: 'Montserrat', sans-serif;
    letter-spacing: 0.05em;
    margin-bottom: 0.2rem;
    font-weight: 600;
}

.btn-top-apply {
    font-size: 0.85rem;
    padding: 0.5rem 1.5rem;
    border: 1px solid var(--color-text-main);
    border-radius: 50px;
    transition: var(--transition-fast);
    z-index: 102;
    background: transparent;
    color: var(--color-text-main);
    font-weight: 600;
}

.btn-top-apply:hover {
    background-color: var(--color-text-main);
    color: #fff;
}

.hamburger-menu {
    display: none;
    flex-direction: column;
    cursor: pointer;
    gap: 5px;
    z-index: 102;
}

.hamburger-menu .bar {
    width: 25px;
    height: 2px;
    background-color: var(--color-text-main);
    transition: 0.3s;
}

@media (max-width: 1199px) {
    .global-nav {
        position: fixed;
        top: 0;
        right: -100%;
        width: 250px;
        height: 100vh;
        background: rgba(255, 255, 255, 0.98);
        backdrop-filter: blur(10px);
        display: flex;
        flex-direction: column;
        justify-content: center;
        transition: 0.3s ease-in-out;
        z-index: 101;
        box-shadow: -2px 0 10px rgba(0, 0, 0, 0.1);
    }

    .global-nav.active {
        right: 0;
    }

    .global-nav ul {
        flex-direction: column;
        align-items: center;
        gap: 2.5rem;
        padding-top: 3rem;
    }

    .hamburger-menu {
        display: flex;
    }

    .hamburger-menu.active .bar:nth-child(1) {
        transform: translateY(7px) rotate(45deg);
    }

    .hamburger-menu.active .bar:nth-child(2) {
        opacity: 0;
    }

    .hamburger-menu.active .bar:nth-child(3) {
        transform: translateY(-7px) rotate(-45deg);
    }

    .btn-top-apply {
        display: none;
    }
}

/* Hero Section (Desktop defaults) */
.modern-hero {
    position: relative;
    height: 100vh;
    display: flex;
    align-items: flex-start;
    background-color: #111;
}

.hero-bg-slider {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    z-index: 1;
}

.hero-bg-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    opacity: 0;
    transition: opacity 1.5s ease-in-out;
}

.hero-bg-slide.active {
    opacity: 1;
    transform: scale(1.02);
    transition: opacity 1.5s ease-in-out, transform 8s ease-out;
}

/* In desktop, these wrappers stack nicely inside standard container */
.hero-content {
    position: relative;
    z-index: 2;
    padding: 12vh 0 10vh 0;
    width: 100%;
    height: 100vh;
    text-align: right;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    justify-content: space-between;
    gap: 0.5rem;
}

.hero-overlay-text {
    display: block;
    padding-left: 5%;
    padding-right: 0;
    width: 100%;
}

.hero-below-text {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    text-align: left;
    margin-top: 0;
    padding-left: 0;
    padding-right: 5%;
    width: 100%;
}

.hero-cta {
    margin-top: 1.5rem !important;
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.eyecatch {
    font-size: 0.9rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    color: #fff;
    display: block;
    margin-bottom: 1rem;
    font-family: 'Montserrat', sans-serif;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.8);
}

.hero-title {
    font-size: clamp(2.2rem, 5vw, 3.8rem);
    font-weight: 800;
    letter-spacing: 0.05em;
    margin-bottom: 1.5rem;
    line-height: 1.4;
    color: #fff;
    text-shadow: 0 4px 20px rgba(0, 0, 0, 0.5), 0 2px 10px rgba(0, 0, 0, 0.8);
}

.hero-sub {
    font-size: 1.1rem;
    color: #fff;
    max-width: 650px;
    line-height: 1.8;
    margin-bottom: 1rem;
    font-weight: 600;
    text-shadow: 0 4px 15px rgba(0, 0, 0, 0.5), 0 2px 10px rgba(0, 0, 0, 0.8);
}

.hero-deadline {
    color: #fff;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.8);
}

/* Sections */
/* Increased section vertical padding for more breathing room */
.modern-section {
    padding: 8rem 0;
}

.section-title-wrap {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-bottom: 4rem;
}

.section-subtitle {
    order: 1;
    font-family: 'Montserrat', sans-serif;
    font-size: 1rem;
    font-weight: 600;
    color: var(--color-text-muted);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-bottom: 0.5rem;
}

.section-title {
    order: 2;
    font-size: 2.5rem;
    font-weight: 700;
    letter-spacing: 0.05em;
    margin: 0;
}

/* About & Overview */
.overview-section {
    border-top: 1px dashed var(--color-border);
}

.overview-title {
    font-size: 1.5rem;
    font-weight: 700;
}

.overview-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
}

.overview-box-item {
    background: #fff;
    border: 1px solid var(--color-border);
    padding: 1.5rem 0.5rem;
    border-radius: 4px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    min-height: 120px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.03);
    transition: all 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
}

.overview-box-item:hover {
    transform: translateY(-8px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.08);
    border-color: var(--color-text-main);
}

/* Projects Grid */
.project-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 4rem;
    max-width: 1200px;
    margin: 0 auto;
}

@media (min-width: 1025px) {
    .project-grid {
        grid-template-columns: 1fr 1fr;
        gap: 2.5rem;
    }
}

.project-card {
    background: #fff;
    border: 1px solid var(--color-border);
    border-radius: 4px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: all 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.03);
}

.project-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
    border-color: var(--color-text-muted);
}

.card-image {
    position: relative;
    aspect-ratio: 1/1;
    overflow: hidden;
    background: #eee;
    width: 100%;
}

.project-number {
    font-family: 'Montserrat', sans-serif;
    font-size: 3rem;
    font-weight: 800;
    color: #e0e0e0;
    line-height: 1;
    margin-bottom: 0.5rem;
    display: block;
    letter-spacing: -2px;
}

/* CSS Crossfade for 3 images */
.flash-img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0;
    animation: fadeCycle 12s infinite;
}

.img-1 {
    animation-delay: 0s;
}

.img-2 {
    animation-delay: -8s;
}

.img-3 {
    animation-delay: -4s;
}

.hat-img-1 {
    animation-delay: 0s;
}

.hat-img-2 {
    animation-delay: -16s;
}

.hat-img-3 {
    animation-delay: -12s;
}

.hat-img-4 {
    animation-delay: -8s;
}

.hat-img-5 {
    animation-delay: -4s;
}

.flash-img-5 {
    animation-name: fadeCycle5;
    animation-duration: 20s;
}

@keyframes fadeCycle {
    0% {
        opacity: 1;
        z-index: 2;
    }

    30% {
        opacity: 1;
        z-index: 2;
    }

    35% {
        opacity: 0;
        z-index: 1;
    }

    95% {
        opacity: 0;
        z-index: 1;
    }

    100% {
        opacity: 1;
        z-index: 2;
    }
}

@keyframes fadeCycle5 {
    0% {
        opacity: 1;
        z-index: 2;
    }

    15% {
        opacity: 1;
        z-index: 2;
    }

    20% {
        opacity: 0;
        z-index: 1;
    }

    95% {
        opacity: 0;
        z-index: 1;
    }

    100% {
        opacity: 1;
        z-index: 2;
    }
}

.card-text {
    padding: 3rem 2.5rem;
    display: flex;
    flex-direction: column;
    flex: 1;
}

.card-text h3 {
    font-family: 'Montserrat', sans-serif;
    font-size: clamp(1.3rem, 2.5vw, 1.8rem);
    margin-bottom: 0.5rem;
    font-weight: 700;
    color: var(--color-text-main);
    white-space: nowrap;
}

.project-lead {
    color: var(--color-text-main);
    font-size: 1rem;
    line-height: 1.6;
    border-bottom: 1px solid var(--color-border);
    padding-bottom: 1rem;
}

.card-text p {
    color: var(--color-text-muted);
    font-size: 0.95rem;
    line-height: 1.7;
    margin-bottom: 1.5rem;
}

/* Requirements Full Layout */
.req-box-full {
    border: 1px solid var(--color-border);
    padding: 3rem;
    border-radius: 4px;
    background: #fff;
}

.req-item {
    margin-bottom: 2.5rem;
    padding-bottom: 2.5rem;
    border-bottom: 1px dashed var(--color-border);
    transition: all 0.3s ease;
}

.req-item:hover {
    transform: translateX(5px);
}

.req-item:last-child {
    margin-bottom: 0;
    padding-bottom: 0;
}

.req-item h4 {
    font-size: 1.2rem;
    font-weight: 700;
    margin-bottom: 1rem;
    position: relative;
    padding-left: 1rem;
    border-left: 4px solid var(--color-text-main);
}

.req-item p {
    color: var(--color-text-muted);
    font-size: 0.95rem;
    line-height: 1.7;
    margin-bottom: 0;
}

.modern-bullet-list {
    list-style: none;
    margin-bottom: 0;
}

.modern-bullet-list li {
    position: relative;
    padding-left: 1.2rem;
    margin-bottom: 0.8rem;
    font-size: 0.95rem;
    color: var(--color-text-muted);
}

.modern-bullet-list li:last-child {
    margin-bottom: 0;
}

.modern-bullet-list li::before {
    content: '■';
    position: absolute;
    left: 0;
    top: 1px;
    color: var(--color-border);
    font-size: 0.8rem;
}

/* Flow */
.flow-timeline {
    position: relative;
    max-width: 1050px;
    margin: 0 auto;
    padding-left: 2rem;
}

.flow-timeline::before {
    content: '';
    position: absolute;
    left: 3.75rem;
    top: 0;
    bottom: 0;
    width: 2px;
    background: var(--color-border);
    z-index: 1;
    transition: background 0.4s;
}

.flow-step {
    position: relative;
    margin-bottom: 3rem;
    display: flex;
    gap: 2.5rem;
    align-items: flex-start;
    z-index: 2;
}

.step-marker {
    width: 3.5rem;
    height: 3.5rem;
    background: #fff;
    border: 2px solid var(--color-text-main);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: 'Montserrat', sans-serif;
    font-weight: 700;
    font-size: 1.3rem;
    z-index: 3;
    flex-shrink: 0;
    color: var(--color-text-main);
    position: relative;
    margin-top: 1.6rem;
    transition: all 0.4s ease;
}

.step-content {
    background: #fff;
    padding: 2.5rem;
    border-radius: 8px;
    border: 1px solid var(--color-border);
    flex: 1;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.02);
    transition: all 0.4s ease;
    z-index: 2;
}

.flow-step:hover .step-content {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.08);
    border-color: var(--color-text-main);
}

.flow-step:hover .step-marker {
    background: var(--color-text-main);
    color: #fff;
    transform: scale(1.1);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.15);
}

.flow-step:hover+.flow-timeline::before {
    background: var(--color-text-main);
}

.step-content h4 {
    font-size: 1.2rem;
    font-weight: 700;
    margin-bottom: 0.8rem;
    color: var(--color-text-main);
}

.step-content p {
    color: var(--color-text-muted);
    font-size: 0.95rem;
    line-height: 1.7;
    margin: 0;
}

/* Photographer */
.photographer-layout {
    display: flex;
    flex-direction: row;
    gap: 4rem;
    align-items: flex-start;
    max-width: 950px;
    margin: 0 auto;
    background: #fff;
    border: 1px solid var(--color-border);
    padding: 3rem;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.02);
    transition: all 0.4s ease;
}

.photographer-layout:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.08);
    border-color: var(--color-text-muted);
}

.col-photo {
    flex: 0 0 250px;
}

.col-photo img {
    width: 100%;
    border-radius: 4px;
    border: 1px solid #eee;
}

.col-info {
    flex: 1;
    text-align: left;
}

.col-info h3 {
    font-size: 2rem;
    border-bottom: 1px solid var(--color-border);
    padding-bottom: 1rem;
}

.social-links-profile {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    margin-top: 2rem;
}

.social-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.6rem 1rem;
    border: 1px solid var(--color-border);
    border-radius: 50px;
    font-size: 0.85rem;
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    background: #fff;
    color: var(--color-text-main);
    font-weight: 600;
    white-space: nowrap;
}

.social-btn:hover {
    background: var(--color-text-main);
    color: #fff;
    transform: translateY(-5px);
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.1);
    border-color: var(--color-text-main);
}

/* FAQ */
.accordion {
    border-top: 1px solid var(--color-border);
}

.accordion-item {
    border-bottom: 1px solid var(--color-border);
    transition: background 0.3s ease;
}

.accordion-item:hover {
    background: #fdfdfd;
}

.accordion-header {
    width: 100%;
    padding: 1.5rem 0;
    background: none;
    border: none;
    text-align: left;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 1.05rem;
    font-weight: 600;
    cursor: pointer;
    color: var(--color-text-main);
    font-family: var(--font-sans);
}

.accordion-header .material-icons {
    transition: transform 0.3s;
    color: var(--color-text-muted);
}

.accordion-header.active .material-icons {
    transform: rotate(45deg);
    color: var(--color-text-main);
}

.accordion-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s ease-out;
}

.accordion-content p {
    padding-bottom: 1.5rem;
    color: var(--color-text-muted);
    font-size: 0.95rem;
    margin: 0;
}

/* Apply & Footer */
.btn-solid-apply {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: var(--color-accent);
    color: #fff;
    border-radius: 50px;
    font-weight: 600;
    transition: var(--transition-fast);
    text-decoration: none;
}

.btn-large {
    padding: 1.2rem 4rem;
    font-size: 1.2rem;
}

/* Apply small size buttons for header */
.header-inner .btn-top-apply {
    padding: 0.5rem 1.5rem;
    font-size: 0.85rem;
}

.btn-solid-apply:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
    color: #fff;
    border: 1px solid var(--color-accent);
}

.moving-arrow {
    animation: bounceRight 1.5s infinite;
}

@keyframes bounceRight {

    0%,
    100% {
        transform: translateX(0);
    }

    50% {
        transform: translateX(5px);
    }
}

.cta-wrapper {
    max-width: 600px;
    margin: 0 auto;
    text-align: center;
}

/* Back to Top Button */
.btn-back-to-top {
    position: fixed;
    bottom: 2.5rem;
    right: 2.5rem;
    width: 3.5rem;
    height: 3.5rem;
    background: var(--color-accent);
    color: #fff;
    border: 2px solid var(--color-accent);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 99;
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px);
    transition: all 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.15);
    font-size: 1.5rem;
    outline: none;
}

.btn-back-to-top.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.btn-back-to-top:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.25);
    background: #fff;
    color: var(--color-accent);
}

.social-links-footer {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
}

.social-icon {
    color: var(--color-text-muted);
    font-size: 1.5rem;
    transition: var(--transition-fast);
    display: inline-block;
}

.social-icon:hover {
    color: var(--color-text-main);
    transform: scale(1.15) translateY(-2px);
}

/* ======== Tablet Adjustments (769px to 991px) ======== */
@media (max-width: 1199px) {
    .hero-below-text {
        align-items: center;
        text-align: center;
    }

    .hero-cta {
        align-items: center;
        text-align: center;
    }

    .container {
        padding-left: 6%;
        padding-right: 6%;
    }

    /* Modify Hero layout on Tablet/Mobile to separate title and content visually */
    .modern-hero {
        height: auto;
        display: flex;
        flex-direction: column;
        justify-content: flex-start;
        align-items: stretch;
        background: #fff;
        position: relative;
        padding-top: 4rem; /* Clear fixed header overlay */
    }

    /* Screen-filling Photo block */
    .hero-bg-slider {
        position: relative;
        width: 100%;
        height: calc(100vh - 80px); /* Exactly fill viewport minus header */
        /* aspect-ratio removed to avoid lateral snapping */
        z-index: 1;
        overflow: hidden;
    }

    .hero-bg-slider::after {
        content: '';
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background: linear-gradient(to bottom, rgba(0, 0, 0, 0) 40%, rgba(0, 0, 0, 0.4) 100%);
        z-index: 2;
        pointer-events: none;
    }

    .hero-bg-slide {
        background-size: cover;
        background-position: center;
    }

    /* Remove wrapper styling so child absolutes work relative to modern-hero */
    .hero-content {
        display: contents;
    }

    /* The title overlays the image at the bottom right */
    .hero-overlay-text {
        position: absolute;
        top: 4rem; /* Clear fixed header overlay */
        left: 0;
        width: 100%;
        height: calc(100vh - 80px); /* Match slider height precisely */
        /* aspect-ratio removed to avoid lateral snapping */
        display: flex;
        flex-direction: column;
        justify-content: flex-end;
        align-items: flex-end;
        text-align: right;
        padding: 2.5rem 5%;
        z-index: 3;
    }

    .eyecatch {
        color: #fff;
        text-shadow: 0 2px 5px rgba(0, 0, 0, 0.8);
        font-size: 0.9rem;
        margin-bottom: 0.3rem;
    }

    .hero-title {
        color: #fff;
        font-size: clamp(2rem, 6vw, 2.8rem);
        text-shadow: 0 4px 15px rgba(0, 0, 0, 0.5), 0 2px 10px rgba(0, 0, 0, 0.8);
        margin-bottom: 0;
        line-height: 1.35;
        padding: 0 !important;
    }

    /* The button and note sits BELOW the square image clearly */
    .hero-below-text {
        position: relative;
        width: 100%;
        padding: 4rem 10% 2.5rem 10%;
        background: transparent;
        z-index: 3;
        display: flex;
        flex-direction: column;
        align-items: center;
        text-align: center;
    }

    .hero-sub {
        color: var(--color-text-main);
        text-shadow: none;
        font-size: 1.1rem;
        line-height: 1.7;
        font-weight: 500;
    }

    .hero-deadline {
        color: var(--color-text-muted);
        text-shadow: none;
        display: block;
        margin-top: 1rem;
    }

    /* Fix horizontal scroll by strictly using paddings internally */
    /* Add internal padding to boxes so they look narrower than the project card */
    .col-content {
        margin: 0;
        padding: 0 2rem;
    }

    .overview-grid {
        margin: 0;
        padding: 0 1.5rem;
    }

    .req-box-full {
        margin: 0;
        padding: 2.5rem;
    }

    .flow-timeline {
        margin: 0;
        padding: 0 1.5rem;
    }

    .accordion {
        margin: 0;
        padding: 0 1.5rem;
    }

    /* Give even MORE text room for Photographer on tablet */
    .photographer-layout {
        margin: 0;
        padding: 2.5rem;
        gap: 2rem;
    }

    .col-photo {
        flex: 0 0 200px;
    }
}

/* ======== Mobile Adjustments (under 768px) ======== */
@media (max-width: 768px) {
    .row {
        flex-direction: column;
        gap: 1rem;
    }

    .modern-section {
        padding: 6rem 0;
    }

    .hero-bg-slider {
        height: 100vw;
        aspect-ratio: auto;
    }

    .hero-overlay-text {
        height: 100vw;
        aspect-ratio: auto;
        justify-content: flex-end;
        align-items: flex-end;
        text-align: right;
    }

    .eyecatch {
        font-size: 0.65rem;
    }

    .hero-title {
        font-size: clamp(1rem, 4.5vw, 1.5rem);
    }

    .hero-below-text {
        padding: 3rem 5%;
        align-items: center;
        text-align: center;
    }

    .section-title-wrap {
        margin-bottom: 3rem;
    }

    /* Modify layout widths on mobile securely */
    .container {
        padding-left: 6%;
        padding-right: 6%;
    }

    .col-content {
        margin: 0;
        padding: 0;
    }

    .overview-grid {
        margin: 0;
        padding: 0;
        grid-template-columns: 1fr;
    }

    .req-box-full {
        margin: 0;
        padding: 1.5rem;
    }

    .flow-timeline {
        margin: 0;
        padding: 0;
    }

    .flow-timeline::before {
        left: 1.4rem;
    }

    .flow-step {
        gap: 1.5rem;
    }

    .step-content {
        padding: 1.5rem;
    }

    .step-marker {
        width: 2.8rem;
        height: 2.8rem;
        font-size: 1.1rem;
        margin-top: 0.95rem;
        top: 0;
    }

    .project-grid {
        gap: 2.5rem;
    }

    .card-text {
        padding: 2.5rem 1.5rem;
    }

    .photographer-layout {
        flex-direction: column;
        align-items: center;
        gap: 2rem;
        padding: 1.5rem;
        margin: 0;
    }

    .col-photo {
        flex: 0 0 auto;
        width: 100%;
        max-width: 250px;
    }

    .col-info {
        text-align: center;
    }

    /* Make photographer name same size as section titles! */
    .col-info h3 {
        border-bottom: none;
        font-size: 1.45rem;
    }

    .social-links-profile {
        justify-content: center;
        margin-top: 1.5rem;
    }

    .accordion {
        margin: 0;
        padding: 0;
    }

    /* Mobile Hero adjustments */
    .hero-overlay-text {
        padding: 2rem 6%;
    }

    .hero-title {
        font-size: clamp(1.8rem, 8vw, 2.5rem);
        line-height: 1.4;
        text-shadow: 0 2px 10px rgba(0, 0, 0, 0.8);
    }

    .hero-below-text {
        padding: 2rem 6%;
    }

    .hero-sub {
        font-size: 1rem;
    }

    /* Reduce title sizes for mobile */
    .section-title {
        font-size: 1.45rem;
    }

    /* Automatically fit button text and prevent overflow */
    .btn-large {
        padding: 1.2rem 2.5rem;
        font-size: 1rem;
        width: auto;
        max-width: 100%;
        display: inline-flex;
        justify-content: center;
        box-sizing: border-box;
        text-align: center;
    }

    /* Adjust back to top for mobile */
    .btn-back-to-top {
        bottom: 1.5rem;
        right: 1.5rem;
        width: 3rem;
        height: 3rem;
        font-size: 1.2rem;
    }
}