
/* =====================================================
   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;
}

/* DARK MODE VARIABLES */

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;
}

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%;
}

/* PAINTERS */

.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;
}

/* UG */

.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 BUTTONS */

.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;
}

/* =====================================================
   18. SERVICES
===================================================== */

.services-section {
    background: var(--background);
}

.services-container {
    display: grid;
    grid-template-columns: repeat(3, 1fr);

    gap: 25px;

    max-width: 1200px;
    margin: auto;
}

/* =====================================================
   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 {
    height: 260px;

    overflow: hidden;
    border-radius: 10px;

    background: #DDDDDD;
    border: 2px solid transparent;

    cursor: pointer;
    transition: var(--transition);
}

.gallery-item:hover {
    border-color: var(--yellow);
    transform: translateY(-5px);
}

.gallery-item img {
    width: 100%;
    height: 100%;

    object-fit: cover;
    transition: transform 0.5s ease;
}

.gallery-item:hover img {
    transform: scale(1.06);
}

/* =====================================================
   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;
}

.contact-item {
    max-width: 600px;
    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. 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);
    }

}

/* =====================================================
   25. RESPONSIVE MOBILE PHONES
===================================================== */

@media screen and (max-width: 768px) {

    section {
        padding: 60px 5%;
    }

    section h2 {
        font-size: 1.8rem;
    }

    /* INTRODUCTION */

    .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;
    }

    /* SEARCH */

    .header-search {
        order: 3;
        width: 100%;
    }

    .header-search input {
        width: 100%;
        min-width: 0;
    }

    /* THEME BUTTON */

    #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-banner {
        max-height: 260px;
    }

    /* 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;
    }

}

/* =====================================================
   26. 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;
    }

}

/* =====================================================
   27. 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;
    }

}
