/* Clinic Amal Siti Project Styles */

.project-page {
    background: #fff;
    color: #333;
    font-family: 'Montserrat', sans-serif;
    overflow-x: hidden;
}

.scroll-container {
    width: 100%;
}

/* Section 1 - Hero Section */
.section-1 {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem 0;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
}

.project-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
    align-items: center;
}

.project-text {
    padding-right: 2rem;
}

.project-title {
    font-size: clamp(2.5rem, 5vw, 4rem);
    font-weight: 800;
    color: #2c3e50;
    margin-bottom: 1.5rem;
    line-height: 1.2;
    letter-spacing: -0.02em;
}

.project-description {
    font-size: clamp(1rem, 2vw, 1.1rem);
    line-height: 1.7;
    color: #555;
    margin-bottom: 2rem;
    font-weight: 400;
}

.project-button {
    display: inline-block;
    padding: 1rem 2.5rem;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    text-decoration: none;
    border-radius: 8px;
    font-weight: 600;
    font-size: 1rem;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.project-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.4);
    background: linear-gradient(135deg, #5a6fd8 0%, #6a4190 100%);
}

.project-image {
    position: relative;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease;
}

.project-image:hover {
    transform: scale(1.02);
}

.project-image img {
    width: 100%;
    height: auto;
    display: block;
    transition: transform 0.3s ease;
    object-fit: cover;
    border-radius: 12px;
}

/* Ensure hero image is properly visible on mobile */
@media (max-width: 767px) {
    .project-image img {
        object-fit: contain;
        background: #f8f9fa;
    }
    
    .project-image {
        background: #f8f9fa;
    }
}

/* 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: 10;
}

.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;
}

@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 {
    padding: 6rem 0;
    background: #fff;
}

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

.section-title {
    font-size: clamp(2rem, 4vw, 3rem);
    font-weight: 700;
    color: #2c3e50;
    margin-bottom: 1rem;
    line-height: 1.3;
}

.section-description {
    font-size: clamp(1rem, 2vw, 1.1rem);
    line-height: 1.6;
    color: #666;
    font-weight: 400;
}

/* Gallery Grid */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    grid-template-rows: 70vh auto;
    gap: 1.5rem 1.5rem;
    max-width: 1600px;
    margin: 0 auto;
    padding: 0 2rem;
}

/* Span classes for grid items */
.span-2 {
    grid-column: span 2;
}

/* Alignment classes */
.align-bottom {
    align-self: end;
}

.stick-to-bottom {
    align-self: end;
    margin-top: calc(-20vh + 1.5rem); /* Adjust for the height difference minus gap */
}

.gallery-item {
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    background: #fff;
}

.gallery-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
}

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

/* Ensure images are fully visible on smaller screens */
@media (max-width: 767px) {
    .gallery-item img {
        object-fit: cover !important;
        background: #f8f9fa;
        width: 100% !important;
        height: 100% !important;
    }
    
    .gallery-item {
        background: #f8f9fa;
        overflow: hidden;
    }
}

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

/* Gallery Item Heights */
.height-30 {
    height: 30vh;
    min-height: 200px;
}

.height-40 {
    height: 40vh;
    min-height: 250px;
}

.height-50 {
    height: 50vh;
    min-height: 300px;
}

.height-60 {
    height: 60vh;
    min-height: 350px;
}

.height-70 {
    height: 70vh;
    min-height: 400px;
}

/* Responsive height adjustments for better image visibility */
@media (max-width: 1024px) {
    .height-30 {
        min-height: 180px;
    }
    
    .height-40 {
        min-height: 200px;
    }
    
    .height-50 {
        min-height: 250px;
    }
    
    .height-60 {
        min-height: 300px;
    }
    
    .height-70 {
        min-height: 350px;
    }
}

/* Responsive height adjustments */
@media (max-width: 767px) {
    .height-30 {
        min-height: 250px;
        height: 250px;
        aspect-ratio: 16/9;
    }
    
    .height-40 {
        min-height: 280px;
        height: 280px;
        aspect-ratio: 16/9;
    }
    
    .height-50 {
        min-height: 320px;
        height: 320px;
        aspect-ratio: 16/9;
    }
    
    .height-60 {
        min-height: 360px;
        height: 360px;
        aspect-ratio: 16/9;
    }
    
    .height-70 {
        min-height: 400px;
        height: 400px;
        aspect-ratio: 16/9;
    }
}

@media (max-width: 480px) {
    .height-30 {
        min-height: 200px;
        height: 200px;
        aspect-ratio: 16/9;
    }
    
    .height-40 {
        min-height: 220px;
        height: 220px;
        aspect-ratio: 16/9;
    }
    
    .height-50 {
        min-height: 240px;
        height: 240px;
        aspect-ratio: 16/9;
    }
    
    .height-60 {
        min-height: 260px;
        height: 260px;
        aspect-ratio: 16/9;
    }
    
    .height-70 {
        min-height: 280px;
        height: 280px;
        aspect-ratio: 16/9;
    }
}

@media (max-width: 320px) {
    .height-30 {
        min-height: 150px;
        height: auto;
        aspect-ratio: 1/1;
    }
    
    .height-40 {
        min-height: 180px;
        height: auto;
        aspect-ratio: 1/1;
    }
    
    .height-50 {
        min-height: 200px;
        height: auto;
        aspect-ratio: 1/1;
    }
    
    .height-60 {
        min-height: 220px;
        height: auto;
        aspect-ratio: 1/1;
    }
    
    .height-70 {
        min-height: 250px;
        height: auto;
        aspect-ratio: 1/1;
    }
}

/* Animation Classes */
[data-aos] {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.6s ease;
}

[data-aos].animate {
    opacity: 1;
    transform: translateY(0);
}

[data-aos="fade-up"] {
    transform: translateY(30px);
}

[data-aos="fade-up"].animate {
    transform: translateY(0);
}

[data-aos="fade-right"] {
    transform: translateX(-30px);
}

[data-aos="fade-right"].animate {
    transform: translateX(0);
}

[data-aos="fade-left"] {
    transform: translateX(30px);
}

[data-aos="fade-left"].animate {
    transform: translateX(0);
}

/* Responsive Design */

/* 4K and Ultra-wide displays */
@media (min-width: 2560px) {
    .project-content {
        max-width: 1800px;
        gap: 6rem;
        padding: 0 4rem;
    }
    
    .gallery-grid {
        max-width: 2000px;
        gap: 2rem 2rem;
        padding: 0 4rem;
    }
    
    .project-title {
        font-size: 5rem;
    }
    
    .section-title {
        font-size: 4rem;
    }
    
    .project-description {
        font-size: 1.3rem;
    }
    
    .section-description {
        font-size: 1.2rem;
    }
}

/* Large Desktop (1920px - 2559px) */
@media (max-width: 2559px) and (min-width: 1920px) {
    .project-content {
        max-width: 1600px;
        gap: 5rem;
        padding: 0 3rem;
    }
    
    .gallery-grid {
        max-width: 1800px;
        gap: 1.8rem 1.8rem;
        padding: 0 3rem;
    }
    
    .project-title {
        font-size: 4.5rem;
    }
    
    .section-title {
        font-size: 3.5rem;
    }
}

/* Standard Desktop (1440px - 1919px) */
@media (max-width: 1919px) and (min-width: 1440px) {
    .project-content {
        max-width: 1400px;
        gap: 4rem;
        padding: 0 2.5rem;
    }
    
    .gallery-grid {
        max-width: 1600px;
        gap: 1.5rem 1.5rem;
        padding: 0 2.5rem;
    }
    
    .project-title {
        font-size: 4rem;
    }
    
    .section-title {
        font-size: 3rem;
    }
}

/* Small Desktop (1200px - 1439px) */
@media (max-width: 1439px) and (min-width: 1200px) {
    .project-content {
        max-width: 1200px;
        gap: 3.5rem;
        padding: 0 2rem;
    }
    
    .gallery-grid {
        max-width: 1400px;
        gap: 1.5rem 1.5rem;
        padding: 0 2rem;
    }
    
    .project-title {
        font-size: 3.5rem;
    }
    
    .section-title {
        font-size: 2.8rem;
    }
}

/* Single column layout for 1553px and below - PREVENTS ALL OVERLAPPING */
@media (max-width: 1553px) {
    .gallery-grid {
        grid-template-columns: 1fr !important;
        grid-template-rows: auto !important;
        gap: 2rem 0 !important;
        max-width: 800px;
        padding: 0 2rem;
    }
    
    .span-2 {
        grid-column: span 1 !important;
    }
    
    .stick-to-bottom {
        margin-top: 0 !important;
        align-self: start !important;
    }
    
    .height-30,
    .height-40,
    .height-50,
    .height-60,
    .height-70 {
        height: auto !important;
        min-height: 300px;
        aspect-ratio: 16/9;
    }
    
    /* Ensure no negative margins or overlapping */
    .gallery-item {
        margin: 0 !important;
        position: static !important;
        transform: none !important;
    }
    
    /* Ensure images fill the container properly */
    .gallery-item img {
        width: 100% !important;
        height: 100% !important;
        object-fit: cover !important;
        display: block !important;
    }
}

/* Large Tablet (1024px - 1199px) */
@media (max-width: 1199px) and (min-width: 1024px) {
    .project-content {
        gap: 3rem;
        padding: 0 1.5rem;
    }
    
    .project-title {
        font-size: 3rem;
    }
    
    .section-title {
        font-size: 2.5rem;
    }
}

/* Tablet (768px - 1023px) */
@media (max-width: 1023px) and (min-width: 768px) {
    .project-content {
        grid-template-columns: 1fr;
        gap: 2.5rem;
        text-align: center;
        padding: 0 2rem;
    }
    
    .project-text {
        padding-right: 0;
        order: 2;
    }
    
    .project-image {
        order: 1;
    }
    
    .project-title {
        font-size: 2.8rem;
    }
    
    .section-title {
        font-size: 2.2rem;
    }
}

/* Large Mobile (600px - 767px) */
@media (max-width: 767px) and (min-width: 600px) {
    .project-content {
        grid-template-columns: 1fr;
        gap: 2rem;
        text-align: center;
        padding: 0 1.5rem;
    }
    
    .project-text {
        padding-right: 0;
        order: 2;
    }
    
    .project-image {
        order: 1;
    }
    
    .section-1 {
        padding: 1.5rem 0;
    }
    
    .section-2 {
        padding: 3rem 0;
    }
    
    .project-title {
        font-size: 2.5rem;
    }
    
    .section-title {
        font-size: 2rem;
    }
}

/* Medium Mobile (480px - 599px) */
@media (max-width: 599px) and (min-width: 480px) {
    .project-content {
        grid-template-columns: 1fr;
        gap: 1.5rem;
        text-align: center;
        padding: 0 1rem;
    }
    
    .project-text {
        padding-right: 0;
        order: 2;
    }
    
    .project-image {
        order: 1;
    }
    
    .section-1 {
        padding: 1rem 0;
    }
    
    .section-2 {
        padding: 2.5rem 0;
    }
    
    .project-title {
        font-size: 2.2rem;
    }
    
    .section-title {
        font-size: 1.8rem;
    }
    
    .project-button {
        padding: 0.9rem 2.2rem;
        font-size: 0.95rem;
    }
}

/* Small Mobile (400px - 479px) */
@media (max-width: 479px) and (min-width: 400px) {
    .project-content {
        padding: 0 0.8rem;
    }
    
    .gallery-grid {
        padding: 0 0.8rem;
        gap: 1.5rem 0 !important;
    }
    
    .section-header {
        padding: 0 0.8rem;
    }
    
    .project-title {
        font-size: 2rem;
    }
    
    .section-title {
        font-size: 1.6rem;
    }
    
    .project-button {
        padding: 0.8rem 2rem;
        font-size: 0.9rem;
    }
}

/* Extra Small Mobile (320px - 399px) */
@media (max-width: 399px) and (min-width: 320px) {
    .project-content {
        padding: 0 0.5rem;
    }
    
    .gallery-grid {
        padding: 0 0.5rem;
        gap: 1rem 0 !important;
    }
    
    .section-header {
        padding: 0 0.5rem;
    }
    
    .project-title {
        font-size: 1.8rem;
    }
    
    .section-title {
        font-size: 1.5rem;
    }
    
    .project-description {
        font-size: 0.9rem;
    }
    
    .section-description {
        font-size: 0.9rem;
    }
    
    .project-button {
        padding: 0.7rem 1.8rem;
        font-size: 0.85rem;
    }
}

/* Very Small Mobile (max 319px) */
@media (max-width: 319px) {
    .project-content {
        padding: 0 0.3rem;
    }
    
    .gallery-grid {
        padding: 0 0.3rem;
        gap: 0.5rem 0.5rem;
    }
    
    .section-header {
        padding: 0 0.3rem;
    }
    
    .project-title {
        font-size: 1.6rem;
    }
    
    .section-title {
        font-size: 1.4rem;
    }
    
    .project-description {
        font-size: 0.85rem;
    }
    
    .section-description {
        font-size: 0.85rem;
    }
    
    .project-button {
        padding: 0.6rem 1.5rem;
        font-size: 0.8rem;
    }
}

/* Tablet Landscape */
@media (max-width: 1024px) and (orientation: landscape) {
    .section-1 {
        min-height: 80vh;
    }
    
    .height-30 {
        height: 25vh;
    }
    
    .height-40 {
        height: 35vh;
    }
    
    .height-50 {
        height: 45vh;
    }
    
    .height-60 {
        height: 55vh;
    }
    
    .height-70 {
        height: 65vh;
    }
}

/* Mobile Landscape */
@media (max-width: 767px) and (orientation: landscape) {
    .section-1 {
        min-height: 70vh;
    }
    
    .height-30 {
        height: 20vh;
    }
    
    .height-40 {
        height: 30vh;
    }
    
    .height-50 {
        height: 40vh;
    }
    
    .height-60 {
        height: 50vh;
    }
    
    .height-70 {
        height: 60vh;
    }
    
    .project-title {
        font-size: 2rem;
    }
    
    .section-title {
        font-size: 1.6rem;
    }
}

/* Small Mobile Landscape */
@media (max-width: 480px) and (orientation: landscape) {
    .section-1 {
        min-height: 60vh;
    }
    
    .height-30 {
        height: 15vh;
    }
    
    .height-40 {
        height: 25vh;
    }
    
    .height-50 {
        height: 35vh;
    }
    
    .height-60 {
        height: 45vh;
    }
    
    .height-70 {
        height: 55vh;
    }
    
    .project-title {
        font-size: 1.8rem;
    }
    
    .section-title {
        font-size: 1.4rem;
    }
}

/* High DPI Displays */
@media screen and (-webkit-min-device-pixel-ratio: 2) {
    .project-image img,
    .gallery-item img {
        image-rendering: -webkit-optimize-contrast;
    }
}

/* Print Styles */
@media print {
    .scroll-indicator,
    .project-button {
        display: none;
    }
    
    .project-content {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    .gallery-grid {
        grid-template-columns: repeat(2, 1fr);
    }
} 

/* Unified page background treatment */
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;
}