@import url('https://fonts.googleapis.com/css2?family=Dancing+Script:wght@700&display=swap');

html {
    scroll-snap-type: y mandatory;
    scroll-behavior: smooth;
}

section {
    scroll-snap-align: start;
    min-height: 100vh;
}

footer {
    scroll-snap-align: start;
}

#loading-screen {
    position: relative;
    width: 100vw;
    height: 100vh;
    overflow: hidden;
}

#loading-video {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: contain;
}

#volume-button {
    position: absolute;
    top: 20px;
    right: 20px;
    z-index: 30;
    background-color: rgba(0, 0, 0, 0.5);
    padding: 10px;
    border-radius: 50%;
    cursor: pointer;
}

#skip-button {
    position: absolute;
    bottom: 20px;
    right: 20px;
    z-index: 30;
    background-color: rgba(0, 0, 0, 0.5);
    color: white;
    padding: 10px 20px;
    border-radius: 20px;
    cursor: pointer;
    border: 1px solid white;
    font-family: sans-serif;
    font-size: 14px;
}


.gallery-item {
    position: relative;
    width: calc((100% / 3) - 1rem);
    aspect-ratio: 16 / 9;
    flex-shrink: 0;
    background-color: #e2e8f0;
    /* Light background for gallery items */
    border-radius: 0.5rem;
    overflow: hidden;
    cursor: pointer;
}

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

.gallery-item:hover img {
    transform: scale(1.1);
}

.hero-overlay {
    background: linear-gradient(to top, rgba(0, 0, 0, 0.7), rgba(0, 0, 0, 0.3));
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 2;
}

.hero-video-bg {
    position: absolute;
    top: 50%;
    left: 50%;
    min-width: 100%;
    min-height: 100%;
    width: auto;
    height: auto;
    z-index: 1;
    transform: translateX(-50%) translateY(-50%);
    object-fit: cover;
    pointer-events: none;
}

.portfolio-item {
    position: relative;
    cursor: pointer;
}

/* Updated Portfolio Styles for Uniformity */
.portfolio-scroller {
    display: flex;
    overflow-x: auto;
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    gap: 1.5rem;
    padding: 0 3rem;
    /* Increased padding for margins and arrow space */
}

.portfolio-scroller::-webkit-scrollbar {
    display: none;
}

.portfolio-item {
    position: relative;
    width: calc((100% / 3) - 1rem);
    aspect-ratio: 16 / 9;
    flex-shrink: 0;
    background-color: #2d3748;
    border-radius: 0.5rem;
    overflow: hidden;
    cursor: pointer;
}

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

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

.thumbnail-text {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 1rem;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.8), transparent);
    color: white;
    text-align: center;
    font-weight: bold;
    opacity: 0;
    transition: opacity 0.3s ease-in-out;
    pointer-events: none;
}

.portfolio-item:hover .thumbnail-text {
    opacity: 1;
}

.scroll-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background-color: rgba(0, 0, 0, 0.5);
    color: white;
    border: none;
    font-size: 2rem;
    padding: 1rem;
    cursor: pointer;
    z-index: 10;
    transition: background-color 0.3s ease;
}

.scroll-btn:hover {
    background-color: rgba(0, 0, 0, 0.8);
}

.scroll-btn.left-0 {
    left: 0;
}

.scroll-btn.right-0 {
    right: 0;
}

#portfolio-rows-wrapper {
    margin: 0 3rem;
    /* Adjust this value to control the margin */
}

.scroll-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background-color: rgba(0, 0, 0, 0.5);
    color: white;
    border: none;
    font-size: 2rem;
    padding: 1rem;
    cursor: pointer;
    z-index: 10;
    transition: background-color 0.3s ease;
}

.scroll-btn:hover {
    background-color: rgba(0, 0, 0, 0.8);
}

.scroll-btn.left-0 {
    left: -0.5rem;
}

.scroll-btn.right-0 {
    right: -0.5rem;
}

.jump-to-home-btn {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    background-color: rgba(255, 255, 255, 0.8);
    color: black;
    width: 3rem;
    height: 3rem;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    text-decoration: none;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease-in-out, transform 0.3s ease-in-out;
    z-index: 50;
}

.jump-to-home-btn.show {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0);
}

.jump-to-home-btn:hover {
    background-color: white;
}

.portfolio-scroller {
    overflow-x: auto;
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
    /* for smooth scrolling on iOS */
    scrollbar-width: none;
    /* for Firefox */
}

.portfolio-scroller::-webkit-scrollbar {
    display: none;
    /* for Chrome, Safari, and Opera */
}

.portfolio-grid-tworow {
    display: grid;
    grid-auto-flow: column;
    grid-template-rows: repeat(2, 1fr);
    gap: 1rem;
}

.scroll-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background-color: rgba(0, 0, 0, 0.5);
    color: white;
    border: none;
    font-size: 2rem;
    padding: 1rem;
    cursor: pointer;
    z-index: 10;
    transition: background-color 0.3s ease;
}

.scroll-btn:hover {
    background-color: rgba(0, 0, 0, 0.8);
}

.scroll-btn.left-0 {
    left: -1.5rem;
}

.scroll-btn.right-0 {
    right: -1.5rem;
}

.image-preview-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 100;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.image-preview-container.show {
    opacity: 1;
    pointer-events: auto;
}

.image-preview-container img {
    max-width: 90%;
    max-height: 90%;
    object-fit: contain;
}

.preview-nav-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background-color: rgba(0, 0, 0, 0.5);
    color: white;
    border: none;
    font-size: 2rem;
    padding: 1rem;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.preview-nav-btn:hover {
    background-color: rgba(0, 0, 0, 0.8);
}

.preview-nav-btn.prev {
    left: 1rem;
}

.preview-nav-btn.next {
    right: 1rem;
}

.preview-close-btn {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background-color: rgba(0, 0, 0, 0.5);
    color: white;
    border: none;
    font-size: 2rem;
    padding: 0.5rem 1rem;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.portfolio-filter-btn {
    transition: all 0.3s ease;
}

.portfolio-filter-btn.active {
    background-color: white;
    color: black;
}

/* Video Modal Styling */
#videoModal {
    transition: opacity 0.3s ease-in-out;
}

#videoModal.hidden {
    opacity: 0;
    pointer-events: none;
}

#closeModal {
    cursor: pointer;
    z-index: 60;
    /* Ensure it's above other modal content */
}

.modal-content-wrapper {
    max-height: 90vh;
    /* Limit modal height to 90% of viewport height */
    overflow-y: hidden;
    /* Hide overflow for the wrapper itself */
}

/* Image Grid Styling within Modal */
#image-grid-container {
    max-height: calc(90vh - 60px);
    /* Adjust based on header/footer in modal */
    overflow-y: auto;
    /* Enable vertical scrolling for the grid */
}

#image-grid-container img {
    width: 100%;
    height: auto;
    object-fit: cover;
    transition: transform 0.3s ease-in-out;
}

#image-grid-container img:hover {
    transform: scale(1.05);
}

/* Chatbot specific styles */
#chatbot-container {
    /* Tailwind classes handle most of this now */
}

.fade-out {
    animation: fadeOut 1s forwards;
}

.fade-in {
    animation: fadeIn 1s forwards;
}

@keyframes fadeOut {
    from {
        opacity: 1;
    }

    to {
        opacity: 0;
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

#chatbot-button {
    /* Tailwind classes handle most of this now */
}

#chat-window {
    background-color: #1a202c;
    /* Dark background for chat window */
    font-family: Arial, sans-serif;
}

#chat-messages {
    /* Tailwind classes handle most of this now */
}

#chat-input {
    /* Tailwind classes handle most of this now */
}

#send-button {
    /* Tailwind classes handle most of this now */
}

/* Animations for chat window */
.chat-window-enter-active,
.chat-window-leave-active {
    transition: all 0.3s ease-in-out;
}

.chat-window-enter,
.chat-window-leave-to

/* .chat-window-leave-active in <2.1.8 */
    {
    opacity: 0;
    transform: scale(0.95) translateY(10px);
}

/* Responsive Design */
@media (max-width: 768px) {
    .portfolio-item {
        width: calc((100% / 2) - 1rem);
    }

    .gallery-item {
        width: calc((100% / 2) - 1rem);
    }

    #chat-input {
        height: 48px;
        /* Make chat input taller on mobile */
        margin-bottom: 10px;
        /* Add some space below the input */
    }
}

@media (max-width: 480px) {
    .portfolio-item {
        width: 100%;
    }

    .gallery-item {
        width: 100%;
    }

    .portfolio-scroller {
        padding: 0 1rem;
    }

    #portfolio-rows-wrapper {
        margin: 0 1rem;
    }

    .scroll-btn {
        font-size: 1.5rem;
        padding: 0.5rem;
    }

    .scroll-btn.left-0 {
        left: -0.5rem;
    }

    .scroll-btn.right-0 {
        right: -0.5rem;
    }
}

/* Enlarged Chat Window */
#chat-window.enlarged {
    width: 90vw;
    /* Take up more width */
    height: 90vh;
    /* Take up more height */
    max-width: 800px;
    /* Max width for larger screens */
    max-height: 900px;
    /* Max height for larger screens */
    bottom: 5vh;
    right: 5vw;
    transform: none;
    /* Remove scale transformation */
    opacity: 1;
    /* Ensure full opacity */
}

@media (max-width: 640px) {
    #chat-window {
        font-family: sans-serif;
        width: 90vw;
        height: 70vh;
        bottom: 80px;
        right: 5vw;
    }
}