/* Reset and Base Styles */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html, body {
    height: 100%;
    overflow: hidden;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Helvetica Neue', Arial, sans-serif;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

/* Background Image - Default (Desktop) */
.background-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    background-image: url('assets/1920px/bg.jpg');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    background-attachment: fixed;
}

/* Add overlay for better text readability */
.background-container::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
}

/* Main Container */
.main-container {
    position: relative;
    width: 100%;
    height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 20px;
}

/* Site Name - RENAS Logo */
.site-name {
    display: inline-block;
    animation: fadeIn 1.5s ease-out;
    /* Default size for 1920px (Desktop) */
    width: 480px;
    height: 119px;
}

/* Navigation Links Container */
.nav-links {
    position: fixed;
    bottom: 20px;
    left: 20px;
    right: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 100;
    width: calc(100% - 40px);
}

/* Link Styles */
.nav-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    cursor: pointer;
}

.nav-link:hover {
    opacity: 1;
}

.nav-link:focus {
    outline: none;
}

.nav-link picture {
    display: inline-block;
}

.nav-link img {
    display: block;
    height: auto;
}

/* Info link sizing */
.info-link-img {
    width: 66px;
    height: 29px;
}

/* Enquiries link sizing */
.enquiries-link-img {
    width: 155px;
    height: 29px;
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Mobile Portrait - 360px */
@media screen and (max-width: 479px) {
    .background-container {
        background-image: url('assets/360px/bg.jpg');
    }

    /* Nudge logo higher to avoid bg image interference */
    .main-container {
        justify-content: flex-start;
        padding-top: 40vh;
    }

    /* Logo size for 360px */
    .site-name {
        width: 222px;
        height: 55px;
    }

    /* Info link size for 360px */
    .info-link-img {
        width: 31px;
        height: 14px;
    }

    /* Enquiries link size for 360px */
    .enquiries-link-img {
        width: 73px;
        height: 13px;
    }
}

/* Mobile Landscape - 640px */
@media screen and (min-width: 480px) and (max-width: 767px) {
    .background-container {
        background-image: url('assets/640px/bg.jpg');
    }

    /* Ensure logo is centered */
    .main-container {
        justify-content: center;
        padding-top: 20px;
    }

    /* Logo size for 640px */
    .site-name {
        width: 182px;
        height: 45px;
    }

    /* Info link size for 640px */
    .info-link-img {
        width: 31px;
        height: 14px;
    }

    /* Enquiries link size for 640px */
    .enquiries-link-img {
        width: 73px;
        height: 13px;
    }
}

/* Tablet Portrait - 820px */
@media screen and (min-width: 768px) and (max-width: 1023px) {
    .background-container {
        background-image: url('assets/820px/bg.jpg');
    }

    /* Nudge logo higher to avoid bg image interference */
    .main-container {
        justify-content: flex-start;
        padding-top: 30vh;
    }

    /* Logo size for 820px */
    .site-name {
        width: 334px;
        height: 81px;
    }

    /* Info link size for 820px */
    .info-link-img {
        width: 53px;
        height: 23px;
    }

    /* Enquiries link size for 820px */
    .enquiries-link-img {
        width: 124px;
        height: 23px;
    }
}

/* Tablet Landscape - 1180px */
@media screen and (min-width: 1024px) and (max-width: 1439px) {
    .background-container {
        background-image: url('assets/1180px/bg.jpg');
    }

    /* Ensure logo is centered */
    .main-container {
        justify-content: center;
        padding-top: 20px;
    }

    /* Logo size for 1180px */
    .site-name {
        width: 334px;
        height: 81px;
    }

    /* Info link size for 1180px */
    .info-link-img {
        width: 53px;
        height: 23px;
    }

    /* Enquiries link size for 1180px */
    .enquiries-link-img {
        width: 124px;
        height: 23px;
    }
}

/* Desktop -  and above */
@media screen and (min-width: 1440px) {
    .nav-links {
        left: 70px;
        right: 70px;
        width: calc(100% - 140px);
    }
}

/* Ultra-wide screens */
@media screen and (min-width: 2560px) {
    .background-container {
        background-image: url('assets/2560px/bg.jpg');
    }

    .nav-links {
        left: 70px;
        right: 70px;
        width: calc(100% - 140px);
    }
}

/* Accessibility - Reduced Motion */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* High Contrast Mode Support */
@media (prefers-contrast: high) {
    .nav-link {
        opacity: 1;
    }
}

/* Print Styles */
@media print {
    .background-container {
        display: none;
    }

    .nav-links {
        position: static;
        margin-top: 2rem;
    }
}