/* Portfolio Page Specific CSS */

/* Hero Section */
.portfolio-hero {
    padding: 120px 0 80px;
    background: linear-gradient(135deg, #f5f5f5 0%, #ffffff 100%);
    text-align: center;
    min-height: 70vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

.portfolio-hero .hero-content h1 {
    font-size: 3rem;
    color: white;
    margin-bottom: 25px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.7);
}

.portfolio-hero .hero-content p {
    font-size: 1.2rem;
    color: white;
    max-width: 700px;
    margin: 0 auto;
    line-height: 1.6;
    text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.7);
}

/* Filter Section */
.filter-section {
    padding: 60px 0;
    background: white;
    border-bottom: 1px solid var(--border-color);
}

.filter-tabs {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 10px;
}

.filter-btn {
    background: var(--background-light-gray);
    color: var(--text-light);
    border: none;
    padding: 12px 24px;
    border-radius: 25px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 500;
}

.filter-btn:hover,
.filter-btn.active {
    background: var(--primary-color);
    color: white;
}

/* Portfolio Gallery */
.portfolio-gallery {
    padding: 80px 0;
    background: white;
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    margin-top: 40px;
}

.gallery-item {
    position: relative;
    overflow: hidden;
    border-radius: 10px;
    aspect-ratio: 4/5; /* Changed from 4/3 to 4/5 to match maternity page */
    cursor: pointer;
    transition: all 0.3s ease;
    opacity: 1;
    transform: scale(1);
}

.gallery-item:hover {
    transform: scale(1.02); /* Reduced from 1.02 to match maternity page */
}

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

.gallery-item:hover img {
    transform: scale(1.05); /* Changed from 1.05 to match maternity page */
}

.gallery-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
}

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

.overlay-content {
    text-align: center;
    color: white;
    padding: 20px;
}

.overlay-content h3 {
    color: white;
    margin-bottom: 10px;
    font-size: 1.2rem;
}

.overlay-content p {
    color: rgba(255, 255, 255, 0.8);
    margin: 0;
    font-size: 14px;
}

/* Filter Animation */
.gallery-item {
    animation: fadeIn 0.5s ease;
}

.gallery-item.hide {
    display: none;
}

@keyframes fadeIn {
    from { opacity: 0; transform: scale(0.9); }
    to { opacity: 1; transform: scale(1); }
}

/* Stats Section */
.stats-section {
    padding: 80px 0;
    background: var(--background-gray);
}

.stats-section h2 {
    text-align: center;
    color: var(--primary-color);
    margin-bottom: 50px;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 30px;
}

.stat-card {
    background: white;
    padding: 40px 30px;
    border-radius: 15px;
    text-align: center;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

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

.stat-number {
    font-size: 3rem;
    color: var(--accent-color);
    font-family: var(--font-heading);
    font-weight: 700;
    margin-bottom: 10px;
}

.stat-label {
    color: var(--text-light);
    font-weight: 500;
    font-size: 1.1rem;
}

/* Testimonials Section */
.testimonials-section {
    padding: 80px 0;
    background: white;
}

.testimonials-section h2 {
    text-align: center;
    color: var(--primary-color);
    margin-bottom: 50px;
}

.testimonials-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
}

.testimonial-card {
    background: var(--background-light-gray);
    padding: 30px;
    border-radius: 15px;
    position: relative;
    transition: all 0.3s ease;
}

.testimonial-card::before {
    content: '"';
    position: absolute;
    top: -10px;
    left: 30px;
    font-size: 4rem;
    color: var(--accent-color);
    font-family: Georgia, serif;
}

.testimonial-card:hover {
    background: white;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.1);
    transform: translateY(-5px);
}

.testimonial-card p {
    color: var(--text-light);
    font-style: italic;
    line-height: 1.6;
    margin-bottom: 20px;
}

.testimonial-author strong {
    color: var(--primary-color);
    display: block;
    margin-bottom: 5px;
}

.testimonial-author span {
    color: var(--text-lighter);
    font-size: 14px;
}

/* CTA Section */
.cta {
    padding: 80px 0;
    background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
    color: white;
    text-align: center;
}

.cta-content h2 {
    color: white;
    margin-bottom: 20px;
    font-size: 2.5rem;
}

.cta-content p {
    color: rgba(255, 255, 255, 0.9);
    font-size: 1.2rem;
    margin-bottom: 35px;
}

.cta .btn-primary {
    background-color: white;
    color: var(--primary-color);
    font-size: 18px;
    padding: 18px 45px;
}

.cta .btn-primary:hover {
    background-color: var(--background-light-gray);
    transform: translateY(-3px);
}

/* Responsive Design */
@media (max-width: 1024px) {
    .gallery-grid {
        grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
        gap: 15px;
    }

    .gallery-item {
        aspect-ratio: 3/4; /* Adjusted for tablet */
    }

    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .testimonials-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .portfolio-hero .hero-content h1 {
        font-size: 2.5rem;
    }

    .gallery-grid {
        grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
        gap: 15px;
    }

    .gallery-item {
        aspect-ratio: 4/5; /* Maintain portrait ratio */
    }

    .filter-tabs {
        justify-content: flex-start;
        overflow-x: auto;
        padding-bottom: 10px;
    }

    .filter-btn {
        flex-shrink: 0;
        padding: 10px 20px;
    }

    .stats-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
}

@media (max-width: 480px) {
    .portfolio-hero .hero-content h1 {
        font-size: 2rem;
    }

    .gallery-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }

    .gallery-item {
        aspect-ratio: 4/5; /* Keep portrait ratio */
        min-height: 300px; /* Ensure good height on mobile */
    }

    .stat-card {
        padding: 30px 20px;
    }

    .stat-number {
        font-size: 2.5rem;
    }

    .cta-content h2 {
        font-size: 2rem;
    }

    .overlay-content h3 {
        font-size: 1rem;
    }
}

/* Lightbox Styles */
.lightbox-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.95);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 10000;
    opacity: 0;
    transition: opacity 0.3s ease;
    box-sizing: border-box;
    padding: 20px;
    overflow-y: auto; /* Allow scrolling for tall images */
}

.lightbox-overlay.active {
    opacity: 1;
}

.lightbox-container {
    position: relative;
    width: min(95vw, 1600px);
    max-width: 1600px;
    max-height: 90vh; /* Limit height to 90% of viewport */
    background: rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 25px;
    box-sizing: border-box;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.5);
    overflow: visible;
    margin: 20px 0;
}

.lightbox-image-container {
    flex: 1;
    width: 100%;
    max-height: calc(90vh - 200px); /* Limit container height */
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    position: relative;
    min-height: 300px;
    margin-bottom: 30px;
    box-sizing: border-box;
    overflow: hidden; /* Prevent overflow */
}

.lightbox-image {
    max-width: 100%;
    max-height: 100%;
    width: auto;
    height: auto;
    object-fit: contain; /* Show full image without cropping */
    border-radius: 8px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    transition: transform 0.3s ease;
    position: relative;
    z-index: 1;
    transform-origin: center center;
    image-rendering: -webkit-optimize-contrast;
    image-rendering: crisp-edges;
    object-position: center;
}

.lightbox-close {
    position: absolute;
    top: 20px;
    right: 20px;
    background: rgba(255, 255, 255, 0.2);
    color: white;
    border: 2px solid rgba(255, 255, 255, 0.3);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    font-size: 24px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    z-index: 10001;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.lightbox-close:hover {
    background: rgba(255, 255, 255, 0.3);
    border-color: rgba(255, 255, 255, 0.5);
    transform: scale(1.1);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

.lightbox-close:active {
    transform: scale(0.95);
}

/* Bottom Navigation Controls */
.lightbox-nav-controls {
    position: absolute;
    bottom: 70px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 15px;
    width: 280px;
    z-index: 10001;
    pointer-events: auto;
}

.nav-btn {
    background: rgba(255, 255, 255, 0.2);
    color: white;
    border: 2px solid rgba(255, 255, 255, 0.3);
    width: 60px;
    height: 60px;
    border-radius: 50%;
    font-size: 24px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.nav-btn:hover {
    background: rgba(255, 255, 255, 0.3);
    border-color: rgba(255, 255, 255, 0.5);
    transform: scale(1.1);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

.nav-btn:active {
    transform: scale(0.95);
}

.nav-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none !important;
}

.nav-btn:disabled:hover {
    background: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.3);
    transform: none !important;
    box-shadow: none;
}

/* Zoom Controls in Center */
.zoom-controls-center {
    display: flex;
    gap: 8px;
    align-items: center;
}

.zoom-btn {
    background: rgba(255, 255, 255, 0.2);
    color: white;
    border: 2px solid rgba(255, 255, 255, 0.3);
    width: 45px;
    height: 45px;
    border-radius: 50%;
    font-size: 20px;
    font-weight: bold;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.zoom-btn:hover {
    background: rgba(255, 255, 255, 0.3);
    border-color: rgba(255, 255, 255, 0.5);
    transform: scale(1.1);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

.zoom-btn:active {
    transform: scale(0.95);
}

.lightbox-caption {
    margin-top: 15px;
    text-align: center;
    color: white;
    max-width: 600px;
    padding: 0 20px;
    box-sizing: border-box;
}

.lightbox-caption h3 {
    font-size: 1.5rem;
    margin-bottom: 10px;
    text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.7);
    line-height: 1.3;
}

.lightbox-caption p {
    font-size: 1rem;
    opacity: 0.9;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.7);
    line-height: 1.4;
}

/* Responsive Lightbox */
@media (max-width: 1200px) {
    .lightbox-container {
        width: min(95vw, 1200px);
        padding: 25px;
    }

    .lightbox-image-container {
        min-height: 280px;
        margin-bottom: 25px;
    }
}

@media (max-width: 992px) {
    .lightbox-container {
        width: min(96vw, 1000px);
        padding: 22px;
    }

    .lightbox-image-container {
        min-height: 250px;
        margin-bottom: 25px;
    }
}

@media (max-width: 768px) {
    .lightbox-overlay {
        padding: 15px;
    }

    .lightbox-container {
        width: min(97vw, 750px);
        padding: 20px;
    }

    .lightbox-image-container {
        min-height: 220px;
        margin-bottom: 25px;
    }

    .lightbox-nav-controls {
        bottom: 50px;
        width: 240px;
        gap: 12px;
    }

    .nav-btn {
        width: 50px;
        height: 50px;
        font-size: 20px;
    }

    .lightbox-close {
        top: 10px;
        right: 10px;
        width: 35px;
        height: 35px;
        font-size: 20px;
    }

    .zoom-controls-center {
        gap: 6px;
    }

    .zoom-btn {
        width: 35px;
        height: 35px;
        font-size: 16px;
    }

    .lightbox-caption {
        margin-top: 25px;
    }

    .lightbox-caption h3 {
        font-size: 1.2rem;
        margin-bottom: 8px;
    }

    .lightbox-caption p {
        font-size: 0.9rem;
    }
}

@media (max-width: 576px) {
    .lightbox-overlay {
        padding: 10px;
    }

    .lightbox-container {
        width: min(98vw, 550px);
        padding: 15px;
    }

    .lightbox-image-container {
        min-height: 180px;
        margin-bottom: 20px;
    }

    .lightbox-nav-controls {
        bottom: 40px;
        width: 200px;
        gap: 8px;
    }

    .nav-btn {
        width: 45px;
        height: 45px;
        font-size: 18px;
    }

    .zoom-controls-center {
        gap: 5px;
    }

    .zoom-btn {
        width: 35px;
        height: 35px;
        font-size: 16px;
    }

    .lightbox-caption {
        margin-top: 30px;
        padding: 0 10px;
    }

    .lightbox-caption h3 {
        font-size: 1.1rem;
        margin-bottom: 6px;
    }

    .lightbox-caption p {
        font-size: 0.85rem;
    }
}

@media (max-width: 480px) {
    .lightbox-overlay {
        padding: 8px;
    }

    .lightbox-container {
        width: min(98vw, 450px);
        padding: 12px;
    }

    .lightbox-image-container {
        min-height: 150px;
        margin-bottom: 18px;
    }

    .lightbox-nav-controls {
        bottom: 35px;
        width: 180px;
        gap: 6px;
    }

    .nav-btn {
        width: 40px;
        height: 40px;
        font-size: 16px;
    }

    .zoom-controls-center {
        gap: 4px;
    }

    .zoom-btn {
        width: 32px;
        height: 32px;
        font-size: 14px;
    }

    .lightbox-caption {
        margin-top: 35px;
        padding: 0 8px;
    }

    .lightbox-caption h3 {
        font-size: 1rem;
        margin-bottom: 5px;
    }

    .lightbox-caption p {
        font-size: 0.8rem;
    }
}