body {
    margin: 0;
    padding: 0;
    font-family: Arial, sans-serif;
    /* Removed the following lines to prevent layout issues with FullPage.js */
    /* display: flex;
    flex-direction: column;
    min-height: 100vh; */
}

#fullpage {
    /* Removed flex: 1; */
}

.section {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100vh;
    height: 100dvh; /* Add dynamic viewport height for mobile */
    background-size: cover;
    background-position: center;
    position: relative;
    overflow: hidden; /* Prevent overflow */
    height: calc(100vh - 80px); /* Subtract footer height when footer is visible */
}

.section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.1);
    opacity: 0;
    transition: opacity 0.3s;
}

.section.loading::before {
    opacity: 1;
}

.section.footer-visible {
    margin-bottom: 120px; /* Match footer height */
    height: calc(100vh - 120px); /* Match new footer height */
}

.section:not(.footer-visible) {
    height: 100vh; /* Full height when footer is not visible */
}

.section img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    user-select: none;
    -webkit-user-select: none;
    -webkit-touch-callout: none;
    pointer-events: none;
}

footer {
    display: flex; /* Always visible by default */
    position: fixed;
    bottom: 0;
    width: 100%;
    height: 120px; /* Increased height */
    background-color: rgba(0, 0, 0, 0.029);
    color: white;
    padding: 20px 0;
    z-index: 1000;
}

footer.active {
    display: flex;
}

footer a {
    text-decoration: none !important;
}

footer a:hover {
    text-decoration: none;
    opacity: 0.8;
    transition: opacity 0.2s ease;
}

.footer .column {
    flex: 1;
    padding: 20px;
}

.footer .branding {
    flex: 2;
}

.footer h4 {
    margin-bottom: 10px;
}

.footer p {
    margin: 0;
}

.fp-tooltip {
    color: #fff;
    background: rgba(0, 0, 0, 0.5);
    padding: 5px 10px;
    border-radius: 5px;
}

.brand-text {
    font-family: 'Cormorant', serif;
    font-size: 2rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.copyright-text {
    font-size: 0.9rem;
    opacity: 0.8;
}

.footer-tab {
    position: fixed;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 30px;
    background: rgba(0, 0, 0, 0.5);
    border-radius: 8px 8px 0 0;
    z-index: 101;
    cursor: pointer;
    opacity: 1;
    transition: opacity 0.3s ease; /* Remove transform transition */
    border-left: 1px solid rgba(169, 169, 169, 0.5); /* Add dark grey border with half opacity */
    border-right: 1px solid rgba(169, 169, 169, 0.5); /* Add dark grey border with half opacity */
    border-top: 1px solid rgba(169, 169, 169, 0.5); /* Add dark grey border with half opacity */
}

/* Remove hover effect */
/* .footer-tab:hover {
    transform: translate(-50%, -30px); /* Move up on hover using transform */
} */

.loading-message {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: white;
    font-family: 'Cormorant', serif;
    font-size: 1.5rem;
    text-align: center;
    z-index: 103; /* Ensure it is above other elements */
    display: none; /* Hidden by default */
}

@media (max-width: 768px) {
    footer {
        padding: 10px 0;
        background-color: rgba(51, 51, 51, 0.9);
    }

    .footer .column {
        padding: 10px;
    }

    .section {
        height: 100vh;
        margin: 0 !important;
        padding: 0 !important;
    }

    .section img {
        width: 100%;
        height: 100%;
        object-fit: cover; /* Change back to cover */
        margin: 0;
        padding: 0;
    }

    /* Remove any potential gaps */
    .fp-section, 
    .fp-slide, 
    .fp-tableCell {
        height: 100vh !important;
        margin: 0 !important;
        padding: 0 !important;
    }

    /* Ensure no white space between sections */
    #fullpage {
        margin: 0 !important;
        padding: 0 !important;
    }

    body {
        min-height: 100vh;
        min-height: -webkit-fill-available;
    }

    #fullpage {
        margin: 0;
        padding: 0;
    }

    .fp-section {
        padding: 0 !important;
        margin: 0 !important;
    }

    .fp-tableCell {
        padding: 0 !important;
        margin: 0 !important;
    }
}

/* Tablet Breakpoint */
@media screen and (min-width: 768px) and (max-width: 1024px) {
    .section img {
        object-fit: cover;
        width: 100%;
        height: 100%;
        max-height: 100vh;
    }

    footer {
        padding: 15px 0;
    }

    .brand-text {
        font-size: 1.75rem;
    }

    .copyright-text {
        font-size: 0.85rem;
    }
}

/* Mobile Breakpoint */
@media screen and (max-width: 767px) {
    /* Ensure responsive images in mobile view */
    .image-slide img {
        width: 100%;
        height: auto;
        object-fit: contain;
    }

    .section {
        height: 100vh;
        height: calc(var(--vh, 1vh) * 100);
        padding: 0;
        margin: 0;
        overflow: hidden;
        position: relative;
    }

    .section img {
        position: absolute;
        top: 50%;
        left: 50%;
        transform: translate(-50%, -50%);
        width: 100%;
        height: 100vh;
        height: calc(var(--vh, 1vh) * 100);
        object-fit: cover;
        margin: 0;
        padding: 0;
    }

    .fp-section,
    .fp-slide {
        height: 100vh !important;
        height: calc(var(--vh, 1vh) * 100) !important;
    }

    .fp-tableCell {
        height: 100vh !important;
        height: calc(var(--vh, 1vh) * 100) !important;
        padding: 0 !important;
    }

    footer {
        height: auto; /* Allow footer to expand based on content */
        min-height: 160px; /* Minimum height to ensure content fits */
        padding: 15px 0;
    }

    .section.footer-visible {
        height: calc(100vh - 160px); /* Match new minimum footer height */
        margin-bottom: 160px;
    }

    .row {
        margin: 0; /* Remove row margins in mobile */
    }

    .footer .column {
        padding: 8px 15px; /* Increase horizontal padding */
    }

    .brand-text {
        font-size: 1.4rem;
        margin-bottom: 0.3rem;
    }

    .copyright-text {
        font-size: 0.75rem;
        line-height: 1.2;
    }

    /* Ensure proper spacing in mobile footer */
    .footer .column {
        padding: 8px;
    }
}

/* Handle landscape orientation on mobile */
@media screen and (max-width: 767px) and (orientation: landscape) {
    .section img {
        width: auto;
        height: 100%;
        max-width: none;
    }
}

/* Large screens */
@media screen and (min-width: 1025px) {
    .section img {
        object-fit: cover;
        max-height: 100vh;
        width: 100%;
    }
}