/* ==========================================================================
   AstonSoft — Additional Component Styles
   Search modal, mobile menu, 404 page
   ========================================================================== */

/* ---------- Search Modal ---------- */
.search-overlay {
    position: fixed;
    inset: 0;
    z-index: 9999;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding-top: 18vh;
    background: rgba(8, 32, 43, 0.72);
    backdrop-filter: blur(6px);
    opacity: 0;
    visibility: hidden;
    transition: opacity .25s cubic-bezier(.4,.12,.2,1), visibility .25s cubic-bezier(.4,.12,.2,1);
}
.search-overlay.is-active {
    opacity: 1;
    visibility: visible;
}
.search-modal {
    width: 92%;
    max-width: 560px;
    background: #fff;
    border-radius: 18px;
    padding: 32px;
    box-shadow: 0 30px 60px -20px rgba(0, 0, 0, .4);
    transform: translateY(-20px) scale(.97);
    transition: transform .25s cubic-bezier(.4,.12,.2,1);
}
.search-overlay.is-active .search-modal {
    transform: translateY(0) scale(1);
}
.search-modal-title {
    font-family: var(--font-display);
    font-size: 1.2rem;
    font-weight: 800;
    margin: 0 0 18px;
    color: var(--ink);
}
.search-modal-form {
    display: flex;
    gap: 10px;
}
.search-modal-input {
    flex: 1;
    font: inherit;
    font-size: 1rem;
    padding: 13px 18px;
    border: 1.5px solid var(--line);
    border-radius: 12px;
    background: var(--bg);
    color: var(--ink);
    outline: none;
    transition: border-color .18s cubic-bezier(.4,.12,.2,1), box-shadow .18s cubic-bezier(.4,.12,.2,1);
}
.search-modal-input:focus {
    border-color: var(--teal-bright);
    box-shadow: 0 0 0 3px rgba(23, 195, 178, .15);
}
.search-modal-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 13px 22px;
    background: var(--mint);
    color: var(--mint-ink);
    border: 0;
    border-radius: 12px;
    font-family: var(--font-display);
    font-weight: 700;
    font-size: .95rem;
    cursor: pointer;
    white-space: nowrap;
    transition: background .18s cubic-bezier(.4,.12,.2,1), transform .18s cubic-bezier(.4,.12,.2,1);
}
.search-modal-btn:hover {
    background: var(--mint-hover);
    transform: translateY(-1px);
}

/* ---------- Mobile Navigation ---------- */
@media (max-width: 1024px) {
    .main-navigation.is-open {
        display: flex;
        position: fixed;
        inset: 74px 0 0;
        z-index: 800;
        background: rgba(255, 255, 255, .98);
        backdrop-filter: saturate(180%) blur(12px);
        flex-direction: column;
        align-items: center;
        justify-content: flex-start;
        padding: 32px 24px;
        overflow-y: auto;
        animation: navSlideIn .25s cubic-bezier(.4,.12,.2,1);
    }
    .main-navigation.is-open .nav-menu,
    .main-navigation.is-open ul {
        flex-direction: column;
        gap: 4px;
        width: 100%;
        max-width: 400px;
    }
    .main-navigation.is-open .nav-menu a {
        padding: 14px 20px;
        font-size: 1.08rem;
        border-radius: 12px;
        width: 100%;
        text-align: center;
    }
    .main-navigation.is-open .nav-menu a:hover {
        background: #e8f6f1;
    }

    body.nav-open {
        overflow: hidden;
    }

    .nav-toggle span {
        transition: transform .22s cubic-bezier(.4,.12,.2,1), opacity .22s cubic-bezier(.4,.12,.2,1);
        transform-origin: center;
    }
    .nav-toggle[aria-expanded='true'] span:nth-child(1) {
        transform: rotate(45deg) translate(5px, 5px);
    }
    .nav-toggle[aria-expanded='true'] span:nth-child(2) {
        opacity: 0;
    }
    .nav-toggle[aria-expanded='true'] span:nth-child(3) {
        transform: rotate(-45deg) translate(5px, -5px);
    }

    @keyframes navSlideIn {
        from { opacity: 0; transform: translateY(-12px); }
        to   { opacity: 1; transform: translateY(0); }
    }
}

/* ---------- 404 Page ---------- */
.error-404-content {
    text-align: center;
    padding: 60px 32px;
}
.error-404-icon {
    width: 120px;
    height: 120px;
    margin: 0 auto 28px;
    color: var(--teal);
    opacity: .6;
}
.error-404-content h2 {
    font-size: 1.6rem;
    margin: 0 0 14px;
}
.error-404-content p {
    color: var(--slate);
    font-size: 1.05rem;
    max-width: 420px;
    margin: 0 auto 28px;
}
.error-404-actions {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 14px;
    flex-wrap: wrap;
}

/* ---------- Search Results ---------- */
.search-results-section {
    padding: 48px 0 72px;
    background: var(--bg);
}
.search-form-inline {
    display: flex;
    gap: 10px;
    max-width: 480px;
    margin: 24px 0 0;
}
.search-form-inline input[type="search"] {
    flex: 1;
    font: inherit;
    font-size: .95rem;
    padding: 12px 16px;
    border: 1.5px solid var(--line);
    border-radius: var(--radius-sm);
    background: #fff;
    color: var(--ink);
}
.search-form-inline input[type="search"]:focus {
    outline: none;
    border-color: var(--teal-bright);
    box-shadow: 0 0 0 3px rgba(23, 195, 178, .15);
}

/* ---------- No filter results ---------- */
.no-filter-results {
    grid-column: 1 / -1;
    text-align: center;
    padding: 40px 20px;
    color: var(--slate);
}

/* ---------- Search results responsive ---------- */
@media (max-width: 520px) {
    .search-modal { padding: 24px 20px; }
    .search-modal-form { flex-direction: column; }
    .search-modal-btn { justify-content: center; }
}

/* ---------- Tech Blueprint Schematic (Hero Visual) ---------- */
.tech-blueprint-stage {
    width: 100%;
    max-width: 540px;
    position: relative;
    border-radius: 20px;
    box-shadow: 0 25px 60px -20px rgba(0, 0, 0, 0.65), 0 0 40px -10px rgba(23, 195, 178, 0.25);
    background: transparent;
    overflow: hidden;
    transition: transform 0.3s ease;
}

.tech-blueprint-stage:hover {
    transform: translateY(-4px);
}

.tech-blueprint-svg {
    width: 100%;
    height: auto;
    display: block;
}

/* Smooth Rotation for Schematic Gears */
.gear-rotate-cw {
    transform-origin: 425px 125px;
    animation: gearSpinCw 20s linear infinite;
}

.gear-rotate-ccw {
    transform-origin: 485px 185px;
    animation: gearSpinCcw 13.3s linear infinite;
}

@keyframes gearSpinCw {
    from { transform: rotate(0deg); }
    to   { transform: rotate(360deg); }
}

@keyframes gearSpinCcw {
    from { transform: rotate(0deg); }
    to   { transform: rotate(-360deg); }
}

/* Floating animation for Robot and Code Window */
.tech-bot-anim {
    animation: botFloat 4s ease-in-out infinite alternate;
}

@keyframes botFloat {
    0%   { transform: translate(345px, 195px); }
    100% { transform: translate(345px, 187px); }
}

.code-window-float {
    animation: codeFloat 5s ease-in-out infinite alternate;
}

@keyframes codeFloat {
    0%   { transform: translate(180px, 165px); }
    100% { transform: translate(180px, 160px); }
}

@media (max-width: 1024px) {
    .hero-visual {
        padding-right: 0 !important;
        justify-content: center;
        align-items: center;
    }
    .tech-blueprint-stage {
        max-width: 500px;
        margin: 0 auto;
    }
}

/* ---------- Trust Icons Centering Guarantee ---------- */
.trust-icon {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    text-align: center !important;
    padding: 0 !important;
    margin: 0 !important;
}
.trust-icon svg {
    margin: 0 auto !important;
    display: block !important;
    transform: none !important;
}

/* ---------- Cookie Consent Banner (152-FZ) ---------- */
.cookie-banner {
    position: fixed;
    bottom: 24px;
    left: 24px;
    right: 24px;
    max-width: 640px;
    margin: 0 auto;
    background: rgba(8, 32, 43, 0.95);
    backdrop-filter: blur(12px);
    border: 1px solid rgba(61, 220, 145, 0.35);
    border-radius: 16px;
    padding: 16px 22px;
    box-shadow: 0 20px 45px -10px rgba(0, 0, 0, 0.6);
    z-index: 9999;
    opacity: 0;
    transform: translateY(30px);
    visibility: hidden;
    transition: opacity 0.35s ease, transform 0.35s ease, visibility 0.35s ease;
}
.cookie-banner.is-visible {
    opacity: 1;
    transform: translateY(0);
    visibility: visible;
}
.cookie-banner-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    flex-wrap: wrap;
}
.cookie-banner-text {
    display: flex;
    align-items: center;
    gap: 12px;
    flex: 1 1 340px;
}
.cookie-icon {
    font-size: 1.6rem;
    line-height: 1;
    flex-shrink: 0;
}
.cookie-banner-text p {
    margin: 0;
    font-size: 0.85rem;
    color: #c2dbe0;
    line-height: 1.45;
}
.cookie-banner-text a {
    color: var(--mint);
    text-decoration: underline;
    font-weight: 600;
}
.cookie-banner-text a:hover {
    color: #ffffff;
}
.cookie-banner-actions {
    flex-shrink: 0;
}
.btn-sm {
    padding: 9px 18px !important;
    font-size: 0.85rem !important;
}

@media (max-width: 600px) {
    .cookie-banner {
        bottom: 12px;
        left: 12px;
        right: 12px;
        padding: 14px 16px;
    }
    .cookie-banner-actions {
        width: 100%;
    }
    .cookie-banner-actions .btn {
        width: 100%;
    }
}

/* ---------- Terms of Service Modal ---------- */
.footer-terms-btn {
    background: none;
    border: none;
    padding: 0;
    margin: 0;
    font: inherit;
    font-size: 0.88rem;
    font-weight: 500;
    color: #9bb5bd;
    cursor: pointer;
    text-decoration: none;
    transition: color 0.18s ease;
}
.footer-terms-btn:hover {
    color: var(--mint);
    text-decoration: underline;
}

.terms-modal-overlay {
    position: fixed;
    inset: 0;
    z-index: 10000;
    background: rgba(8, 32, 43, 0.78);
    backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.25s ease, visibility 0.25s ease;
}
.terms-modal-overlay.is-active {
    opacity: 1;
    visibility: visible;
}
.terms-modal-container {
    width: 100%;
    max-width: 680px;
    max-height: 85vh;
    background: #ffffff;
    border-radius: 20px;
    box-shadow: 0 30px 60px -15px rgba(0, 0, 0, 0.5);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    transform: translateY(20px) scale(0.98);
    transition: transform 0.25s ease;
}
.terms-modal-overlay.is-active .terms-modal-container {
    transform: translateY(0) scale(1);
}
.terms-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 22px 28px;
    border-bottom: 1px solid var(--line);
    background: var(--bg);
}
.terms-modal-title {
    font-family: var(--font-display);
    font-size: 1.18rem;
    font-weight: 800;
    color: var(--ink);
    margin: 0;
    line-height: 1.3;
}
.terms-modal-close {
    background: transparent;
    border: none;
    font-size: 2rem;
    line-height: 1;
    color: var(--slate);
    cursor: pointer;
    padding: 0 6px;
    transition: color 0.18s ease;
}
.terms-modal-close:hover {
    color: var(--ink);
}
.terms-modal-body {
    padding: 24px 28px;
    overflow-y: auto;
    font-size: 0.94rem;
    line-height: 1.65;
    color: var(--ink-soft);
}
.terms-modal-body h3 {
    font-size: 1.05rem;
    color: var(--ink);
    margin: 1.2em 0 0.4em;
}
.terms-modal-body h3:first-child {
    margin-top: 0;
}
.terms-modal-body ul {
    margin: 0 0 1em 1.2em;
    padding: 0;
}
.terms-modal-footer {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    padding: 16px 28px;
    border-top: 1px solid var(--line);
    background: var(--bg);
}
@media (max-width: 600px) {
    .terms-modal-container {
        max-height: 90vh;
    }
    .terms-modal-header,
    .terms-modal-body,
    .terms-modal-footer {
        padding: 18px 20px;
    }
    .terms-modal-footer .btn {
        width: 100%;
    }
}




