/* ==========================================================================
   Components: reusable UI pieces
   ========================================================================== */

/* ------------------------------ Logos & images --------------------------- */

#logo_img_aipowered {
    width: 300px;
    height: auto;
    margin-bottom: 20px;
}

#logo_img_intellihoma {
    width: 150px;
    height: auto;
    margin-bottom: 1px;
}

#logo_img_custom {
    width: 160px;
    height: auto;
    margin-bottom: 20px;
}

#app_snapshot_img_amanda {
    width: 80%;
    height: auto;
    margin-bottom: 20px;
    box-shadow: 0 16px 16px rgba(0, 0, 0, 0.8);
    -moz-border-radius: 10px;
    border-radius: 15px;
}

/* ------------------------------ Feature cards ---------------------------- */

.features {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 30px;
    margin-top: 30px;
    width: 100%;
}

.features--alarm {
    margin-bottom: 50px;
}

.features-break {
    width: 100%;
}

.feature {
    background-color: var(--surface);
    border-radius: 8px;
    padding: 20px;
    width: 22%;
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.3);
    margin-bottom: 20px;
    transition: box-shadow 0.3s ease;
    box-sizing: border-box;
    text-align: center;
    display: flex;
    justify-content: center;
    flex-direction: column;
    align-items: center;
}

.feature:hover {
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.4);
}

.feature p {
    font-size: 1em;
}

.feature img {
    width: 70px;
    height: auto;
    margin-bottom: 10px;
}

/* ------------------------------ Download buttons ------------------------- */

.download-box {
    display: inline-block;
    background-color: var(--button-bg);
    color: #ffffff;
    padding: 10px 20px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: bold;
    margin: 10px 0;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
    transition: box-shadow 0.3s ease;
}

.download-box a {
    color: white;
    text-decoration: none;
    font-weight: bold;
    display: flex;
    align-items: center;
    flex-direction: row-reverse;
}

.download-box a img {
    margin-left: 10px;
}

.download-box a:hover {
    color: var(--highlight);
}

.download-box img {
    width: 20px;
    height: 20px;
    margin-left: 10px;
}

.download-box.shiny-download {
    position: relative;
    overflow: hidden;
}

.download-box.shiny-download::after {
    content: "";
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(
            90deg,
            transparent 0%,
            rgba(255, 255, 255, 0.6) 50%,
            transparent 100%
    );
    animation: hv-wash 2.2s cubic-bezier(0.4, 0, 0.2, 1) infinite;
    pointer-events: none;
}

@keyframes hv-wash {
    0% {
        left: -100%;
    }
    55% {
        left: 100%;
    }
    100% {
        left: 100%;
    }
}

/* ------------------------------ Slider ----------------------------------- */

.slider-container {
    position: relative;
    height: 400px;
    margin: auto;
    overflow: hidden;
}

.slider {
    display: flex;
    align-items: center;
    overflow-x: auto;
    transition: transform 0.5s ease-in-out;
    gap: 1px;
}

.slider-box {
    display: table-column-group;
    justify-content: center;
    align-items: center;
    height: 220px;
    min-width: 250px;
    background: white;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
    border-radius: 10px;
    padding: 50px 20px;
    transition: transform 0.3s ease;
    margin: 30px 20px;
    scrollbar-width: none;
    /* For Firefox */
}

.slider::-webkit-scrollbar {
    display: none;
    /* For Chrome, Safari, Edge */
}

.slider-box:hover {
    transform: scale(1.05);
}

.slider-box img {
    width: 110px;
    height: 110px;
    margin-bottom: 10px;
}

.slider-title {
    font-size: 0.9em;
    font-weight: bold;
    color: var(--ink);
}

/* Slider navigation buttons */
.prev-btn,
.next-btn {
    position: absolute;
    top: 40%;
    transform: translateY(-50%);
    background: rgba(0, 0, 0, 0.5);
    color: white;
    border: none;
    font-size: 12px;
    padding: 10px;
    cursor: pointer;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.3s;
    z-index: 10;
}

.prev-btn:hover,
.next-btn:hover {
    background: rgba(0, 0, 0, 0.8);
}

.prev-btn {
    left: 10px;
}

.next-btn {
    right: 10px;
}

/* ------------------------------ Tracking app ----------------------------- */

.amanda_tracking_app {
    position: relative;
    width: 10%;
    min-width: 100px;
    max-width: 200px;
    margin: 0 auto 20px;
    display: inline-block;
}

.tracking-app-base {
    width: 100%;
    height: auto;
    display: block;
}

.tracking-app-overlay {
    position: absolute;
    width: 85%;
    height: auto;
    top: 3%;
    right: 11%;
    transform-origin: center;
    transition: transform 1.5s ease-in-out;
    transform: rotate(0deg);
}

.amanda_tracking_app:hover .tracking-app-overlay {
    transform: rotate(180deg);
}

/* ------------------------------ Gallery ---------------------------------- */

.image-thumbnail-gallery {
    padding: 1rem;
    width: clamp(360px, 90vw, 1100px);
    margin: 0 auto;
    display: flex;
    flex-flow: column;
    gap: 1rem;
    position: relative;
    align-items: center;
}

.image-display {
    width: 100%;
    max-width: 100%;
    aspect-ratio: 15.8/9.5;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 0.375em 0.67em rgba(0, 0, 0, 0.3), 0 0.5em 1.3em rgba(0, 0, 0, 0.2);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    cursor: pointer;
}

.image-display:hover {
    transform: scale(1.02);
    box-shadow: 0 0.5em 1em rgba(0, 0, 0, 0.4), 0 0.7em 1.8em rgba(0, 0, 0, 0.3);
}

.screen {
    height: 100%;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #2a2a2a;
    position: relative;
    user-select: none;
}

.screen a {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.screen img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.thumbnail-gallery {
    display: flex;
    gap: 0.75rem;
    height: 100%;
    width: 100%;
}

.gallery__btn {
    flex: 1 0 max(2.75rem, 5.834%);
    background: transparent;
    border: 1px solid transparent;
    cursor: pointer;
    display: flex;
    align-items: center;
}

.gallery__btn:hover .arrow-icon {
    fill: #2e2e2e;
}

.gallery__btn:disabled {
    opacity: 0.1;
    pointer-events: none;
}

.arrow-icon {
    margin-inline: auto;
    outline: none;
    border: 0;
    scale: 1;
    display: inline-grid;
    width: max(80%, 1.5rem);
    height: max(80%, 1.5rem);
    fill: #757575;
    transition: fill 0.3s ease;
}

.gallery__slider {
    height: 100px;
    user-select: none;
    flex-grow: 999;
    list-style: none;
    display: flex;
    gap: 0.75rem;
    padding: 0.5rem;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scrollbar-width: none;
}

.gallery__slider::-webkit-scrollbar {
    display: none;
}

.gallery__slide {
    cursor: pointer;
    border-radius: 6px;
    overflow: hidden;
    scroll-snap-align: center;
    flex: 1 0 calc((100% / 8) - 10px);
    transition: all 0.3s ease;
}

.gallery__slide:hover {
    transform: scale(1.05);
}

.gallery__slide.active {
    outline: 0.2em solid #df1be2;
}

.thumbnail {
    width: 100%;
    height: 100%;
}

.thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
