
/* =====================================================
   BEST Painters UG
   OFFICIAL WEBSITE STYLESHEET
   Slogan: Coloring Uganda with Excellence
===================================================== */


/* =====================================================
   1. ROOT VARIABLES
===================================================== */

:root {
    --blue: #16428C;
    --red: #E21D25;
    --black: #111111;
    --yellow: #FFD500;
    --white: #FFFFFF;

    --background: #FFFFFF;
    --surface: #F5F6F8;
    --text: #171717;
    --border: #E0E0E0;

    --header-height: 85px;
    --transition: 0.3s ease;
}

body.dark-mode {
    --background: #121212;
    --surface: #202020;
    --text: #FFFFFF;
    --border: #383838;
}


/* =====================================================
   2. GLOBAL RESET
===================================================== */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    scroll-padding-top: 100px;
}

body {
    font-family: Arial, Helvetica, sans-serif;
    background: var(--background);
    color: var(--text);
    overflow-x: hidden;
    transition:
        background var(--transition),
        color var(--transition);
}

button,
input {
    font-family: inherit;
    max-width: 100%;
}

button {
    cursor: pointer;
}

button:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none !important;
}

input {
    color: var(--text);
}

a {
    text-decoration: none;
    color: inherit;
}

img {
    max-width: 100%;
    display: block;
}

section {
    padding: 80px 7%;
}

section h2 {
    color: var(--blue);
    font-size: 2.2rem;
    text-align: center;
    margin-bottom: 35px;
}


/* =====================================================
   3. INTRODUCTION SCREEN
===================================================== */

#introScreen {
    position: fixed;
    inset: 0;
    width: 100%;
    height: 100vh;
    height: 100svh;
    background: #FFFFFF;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    overflow: hidden;
}

.intro-content {
    width: 100%;
    max-width: 1000px;
    min-height: 50vh;
    padding: 20px 4%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
}


/* =====================================================
   4. BEST - LETTER BY LETTER
===================================================== */

.intro-best {
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: clamp(4rem, 13vw, 9rem);
    font-weight: 900;
    line-height: 1;
    color: var(--blue);
    letter-spacing: 2px;
}

.intro-best span {
    display: inline-block;
    opacity: 0;
    transform: scale(0.3);
    animation: letterZoom 0.9s ease forwards;
}

.intro-best span:nth-child(1) {
    animation-delay: 0.3s;
}

.intro-best span:nth-child(2) {
    animation-delay: 0.75s;
}

.intro-best span:nth-child(3) {
    animation-delay: 1.2s;
}

.intro-best span:nth-child(4) {
    animation-delay: 1.65s;
}


/* =====================================================
   5. PAINTERS AND UG
===================================================== */

.intro-name {
    display: flex;
    justify-content: center;
    align-items: baseline;
    flex-wrap: nowrap;
    gap: 12px;
    margin-top: 5px;
    max-width: 100%;
}

.intro-painters {
    display: flex;
    min-width: 0;
    font-size: clamp(2.1rem, 8vw, 5.5rem);
    font-weight: 900;
    font-style: italic;
    color: var(--red);
    line-height: 1.1;
}

.intro-painters span {
    display: inline-block;
    opacity: 0;
    transform: scale(0.3);
    animation: letterZoom 0.7s ease forwards;
}

.intro-painters span:nth-child(1) {
    animation-delay: 2.1s;
}

.intro-painters span:nth-child(2) {
    animation-delay: 2.3s;
}

.intro-painters span:nth-child(3) {
    animation-delay: 2.5s;
}

.intro-painters span:nth-child(4) {
    animation-delay: 2.7s;
}

.intro-painters span:nth-child(5) {
    animation-delay: 2.9s;
}

.intro-painters span:nth-child(6) {
    animation-delay: 3.1s;
}

.intro-painters span:nth-child(7) {
    animation-delay: 3.3s;
}

.intro-painters span:nth-child(8) {
    animation-delay: 3.5s;
}

.intro-ug {
    color: var(--blue);
    font-size: clamp(2.1rem, 8vw, 5.5rem);
    font-weight: 900;
    opacity: 0;
    transform: scale(0.2);
    animation: letterZoom 1s ease forwards;
    animation-delay: 3.8s;
}


/* =====================================================
   6. INTRODUCTION ANIMATIONS
===================================================== */

@keyframes letterZoom {

    0% {
        opacity: 0;
        transform: scale(0.3);
    }

    60% {
        opacity: 1;
        transform: scale(1.12);
    }

    100% {
        opacity: 1;
        transform: scale(1);
    }

}


/* =====================================================
   7. COMPANY SLOGAN
===================================================== */

.intro-slogan {
    position: relative;
    width: 100%;
    max-width: min(100%, 900px);
    margin-top: 20px;
    padding: 18px 10px;
    background: var(--yellow);
    border-radius: 50% 12% 45% 10% / 30% 20% 35% 20%;
    opacity: 0;
    transform: translateX(120vw);
    animation: sloganSlide 1.6s cubic-bezier(.22,.61,.36,1) forwards;
    animation-delay: 4.4s;
}

.intro-slogan span {
    display: block;
    color: var(--black);
    font-size: clamp(1rem, 3.7vw, 2.2rem);
    font-weight: 900;
    font-style: italic;
    white-space: normal;
    overflow-wrap: anywhere;
}

@keyframes sloganSlide {

    0% {
        opacity: 0;
        transform: translateX(120vw);
    }

    80% {
        opacity: 1;
        transform: translateX(-5px);
    }

    100% {
        opacity: 1;
        transform: translateX(0);
    }

}


/* =====================================================
   8. UGANDA FLAG COLOUR LINES
===================================================== */

.uganda-stripes {
    width: 100vw;
    margin-top: 18px;
    display: flex;
    flex-direction: column;
    gap: 0;
    opacity: 0;
    animation: stripesAppear 0.8s ease forwards;
    animation-delay: 5.5s;
}

.uganda-stripes div {
    width: 100%;
    height: 0.5cm;
}

.stripe-black {
    background: #000000;
}

.stripe-yellow {
    background: #FFD500;
}

.stripe-red {
    background: #E21D25;
}

@keyframes stripesAppear {

    from {
        opacity: 0;
        transform: translateY(15px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }

}


/* =====================================================
   9. INTRODUCTION EXIT
===================================================== */

#introScreen.hide-intro {
    opacity: 0;
    visibility: hidden;
    transition:
        opacity 0.8s ease,
        visibility 0.8s ease;
}


/* =====================================================
   10. COMPANY LOGO SCREEN
===================================================== */

#logoScreen {
    position: fixed;
    inset: 0;
    width: 100%;
    height: 100vh;
    height: 100svh;
    background: #FFFFFF;
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    opacity: 0;
}

#logoScreen.show-logo {
    display: flex;
    animation: logoAppear 0.8s ease forwards;
}

#companyLogo {
    width: 90%;
    max-width: 1100px;
    max-height: 85vh;
    object-fit: contain;
}

@keyframes logoAppear {

    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }

}


/* =====================================================
   11. MAIN WEBSITE LOADING
===================================================== */

#mainWebsite {
    display: none;
    opacity: 0;
}

#mainWebsite.show-website {
    display: block;
    animation: websiteAppear 1s ease forwards;
}

@keyframes websiteAppear {

    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }

}


/* =====================================================
   12. HEADER
===================================================== */

.main-header {
    width: 100%;
    min-height: var(--header-height);
    padding: 12px 5%;
    background: var(--background);
    border-bottom: 3px solid var(--blue);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    position: sticky;
    top: 0;
    z-index: 1000;
    transition: background var(--transition);
}

.header-logo img {
    width: 105px;
    height: 65px;
    object-fit: contain;
}


/* =====================================================
   13. SEARCH BAR
===================================================== */

.header-search {
    display: flex;
    align-items: center;
    gap: 5px;
}

.header-search input {
    width: 190px;
    min-width: 0;
    padding: 11px;
    border: 1px solid var(--border);
    border-radius: 5px;
    outline: none;
    background: var(--surface);
    color: var(--text);
}

.header-search button {
    padding: 11px 15px;
    border: none;
    border-radius: 5px;
    background: var(--blue);
    color: white;
    font-weight: bold;
}

.header-search button:hover {
    background: var(--red);
}


/* =====================================================
   14. DARK MODE BUTTON
===================================================== */

#themeToggle {
    padding: 11px 15px;
    background: var(--black);
    color: white;
    border: none;
    border-radius: 5px;
    font-weight: bold;
}

#themeToggle:hover {
    background: var(--blue);
}


/* =====================================================
   15. NAVIGATION
===================================================== */

#mainNavigation {
    display: flex;
    align-items: center;
    gap: 20px;
}

#mainNavigation a {
    font-size: 0.95rem;
    font-weight: bold;
    color: var(--text);
    transition: color var(--transition);
}

#mainNavigation a:hover {
    color: var(--red);
}

#menuToggle {
    display: none;
    background: var(--blue);
    color: white;
    border: none;
    padding: 10px 15px;
    border-radius: 5px;
    font-size: 1.3rem;
}


/* =====================================================
   16. HOMEPAGE HERO SECTION
===================================================== */

.hero-section {
    position: relative;
    min-height: clamp(550px, 72vh, 760px);
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.hero-background {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
}

.hero-background img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center 55%;
}

.hero-background::after {
    content: "";
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.48);
}

.hero-content {
    position: relative;
    z-index: 2;
    text-align: center;
    color: white;
    max-width: 900px;
    padding: 30px;
}

.hero-content h1 {
    font-size: clamp(2rem, 6vw, 4.5rem);
    font-weight: 900;
    margin-bottom: 20px;
}

.hero-content h1 span {
    display: inline-block;
}

.hero-content h1 > span:first-of-type {
    color: #FFFFFF;
}

.hero-content .hero-painters {
    color: #FF343B;
}

.hero-content .hero-ug {
    color: #76A9FF;
}

.hero-content p {
    font-size: clamp(1.1rem, 3vw, 1.8rem);
    font-weight: bold;
    margin-bottom: 30px;
}

.hero-button {
    display: inline-block;
    padding: 14px 25px;
    margin: 8px;
    border-radius: 5px;
    background: var(--red);
    color: white;
    font-weight: bold;
    transition: var(--transition);
}

.hero-button:hover {
    background: var(--yellow);
    color: var(--black);
    transform: translateY(-3px);
}


/* =====================================================
   17. ABOUT US
===================================================== */

.about-section {
    background: var(--surface);
}

.about-content {
    display: grid;
    grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr);
    align-items: center;
    gap: 35px;
    max-width: 1100px;
    margin: auto;
    text-align: center;
    font-size: 1.1rem;
    line-height: 1.9;
}

.about-banner {
    width: 100%;
    max-height: 340px;
    object-fit: contain;
    border-radius: 10px;
}

.eyebrow {
    color: var(--red);
    font-size: 0.78rem;
    font-weight: 900;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    margin-bottom: 10px;
}

.about-copy {
    text-align: left;
}

.about-copy h3 {
    color: var(--text);
    font-size: clamp(1.7rem, 3vw, 2.45rem);
    line-height: 1.15;
    margin-bottom: 18px;
}

.about-copy > p:not(.eyebrow) {
    color: var(--text);
    line-height: 1.75;
}

.about-highlights {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    margin-top: 24px;
}

.about-highlights span {
    display: flex;
    flex-direction: column;
    border-top: 3px solid var(--yellow);
    padding-top: 12px;
    font-size: 0.84rem;
}

.about-highlights strong {
    color: var(--blue);
    font-size: 1rem;
}


/* =====================================================
   18. SERVICES
===================================================== */

.services-section {
    background: var(--background);
}

.services-container {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 25px;
    max-width: 1200px;
    margin: auto;
}

.service-card {
    position: relative;
    min-height: 260px;
    padding: 34px 30px 28px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 10px;
    overflow: hidden;
    transition:
        transform var(--transition),
        border-color var(--transition),
        box-shadow var(--transition);
}

.service-card::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: 0;
    width: 100%;
    height: 5px;
    background: var(--blue);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform var(--transition);
}

.service-card:hover {
    transform: translateY(-7px);
    border-color: var(--yellow);
    box-shadow: 0 18px 40px rgba(22, 66, 140, 0.12);
}

.service-card:hover::after {
    transform: scaleX(1);
}

.service-number {
    color: var(--red);
    font-size: 0.78rem;
    font-weight: 900;
    letter-spacing: 0.12em;
    margin-bottom: 30px;
}

.service-card h3 {
    color: var(--blue);
    font-size: 1.35rem;
    margin-bottom: 12px;
}

.service-card p {
    line-height: 1.65;
    margin-bottom: 22px;
}

.service-card a {
    color: var(--blue);
    font-size: 0.9rem;
    font-weight: 900;
}

.service-card a span {
    display: inline-block;
    margin-left: 5px;
    transition: transform var(--transition);
}

.service-card a:hover span {
    transform: translateX(5px);
}

.service-image-button {
    width: 100%;
    height: 190px;
    margin: 0 0 22px;
    padding: 0;
    border: 0;
    border-radius: 7px;
    overflow: hidden;
    background: #D9DDE3;
}

.service-image-button img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    transition: transform var(--transition);
}

.service-image-button:hover img,
.service-image-button:focus-visible img {
    transform: scale(1.03);
}

.service-image-viewer {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 21000;
    width: 100%;
    height: 100vh;
    height: 100svh;
    align-items: center;
    justify-content: center;
    padding: 60px 30px 95px;
    background: rgba(0, 0, 0, 0.96);
}

.service-image-viewer.active {
    display: flex;
}

.service-viewer-stage {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    touch-action: none;
}

#serviceViewerImage {
    max-width: 100%;
    max-height: 100%;
    width: auto;
    height: auto;
    object-fit: contain;
    transform: scale(1);
    transform-origin: center center;
    transition: transform 0.15s ease;
    user-select: none;
    -webkit-user-drag: none;
}

.service-viewer-close {
    position: absolute;
    top: 18px;
    right: 22px;
    z-index: 3;
}

.service-zoom-controls {
    position: absolute;
    left: 50%;
    bottom: 22px;
    z-index: 3;
    display: flex;
    gap: 10px;
    transform: translateX(-50%);
}

.service-image-viewer button {
    border: 1px solid rgba(255, 255, 255, 0.35);
    border-radius: 6px;
    padding: 10px 14px;
    background: rgba(255, 255, 255, 0.16);
    color: #FFFFFF;
    font-weight: 700;
}

body.service-viewer-open {
    overflow: hidden;
}


/* =====================================================
   19. GALLERY
===================================================== */

.gallery-section {
    background: var(--surface);
}

.gallery-section > p {
    text-align: center;
    margin-top: -20px;
    margin-bottom: 35px;
}

.gallery-container {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    max-width: 1300px;
    margin: auto;
}

.gallery-item {
    position: relative;
    height: 260px;
    overflow: hidden;
    border-radius: 10px;
    background: #DDDDDD;
    border: 2px solid transparent;
    cursor: pointer;
    transition: var(--transition);
}

/* Completely blank gallery slots. */

.gallery-item.gallery-placeholder {
    background: var(--background);
    border: 1px dashed var(--border);
    cursor: default;
}

.gallery-item.gallery-placeholder:hover {
    transform: none;
    border-color: var(--border);
}

/* Uploaded Supabase gallery photographs. */

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.gallery-item:not(.gallery-placeholder):hover {
    border-color: var(--yellow);
    transform: translateY(-5px);
}

.gallery-item:not(.gallery-placeholder):hover img {
    transform: scale(1.06);
}

/* Hidden positions are not displayed until Show More is clicked. */

.gallery-item.gallery-hidden,
.gallery-item[hidden] {
    display: none !important;
}

/* Show More Images button. */

.gallery-actions {
    display: flex;
    justify-content: center;
    margin-top: 32px;
}

.gallery-more-button {
    min-width: 190px;
    padding: 14px 24px;
    border: none;
    border-radius: 5px;
    background: var(--blue);
    color: white;
    font-weight: 900;
    transition: var(--transition);
}

.gallery-more-button:hover {
    background: var(--red);
    transform: translateY(-3px);
}

.gallery-more-button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}


/* =====================================================
   20. IMAGE VIEWER
===================================================== */

.image-viewer {
    display: none;
    position: fixed;
    inset: 0;
    width: 100%;
    height: 100vh;
    height: 100svh;
    background: rgba(0, 0, 0, 0.96);
    z-index: 20000;
    align-items: center;
    justify-content: center;
    padding: 60px 70px;
}

.image-viewer.active {
    display: flex;
}

#enlargedImage {
    max-width: 85%;
    max-height: 80vh;
    object-fit: contain;
    transition: transform 0.3s ease;
    transform-origin: center center;
    user-select: none;
    -webkit-user-drag: none;
}

.image-viewer button {
    border: none;
    color: white;
    background: rgba(255, 255, 255, 0.15);
    font-size: 25px;
    padding: 12px 17px;
    border-radius: 5px;
    position: relative;
    z-index: 2;
}

#closeViewer {
    position: absolute;
    top: 20px;
    right: 25px;
    font-size: 35px;
    z-index: 3;
}

#previousImage {
    position: absolute;
    left: 15px;
    top: 50%;
    z-index: 3;
}

#nextImage {
    position: absolute;
    right: 15px;
    top: 50%;
    z-index: 3;
}

.zoom-controls {
    position: absolute;
    bottom: 25px;
    display: flex;
    gap: 15px;
    z-index: 3;
}


/* =====================================================
   21. PRICING
===================================================== */

.pricing-section {
    background: var(--background);
    text-align: center;
}

.pricing-section p {
    font-size: 1.1rem;
    line-height: 1.8;
    margin-bottom: 25px;
}

.pricing-button {
    display: inline-block;
    padding: 15px 30px;
    background: var(--blue);
    color: white;
    border-radius: 5px;
    font-weight: bold;
    transition: var(--transition);
}

.pricing-button:hover {
    background: var(--red);
}


/* =====================================================
   22. CONTACT SECTION
===================================================== */

.contact-section {
    background: var(--surface);
    text-align: center;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px 24px;
}

.contact-section h2 {
    grid-column: 1 / -1;
}

.contact-item {
    max-width: 600px;
    width: 100%;
    margin: 15px auto;
    padding: 20px;
    background: var(--background);
    border: 1px solid var(--border);
    border-left: 5px solid var(--blue);
    border-radius: 7px;
    transition: var(--transition);
}

.contact-item:hover {
    border-left-color: var(--red);
    transform: translateY(-3px);
}

.contact-item h3 {
    color: var(--blue);
    margin-bottom: 10px;
}

.contact-item a {
    color: var(--text);
    font-weight: bold;
    overflow-wrap: anywhere;
}

.contact-item a:hover {
    color: var(--red);
}


/* =====================================================
   23. FOOTER
===================================================== */

.main-footer {
    background: #101010;
    color: white;
    padding: 40px 7%;
    text-align: center;
    border-top: 5px solid var(--yellow);
}

.main-footer h3 {
    color: #FFFFFF;
    font-size: 1.7rem;
    margin-bottom: 12px;
}

.main-footer p {
    margin: 10px 0;
    line-height: 1.6;
}


/* =====================================================
   24. ADMIN LOGIN BUTTON IN FOOTER
===================================================== */

#adminOpenButton {
    display: inline-block;
    margin-top: 20px;
    padding: 12px 24px;
    background: var(--blue);
    color: #FFFFFF;
    border: 2px solid var(--yellow);
    border-radius: 6px;
    font-size: 0.95rem;
    font-weight: 800;
    transition:
        background var(--transition),
        transform var(--transition);
}

#adminOpenButton:hover {
    background: var(--red);
    transform: translateY(-3px);
}

#adminOpenButton[aria-expanded="true"] {
    background: var(--red);
}


/* =====================================================
   25. ADMIN DASHBOARD SECTION
===================================================== */

#adminPanel {
    background: var(--surface);
    color: var(--text);
    min-height: 400px;
    border-top: 5px solid var(--blue);
    border-bottom: 5px solid var(--yellow);
}

/* Keep the dashboard completely hidden until opened. */

#adminPanel[hidden],
#adminLoginView[hidden],
#adminDashboardView[hidden] {
    display: none !important;
}

#adminPanel h2 {
    color: var(--blue);
    text-align: center;
    font-size: clamp(1.7rem, 4vw, 2.3rem);
    margin-bottom: 18px;
}

#adminPanel > p {
    max-width: 750px;
    margin: 0 auto 28px;
    text-align: center;
    line-height: 1.7;
    color: var(--text);
}

/* Dashboard content area. */

#adminLoginView,
#adminDashboardView {
    width: 100%;
    max-width: 850px;
    margin: 25px auto 0;
    padding: 30px;
    background: var(--background);
    color: var(--text);
    border: 1px solid var(--border);
    border-top: 4px solid var(--blue);
    border-radius: 10px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.06);
}

#adminLoginView h3,
#adminDashboardView h3 {
    color: var(--blue);
    font-size: 1.35rem;
    margin-bottom: 18px;
}

#adminDashboardView > p {
    line-height: 1.7;
    margin-bottom: 20px;
}


/* =====================================================
   26. ADMIN STATUS MESSAGES
===================================================== */

#adminMessage,
#uploadStatus {
    width: 100%;
    max-width: 850px;
    margin: 15px auto;
    padding: 12px 15px;
    border-radius: 6px;
    line-height: 1.6;
    overflow-wrap: anywhere;
}

#adminMessage:empty,
#uploadStatus:empty {
    display: none;
}

#adminMessage.status-success,
#uploadStatus.status-success {
    color: #155724;
    background: #D4EDDA;
    border-left: 4px solid #28A745;
}

#adminMessage.status-error,
#uploadStatus.status-error {
    color: #721C24;
    background: #F8D7DA;
    border-left: 4px solid #DC3545;
}


/* =====================================================
   27. ADMIN LOGIN FORM
===================================================== */

#adminLoginForm {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

#adminLoginForm label {
    display: block;
    font-size: 0.95rem;
    font-weight: 800;
    color: var(--text);
}

#adminLoginForm input {
    display: block;
    width: 100%;
    min-height: 48px;
    padding: 12px 14px;
    border: 1px solid var(--border);
    border-radius: 6px;
    outline: none;
    background: var(--surface);
    color: var(--text);
    font-size: 1rem;
    transition: border-color var(--transition);
}

#adminLoginForm input:focus {
    border-color: var(--blue);
}

#adminLoginButton {
    width: 100%;
    min-height: 48px;
    margin-top: 10px;
    padding: 12px 20px;
    background: var(--blue);
    color: #FFFFFF;
    border: none;
    border-radius: 6px;
    font-size: 1rem;
    font-weight: 800;
    transition: background var(--transition);
}

#adminLoginButton:hover {
    background: var(--red);
}


/* =====================================================
   28. ADMIN IMAGE UPLOAD FORM
===================================================== */

#galleryUploadForm {
    display: flex;
    flex-direction: column;
    gap: 15px;
    padding: 22px;
    margin: 20px 0;
    background: var(--surface);
    border: 1px dashed var(--blue);
    border-radius: 8px;
}

#galleryUploadForm label {
    font-weight: 800;
    color: var(--text);
}

#adminImageInput {
    width: 100%;
    min-height: 55px;
    padding: 14px;
    background: var(--background);
    color: var(--text);
    border: 1px solid var(--border);
    border-radius: 6px;
}

#uploadGalleryButton {
    width: 100%;
    min-height: 48px;
    padding: 12px 20px;
    background: var(--red);
    color: #FFFFFF;
    border: none;
    border-radius: 6px;
    font-size: 1rem;
    font-weight: 800;
    transition: background var(--transition);
}

#uploadGalleryButton:hover {
    background: var(--blue);
}

#uploadGalleryButton:disabled {
    opacity: 0.6;
}


/* =====================================================
   29. ADMIN GALLERY IMAGE MANAGEMENT
===================================================== */

#adminGalleryList {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
    width: 100%;
    margin: 25px 0;
}

.admin-gallery-item {
    min-width: 0;
    padding: 12px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 8px;
    overflow: hidden;
}

.admin-gallery-item img {
    width: 100%;
    height: 180px;
    object-fit: cover;
    border-radius: 5px;
    background: var(--background);
}

.admin-gallery-item p {
    margin: 12px 0;
    font-size: 0.85rem;
    line-height: 1.5;
    overflow-wrap: anywhere;
    color: var(--text);
}

.admin-delete-image-button {
    display: block;
    width: 100%;
    min-height: 42px;
    padding: 10px 14px;
    background: var(--red);
    color: #FFFFFF;
    border: none;
    border-radius: 5px;
    font-weight: 800;
    transition: background var(--transition);
}

.admin-delete-image-button:hover {
    background: var(--black);
}


/* =====================================================
   30. ADMIN LOGOUT BUTTON
===================================================== */

#adminLogoutButton {
    display: block;
    width: 100%;
    min-height: 48px;
    margin-top: 25px;
    padding: 12px 20px;
    background: var(--black);
    color: #FFFFFF;
    border: none;
    border-radius: 6px;
    font-size: 1rem;
    font-weight: 800;
    transition: background var(--transition);
}

#adminLogoutButton:hover {
    background: var(--red);
}


/* =====================================================
   31. ADMIN CLOSE BUTTON
===================================================== */

#closeAdminPanel {
    display: block;
    margin: 0 auto 25px;
    padding: 10px 18px;
    background: var(--black);
    color: #FFFFFF;
    border: none;
    border-radius: 5px;
    font-weight: 800;
    transition: background var(--transition);
}

#closeAdminPanel:hover {
    background: var(--red);
}


/* =====================================================
   32. RESPONSIVE TABLETS
===================================================== */

@media screen and (max-width: 1100px) {

    .main-header {
        flex-wrap: wrap;
    }

    #mainNavigation {
        gap: 13px;
    }

    #mainNavigation a {
        font-size: 0.85rem;
    }

    .header-search input {
        width: 150px;
    }

    .gallery-container {
        grid-template-columns: repeat(2, 1fr);
    }

}


/* =====================================================
   33. RESPONSIVE MOBILE PHONES
===================================================== */

@media screen and (max-width: 768px) {

    section {
        padding: 60px 5%;
    }

    section h2 {
        font-size: 1.8rem;
    }

    .service-image-button {
        height: 170px;
    }

    .service-image-viewer {
        padding: 55px 12px 90px;
    }

    .service-zoom-controls {
        width: calc(100% - 24px);
        justify-content: center;
    }

    .service-zoom-controls button {
        flex: 1;
        max-width: 120px;
        padding: 9px 6px;
        font-size: 0.82rem;
    }

    .intro-content {
        width: 100%;
        padding: 15px 3%;
        min-height: 50vh;
    }

    .intro-best {
        font-size: clamp(4rem, 17vw, 7rem);
    }

    .intro-name {
        gap: 7px;
        flex-wrap: wrap;
    }

    .intro-painters,
    .intro-ug {
        font-size: clamp(2rem, 9vw, 4rem);
    }

    .intro-slogan {
        padding: 15px 5px;
        margin-top: 18px;
    }

    .intro-slogan span {
        font-size: clamp(0.85rem, 3.7vw, 1.5rem);
        white-space: normal;
        line-height: 1.35;
    }

    .uganda-stripes {
        margin-top: 15px;
    }


    /* HEADER */

    .main-header {
        min-height: 70px;
        padding: 10px 4%;
        gap: 10px;
    }

    .header-logo img {
        width: 75px;
        height: 50px;
    }

    #menuToggle {
        display: block;
    }

    #mainNavigation {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background: var(--background);
        flex-direction: column;
        align-items: stretch;
        padding: 15px 5%;
        gap: 0;
        border-bottom: 3px solid var(--blue);
        z-index: 1001;
        max-height: calc(100svh - 70px);
        overflow-y: auto;
    }

    #mainNavigation.active {
        display: flex;
    }

    #mainNavigation a {
        padding: 14px 5px;
        border-bottom: 1px solid var(--border);
        font-size: 1rem;
    }

    .header-search {
        order: 3;
        width: 100%;
    }

    .header-search input {
        width: 100%;
        min-width: 0;
    }

    #themeToggle {
        padding: 9px 10px;
        font-size: 0.8rem;
    }


    /* HERO */

    .hero-section {
        min-height: clamp(440px, 68svh, 620px);
    }

    .hero-content {
        padding: 24px 18px;
    }

    .hero-content h1 {
        font-size: 2.4rem;
    }

    .hero-button {
        padding: 12px 17px;
        font-size: 0.9rem;
    }


    /* SERVICES */

    .services-container {
        grid-template-columns: 1fr;
    }

    .about-content {
        grid-template-columns: 1fr;
        gap: 24px;
    }

    .about-copy {
        text-align: center;
    }

    .about-highlights {
        text-align: left;
    }

    .about-banner {
        max-height: 260px;
    }


    /* CONTACT */

    .contact-section {
        grid-template-columns: 1fr;
    }


    /* GALLERY */

    .gallery-container {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 12px;
    }

    .gallery-item {
        height: 180px;
    }


    /* IMAGE VIEWER */

    .image-viewer {
        padding: 55px 15px;
        overflow: hidden;
    }

    #enlargedImage {
        max-width: 95%;
        max-height: 70vh;
    }

    #previousImage {
        left: 5px;
    }

    #nextImage {
        right: 5px;
    }

    .image-viewer button {
        padding: 10px 13px;
    }


    /* ADMIN DASHBOARD */

    #adminPanel {
        padding: 45px 5%;
    }

    #adminLoginView,
    #adminDashboardView {
        padding: 22px 17px;
    }

    #adminGalleryList {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 12px;
    }

    .admin-gallery-item img {
        height: 140px;
    }

}


/* =====================================================
   34. SMALL MOBILE PHONES
===================================================== */

@media screen and (max-width: 400px) {

    .intro-content {
        padding-left: 10px;
        padding-right: 10px;
    }

    .intro-best {
        font-size: 3.6rem;
    }

    .intro-name {
        gap: 4px;
    }

    .intro-painters,
    .intro-ug {
        font-size: 1.9rem;
    }

    .intro-slogan {
        width: 100%;
    }

    .intro-slogan span {
        font-size: clamp(0.72rem, 3.5vw, 0.9rem);
    }

    .gallery-item {
        height: 145px;
    }

    .gallery-container {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .hero-content h1 {
        font-size: 2rem;
    }

    .main-header {
        gap: 8px;
    }

    .header-search button {
        padding-left: 10px;
        padding-right: 10px;
    }

    #adminPanel {
        padding: 35px 4%;
    }

    #adminLoginView,
    #adminDashboardView {
        padding: 18px 13px;
    }

    #adminGalleryList {
        grid-template-columns: 1fr;
    }

    .admin-gallery-item img {
        height: 190px;
    }

}


/* =====================================================
   35. ACCESSIBILITY
===================================================== */

.visually-hidden {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    padding: 0 !important;
    margin: -1px !important;
    overflow: hidden !important;
    clip: rect(0, 0, 0, 0) !important;
    white-space: nowrap !important;
    border: 0 !important;
}

a:focus-visible,
button:focus-visible,
input:focus-visible,
#imageViewer:focus-visible {
    outline: 3px solid var(--yellow);
    outline-offset: 3px;
}

@media (prefers-reduced-motion: reduce) {

    *,
    *::before,
    *::after {
        scroll-behavior: auto !important;
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }

    .intro-best span,
    .intro-painters span,
    .intro-ug,
    .intro-slogan,
    .uganda-stripes {
        animation-delay: 0s !important;
    }

}

