/* ==========================================================================
   LIFE LOG SPECIFIC STYLES
   (Relies on styles.css for Header, Footer, and Resets)
   ========================================================================== */

/* Hero Section (Unique to Life Log) */
.lifelog-hero-section {
    display: flex;
    justify-content: flex-start;
    padding-top: 8rem;
    padding-bottom: 1rem;
    position: relative;
}

.lifelog-hero-content {
    max-width: 1150px;
    width: 100%;
    margin: 0;
    text-align: left;
    padding-left: 0rem;
}

.lifelog-hero-title {
    font-size: 2rem;
    font-weight: 400;
    line-height: 1.2;
    margin-bottom: 3rem;
    color: #ffffff;
    letter-spacing: -0.02em;
    text-align: left;
}

.lifelog-hero-description {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    padding-left: 0rem;
    text-align: left;
}

.lifelog-hero-description p {
    font-size: 1.25rem;
    font-weight: 400;
    line-height: 1.6;
    color: rgba(255, 255, 255, 0.8);
    letter-spacing: -0.01em;
    text-align: left;
}

/* Gallery Section */
.gallery-section {
    padding: 4rem 0;
    background-color: #0a0a0a;
    position: relative;
}

/* Gallery Controls */
.gallery-controls {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.search-box-container {
    position: relative;
    display: flex;
    align-items: center;
    padding-top: 2rem;
}

.search-icon {
    position: absolute;
    left: 1rem;
    color: rgba(255, 255, 255, 0.5);
    pointer-events: none;
}

.gallery-search-input {
    width: 100%;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #ffffff;
    padding: 0.875rem 1rem 0.875rem 3rem;
    border-radius: 10px;
    font-size: 1rem;
    font-family: inherit;
    outline: none;
    transition: all 0.3s ease;
}

.gallery-search-input::placeholder {
    color: rgba(255, 255, 255, 0.4);
}

.gallery-search-input:focus {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.25);
}

/* Collections Bar */
.collections-bar {
    display: flex;
    gap: 0.75rem;
    overflow-x: auto;
    padding-bottom: 0.5rem;
    scrollbar-width: none;
}

.collections-bar::-webkit-scrollbar {
    display: none;
}

.collection-chip {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.7);
    padding: 0.625rem 1.25rem;
    border-radius: 20px;
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    white-space: nowrap;
    font-family: inherit;
}

.collection-chip:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.2);
    color: #ffffff;
}

.collection-chip.active {
    background: rgba(255, 255, 255, 0.15);
    border-color: rgba(255, 255, 255, 0.3);
    color: #ffffff;
}

.photo-count {
    font-size: 0.875rem;
    color: rgba(255, 255, 255, 0.5);
    margin-bottom: 1rem;
}

/* Masonry Grid */
.masonry-grid {
    column-count: 3;
    column-gap: 1.5rem;
    margin-bottom: 3rem;
}

.photo-card {
    break-inside: avoid;
    margin-bottom: 1.5rem;
    position: relative;
    overflow: hidden;
    border-radius: 12px;
    cursor: pointer;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: inline-block;
    width: 100%;
}

.photo-card:hover {
    transform: translateY(-4px);
    border-color: rgba(255, 255, 255, 0.2);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
}

.photo-card-image {
    position: relative;
    width: 100%;
    overflow: hidden;
    background: #1a1a1a;
}

.photo-card-image img {
    width: 100%;
    height: auto;
    display: block;
    transition: transform 0.4s ease;
    pointer-events: none;
    user-select: none;
    -webkit-user-select: none;
    -webkit-user-drag: none;
}

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

.photo-count-badge {
    position: absolute;
    top: 0.75rem;
    right: 0.75rem;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(8px);
    color: #ffffff;
    padding: 0.375rem 0.75rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 0.375rem;
    z-index: 2;
}

.photo-count-badge svg {
    width: 14px;
    height: 14px;
}

.photo-card-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.8) 0%, transparent 100%);
    padding: 1.5rem 1rem 1rem;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.photo-card:hover .photo-card-overlay {
    opacity: 1;
}

.photo-card-title {
    font-size: 1rem;
    font-weight: 500;
    color: #ffffff;
    margin-bottom: 0.25rem;
}

.photo-card-date {
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.7);
}

.no-results {
    display: none;
    text-align: center;
    padding: 4rem 2rem;
}

.no-results p {
    font-size: 1.125rem;
    color: rgba(255, 255, 255, 0.5);
}

.no-results.visible {
    display: block;
}

/* Photo Modal */
.photo-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.92);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    z-index: 9999;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.photo-overlay.active {
    opacity: 1;
    visibility: visible;
}

.photo-modal {
    position: relative;
    width: 95%;
    max-width: 1400px;
    height: 92vh;
    margin: 4vh auto;
    background: linear-gradient(135deg, rgba(26, 26, 26, 0.95) 0%, rgba(20, 20, 20, 0.92) 50%, rgba(15, 15, 15, 0.95) 100%);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
    transform: scale(0.95) translateY(20px);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.photo-overlay.active .photo-modal {
    transform: scale(1) translateY(0);
}

.photo-close {
    position: absolute;
    top: 1.4rem;
    right: 1.4rem;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.15);
    color: rgba(255, 255, 255, 0.8);
    width: 44px;
    height: 44px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    z-index: 10;
}

.photo-close:hover {
    background: rgba(255, 255, 255, 0.15);
    color: #ffffff;
    transform: rotate(90deg);
}

.photo-modal-inner {
    display: flex;
    height: 100%;
}

.photo-image-section {
    flex: 1;
    display: flex;
    flex-direction: column;
    background: #000000;
    overflow: hidden;
}

.photo-carousel {
    flex: 1;
    position: relative;
    overflow: hidden;
}

.carousel-image-wrapper {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.carousel-image {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    user-select: none;
    -webkit-user-select: none;
    -webkit-user-drag: none;
    pointer-events: none;
}

.image-shield {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 5;
}

.carousel-dots {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.5rem;
    padding: 1rem;
    background: rgba(0, 0, 0, 0.5);
    min-height: 50px;
}

.carousel-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    cursor: pointer;
    transition: all 0.3s ease;
}

.carousel-dot.active {
    background: #ffffff;
    transform: scale(1.3);
}

.carousel-dot:hover {
    background: rgba(255, 255, 255, 0.6);
}

.image-nav-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: #ffffff;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    z-index: 10;
    opacity: 0;
}

.photo-carousel:hover .image-nav-arrow {
    opacity: 1;
}

.image-nav-arrow:hover {
    background: rgba(0, 0, 0, 0.8);
    transform: translateY(-50%) scale(1.1);
}

.image-nav-arrow.disabled {
    opacity: 0.3;
    cursor: not-allowed;
    pointer-events: none;
}

.image-nav-left {
    left: 1rem;
}

.image-nav-right {
    right: 1rem;
}

.image-nav-arrow svg {
    width: 20px;
    height: 20px;
}

.photo-details-section {
    width: 380px;
    background: rgba(15, 15, 15, 0.98);
    padding: 2.5rem 2rem;
    overflow-y: auto;
    border-left: 1px solid rgba(255, 255, 255, 0.1);
}

.photo-details-section::-webkit-scrollbar {
    width: 4px;
}

.photo-details-section::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 2px;
}

.photo-title {
    font-size: 1.75rem;
    font-weight: 500;
    color: #ffffff;
    margin-top: 1.75rem;
    margin-bottom: 1.5rem;
    line-height: 1.3;
    letter-spacing: -0.01em;
}

.photo-meta {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    margin-bottom: 1.5rem;
}

.photo-date,
.photo-location {
    font-size: 0.875rem;
    color: rgba(255, 255, 255, 0.6);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.photo-date::before {
    content: '📅';
}

.photo-location::before {
    content: '📍';
}

.photo-collections {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
}

.photo-collection-tag {
    background: rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.8);
    padding: 0.375rem 0.875rem;
    border-radius: 12px;
    font-size: 0.75rem;
    border: 1px solid rgba(255, 255, 255, 0.15);
}

.photo-divider {
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.1), transparent);
    margin: 1.5rem 0;
}

.photo-memory {
    font-size: 1.0625rem;
    line-height: 1.7;
    color: rgba(255, 255, 255, 0.85);
    font-weight: 400;
}

/* Responsive Overrides (Using styles.css breakpoints where possible) */
@media (max-width: 1400px) {
    .masonry-grid {
        column-count: 3;
    }
}

@media (max-width: 1024px) {
    .masonry-grid {
        column-count: 2;
    }
    
    .photo-modal-inner {
        flex-direction: column;
        height: 100%; 
    }

    .photo-image-section {
        height: 55%;
        flex: none; 
    }

    .photo-details-section {
        height: 45%; 
        width: 100%;
        overflow-y: auto; 
        padding: 1.5rem;
        -webkit-overflow-scrolling: touch;
    }
}

@media (max-width: 768px) {
    .lifelog-hero-title {
        font-size: 1.75rem;
    }

    .lifelog-hero-description p {
        font-size: 1.125rem;
    }

    .masonry-grid {
        column-count: 3;
        column-gap: 1rem;
    }
    
    .photo-card {
        margin-bottom: 1rem;
    }

    .photo-close {
        top: 1rem;
        right: 1rem;
        width: 36px;
        height: 36px;
    }

    .photo-details-section {
        padding: 1.5rem 1.25rem;
    }

    .photo-title {
        font-size: 1.5rem;
    }
}

@media (max-width: 480px) {
    .lifelog-hero-title {
        font-size: 1.5rem;
    }

    .lifelog-hero-description p {
        font-size: 1rem;
    }

    .masonry-grid {
        column-count: 2;
        column-gap: 0.75rem;
    }

    .photo-card {
        margin-bottom: 0.75rem;
    }

    .photo-card-title {
        font-size: 0.875rem; 
    }

    .photo-card-date {
        font-size: 0.625rem; 
    }
    
    .photo-card-overlay {
        padding: 1rem 0.75rem 0.75rem;
    }

    .collections-bar {
        gap: 0.5rem;
    }

    .collection-chip {
        font-size: 0.8125rem;
        padding: 0.5rem 1rem;
    }

    .photo-modal {
        width: 98%;
        height: 95vh;
        margin: 2.5vh auto;
    }
}