/* styles.css */
* {
    box-sizing: border-box;
}

body,
html {
    font-family: 'Roboto', sans-serif;
    margin: 0;
    background-image: url('trailtasticbg.png');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    color: #fff;
    height: 100dvh;
    display: flex;
    flex-direction: column;
}

header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px;
    background-color: transparent;
    flex-shrink: 0;
    z-index: 10;
}

.header-right {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-right: 100px;
}

main {
    flex: 1;
    min-height: 0;
    display: flex;
    flex-direction: column;
    /* Vertical stack */
    overflow-y: auto;
    /* Enable vertical scroll */
    padding: 20px;
    box-sizing: border-box;
    /* Removed global centering to prevent top crop */
}

.logo-container {
    width: 80%;
    display: flex;
    align-items: center;
}

.logo {
    height: 80px;
}

.word-logo {
    height: 40px;
    margin: 0;
}

.app-store-badge, .google-play-badge {
    height: 36px !important;
    width: auto !important;
    flex-shrink: 0;
}

.badges-container {
    display: flex;
    gap: 10px; /* Space between badges */
    justify-content: center;
    align-items: center;
    margin-top: 20px;
    flex-shrink: 0;
}

.gallery {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    grid-template-rows: 1fr;
    width: 100%;
    max-height: 100%;

    /* ADJUST THIS: To change the space BETWEEN images (e.g., 5px, 10px) */
    gap: 5px;

    /* ADJUST THIS: To change the total WIDTH of the gallery (e.g., 1200px, 1400px) */
    max-width: 500px;
    margin: auto;
    /* Center gallery vertically and horizontally safely */
}

.gallery-item {
    border-radius: 10px;
    overflow: hidden;
    background-color: #4d4b4b;
    min-height: 0;
}

.gallery-item img {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: contain;
}

footer {
    text-align: center;
    padding: 20px;
    background-color: transparent;
    color: #fff;
    flex-shrink: 0;
    z-index: 10;
}

/* --- Footer Link Styles --- */
footer p {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    /* Adds a small space around the separators */
    color: #aaa;
    /* Softens the color of the copyright text */
    font-size: 0.9em;
}

/* Style for the links in the footer, covering all states */
footer a,
footer a:link,
footer a:visited,
footer a:active {
    color: #fff !important;
    /* Make link text white for all states */
    text-decoration: none;
    /* Remove the default underline */
}

/* Add an underline ONLY when hovering over the links */
footer a:hover {
    text-decoration: underline;
}


/* --- Mobile layout --- */
@media (max-width: 767px) {

    /* Allow full page scrolling on mobile, essentially "unsticking" the footer */
    body,
    html {
        height: auto;
        overflow-y: auto;
    }

    main {
        padding: 0;
        height: auto;
        flex: none;
        overflow-y: visible;
    }

    header {
        flex-direction: column;
        align-items: center;
    }

    .app-store-link {
        margin-top: 0;
    }

    .word-logo {
        height: 30px;
    }

    .logo {
        height: 60px;
    }

    .gallery {
        display: flex;
        overflow-x: auto;
        scroll-snap-type: x mandatory;
        -webkit-overflow-scrolling: touch;
        max-width: none;
        gap: 0;
        /* Padding to allow scrolling to edge */
        padding-bottom: 20px;
    }

    .logo-container {
        justify-content: center;
        width: 100%;
        margin-bottom: 10px;
    }

    .header-right {
        margin-right: 0;
        justify-content: center;
        flex-direction: column;
        align-items: center;
        gap: 10px;
    }

    .gallery-item {
        flex: 0 0 100%;
        scroll-snap-align: center;
        background-color: transparent;
        padding: 0 20px;
        box-sizing: border-box;
    }

    /* Apply rounded corners directly to image on mobile since item has padding */
    .gallery-item img {
        border-radius: 10px;
        /* Ensure shadow or other effects if needed */
        width: 42%;
        /* Reduced by ~15% from 50% to help fit footer */
        margin: 0 auto;
    }

    .gallery::-webkit-scrollbar {
        height: 5px;
    }

    .gallery::-webkit-scrollbar-track {
        background: #333;
    }

    .gallery::-webkit-scrollbar-thumb {
        background-color: #555;
        border-radius: 5px;
    }

    /* Hides the separators on small mobile screens for a cleaner look */
    @media (max-width: 400px) {
        footer p {
            flex-direction: column;
            gap: 5px;
        }

        .footer-separator {
            display: none;
        }
    }
}

.app-store-container {
    position: relative;
    flex-shrink: 0;
}

.app-store-link.disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.beta-notification {
    opacity: 0;
    visibility: hidden;
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    background-color: #333;
    color: #fff;
    padding: 10px;
    border-radius: 5px;
    width: 200px;
    text-align: center;
    font-size: 0.7em;
    transition: opacity 0.2s, visibility 0.2s;
}

.app-store-container:hover .beta-notification {
    opacity: 1;
    visibility: visible;
}

/* --- Beta Message Card --- */
.beta-message-card {
    background: rgba(30, 30, 30, 0.7);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.15);
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.4);
    border-radius: 20px;
    padding: 40px;
    max-width: 500px;
    width: calc(100% - 40px);
    margin: 20px auto;
    text-align: center;
    color: #ffffff;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
    animation: fadeInScale 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

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

.beta-message-card h2 {
    font-size: 2.2em;
    margin: 0;
    font-weight: 700;
    background: linear-gradient(135deg, #ff8c00 0%, #ff3b30 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.beta-message-card p {
    font-size: 1.1em;
    line-height: 1.6;
    color: #e2e8f0;
    margin: 0;
}

.beta-cta-button {
    display: inline-block;
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    color: white !important;
    text-decoration: none !important;
    padding: 14px 32px;
    border-radius: 30px;
    font-weight: 600;
    font-size: 1.1em;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: none;
    cursor: pointer;
    margin-top: 10px;
}

.beta-cta-button:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(59, 130, 246, 0.5);
    text-decoration: none;
}