﻿/* =========================
   Futuristic Page Background
   ========================= */
body {
    background: linear-gradient(135deg, #e0f7ff, #ffffff, #f0f8ff);
    background-size: 400% 400%;
    animation: gradientShift 20s ease infinite;
    min-height: 100vh;
    color: #111; /* text color for readability */
    padding-top: 72px; /* typical Bootstrap navbar height; adjust if yours is taller */
}

@keyframes gradientShift {
    0% {
        background-position: 0% 50%;
    }

    50% {
        background-position: 100% 50%;
    }

    100% {
        background-position: 0% 50%;
    }
}

/* Subtle futuristic lines overlay */
body::after {
    content: "";
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: linear-gradient(to right, rgba(0,200,255,0.05) 1px, transparent 1px), linear-gradient(to bottom, rgba(0,200,255,0.05) 1px, transparent 1px);
    background-size: 50px 50px;
    pointer-events: none;
    z-index: 0;
}

/* =========================
   General Validation Styles
   ========================= */
.valid.modified:not([type=checkbox]) {
    outline: 1px solid #26b050;
}

.invalid {
    outline: 1px solid red;
}

.validation-message {
    color: red;
}

/* Blazor error UI */
#blazor-error-ui {
    background: lightyellow;
    bottom: 0;
    box-shadow: 0 -1px 2px rgba(0,0,0,0.2);
    display: none;
    left: 0;
    padding: 0.6rem 1.25rem 0.7rem 1.25rem;
    position: fixed;
    width: 100%;
    z-index: 1000;
}

    #blazor-error-ui .dismiss {
        cursor: pointer;
        position: absolute;
        right: 0.75rem;
        top: 0.5rem;
    }

/* =========================
   Loading Spinner
   ========================= */
.loading-progress {
    position: relative;
    display: block;
    width: 8rem;
    height: 8rem;
    margin: 20vh auto 1rem auto;
}

    .loading-progress circle {
        fill: none;
        stroke: #e0e0e0;
        stroke-width: 0.6rem;
        transform-origin: 50% 50%;
        transform: rotate(-90deg);
    }

        .loading-progress circle:last-child {
            stroke: #1b6ec2;
            stroke-dasharray: calc(3.141 * var(--blazor-load-percentage, 0%) * 0.8), 500%;
            transition: stroke-dasharray 0.05s ease-in-out;
        }

.loading-progress-text {
    position: absolute;
    text-align: center;
    font-weight: bold;
    inset: calc(20vh + 3.25rem) 0 auto 0.2rem;
}

    .loading-progress-text:after {
        content: var(--blazor-load-percentage-text, "Loading");
    }

/* =========================
   Code Styling
   ========================= */
code {
    color: #c02d76;
}

/* =========================
   Media Photo / Thumbnail
   ========================= */
.media-thumb {
    object-fit: cover;
}

.media-photo {
    width: 100%;
    height: 180px;
    object-fit: cover;
    border-radius: 6px;
    cursor: pointer;
    transition: transform 0.2s ease;
}

    .media-photo:hover {
        transform: scale(1.03);
    }

/* Video thumbnail wrapper — compatible with Bootstrap .ratio */
.video-thumbnail-wrapper {
    display: block; /* was inline-block; block works better with .ratio */
    width: 100%;
    position: relative; /* .ratio also uses relative; this is fine */
    cursor: pointer;
    overflow: hidden; /* keeps hover zoom tidy */
}

    .video-thumbnail-wrapper .media-photo {
        height: 100% !important; /* override the global 180px inside ratio box */
        width: 100%;
        object-fit: cover;
        border-radius: 0; /* wrapper/card controls rounding */
    }

/* Play icon overlay */
.play-icon {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 60px;
    height: 60px;
    background-color: rgba(0,0,0,0.6);
    border-radius: 50%;
    color: white;
    font-size: 2rem;
    line-height: 60px;
    text-align: center;
    text-shadow: 0 2px 6px rgba(0,0,0,0.6);
    pointer-events: none;
    transition: transform 0.2s ease, background-color 0.2s ease;
}

.video-thumbnail-wrapper:hover .play-icon {
    transform: translate(-50%, -50%) scale(1.2);
    background-color: rgba(0,0,0,0.8);
}

/* =========================
   Card Hover & Glow
   ========================= */
.card-hover-lift {
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
    border: 1px solid rgba(0,200,255,0.2);
    background-color: rgba(255,255,255,0.85);
}

    .card-hover-lift:hover {
        transform: translateY(-4px);
        box-shadow: 0 6px 20px rgba(0,200,255,0.3), 0 0 12px rgba(0,200,255,0.2);
        border-color: rgba(0,200,255,0.5);
    }

/* =========================
   Category Badges with Pulse (for badges on cards)
   ========================= */
.category-badge {
    border: 1px solid rgba(0,0,0,0.7);
    background-color: rgba(255,255,255,0.9);
    padding: 0.25rem 0.5rem;
    font-size: 0.85rem;
    font-weight: 500;
    cursor: default;
    border-radius: 12px;
    transition: transform 0.1s ease, box-shadow 0.2s ease, background-color 0.2s ease, border-color 0.2s ease;
    animation: badgePulse 2s ease-in-out infinite;
}

    .category-badge:hover {
        transform: translateY(-1px);
        box-shadow: 0 2px 6px rgba(0,200,255,0.3);
        background-color: rgba(255,255,255,1);
        border-color: rgba(0,200,255,0.5);
    }

@keyframes badgePulse {
    0%, 100% {
        box-shadow: 0 1px 3px rgba(0,0,0,0.1);
        border-color: rgba(0,0,0,0.7);
        background-color: rgba(255,255,255,0.9);
    }

    50% {
        box-shadow: 0 1px 6px rgba(0,200,255,0.3);
        border-color: rgba(0,200,255,0.5);
        background-color: rgba(255,255,255,1);
    }
}

/* =========================
   FILTER CHIPS (toolbar)
   ========================= */
/* Base chip look (colors come from @GetCategoryClasses + .border utilities) */
.filter-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    cursor: pointer;
    box-shadow: 0 1px 2px rgba(0,0,0,0.06);
    opacity: .92;
    transition: transform .12s ease, box-shadow .12s ease, opacity .12s ease, border-color .12s ease, border-width .12s ease;
}

    .filter-chip:hover,
    .filter-chip:focus {
        opacity: 1;
        transform: translateY(-1px);
        box-shadow: 0 2px 8px rgba(0,0,0,0.12);
        outline: none;
    }
    /* Hide checkmark by default; show only when active */
    .filter-chip .chip-check {
        display: none !important;
        font-weight: 700;
        transform: translateY(-1px);
    }

    .filter-chip.active .chip-check {
        display: inline-block !important;
    }

    /* Active chips: thicker border + cyan inset glow + bolder label */
    .filter-chip.active {
        opacity: 1;
        border-width: 2px;
        border-color: rgba(0,200,255,0.7) !important;
        box-shadow: 0 2px 10px rgba(0,200,255,0.25), 0 0 0 2px rgba(0,200,255,0.35) inset;
    }

        .filter-chip.active .chip-label {
            font-weight: 600;
        }

/* When any filter is on, make non-active chips clearly "off" */
.filterbar.has-active-filters .filter-chip:not(.active) {
    opacity: 0.45;
    filter: grayscale(25%);
    border-color: rgba(0,0,0,0.2) !important;
}

/* =========================
   FILTER BAR — NOT mode
   ========================= */
/* In NOT mode:
   - Unselected chips show ✓ and look active (kept)
   - Selected chips show ✕ and look excluded (dim + red outline)
*/
.filterbar.mode-not .filter-chip .chip-check,
.filterbar.mode-not .filter-chip .chip-x {
    display: none !important;
}
/* Unselected → ✓ */
.filterbar.mode-not .filter-chip:not(.active) .chip-check {
    display: inline-block !important;
    font-weight: 700;
    transform: translateY(-1px);
}
/* Selected (excluded) → ✕ */
.filterbar.mode-not .filter-chip.active .chip-x {
    display: inline-block !important;
    font-weight: 700;
    transform: translateY(-1px);
}
/* When any filter is on in NOT mode… */
.filterbar.has-active-filters.mode-not .filter-chip:not(.active) {
    opacity: 1 !important;
    filter: none !important;
    border-width: 2px;
    border-color: rgba(0,200,255,0.7) !important;
    box-shadow: 0 2px 10px rgba(0,200,255,0.25), 0 0 0 2px rgba(0,200,255,0.35) inset;
}

    .filterbar.has-active-filters.mode-not .filter-chip:not(.active) .chip-label {
        font-weight: 600;
    }
/* Selected chips should appear EXCLUDED (dim + red outline) */
.filterbar.has-active-filters.mode-not .filter-chip.active {
    opacity: 0.65 !important;
    filter: grayscale(25%) !important;
    border-width: 2px;
    border-color: rgba(220,53,69,0.85) !important; /* Bootstrap danger-ish */
    box-shadow: 0 0 0 2px rgba(220,53,69,0.25) inset !important;
}

/* =========================
   Modal Styling & Glow
   ========================= */
.modal-content {
    background-color: rgba(255,255,255,0.95);
    border: 2px solid rgba(0,200,255,0.3);
    box-shadow: 0 0 20px rgba(0,200,255,0.2), 0 4px 12px rgba(0,200,255,0.25);
}

    .modal-content img,
    .modal-content video {
        border: 2px solid rgba(0,200,255,0.25);
        box-shadow: 0 0 12px rgba(0,200,255,0.2);
        border-radius: 8px;
    }
/* Close button glow */
.modal-header .btn-close {
    filter: drop-shadow(0 0 5px rgba(0,200,255,0.6));
    transition: transform 0.2s ease, filter 0.2s ease;
}

    .modal-header .btn-close:hover {
        transform: scale(1.2);
        filter: drop-shadow(0 0 12px rgba(0,200,255,0.8));
    }
/* Modal overlay */
.modal.fade .modal-dialog {
    transition: transform 0.3s ease-out;
}

.modal-backdrop.show {
    background-color: rgba(0,0,0,0.45);
    backdrop-filter: blur(4px);
}

.modal {
    z-index: 2000 !important;
}

.modal-backdrop {
    z-index: 1990 !important;
}

/* Particle canvas */
#particleCanvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none; /* allows clicks through */
    z-index: 0; /* behind all content */
}

/* =========================
   Hero Section
   ========================= */
html {
    scroll-behavior: smooth;
    scroll-padding-top: 72px;
}

.hero-section {
    position: relative;
    width: 100%;
    max-width: 100vw; /* prevents overflow */
    overflow: hidden; /* hide horizontal scroll */
}

/* Parallax background */
.parallax-bg {
    position: absolute;
    inset: 0; /* shorthand for top/right/bottom/left = 0 */
    width: 100%;
    height: 100%;
    background-image: url('/images/DTRL Background.webp');
    background-size: cover;
    background-position: center top;
    z-index: 0;
    will-change: transform;
}

/* Dark overlay */
.hero-section::before {
    content: "";
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,0.35);
    z-index: 1;
}

/* Hero content container */
.hero-section .container {
    position: relative;
    z-index: 2;
    padding-left: 1rem;
    padding-right: 1rem;
    max-width: 100%;
    overflow: hidden;
    text-align: center;
}

/* Logos */
.hero-top {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-left: auto;
    margin-right: auto;
    }
    /* Keep the two logos from collectively exceeding the viewport width */
    .hero-top img {
        max-width: 100%;
        height: auto;
    }
.hero-logo,
.hero-letterhead {
    display: block;
    height: auto;
    width: auto;
    max-width: 100%;
    max-height: 100px;
}

.hero-logo {
    height: 100px;
}

.hero-letterhead {
    height: 40px;
}

/* Headline & subtitle */
.hero-headline,
.hero-subtitle {
    word-wrap: break-word;
    overflow-wrap: anywhere;
    max-width: 100%;
    color: #fff;
}

/* CTA button link */
.hero-cta a {
    color: white;
    text-decoration: none;
}

/* Fade-in animations */
.fade-in {
    opacity: 0;
    transform: translateY(20px);
    animation: fadeInUp 1s forwards;
}

    .fade-in.delay-0 {
        animation-delay: 0.3s;
    }

    .fade-in.delay-1 {
        animation-delay: 0.6s;
    }

    .fade-in.delay-2 {
        animation-delay: 0.9s;
    }

@keyframes fadeInUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Background zoom (Ken Burns) */
@keyframes bgZoom {
    0% {
        transform: scale(1);
    }

    100% {
        transform: scale(1.05);
    }
}

/* Responsive adjustments */
@media (max-width: 992px) {
    .hero-logo {
        max-height: 80px;
    }

    .hero-letterhead {
        max-height: 35px;
    }

    .hero-headline {
        font-size: 2.5rem;
    }

    .hero-subtitle {
        font-size: 1.1rem;
    }
}

@media (max-width: 576px) {
    .hero-section {
        height: auto; /* allow content to dictate height */
        padding-top: 60px;
        padding-bottom: 40px;
    }

        .hero-section .container {
            padding-top: 60px;
        }

    .hero-logo {
        max-height: 64px;
    }

    .hero-letterhead {
        max-height: 28px;
    }

    .hero-top {
        padding-left: 1rem;
        padding-right: 1rem;
        max-width: 100vw;
    }
        /* When the logos try to sit on one line, cap each to ~48% so the pair fits */
        .hero-top img {
            flex: 0 1 48%;
        }
    .hero-headline {
        font-size: 1.8rem;
        line-height: 1.2;
    }

    .hero-subtitle {
        font-size: 1rem;
    }
}

/* Absolute safety net: prevent any horizontal overflow on page */
html, body {
    max-width: 100%;
    overflow-x: hidden;
}

/* =========================
   Service cards
   ========================= */
.service-card {
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
    border: 1px solid rgba(0,200,255,0.15);
    cursor: pointer;
    border-radius: 0.5rem;
}

    .service-card:hover {
        transform: translateY(-6px) scale(1.02);
        box-shadow: 0 12px 28px rgba(0,200,255,0.35), 0 0 14px rgba(0,200,255,0.25);
        border-color: rgba(0,200,255,0.5);
    }
    /* Active/click press feedback */
    .service-card:active {
        transform: translateY(-2px) scale(0.995);
    }
    /* Focus ring for keyboard navigation */
    .service-card:focus-visible {
        outline: none;
        box-shadow: 0 0 0 3px rgba(13,110,253,0.5), 0 12px 28px rgba(0,200,255,0.3);
        border-color: #0d6efd;
    }
/* Optional: image zoom harmonizes with card lift */
.service-img {
    transition: transform 0.25s ease;
}

.service-card:hover .service-img {
    transform: scale(1.05);
}
/* Respect users who prefer reduced motion */
@media (prefers-reduced-motion: reduce) {
    .service-card, .service-img {
        transition: none;
    }
}
/* Multi-line clamp utility (3 lines) */
.line-clamp-3 {
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 3;
    overflow: hidden;
}
/* Optional: subtle footer look */
.card-footer-cta {
    background: transparent;
    border-top: 1px solid rgba(0,0,0,0.06);
}

    .card-footer-cta a {
        text-decoration: none;
        font-weight: 500;
    }

        .card-footer-cta a .arrow {
            display: inline-block;
            transition: transform 0.15s ease;
        }

.service-card:hover .card-footer-cta a .arrow {
    transform: translateX(2px);
}

.section-block img {
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

    .section-block img:hover {
        transform: translateY(-3px);
        box-shadow: 0 10px 24px rgba(0,0,0,0.25);
    }

.section-body p {
    margin-bottom: 0.8rem;
}

.section-body ul {
    margin-bottom: 0.8rem;
    padding-left: 1.25rem;
}

.section-body li {
    margin-bottom: 0.35rem;
}

/* About chips (compact value props) */
.about-chip {
    display: flex;
    gap: 0.75rem;
    align-items: flex-start;
    padding: 0.85rem 1rem;
    border: 1px solid rgba(0,200,255,0.15);
    border-radius: 12px;
    background: rgba(255,255,255,0.85);
    box-shadow: 0 2px 10px rgba(0,200,255,0.08);
}

.about-chip-icon {
    font-size: 1.25rem;
    line-height: 1;
}

.about-chip-title {
    font-weight: 600;
    margin-bottom: 0.1rem;
}

.about-chip-text {
    font-size: 0.95rem;
    color: #555;
}

/* Contact card spacing rows */
.contact-card .contact-row {
    padding: 0.5rem 0;
    border-bottom: 1px dashed rgba(0,0,0,0.08);
}

    .contact-card .contact-row:last-child {
        border-bottom: 0;
    }
/* Keep gutters, allow wrap on small screens */
.contact-row .row {
    margin-left: 0;
    margin-right: 0;
}
/* keeps card padding as visual edge */
.contact-row .text-break {
    word-break: break-word;
}
/* Slightly denser spacing inside the contact card */
.contact-card .card-body {
    padding: 1.25rem;
}

/* =========================
   Media Carousel
   ========================= */
/* Carousel nav buttons inside modal */
.carousel-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    padding: .35rem .6rem;
    font-size: 2rem;
    line-height: 1;
    background: rgba(0,0,0,0.45);
    border: 1px solid rgba(255,255,255,0.6);
    border-radius: .5rem;
    color: #fff;
    cursor: pointer;
    user-select: none;
    z-index: 5;
}

    .carousel-nav:hover {
        background: rgba(0,0,0,0.65);
    }

    .carousel-nav.prev {
        left: .75rem;
    }

    .carousel-nav.next {
        right: .75rem;
    }

/* Download chip on thumbnails (shown only when AllowDownload) */
.thumb-action {
    position: absolute;
    top: .5rem;
    right: .5rem;
    z-index: 2;
    padding: .25rem .5rem;
    border-radius: .5rem;
    background: rgba(255,255,255,0.9);
    backdrop-filter: blur(2px);
    box-shadow: 0 1px 4px rgba(0,0,0,0.15);
    line-height: 1;
}

    .thumb-action:hover {
        background: #fff;
        box-shadow: 0 2px 8px rgba(0,0,0,0.2);
    }
/* Fix: inside .ratio, don't stretch our download button */
.ratio > .thumb-action {
    position: absolute; /* keep it floating */
    top: .5rem;
    right: .5rem;
    bottom: auto;
    left: auto;
    width: auto;
    height: auto;
    z-index: 2;
}

/* Make the media a positioning context for overlays */
.media-frame {
    position: relative; /* already set inline, here as a safety */
    display: inline-block; /* shrink-wrap to media size */
}
    /* Modal download chip, anchored to the MEDIA (not whole modal) */
    .media-frame .thumb-action.modal-dl {
        position: absolute;
        top: .75rem;
        right: .75rem;
        z-index: 6;
        /* ~2x size vs. tile chip */
        padding: .5rem .75rem;
        font-size: 1.25rem;
        line-height: 1;
        border-radius: .6rem;
        background: rgba(255,255,255,0.95);
        backdrop-filter: blur(2px);
        box-shadow: 0 2px 10px rgba(0,0,0,0.18);
    }

        .media-frame .thumb-action.modal-dl:hover {
            background: #fff;
            box-shadow: 0 3px 14px rgba(0,0,0,0.22);
        }

/* =========================
   Final cleanups / safety
   ========================= */
/* Ensure only the media-anchored modal chip is visible (hide any legacy modal-level chip) */
.modal-body > .thumb-action.modal-dl {
    display: none !important;
}
/* Keep grid overlays below an open modal (defensive) */
.modal-open .video-thumbnail-wrapper .thumb-action {
    z-index: 0 !important;
    pointer-events: none;
}
/* Strengthen modal stacking context */
.modal {
    isolation: isolate;
}
/* Purplish background utilities */
.bg-purpleish {
    --bs-bg-opacity: 1;
    background-color: rgba(124, 58, 237, var(--bs-bg-opacity)) !important; /* #7c3aed */
}

.bg-purpleish-subtle {
    /* A softer version for "subtle" look */
    background-color: color-mix(in srgb, #7c3aed 18%, transparent);
}

