﻿:root {
    --primary-color: rgb(25,25,25);
    --link-bg: rgb(0, 0, 0);
    --text-color: rgb(198, 194, 185);
    --hover-color: rgb(194, 155, 64);
}

/* When the nav is open on mobile/tablet, make sure it sits above gallery/lightbox overlays
   and that those overlays don't intercept pointer events. We toggle this by adding
   the `nav-open` class to `body` from JS when opening the sidebar. */
body.nav-open nav {
    z-index: 3000; /* above lightbox (1000+) and page overlay (2500) */
}

body.nav-open .image-overlay,
body.nav-open .lightbox,
body.nav-open .lightbox-watermark,
body.nav-open .watermark-overlay {
    pointer-events: none;
}


* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    color: var(--text-color);
    height: 100%;
    margin: 0;
}

body {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    background-color: var(--primary-color);
}

.header {
    display: flex;
    justify-content: space-between; /* pushes left & right apart */
    padding-right: 0.5em;
    align-items: center;
}

.header-left {
    font-size: 1.5rem;
    font-weight: bold;
}

.header-right {
    display: flex;
    gap: 20px;
}

.logo {
    max-width: 100%;
    height: auto;
}

/* MAIN ELEMNT FORMAT */
main {
    min-height: calc(100vh - 160px);
    display: flex;
    flex-direction: column;
    align-items: center;
}

span {
    text-align: center;
    font-size: 2.25rem;
    padding-bottom: 10px;
}

/*section {
    display: flex;
    justify-content: center;
    align-items: center;
}*/

.service-container {
    display: flex;
    width: 100%;
    gap: 10px;
    justify-content: center;
}

.serivce-descript {
    width: 25%;
    min-height: 300px;
    border-radius: 10px;
    padding: 0.5rem;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    justify-content: space-between; /* pushes buttons to bottom if needed */
    overflow: hidden; /* prevent children from escaping the box */
    margin-bottom: 10px;
}

.service-image {
    width: 75%;
    min-height: 300px;
    border-radius: 10px;
    box-sizing: border-box;
    display: flex;            /* arrange inner panels side-by-side */
    align-items: stretch;    /* make panels match container height */
    margin-bottom: 10px;
}

.service-image > * {
    flex: 1 1 0;             /* children share available width; single child fills */
    min-width: 0;           /* allow flex children to shrink properly */
    background-size: cover;
    background-position: center;
    border-radius: 8px;
}

.desktop {
    background-image: url('../../images/desktop2.webp');
}

.laser {
    background-image: url('../../images/laser.webp');
}

.print {
    background-image: url('../../images/printing.webp');
}

.cell {
    background-image: url('../../images/cellphone.webp');
}

.laptop {
    background-image: url('../../images/laptop.webp');
}

.link-btns {
    display: flex;
    gap: 20px;
    justify-content: center;
    align-items: center;
    width: 100%;
    height: 100%;
    flex-wrap: wrap; /* allow buttons to wrap instead of overflowing */
}

.link-btns p a,
.link-btns p button{
    display: inline-block;
    padding: 5px 10px;
    color: rgb(0, 0, 0);
    font-weight: bold;
    background-color: rgb(139, 137, 137);
    text-align: center;
    text-decoration: none;
    border-radius: 4px;
    margin-left: 10px;
}



.link-btns p a:hover,
.link-btns p button:hover {
    box-shadow: inset 0 6px 8px rgba(0, 0, 0, 0.5);
}

/* ABOUT PAGE FORMAT */
.about-container {
    width: 35%;
}

.about-container img {
    float: left;
    margin-right: 10px;
    width: 150px;
    height: auto;
}

/* Footer stays at bottom */
footer {
    background-color: var(--primary-color);
    color: var(--text-color);
    padding: 1rem;
    text-align: center;
}

/* CONTACT US PAGE FORMAT */
.heading {
    font-size: 1.8rem;
    text-decoration: underline;
    font-style: italic;
}

.head {
    margin-top: 2rem;
}

input[type="radio"] {
    appearance: none;
    width: 20px;
    height: 20px;
    border: 2px solid rgb(0, 123, 255);
    border-radius: 50%;
    outline: none;
    cursor: pointer;
    transition: background-color 0.3s ease, border-color 0.3s ease;
}

/* Style when the radio button is checked */
input[type="radio"]:checked {
    background-color: rgb(0, 123, 255);
    border-color: rgb(0, 86, 179);
}

/* Add hover effect */
input[type="radio"]:hover {
    border-color: rgb(0, 86, 179);
}

/* Style the checkboxes */
input[type="checkbox"] {
    appearance: none;
    width: 20px;
    height: 20px;
    border: 2px solid rgb(0, 123, 255);
    border-radius: 4px;
    outline: none;
    cursor: pointer;
    transition: background-color 0.3s ease, border-color 0.3s ease;
}

/* Style when the checkbox is checked */
input[type="checkbox"]:checked {
    background-color: rgb(0, 123, 255);
    border-color: rgb(0, 86, 179);
    position: relative;
}

input[type="checkbox"]:checked::after {
    content: '✔';
    color: rgb(255, 255, 255);
    font-size: 14px;
    position: absolute;
    top: 2px;
    left: 4px;
}

/* Add hover effect */
input[type="checkbox"]:hover {
    border-color: rgb(0, 86, 179);
}

/* NAVIGATION AND SIDEBAR */
nav {
    background-color: var(--primary-color);
    /* ensure nav can receive pointer events when visible */
    pointer-events: auto;
}

ul {
    list-style: none;
    display: flex;
    justify-content: flex-end;
}

nav li {
    display: flex;
    position: relative;
}

nav a {
    display: flex;
    text-decoration: none;
    color: var(--text-color);
    padding: 1em 1em;
    transition: background-color 150ms ease;
}

nav a:hover {
    background-color: var(--link-bg);
    color: var(--hover-color);
    text-decoration: underline;
}

nav a.active-link {
    background-color: var(--link-bg);
    color: var(--hover-color);
    text-decoration: underline;
}

/* Dropdown Menu Styles */
.dropdown-content {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    background-color: var(--primary-color);
    min-width: 200px;
    z-index: 4000;
    flex-direction: column;
    box-shadow: 0px 8px 16px rgba(0, 0, 0, 0.5);
}

.dropdown:hover .dropdown-content {
    display: flex;
}

.desktop-only {
    display: none;
}

#open-sidebar-button {
    display: none;
    background: none;
    border: none;
    padding: 1em;
    margin-left: auto;
    cursor: pointer;
}

#close-sidebar-button {
    display: none;
    background: none;
    border: none;
    padding: 1em;
    cursor: pointer;
}

#overlay {
    background-color: rgba(0, 0, 0, 0.5);
    position: fixed;
    inset: 0;
    /* keep the dark page overlay below the nav but above content overlays */
    z-index: 2500;
    display: none;
}

/* GALLERY LAYOUT */
.gallery {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    justify-content: center;
    padding: 20px;
}

.image-item {
    position: relative;
    width: 150px;
    height: 150px;
    overflow: hidden;
}

.thumbnail {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 8px;
    cursor: pointer;
    transition: transform 0.3s ease;
}

.thumbnail:hover {
    transform: scale(1.1);
}

/* Additional protection against dragging images */
img {
    -webkit-user-drag: none;
    pointer-events: none;
}

.watermark-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    pointer-events: none;
    z-index: 10;
    opacity: 0.5;
    font-size: 1.6rem;
    color: white;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.8);
    transform: rotate(-45deg);
    font-weight: bold;
    background: rgba(0, 0, 0, 0.2);
}

/* LIGHTBOX LAYOUT */
.lightbox {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    justify-content: center;
    align-items: center;
}

.lightbox-content {
    max-width: 90%;
    max-height: 90%;
    object-fit: contain;
    position: relative;
    z-index: 1001;
}

/* Create a transparent overlay to prevent direct image access */
.image-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1002;
    cursor: pointer;
    pointer-events: auto;
}

.lightbox-container {
    position: relative;
    display: inline-block;
}

.lightbox-watermark {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    pointer-events: none;
    z-index: 1002;
    opacity: 0.5;
    font-size: 5rem;
    color: white;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.8);
    transform: rotate(-45deg);
    font-weight: bold;
    background: rgba(0, 0, 0, 0.2);
}

/* Additional class for unselectable images */
.unselectable {
    -webkit-touch-callout: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
    pointer-events: none;
    -webkit-user-drag: none;
}

.close {
    position: absolute;
    top: 20px;
    right: 40px;
    color: rgb(255, 255, 255);
    font-size: 3.0rem;
    cursor: pointer;
    pointer-events: auto;
}

.nav-button {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background-color: rgba(0, 0, 0, 0.5);
    color: rgb(255, 255, 255);
    border: none;
    padding: 10px;
    font-size: 3.0rem;
    cursor: pointer;
    z-index: 1001;

    pointer-events: auto;
}

#prev {
    left: 10px;
}

#next {
    right: 10px;
}

.nav-button:hover {
    background-color: rgba(0, 0, 0, 1.00);
}

/* SIGNUP & LOGIN FORM LAYOUT */
/* fills the div with the image while preserving aspect ratio */
.center {
    width: 100%;
    max-width: 750px;
    min-height: 44px; /* height of visible area */
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-color);
}

.center-top {
    background-image: url('../../images/top_center2.png');
    background-size: contain;
    background-repeat: repeat;
}

.center-bottom {
    background-image: url('../../images/bottom_center2.png');
    background-size: contain;
    background-repeat: repeat;
}

/* Flex container with start (left) and end (right) images and center content */
.flex-side-images {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    max-width: 750px;
    padding: 0 1rem;
    box-sizing: border-box;
}

.flex-side-images .side-img {
    height: 44px;
    flex: 0; /* fixed width so center can flex */
    object-fit: contain;
    display: block;
}

.flex-side-images .center {
    flex: 1 1 auto;
    text-align: center;
    color: var(--text-color);
    padding: 0 1rem;
}

/* Decorative row with images at start and end and a center blue bar */
.start-end-images {
    display: flex;
    align-items: stretch;
    justify-content: space-between;
    width: 100%;
    max-width: 750px;
    padding: 0 1rem;
    box-sizing: border-box;
}

.start-end-images .start-img,
.start-end-images .end-img {
    max-width: 17px;
    height: stretch;
    display: block;
    
}

.start-end-images .mid-center {
    flex: 1 1 auto;
    padding: 0.75rem;
    background-color: rgb(21, 27, 84);
}

.form-container {
    width: 100%;
    max-width: 750px;
    min-height: 100%;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    /*background-color: purple;*/
}

.form-top {
    display: flex;
    gap: 1rem; /* space between the two top columns */
    align-items: flex-start;
}

.form-part {
    flex: 1 1 0; /* columns share available width */
    min-width: 0; /* prevents overflow from long content */
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

/* single field row: label and input side-by-side */
.field {
    display: flex;
    gap: 0.75rem;
    align-items: center;
}

.field label {
    flex: 0 0 150px; /* fixed label width */
    font-size: 1.25rem;
    color: var(--text-color);
}

.field label.method {
    flex: 0 0 200px; /* fixed label width */
    font-size: 1.25rem;
    color: var(--text-color);
}

.field input[type="text"],
.field input[type="password"] {
    flex: 1 1 auto; /* input fills remaining space */
    min-width: 0; /* important for flex children */
    padding: 0.5rem;
    border-radius: 4px;
    border: 1px solid rgb(255,255,255);
    background-color: var(--primary-color);
    color: var(--text-color);
}

input[type="radio"],
input[type="checkbox"] {
    flex: 0 0 auto; /* use flex but do not fill remaining space */
    margin-left: 0;
}

.form-textarea {
    width: 100%;
    display: block;
    padding-top: 0.75rem;
}

.form-textarea label {
    flex: 0 0 150px; /* fixed label width */
    font-size: 1.25rem;
    color: var(--text-color);
}

/* Style the textarea */
textarea {
    width: 100%;
    height: 150px;
    padding: 10px;
    border: 2px solid rgb(0, 123, 255);
    border-radius: 5px;
    font-size: 1rem;
    font-family: Arial, sans-serif;
    color: rgb(0, 0, 0);
    background-color: rgb(255, 255, 255);
    direction: ltr;
    text-align: left;
    resize: none;
    white-space: pre-wrap;
    word-wrap: break-word;
    outline: none;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.form-bottom {
    width: 100%;
    display: block;
}

.account {
    width: 100%;
    max-width: 750px;
    min-height: 44px; /* height of visible area */
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-color);
}

.account a:hover {
    color: rgb(194, 155, 64);
    text-decoration: underline;
}

/* ensure there's a small gap between account prompt text and the signup link */
.account a {
    margin-left: 0.5rem;
}

.error {
    display: block;
    border-radius: 5px;
    border: 2px solid darkred;
    background-color: darkred;
    text-align: center;
    padding: 3px;
    font-size: 1.8rem;
    margin: 0.5rem 0;
}

.success {
    display: block;
    border-radius: 5px;
    border: 2px solid darkgreen;
    background-color: darkgreen;
    text-align: center;
    padding: 3px;
    font-size: 1.8rem;
    margin: 0.5rem 0;
}



/* MEDIA QUERIES */
/* Samsung Galaxy S24+ as reference for cellphone resolution */
@media screen and (max-width: 849px) {
    .flex-side-images .side-img {
        display: none; /* hide side images on small screens */
    }

    .start-end-images .start-img,
    .start-end-images .end-img {
        display: none; /* hide start/end images on small screens */
    }

    #open-sidebar-button, #close-sidebar-button {
        display: block;
    }

    nav {
        position: fixed;
        top: 0;
        right: -100%;
        height: 100vh;
        width: min(15em, 100%);
        z-index: 10;
        border-left: 1px solid var(--primary-color);
        transition: right 300ms ease-out;
    }

    nav.show {
        right: 0;
    }

    nav.show ~ #overlay {
        display: block;
    }

    nav ul {
        width: 100%;
        flex-direction: column;
    }

    nav a {
        width: 100%;
        padding-left: 2.5em;
    }

    .service-container {
        flex-direction: column;
    }

    .service-image {
        display: none;
    }

    .serivce-descript {
        width: 100%;
    }

    .about-container {
        width: 100%;
    }
}

@media screen and (min-width: 850px) and (max-width: 1500px) {
    #open-sidebar-button, #close-sidebar-button {
        display: block;
    }

    nav {
        position: fixed;
        top: 0;
        right: -100%;
        height: 100vh;
        width: min(15em, 100%);
        z-index: 10;
        border-left: 1px solid var(--primary-color);
        transition: right 300ms ease-out;
    }

    nav.show {
        right: 0;
    }

    nav.show ~ #overlay {
        display: block;
    }

    nav ul {
        width: 100%;
        flex-direction: column;
    }

    nav a {
        width: 100%;
        padding-left: 2.5em;
    }

    .service-container {
        flex-direction: row;
    }

    .service-image {
        width: 50%;
    }

    .serivce-descript {
        width: 50%;
    }

    .about-container {
        width: 100%;
    }
}

/* Blocking admin access unless on a Laptop 1600x900 or larger */
@media (min-width: 1600px) {
    .desktop-only {
        display: block; /* or block */
    }
}
