body {
    margin: 0;
    padding: 0;
    font-family: 'Morebi Rounded Black', Arial, sans-serif;
    background-color: #212317;
    color: #d2cfb2;
    height: 100svh;
    overflow: hidden;
}

.centered {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 100svh;
    padding: 1rem;
    text-align: center;
}

button {
    padding: 1rem 2rem;
    margin: 1rem;
    font-size: 1.2rem;
    background-color: #007bff;
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
}

button:hover {
    /*background-color: #ff9100;*/
}

.content-page {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    background: #212317; /* Dark grey background for the area below the image */
    color: #f3f2e7; /* Light text color */
    padding: 0;
    box-sizing: border-box;
    position: relative;
}


.content-image-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 150px; /* Adjust height as needed to cover the header area */
    background: linear-gradient(to bottom, rgba(0, 0, 0, 0.7) 0%, rgba(0, 0, 0, 0) 100%);
    z-index: 2; /* Ensure gradient is above the image but below the header */
    pointer-events: none; /* Allow clicks to pass through the gradient */
}


.content-image-container {
    position: relative;
    width: 100%;
    max-height: 40svh;
    overflow: hidden;
    display: flex;
    justify-content: center;
    align-items: center;
}

.content-image {
    width: 100%;
    max-height: 30svh; /* Adjust image height for smaller screens */
    object-fit: cover;
}

.mma-guide-audio-player {
    width: 90%;
    background-color: #ff7a00;
    border-radius: 20px;
    padding: 0.8rem 1.5rem;
    margin: -1.5rem auto 0 auto;
    display: flex;
    align-items: center;
    box-sizing: border-box;
    position: relative;
    z-index: 5;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
    justify-content: space-between;
}

/* Hide the native audio player controls */
audio.audio-player {
    display: none;
}

.play-pause-button {
    background-color: white; /* White circular background */
    border: none;
    border-radius: 50%; /* Make it circular */
    width: 40px; /* Size of the button */
    height: 40px;
    color: #212317; /* Dark green icon color */
    cursor: pointer;
    padding: 0; /* Remove default padding */
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
    flex-shrink: 0; /* Prevent button from shrinking */
}

.progress-container {
    flex-grow: 1; /* Allows progress bar to take up available space */
    height: 8px; /* Height of the progress bar */
    background-color: rgba(255, 255, 255, 0.3); /* Semi-transparent white background */
    border-radius: 4px;
    margin: 0 1rem; /* Space around the progress bar */
    position: relative;
}

.progress-bar-filled {
    height: 100%;
    background-color: white; /* Solid white fill */
    border-radius: 4px;
    width: 0%; /* Initial state */
}

.progress-bar-scrubber {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    -webkit-appearance: none; /* Hide default scrubber */
    appearance: none;
    background: transparent;
    cursor: pointer;
    z-index: 2; /* Ensure scrubber is above the filled bar */
}

/* Style for the scrubber thumb */
.progress-bar-scrubber::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 16px; /* Size of the thumb */
    height: 16px;
    background: white; /* White thumb */
    border-radius: 50%;
    cursor: pointer;
    margin-top: -4px; /* Center the thumb vertically */
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.progress-bar-scrubber::-moz-range-thumb {
    width: 16px;
    height: 16px;
    background: white;
    border-radius: 50%;
    cursor: pointer;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.time-display {
    color: white; /* White text color */
    font-size: 0.9rem; /* Font size for time */
    font-variant-numeric: tabular-nums; /* Align numbers */
    flex-shrink: 0; /* Prevent time display from shrinking */
}

.content-text {
    flex-grow: 1;
    overflow-y: auto;
    padding: 40px 20px 120px 20px; /* Increased bottom padding to avoid overlay */
    position: relative;
    z-index: 1;
    margin-bottom: 0; /* Remove margin as we're using padding */
    height: 40svh;
}

.content-text.info {
    overflow-y: unset;
    padding: 70px 10px 50px 10px;
    height: auto !important;
}

.content-text::-webkit-scrollbar {
    width: 8px;
}

.content-text::-webkit-scrollbar-track {
    background: #2d3123; /* Darker track */
    border-radius: 4px;
}

.content-text::-webkit-scrollbar-thumb {
    background: #ff7a00; /* Orange thumb */
    border-radius: 4px;
}

.content-title {
    font-size: 1.8rem; /* Title font size */
    font-weight: 800; /* Bold title */
    margin-top: 0;
    margin-bottom: 1rem;
    color: #f3f2e7; /* Light color for title */
    font-family: 'Morebi Rounded Black', Arial, sans-serif; /* Use custom font */
}

.content-description {
    font-size: 1.1rem; /* Description font size */
    line-height: 1.6; /* Improved readability */
    color: #b6b49a; /* Slightly muted color for description */
    margin-bottom: 0;
}

.scan-button-container {
    position: fixed;
    bottom: 0 !important;
    left: 0;
    width: 100%;
    height: 70px;
    background: linear-gradient(to top, rgba(33, 35, 23, 1) 60%, rgba(33, 35, 23, 0));
    z-index: 10;
    display: flex;
    justify-content: center;
    align-items: center;
    pointer-events: none;
}

.scan-button {
    pointer-events: auto;
    width: 130px;
    height: 60px;
    background-color: #ff7a00;
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
    text-decoration: none;
    margin-bottom: 20px; /* Add some space from bottom */
}

.scan-button-text {
    font-size: 0.85rem;
    color: white;
    font-weight: 600;
    margin-right: 10px;
}

.scan-button-icon {
    width: 30px; /* Size of the icon */
    height: 30px;
    display: block; /* Remove extra space below the image */
}

/* Adjustments for smaller screens */

    .mma-header-row { padding: 1.2rem 0.7rem 0.7rem 0.7rem; } /* Adjust header padding */

    .main-content-area {
        padding-top: 5rem; /* Adjust padding for smaller screens */
    }

    /* Ensure no conflicting top padding on smaller screens */
    .language-selection-container {
        padding-top: 0 !important; /* Use !important to override potential conflicts */
    }

    .content-image-container {
         /* Adjust top margin for fixed header on smaller screens */
         margin-top: 0;
    }

    .content-image {
        max-height: 30vh; /* Adjust image height for smaller screens */
    }

    .museum-logo {
        width: 160px;
        height: 190px;
        background: #2d3026;
        z-index: 9;
        position: absolute;
        left: 0;
        right: 0;
        margin: 60px auto 0;
        border-radius: 28px;
        top: 10svh;
    }

    .museum-logo img {
        width: 80%;
        padding: 0;
        margin-left: 10%;
        margin-top: 6%;
    }


    .content-title {
        font-size: 1.5rem;
    }

    .content-description {
        font-size: 1rem;
    }


    .scan-button-container {
        bottom: 1rem; /* Adjust button position */
    }


/* Language Selection Custom Styles */
.language-selection-bg {
    background: #2d3123;
    min-height: 100vh;
    height: 100vh;
    margin: 0;
    color: #d2cfb2;
    font-family: 'Segoe UI', 'Arial', sans-serif;
    overflow: hidden;
    overscroll-behavior: none;
    touch-action: none;
}
.language-selection-container {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    min-height: 100svh;
    padding: 2rem;
}
.mma-header {
    text-align: left;
    width: 100%;
    margin-bottom: 2.5rem;
}
.mma-header-text {
    text-align: center;
    flex-grow: 1;
    text-transform: uppercase;
}
.mma-title {
    margin: 0;
    font-size: 1.3rem;
    font-weight: 800;
    font-family: 'Morebi Rounded Black', Arial, sans-serif;
    text-transform: uppercase;
    color: #f3f2e7;
}
.mma-subtitle {
    margin: 0.2rem 0 0 0;
    font-size: 1rem;
    font-weight: 400;
    font-family: 'Morebi Rounded Regular', Arial, sans-serif;
    text-transform: uppercase;
    color: #b6b49a;
}
.mma-main {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    min-height: 100svh;
}
.mma-guide-title {
    text-align: center;
    margin-bottom: 2.5rem;
}
.mma-guide-main {
    font-size: 2.2rem;
    font-weight: 800;
    margin: 0;
    color: #d2cfb2;
    letter-spacing: 0.01em;
}
.mma-guide-sub {
    font-size: 1.4rem;
    font-style: italic;
    font-weight: 500;
    margin: 0.5rem 0 0 0;
    color: #b6b49a;
}
.mma-flags-row {
    display: flex;
    flex-direction: row;
    gap: 2.5rem;
    justify-content: center;
    margin-top: 1.5rem;
}
.mma-flag-btn {
    background: none;
    border: none;
    display: flex;
    flex-direction: column;
    align-items: center;
    cursor: pointer;
    outline: none;
}
.mma-flag-img {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    border: 4px solid #b6b49a;
    background: #fff;
    box-shadow: 0 2px 8px rgba(0,0,0,0.12);
    margin-bottom: 0.7rem;
}
.mma-flag-label {
    font-size: 1.1rem;
    font-weight: 600;
    color: #d2cfb2;
    letter-spacing: 0.01em;
}
@media (max-width: 480px) {
    .mma-title { font-size: 1.1rem; }
    .mma-guide-main { font-size: 1.4rem; }
    .mma-guide-sub { font-size: 1rem; }
    .mma-flag-img { width: 60px; height: 60px; }
    .mma-flags-row { gap: 1.2rem; }
    .language-selection-container { padding-top: 1.2rem; }
}


/* QR Button styling */
.mma-qr-button-wrapper {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-top: 2rem;
}

.mma-cached-content-buttons {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.5rem;
}

.mma-qr-button {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #ff9100 0%, #ff6b00 100%);
    border: none;
    border-radius: 20px;
    padding: 2rem;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(255, 145, 0, 0.3);
    min-width: 200px;
    min-height: 200px;
}

.mma-qr-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(255, 145, 0, 0.4);
}

.mma-qr-button:active {
    transform: translateY(0);
}

.mma-qr-icon {
    width: 80px;
    height: 80px;
    margin-bottom: 1rem;
    filter: brightness(0) invert(1);
}

.mma-qr-label {
    color: white;
    font-size: 1.2rem;
    font-weight: bold;
    text-align: center;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* Change Language Button styling */
.mma-change-language-button {
    background: transparent;
    border: 2px solid #ff9100;
    border-radius: 15px;
    padding: 0.8rem 1.5rem;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.3rem;
}

.mma-change-language-button:hover {
    background: rgba(255, 145, 0, 0.1);
    transform: translateY(-1px);
}

.mma-change-language-button:active {
    transform: translateY(0);
}

.mma-change-lang-label {
    color: #ff9100;
    font-size: 0.9rem;
    font-weight: 600;
    text-align: center;
}

.mma-change-lang-label-pt {
    color: #ff9100;
    font-size: 0.8rem;
    font-weight: 500;
    text-align: center;
    opacity: 0.8;
}




/* QR Scanner Page Custom Styles */
.qr-bg {
    background: linear-gradient(135deg, #212317 0%, #2a2d1f 50%, #212317 100%);
    min-height: 100svh;
    color: #f3f2e7;
    font-family: 'Segoe UI', 'Arial', sans-serif;
    margin: 0;
}
.qr-header {
    display: flex;
    flex-direction: row;
    align-items: flex-start;
    justify-content: space-between;
    padding: 2.2rem 1.2rem 1.2rem 1.2rem;
    background: #3a3e2d;
}
.qr-header-text {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}
.qr-title {
    font-size: 1.3rem;
    font-weight: 700;
    margin: 0;
    color: #f3f2e7;
    letter-spacing: 0.01em;
}
.qr-subtitle {
    font-size: 1rem;
    font-style: italic;
    color: #b6b49a;
    margin: 0.2rem 0 0 0;
}
.qr-info-icon {
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-left: 1rem;
    cursor: pointer;
    outline: none;
}
.qr-main {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    width: 100%;
    padding-top: 12svh;
}
.qr-scanner-frame {
    position: relative;
    width: 90vw;
    max-width: 340px;
    aspect-ratio: 1 / 1;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 2.2rem;
}
.qr-frame-svg {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    z-index: 2;
    pointer-events: none;
}
.qr-reader-cam {
    width: 100%;
    height: 100%;
    z-index: 1;
    border-radius: 18px;
    overflow: hidden;
}
.qr-instructions {
    text-align: center;
    color: #f3f2e7;
    font-size: 1.4rem;
    font-weight: 600;
    margin-top: 2.5rem;
    margin-bottom: 1.5rem;
    text-shadow: none;
}

.custom-qr-frame {
    background: #11110a;
    border: 5px solid #ff9100;
    border-radius: 24px;
    width: 90vw;
    max-width: 340px;
    aspect-ratio: 1 / 1;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 0 0 6px #000, 0 2px 16px rgba(0,0,0,0.18);
    margin-bottom: 2.5rem;
    position: relative;
}

.custom-qr-frame .qr-reader-cam {
    width: 100%;
    height: 100%;
    border-radius: 18px;
    background: #000;
    overflow: hidden;
}

@media (max-width: 480px) {
    .qr-header { padding: 1.2rem 0.7rem 0.7rem 0.7rem; }
    .qr-title { font-size: 1.05rem; }
    .qr-subtitle { font-size: 0.9rem; }
    .qr-info-icon { width: 36px; height: 36px; }
    .qr-main { margin-top: 1.2rem; }
    .qr-scanner-frame { max-width: 95vw; }
    .custom-qr-frame {
        max-width: 95vw;
    }
    .qr-instructions {
        font-size: 1.1rem;
        margin-top: 1.2rem;
    }
}

@font-face {
    font-family: 'Morebi Rounded Black';
    src: url('../fonts/bb820f8532d929719198f5676948aec3.woff2') format('woff2'),
         url('../fonts/bb820f8532d929719198f5676948aec3.woff') format('woff'),
         url('../fonts/bb820f8532d929719198f5676948aec3.ttf') format('truetype');
    font-weight: normal;
    font-style: normal;
    font-display: swap;
}

.custom-bg {
    background: #212317 url(../img/background_2.png) no-repeat bottom left;
    background-size: contain;
    min-height: 100svh;
}
.mma-header-row {
    display: flex;
    flex-direction: row;
    align-items: flex-start;
    justify-content: space-between;
    width: 100%;
    padding: 2.2rem 1.2rem 0.5rem 1.2rem;
    box-sizing: border-box;
    z-index: 9;
    position: absolute;
    top: 0;
}
.mma-header-text {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    z-index: 999;
}
.custom-orange {
    color: #ff9100 !important;
}
.custom-green {
    color: #212317 !important;
    z-index: 999;
}
.mma-title {
    font-family: 'Morebi Rounded Black', Arial, sans-serif;
    font-size: 1.35rem;
    font-weight: 700;
    margin: 0;
    letter-spacing: 0.01em;
}
.mma-subtitle {
    font-family: Arial, sans-serif;
    font-size: 1.05rem;
    font-style: italic;
    color: #f3f2e7;
    margin: 0.2rem 0 0 0;
}
.mma-hamburger {
    width: 38px;
    height: 38px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-left: 1rem;
    cursor: pointer;
    outline: none;
}
.custom-main {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: start;
    align-items: center;
    min-height: 100svh;
    padding-top: 8svh;
}
.custom-main.lang {
    padding-top: 16svh;
}
.custom-guide-title {
    text-align: center;
    margin-bottom: 2.2rem;
}
.mma-guide-main {
    font-family: 'Morebi Rounded Black', Arial, sans-serif;
    font-size: 1.35rem;
    font-weight: 700;
    color: #fff;
    margin: 0;
    letter-spacing: 0.01em;
}
.mma-guide-sub {
    font-family: Arial, sans-serif;
    font-size: 1.05rem;
    font-style: italic;
    color: #b6b49a;
    margin: 0.3rem 0 0 0;
}
.mma-lang-cards-wrapper {
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
    margin-top: 1.2rem;
    margin-bottom: 2.5rem;
    transition: all 0.5s ease;
}
.mma-lang-cards {
    display: flex;
    flex-direction: row;
    gap: 1rem;
    position: relative;
    justify-content: center;
    align-items: flex-end;
    z-index: 1;
    transition: all 0.5s ease;

}
.mma-lang-card {
    background: #3b3e36;
    border: none;
    border-radius: 28px;
    width: 136px;
    height: 380px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    position: relative;
    box-shadow: 0 2px 16px rgba(0,0,0,0.10);
    cursor: pointer;
    z-index: 3;
    margin-bottom: 0;
    padding-top: 2.2rem;
    padding-bottom: 1.2rem;
    /*transition: box-shadow 0.2s;*/
    transition: width 0.5s ease 0.3s; /* Smooth transition on width */
}

.mma-lang-card.hide {
  opacity: 0;
  width: 0;
  margin: 0;
  padding: 0;
  overflow: hidden;
  transition: all 0.5s ease 0.3s;
}

.mma-lang-card:active, .mma-lang-card:focus {
    box-shadow: 0 4px 24px #ff9100aa;
}

/* PROGRESS BAR*/

.progress-bar {
    width: 100%;
    height: 0;
    background: #ff9100aa;
    position: absolute;
    bottom: 0;
    border-radius: 28px;
    transition: height 0.5s ease; /* Smooth transition on width */
}




.mma-flag-svg {
    width: 70px;
    margin-bottom: 2.2rem;
}
.mma-lang-label {
    font-family: 'Morebi Rounded Black', Arial, sans-serif;
    font-size: 1.5rem;
    font-weight: 700;
    margin-top: auto;
    margin-bottom: 0.5rem;
    letter-spacing: 0.04em;
}
.mma-headphones-svg {
    position: absolute;
    left: 50%;
    top: 47%;
    width: 220px;
    height: 220px;
    transform: translate(-50%, -38%);
    opacity: 1;
    pointer-events: none;
    z-index: 10;
}
.mma-footer {
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: flex-end;
    position: absolute;
    left: 0;
    bottom: 3svh;
    z-index: 10;
}
.mma-logo-exercito {
    width: 120px;
    max-width: 80vw;
    height: auto;
    display: block;
    opacity: 0.95;
}
/*
@media (max-width: 600px) {
    .mma-header-row { padding: 1.2rem 0.7rem 0.5rem 0.7rem; }
    .mma-title { font-size: 1.1rem; }
    .mma-guide-main { font-size: 1.1rem; }
    .mma-guide-sub { font-size: 0.9rem; }
    .mma-lang-cards { gap: 1.1rem; }
    .mma-lang-card { width: 35vw; min-width: 68px; max-width: 136px; height: 76vw; min-height: 200px; max-height: 540px; }
    .mma-flag-svg { width: 40px; height: 28px; }
    .mma-headphones-svg { width: 120px; height: 120px; }
    .mma-footer { bottom: 10vh; }
    .mma-logo-exercito { width: 140px; }
}*/

/*------------------------------------
| Menu Styles                         |
------------------------------------*/

.menu-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
    z-index: 9998; /* Higher z-index to appear above all content */
}

.menu-overlay.is-visible {
    opacity: 1;
    visibility: visible;
}

.menu-sidebar {
    position: fixed;
    top: 0;
    right: -300px;
    width: 300px;
    height: 100%;
    background-color: #212317;
    padding: 2rem;
    box-sizing: border-box;
    transition: right 0.3s ease;
    z-index: 9999; /* Highest z-index to appear above overlay */
    box-shadow: -2px 0 5px rgba(0, 0, 0, 0.2);
}

.menu-sidebar.is-visible {
    right: 0;
}

.menu-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
}

.menu-title {
    font-size: 1.5rem;
    font-weight: bold;
    color: #f3f2e7;
    font-family: 'Morebi Rounded Black', Arial, sans-serif;
}

.menu-close-button {
    font-size: 2rem;
    color: #f3f2e7;
    cursor: pointer;
    line-height: 1;
}

.menu-links {
    list-style: none;
    padding: 0;
    margin: 0;
}

.menu-links li {
    padding: 0;
    margin: 0;
}

.menu-links li:not(:last-child) {
    border-bottom: 1px solid #d2cfb2;
}

.menu-links a {
    display: block;
    padding: 1rem;
    color: #d2cfb2;
    text-decoration: none;
    font-size: 1.1rem;
    transition: background-color 0.3s ease;
}

.menu-links a:hover {
    background-color: rgba(210, 207, 178, 0.1);
}

/* Hide home button when offline */
.menu-links li.home-button-offline {
    display: none !important;
}

@media (max-width: 400px) {
    .menu-sidebar {
        width: 100%;
        right: -100%;
    }
    
    .menu-sidebar.is-visible {
        right: 0;
    }
}

/* Ensure hamburger menu is above other content */
.mma-hamburger {
    position: relative;
    z-index: 9997;
    cursor: pointer;
}

.museum-content {
    position: relative;
    height: 100svh;
    overflow: hidden;
}

.scrollable-content {
    position: relative;
    height: calc(100svh - 34svh);
    overflow-y: auto;
    padding: 20px;
    z-index: 2;
}

.museum-sections {
    margin-top: 2rem;
}

.section-card {
    background: #212317;
    border-radius: 12px;
    margin-bottom: 1rem;
    overflow: hidden;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.section-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.section-header {
    position: relative;
    height: 40px;
    max-height: 120px;
    background-size: 100% auto;
    background-position: center;
    background-repeat: no-repeat;
    display: flex;
    align-items: center;
}

.section-header:not([style*="background-image"]) {
    height: 40px;
    max-height: 120px;
    padding: 0;
    display: flex;
    align-items: center;
    background: rgba(33, 35, 23, 0.8);
}

.section-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 1rem;
    background: linear-gradient(to right, rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0.3));
}

.section-title {
    flex-grow: 1;
    margin: 0;
    font-size: 1.2rem;
    text-transform: uppercase;
    font-weight: 500;
    color: #fff;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.8);
    z-index: 2;
    padding-right: 0.5rem;
}

.expand-button {
    background: none;
    border: none;
    padding: 0;
    margin: 0;
    cursor: pointer;
    color: #fff;
    transition: transform 0.3s ease;
    z-index: 2;
    flex-shrink: 0;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.expand-button.expanded {
    transform: rotate(180deg);
}

.section-content {
    display: none;
    padding: 1rem;
    color: #d2cfb2;
    line-height: 1.6;
    background: rgba(33, 35, 23, 0.8);
}

.section-card[data-expanded="true"] .section-content {
    display: block;
}

.section-image-full {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.9);
    z-index: 1000;
    justify-content: center;
    align-items: center;
}

.section-image-full.visible {
    display: flex;
}

.section-image-full img {
    max-width: 90%;
    max-height: 90svh;
    object-fit: contain;
}

.close-image {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: none;
    border: none;
    color: #fff;
    font-size: 2rem;
    cursor: pointer;
    padding: 0.5rem;
}

/* For sections without images */
.section-card:not([style*="background-image"]) .section-header {
    background: #f5f5f5;
    padding: 1rem;
    background-size: cover;
}

.section-card:not([style*="background-image"]) .section-title {
    color: #d2cfb2;
    text-shadow: none;
}

.no-scroll {
    overflow: hidden;
}

@media (max-width: 480px) {
    .section-header {
        min-height: 120px;
    }

    .section-title {
        font-size: 1.2rem;
        font-weight: 600;
    }

    .section-image-full {
        padding: 1rem;
    }
}

/* Prevent text selection and image dragging */
* {
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
    -webkit-user-drag: none;
    -khtml-user-drag: none;
    -moz-user-drag: none;
    -o-user-drag: none;
}

img {
    pointer-events: none;
    -webkit-touch-callout: none;
}

/* Allow text selection in content that needs it (like input fields) */
input, 
textarea {
    -webkit-user-select: text;
    -moz-user-select: text;
    -ms-user-select: text;
    user-select: text;
}

/* Ensure these styles are not overridden later in the file */
.mma-header-text {
    text-align: center;
    flex-grow: 1;
    text-transform: uppercase !important;
}

.mma-title {
    margin: 0;
    font-size: 1.3rem;
    font-weight: 800;
    font-family: 'Morebi Rounded Black', Arial, sans-serif;
    text-transform: uppercase !important;
    color: #f3f2e7;
}

.mma-subtitle {
    margin: 0.2rem 0 0 0;
    font-size: 1rem;
    font-weight: 400;
    font-family: 'Morebi Rounded Regular', Arial, sans-serif;
    text-transform: uppercase !important;
    color: #b6b49a;
}

@media (max-width: 480px) {
    .mma-title { 
        font-size: 1.1rem;
        text-transform: uppercase !important;
    }
}

/* Add standalone mode padding */
@media (display-mode: standalone) {
    .mma-header-row{
        padding-top: 60px;
    }

    .qr-header,
    .content-page {
        padding-top: 40px;
    }

    .content-image-container {
        top: 40px;
    }

    .mma-guide-audio-player {
        margin-top: 200px;
    }

    .content-text {
        height: calc(100svh - 40svh - 80px - 40px);
        padding-bottom: 120px; /* Keep consistent padding in standalone mode */
    }
}

/* Replace orientation lock with friendly message */
.rotate-device-message {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: #212317;
    z-index: 9999;
    justify-content: center;
    align-items: center;
    text-align: center;
    padding: 20px;
    color: #f3f2e7;
    flex-direction: column;
    gap: 20px;
}

.rotate-device-message svg {
    width: 64px;
    height: 64px;
    animation: rotate 1.5s ease-in-out infinite;
}

@keyframes rotate {
    0% { transform: rotate(0deg); }
    25% { transform: rotate(-90deg); }
    75% { transform: rotate(-90deg); }
    100% { transform: rotate(0deg); }
}

@media screen and (orientation: landscape) and (max-width: 900px) {
    .rotate-device-message {
        display: flex;
    }
    
    body > *:not(.rotate-device-message) {
        display: none !important;
    }
}
