/* General Body and Font Styles */
body {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Inter', sans-serif;
    background-color: #000;
    color: #fff;
    overflow: hidden; /* Prevents scrollbars on the body itself */
    height: 100vh;
}

.font-dancing {
    font-family: 'Dancing Script', cursive;
}

/* Main App Container */
#app {
    display: flex;
    height: 100vh;
    width: 100vw;
    transition: all 0.5s ease;
}

/* Tab Container Styles */
.tab-container {
    position: relative;
    height: 100%;
    cursor: pointer;
    background-size: cover;
    background-position: center;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    transition: width 0.7s ease-in-out, height 0.7s ease-in-out;
    flex-shrink: 0; /* Prevent shrinking */
}

/* Dark overlay for better text readability */
.tab-container::before {
    content: '';
    position: absolute;
    inset: 0;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 1;
    transition: background-color 0.3s ease;
}

/* Content inside tabs is positioned relatively */
.tab-container > * {
    position: relative;
    z-index: 2;
}

/* --- Desktop Layout (default) --- */
.tab-container {
    width: 8.3333%;
}

.tab-container.active {
    width: 75%;
    cursor: default;
}

#app:not(.mobile-view) .tab-container:not(.active):hover {
    width: 10%;
}
#app:not(.mobile-view) .tab-container:not(.active):hover::before {
    background-color: rgba(0, 0, 0, 0.3);
}


/* Collapsed Title (Vertical) */
.collapsed-title {
    position: absolute;
    transform: rotate(-90deg);
    color: white;
    font-size: 2.5rem;
    font-weight: bold;
    white-space: nowrap;
    transition: opacity 0.5s ease;
}
.tab-container.active .collapsed-title {
    opacity: 0;
    pointer-events: none;
}
.collapsed-title.font-dancing {
    font-size: 4rem;
}

/* Expanded Content (Fades in) */
.expanded-content {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    box-sizing: border-box;
    opacity: 0;
    transition: opacity 0.5s ease 0.3s;
    overflow-y: auto;
    pointer-events: none;
}
.tab-container.active .expanded-content {
    opacity: 1;
    pointer-events: auto;
}

/* Copyright notice and Social Links */
.copyright {
    position: absolute;
    bottom: 1rem;
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.7);
    text-align: center;
    width: 100%;
}
.copyright .social-links {
    margin-bottom: 0.5rem;
}
.copyright .social-links a {
    color: rgba(255, 255, 255, 0.7);
    font-size: 1.5rem;
    margin: 0 0.5rem;
    transition: color 0.3s ease;
}
.copyright .social-links a:hover {
    color: #fff;
}
.copyright p {
    margin: 0.2rem 0;
}
.copyright p a {
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
}
.copyright p a:hover {
    text-decoration: underline;
}


/* --- Specific Content Styles --- */

/* Main Title Container */
.main-title-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
}

.main-title-expanded {
    font-size: 6rem;
    line-height: 1;
}

.main-subtitle {
    font-size: 1.2rem;
    margin-top: 0.5rem;
}

/* Gallery Styles */
.gallery-content {
    width: 90%;
    max-width: 1200px;
}
.gallery-content h1 {
    font-size: 2.5rem;
    font-weight: bold;
    text-align: center;
    margin-bottom: 1.5rem;
}
.gallery-categories {
    text-align: center;
    margin-bottom: 2rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
    padding-bottom: 1rem;
}
.category-button {
    background: none;
    border: none;
    color: #ccc;
    font-size: 1.2rem;
    margin: 0 1rem;
    cursor: pointer;
    transition: color 0.3s ease;
    padding: 0.5rem 0;
    position: relative;
}
.category-button::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 2px;
    background-color: #fff;
    transform: scaleX(0);
    transition: transform 0.3s ease;
}
.category-button.active, .category-button:hover {
    color: #fff;
}
.category-button.active::after {
    transform: scaleX(1);
}
.image-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 1rem;
}
.grid-item {
    position: relative;
    aspect-ratio: 16 / 10;
    overflow: hidden;
    border-radius: 8px;
    cursor: pointer;
    transition: transform 0.3s ease;
}
.grid-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}
.grid-item:hover {
    transform: scale(1.05);
}
.grid-item:hover img {
    transform: scale(1.1);
}

.grid-item-info {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(to top, rgba(0,0,0,0.8), transparent);
    color: #fff;
    padding: 1.5rem 0.75rem 0.75rem;
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.3s ease, transform 0.3s ease;
    pointer-events: none;
}
.grid-item:hover .grid-item-info {
    opacity: 1;
    transform: translateY(0);
}
.grid-item-info .name {
    font-weight: bold;
    font-size: 0.9rem;
    margin: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.grid-item-info .date {
    font-size: 0.75rem;
    color: #ccc;
    margin: 0;
}


/* About & Contact Styles */
.text-content {
    max-width: 800px;
    width: 90%; /* Ensure it doesn't touch edges on mobile */
    text-align: center;
}
.text-content h1 {
    font-size: 2.5rem;
    font-weight: bold;
    margin-bottom: 1.5rem;
}
.text-content p {
    font-size: 1.1rem;
    line-height: 1.6;
    margin-bottom: 1rem;
}
.contact-form {
    width: 100%;
    max-width: 500px;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin: 0 auto; /* Center the form */
}
.contact-form input, .contact-form textarea {
    width: 100%;
    padding: 0.8rem;
    border-radius: 8px;
    border: none;
    background-color: rgba(255, 255, 255, 0.2);
    color: white;
    font-size: 1rem;
    outline: none;
    transition: background-color 0.3s ease;
    box-sizing: border-box; /* THIS IS THE FIX */
}
.contact-form input::placeholder, .contact-form textarea::placeholder {
    color: rgba(255, 255, 255, 0.7);
}
.contact-form input:focus, .contact-form textarea:focus {
    background-color: rgba(255, 255, 255, 0.3);
}
.contact-form button {
    padding: 1rem;
    border-radius: 8px;
    border: none;
    background-color: #fff;
    color: #000;
    font-size: 1rem;
    font-weight: bold;
    cursor: pointer;
    transition: background-color 0.3s ease;
}
.contact-form button:hover {
    background-color: #ddd;
}
#form-status {
    margin-top: 1rem;
    text-align: center;
}

/* --- Fullscreen Image Overlay --- */
#fullscreen-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.92);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.35s ease, visibility 0s linear 0.35s;
}
#fullscreen-overlay.active {
    opacity: 1;
    visibility: visible;
    transition-delay: 0s;
}
#fullscreen-close {
    position: fixed;
    top: 25px;
    right: 35px;
    background: none;
    border: none;
    color: rgba(255, 255, 255, 0.8);
    font-size: 2.5em;
    cursor: pointer;
    z-index: 1002;
    transition: color 0.3s ease, transform 0.2s ease;
}
#fullscreen-close:hover {
    color: #fff;
    transform: scale(1.15);
}
#fullscreen-image {
    max-width: 95vw;
    max-height: 95vh;
    object-fit: contain;
    border-radius: 5px;
    transition: opacity 0.3s ease;
    opacity: 1;
}
#fullscreen-image.loading {
    opacity: 0;
}
.fullscreen-controls {
    position: fixed;
    width: 100%;
    top: 50%;
    transform: translateY(-50%);
    display: flex;
    justify-content: space-between;
    padding: 0 20px;
    box-sizing: border-box;
    z-index: 1001;
}
.fullscreen-controls button {
    background: rgba(0, 0, 0, 0.5);
    border: 1px solid rgba(255,255,255,0.2);
    color: rgba(255, 255, 255, 0.85);
    font-size: 2.8em;
    cursor: pointer;
    padding: 10px 15px;
    border-radius: 8px;
    transition: all 0.3s ease;
}
.fullscreen-controls button:hover {
    background-color: rgba(0, 0, 0, 0.7);
    color: #fff;
}
.loader {
    display: none;
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    width: 60px;
    height: 60px;
    border: 6px solid rgba(255, 255, 255, 0.2);
    border-top-color: #fff;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    z-index: 1001;
}
@keyframes spin {
    to { transform: translate(-50%, -50%) rotate(360deg); }
}

/* --- Mobile Layout --- */
@media (max-width: 768px) {
    #app {
        flex-direction: column;
    }
    #app.mobile-view {
        flex-direction: column;
    }
    .tab-container {
        width: 100% !important;
        height: 10%;
    }
    .tab-container.active {
        height: 70%;
    }
    .collapsed-title {
        transform: none;
        font-size: 1.5rem;
    }
    .collapsed-title.font-dancing {
        font-size: 2rem;
    }
    .main-title-expanded {
        font-size: 3rem;
    }
    .expanded-content {
        padding: 1rem;
    }
    .gallery-content h1, .text-content h1 {
        font-size: 1.8rem;
    }
    .category-button {
        font-size: 1rem;
        margin: 0 0.5rem;
    }
    .image-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.5rem;
    }
}
