@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;600;700&display=swap');

/* ===== Global resets & defaults ===== */
html {
    margin: 0;
    padding: 0;
    overflow-x: hidden;
}

body {
    background: #ffffff;
    font-family: 'Inter', Arial, sans-serif;
    line-height: 1.6;
    color: #333;
    max-width: 900px;
    margin: 0 auto;
    padding: 0 20px 20px;
    text-align: center;
}

/* Override old <font face="..."> tags in legacy avio pages */
font { font-family: 'Inter', Arial, sans-serif; }
table, td, th { font-family: 'Inter', Arial, sans-serif; }

/* ===== Responsive images & media ===== */
img, video, iframe {
    max-width: 100%;
    height: auto;
}

/* ===== Responsive tables ===== */
table {
    max-width: 100%;
}

/* Legacy tables with HTML width attributes */
table[width] { width: 100% !important; }
td[width]    { width: auto !important; min-width: 0; }

/* Images inside anchor tags — always responsive */
a img { max-width: 100%; height: auto; }

/* ===== Header ===== */
header {
    background-color: #1a5276;
    padding: 0;
    margin-bottom: 0;
    /* Full-bleed: extends header to full viewport width */
    width: 100vw;
    margin-left: calc(50% - 50vw);
    display: flex;
    flex-wrap: wrap;
    align-items: center;
}

h1 {
    font-family: 'Inter', sans-serif;
    font-size: 4.5rem;
    color: #ffffff;
    margin: 0;
    padding: 10px 20px;
    flex: 1;
    text-align: center;
}

.site-logo {
    height: 100px;
    width: auto;
    display: block;
    margin: 0 auto;
}

.header-box {
    background-color: #0e3460;
    color: #ffffff;
    padding: 8px 20px;
    font-size: 0.9rem;
    width: 100%;
}

.header-box .red   { color: #ff6b6b; }
.header-box .purple { color: #a78bfa; }

.separator {
    border: none;
    border-top: 2px solid #ff6b6b;
    width: 90%;
    margin: 8px auto;
}

/* ===== Hamburger button ===== */
.nav-burger {
    display: none;
    flex-direction: column;
    justify-content: space-between;
    width: 32px;
    height: 22px;
    cursor: pointer;
    padding: 0;
    margin: 0 16px 0 auto;
    flex-shrink: 0;
    align-self: center;
}

.nav-burger span {
    display: block;
    height: 3px;
    width: 100%;
    background: #ffffff;
    border-radius: 3px;
    transition: transform 0.25s, opacity 0.25s;
}

.nav-toggle-cb { display: none; }

/* Animate burger → X when open */
.nav-toggle-cb:checked ~ header .nav-burger span:nth-child(1) {
    transform: translateY(9.5px) rotate(45deg);
}
.nav-toggle-cb:checked ~ header .nav-burger span:nth-child(2) {
    opacity: 0;
    transform: scaleX(0);
}
.nav-toggle-cb:checked ~ header .nav-burger span:nth-child(3) {
    transform: translateY(-9.5px) rotate(-45deg);
}

/* ===== Top nav ===== */
.nav-top {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: 6px;
    margin-bottom: 0;
    background-color: #0e3460;
    padding: 8px 10px;
    /* Full-bleed — border-box so padding is included in 100vw */
    box-sizing: border-box;
    width: 100vw;
    margin-left: calc(50% - 50vw);
}

.btn-applet {
    display: inline-block;
    padding: 8px 10px;
    white-space: nowrap;
    text-align: center;
    background-color: #800080;
    color: #FFFFFF;
    text-decoration: none;
    font-weight: bold;
    font-size: 14px;
    border-radius: 4px;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
}

.btn-applet:hover {
    background-color: #0000FF;
    box-shadow: 0 0 15px #FFFFFF;
}

/* ===== Dropdown ===== */
.dropdown {
    position: relative;
    display: inline-block;
}

.btn-dropdown {
    display: inline-block;
    padding: 8px 10px;
    white-space: nowrap;
    text-align: center;
    background-color: #800080;
    color: #FFFFFF;
    text-decoration: none;
    font-weight: bold;
    font-size: 14px;
    border-radius: 4px;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
    user-select: none;
}

.dropdown:hover .btn-dropdown,
.dropdown.open  .btn-dropdown {
    background-color: #0000FF;
    box-shadow: 0 0 15px #FFFFFF;
}

.dropdown-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    background-color: #000080;
    border-radius: 4px;
    overflow: hidden;
    z-index: 200;
    min-width: 190px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.5);
}

.dropdown:hover .dropdown-menu,
.dropdown.open  .dropdown-menu {
    display: block;
}

.dropdown-menu a {
    display: block;
    padding: 9px 16px;
    color: #FFFFFF;
    text-decoration: none;
    font-weight: bold;
    font-size: 13px;
    white-space: nowrap;
    transition: background-color 0.2s;
}

.dropdown-menu a:hover { background-color: #0000FF; }

/* ===== Main content ===== */
.main-content {
    display: flex;
    justify-content: center;
    align-items: flex-start;
    gap: 50px;
    max-width: 1000px;
    margin: 0 auto;
}

/* ===== Welcome text ===== */
.welcome-text {
    max-width: 750px;
    margin: 15px auto;
    padding: 0 20px;
    line-height: 1.75;
    color: #333;
    text-align: left;
}

.welcome-text h1 {
    font-size: 1.6em;
    margin: 0 0 20px;
    padding: 0;
    color: #1a1a6e;
}

.welcome-text p {
    margin-bottom: 1em;
}

.welcome-text h2 {
    font-size: 1.3em;
    margin: 20px 0 12px;
    color: #1a1a6e;
}

.welcome-separator {
    border: none;
    border-top: 1px solid #ccc;
    margin: 30px 0;
}

.welcome-list {
    margin: 0 0 1em 0;
    padding-left: 1.4em;
    line-height: 1.8;
}

.welcome-list li {
    margin-bottom: 6px;
}

/* ===== Colors ===== */
.red    { color: #FF0000; font-weight: bold; }
.purple { color: #800080; font-weight: bold; }

/* ===== Tech table ===== */
.tech-table {
    width: 100%;
    border-collapse: collapse;
    margin: 20px 0;
}

.tech-table td {
    padding: 10px;
    border: 1px solid #ccc;
}

.blue-cell {
    background-color: #337ec1;
    color: #ffffff;
}

.grey-cell {
    background-color: #c9cacc;
    color: #000000;
    font-weight: bold;
}

/* ===== CTA box ===== */
.cta-box {
    text-align: center;
    margin-top: 10px;
    margin-bottom: 0;
    width: 100vw;
    margin-left: calc(50% - 50vw);
    box-sizing: border-box;
    padding: 40px 20px;
    background: linear-gradient(135deg, #c0392b, #e67e22);
    color: #ffffff;
}

.cta-title {
    font-size: 1.3rem;
    font-weight: 700;
    margin: 0 0 10px;
    letter-spacing: 0.03em;
    color: #ffffff;
}

.cta-text {
    font-size: 0.95rem;
    margin: 0 0 24px;
    color: #fde8d8;
}

.cta-btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background: #ffffff;
    color: #c0392b;
    text-decoration: none;
    font-weight: 700;
    font-size: 0.95rem;
    padding: 12px 28px;
    border-radius: 6px;
    transition: background 0.2s, color 0.2s;
}

.cta-btn:hover {
    background: #1a5276;
    color: #ffffff;
}

.cta-btn img {
    filter: none;
    width: 22px;
}

/* ===== Order / Contact ===== */
.order-section { margin-top: 60px; }

.order-link {
    color: #FF0000;
    text-decoration: none;
    font-weight: bold;
}

.contact-links {
    margin-top: 50px;
    color: #0000FF;
    text-decoration: underline;
}

.contact-links a {
    color: #FF0000;
    text-decoration: none;
    font-weight: bold;
    font-size: 1.2rem;
}

/* ===== Footer ===== */
footer {
    margin-top: 0;
    text-align: center;
    font-size: 1em;
    color: #ffffff;
    background-color: #000000;
    border-top: none;
    padding: 20px 10px;
    /* Full-bleed — border-box so padding is included in 100vw */
    box-sizing: border-box;
    width: 100vw;
    margin-left: calc(50% - 50vw);
}

/* ===== Legacy page wrapper ===== */
.legacy-wrap {
    max-width: 100%;
    overflow-x: auto;
    padding: 0 4px;
}

/* ===== Legacy inline-style overrides ===== */
/* Old MARGIN-LEFT: 80px divs (avio/* legacy pages) */
@media (max-width: 768px) {
    [style*="MARGIN-LEFT: 80"],
    [style*="margin-left: 80px"] {
        margin-left: 0 !important;
        margin-right: 0 !important;
        padding-left: 4px;
        padding-right: 4px;
    }
}

/* ===== RESPONSIVE BREAKPOINTS ===== */

/* --- Tablet (≤ 768px) --- */
@media (max-width: 768px) {
    body {
        padding: 0 12px 20px;
    }


    h1 {
        font-size: 2.8rem;
        padding: 8px 12px;
    }

    .site-logo { height: 70px; }

    .main-content {
        flex-direction: column;
        gap: 20px;
    }

    /* Contact form rows stack vertically */
    .form-row {
        flex-direction: column;
        align-items: flex-start;
    }

    .form-row label {
        min-width: unset;
        width: 100%;
    }

    .form-row input[type="text"] {
        width: 100%;
    }

    /* Tables: allow horizontal scroll on small screens */
    .table-scroll {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    .tech-table {
        font-size: 0.88rem;
    }

    .tech-table td {
        padding: 7px 6px;
    }
}

/* --- Mobile (≤ 600px) --- */
@media (max-width: 600px) {

    /* Show hamburger, hide nothing else yet */
    .nav-burger { display: flex; }

    /* Nav hidden until checkbox is checked */
    .nav-top {
        display: none;
        flex-direction: column;
        align-items: stretch;
        gap: 0;
        padding: 0;
        margin-bottom: 20px;
        width: 100%;
        margin-left: 0;
    }

    .nav-toggle-cb:checked ~ .nav-top {
        display: flex;
    }

    /* Left-align everything inside the open nav */
    .nav-top { text-align: left; }

    /* Full-width nav buttons */
    .btn-applet,
    .btn-dropdown {
        width: 100%;
        border-radius: 0;
        text-align: left;
        padding: 13px 16px;
        font-size: 15px;
    }

    .dropdown {
        display: block;
        width: 100%;
    }

    /* Remove hover dropdown on mobile (replaced by .open class via JS) */
    .dropdown:hover .dropdown-menu { display: none; }
    .dropdown.open  .dropdown-menu { display: block; }

    /* Dropdown menus: static positioning inside the nav */
    .dropdown-menu {
        position: static;
        transform: none;
        min-width: unset;
        box-shadow: none;
        border-radius: 0;
        background-color: #000060;
    }

    .dropdown-menu a {
        padding: 11px 28px;
        font-size: 14px;
        white-space: normal;
        text-align: left;
    }

    h1 {
        font-size: 2rem;
        text-align: center;
        width: 100%;
        padding: 10px;
    }

    .site-logo { height: 56px; }

    body {
        padding: 0 8px 20px;
    }

    .cta-btn {
        width: 100%;
        box-sizing: border-box;
        justify-content: center;
        padding: 14px 16px;
    }

    /* Contact form */
    .form-row {
        flex-direction: column;
        align-items: flex-start;
    }

    .form-row label {
        min-width: unset;
        width: 100%;
        margin-bottom: 4px;
    }

    .form-row input[type="text"] {
        width: 100%;
    }

    .select-row {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }

    select {
        width: 100%;
    }

    /* Camera / legacy page fixes */
    .legacy-wrap div[style*="MARGIN-LEFT"],
    .legacy-wrap div[style*="margin-left"] {
        margin-left: 0 !important;
        margin-right: 0 !important;
    }

    /* Legacy tables without an explicit width attribute: force full width so
       multi-column layouts don't overflow and clip images inside <a href> links */
    table:not([width]):not(.tech-table) {
        width: 100% !important;
    }
    table:not([width]):not(.tech-table) td,
    table:not([width]):not(.tech-table) th {
        width: auto !important;
        min-width: 0;
    }

    /* CTA button: switch to block-level flex on small screens */
    .cta-btn {
        display: flex;
    }
}
