/* ============================================
   Industrial Signals - Main Styles
   Warning lights, tower lights, alarms
   Patlite-inspired clean industrial UI
   ============================================ */

:root {
    /* Patlite-like palette: red + deep gray + white */
    --color-primary: #d6001c;
    --color-primary-dark: #b00017;
    --color-accent: #f2b600;
    --color-text: #222222;
    --color-text-light: #666666;
    --color-bg: #ffffff;
    --color-bg-alt: #f4f6f8;
    --color-border: #e0e4ea;
    --font-sans: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen-Sans, Ubuntu, sans-serif;
    --container: 1200px;
    --header-h: 72px;
    --radius: 6px;
    --shadow: 0 2px 12px rgba(0,0,0,0.08);
    --shadow-hover: 0 8px 24px rgba(0,0,0,0.12);
}

* {
    box-sizing: border-box;
}
body {
    font-family: var(--font-sans);
    color: var(--color-text);
    background: var(--color-bg);
    line-height: 1.6;
    margin: 0;
    padding: 0;
}
a {
    color: var(--color-primary);
    text-decoration: none;
}
a:hover {
    text-decoration: underline;
}
img {
    max-width: 100%;
    height: auto;
}
.container {
    max-width: var(--container);
    margin: 0 auto;
    padding: 0 20px;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 24px;
    font-size: 1rem;
    font-weight: 600;
    border-radius: var(--radius);
    border: none;
    cursor: pointer;
    transition: background 0.2s, color 0.2s, box-shadow 0.2s;
}
.btn-primary {
    background: var(--color-primary);
    color: #fff;
}
.btn-primary:hover {
    background: var(--color-primary-dark);
    text-decoration: none;
}
.btn-outline {
    background: transparent;
    color: var(--color-primary);
    border: 2px solid var(--color-primary);
}
.btn-outline:hover {
    background: var(--color-primary);
    color: #fff;
    text-decoration: none;
}
.btn-header {
    padding: 10px 20px;
    font-size: 0.95rem;
    background: var(--color-primary);
    color: #fff !important;
}
.btn-header:hover { text-decoration: none; opacity: 0.9; }
.btn-lg { padding: 16px 32px; font-size: 1.1rem; }

/* Header */
.site-header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: #ffffff;
    border-bottom: 1px solid var(--color-border);
    transition: box-shadow 0.2s ease, background-color 0.2s ease, border-color 0.2s ease;
}
.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: var(--header-h);
}
.logo-link {
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--color-primary) !important;
}
.logo-link:hover { text-decoration: none; opacity: 0.85; }
.logo-text { color: inherit; }
.main-nav { display: flex; align-items: center; }
.nav-list {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0;
    gap: 4px;
}
.nav-item { position: relative; }
.nav-link {
    display: block;
    padding: 10px 18px;
    color: var(--color-text);
    font-weight: 500;
    text-transform: uppercase;
    font-size: 0.85rem;
    letter-spacing: 0.06em;
}
.nav-link:hover { color: var(--color-primary); text-decoration: none; }
.nav-item.has-dropdown .nav-link { padding-right: 28px; }
.nav-item.has-dropdown .nav-link i { font-size: 0.7rem; margin-left: 4px; }
.dropdown-menu {
    position: absolute;
    top: 100%;
    left: 0;
    min-width: 220px;
    background: #ffffff;
    box-shadow: var(--shadow-hover);
    border-radius: var(--radius);
    list-style: none;
    margin: 0;
    padding: 10px 0;
    opacity: 0;
    visibility: hidden;
    transform: translateY(8px);
    transition: opacity 0.2s, transform 0.2s, visibility 0.2s;
}
.nav-item:hover .dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}
.dropdown-menu li { margin: 0; }
.dropdown-menu a {
    display: block;
    padding: 8px 20px;
    color: var(--color-text);
}
.dropdown-menu a:hover {
    background: #f7f8fa;
    color: var(--color-primary);
    text-decoration: none;
}
.nav-list .current-menu-item > a,
.nav-list .current-menu-ancestor > a,
.nav-list .current_page_item > a,
.nav-list .current_page_ancestor > a {
    color: var(--color-primary);
    position: relative;
}
.nav-list .current-menu-item > a::after,
.nav-list .current-menu-ancestor > a::after,
.nav-list .current_page_item > a::after,
.nav-list .current_page_ancestor > a::after {
    content: '';
    position: absolute;
    left: 18px;
    right: 18px;
    bottom: 6px;
    height: 2px;
    border-radius: 999px;
    background: var(--color-primary);
}
.header-actions { display: flex; align-items: center; gap: 16px; }

/* Mobile menu */
.mobile-menu-toggle {
    display: none;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    width: 40px;
    height: 40px;
    background: none;
    border: none;
    cursor: pointer;
}
.mobile-menu-toggle span {
    display: block;
    width: 24px;
    height: 2px;
    background: var(--color-text);
}
.mobile-menu {
    display: none;
    position: absolute;
    top: var(--header-h);
    left: 0;
    right: 0;
    background: #fff;
    box-shadow: var(--shadow);
    padding: 20px 20px 24px;
    max-height: calc(100vh - var(--header-h));
    overflow-y: auto;
}
.mobile-menu.active { display: block; }
.mobile-nav-list {
    list-style: none;
    margin: 0 0 16px 0;
    padding: 0;
}
.mobile-nav-list li { margin-bottom: 8px; }
.mobile-nav-list a {
    display: block;
    padding: 10px 0;
    color: var(--color-text);
    font-size: 1rem;
}
.mobile-nav-list .sub-menu { padding-left: 16px; }
.btn-mobile-cta { margin-top: 12px; display: inline-block; }

@media (max-width: 992px) {
    .main-nav { display: none; }
    .btn-header { display: none; }
    .mobile-menu-toggle { display: flex; }
}

/* Hero - Patlite-style clean banner */
.hero {
    position: relative;
    padding: 64px 0;
    background: #f4f6f8;
    color: var(--color-text);
    overflow: hidden;
}
.hero-bg {
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at top left, rgba(214,0,28,0.16), transparent 55%);
    opacity: 1;
}
.hero-inner {
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr);
    gap: 40px;
    align-items: center;
}
.hero-title {
    font-size: clamp(2rem, 3.4vw, 2.7rem);
    font-weight: 700;
    margin: 0 0 16px 0;
    line-height: 1.2;
}
.hero-subtitle {
    font-size: 1.15rem;
    opacity: 0.9;
    max-width: 580px;
    margin: 0 0 20px 0;
}
.hero-actions { display: flex; gap: 16px; flex-wrap: wrap; }
.hero-actions .btn { color: #fff; }
.hero-actions .btn-outline {
    color: #fff;
    border-color: #fff;
}
.hero-actions .btn-outline:hover {
    background: #fff;
    color: var(--color-primary);
}

/* Hero visual - signal towers */
.hero-visual {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 16px;
}
.hero-status-pill {
    background: #ffffff;
    border-radius: 999px;
    padding: 8px 16px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    box-shadow: var(--shadow);
    font-size: 0.85rem;
}
.hero-status-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #00b340;
}
.hero-status-pill span {
    white-space: nowrap;
}
.hero-signals {
    background: #ffffff;
    border-radius: var(--radius);
    padding: 20px 24px 18px;
    box-shadow: var(--shadow);
    display: flex;
    gap: 20px;
}
.hero-signal-tower {
    width: 44px;
    border-radius: 999px;
    background: #f4f6f8;
    padding: 4px 6px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 4px;
}
.hero-signal-segment {
    height: 10px;
    border-radius: 999px;
    opacity: 0.4;
}
.hero-signal-segment.red { background: #e53935; opacity: 0.95; }
.hero-signal-segment.amber { background: #f2b600; }
.hero-signal-segment.green { background: #00853e; }
.hero-signal-labels {
    display: flex;
    flex-direction: column;
    gap: 6px;
    font-size: 0.85rem;
    color: var(--color-text-light);
}
.hero-signal-labels strong {
    color: var(--color-text);
    font-size: 0.9rem;
}

/* Sections */
.section { padding: 64px 0; }
.section-alt { background: var(--color-bg-alt); }
.section-title {
    font-size: 1.75rem;
    margin: 0 0 12px 0;
    text-align: center;
}
.section-desc {
    text-align: center;
    color: var(--color-text-light);
    max-width: 640px;
    margin: 0 auto 40px;
}

/* Product category grid (home) */
.category-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 24px;
}
.category-card {
    background: #fff;
    border-radius: var(--radius);
    padding: 28px;
    box-shadow: var(--shadow);
    transition: box-shadow 0.2s, transform 0.2s;
    border: 1px solid var(--color-border);
    color: var(--color-text);
    display: block;
}
.category-card:hover {
    box-shadow: var(--shadow-hover);
    transform: translateY(-4px);
    text-decoration: none;
    color: var(--color-text);
}
.category-icon {
    width: 52px;
    height: 52px;
    background: linear-gradient(135deg, #d6001c 0 60%, #f4f6f8 60% 100%);
    color: transparent;
    border-radius: var(--radius);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 16px;
}
.category-card h3 {
    margin: 0 0 10px 0;
    font-size: 1.2rem;
}
.category-card p {
    margin: 0 0 16px 0;
    font-size: 0.95rem;
    color: var(--color-text-light);
    line-height: 1.5;
}
.category-link {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--color-primary);
}
.category-link i { margin-left: 6px; font-size: 0.8rem; }

/* Features */
.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 32px;
}
.feature-item {
    text-align: center;
    padding: 24px 16px;
}
.feature-item h3 {
    margin: 0 0 10px 0;
    font-size: 1.15rem;
}
.feature-item p {
    margin: 0;
    color: var(--color-text-light);
    font-size: 0.95rem;
}

/* CTA */
.cta-box {
    background: var(--color-primary);
    color: #fff;
    padding: 48px;
    border-radius: var(--radius);
    text-align: center;
}
.cta-box h2 { margin: 0 0 12px 0; font-size: 1.5rem; }
.cta-box p { margin: 0 0 24px 0; opacity: 0.95; }
.cta-box .btn-primary {
    background: #fff;
    color: var(--color-primary);
}
.cta-box .btn-primary:hover { background: #f0f0f0; text-decoration: none; }

/* Footer */
.site-footer {
    background: #22252a;
    color: #b0b4b9;
    padding: 48px 0 24px;
}
.footer-inner { max-width: var(--container); margin: 0 auto; padding: 0 20px; }
.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1.2fr;
    gap: 40px;
    margin-bottom: 40px;
}
@media (max-width: 992px) {
    .footer-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 576px) {
    .footer-grid { grid-template-columns: 1fr; }
}
.footer-logo {
    font-size: 1.3rem;
    font-weight: 700;
    color: #fff !important;
}
.footer-tagline {
    margin: 12px 0 16px 0;
    font-size: 0.9rem;
    line-height: 1.5;
}
.footer-social {
    display: flex;
    gap: 12px;
}
.footer-social a {
    color: #b0b4b9;
    font-size: 1.2rem;
}
.footer-social a:hover { color: #fff; text-decoration: none; }
.footer-links h4,
.footer-contact h4 {
    color: #fff;
    font-size: 1rem;
    margin: 0 0 16px 0;
}
.footer-links ul {
    list-style: none;
    margin: 0;
    padding: 0;
}
.footer-links li { margin-bottom: 8px; }
.footer-links a,
.footer-contact a {
    color: #b0b4b9;
}
.footer-links a:hover,
.footer-contact a:hover {
    color: #fff;
    text-decoration: none;
}
.footer-contact p {
    margin: 0 0 8px 0;
    font-size: 0.95rem;
}
.footer-contact i { margin-right: 8px; width: 20px; }
.footer-bottom {
    padding-top: 24px;
    border-top: 1px solid #2d3239;
    text-align: center;
    font-size: 0.9rem;
}
.footer-bottom p { margin: 0; }

/* Back to top */
.back-to-top {
    position: fixed;
    bottom: 24px;
    right: 24px;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: var(--color-primary);
    color: #fff;
    border: none;
    cursor: pointer;
    box-shadow: var(--shadow);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.2s, visibility 0.2s;
    z-index: 99;
}
.back-to-top.visible {
    opacity: 1;
    visibility: visible;
}
.back-to-top:hover { background: var(--color-primary-dark); }

/* Content area (inner pages) */
.content-area { padding: 48px 0; }
.page-header {
    margin-bottom: 32px;
}
.page-header h1 {
    margin: 0 0 12px 0;
    font-size: 2rem;
}
.page-header p {
    margin: 0;
    color: var(--color-text-light);
}

/* Product category page */
.product-category-intro {
    margin-bottom: 40px;
    padding: 24px 0;
}
.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 24px;
}
.product-card {
    background: #fff;
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    overflow: hidden;
    transition: box-shadow 0.2s;
}
.product-card:hover { box-shadow: var(--shadow-hover); }
.product-card-image {
    aspect-ratio: 1;
    background: var(--color-bg-alt);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3rem;
    color: var(--color-primary);
    opacity: 0.8;
}
.product-card-image img { width: 100%; height: 100%; object-fit: cover; }
.product-card-body { padding: 20px; }
.product-card-title {
    margin: 0 0 8px 0;
    font-size: 1.05rem;
}
.product-card-title a { color: var(--color-text); }
.product-card-title a:hover { color: var(--color-primary); text-decoration: none; }
.product-card-desc {
    margin: 0;
    font-size: 0.9rem;
    color: var(--color-text-light);
}

/* Posts grid (blog) */
.posts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 28px;
}
.post-card {
    background: #fff;
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    overflow: hidden;
}
.post-thumbnail { display: block; }
.post-thumbnail img { width: 100%; display: block; }
.post-content { padding: 20px; }
.post-title { margin: 0 0 8px 0; font-size: 1.15rem; }
.post-title a { color: var(--color-text); }
.post-title a:hover { color: var(--color-primary); text-decoration: none; }
.post-meta { font-size: 0.85rem; color: var(--color-text-light); margin-bottom: 10px; }
.post-excerpt { margin: 0 0 12px 0; font-size: 0.95rem; }
.read-more { font-weight: 600; }

/* Single post featured image */
.post-thumbnail-single { margin-bottom: 24px; border-radius: var(--radius); overflow: hidden; }
.post-thumbnail-single img { width: 100%; height: auto; display: block; }
.page-excerpt { color: var(--color-text-light); margin: 0 0 24px 0; }
.product-grid-section { margin-top: 40px; }
.product-grid-section h2 { margin: 0 0 12px 0; font-size: 1.35rem; }

/* 404 */
.error-404 {
    text-align: center;
    padding: 80px 20px;
}
.error-404 h1 { font-size: 4rem; margin: 0 0 16px 0; color: var(--color-primary); }
.error-404 p { margin-bottom: 24px; }

/* Responsive tweaks */
@media (max-width: 992px) {
    .hero {
        padding: 56px 0 48px;
    }
}
@media (max-width: 768px) {
    .hero {
        padding: 40px 0 32px;
    }
    .hero-inner {
        grid-template-columns: minmax(0, 1fr);
        gap: 28px;
    }
    .hero-content {
        text-align: center;
    }
    .hero-subtitle {
        margin-left: auto;
        margin-right: auto;
    }
    .hero-actions {
        justify-content: center;
    }
    .hero-visual {
        align-items: center;
    }
    .hero-signals {
        width: 100%;
        justify-content: center;
    }
    .section {
        padding: 48px 0;
    }
    .category-card {
        padding: 22px;
    }
}
@media (max-width: 576px) {
    .header-inner {
        height: 64px;
    }
    .hero-title {
        font-size: 1.8rem;
    }
    .hero-subtitle {
        font-size: 1rem;
    }
    .cta-box {
        padding: 32px 20px;
    }
}
