/* Navigation Override for Gallery Page */
.navbar {
    position: fixed !important;
    top: 0 !important;
    width: 100% !important;
    z-index: 10000 !important;
    background: rgba(255, 255, 255, 0.95) !important;
    backdrop-filter: blur(10px) !important;
    border-bottom: 1px solid rgba(0, 0, 0, 0.1) !important;
    margin: 0 !important;
    padding: 0 !important;
}

.nav-container {
    max-width: 1200px !important;
    margin: 0 auto !important;
    padding: 0 20px !important;
    min-height: 70px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
}

/* Adjust body top spacing for fixed navbar */
body {
    padding-top: 70px !important;
    overflow-x: hidden !important;
}

/* Override dynamic body styles */
body[style*="overflow"] {
    padding-top: 70px !important;
}

/* Adjust header position */
#header {
    margin-top: 0 !important;
    padding-top: 0 !important;
}

/* Loading screen adjustments */
.loading-screen {
    z-index: 9999 !important;
}

/* Ensure navbar stays on top during and after loading */
.navbar {
    position: fixed !important;
    top: 0 !important;
    width: 100% !important;
    z-index: 10000 !important;
    background: rgba(255, 255, 255, 0.95) !important;
    backdrop-filter: blur(10px) !important;
    border-bottom: 1px solid rgba(0, 0, 0, 0.1) !important;
    margin: 0 !important;
    padding: 0 !important;
}

/* Force body styling after JS modifications */
body.loaded {
    padding-top: 70px !important;
    overflow-x: hidden !important;
}

.home-icon .home-text {
    font-size: 1.5rem;
    color: #fff;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 20px;
    background: linear-gradient(45deg, #667eea, #764ba2);
    border-radius: 25px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
}

.home-icon:hover .home-text {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4);
    background: linear-gradient(45deg, #764ba2, #667eea);
}

.home-icon .home-text::before {
    content: "";
    font-size: 1.8rem;
}

/* Modal Styles */
.hobby-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 10001;
    align-items: center;
    justify-content: center;
}

.modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(10px);
}

.modal-content {
    position: relative;
    background: white;
    border-radius: 20px;
    max-width: 90vw;
    max-height: 90vh;
    width: 800px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    overflow: hidden;
    animation: modalSlideIn 0.3s ease-out;
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: scale(0.9) translateY(20px);
    }
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

.modal-close {
    position: absolute;
    top: 20px;
    right: 25px;
    background: none;
    border: none;
    font-size: 30px;
    cursor: pointer;
    color: #666;
    z-index: 10;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.3s ease;
}

.modal-close:hover {
    background: rgba(0, 0, 0, 0.1);
    color: #333;
    transform: rotate(90deg);
}

.modal-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 30px;
    text-align: center;
}

.modal-header h2 {
    margin: 0;
    font-size: 2rem;
    font-weight: 700;
}

.modal-subtitle {
    display: block;
    margin-top: 8px;
    font-size: 1rem;
    opacity: 0.9;
    font-weight: 300;
}

.modal-body {
    padding: 30px;
    max-height: calc(90vh - 200px);
    overflow-y: auto;
}

.photo-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.photo-item {
    position: relative;
    overflow: hidden;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    cursor: pointer;
}

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

.gallery-photo {
    width: 100%;
    height: 200px;
    object-fit: cover;
    transition: transform 0.3s ease;
}

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

/* Lightbox Styles */
.lightbox-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10002;
    animation: fadeIn 0.3s ease;
}

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

.lightbox-content {
    position: relative;
    max-width: 90vw;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.lightbox-close {
    position: absolute;
    top: -50px;
    right: 0;
    background: none;
    border: none;
    color: white;
    font-size: 40px;
    cursor: pointer;
    z-index: 10;
    padding: 10px;
    transition: all 0.3s ease;
}

.lightbox-close:hover {
    color: #ccc;
    transform: rotate(90deg);
}

.lightbox-image {
    max-width: 100%;
    max-height: calc(90vh - 80px);
    object-fit: contain;
    border-radius: 8px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

.lightbox-caption {
    color: white;
    text-align: center;
    margin-top: 20px;
    font-size: 1.1rem;
    font-weight: 300;
}

.gallery-info {
    border-top: 1px solid #eee;
    padding-top: 20px;
}

.gallery-stats {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.9rem;
    color: #666;
}

.photo-count-display {
    font-weight: 600;
    color: #333;
}

.gallery-date {
    font-style: italic;
}

/* Portfolio Grid Styles */
.portfolio-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
    list-style: none;
    padding: 0;
    margin: 50px 0;
    max-width: 1400px;
    margin-left: auto;
    margin-right: auto;
}

.portfolio-item {
    position: relative;
    background: white;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    cursor: pointer;
    height: 350px;
}

.portfolio-item:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.2);
}

.item-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
}

.bg-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.portfolio-item:hover .bg-image {
    transform: scale(1.1);
}

.item-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.8) 0%, rgba(118, 75, 162, 0.8) 100%);
    opacity: 0;
    transition: opacity 0.3s ease;
}

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

.item-glow {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at center, rgba(255, 255, 255, 0.2) 0%, transparent 70%);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.portfolio-item:hover .item-glow {
    opacity: 1;
}

.item-link {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    color: white;
    z-index: 2;
}

.item-icon {
    margin-bottom: 20px;
}

.item-icon img {
    width: 60px;
    height: 60px;
    filter: brightness(0) invert(1) drop-shadow(0 0 3px rgba(255,255,255,0.8));
    opacity: 0.9;
    display: block;
}

.portfolio-item:hover .item-icon img {
    opacity: 1;
    transform: scale(1.1);
    transition: all 0.3s ease;
    filter: brightness(0) invert(1) drop-shadow(0 0 5px rgba(255,255,255,1));
}

.item-content {
    text-align: center;
}

.desc {
    display: block;
    font-size: 0.9rem;
    font-weight: 300;
    letter-spacing: 2px;
    margin-bottom: 8px;
    opacity: 0.9;
}

.title {
    display: block;
    font-size: 1.8rem;
    font-weight: 700;
    margin-bottom: 15px;
}

.item-details {
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.3s ease;
}

.portfolio-item:hover .item-details {
    opacity: 1;
    transform: translateY(0);
}

.item-details p {
    margin: 0;
    font-size: 1rem;
    font-weight: 300;
    line-height: 1.4;
}

.item-number {
    position: absolute;
    top: 20px;
    right: 20px;
    font-size: 3rem;
    font-weight: 900;
    color: rgba(255, 255, 255, 0.1);
    z-index: 1;
    transition: all 0.3s ease;
}

.portfolio-item:hover .item-number {
    color: rgba(255, 255, 255, 0.3);
    transform: scale(1.1);
}

.section-title {
    text-align: center;
    margin-bottom: 60px;
}

.section-title h2 {
    font-size: 3rem;
    font-weight: 900;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 20px;
}

.section-title p {
    font-size: 1.2rem;
    color: #666;
    font-weight: 300;
}

/* Header Logo Styling */
#header .logo {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
    margin: 0;
    padding: 40px 0;
}

.logo-img {
    width: 80px;
    height: 80px;
    object-fit: contain;
}

.logo-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.logo-text {
    font-size: 2.5rem;
    font-weight: 900;
    color: #333;
    margin-bottom: 5px;
}

.logo-subtitle {
    font-size: 1rem;
    font-weight: 300;
    color: #666;
    letter-spacing: 2px;
}

/* Footer Styling */
#footer .footer-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    gap: 20px;
    padding: 40px 20px;
}

#footer .footer-content p {
    margin: 0;
    color: #666;
    font-size: 1rem;
}

.footer-links {
    display: flex;
    justify-content: center;
    align-items: center;
}

/* Responsive Design */
@media (max-width: 768px) {
    #header .logo {
        flex-direction: column;
        gap: 15px;
        padding: 30px 0;
    }
    
    .logo-img {
        width: 60px;
        height: 60px;
    }
    
    .logo-text {
        font-size: 2rem;
    }
    
    .logo-subtitle {
        font-size: 0.9rem;
    }
    
    .portfolio-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
        margin: 30px 0;
        padding: 0 15px;
    }
    
    .portfolio-item {
        height: 280px;
    }
    
    .section-title h2 {
        font-size: 2rem;
    }
    
    .section-title p {
        font-size: 1rem;
        padding: 0 20px;
    }
    
    .title {
        font-size: 1.5rem;
    }
    
    .item-icon img {
        width: 50px;
        height: 50px;
    }
    
    .item-number {
        font-size: 2rem;
        top: 15px;
        right: 15px;
    }
    
    /* Modal responsive */
    .modal-content {
        max-width: 95vw;
        max-height: 95vh;
        margin: 10px;
    }
    
    .modal-header {
        padding: 20px 15px;
    }
    
    .modal-header h2 {
        font-size: 1.5rem;
    }
    
    .modal-body {
        padding: 20px 15px;
    }
    
    .photo-gallery {
        grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
        gap: 15px;
    }
    
    .gallery-stats {
        flex-direction: column;
        gap: 10px;
        text-align: center;
    }
}

@media (max-width: 1024px) {
    .portfolio-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 25px;
        padding: 0 20px;
    }
}

@media (max-width: 480px) {
    .portfolio-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .portfolio-item {
        height: 250px;
    }
    
    .section-title h2 {
        font-size: 1.8rem;
    }
    
    .title {
        font-size: 1.3rem;
    }
    
    .desc {
        font-size: 0.8rem;
    }
    
    .item-details p {
        font-size: 0.9rem;
    }
    
    .modal-header h2 {
        font-size: 1.3rem;
    }
    
    .modal-subtitle {
        font-size: 0.9rem;
    }
}