/* ============================================================
   PORTFOLIO DETAIL PAGES STYLES
   Riverside Home Designs
   portfolio1.html through portfolio12.html
   ============================================================ */

/* ========== PROJECT DESCRIPTION ========== */
.project-description {
    max-width: 800px;
    margin: 0 auto 40px;
    line-height: 1.8;
    font-size: 1.05rem;
}

.project-description h2 {
    color: #333;
    margin-bottom: 20px;
}

.project-description p {
    margin-bottom: 15px;
}

/* ========== PROJECT DETAILS ========== */
.project-details {
    background: #f8f9fa;
    padding: 25px;
    border-radius: 8px;
    margin-bottom: 40px;
}

.project-details h3 {
    margin-top: 0;
    color: #333;
}

.project-details ul {
    list-style: none;
    padding: 0;
    margin: 0;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
}

.project-details li {
    color: #555;
}

.project-details strong {
    color: #333;
}

/* ========== IMAGE GALLERY GRID ========== */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin: 40px 0;
}

@media (max-width: 768px) {
    .gallery-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 15px;
    }
}

@media (max-width: 480px) {
    .gallery-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }
}

/* ========== GALLERY ITEM ========== */
.gallery-item {
    cursor: pointer;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 3px 10px rgba(0,0,0,0.1);
    transition: transform 0.3s, box-shadow 0.3s;
}

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

.gallery-item img {
    width: 100%;
    height: auto;
    aspect-ratio: 4/3;
    object-fit: cover;
    display: block;
    transition: transform 0.4s;
}

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

.gallery-item .caption {
    padding: 12px 15px;
    background: #fff;
    text-align: center;
    font-weight: 600;
    color: #333;
    font-size: 0.95rem;
    border-top: 3px solid #c41e3a;
}

/* ========== LIGHTBOX ========== */
.lightbox-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.95);
    z-index: 9999;
    justify-content: center;
    align-items: center;
    flex-direction: column;
}

.lightbox-overlay.active {
    display: flex;
}

.lightbox-content {
    position: relative;
    max-width: 90%;
    max-height: 85%;
}

.lightbox-content img {
    max-width: 100%;
    max-height: 80vh;
    border-radius: 5px;
}

.lightbox-caption {
    color: #fff;
    text-align: center;
    padding: 15px;
    font-size: 1.1rem;
}

.lightbox-close {
    position: absolute;
    top: 20px;
    right: 30px;
    color: #fff;
    font-size: 2.5rem;
    cursor: pointer;
    z-index: 10000;
    transition: color 0.3s;
}

.lightbox-close:hover {
    color: #c41e3a;
}

.lightbox-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    color: #fff;
    font-size: 3rem;
    cursor: pointer;
    padding: 20px;
    z-index: 10000;
    transition: color 0.3s;
}

.lightbox-nav:hover {
    color: #c41e3a;
}

.lightbox-prev {
    left: 20px;
}

.lightbox-next {
    right: 20px;
}

/* ========== RELATED PROJECTS ========== */
.related-projects {
    margin: 50px 0;
    padding-top: 30px;
    border-top: 1px solid #eee;
}

.related-projects h3 {
    text-align: center;
    margin-bottom: 25px;
    color: #333;
}

.related-projects-grid {
    display: flex;
    justify-content: center;
    gap: 20px;
    flex-wrap: wrap;
}

.related-projects-grid a {
    text-decoration: none;
    color: #1464d1;
    padding: 12px 25px;
    border: 2px solid #eee;
    border-radius: 8px;
    transition: all 0.3s;
    text-align: center;
}

.related-projects-grid a:hover {
    border-color: #1464d1;
    background: #f8f9fa;
}

.related-projects-grid span {
    font-size: 0.85rem;
    color: #666;
    display: block;
}

/* ========== PORTFOLIO NAVIGATION ========== */
.portfolio-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin: 30px 0;
    padding: 25px 0;
    border-top: 1px solid #eee;
    border-bottom: 1px solid #eee;
}

.portfolio-nav a {
    color: #1464d1;
    text-decoration: none;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    border: 2px solid #1464d1;
    border-radius: 5px;
    transition: all 0.3s;
}

.portfolio-nav a:hover {
    background: #1464d1;
    color: #fff;
}

.portfolio-nav .nav-label {
    font-size: 0.85rem;
    color: #666;
    display: block;
}

.portfolio-nav a:hover .nav-label {
    color: rgba(255,255,255,0.8);
}

.portfolio-nav .nav-title {
    font-size: 1rem;
}

/* ========== CTA SECTION ========== */
.cta-section {
    text-align: center;
    padding: 20px;
}

.cta-section .cta-text {
    font-size: 1.1rem;
    color: #333;
    margin-bottom: 25px;
    line-height: 1.6;
}

.cta-section .cta-image-link {
    display: inline-block;
    transition: transform 0.3s ease;
}

.cta-section .cta-image-link:hover {
    transform: scale(1.02);
}

.cta-section .cta-image-link img {
    max-width: 100%;
    height: auto;
}

/* ========== RESPONSIVE - TABLET ========== */
@media (max-width: 768px) {
    .project-description {
        font-size: 1rem;
    }
    
    .project-details {
        padding: 20px;
    }
    
    .project-details ul {
        grid-template-columns: 1fr;
    }
    
    .gallery-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 15px;
    }
    
    .gallery-item .caption {
        font-size: 0.9rem;
        padding: 10px 12px;
    }
    
    .lightbox-nav {
        font-size: 2rem;
        padding: 15px;
    }
    
    .lightbox-close {
        font-size: 2rem;
    }
    
    .portfolio-nav {
        flex-wrap: wrap;
        gap: 15px;
    }
    
    .portfolio-nav a {
        flex: 1;
        min-width: 200px;
        justify-content: center;
    }
    
    .cta-section {
        padding: 15px;
    }
}

/* ========== RESPONSIVE - MOBILE ========== */
@media (max-width: 480px) {
    .project-description {
        font-size: 0.95rem;
        margin-bottom: 25px;
    }
    
    .project-description h2 {
        font-size: 1.3rem;
    }
    
    .project-details {
        padding: 15px;
        margin-bottom: 25px;
    }
    
    .project-details h3 {
        font-size: 1.1rem;
    }
    
    .project-details ul {
        grid-template-columns: 1fr;
        gap: 12px;
    }
    
    .project-details li {
        font-size: 0.9rem;
    }
    
    .gallery-grid {
        grid-template-columns: 1fr;
        gap: 12px;
        margin: 25px 0;
    }
    
    .gallery-item .caption {
        font-size: 0.85rem;
        padding: 8px 10px;
    }
    
    .lightbox-content {
        max-width: 95%;
    }
    
    .lightbox-content img {
        max-height: 70vh;
    }
    
    .lightbox-caption {
        font-size: 0.95rem;
        padding: 10px;
    }
    
    .lightbox-nav {
        font-size: 1.5rem;
        padding: 10px;
    }
    
    .lightbox-prev {
        left: 10px;
    }
    
    .lightbox-next {
        right: 10px;
    }
    
    .lightbox-close {
        font-size: 1.8rem;
        top: 10px;
        right: 15px;
    }
    
    .portfolio-nav {
        flex-direction: column;
        gap: 10px;
        margin: 20px 0;
        padding: 15px 0;
    }
    
    .portfolio-nav a {
        width: 100%;
        padding: 12px 15px;
        font-size: 0.95rem;
    }
    
    .portfolio-nav .nav-title {
        font-size: 0.95rem;
    }
    
    .cta-section {
        padding: 12px;
    }
    
    .cta-section .cta-text {
        font-size: 1rem;
        margin-bottom: 15px;
    }
}

/* ========== PRINT STYLES ========== */
@media print {
    .portfolio-nav {
        display: none;
    }
    
    .lightbox-overlay {
        display: none !important;
    }
    
    .gallery-item {
        page-break-inside: avoid;
    }
    
    .gallery-item .caption {
        font-size: 0.85rem;
    }
    
    .project-details {
        border: 1px solid #ddd;
        page-break-inside: avoid;
    }
    
    .project-description h2 {
        page-break-after: avoid;
    }
}
