/* ==========================================
    PHOTO ZOOM MODAL STYLES
    Add this to your romantic.css file
========================================== */

.photo-zoom-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(44, 62, 80, 0.95);
    z-index: 10000;
    opacity: 0;
    transition: opacity 0.3s ease;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.photo-zoom-modal.active {
    display: flex;
    align-items: center;
    justify-content: center;
    animation: fadeIn 0.3s ease forwards;
}

@keyframes fadeIn {
    to {
        opacity: 1;
    }
}

.photo-zoom-container {
    position: relative;
    max-width: 90%;
    max-height: 90vh;
    animation: zoomIn 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes zoomIn {
    from {
        transform: scale(0.5);
        opacity: 0;
    }
    to {
        transform: scale(1);
        opacity: 1;
    }
}

.photo-zoom-image {
    max-width: 100%;
    max-height: 90vh;
    object-fit: contain;
    border-radius: 15px;
    box-shadow: 0 25px 80px rgba(233, 75, 107, 0.3),
                0 10px 40px rgba(0, 0, 0, 0.2);
    border: 5px solid var(--white);
    user-select: none;
    -webkit-user-select: none;
}

.photo-zoom-close {
    position: absolute;
    top: -50px;
    right: 0;
    width: 45px;
    height: 45px;
    background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
    border: none;
    border-radius: 50%;
    color: var(--white);
    font-size: 24px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    box-shadow: 0 5px 20px rgba(233, 75, 107, 0.4);
}

.photo-zoom-close:hover {
    transform: rotate(90deg) scale(1.1);
    background: var(--danger-color);
    box-shadow: 0 8px 25px rgba(231, 76, 60, 0.5);
}

.photo-zoom-info {
    position: absolute;
    bottom: -60px;
    left: 0;
    right: 0;
    text-align: center;
    color: var(--white);
    font-size: 14px;
    opacity: 0.9;
    padding: 0 20px;
}

.photo-zoom-info strong {
    color: var(--accent-color);
    font-weight: 600;
}

.photo-zoom-controls {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 15px;
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    padding: 12px 20px;
    border-radius: 50px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.zoom-control-btn {
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.2);
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    color: var(--white);
    font-size: 18px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.zoom-control-btn:hover {
    background: var(--primary-color);
    border-color: var(--primary-color);
    transform: scale(1.15);
    box-shadow: 0 5px 15px rgba(233, 75, 107, 0.5);
}

.zoom-control-btn:active {
    transform: scale(0.95);
}

/* Zoom cursor for images */
.member-image,
.profile-image-large,
.gallery-item img:not(.blurred),
.story-image {
    cursor: zoom-in;
    transition: transform 0.3s ease, filter 0.3s ease;
}

.member-image-wrapper:hover .member-image,
.profile-image-wrapper:hover .profile-image-large {
    transform: scale(1.05);
    filter: brightness(1.1);
}

/* Zoom indicator overlay */
.zoom-indicator {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, rgba(233, 75, 107, 0.95), rgba(243, 156, 18, 0.95));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: all 0.3s ease;
    pointer-events: none;
    color: var(--white);
    font-size: 28px;
    box-shadow: 0 5px 20px rgba(233, 75, 107, 0.5);
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
}

.member-image-wrapper:hover .zoom-indicator,
.profile-image-wrapper:hover .zoom-indicator {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1.1);
}

/* Loading spinner for image */
.photo-loading {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 50px;
    height: 50px;
    border: 4px solid rgba(255, 255, 255, 0.3);
    border-top-color: var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

/* Draggable states */
.photo-zoom-image.draggable {
    cursor: grab;
}

.photo-zoom-image.dragging {
    cursor: grabbing;
    transition: none !important;
}

/* Touch device enhancements */
@media (hover: none) and (pointer: coarse) {
    .zoom-indicator {
        display: none;
    }
    
    .member-image-wrapper::after,
    .profile-image-wrapper::after {
        content: '🔍';
        position: absolute;
        bottom: 10px;
        right: 10px;
        background: rgba(233, 75, 107, 0.9);
        color: white;
        width: 35px;
        height: 35px;
        border-radius: 50%;
        display: flex;
        align-items: center;
        justify-content: center;
        font-size: 18px;
        box-shadow: 0 3px 10px rgba(0, 0, 0, 0.3);
    }
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .photo-zoom-container {
        max-width: 95%;
        max-height: 85vh;
    }
    
    .photo-zoom-close {
        top: 10px;
        right: 10px;
        width: 40px;
        height: 40px;
        font-size: 20px;
    }
    
    .photo-zoom-info {
        bottom: 10px;
        font-size: 12px;
        background: rgba(0, 0, 0, 0.5);
        padding: 8px 15px;
        border-radius: 20px;
    }
    
    .photo-zoom-controls {
        bottom: 70px;
        padding: 10px 15px;
        gap: 10px;
    }
    
    .zoom-control-btn {
        width: 35px;
        height: 35px;
        font-size: 16px;
    }
    
    .photo-zoom-image {
        border-radius: 10px;
        border-width: 3px;
    }
}

@media (max-width: 480px) {
    .photo-zoom-controls {
        bottom: 60px;
        padding: 8px 12px;
        gap: 8px;
    }
    
    .zoom-control-btn {
        width: 32px;
        height: 32px;
        font-size: 14px;
    }
    
    .photo-zoom-info {
        font-size: 11px;
        padding: 6px 12px;
    }
}

/* Prevent body scroll when modal is open */
body.modal-open {
    overflow: hidden;
    height: 100vh;
}

/* Smooth transitions */
.photo-zoom-image,
.zoom-control-btn,
.photo-zoom-close {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Add subtle glow effect to controls on hover */
.zoom-control-btn:hover {
    box-shadow: 0 0 20px rgba(233, 75, 107, 0.6);
}

/* Pinch zoom hint for mobile */
@media (max-width: 768px) {
    .photo-zoom-modal.active::before {
        content: '👆 Pinch to zoom • Swipe to pan';
        position: absolute;
        top: 20px;
        left: 50%;
        transform: translateX(-50%);
        background: rgba(233, 75, 107, 0.9);
        color: white;
        padding: 8px 20px;
        border-radius: 20px;
        font-size: 12px;
        animation: fadeOut 3s ease forwards;
        z-index: 10001;
    }
    
    @keyframes fadeOut {
        0%, 70% {
            opacity: 1;
        }
        100% {
            opacity: 0;
        }
    }
}

/* ==========================================
    GALLERY SECTION STYLES
========================================== */

.gallery-section {
    background: linear-gradient(180deg, #ffffff 0%, #fdf2f8 50%, #f3e9ff 100%);
    padding: 80px 20px;
    position: relative;
    overflow: hidden;
}

.gallery-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image:
        radial-gradient(circle at 15% 20%, rgba(233, 75, 107, 0.04) 0%, transparent 50%),
        radial-gradient(circle at 85% 80%, rgba(243, 156, 18, 0.04) 0%, transparent 50%);
    pointer-events: none;
}

/* Gallery Masonry Grid */
.gallery-masonry {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 25px;
    margin-top: 50px;
    position: relative;
    z-index: 1;
}

@media (min-width: 768px) {
    .gallery-masonry {
        grid-template-columns: repeat(3, 1fr);
    }
}

.gallery-masonry-item {
    position: relative;
    overflow: hidden;
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    animation: fadeInUp 0.6s ease both;
    background: white;
}

/* Masonry variations */
.gallery-masonry-item.gallery-tall {
    grid-row: span 2;
}

.gallery-masonry-item.gallery-wide {
    grid-column: span 2;
}

@media (max-width: 767px) {
    .gallery-masonry-item.gallery-tall,
    .gallery-masonry-item.gallery-wide {
        grid-row: span 1;
        grid-column: span 1;
    }
}

.gallery-masonry-item:hover {
    transform: translateY(-10px) scale(1.02);
    box-shadow: 0 20px 50px rgba(233, 75, 107, 0.2);
    z-index: 10;
}

/* Gallery Item Wrapper */
.gallery-item-wrapper {
    position: relative;
    width: 100%;
    height: 100%;
    overflow: hidden;
    cursor: pointer;
}

.gallery-img {
    width: 100%;
    height: 100%;
    min-height: 320px;
    object-fit: cover;
    transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
    display: block;
    cursor: pointer;
    pointer-events: auto;
}

.gallery-masonry-item.gallery-tall .gallery-img {
    min-height: 450px;
}

.gallery-masonry-item:hover .gallery-img {
    transform: scale(1.1);
}

/* Gallery Overlay */
.gallery-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(
        to top,
        rgba(233, 75, 107, 0.95) 0%,
        rgba(243, 156, 18, 0.85) 50%,
        transparent 100%
    );
    opacity: 0;
    transition: opacity 0.4s ease;
    display: flex;
    align-items: flex-end;
    padding: 30px;
}

.gallery-masonry-item:hover .gallery-overlay {
    opacity: 1;
}

.gallery-overlay-content {
    transform: translateY(30px);
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    color: white;
    width: 100%;
}

.gallery-masonry-item:hover .gallery-overlay-content {
    transform: translateY(0);
}

.gallery-title {
    font-size: 22px;
    font-weight: 700;
    margin-bottom: 8px;
    color: white;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

.gallery-caption {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.95);
    line-height: 1.5;
    margin: 0;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.2);
}

/* Zoom Indicator in Gallery */
.gallery-overlay .zoom-indicator {
    position: absolute;
    top: 20px;
    right: 20px;
    width: 50px;
    height: 50px;
    background: rgba(255, 255, 255, 0.25);
    backdrop-filter: blur(10px);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 20px;
    opacity: 0;
    transform: scale(0.5);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    border: 2px solid rgba(255, 255, 255, 0.3);
}

.gallery-masonry-item:hover .zoom-indicator {
    opacity: 1;
    transform: scale(1);
}

/* Gallery CTA */
.gallery-cta {
    text-align: center;
    margin-top: 60px;
    position: relative;
    z-index: 1;
}

.btn-gallery-more {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    padding: 16px 35px;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--accent-color) 100%);
    color: white;
    text-decoration: none;
    border-radius: 50px;
    font-size: 16px;
    font-weight: 700;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 10px 30px rgba(233, 75, 107, 0.3);
    position: relative;
    overflow: hidden;
}

.btn-gallery-more::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    transition: left 0.6s ease;
}

.btn-gallery-more:hover::before {
    left: 100%;
}

.btn-gallery-more:hover {
    transform: translateY(-3px) scale(1.05);
    box-shadow: 0 15px 40px rgba(233, 75, 107, 0.4);
    color: white;
}

.btn-gallery-more i {
    transition: transform 0.3s ease;
}

.btn-gallery-more:hover i {
    transform: translateX(5px);
}

/* Decorative Elements */
.gallery-section::after {
    content: '💕';
    position: absolute;
    font-size: 80px;
    opacity: 0.05;
    animation: floatHeart 15s ease-in-out infinite;
    pointer-events: none;
}

@keyframes floatHeart {
    0%, 100% {
        top: 10%;
        left: 5%;
        transform: rotate(0deg);
    }
    25% {
        top: 20%;
        left: 15%;
        transform: rotate(15deg);
    }
    50% {
        top: 30%;
        left: 10%;
        transform: rotate(-15deg);
    }
    75% {
        top: 15%;
        left: 8%;
        transform: rotate(10deg);
    }
}

/* Animation Keyframes */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(40px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Loading State for Images */
.gallery-img {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
}

@keyframes shimmer {
    0% {
        background-position: -200% 0;
    }
    100% {
        background-position: 200% 0;
    }
}

.gallery-img[src] {
    background: none;
    animation: none;
}

/* Responsive Design */
@media (max-width: 768px) {
    .gallery-section {
        padding: 60px 20px;
    }

    .gallery-masonry {
        grid-template-columns: repeat(2, 1fr);
        gap: 15px;
        margin-top: 40px;
    }

    .gallery-img {
        min-height: 220px;
    }

    .gallery-masonry-item.gallery-tall .gallery-img {
        min-height: 280px;
    }

    .gallery-overlay {
        padding: 20px;
    }

    .gallery-title {
        font-size: 18px;
    }

    .gallery-caption {
        font-size: 13px;
    }

    .gallery-overlay .zoom-indicator {
        width: 40px;
        height: 40px;
        font-size: 16px;
        top: 15px;
        right: 15px;
    }

    .btn-gallery-more {
        padding: 14px 28px;
        font-size: 15px;
    }
}

@media (max-width: 480px) {
    .gallery-masonry {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .gallery-img {
        min-height: 280px;
    }

    .gallery-masonry-item.gallery-tall .gallery-img {
        min-height: 350px;
    }

    .section-title {
        font-size: 28px;
    }

    .section-subtitle {
        font-size: 16px;
    }
}

/* Print Styles */
@media print {
    .gallery-overlay,
    .btn-gallery-more,
    .zoom-indicator {
        display: none !important;
    }

    .gallery-masonry-item {
        page-break-inside: avoid;
    }
}

/* High Contrast Mode */
@media (prefers-contrast: high) {
    .gallery-overlay {
        background: linear-gradient(to top, rgba(0, 0, 0, 0.9) 0%, transparent 100%);
    }

    .gallery-title,
    .gallery-caption {
        text-shadow: 2px 2px 8px rgba(0, 0, 0, 0.8);
    }
}

/* Reduced Motion */
@media (prefers-reduced-motion: reduce) {
    .gallery-masonry-item,
    .gallery-img,
    .gallery-overlay-content,
    .zoom-indicator,
    .btn-gallery-more {
        animation: none !important;
        transition: none !important;
    }

    .gallery-masonry-item:hover {
        transform: none;
    }
}