/* SEO Sections & Overview Design System — Applied across all pages */

/* ── Outer wrapper section ───────────────────────────────────────────── */
.seo-overview-area,
#home-details > section {
    padding-block: clamp(24px, 3.5vw, 36px);
}

#home-intro {
    padding-top: 16px;
    padding-bottom: 8px;
}

/* ── Content grid (all section cards) ────────────────────────────────── */
.seo-overview-grid,
#home-details > section > .container > div {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 12px;
}

/* ── Individual content cards ────────────────────────────────────────── */
.seo-card,
#home-details > section > .container > div > section:not(#faq),
#home-intro .home-intro-card {
    min-width: 0;
    padding: 18px 16px;
    border: 1px solid var(--border);
    border-radius: 16px;
    background: linear-gradient(
        168deg,
        rgba(15, 23, 42, 0.85) 0%,
        rgba(9, 13, 22, 0.92) 100%
    );
    transition: border-color 0.25s ease, box-shadow 0.25s ease;
}

.seo-card:hover,
#home-details > section > .container > div > section:not(#faq):hover,
#home-intro .home-intro-card:hover {
    border-color: rgba(96, 165, 250, 0.2);
    box-shadow: 0 4px 20px rgba(37, 99, 235, 0.08);
}

/* ── Card Headings ───────────────────────────────────────────────────── */
.seo-card-heading,
.seo-card > h2,
#home-details > section > .container > div > section:not(#faq) > h2,
#home-intro .home-intro-card > h2 {
    margin: 0 0 4px;
    padding-bottom: 10px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    color: var(--heading);
    font-size: 1.2rem;
    font-weight: 700;
    line-height: 1.3;
    letter-spacing: -0.025em;
    text-wrap: pretty;
}

/* ── Paragraphs ──────────────────────────────────────────────────────── */
.seo-card-paragraph,
.seo-card > p,
.seo-card-content > p,
#home-details > section > .container > div > section:not(#faq) > p,
#home-intro .home-intro-card > p {
    margin: 8px 0 0;
    font-size: 0.86rem;
    line-height: 1.72;
    color: var(--body);
    text-wrap: pretty;
}

/* ── Item list grid ──────────────────────────────────────────────────── */
.seo-items-list,
#home-details > section > .container > div > section > ul {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 8px;
    margin: 12px 0 0;
    padding: 0;
    list-style: none;
}

.seo-item,
#home-details > section > .container > div > section > ul > li {
    position: relative;
    min-width: 0;
    margin: 0;
    padding: 10px 12px 10px 32px;
    border: 1px solid rgba(96, 165, 250, 0.12);
    border-radius: 10px;
    background: rgba(9, 13, 22, 0.55);
    font-size: 0.83rem;
    line-height: 1.6;
    color: var(--body);
    transition: border-color 0.2s ease, background-color 0.2s ease;
}

.seo-item:hover,
#home-details > section > .container > div > section > ul > li:hover {
    border-color: rgba(96, 165, 250, 0.24);
    background: rgba(15, 23, 42, 0.65);
}

/* Bullet icon for general list items */
.seo-item::before {
    position: absolute;
    left: 10px;
    top: 13px;
    width: 14px;
    height: 14px;
    background-size: 14px 14px;
    background-repeat: no-repeat;
    background-position: center;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%2360A5FA' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='20 6 9 17 4 12'/%3E%3C/svg%3E");
    content: "";
    opacity: 0.85;
}

/* ── Homepage-specific 5 service-line SVG icons ───────────────────────── */
#home-details > section > .container > div > section > ul > li {
    padding: 10px 10px 10px 14px;
}

#home-details > section > .container > div > section > ul > li::before {
    position: static;
    display: block;
    width: 22px;
    height: 22px;
    margin-bottom: 6px;
    background-size: 20px 20px;
    background-repeat: no-repeat;
    background-position: center;
    content: "";
    opacity: 0.85;
}

/* 1  Sensors & field integration */
#home-details > section > .container > div > section > ul > li:nth-child(1)::before {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='%2360A5FA' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='4' y='4' width='16' height='16' rx='2'/%3E%3Cpath d='M9 1v3M15 1v3M9 20v3M15 20v3M20 9h3M20 14h3M1 9h3M1 14h3'/%3E%3C/svg%3E");
}

/* 2  Gateways & firmware */
#home-details > section > .container > div > section > ul > li:nth-child(2)::before {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='%2360A5FA' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='2' y='2' width='20' height='8' rx='2'/%3E%3Crect x='2' y='14' width='20' height='8' rx='2'/%3E%3Ccircle cx='6' cy='6' r='0.8' fill='%2360A5FA'/%3E%3Ccircle cx='6' cy='18' r='0.8' fill='%2360A5FA'/%3E%3C/svg%3E");
}

/* 3  Cloud data platform */
#home-details > section > .container > div > section > ul > li:nth-child(3)::before {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='%2360A5FA' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M18 10h-1.26A8 8 0 1 0 9 20h9a5 5 0 0 0 0-10z'/%3E%3C/svg%3E");
}

/* 4  Dashboards & alerts */
#home-details > section > .container > div > section > ul > li:nth-child(4)::before {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='%2360A5FA' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='3' width='7' height='7' rx='1'/%3E%3Crect x='14' y='3' width='7' height='7' rx='1'/%3E%3Crect x='14' y='14' width='7' height='7' rx='1'/%3E%3Crect x='3' y='14' width='7' height='7' rx='1'/%3E%3C/svg%3E");
}

/* 5  Deployment & support */
#home-details > section > .container > div > section > ul > li:nth-child(5)::before {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='%2360A5FA' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4.5 16.5c-1.5 1.26-2 5-2 5s3.74-.5 5-2c.71-.84.7-2.13-.09-2.91a2.18 2.18 0 0 0-2.91-.09zM12 15l-3-3a22 22 0 0 1 2-3.95A12.88 12.88 0 0 1 22 2c0 2.72-.78 7.5-6 11a22.35 22.35 0 0 1-4 2z'/%3E%3Cpath d='M9 12H4s.55-3.03 2-4c1.62-1.08 5 0 5 0M12 15v5s3.03-.55 4-2c1.08-1.62 0-5 0-5'/%3E%3C/svg%3E");
}

.content-link {
    font-weight: 600;
}

/* ── Action links (remaining section links) ──────────────────────────── */
.seo-card-links {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 14px;
}

.seo-action-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 14px;
    border-radius: 9999px;
    font-size: 0.82rem;
    font-weight: 500;
    background: rgba(96, 165, 250, 0.08);
    border: 1px solid rgba(96, 165, 250, 0.2);
    color: var(--primary-light);
    text-decoration: none;
    transition: all 0.2s ease;
}

.seo-action-link:hover {
    background: rgba(96, 165, 250, 0.18);
    border-color: rgba(96, 165, 250, 0.4);
    color: #fff;
    text-decoration: none;
    transform: translateY(-1px);
}

.seo-action-link svg {
    transition: transform 0.2s ease;
}

.seo-action-link:hover svg {
    transform: translateX(2px);
}

/* ── Specification Tables ────────────────────────────────────────────── */
.seo-table-wrapper {
    margin-top: 14px;
    border: 1px solid var(--border);
    border-radius: 14px;
    background: rgba(9, 13, 22, 0.6);
    overflow-x: auto;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.seo-table {
    width: 100%;
    border-collapse: collapse;
    text-align: left;
    font-size: 0.85rem;
    line-height: 1.6;
}

.seo-table-caption {
    padding: 12px 16px;
    font-weight: 600;
    font-size: 0.92rem;
    color: var(--heading);
    background: rgba(15, 23, 42, 0.7);
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    text-align: left;
}

.seo-table th[scope="col"] {
    padding: 11px 16px;
    font-weight: 600;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--primary-light);
    background: rgba(15, 23, 42, 0.5);
    border-bottom: 1px solid var(--border);
}

.seo-table tbody tr {
    border-bottom: 1px solid rgba(255, 255, 255, 0.04);
    transition: background-color 0.15s ease;
}

.seo-table tbody tr:last-child {
    border-bottom: none;
}

.seo-table tbody tr:hover {
    background-color: rgba(37, 99, 235, 0.05);
}

.seo-table th[scope="row"] {
    padding: 12px 16px;
    font-weight: 600;
    color: var(--heading);
    border-right: 1px solid rgba(255, 255, 255, 0.04);
    white-space: nowrap;
    width: 28%;
}

.seo-table td {
    padding: 12px 16px;
    color: var(--body);
}

/* ── FAQ Section ─────────────────────────────────────────────────────── */
.faq-section,
#home-details #faq {
    grid-column: 1 / -1;
    margin-top: 8px;
}

.faq-section-heading,
.faq-section > h2,
#home-details #faq > h2 {
    font-size: 1.3rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    color: var(--heading);
    margin: 0 0 12px;
}

.faq-grid,
#home-details .faq-grid {
    display: grid;
    gap: 12px;
    grid-template-columns: minmax(0, 1fr);
}

.faq-card,
#home-details .faq-card {
    min-width: 0;
    padding: 16px 18px;
    border-radius: 14px;
    border: 1px solid var(--border);
    background: linear-gradient(
        168deg,
        rgba(15, 23, 42, 0.85) 0%,
        rgba(9, 13, 22, 0.92) 100%
    );
    transition: border-color 0.25s ease, box-shadow 0.25s ease;
}

.faq-card:hover,
#home-details .faq-card:hover {
    border-color: rgba(96, 165, 250, 0.2);
    box-shadow: 0 4px 16px rgba(37, 99, 235, 0.06);
}

.faq-question,
#home-details .faq-card .faq-question {
    font-size: 0.98rem;
    font-weight: 600;
    line-height: 1.4;
    color: var(--heading);
    margin: 0;
}

.faq-answer,
#home-details .faq-card .faq-answer {
    margin-top: 6px;
    font-size: 0.84rem;
    line-height: 1.68;
    color: var(--body);
}

/* ── Related Pages Navigation ────────────────────────────────────────── */
.seo-related-nav,
nav[aria-label="Related pages"],
#home-details nav[aria-label="Related pages"] {
    grid-column: 1 / -1;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    margin-top: 6px;
    padding-top: 10px;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.seo-related-label {
    font-size: 0.84rem;
    font-weight: 600;
    color: var(--heading);
    margin-right: 4px;
}

.seo-related-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.seo-related-link,
.seo-related-nav a,
nav[aria-label="Related pages"] a,
#home-details nav[aria-label="Related pages"] a {
    display: inline-flex;
    align-items: center;
    padding: 5px 12px;
    border-radius: 9999px;
    font-size: 0.8rem;
    font-weight: 500;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--border);
    color: var(--body);
    text-decoration: none;
    transition: all 0.2s ease;
}

.seo-related-link:hover,
.seo-related-nav a:hover,
nav[aria-label="Related pages"] a:hover,
#home-details nav[aria-label="Related pages"] a:hover {
    border-color: rgba(96, 165, 250, 0.4);
    color: var(--primary-light);
    background: rgba(37, 99, 235, 0.1);
    text-decoration: none;
    transform: translateY(-1px);
}

/* ── Tablet (600px - 899px) ──────────────────────────────────────────── */
@media (min-width: 600px) and (max-width: 899px) {
    #home-details > section > .container > div > section > ul {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    #home-details > section > .container > div > section > ul > li:last-child {
        grid-column: 1 / -1;
    }

    .seo-items-list {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

/* ── Desktop (≥900px) ────────────────────────────────────────────────── */
@media (min-width: 900px) {
    .seo-overview-area,
    #home-details > section {
        padding-block: 32px;
    }

    #home-intro {
        padding-top: 24px;
        padding-bottom: 8px;
    }

    #home-intro .home-intro-card {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        column-gap: 28px;
        row-gap: 10px;
        padding: clamp(18px, 1.5vw, 24px);
    }

    #home-intro .home-intro-card > h2 {
        grid-column: 1 / -1;
        font-size: clamp(1.35rem, 1.7vw, 1.6rem);
        padding-bottom: 10px;
        margin-bottom: 4px;
    }

    #home-intro .home-intro-card > p {
        margin: 0;
        font-size: 0.875rem;
        line-height: 1.72;
    }

    /* 2-column grid for overview cards */
    .seo-overview-grid,
    #home-details > section > .container > div {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 16px;
    }

    .seo-card,
    #home-details > section > .container > div > section:not(#faq) {
        padding: clamp(18px, 1.5vw, 24px);
    }

    /* Cards with tables or extensive items span full width for breathing room */
    .seo-card--table,
    .seo-card--full {
        grid-column: 1 / -1;
    }

    /* When an unpaired full-width card has multiple paragraphs, balance them in a 2-col layout on desktop */
    .seo-card--full > .seo-card-content {
        display: grid;
        grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
        column-gap: 28px;
        row-gap: 10px;
    }

    .seo-card--full > .seo-card-content > p {
        margin: 0;
    }

    /* Homepage: First section ('IoT solution provider') spans full width */
    #home-details > section > .container > div > section:first-of-type {
        display: grid;
        grid-column: 1 / -1;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        column-gap: 28px;
        row-gap: 10px;
    }

    #home-details > section > .container > div > section:first-of-type > h2,
    #home-details > section > .container > div > section:first-of-type > ul {
        grid-column: 1 / -1;
    }

    #home-details > section > .container > div > section:first-of-type > h2 {
        font-size: clamp(1.35rem, 1.7vw, 1.6rem);
    }

    #home-details > section > .container > div > section:first-of-type > p {
        margin: 0;
    }

    /* Headings on desktop */
    .seo-card-heading,
    .seo-card > h2,
    #home-details > section > .container > div > section:not(#faq) > h2 {
        font-size: 1.32rem;
        padding-bottom: 10px;
        margin-bottom: 4px;
    }

    /* Paragraphs on desktop */
    .seo-card-paragraph,
    .seo-card > p,
    .seo-card-content > p,
    #home-details > section > .container > div > section:not(#faq) > p {
        font-size: 0.875rem;
        line-height: 1.72;
    }

    /* Homepage 5 items grid on desktop */
    #home-details > section > .container > div > section > ul {
        grid-template-columns: repeat(6, minmax(0, 1fr));
        gap: 8px;
        margin-top: 6px;
    }

    #home-details > section > .container > div > section > ul > li {
        grid-column: span 2;
        padding: 12px 14px 14px;
        font-size: 0.84rem;
    }

    #home-details > section > .container > div > section > ul > li:nth-last-child(-n+2) {
        grid-column: span 3;
    }

    #home-details > section > .container > div > section > ul > li::before {
        position: static;
        display: block;
        width: 24px;
        height: 24px;
        margin-bottom: 8px;
        border-radius: 0;
        background-color: transparent;
        background-size: 22px 22px;
    }

    /* General items grid on desktop */
    .seo-items-list {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 10px;
    }

    /* FAQ heading on desktop */
    .faq-section-heading,
    .faq-section > h2,
    #home-details #faq > h2 {
        font-size: 1.45rem;
    }

    .faq-grid,
    #home-details .faq-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 14px;
    }
}

/* ── Wide Desktop (≥1024px) ─────────────────────────────────────────── */
@media (min-width: 1024px) {
    #home-details > section > .container > div > section > ul {
        grid-template-columns: repeat(5, minmax(0, 1fr));
    }

    #home-details > section > .container > div > section > ul > li,
    #home-details > section > .container > div > section > ul > li:nth-last-child(-n+2) {
        grid-column: auto;
    }
}
