/* ============================================================================
   KTCIS.COM - Index04 Stylesheet
   Professional website for KTC Integrated Systems - Grid Layout Version
   ============================================================================ */

/* Reset and Base Styles
   ============================================================================ */
html {
    height: auto;
    min-height: 100%;
    width: 100%;
    overflow-x: hidden;
}

body {
    color: #063c7d;
    margin: 0;
    padding: 0;
    min-height: 100vh;
    font-family: 'Segoe UI', Arial, sans-serif;
    font-size: 1em;
    background: #e3f2fd;
    overflow-y: auto !important;
}

/* Canvas Elements - Background Animations
   ============================================================================ */
#scene {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: 0;
    display: block;
    pointer-events: none;
}

/* Main Content Container
   ============================================================================ */
.about-ktc {
    position: relative;
    margin: 48px auto 40px auto;
    max-width: 700px;
    padding: 28px 28px;
    background: rgba(255, 255, 255, 0.82);
    border-radius: 14px;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.12);
    z-index: 10;
    display: flex;
    flex-direction: column;
    text-align: justify;
    border: 1px solid rgba(255, 255, 255, 0.3);
}

/* Typography
   ============================================================================ */
p {
    margin: 1em 0 0 0;
    line-height: 1.48;
    font-size: 1em;
    text-shadow: 0 1px 2px rgba(255, 255, 255, 0.2);
    font-weight: 400;
    letter-spacing: 0.3px;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.6), rgba(255, 255, 255, 0));
    padding: 1em 1em 1em 1em;
    border-radius: 8px 8px 0px 0px;
    box-shadow: 0 -2px 2px rgba(0, 0, 0, 0.1);
    border: 1px 1px 0px 1px solid rgba(255, 255, 255, 0.6);
}

.about-ktc strong {
    font-weight: 700;
    text-shadow: 0 1px 3px rgba(255, 255, 255, 0.9);
    padding: 1px 3px;
    border-radius: 3px;
}

/* Header Section
   ============================================================================ */
.ktc-header {
    text-align: center;
}

.ktc-header h1 {
    font-size: 1.88em;
    text-shadow: 0 2px 12px #fff8, 0 1px 0 #fff;
    margin: 0;
}

.ktc-tagline {
    font-size: 1.08em;
    font-weight: 500;
    text-shadow: 0 1px 0 #fff;
    margin: 0;
}

.ktc-header-flex {
    display: flex;
    align-items: center;
    justify-content: center;
}

/* KTC Logo */
.ktc-logo {
    width: 100px;
    height: 100px;
    display: block;
    margin-right: 6px;
    filter: drop-shadow(0 3px 8px rgba(25, 118, 210, 0.35));
}

/* Canvas Elements - Clouds
   ============================================================================ */
#clouds-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 220px;
    pointer-events: none;
    z-index: 2;
}

/* Kyle Cole Profile Image
   ============================================================================ */
#kyle-img {
    float: left;
    margin: 0 10px 0 0;
    width: 160px;
    border-radius: 10px;
    box-shadow: 8px 8px 22px #1976d255;
    border: 2px solid #fff;
    transition: none;
    cursor: pointer;
    filter: blur(0px);
    transform: scale(1);
}

#kyle-img:hover {
    animation: hoverEnlarge 0.3s ease-in-out forwards;
}

#kyle-img:not(:hover) {
    animation: hoverShrink 0.3s ease-in-out forwards;
}

/* Image Hover Animations
   ============================================================================ */
@keyframes hoverEnlarge {
    0% {
        filter: blur(0px);
        transform: scale(1);
    }

    30% {
        filter: blur(4px);
        transform: scale(1.3);
    }

    70% {
        filter: blur(4px);
        transform: scale(2.0);
    }

    100% {
        filter: blur(0px);
        transform: scale(2.2);
        box-shadow: 15px 15px 40px #1976d290;
        z-index: 10;
        position: relative;
    }
}

@keyframes hoverShrink {
    0% {
        filter: blur(0px);
        transform: scale(2.2);
        box-shadow: 15px 15px 40px #1976d290;
    }

    30% {
        filter: blur(4px);
        transform: scale(1.5);
    }

    70% {
        filter: blur(4px);
        transform: scale(1.1);
    }

    100% {
        filter: blur(0px);
        transform: scale(1);
        box-shadow: 8px 8px 22px #1976d255;
        z-index: 1;
        position: static;
    }
}

/* Mosaic Grid - Technical Specialties
   ============================================================================ */
.mosaic-container {
    display: grid;
    grid-template-columns: 1fr;
    margin: 0em 0em 1em 0em;
    padding: 0;
}

.mosaic-item {
    display: flex;
    align-items: center;
    gap: 1em;
    padding: 0em 0em 0em 0em;
    border: none;
    background: transparent;
    box-shadow: none;
    transition: none;
    backdrop-filter: none;
}

.mosaic-item:hover {
    transform: none;
    box-shadow: none;
    background: transparent;
}

.mosaic-item .mosaic-icon-wrap {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 50px;
    height: 50px;
    border-radius: 0;
    flex-shrink: 0;
    background: transparent;
}

.mosaic-item .mosaic-icon {
    width: 50px;
    height: 50px;
    display: block;
    filter: brightness(0) saturate(100%) invert(19%) sepia(100%) saturate(1500%) hue-rotate(208deg) brightness(95%) contrast(95%);
    opacity: 0.4;
}

.mosaic-text {
    flex: 1;
    font-size: 1em;
    line-height: 1.4;
    font-weight: 500;
    text-align: left;
    opacity: 0.9;
}

.mosaic-item[data-mosaic="enterprise"] {
    border: none;
    background: transparent;
}

.mosaic-item[data-mosaic="network"] {
    border: none;
    background: transparent;
}

/* Tech Help - Remote Assistance
   ============================================================================ */
.techhelp {
    justify-content: center;
    align-items: center;
    margin-left: 1.6em;
}

.techhelp-link {
    text-decoration: none;
}

.techhelp-link:hover #techhelp-svg,
.techhelp-link:focus #techhelp-svg,
.techhelp-link:hover #hostmodule-svg,
.techhelp-link:focus #hostmodule-svg {
    transform: scale(1.02);
    filter: drop-shadow(0 0px 16px #1976d2aa) brightness(1.2);
    transition: transform 1s cubic-bezier(.25, 0.1, .25, 1), filter 1s;
}

/* Contact Section
   ============================================================================ */
.ktc-contact {
    border-top: 1px solid #90caf9;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    font-size: 0.86em;
    flex-wrap: wrap;
    width: 100%;
    background: url('images/palms2-v2.webp') no-repeat center center;
    background-size: contain;
    margin: 2em 0 0 0;
    padding: 1.4em 0 0 0;
}

.ktc-contact img {
    display: inline;
    vertical-align: middle;
}

.ktc-contact a {
    color: #063c7d;
    text-decoration: none;
}

/* Footer
   ============================================================================ */
.ktc-copyright {
    color: #789;
    font-size: 0.74em;
    text-align: center;
    margin: 0.4em 0 0 0;
}

/* Responsive Design
   ============================================================================ */
@media (max-width: 768px) {
    .mosaic-container {
        gap: 1em;
    }

    .mosaic-item {
        gap: 0.8em;
    }

    .mosaic-item .mosaic-icon-wrap {
        width: 40px;
        height: 40px;
    }

    .mosaic-item .mosaic-icon {
        width: 40px;
        height: 40px;
    }

    /* Header: keep the title compact so it stays on two lines */
    .ktc-logo {
        width: 68px;
        height: 68px;
    }

    .ktc-header h1 {
        font-size: 1.3em;
    }

    .ktc-tagline {
        font-size: 0.9em;
    }

    /* Profile photo: expand rightward into view, not off the left edge */
    #kyle-img {
        transform-origin: left center;
    }
}

/* 37-Year Event Slideshow Popup
   ============================================================================ */
.years-37-wrap {
    position: relative;
    display: inline-block;
}

/* "37" is not highlighted — it reads as ordinary text and does not change
   on hover or click. */
.years-37 {
    color: inherit;
    font-weight: inherit;
}

/* Event slideshow popup, anchored just below the "37" */
.event-pop {
    position: absolute;
    top: 100%;
    left: 50%;
    width: 320px;
    padding-top: 9px;          /* transparent bridge from "37" down to the card */
    z-index: 200;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transform: translateX(-50%) translateY(6px);
    transition: opacity 0.22s ease, transform 0.22s ease, visibility 0.22s;
}

.event-pop.open {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: translateX(-50%) translateY(0);
}

.event-pop-card {
    display: block;
    padding: 15px 17px 14px 17px;
    background: linear-gradient(180deg, #ffffff, #eef6fd);
    border: 1px solid rgba(25, 118, 210, 0.28);
    border-radius: 13px;
    box-shadow: 0 14px 38px rgba(6, 24, 56, 0.34);
    text-align: left;
}

/* Only the event text fades when the slideshow swaps years — the footer
   counter and progress line stay put and keep running. */
.event-pop-body {
    display: block;
    transition: opacity 0.24s ease;
}

.event-pop-body.fading {
    opacity: 0;
}

.event-pop-year {
    display: block;
    font-size: 1.42em;
    font-weight: 700;
    line-height: 1.1;
    color: #1565c0;
}

.event-pop-event {
    display: block;
    margin-top: 3px;
    font-weight: 700;
    font-size: 0.99em;
    line-height: 1.34;
    color: #063c7d;
}

.event-pop-why {
    display: block;
    margin-top: 5px;
    font-size: 0.9em;
    line-height: 1.46;
    color: #45566e;
}

.event-pop-src {
    display: inline-block;
    margin-top: 8px;
    font-size: 0.84em;
    font-weight: 600;
    color: #1976d2;
    text-decoration: none;
}

.event-pop-src:hover {
    text-decoration: underline;
}

/* footer: a "days until today's date" countdown and a notched progress line */
.event-pop-next {
    display: block;
    margin-top: 11px;
    padding-top: 9px;
    border-top: 1px solid rgba(25, 118, 210, 0.16);
}

.event-pop-count {
    display: block;
    margin-bottom: 5px;
    font-size: 0.76em;
    font-weight: 700;
    letter-spacing: 0.4px;
    text-transform: uppercase;
    color: #5b6b82;
    font-variant-numeric: tabular-nums;
}

.event-pop-track {
    position: relative;
    display: block;
    height: 7px;
    border-radius: 3px;
    background: rgba(25, 118, 210, 0.15);
    overflow: hidden;
}

/* One notch per year, drawn on top of the fill — JS sets --years. */
.event-pop-track::after {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;
    background-image: repeating-linear-gradient(90deg,
        rgba(255, 255, 255, 0.9) 0, rgba(255, 255, 255, 0.9) 1px,
        transparent 1px, transparent calc(100% / var(--years, 38)));
}

/* The progress line: one solid colour, pinned to the right edge. JS shrinks
   its width from 100% to 0% so it empties from left to right. */
.event-pop-fill {
    position: absolute;
    top: 0;
    right: 0;
    height: 100%;
    width: 100%;
    background: #1976d2;
}

/* Touch devices: no hover, so the popup is tap-triggered and centred on
   screen over a dimmed backdrop rather than anchored under the "37". */
@media (hover: none) {
    .years-37 {
        padding: 1px 3px;
    }

    .event-pop {
        position: fixed;
        top: 44%;
        left: 50%;
        width: min(340px, 92vw);
        padding-top: 0;
        transform: translate(-50%, -50%) scale(0.96);
    }

    .event-pop.open {
        transform: translate(-50%, -50%) scale(1);
    }

    .event-pop::before {
        content: "";
        position: fixed;
        inset: 0;
        z-index: -1;
        background: rgba(6, 24, 56, 0.55);
    }
}