/* MINISO HQ Project Page Styles */
.project-page {
    background-image: url('../assets/commercialhome.png');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    background-attachment: fixed;
    width: 100%;
    position: relative;
    overflow-x: hidden;
}

.scroll-container {
    width: 100%;
    height: 100%;
}

.section {
    min-height: 100vh;
    width: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    position: relative;
    padding: 4rem 2rem;
    box-sizing: border-box;
}

.section-1 {
    position: relative;
    background: rgba(255, 255, 255, 0.6);
}

.project-content {
    width: 100%;
    max-width: 1400px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 5rem;
}

.project-text {
    flex: 1;
    max-width: 550px;
    opacity: 0;
    transform: translateX(-50px);
}

.project-text[data-aos="fade-right"].animate {
    animation: fadeInRight 1s ease forwards;
}

.project-title {
    font-size: clamp(2.5rem, 5vw, 4rem);
    font-weight: 900;
    color: #1a1a1a;
    margin-bottom: 2rem;
    line-height: 1.2;
}

.project-description {
    font-size: clamp(1rem, 1.2vw, 1.2rem);
    line-height: 1.6;
    color: #666;
    margin-bottom: 3rem;
}

.project-button {
    display: inline-block;
    padding: 1rem 3rem;
    background: #7B7EF4;
    color: #fff;
    text-decoration: none;
    border-radius: 4px;
    font-weight: 600;
    font-size: 1rem;
    transition: all 0.3s ease;
}

.project-button:hover {
    background: #6366F1;
    transform: translateY(-2px);
}

.project-image {
    flex: 1;
    max-width: 600px;
    position: relative;
    opacity: 0;
    transform: translateX(50px);
}

.project-image[data-aos="fade-left"].animate {
    animation: fadeInLeft 1s ease forwards;
}

.project-image img {
    width: 100%;
    height: auto;
    border-radius: 12px;
    box-shadow: 0 8px 30px rgba(0,0,0,0.1);
}

/* Scroll Indicator */
.scroll-indicator {
    position: absolute;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%);
    text-align: center;
    color: #666;
    font-size: 0.9rem;
    opacity: 0;
    animation: fadeIn 1s ease 1s forwards;
    z-index: 20;
}

.scroll-arrow {
    width: 20px;
    height: 20px;
    transform: rotate(45deg);
    margin: 1rem auto;
    animation: bounce 2s infinite;
}

.scroll-down-arrow {
    width: 20px;
    height: 20px;
    border-right: 2px solid #666;
    border-bottom: 2px solid #666;
    transform: rotate(45deg);
    margin: 1rem auto;
    animation: bounce 2s infinite;
}

/* Contact Section Scroll Up Button - Override for MINISO HQ */
#contact-section-container .scroll-indicator.scroll-up {
    position: absolute;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%);
    text-align: center;
    color: #666;
    font-size: 0.9rem;
    opacity: 0;
    animation: fadeIn 1s ease 1s forwards;
    z-index: 10;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    padding: 0.5rem;
}

#contact-section-container .scroll-indicator.scroll-up .scroll-arrow {
    width: 20px;
    height: 20px;
    border-left: 2px solid #666;
    border-top: 2px solid #666;
    transform: rotate(45deg);
    margin: 0;
    animation: bounceUp 2s infinite;
}

@keyframes bounceUp {
    0%, 20%, 50%, 80%, 100% {
        transform: rotate(45deg) translateY(0);
    }
    40% {
        transform: rotate(45deg) translateY(5px);
    }
    60% {
        transform: rotate(45deg) translateY(3px);
    }
}

/* Animations */
@keyframes fadeInRight {
    from {
        opacity: 0;
        transform: translateX(-50px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

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

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

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% {
        transform: rotate(45deg) translateY(0);
    }
    40% {
        transform: rotate(45deg) translateY(-10px);
    }
    60% {
        transform: rotate(45deg) translateY(-5px);
    }
}

/* Section 2 - Gallery Section */
.section-2 {
    background: #f8f8f8;
    padding: 6rem 2rem;
}

.gallery-container {
    width: 100%;
    max-width: 2000px;
    margin: 0 auto;
}

.section-header {
    text-align: center;
    margin-bottom: 4rem;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

.section-header[data-aos="fade-up"].animate {
    animation: fadeInUp 1s ease forwards;
}

.section-title {
    font-size: clamp(2rem, 4vw, 3rem);
    font-weight: 800;
    color: #1a1a1a;
    margin-bottom: 1rem;
}

.section-description {
    font-size: clamp(1rem, 1.2vw, 1.2rem);
    line-height: 1.6;
    color: #666;
    max-width: 800px;
    margin: 0 auto;
}

.gallery-wrapper {
    width: 100%;
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 1rem;
    position: relative;
}

.gallery-row {
    width: 100%;
    position: relative;
    margin-bottom: 2rem;
}

.first-row {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
    height: 400px;
    margin-bottom: 2rem;
    position: relative;
}

.second-row {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
    height: 300px;
}

.gallery-item {
    position: relative;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 8px 30px rgba(0,0,0,0.1);
    opacity: 0;
    transform: translateY(30px);
}

.gallery-item[data-aos="fade-up"].animate {
    animation: fadeInUp 1s ease forwards;
}

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

.gallery-item:hover img {
    transform: scale(1.05);
}

/* First row positioning - images span 50% of middle grid each */
.left-half {
    grid-column: 1 / 3;
    grid-row: 1;
    width: calc(70% + 1rem); /* 70% of second grid column + gap */
    margin-left: 0;
    margin-right: 0;
}

.right-half {
    grid-column: 2 / 4;
    grid-row: 1;
    width: calc(70% + 1rem); /* 70% of second grid column + gap */
    margin-left: calc(30% - 1rem); /* Start at 70% of second grid column */
    margin-right: 0;
}

/* Second row - full width images */
.second-row .gallery-item {
    width: 100%;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Section 3 - Process Section */
.section-3 {
    background: rgba(255, 255, 255, 0.6);
    padding: 6rem 2rem;
}

.section-3 .section-header {
    text-align: center;
    margin-bottom: 4rem;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

.grid-container {
    max-width: 1400px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    grid-template-rows: repeat(3, 1fr);
    gap: 1.5rem;
    height: 800px;
    position: relative;
}

.grid-item {
    position: relative;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 8px 30px rgba(0,0,0,0.1);
    opacity: 0;
    transform: translateY(30px);
}

.grid-item[data-aos].animate {
    animation: fadeInUp 1s ease forwards;
}

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

.grid-item:hover img {
    transform: scale(1.05);
}

/* First Row Layout */
.grid-2x1 {
    grid-column: 1 / 3;
    grid-row: 1;
}

.grid-1x1 {
    grid-column: 3 / 4;
    grid-row: 1;
}

.grid-2x2 {
    grid-column: 4 / 6;
    grid-row: 1 / 3;
}

/* Second Row Layout */
.grid-3x2 {
    grid-column: 1 / 4;
    grid-row: 2 / 4;
}

/* Third Row Layout */
.grid-2x1-bottom {
    grid-column: 4 / 6;
    grid-row: 3;
}

/* Large Screen Adjustments */
@media (min-width: 1200px) {
    .project-image {
        max-width: 550px;
    }
    
    .project-content {
        gap: 6rem;
    }
}

/* Responsive Design */
@media (max-width: 1200px) {
    .project-content,
    .gallery-container,
    .grid-container {
        max-width: 1200px;
        padding: 0 2rem;
    }
}

@media (max-width: 992px) {
    .project-content {
        flex-direction: column;
        gap: 3rem;
        text-align: center;
    }

    .project-text {
        max-width: 100%;
    }

    .project-image {
        max-width: 100%;
    }

    .gallery-wrapper {
        padding: 0 1rem;
    }

    .first-row {
        grid-template-columns: 1fr;
        height: auto;
        gap: 1.5rem;
    }

    .left-half,
    .right-half {
        grid-column: 1;
        width: 100%;
        height: 300px;
        margin-left: 0;
        margin-right: 0;
    }

    .second-row {
        grid-template-columns: repeat(2, 1fr);
        gap: 1.5rem;
        height: auto;
    }

    .second-row .gallery-item {
        height: 250px;
    }

    .grid-container {
        grid-template-columns: repeat(2, 1fr);
        grid-template-rows: auto;
        height: auto;
        gap: 1.5rem;
    }

    .grid-2x1,
    .grid-1x1,
    .grid-2x2,
    .grid-3x2,
    .grid-2x1-bottom {
        grid-column: span 1;
        grid-row: auto;
        height: 300px;
    }
}

@media (max-width: 768px) {
    .section {
        padding: 3rem 1rem;
    }

    .section-1 {
        padding-top: 60px;
        padding-bottom: 120px;
    }

    .section-1 .project-content {
        flex-direction: column-reverse;
        gap: 2rem;
        padding: 10px;
    }

    .section-1 .project-text {
        text-align: center;
        padding: 0;
        position: relative;
    }

    .section-1 .project-image {
        width: 100%;
        max-width: 500px;
        margin: 0 auto;
        padding: 10px;
    }

    .section-1 .project-image img {
        width: 100%;
        height: auto;
        object-fit: cover;
    }

    .navigation {
        position: absolute;
        top: 1rem;
        left: 1rem;
        z-index: 10;
        padding: 10px;
    }

    .back-link {
        background: rgba(255, 255, 255, 0.9);
        padding: 0.5rem 1rem;
        border-radius: 20px;
        box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    }

    .project-button {
        position: relative;
        z-index: 2;
        margin-bottom: 1rem;
    }

    .scroll-indicator {
        bottom: 2rem;
        position: absolute;
        background: rgba(255, 255, 255, 0.9);
        padding: 1rem;
        border-radius: 20px;
        width: auto;
        left: 50%;
        transform: translateX(-50%);
        z-index: 1;
    }

    .gallery-wrapper {
        padding: 0 0.5rem;
    }

    .first-row {
        gap: 1rem;
    }

    .left-half,
    .right-half {
        grid-column: 1;
        height: 250px;
        margin-left: 0;
        margin-right: 0;
    }

    .second-row {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .second-row .gallery-item {
        height: 200px;
    }

    .section-2,
    .section-3 {
        padding: 4rem 1rem;
    }

    .grid-container {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .grid-2x1,
    .grid-1x1,
    .grid-2x2,
    .grid-3x2,
    .grid-2x1-bottom {
        grid-column: 1;
        height: 250px;
    }

    .section-header {
        margin-bottom: 2rem;
        padding: 0 1rem;
    }

    #contact-section-container .scroll-indicator.scroll-up {
        bottom: 2rem;
        position: absolute;
        background: rgba(255, 255, 255, 0.9);
        padding: 1rem;
        border-radius: 20px;
        width: auto;
        left: 50%;
        transform: translateX(-50%);
        z-index: 1;
    }
}

@media (max-width: 480px) {
    .section-1 {
        padding-bottom: 100px;
        padding-top: 50px;
    }

    .section-1 .project-content {
        padding: 5px;
    }

    .section-1 .project-title {
        font-size: clamp(1.8rem, 3.5vw, 2rem);
        margin-bottom: 1rem;
    }

    .section-1 .project-description {
        font-size: 0.9rem;
        margin-bottom: 1.5rem;
    }

    .navigation {
        top: 0.5rem;
        left: 0.5rem;
    }

    .back-link {
        padding: 0.4rem 0.8rem;
        font-size: 0.9rem;
    }

    .scroll-indicator {
        bottom: 1.5rem;
        font-size: 0.8rem;
        padding: 0.8rem;
    }

    .gallery-item img {
        height: 200px;
    }

    .section-2,
    .section-3 {
        padding: 3rem 0.5rem;
    }

    .grid-container {
        gap: 0.8rem;
    }

    .grid-2x1,
    .grid-1x1,
    .grid-2x2,
    .grid-3x2,
    .grid-2x1-bottom {
        height: 200px;
    }

    .section-header {
        margin-bottom: 1.5rem;
    }

    #contact-section-container .scroll-indicator.scroll-up {
        bottom: 1.5rem;
        font-size: 0.8rem;
        padding: 0.8rem;
    }

    #contact-section-container .scroll-indicator.scroll-up .scroll-arrow {
        width: 16px;
        height: 16px;
    }
}

/* Unified page background treatment (same as 2dcaffe.html sections) */
body.project-page {
    background-image: url('../assets/commercialhome.png');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    background-attachment: fixed;
}

body.project-page .scroll-container > .section {
    background: rgba(255, 255, 255, 0.6) !important;
}

body.project-page .scroll-container > .section:nth-of-type(even) {
    background: #f8f8f8 !important;
}
