/* ==========================================================================
   07-landing-page.css: Styles for the promotional landing page.
   v1.3 - Header & Logo Layout Fix
   ========================================================================== */

.osat-landing-header {
    background: var(--osat-card-bg); /* Replaced #fff */
    padding: 0; /* Remove padding from main header */
    border-bottom: 1px solid var(--osat-border-color);
    position: relative;
    z-index: 100000;
}

.osat-landing-top-bar {
    background-color: var(--osat-body-bg);
    padding: 10px 0;
    border-bottom: 1px solid var(--osat-border-color);
}

.osat-landing-actions {
    display: flex;
    justify-content: flex-end; /* Align buttons to the right */
    gap: 15px;
    align-items: center;
}

.osat-landing-actions .osat-btn--helpdesk {
    margin-right: auto;
}

.osat-landing-logo-area {
    padding: 30px 0;
}

.osat-landing-logo-link {
    display: block; /* Make the link a block to contain the image */
    max-width: 300px;
    margin: 0 auto; /* Center the logo */
}

.osat-landing-header__logo {
    width: 100%; /* Make the image fill the link container */
    height: auto;
}

.osat-btn--secondary {
    background-color: var(--osat-body-bg) !important;
    color: var(--osat-primary-text-color) !important;
    border: 1px solid var(--osat-border-color) !important;
}

.osat-hero {
    background-color: var(--osat-body-bg);
    padding: 100px 0;
    text-align: center;
}
.osat-hero-subtitle {
    font-size: 1.2em;
    max-width: 600px;
    margin: 20px auto 40px;
    color: var(--osat-secondary-text-color);
}
.osat-btn--large {
    font-size: 1.2em !important;
    padding: 18px 30px !important;
}

.osat-features {
    padding: 80px 0;
}
.osat-section-header {
    text-align: center;
    margin-bottom: 60px;
}
.osat-section-header h2 {
    font-size: 2em;
}
.osat-section-header p {
    font-size: 1.1em;
    color: var(--osat-secondary-text-color);
}
.osat-features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: var(--osat-spacing-lg);
}
.osat-feature-item {
    background: var(--osat-card-bg);
    padding: var(--osat-spacing-lg);
    border: 1px solid var(--osat-border-color);
    border-radius: var(--osat-border-radius);
    text-align: center;
}

.osat-landing-footer {
    background: var(--osat-primary-color); /* Replaced --osat-primary-text-color with the new brand primary */
    color: #ffffff; /* Explicit white text */
    padding: 40px 0;
    text-align: center;
}
.osat-landing-footer p {
    color: #ffffff;
    margin-bottom: 0;
}
.osat-landing-footer nav {
    margin-top: 15px;
    display: flex;
    justify-content: center;
    gap: 20px;
}
.osat-landing-footer nav a {
    color: var(--osat-light-text-color); /* Replaced #fff */
    text-decoration: none;
}

/* --- Main Navigation / Mega Menu --- */
.osat-nav-dropdown-close {
    display: none;
    position: absolute;
    top: 15px;
    right: 15px;
    background: #f0f4f8;
    border: none;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    font-size: 24px;
    line-height: 1;
    color: var(--osat-primary-text-color);
    cursor: pointer;
    z-index: 1010;
}

.osat-public-logo-link {
    margin-right: 20px;
    line-height: 0;
}

.osat-main-nav {
    margin-right: auto;
}

.osat-nav-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    gap: 30px;
}

.osat-nav-item {
    position: relative;
    padding: 10px 0;
}

.osat-nav-link {
    text-decoration: none;
    color: var(--osat-primary-text-color);
    font-weight: 500;
    font-size: 1.25em; /* Adjusted to halfway between 1.05em and 1.5em */
    display: flex;
    align-items: center;
    gap: 5px;
}

.osat-nav-arrow {
    font-size: 0.7em;
    opacity: 0.5;
    transition: transform 0.2s;
}

.osat-nav-item:hover .osat-nav-arrow {
    transform: rotate(180deg);
}

.osat-nav-dropdown {
    position: absolute;
    top: 100%;
    left: 0; /* Changed from left: 50% */
    transform: translateY(10px); /* Removed translateX(-50%) */
    background: #fff;
    border: 1px solid var(--osat-border-color);
    border-radius: 8px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.1);
    opacity: 0;
    visibility: hidden;
    transition: all 0.2s ease;
    z-index: 1000;
    min-width: 200px;
}

@media (min-width: 991px) {
    .osat-nav-item:hover .osat-nav-dropdown,
    .osat-nav-item.is-active .osat-nav-dropdown {
        opacity: 1;
        visibility: visible;
        transform: translateY(0);
    }
}

.osat-nav-dropdown ul {
    list-style: none;
    padding: 10px 0;
    margin: 0;
}

.osat-nav-dropdown ul li a {
    display: block;
    padding: 10px 20px;
    text-decoration: none;
    color: var(--osat-primary-text-color);
    white-space: nowrap;
    transition: background 0.2s;
}

.osat-nav-dropdown ul li a:hover {
    background: #f8fafc;
    color: var(--osat-accent-color);
}

/* mega menu variant */
.osat-mega-menu {
    width: 800px;
    padding: 30px;
    z-index: 100000;
}

.osat-mega-menu-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
}

.osat-mega-menu-column h4 {
    margin-top: 0;
    margin-bottom: 15px;
    font-size: 0.85em;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--osat-secondary-text-color);
    border-bottom: 1px solid #eee;
    padding-bottom: 8px;
}

.osat-mega-menu-column ul li {
    margin-bottom: 15px;
}

/* "See all in category..." inline expander (wired in public-nav.js). Extra articles
   beyond the first 3 are hidden until the toggle is tapped; the list then scrolls. */
.osat-mega-menu-column .osat-help-extra {
    display: none;
}
.osat-mega-menu-column.is-expanded .osat-help-extra {
    display: list-item;
}
.osat-mega-menu-column.is-expanded .osat-mega-menu-list {
    max-height: 320px;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    padding-right: 6px;
}
.osat-mega-see-all {
    background: none;
    border: none;
    padding: 0;
    cursor: pointer;
    font-weight: bold;
    font-size: 0.85em;
    color: var(--osat-accent-color);
    text-align: left;
}

.osat-mega-menu-column ul li a {
    padding: 0;
    white-space: normal;
}

.osat-mega-menu-column ul li a strong {
    display: block;
    font-size: 1.05em;
    margin-bottom: 3px;
}

.osat-mega-menu-column ul li a span {
    font-size: 0.9em;
    color: var(--osat-secondary-text-color);
    line-height: 1.4;
    display: block;
}

.osat-mega-menu-column ul li a:hover {
    background: transparent;
}

@media (max-width: 990px) {
    /* This ensures that on mobile, the dropdown is absolutely positioned relative to the header,
       which is necessary for the fixed-position popup to work correctly inside a flex container. */
    .osat-landing-header .osat-nav-item.has-dropdown {
        position: static !important;
    }
}

@media (max-width: 990px) {
    .osat-landing-top-bar .osat-container {
        flex-direction: row; /* Horizontal row for logo + actions */
        flex-wrap: wrap;
        justify-content: space-between;
        align-items: center;
        gap: 10px;
        margin: 0 auto; /* Remove vertical margin */
        padding: 10px var(--osat-spacing-md);
    }
    .osat-public-logo-link {
        order: 1;
        margin: 0;
    }
    .osat-public-logo-link img {
        height: 32px !important; /* Slightly smaller on mobile to fit row */
    }
    .osat-landing-actions {
        order: 2;
        gap: 8px;
    }
    .osat-landing-actions .osat-btn {
        padding: 6px 12px !important;
        font-size: 0.85em !important;
    }
    .osat-main-nav {
        order: 3;
        width: 100%;
        margin: 0;
        padding: 10px 0 5px 0;
        border-top: 1px solid rgba(255,255,255,0.05);
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
    .osat-nav-list {
        gap: 0;
        justify-content: space-between;
        padding: 0 5px;
    }
    .osat-nav-item {
        padding: 2px 0;
    }
    .osat-nav-link {
        font-size: 0.9em;
        white-space: nowrap;
    }
    .osat-nav-arrow {
        display: none !important;
    }
    /* Mobile Dropdown Overrides */
    .osat-nav-dropdown-close {
        display: flex;
        align-items: center;
        justify-content: center;
    }
    .osat-nav-dropdown {
        position: fixed;
        top: auto !important;
        bottom: 0 !important;
        left: 0 !important;
        right: 0 !important;
        width: 100% !important;
        transform: translateY(100%);
        border-radius: 20px 20px 0 0;
        max-height: 80vh;
        overflow-y: auto;
        padding: 20px !important;
        opacity: 0;
        visibility: hidden;
        transition: transform 0.3s ease, opacity 0.3s ease;
        z-index: 99999;
    }
    .osat-nav-item.is-mobile-active .osat-nav-dropdown {
        opacity: 1 !important;
        visibility: visible !important;
        transform: translateY(0) !important;
    }
    .osat-mega-menu-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    .osat-mega-menu-column h4 {
        font-size: 0.75em;
        margin-bottom: 10px;
    }
    .osat-mega-menu-column ul li {
        margin-bottom: 10px;
    }
    .osat-mega-menu-column ul li a strong {
        font-size: 0.95em;
    }
    .osat-mega-menu-column ul li a span {
        display: none; /* Hide descriptions on mobile to save space */
    }
    /* The mobile dropdown is a bottom sheet that already scrolls as a whole
       (max-height:80vh; overflow-y:auto above). Do NOT create a second nested
       scroll region inside the list: on iOS Safari a nested overflow inside the
       transformed/fixed sheet leaves the first items painted ("ghosted") on top
       of the ones scrolling behind them. Override the desktop expander (and the
       inline max-height the JS sets) so the revealed items flow normally and the
       sheet itself handles the scroll. */
    .osat-mega-menu-column.is-expanded .osat-mega-menu-list {
        max-height: none !important;
        overflow: visible !important;
    }
}

/* Styles for industries & features articles */
.industries-article img,
.features-article img {
    display: block;
    margin: 20px auto;
    max-width: 100%;
    height: auto;
}

@media (min-width: 1200px) {
    .industries-article img,
.features-article img {
        max-width: 800px;
    }
}
