/* Estilos propios de /integraciones-api/ (extraídos del HTML original) */
/* Specific Styles for Integrations Page */
.integration-hero {
    text-align: center;
    max-width: 900px;
    margin: 0 auto;
    position: relative;
}

.integration-hero h1 {
    font-size: 3.5rem;
    line-height: 1.2;
    margin-bottom: 1.5rem;
}

.integration-hero .text-gradient {
    background: linear-gradient(135deg, #0ea5e9 0%, #3b82f6 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* Flow diagram animation */
.api-flow-diagram {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 2rem;
    margin: 4rem auto 0 auto;
    max-width: 800px;
}

.flow-node {
    color: var(--color-text-main);
    background: white;
    padding: 1.5rem 2rem;
    border-radius: 16px;
    box-shadow: 0 10px 30px -5px rgba(15, 23, 42, 0.1);
    border: 1px solid rgba(226, 232, 240, 0.8);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    min-width: 140px;
    position: relative;
    z-index: 2;
    transition: transform 0.3s ease;
}

.flow-node:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 35px -5px rgba(14, 165, 233, 0.2);
}

.flow-node.main {
    background: linear-gradient(135deg, #0ea5e9 0%, #3b82f6 100%);
    border: none;
    color: white;
    transform: scale(1.1);
}

.flow-node.main:hover {
    transform: scale(1.15);
}

.flow-node i {
    font-size: 2rem;
    color: var(--color-primary);
}

.flow-node.main i {
    color: white;
}

.flow-node span {
    font-weight: 600;
    font-size: 0.95rem;
}

.flow-line {
    height: 4px;
    flex: 1;
    background: #e2e8f0;
    position: relative;
    border-radius: 4px;
}

.flow-line::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    width: 20%;
    background: #0ea5e9;
    border-radius: 4px;
    animation: dataFlow 2s linear infinite;
}

.flow-line.reverse::after {
    animation: dataFlowReverse 2s linear infinite;
}

@keyframes dataFlow {
    0% {
        left: 0;
        opacity: 0;
    }

    10% {
        opacity: 1;
    }

    90% {
        opacity: 1;
    }

    100% {
        left: 80%;
        opacity: 0;
    }
}

@keyframes dataFlowReverse {
    0% {
        left: 80%;
        opacity: 0;
    }

    10% {
        opacity: 1;
    }

    90% {
        opacity: 1;
    }

    100% {
        left: 0%;
        opacity: 0;
    }
}

/* Modules Section */
.integration-section {
    padding: 6rem 0;
    background: rgba(248, 250, 252, 0.6);
}

.connector-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 3rem;
    margin-top: 4rem;
}

.connector-card {
    background: white;
    border-radius: var(--border-radius-lg);
    padding: 2.5rem;
    box-shadow: 0 10px 40px -10px rgba(15, 23, 42, 0.05);
    border: 1px solid rgba(226, 232, 240, 0.8);
    position: relative;
    overflow: hidden;
    transition: all 0.4s ease;
}

.connector-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 40px -10px rgba(14, 165, 233, 0.15);
    border-color: rgba(14, 165, 233, 0.4);
}

.connector-icon {
    width: 60px;
    height: 60px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
    margin-bottom: 1.5rem;
    background: rgba(241, 245, 249, 1);
}

.connector-card h3 {
    font-size: 1.4rem;
    margin-bottom: 1rem;
    color: var(--color-text-main);
}

.connector-card p {
    color: var(--color-text-muted);
    line-height: 1.6;
    margin-bottom: 1.5rem;
}

.connector-feature {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 0.8rem;
    font-size: 0.95rem;
    color: var(--color-text-main);
}

.connector-feature i {
    color: #10b981;
    font-size: 0.9rem;
}

/* Infrastructure Section */
.infra-section {
    padding: 6rem 0;
    background: #0f172a;
    color: white;
    position: relative;
    overflow: hidden;
}

.infra-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.03'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
}

.infra-content {
    position: relative;
    z-index: 2;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
}

.infra-text h2 {
    font-size: 2.5rem;
    margin-bottom: 1.5rem;
    color: white;
    line-height: 1.2;
}

.infra-text p {
    font-size: 1.1rem;
    color: rgba(255, 255, 255, 0.8);
    line-height: 1.7;
    margin-bottom: 2rem;
}

.infra-badges {
    display: flex;
    gap: 1.5rem;
    flex-wrap: wrap;
}

.cert-badge {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    padding: 1rem 1.5rem;
    border-radius: 12px;
    display: flex;
    align-items: center;
    gap: 1rem;
    backdrop-filter: blur(10px);
}

.cert-badge i {
    font-size: 2rem;
    color: #38bdf8;
}

.cert-badge div strong {
    display: block;
    color: white;
    font-size: 1.1rem;
    margin-bottom: 2px;
}

.cert-badge div span {
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.85rem;
}

@media (max-width: 992px) {
    .infra-content {
        grid-template-columns: 1fr;
    }

    .api-flow-diagram {
        flex-direction: column;
        gap: 1rem;
    }

    .flow-line {
        width: 4px;
        height: 40px;
        flex: none;
    }

    .flow-line::after {
        width: 100%;
        height: 20%;
        top: 0;
        left: 0;
    }

    @keyframes dataFlow {
        0% {
            top: 0;
            opacity: 0;
        }

        10% {
            opacity: 1;
        }

        90% {
            opacity: 1;
        }

        100% {
            top: 80%;
            opacity: 0;
        }
    }

    @keyframes dataFlowReverse {
        0% {
            top: 80%;
            opacity: 0;
        }

        10% {
            opacity: 1;
        }

        90% {
            opacity: 1;
        }

        100% {
            top: 0%;
            opacity: 0;
        }
    }
}

/* ==========================================================================
   Ajustes al estilo del sitio (tema dw)
   ========================================================================== */
.theme-dw .integration-hero h1 { font-size: clamp(2.2rem, 4.6vw, 3.4rem); }

/* Diagrama del hero: nodos de vidrio sobre el fondo oscuro */
.theme-dw .api-flow-diagram { margin-top: 3.5rem; }

.theme-dw .flow-node {
  min-width: 170px;
  padding: 1.25rem 1.5rem;
  color: #fff;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.22);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  box-shadow: 0 20px 40px -20px rgba(0, 0, 0, 0.6);
}

.theme-dw .flow-node i {
  width: 52px;
  height: 52px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.35rem;
  color: var(--dw-accent);
  background: rgba(56, 189, 248, 0.12);
  border: 1px solid rgba(56, 189, 248, 0.3);
}

.theme-dw .flow-node.main {
  background: linear-gradient(135deg, var(--dw-accent-dark), var(--dw-indigo));
  border: 1px solid rgba(255, 255, 255, 0.35);
  box-shadow: 0 0 0 8px rgba(58, 78, 242, 0.18), 0 24px 50px -16px rgba(58, 78, 242, 0.8);
}

.theme-dw .flow-node.main i {
  color: #fff;
  background: rgba(255, 255, 255, 0.18);
  border-color: rgba(255, 255, 255, 0.35);
}

.theme-dw .flow-node span { color: #fff; }

.theme-dw .flow-line {
  height: 2px;
  background: rgba(255, 255, 255, 0.18);
}

.theme-dw .flow-line::after {
  height: 4px;
  top: -1px;
  background: linear-gradient(90deg, transparent, var(--dw-accent));
  box-shadow: 0 0 12px var(--dw-accent);
}

/* Conectores */
.theme-dw .integration-section {
  background: #fff url('../../img/bg-tecnologia.svg') center / cover no-repeat;
}

.theme-dw .connector-grid {
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
  margin-top: 0;
}

.theme-dw .connector-card {
  padding: 2rem;
  border: 1px solid var(--dw-border);
  border-radius: 16px;
  box-shadow: 0 2px 10px rgba(13, 28, 119, 0.04);
}

.theme-dw .connector-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--dw-accent), var(--dw-indigo));
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.4s ease;
}

.theme-dw .connector-card:hover {
  transform: translateY(-6px);
  border-color: var(--dw-violet);
  box-shadow: 0 24px 48px -20px rgba(58, 78, 242, 0.35);
}

.theme-dw .connector-card:hover::before { transform: scaleX(1); }

.theme-dw .connector-icon {
  position: relative;
  width: 54px;
  height: 54px;
  font-size: 1.35rem;
  color: #fff;
  background: linear-gradient(135deg, var(--dw-accent-dark) 0%, var(--dw-indigo) 100%);
  box-shadow: 0 12px 24px -10px rgba(58, 78, 242, 0.65), inset 0 1px 0 rgba(255, 255, 255, 0.35);
}

.theme-dw .connector-icon::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: linear-gradient(160deg, rgba(255, 255, 255, 0.28), rgba(255, 255, 255, 0) 55%);
}

.theme-dw .connector-card h3 {
  font-size: 1.2rem;
  color: var(--dw-blue-800);
}

.theme-dw .connector-card p { font-size: 0.98rem; }

.theme-dw .connector-feature {
  margin: 0.8rem 0 0;
  padding-top: 0.8rem;
  border-top: 1px solid var(--dw-border);
  font-size: 0.92rem;
  font-weight: 500;
}

.theme-dw .connector-feature i {
  width: 22px;
  height: 22px;
  flex-shrink: 0;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.7rem;
  color: #fff;
  background: linear-gradient(135deg, var(--dw-accent-dark), var(--dw-indigo));
}

.theme-dw .connector-feature i::before { content: "\f00c"; }

/* Infraestructura */
.theme-dw .infra-section {
  background: linear-gradient(120deg, var(--dw-navy-900), var(--dw-navy-700));
}

.theme-dw .infra-text h2 {
  font-size: clamp(1.9rem, 3.2vw, 2.5rem);
  font-weight: 300;
}

.theme-dw .infra-text h2 strong { font-weight: 800; }

.theme-dw .eyebrow--light { color: var(--dw-accent); }

.theme-dw .infra-text p { font-size: 1.05rem; color: rgba(255, 255, 255, 0.82); }

.theme-dw .infra-text p strong { color: #fff; }

.theme-dw .infra-visual img {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 20px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  box-shadow: 0 40px 80px -30px rgba(0, 0, 0, 0.7);
}

.theme-dw .cert-badge {
  padding: 0.9rem 1.25rem;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.07);
  border-color: rgba(255, 255, 255, 0.18);
}

.theme-dw .cert-icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--dw-accent-dark), var(--dw-indigo));
  box-shadow: 0 10px 20px -10px rgba(58, 78, 242, 0.8);
}

.theme-dw .cert-badge .cert-icon i {
  font-size: 1.2rem;
  color: #fff;
}

@media (max-width: 1024px) {
  .theme-dw .connector-grid { grid-template-columns: 1fr; max-width: 560px; margin: 0 auto; }
}

@media (max-width: 992px) {
  .theme-dw .flow-line { width: 2px; height: 36px; }
  .theme-dw .flow-line::after { width: 4px; left: -1px; background: linear-gradient(180deg, transparent, var(--dw-accent)); }
}
