/* AnySmart Website - Construction Projects Page CSS */

/* Root Variables - Matching AnySmart Theme */
:root {
    --primary-blue: #03a9f4;
    --light-gray: #e9e9e9;
    --dark-gray: #666666;
    --white: #ffffff;
    --shadow: rgba(0, 0, 0, 0.1);
    --shadow-hover: rgba(0, 0, 0, 0.15);
}

/* Prevent horizontal overflow */
body {
    overflow-x: hidden;
    max-width: 100vw;
}

/* Hero section styles are imported from the component */

/* ========================================
   INTRO SECTION
======================================== */
.intro-section {
    background: var(--white);
    padding: 100px 40px;
    position: relative;
    overflow: hidden;
    width: 100%;
    box-sizing: border-box;
}

.intro-container {
    max-width: 1400px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 80px;
    align-items: center;
}

.intro-text {
    display: flex;
    flex-direction: column;
    gap: 25px;
}

.intro-text h2 {
    font-size: 3.5rem;
    font-weight: 300;
    color: var(--dark-gray);
    line-height: 1.2;
    letter-spacing: -1px;
    margin: 0;
}

.intro-text p {
    font-size: 1.15rem;
    color: var(--dark-gray);
    line-height: 1.8;
    margin: 0;
}

.intro-image {
    position: relative;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 20px var(--shadow);
}

.intro-image::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(3, 169, 244, 0.1) 0%, transparent 50%);
    pointer-events: none;
    z-index: 1;
}

.intro-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.6s ease;
    aspect-ratio: 16 / 9;
}

.intro-image:hover img {
    transform: scale(1.05);
}

/* ========================================
   GALLERY SECTION
======================================== */
.gallery-section {
    background: var(--light-gray);
    padding: 120px 40px;
    width: 100%;
    box-sizing: border-box;
}

.gallery-header {
    max-width: 800px;
    margin: 0 auto 60px;
    text-align: center;
}

.gallery-header h2 {
    font-size: 3rem;
    font-weight: 300;
    color: var(--dark-gray);
    margin-bottom: 20px;
    letter-spacing: -1px;
}

.gallery-subtitle {
    font-size: 1.2rem;
    color: var(--dark-gray);
    font-weight: 400;
    margin-top: 10px;
}

.gallery-grid {
    max-width: 1400px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
}

.gallery-item {
    position: relative;
    overflow: hidden;
    border-radius: 8px;
    background: var(--white);
    box-shadow: 0 2px 8px var(--shadow);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
}

.gallery-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(to top, rgba(3, 169, 244, 0.6) 0%, transparent 60%);
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: 1;
}

.gallery-item:hover::before {
    opacity: 1;
}

.gallery-item:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 24px var(--shadow-hover);
}

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

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

/* ========================================
   LIGHTBOX MODAL
======================================== */
.lightbox {
    display: none;
    position: fixed;
    z-index: 9999;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.95);
    animation: fadeIn 0.3s ease;
}

.lightbox.active {
    display: flex;
    align-items: center;
    justify-content: center;
}

.lightbox-content {
    max-width: 90%;
    max-height: 90vh;
    object-fit: contain;
    animation: zoomIn 0.3s ease;
}

.lightbox-close {
    position: absolute;
    top: 30px;
    right: 40px;
    color: var(--white);
    font-size: 50px;
    font-weight: 300;
    cursor: pointer;
    transition: color 0.3s ease;
    z-index: 10000;
    line-height: 1;
}

.lightbox-close:hover {
    color: var(--primary-blue);
}

.lightbox-nav {
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    display: flex;
    justify-content: space-between;
    padding: 0 20px;
    transform: translateY(-50%);
    pointer-events: none;
}

.lightbox-prev,
.lightbox-next {
    background: rgba(255, 255, 255, 0.1);
    color: var(--white);
    border: 2px solid var(--white);
    font-size: 24px;
    padding: 15px 20px;
    cursor: pointer;
    transition: all 0.3s ease;
    pointer-events: all;
    border-radius: 4px;
}

.lightbox-prev:hover,
.lightbox-next:hover {
    background: var(--primary-blue);
    border-color: var(--primary-blue);
}

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

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

/* Animation on Page Load */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.gallery-item {
    animation: fadeInUp 0.6s ease forwards;
    opacity: 0;
}

.gallery-item:nth-child(1) { animation-delay: 0.1s; }
.gallery-item:nth-child(2) { animation-delay: 0.15s; }
.gallery-item:nth-child(3) { animation-delay: 0.2s; }
.gallery-item:nth-child(4) { animation-delay: 0.25s; }
.gallery-item:nth-child(5) { animation-delay: 0.3s; }
.gallery-item:nth-child(6) { animation-delay: 0.35s; }
.gallery-item:nth-child(7) { animation-delay: 0.4s; }
.gallery-item:nth-child(8) { animation-delay: 0.45s; }
.gallery-item:nth-child(9) { animation-delay: 0.5s; }
.gallery-item:nth-child(10) { animation-delay: 0.55s; }
.gallery-item:nth-child(11) { animation-delay: 0.6s; }
.gallery-item:nth-child(12) { animation-delay: 0.65s; }

/* ========================================
   RESPONSIVE DESIGN
======================================== */

@media (max-width: 1200px) {
    .intro-container {
        gap: 60px;
    }
    
    .gallery-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 1024px) {
    .intro-section {
        padding: 80px 40px;
    }
    
    .intro-container {
        grid-template-columns: 1fr;
        gap: 50px;
    }
    
    .intro-text h2 {
        font-size: 2.8rem;
    }
    
    .gallery-header h2 {
        font-size: 2.5rem;
    }
    
    .gallery-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .intro-section {
        padding: 60px 25px;
    }
    
    .intro-text h2 {
        font-size: 2.2rem;
    }
    
    .intro-text p {
        font-size: 1rem;
    }
    
    .gallery-section {
        padding: 80px 25px;
    }
    
    .gallery-header h2 {
        font-size: 2rem;
    }
    
    .gallery-subtitle {
        font-size: 1rem;
    }
    
    .gallery-grid {
        gap: 15px;
    }
    
    .lightbox-close {
        top: 20px;
        right: 20px;
        font-size: 40px;
    }
    
    .lightbox-prev,
    .lightbox-next {
        padding: 10px 15px;
        font-size: 20px;
    }
}

@media (max-width: 480px) {
    .intro-section {
        padding: 40px 15px;
    }
    
    .intro-text h2 {
        font-size: 1.8rem;
    }
    
    .intro-text p {
        font-size: 0.95rem;
    }
    
    .gallery-section {
        padding: 60px 15px;
    }
    
    .gallery-header {
        margin-bottom: 40px;
    }
    
    .gallery-header h2 {
        font-size: 1.6rem;
    }
    
    .gallery-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
        max-width: 400px;
        margin: 0 auto;
    }
    
    .lightbox-content {
        max-width: 95%;
        max-height: 85vh;
    }
}