/* =======================================================
   SECTION 10 : API, INTEGRATIONS & AUTOMATION HUB
======================================================= */
.integration-section {
    position: relative;
    padding: 110px 5.5%;
    overflow: hidden;
    background:
        radial-gradient(circle at 86% 14%, rgba(46, 196, 255, 0.09), transparent 27%),
        radial-gradient(circle at 12% 84%, rgba(46, 213, 115, 0.06), transparent 30%),
        linear-gradient(180deg, #07111d 0%, #091a2a 100%);
}
.integration-section::before {
    position: absolute;
    inset: 0;
    content: "";
    opacity: 0.22;
    background-image:
        linear-gradient(rgba(98, 205, 249, 0.04) 1px, transparent 1px),
        linear-gradient(90deg, rgba(98, 205, 249, 0.04) 1px, transparent 1px);
    background-size: 58px 58px;
    pointer-events: none;
}
.integration-section .section-header,
.integration-layout,
.automation-card,
.automation-grid,
.security-panel {
    position: relative;
    z-index: 1;
    width: min(1380px, 100%);
    margin-right: auto;
    margin-left: auto;
}
/* ---------- API & integrations layout ---------- */
.integration-layout {
    display: grid;
    grid-template-columns: minmax(330px, 0.78fr) minmax(0, 1.22fr);
    align-items: stretch;
    gap: 24px;
}
.api-panel {
    display: flex;
    flex-direction: column;
    min-height: 100%;
}
.api-panel .card-header,
.automation-card .card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 19px;
}
.api-panel .card-header h3,
.automation-card .card-header h3 {
    margin: 0;
    color: #e8f9ff;
    font-size: 0.95rem;
    font-weight: 600;
}
.api-status {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 10px;
    color: #8fedb8;
    border: 1px solid rgba(46, 213, 115, 0.22);
    border-radius: 999px;
    background: rgba(46, 213, 115, 0.08);
    font-size: 0.67rem;
    font-weight: 600;
}
.api-status::before {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    content: "";
    background: var(--green);
    box-shadow: 0 0 9px rgba(46, 213, 115, 0.75);
}
.api-panel > p {
    margin: 0;
    color: #a5c0cd;
    font-size: 0.79rem;
    line-height: 1.75;
}
/* ---------- API code window ---------- */
.api-example {
    margin: 20px 0;
    overflow: hidden;
    border: 1px solid rgba(131, 211, 245, 0.16);
    border-radius: 10px;
    background: #04111b;
}
.api-example::before {
    display: block;
    padding: 9px 13px;
    color: #7da5b7;
    border-bottom: 1px solid rgba(131, 211, 245, 0.11);
    background: rgba(46, 196, 255, 0.035);
    content: "REQUEST EXAMPLE";
    font-family: "Courier New", monospace;
    font-size: 0.62rem;
    font-weight: 700;
    letter-spacing: 0.08em;
}
.api-example pre {
    margin: 0;
    padding: 16px;
    overflow-x: auto;
    color: #a6eec2;
    font-family: "Courier New", monospace;
    font-size: 0.69rem;
    line-height: 1.65;
    white-space: pre;
}
.api-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: auto;
}
.api-buttons button,
.integration-card button,
.automation-card .card-header button,
.automation-grid button {
    min-height: 38px;
    padding: 8px 12px;
    color: #acd0de;
    border: 1px solid rgba(137, 212, 245, 0.2);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.025);
    font-size: 0.71rem;
    font-weight: 500;
    cursor: pointer;
    transition: 0.2s ease;
}
.api-buttons button:first-child {
    color: #04131f;
    border-color: var(--cyan);
    background: var(--cyan);
}
.api-buttons button:hover,
.integration-card button:hover,
.automation-card .card-header button:hover,
.automation-grid button:hover {
    transform: translateY(-2px);
    color: #ffffff;
    border-color: rgba(46, 196, 255, 0.48);
    background: rgba(46, 196, 255, 0.1);
}
.api-buttons button:first-child:hover {
    color: #04131f;
    background: #7ce3ff;
    box-shadow: 0 10px 22px rgba(46, 196, 255, 0.25);
}
/* ---------- Integration cards ---------- */
.integration-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
}
.integration-card {
    display: flex;
    flex-direction: column;
    min-height: 222px;
    padding: 20px;
    transition:
        transform 0.22s ease,
        border-color 0.22s ease,
        background 0.22s ease;
}
.integration-card:hover {
    transform: translateY(-4px);
    border-color: rgba(46, 196, 255, 0.35);
    background:
        linear-gradient(145deg, rgba(19, 52, 75, 0.85), rgba(8, 27, 43, 0.88));
}
.integration-icon {
    display: grid;
    width: 47px;
    height: 47px;
    margin-bottom: 16px;
    color: #06131f;
    border-radius: 10px;
    background: linear-gradient(135deg, #8be8ff, #2ec4ff);
    font-family: "Courier New", monospace;
    font-size: 0.71rem;
    font-weight: 700;
    place-items: center;
}
.integration-card:nth-child(2) .integration-icon {
    background: linear-gradient(135deg, #bde7ff, #6aaefb);
}
.integration-card:nth-child(3) .integration-icon {
    color: #07190f;
    background: linear-gradient(135deg, #a5f4c6, #2ed573);
    font-size: 0.62rem;
}
.integration-card:nth-child(4) .integration-icon {
    color: #211402;
    background: linear-gradient(135deg, #ffdf9e, #ffb142);
    font-size: 0.58rem;
}
.integration-card h3 {
    margin: 0;
    color: #e6f8ff;
    font-size: 0.85rem;
    font-weight: 600;
}
.integration-card p {
    margin: 10px 0 17px;
    color: #95b3c1;
    font-size: 0.73rem;
    line-height: 1.65;
}
.integration-card button {
    margin-top: auto;
    align-self: flex-start;
}
/* ---------- Automated pipeline ---------- */
.automation-card {
    margin-top: 24px;
}
.automation-card .card-header {
    margin-bottom: 24px;
}
.automation-flow {
    display: flex;
    align-items: stretch;
    justify-content: space-between;
    gap: 10px;
}
.flow-item {
    flex: 1;
    min-width: 0;
    padding: 14px;
    border: 1px solid rgba(133, 211, 244, 0.14);
    border-radius: 10px;
    background: rgba(3, 17, 29, 0.28);
    text-align: center;
}
.flow-number {
    display: grid;
    width: 30px;
    height: 30px;
    margin: 0 auto 11px;
    color: #04131f;
    border-radius: 50%;
    background: var(--cyan);
    font-size: 0.71rem;
    font-weight: 700;
    place-items: center;
}
.flow-item:nth-of-type(3) .flow-number {
    background: var(--green);
}
.flow-item:nth-of-type(5) .flow-number {
    background: #9fb9ff;
}
.flow-item:nth-of-type(7) .flow-number {
    background: var(--orange);
}
.flow-item h4 {
    margin: 0;
    color: #e5f8ff;
    font-size: 0.75rem;
    font-weight: 600;
}
.flow-item p {
    margin: 8px 0 0;
    color: #8daeba;
    font-size: 0.67rem;
    line-height: 1.5;
}
.flow-arrow {
    display: grid;
    flex: 0 0 20px;
    color: #63d8ff;
    font-size: 1.1rem;
    place-items: center;
}
/* ---------- Batch workflow grid ---------- */
.automation-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 18px;
    margin-top: 24px;
}
.automation-grid .glass-card {
    display: flex;
    flex-direction: column;
    min-height: 210px;
    padding: 21px;
}
.automation-grid h3 {
    margin: 0;
    color: #e6f9ff;
    font-size: 0.89rem;
    font-weight: 600;
}
.automation-grid p {
    margin: 11px 0 17px;
    color: #96b4c1;
    font-size: 0.74rem;
    line-height: 1.65;
}
.automation-grid > .glass-card > button {
    align-self: flex-start;
    margin-top: auto;
}
.upload-box {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
    gap: 12px;
    min-height: 100px;
    margin-top: auto;
    padding: 15px;
    border: 1px dashed rgba(46, 196, 255, 0.34);
    border-radius: 10px;
    background: rgba(46, 196, 255, 0.045);
}
.upload-box span {
    color: #9ccada;
    font-size: 0.71rem;
}
.upload-box button {
    color: #06131f;
    border-color: var(--cyan);
    background: var(--cyan);
}
.automation-grid ul {
    display: grid;
    gap: 8px;
    margin: 14px 0 18px;
    padding-left: 17px;
    color: #a7c3cf;
    font-size: 0.72rem;
    line-height: 1.4;
}
.automation-grid li::marker {
    color: var(--cyan);
}
/* ---------- Security panel ---------- */
.security-panel {
    margin-top: 24px;
}
.security-panel > h3 {
    margin: 0 0 19px;
    color: #e7f9ff;
    font-size: 0.92rem;
    font-weight: 600;
}
.security-items {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
}
.security-items > div {
    padding: 15px;
    border: 1px solid rgba(133, 211, 244, 0.12);
    border-radius: 10px;
    background: rgba(3, 17, 29, 0.27);
}
.security-items strong {
    display: block;
    margin-top: 8px;
    color: #dff5fc;
    font-size: 0.78rem;
    font-weight: 600;
}
.security-items p {
    margin: 6px 0 0;
    color: #91afbc;
    font-size: 0.71rem;
    line-height: 1.55;
}
/* ---------- Responsive integrations section ---------- */
@media (max-width: 1080px) {
    .integration-section {
        padding: 88px 4%;
    }
    .integration-layout {
        grid-template-columns: 1fr;
    }
    .api-panel {
        min-height: auto;
    }
    .automation-flow {
        display: grid;
        grid-template-columns: repeat(4, 1fr);
    }
    .flow-arrow {
        display: none;
    }
}
@media (max-width: 760px) {
    .integration-section {
        padding: 72px 22px;
    }
    .integration-grid,
    .automation-grid {
        grid-template-columns: 1fr;
    }
    .integration-card,
    .automation-grid .glass-card {
        min-height: auto;
    }
    .automation-flow {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 11px;
    }
    .security-items {
        grid-template-columns: 1fr;
    }
    .api-example pre {
        padding: 14px;
        font-size: 0.63rem;
    }
    .api-buttons {
        display: grid;
        grid-template-columns: 1fr;
    }
    .api-buttons button {
        width: 100%;
    }
}
@media (max-width: 430px) {
    .automation-flow {
        grid-template-columns: 1fr;
    }
}
