/* ========================================
   CSS VARIABLES
   ======================================== */
:root {
    --color-primary: #8B1B1B;
    --color-primary-alt: #A6192E;
    --color-secondary: #000000;
    --color-white: #FFFFFF;
    --color-gray: #D1D3D4;
    --color-accent: #eb0029;
    --color-blue: #0a0000;
    --font-main: 'Arial', Helvetica, sans-serif;
    --kiosk-width: 2160px;
    --kiosk-height: 3840px;
    --nav-height: 200px;
    --circle-size: 800px;
    --main-height: auto;
    --grid-columns: 2;
    --grid-rows: 1;
    --banner-display: flex;
    --banner-height: auto;
    --banner-margin: 80px 0 0 0;
    --banner-background: none;
    --banner-img-display: block;
    --banner-left: 50%;
    --banner-transform: translateX(-50%);
    --footer-height: 384px;
    --footer-background: url('https://kiosk.molemaster.com/images/molemaster.cmyk.wht.horz.png');
    --footer-background-size: 60%;
    --footer-bg-color: var(--color-accent);
}

/* ========================================
   GLOBAL STYLES
   ======================================== */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}
html, body {
    margin: 0;
    padding: 0;
    width: 100vw;
    height: 100vh;
    overflow: hidden;
    font-family: var(--font-main);
    color: #54585a;
    display: flex;
    flex-direction: column;
    position: relative;
    background-color: #000000;
    background-image:
        radial-gradient(circle at 20% 80%, rgba(64, 64, 64, 0.5) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(32, 32, 32, 0.5) 0%, transparent 50%),
        radial-gradient(circle at 40% 40%, rgba(96, 96, 96, 0.5) 0%, transparent 50%);
    background-size: 200% 200%, 200% 200%, 200% 200%;
    animation: moveGradient 60s linear infinite;
}

/* ========================================
   ANIMATIONS
   ======================================== */
@keyframes moveGradient {
    0% {
        background-position: 0% 0%, 100% 100%, 50% 50%;
    }
    12.5% {
        background-position: 25% 25%, 75% 75%, 75% 25%;
    }
    25% {
        background-position: 50% 50%, 50% 50%, 100% 0%;
    }
    37.5% {
        background-position: 75% 75%, 25% 25%, 25% 75%;
    }
    50% {
        background-position: 100% 100%, 0% 0%, 50% 50%;
    }
    62.5% {
        background-position: 75% 75%, 25% 25%, 75% 25%;
    }
    75% {
        background-position: 50% 50%, 50% 50%, 100% 0%;
    }
    87.5% {
        background-position: 25% 25%, 75% 75%, 25% 75%;
    }
    100% {
        background-position: 0% 0%, 100% 100%, 50% 50%;
    }
}

/* ========================================
   BUTTONS
   ======================================== */
.btn, .nav-button, .back-button, .nav-options, .product-button, .submit-button, .request-literature-button {
    font-family: var(--font-main);
    font-weight: bold;
    text-transform: uppercase;
    border-radius: 50px;
    cursor: pointer;
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
    transition: background-color 0.3s, box-shadow 0.3s, transform 0.3s;
    outline: none;
    border: none;
    color: var(--color-white);
    background-color: var(--color-blue);
    text-decoration: none;
    display: inline-block;
}
.btn:hover, .nav-button:hover, .back-button:hover, .nav-options:hover, .product-button:hover, .submit-button:hover, .request-literature-button:hover,
.btn:active, .nav-button:active, .back-button:active, .nav-options:active, .product-button:active, .submit-button:active, .request-literature-button:active {
    transform: scale(1.05);
    box-shadow: 0 6px 12px rgba(0,0,0,0.2);
}
.back-button {
    background: rgba(0,0,0,0.15);
    border: 6px solid #54585a;
    color: var(--color-white);
}
.product-button {
    font-size: 34px;
    padding: 12px 80px;
    border: 3px solid rgba(255,255,255,0.2);
    background: rgba(255,255,255,0.1);
    backdrop-filter: blur(3.5px);
    width: var(--circle-size);
}
.submit-button {
    font-size: 48px;
    padding: 20px 80px;
}
.nav-button, .nav-options {
    font-size: 48px;
    padding: 20px 80px;
}
.request-literature-button {
    font-size: 48px;
    padding: 20px 80px;
    margin: 20px auto;
    display: block;
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    font-weight: normal;
}

/* ========================================
   NAVIGATION
   ======================================== */
nav {
    height: var(--nav-height);
    display: flex;
    justify-content: space-around;
    align-items: center;
    padding: 20px 150px;
    background-color: var(--color-accent);
    box-shadow: 0 4px 10px rgba(0,0,0,0.2);
    overflow: hidden;
    gap: 20px;
}
.nav-button, .back-button, .nav-options {
    font-size: 48px;
    padding: 20px 80px;
    border-radius: 50px;
    cursor: pointer;
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
    z-index: 1;
    text-decoration: none;
    font-family: var(--font-main);
    font-weight: bold;
    text-transform: uppercase;
}

/* Disabled navigation button state - visible but non-interactive */
.nav-disabled {
    opacity: 0.38;
    filter: grayscale(40%);
    pointer-events: none;
    cursor: default;
    box-shadow: none;
}
.nav-disabled:hover,
.nav-disabled:active {
    transform: none;
    box-shadow: none;
}

/* ========================================
   MAIN CONTENT
   ======================================== */
main {
    flex: none;
    height: var(--main-height);
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-items: center;
    padding: 80px 40px 80px;
    overflow: hidden;
    position: relative;
}
.circles-2 {
    --main-height: auto;
    --grid-columns: 2;
    --grid-rows: 1;
}
.circles-3 {
    --main-height: auto;
    --grid-columns: 3;
    --grid-rows: 1;
    --circle-size: 700px;
}
.circles-9 {
    --main-height: auto;
    --grid-columns: 3;
    --grid-rows: 3;
    --circle-size: 600px;
}
.has-large-image {
    --banner-display: flex;
    --banner-flex: 1;
    --banner-height: auto;
    --banner-margin: 0 0 0 0;
    --banner-left: 50%;
    --banner-transform: translateX(-50%);
    --footer-height: 384px;
    --footer-background: url('https://kiosk.molemaster.com/images/molemaster.cmyk.wht.horz.png');
    --footer-background-size: 60%;
    --footer-bg-color: var(--color-accent);
}
.home-page {
    --circle-size: 900px;
}
.home-page main {
    padding: 300px 40px 300px;
}
.services-page main {
    justify-content: center;
}
.equipment-page {
    --grid-columns: 5;
}
.equipment-page .product:nth-child(2) {
    grid-column: 2;
}
.equipment-page .product:nth-child(3) {
    grid-column: 4;
}
.products {
    display: grid;
    grid-template-columns: repeat(var(--grid-columns), 1fr);
    grid-template-rows: repeat(var(--grid-rows), 1fr);
    gap: 20px;
    width: 100%;
}
.top-product {
    grid-column: 1 / -1;
}
.fullwidth-banner {
    display: var(--banner-display);
    width: 100vw;
    position: relative;
    left: 50%;
    transform: translateX(-50%);
    margin: var(--banner-margin);
    flex: var(--banner-flex, 1);
    height: var(--banner-height);
    background-image: var(--banner-background);
    background-size: cover;
    background-position: center;
    overflow: hidden;
}
.fullwidth-banner img {
    width: 100%;
    height: auto;
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    display: var(--banner-img-display);
}
.has-large-image .fullwidth-banner img {
    height: 100%;
    top: 0;
    transform: none;
    object-fit: contain;
}
.has-large-image .fullwidth-banner img {
    width: 100%;
    height: 100%;
    position: absolute;
    top: 0;
    transform: none;
    display: block;
    object-fit: cover;
    object-position: center center;
}

/* Banner video styling */
.fullwidth-banner video,
.banner-video:not(iframe) {
    width: 100%;
    height: 100%;
    position: absolute;
    top: 0;
    left: 0;
    object-fit: cover;
    object-position: center center;
    border: none;
    pointer-events: none;
}

/* Vimeo iframe - fullwidth video (1:1 aspect ratio scaled to cover) */
.fullwidth-banner iframe.banner-video {
    position: absolute;
    top: 50%;
    left: 50%;
    /* Scale 1:1 video to cover horizontal container */
    width: 100vw;
    height: 100vw; /* Match width for 1:1 aspect ratio */
    min-height: 100%;
    transform: translate(-50%, -50%);
    border: none;
    pointer-events: none;
    z-index: 2;
    /* Performance optimizations */
    will-change: transform;
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
}

/* Banner fallback image (hidden when video loads) */
.fullwidth-banner .banner-fallback-img,
.has-large-image .fullwidth-banner .banner-fallback-img {
    display: none !important;
}
.product {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    align-items: center;
    text-decoration: none;
    color: inherit;
    border-radius: 20px;
    padding: 10px;
    transition: transform 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    height: 100%;
    box-sizing: border-box;
    position: relative;
}
.product:hover, .product:active {
    transform: scale(1.02);
}
.image-wrapper {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    overflow: hidden;
    height: auto;
    margin-bottom: 40px;
    transition: transform 0.3s ease, filter 0.3s ease;
}
.product:hover .image-wrapper, .product:active .image-wrapper {
    transform: scale(1.05);
    filter: brightness(1.1);
}
.product img {
    width: var(--circle-size);
    height: var(--circle-size);
    transition: filter 0.3s ease, transform 0.3s ease;
    filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.1));
    object-fit: cover;
    border-radius: 50%;
}
.services-page .image-wrapper {
    aspect-ratio: 1;
}
.services-page .product img {
    width: 100%;
    height: 100%;
}
.services-page .product-button {
    width: 100%;
}
.bold {
    display: block;
    font-weight: bold;
    font-size: 1.2em;
}

/* ========================================
   FORMS
   ======================================== */
main.contact {
    justify-content: flex-start;
    align-items: center;
    padding: 0;
}
.contact-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    width: 100%;
    max-width: 1200px;
}
.qr-code {
    width: 600px;
    height: auto;
    margin-top: 100px;
}
.contact-info {
    font-size: 48px;
    color: #ffffff;
    margin-bottom: 80px;
    white-space: pre-line;
    line-height: 1.0;
}
.contact-info .company-title {
    font-size: 60px;
    font-weight: bold;
    margin-bottom: 10px;
}.contact-info .address-lines {
    line-height: 0.9;
}
.contact-info .contact-links {
    margin-top: 20px;
    line-height: 0.9;
}.contact-info a {
    color: #ffffff;
    text-decoration: underline;
}
.mobile-view .pdf-checkboxes {
    font-size: 40px;
}
.contact-form-card {
    width: 80%;
    max-width: 1200px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.1);
    padding: 40px;
}
.contact-form {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
}
.form-group {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-bottom: 30px;
    width: 100%;
    max-width: 800px;
}
.form-group label {
    font-size: 40px;
    color: #ffffff;
    margin-bottom: 10px;
}
.form-group input {
    font-size: 36px;
    padding: 15px;
    width: 100%;
    border-radius: 10px;
    border: 2px solid #0057b8;
    background-color: rgba(255, 255, 255, 0.8);
}
.pdf-checkboxes {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    margin-bottom: 40px;
    font-size: 40px;
    color: #ffffff;
}
.pdf-checkboxes label {
    margin-bottom: 20px;
    display: flex;
    align-items: center;
}
.pdf-checkboxes input {
    margin-right: 20px;
    width: 30px;
    height: 30px;
}
main.thank-you {
    justify-content: flex-start;
    align-items: center;
    padding: 0;
}
.thank-you-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    width: 100%;
    max-width: 1200px;
    padding-top: 200px;
}
.thank-you-message {
    font-size: 80px;
    color: #ffffff;
    margin-bottom: 40px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.1);
    font-weight: bold;
}
.thank-you-submessage {
    font-size: 48px;
    color: #ffffff;
    margin-bottom: 80px;
}

/* ========================================
   FOOTER
   ======================================== */
footer {
    height: var(--footer-height);
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 40px;
    background-color: var(--footer-bg-color);
    box-shadow: 0 -4px 10px rgba(0,0,0,0.2);
    overflow: hidden;
    background-image: var(--footer-background);
    background-size: var(--footer-background-size);
    background-position: center;
    background-repeat: no-repeat;
    margin-top: auto;
    flex-shrink: 0;
}

/* Remove gap between banner and footer */
.fullwidth-banner + footer {
    margin-top: 0;
}

.footer-logo-link {
    display: block;
    width: 100%;
    height: 100%;
    cursor: pointer;
    transition: opacity 0.3s ease;
}

.footer-logo-link:hover {
    opacity: 0.8;
}

/* ========================================
   RESPONSIVE / MOBILE STYLES
   ======================================== */
@media (max-width: 1024px) {
    * {
        box-sizing: border-box;
        margin: 0;
        padding: 0;
    }
    html {
        font-size: 16px;
    }
    body {
        font-family: var(--font-main);
        display: flex;
        flex-direction: column;
        justify-content: center;
        align-items: center;
        min-height: 100vh;
        color: #333;
        padding: 1rem;
        text-align: center;
        position: relative;
        width: auto;
        height: auto;
    }
    body::before, body::after {
        display: none;
    }
    nav, main, footer {
        display: none;
    }
    
    /* Mobile-view pages (contact-mobile.php, etc.) - show content */
    body.mobile-view {
        overflow-y: auto !important;
        height: auto !important;
        min-height: 100vh;
    }
    body.mobile-view main {
        display: flex !important;
        flex-direction: column;
        align-items: center;
        padding: 1rem;
        width: 100%;
        overflow-y: auto;
        flex: 1;
    }
    body.mobile-view footer {
        display: flex !important;
        height: 60px;
        padding: 10px;
        background-size: 40%;
    }
    body.mobile-view .contact-content {
        width: 100%;
        max-width: 100%;
        padding: 0;
    }
    .mobile-view .contact-info {
        font-size: 1rem;
        line-height: 1.5;
        margin-bottom: 1rem;
        white-space: normal;
    }
    .mobile-view .contact-info .company-title {
        font-size: 1.25rem;
        margin-bottom: 0.5rem;
    }
    .mobile-view .contact-info .address-lines {
        line-height: 1.4;
    }
    .mobile-view .contact-info .contact-links {
        margin-top: 0.75rem;
        line-height: 1.4;
    }
    .mobile-view .contact-form-card {
        width: 100%;
        max-width: 100%;
        padding: 1rem;
        margin-bottom: 1rem;
    }
    .mobile-view .pdf-checkboxes {
        font-size: 1rem;
        gap: 0.5rem;
        align-items: flex-start;
        width: 100%;
    }
    .mobile-view .pdf-checkboxes label {
        margin-bottom: 0.5rem;
        display: flex;
        align-items: center;
        gap: 0.5rem;
    }
    .mobile-view .pdf-checkboxes input {
        width: 1.25rem;
        height: 1.25rem;
        margin-right: 0.5rem;
    }
    .mobile-view .form-group {
        margin-bottom: 1rem;
        max-width: 100%;
    }
    .mobile-view .form-group label {
        font-size: 1rem;
        margin-bottom: 0.25rem;
    }
    .mobile-view .form-group input {
        font-size: 1rem;
        padding: 0.75rem;
    }
    .mobile-view .submit-button {
        font-size: 1.25rem;
        padding: 0.75rem 2rem;
        width: 100%;
        max-width: 300px;
    }
    .mobile-view .modal-content {
        width: 90%;
        max-width: 350px;
        padding: 1.5rem;
    }
    .mobile-view .modal-content h2 {
        font-size: 1.5rem;
        margin-bottom: 0.5rem;
    }
    .mobile-view .modal-content p {
        font-size: 1rem;
    }
    
    .title {
        font-size: 6vw;
        font-weight: bold;
        margin-bottom: 1rem;
        color: #ffffff;
        line-height: 1.2;
        max-width: 80vw;
    }
    .content-container {
        width: 90vw;
        max-width: 600px;
        padding: 1.5rem;
        background: rgba(255, 255, 255, 0.1);
        border: 1px solid rgba(255, 255, 255, 0.2);
        border-radius: 0.75rem;
        box-shadow: 0 4px 30px rgba(0, 0, 0, 0.1);
        backdrop-filter: blur(10px);
        -webkit-backdrop-filter: blur(10px);
        font-size: 3vw;
        line-height: 1.6;
        margin-bottom: 1rem;
    }
    .contact-info {
        font-size: 1rem;
        line-height: 1.5;
        margin-bottom: 1.5rem;
        color: #ffffff;
    }
    .contact-form {
        display: flex;
        flex-direction: column;
        gap: 1rem;
    }
    .form-group {
        display: flex;
        flex-direction: column;
        text-align: left;
    }
    .form-group label {
        font-size: 1rem;
        margin-bottom: 0.5rem;
        color: #ffffff;
    }
    .form-group input {
        padding: 0.75rem;
        border: 1px solid rgba(255, 255, 255, 0.3);
        border-radius: 0.5rem;
        font-size: 1rem;
        background-color: rgba(255, 255, 255, 0.2);
        color: #ffffff;
    }
    .form-group input::placeholder {
        color: rgba(255, 255, 255, 0.7);
    }
    .pdf-checkboxes {
        display: flex;
        flex-direction: column;
        gap: 0.5rem;
        text-align: left;
        font-size: 1rem;
        color: #ffffff;
    }
    .pdf-checkboxes label {
        display: flex;
        align-items: center;
        gap: 0.75rem;
    }
    .pdf-checkboxes input {
        width: 1.25rem;
        height: 1.25rem;
        accent-color: #0057b8;
    }
    .submit-button {
        padding: 0.75rem 1.5rem;
        background-color: #0057b8;
        color: #fff;
        border: none;
        border-radius: 0.5rem;
        font-size: 1.25rem;
        cursor: pointer;
        transition: background-color 0.3s ease;
    }
    .submit-button:hover {
        background-color: #00408a;
    }
    footer {
        padding: 20px;
        width: 100%;
        display: flex;
        justify-content: center;
        align-items: center;
        background-color: var(--color-accent);
        box-shadow: 0 -4px 10px rgba(0, 0, 0, 0.2);
        background-image: url('https://kiosk.molemaster.com/images/molemaster.cmyk.wht.horz.png');
        background-size: contain;
        background-position: center;
        background-repeat: no-repeat;
        height: 384px;
    }
    .modal {
        display: none;
        position: fixed;
        z-index: 1000;
        left: 0;
        top: 0;
        width: 100%;
        height: 100%;
        background-color: rgba(0, 0, 0, 0.5);
        justify-content: center;
        align-items: center;
    }
    .modal-content {
        background-color: #fefefe;
        padding: 20px;
        border: 1px solid #888;
        width: 80%;
        max-width: 400px;
        border-radius: 0.5rem;
        text-align: center;
    }
    .close {
        color: #aaa;

        float: right;
        font-size: 28px;
        font-weight: bold;
    }
    .close:hover,
    .close:focus {
        color: black;
        text-decoration: none;
        cursor: pointer;
    }
    @media (max-width: 480px) {
        html {
            font-size: 14px;
        }
        .title {
            font-size: 8vw;
        }
        .content-container {
            font-size: 4vw;
            padding: 1rem;
        }
        .submit-button {
            font-size: 1.125rem;
        }
    }
    @media (min-width: 768px) {
        .title {
            font-size: 4vw;
        }
        .content-container {
            font-size: 2vw;
        }
        .submit-button {
            font-size: 1.5rem;
        }
    }
}

/* ========================================
   TEMPLATE PAGE STYLES
   ======================================== */
.product-hero {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 80px;
    padding: 40px 40px 40px 140px;
    margin: -70px -40px 40px -40px;
    background: rgba(0,0,0,0.5);
    width: 100vw;
    position: relative;
    left: 50%;
    transform: translateX(-50%);
}

.hero-image img {
    max-width: 500px;
    height: auto;
    border-radius: 10px;
    box-shadow: 0 8px 16px rgba(0,0,0,0.3);
}

.hero-content {
    text-align: left;
}

.hero-content h1 {
    font-size: 80px;
    color: var(--color-white);
    margin: 0 0 20px 0;
    text-transform: uppercase;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.5);
}

.hero-subtitle {
    font-size: 48px;
    color: var(--color-gray);
    margin: 0;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.5);
}

.product-details {
    padding: 80px 40px;
}

.overview h2,
.features h2,
.specifications h2 {
    font-size: 60px;
    color: var(--color-white);
    margin-bottom: 20px;
    text-transform: uppercase;
}

.overview p {
    font-size: 40px;
    line-height: 1.4;
    color: var(--color-gray);
    margin-bottom: 40px;
}

.feature-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 40px;
    margin-bottom: 40px;
}

.feature-item h3 {
    font-size: 48px;
    color: var(--color-white);
    margin-bottom: 10px;
    text-transform: uppercase;
}

.feature-item p {
    font-size: 36px;
    color: var(--color-gray);
    line-height: 1.3;
}

.specifications ul {
    list-style: none;
    padding: 0;
}

.specifications li {
    font-size: 36px;
    color: var(--color-gray);
    margin-bottom: 10px;
}

.specifications strong {
    color: var(--color-white);
}

/* Two-column specifications layout */
.specs-two-column {
    display: flex;
    gap: 80px;
}

.specs-two-column .specs-column {
    flex: 1;
}