/* Soundnine Inc. - Static Site Stylesheet */
/* Color scheme: accent #479bc9, dark blue #0a57af, text #333, bg #fff */

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

body {
    font-family: 'Open Sans', Arial, Helvetica, sans-serif;
    font-size: 16px;
    line-height: 1.6;
    color: #333;
    background: #fff;
    -webkit-font-smoothing: antialiased;
}

a { color: #479bc9; text-decoration: none; }
a:hover { color: #0a57af; text-decoration: underline; }
img { max-width: 100%; height: auto; }
h1, h2, h3, h4, h5, h6 { line-height: 1.3; color: #333; margin-bottom: 0.5em; }
h1 { font-size: 2em; }
h2 { font-size: 1.6em; }
h3 { font-size: 1.3em; }
p { margin-bottom: 1em; }
ul, ol { margin-bottom: 1em; padding-left: 1.5em; }

.container { max-width: 1080px; margin: 0 auto; padding: 0 20px; }

/* ---- Top Bar ---- */
#top-bar {
    background: #479bc9;
    color: #fff;
    font-size: 14px;
    padding: 6px 0;
}
#top-bar a { color: #fff; }
#top-bar a:hover { text-decoration: underline; }
#top-bar .container { display: flex; gap: 20px; }
#top-bar .phone::before { content: "\260E\00a0"; }

/* ---- Header / Nav ---- */
header {
    background: #fff;
    border-bottom: 1px solid #e0e0e0;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 1px 4px rgba(0,0,0,0.08);
}
header .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 90px;
}
.logo img { height: 60px; width: auto; }

nav ul { list-style: none; display: flex; gap: 0; padding: 0; margin: 0; }
nav > ul > li { position: relative; }
nav > ul > li > a {
    display: block;
    padding: 10px 16px;
    color: #333;
    font-size: 15px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
nav > ul > li > a:hover,
nav > ul > li.active > a { color: #479bc9; text-decoration: none; }

/* Dropdown */
nav ul ul {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    background: #fff;
    border: 1px solid #e0e0e0;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    min-width: 280px;
    z-index: 200;
    padding: 0;
    flex-direction: column;
}
nav ul li:hover > ul { display: flex; }
nav ul ul li a {
    display: block;
    padding: 10px 18px;
    color: #333;
    font-size: 14px;
    border-bottom: 1px solid #f0f0f0;
}
nav ul ul li a:hover { background: #f5f9fc; color: #479bc9; text-decoration: none; }
nav ul ul li:last-child a { border-bottom: none; }

/* Mobile nav */
.mobile-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 28px;
    cursor: pointer;
    color: #333;
    padding: 5px;
}

/* ---- Hero Slider ---- */
.hero-slider {
    position: relative;
    background: #1a3a5c url('/assets/images/WebHomeSliderback.jpg') center/cover;
    overflow: hidden;
    min-height: 450px;
}
.hero-slide {
    display: none;
    align-items: center;
    justify-content: center;
    padding: 60px 20px;
    min-height: 450px;
}
.hero-slide.active { display: flex; }
.hero-slide .container {
    display: flex;
    align-items: center;
    gap: 40px;
    max-width: 1080px;
}
.hero-slide .slide-image { flex: 0 0 auto; max-width: 350px; }
.hero-slide .slide-image img { max-height: 350px; width: auto; border-radius: 4px; }
.hero-slide .slide-text { color: #fff; text-shadow: 2px 2px 2px #0d315b; }
.hero-slide .slide-text h2 { color: #fff; font-size: 2em; font-weight: 700; margin-bottom: 0.3em; }
.hero-slide .slide-text p { font-size: 1.1em; font-weight: 700; }

.slider-dots {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 10px;
}
.slider-dots button {
    width: 14px; height: 14px;
    border-radius: 50%;
    border: 2px solid #fff;
    background: transparent;
    cursor: pointer;
    padding: 0;
}
.slider-dots button.active { background: #fff; }

/* ---- Page Content ---- */
.page-title-bar {
    background: #f5f7fa;
    border-bottom: 1px solid #e0e0e0;
    padding: 30px 0;
}
.page-title-bar h1 { margin: 0; font-size: 1.8em; color: #333; }

.page-content { padding: 40px 0 60px; }
.page-content h2 { color: #0a57af; margin-top: 1.5em; }
.page-content h3 { color: #333; margin-top: 1.2em; }
.page-content h4 { color: #333; }

/* Intro text on home */
.intro-text {
    font-size: 18px;
    font-weight: 600;
    line-height: 1.3;
    color: #000;
    padding: 30px 0 20px;
}

/* Section divider */
.section-divider {
    border: none;
    border-top: 7px double #0a57af;
    margin: 20px 0;
}

/* News section */
.news-heading { text-align: center; font-size: 2.5em; font-weight: 700; color: #000; letter-spacing: 1px; }

.news-list { padding: 20px 0 40px; }
.news-item {
    display: flex;
    gap: 20px;
    margin-bottom: 30px;
    padding-bottom: 30px;
    border-bottom: 1px solid #eee;
}
.news-item:last-child { border-bottom: none; }
.news-item .news-thumb { flex: 0 0 250px; }
.news-item .news-thumb img { width: 250px; height: auto; border-radius: 4px; }
.news-item .news-body { flex: 1; }
.news-item .news-body h2 { font-size: 1.3em; margin-bottom: 0.3em; }
.news-item .news-body h2 a { color: #333; }
.news-item .news-body h2 a:hover { color: #479bc9; }
.news-item .news-date { font-size: 14px; color: #888; margin-bottom: 0.5em; }
.news-item .news-excerpt { font-size: 15px; line-height: 1.3; color: #000; }

/* ---- Product pages ---- */
.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 30px;
    margin: 30px 0;
}
.product-card {
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    overflow: hidden;
    transition: box-shadow 0.2s;
}
.product-card:hover { box-shadow: 0 4px 16px rgba(0,0,0,0.1); }
.product-card img { width: 100%; height: 200px; object-fit: contain; background: #f9f9f9; padding: 15px; }
.product-card .card-body { padding: 15px; }
.product-card .card-body h3 { font-size: 1.1em; margin-bottom: 0.3em; }
.product-card .card-body h3 a { color: #333; }
.product-card .card-body h3 a:hover { color: #479bc9; }
.product-card .card-body p { font-size: 14px; color: #666; }

/* Two-column layout for product detail pages */
.two-col { display: flex; gap: 30px; margin: 30px 0; flex-wrap: wrap; }
.two-col .col-img { flex: 0 0 300px; }
.two-col .col-text { flex: 1; min-width: 300px; }
.two-col .col-img img { width: 100%; border-radius: 4px; }

/* ---- Product detail pages (hero / gallery / two-column / downloads) ---- */
.hero.product-hero {
    position: relative;
    background-size: cover;
    background-position: center;
    color: #fff;
    padding: 70px 0;
}
.hero.product-hero::before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(120deg, rgba(8,22,40,0.88) 0%, rgba(8,22,40,0.6) 55%, rgba(8,22,40,0.3) 100%);
}
.hero.product-hero .container { position: relative; z-index: 1; }
.hero.product-hero h1 { color: #fff; max-width: 720px; }
.hero.product-hero > .container > p,
.hero.product-hero .content > p { max-width: 640px; }

.hero-features { list-style: none; padding: 0; margin: 20px 0 0; }
.hero-features li { padding: 6px 0 6px 28px; position: relative; }
.hero-features li::before {
    content: "\2713";
    position: absolute;
    left: 0;
    color: #7fd0ff;
    font-weight: 700;
    font-size: 18px;
}

/* Content + image sidebar (used both on dark hero and plain white sections) */
.two-column { display: flex; gap: 40px; align-items: flex-start; flex-wrap: wrap; }
.two-column .content { flex: 1 1 380px; min-width: 280px; }
.two-column .sidebar { flex: 0 0 320px; max-width: 100%; }
.two-column .sidebar figure { margin-bottom: 20px; }
.two-column .sidebar figure:last-child { margin-bottom: 0; }
.two-column .sidebar img { width: 100%; border-radius: 6px; border: 1px solid #e6e6e6; background: #fff; }
.two-column .sidebar p { font-size: 13px; color: #888; text-align: center; margin-bottom: 8px; }
.hero.product-hero .two-column .sidebar img { border: none; }
.hero.product-hero .two-column .sidebar p { color: #cfe6f7; }

/* Row of images/screenshots directly below a hero */
.product-gallery { background: #f5f7fa; padding: 30px 0; border-bottom: 1px solid #e8e8e8; }
.product-gallery .container { display: flex; gap: 20px; flex-wrap: wrap; justify-content: center; }
.product-gallery figure { flex: 1 1 220px; max-width: 260px; text-align: center; margin: 0; }
.product-gallery img {
    width: 100%;
    height: 170px;
    object-fit: contain;
    background: #fff;
    border-radius: 6px;
    border: 1px solid #e0e0e0;
    padding: 10px;
}
.product-gallery figcaption { font-size: 13px; color: #777; margin-top: 8px; }

/* Body sections on product detail pages */
.product-detail { padding: 50px 0; }
.product-detail + .product-detail { border-top: 1px solid #eef1f4; }
.product-detail h2 { color: #0a57af; margin-top: 0; }
.product-detail h2:not(:first-child) { margin-top: 1em; }

/* Inline image floated beside body text (e.g. sensor detail shots) */
.product-detail figure.float-left {
    float: left;
    margin: 0 25px 15px 0;
    max-width: 280px;
}
.product-detail figure.float-left img { border-radius: 6px; border: 1px solid #e0e0e0; }

/* Download document lists */
.product-detail.downloads { background: #f5f7fa; }
.product-detail.downloads h3 {
    color: #0a57af;
    border-bottom: 2px solid #e0e0e0;
    padding-bottom: 8px;
    margin: 25px 0 15px;
}
.product-detail.downloads h3:first-of-type { margin-top: 0; }
.product-detail.downloads ul { list-style: none; padding: 0; }
.product-detail.downloads li { padding: 6px 0; font-size: 15px; }
.product-detail.downloads li a::before { content: "\1F4C4\00a0"; }

/* Small card grid used inside a hero (sensors / OEM components overview) */
.product-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 20px;
    margin-top: 30px;
}
.product-cards .product-card {
    background: rgba(255,255,255,0.97);
    color: #333;
    border-radius: 8px;
    padding: 20px;
    text-align: center;
}
.product-cards .product-card h3 { font-size: 1.05em; color: #0a57af; margin-bottom: 12px; }
.product-cards .product-card figure { margin: 10px 0; }
.product-cards .product-card img { max-height: 140px; width: auto; object-fit: contain; }
.product-cards .product-card h4 { font-size: 0.85em; font-weight: 600; color: #555; margin-bottom: 4px; }

/* Spec table */
table.specs {
    width: 100%;
    border-collapse: collapse;
    margin: 20px 0;
    font-size: 14px;
}
table.specs th, table.specs td {
    padding: 8px 12px;
    border: 1px solid #ddd;
    text-align: left;
}
table.specs th { background: #f5f7fa; font-weight: 600; }
table.specs tr:nth-child(even) { background: #fafafa; }

/* Blurb / contact cards */
.contact-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 30px; margin: 30px 0; }
.contact-card { padding: 20px; border: 1px solid #e0e0e0; border-radius: 6px; }
.contact-card h4 { color: #0a57af; margin-bottom: 0.5em; }

/* Downloads page (brochures / manuals / articles columns) */
.downloads-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 40px;
    margin: 30px 0;
}
.download-column h2 {
    color: #0a57af;
    font-size: 1.3em;
    border-bottom: 2px solid #e0e0e0;
    padding-bottom: 10px;
    margin-bottom: 15px;
}
.download-column h4, .download-column h5 {
    color: #333;
    margin-top: 1.2em;
}
.download-column p { font-size: 14px; margin-bottom: 0.6em; }

/* Downloads list */
.downloads-section { margin: 30px 0; }
.downloads-section h3 { color: #0a57af; border-bottom: 2px solid #e0e0e0; padding-bottom: 8px; margin-bottom: 15px; }
.downloads-section ul { list-style: none; padding: 0; }
.downloads-section li { padding: 6px 0; }
.downloads-section a::before { content: "\1F4C4\00a0"; }

/* Bio / about */
.bio { display: flex; gap: 20px; margin: 30px 0; align-items: flex-start; }
.bio img { width: 200px; border-radius: 4px; flex-shrink: 0; }
.bio-text { flex: 1; }

/* Bullet features */
.features { list-style: none; padding: 0; margin: 20px 0; }
.features li { padding: 6px 0 6px 28px; position: relative; }
.features li::before {
    content: "\2713";
    position: absolute;
    left: 0;
    color: #479bc9;
    font-weight: 700;
    font-size: 18px;
}

/* Image with caption */
.fig { margin: 20px 0; text-align: center; }
.fig img { border-radius: 4px; }
.fig figcaption { font-size: 13px; color: #888; margin-top: 6px; }

/* Lightbox (simple) */
.gallery { display: flex; flex-wrap: wrap; gap: 10px; margin: 20px 0; }
.gallery a { display: block; }
.gallery img { width: 150px; height: 120px; object-fit: cover; border-radius: 4px; border: 1px solid #ddd; }

/* ---- Footer ---- */
footer {
    background: #333;
    color: #ccc;
    padding: 40px 0 0;
}
footer a { color: #fff; }
footer a:hover { text-decoration: underline; }
.footer-nav {
    border-top: 1px solid #555;
    padding: 15px 0;
    margin-top: 30px;
}
.footer-nav ul { list-style: none; display: flex; gap: 20px; padding: 0; margin: 0; justify-content: center; }
.footer-nav a { font-size: 14px; color: #aaa; }
.footer-bottom {
    background: #222;
    text-align: center;
    padding: 15px 0;
    font-size: 13px;
    color: #888;
}

/* ---- Responsive ---- */
@media (max-width: 768px) {
    .mobile-toggle { display: block; }
    nav ul {
        display: none;
        flex-direction: column;
        position: absolute;
        top: 90px;
        left: 0;
        right: 0;
        background: #fff;
        border-bottom: 2px solid #479bc9;
        box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    }
    nav ul.open { display: flex; }
    nav ul ul {
        position: static;
        box-shadow: none;
        border: none;
        padding-left: 20px;
        display: none;
    }
    nav ul li:hover > ul { display: flex; }
    nav > ul > li > a { padding: 12px 20px; border-bottom: 1px solid #f0f0f0; }

    .hero-slide .container { flex-direction: column; text-align: center; }
    .hero-slide .slide-image { max-width: 250px; }
    .hero-slide { min-height: 350px; }
    .hero-slider { min-height: 350px; }

    .news-item { flex-direction: column; }
    .news-item .news-thumb { flex: none; }
    .news-item .news-thumb img { width: 100%; max-width: 400px; }

    .contact-grid { grid-template-columns: 1fr; }
    .downloads-grid { grid-template-columns: 1fr; gap: 10px; }
    .two-col { flex-direction: column; }
    .two-col .col-img { flex: none; }
    .bio { flex-direction: column; align-items: center; text-align: center; }

    .product-grid { grid-template-columns: 1fr; }

    .hero.product-hero { padding: 40px 0; }
    .two-column { flex-direction: column; }
    .two-column .sidebar { flex: none; width: 100%; max-width: 320px; margin: 0 auto; }
    .product-gallery figure { flex: 1 1 45%; max-width: none; }
    .product-detail { padding: 35px 0; }
    .product-detail figure.float-left { float: none; margin: 0 0 15px; max-width: 100%; }
}

/* Alignleft/right for inline images */
.alignleft { float: left; margin: 0 20px 15px 0; }
.alignright { float: right; margin: 0 0 15px 20px; }
.clearfix::after { content: ""; display: table; clear: both; }

/* Post / article page */
.post-header { margin-bottom: 20px; }
.post-header h1 { font-size: 1.8em; }
.post-meta { font-size: 14px; color: #888; margin-bottom: 20px; }
.post-content img { margin: 15px 0; }
.post-content { line-height: 1.7; }
