/* Redesigned Premium Horizontal Security Ecosystem Visualization Stylesheet */

.security-section {
    position: relative;
    color: var(--color-primary);
    overflow: hidden;
    padding: 100px 0;
    border-top: 1px solid var(--color-border);
    border-bottom: 1px solid var(--color-border);
    /* Subtle warm white, gold, and light yellow-orange radial backdrop environment */
    background: radial-gradient(circle at 75% 50%, rgba(255, 92, 53, 0.04) 0%, rgba(254, 243, 199, 0.05) 50%, #fafbfc 100%);
}

.security-grid {
    display: grid;
    grid-template-columns: 40fr 60fr; /* 40% left content, 60% right visual pipeline */
    gap: 48px;
    align-items: center;
    width: 100%;
}

/* ====================================================
   LEFT COLUMN: SECURITY CONTENT & DYNAMIC CARD
   ==================================================== */
.security-content {
    width: 100%;
}

.security-title {
    font-size: 2.75rem;
    font-weight: 800;
    line-height: 1.15;
    color: var(--color-primary);
    margin-bottom: 24px;
    letter-spacing: -0.01em;
}

.security-title span {
    color: var(--color-accent);
}

.security-desc {
    font-size: 1.05rem;
    color: var(--color-text-muted);
    line-height: 1.6;
    margin-bottom: 32px;
}

/* Redesigned Dynamic Feature Explanation Card */
.security-info-panel {
    margin-top: 36px;
    padding: 24px 28px;
    background: #ffffff;
    border-left: 3px solid var(--color-accent);
    border-radius: var(--radius-sm) var(--radius-md) var(--radius-md) var(--radius-sm);
    min-height: 140px;
    box-shadow: 0 4px 20px rgba(255, 92, 53, 0.02), 0 1px 3px rgba(0, 0, 0, 0.02);
    border-top: 1px solid rgba(255, 92, 53, 0.04);
    border-right: 1px solid rgba(255, 92, 53, 0.04);
    border-bottom: 1px solid rgba(255, 92, 53, 0.04);
    position: relative;
    transition: box-shadow 0.3s ease;
}

.security-info-panel::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border-radius: inherit;
    box-shadow: 0 0 20px rgba(255, 92, 53, 0.06);
    opacity: 0;
    transition: opacity 0.4s ease;
    pointer-events: none;
}

.security-info-panel.glow-active::before {
    opacity: 1;
}

.security-info-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--color-primary);
    margin-bottom: 10px;
    transition: opacity 0.25s ease, transform 0.25s ease;
}

.security-info-desc {
    font-size: 0.95rem;
    color: var(--color-text-muted);
    line-height: 1.55;
    transition: opacity 0.25s ease, transform 0.25s ease;
}

.text-fade-out {
    opacity: 0 !important;
    transform: translateY(-4px) !important;
}

.text-fade-in {
    animation: textSlideUp 0.3s forwards cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes textSlideUp {
    from {
        opacity: 0;
        transform: translateY(4px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ====================================================
   RIGHT COLUMN: HORIZONTAL PIPELINE VISUALIZATION
   ==================================================== */
.security-visualization {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    height: 550px;
}

.security-network-container {
    position: relative;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Dynamic Radial Accent Glow behind Security Core */
.sec-viz-glow-core {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 280px;
    height: 280px;
    background: radial-gradient(circle, rgba(255, 92, 53, 0.08) 0%, rgba(255, 92, 53, 0) 70%);
    pointer-events: none;
    z-index: 2;
    transition: opacity 0.4s ease;
}

/* SVG Infrastructure Connections */
.sec-connections-svg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1;
}

.sec-connection-path {
    fill: none;
    stroke: rgba(0, 0, 0, 0.09); /* boldened from 0.04 */
    stroke-width: 2.5px; /* boldened from 1.5px */
    transition: stroke 0.3s ease, stroke-width 0.3s ease;
}

/* Glowing connector circle points */
.sec-connector-node {
    fill: #ffffff;
    stroke: rgba(0, 0, 0, 0.06);
    stroke-width: 1.5px;
    transition: fill 0.3s ease, stroke 0.3s ease;
}

/* Lightweight Animated Data Particles */
.sec-data-particle {
    fill: var(--color-accent);
    filter: drop-shadow(0 0 2px var(--color-accent));
}

/* Central Security Core Style */
.security-core {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 180px; /* adjusted for shield proportions */
    height: 180px;
    background: url('../assets/logos/media_1787246335358.png') no-repeat center center;
    background-size: contain;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 20;
    filter: drop-shadow(0 8px 24px rgba(0, 0, 0, 0.04));
    transition: transform 0.4s ease, filter 0.4s ease;
}

/* Shield Symbol inside Core - hidden since we use the shield background */
.security-core-shield {
    display: none;
}

.security-core-label {
    font-size: 0.68rem;
    font-weight: 750;
    color: #0f172a !important; /* dark navy for high readability on yellow background */
    letter-spacing: 0.02em;
    text-transform: uppercase;
    margin-top: 5px; /* aligned perfectly in the shield bounds */
    margin-bottom: 5px;
    text-align: center;
    max-width: 110px;
    line-height: 1.35;
}

.security-core-label strong {
    font-weight: 900;
    font-size: 0.82rem; /* increased from parent font-size of 0.68rem */
    display: block; /* puts it cleanly on its own top line */
    margin-bottom: 2px;
    color: #0f172a !important;
}

/* Small status indicator showing: "Protected" */
.security-core-status {
    font-size: 0.65rem;
    font-weight: 800;
    color: #047857 !important; /* darker emerald green for high contrast on yellow */
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
}

.security-core-status::before {
    content: '';
    display: block;
    width: 5px;
    height: 5px;
    background-color: #047857; /* changed to match text color */
    border-radius: 50%;
    animation: statusPulse 1.5s infinite ease-in-out;
}

@keyframes statusPulse {
    0%, 100% { opacity: 0.4; transform: scale(0.8); }
    50% { opacity: 1; transform: scale(1.2); }
}

/* Core breathing/pulse animation when running */
.animate-in .security-core {
    animation: coreBreath 5s ease-in-out infinite alternate;
}

@keyframes coreBreath {
    0% { transform: translate(-50%, -50%) scale(1); filter: drop-shadow(0 8px 24px rgba(0, 0, 0, 0.06)); }
    100% { transform: translate(-50%, -50%) scale(1.03); filter: drop-shadow(0 12px 32px rgba(255, 92, 53, 0.1)); }
}

/* ====================================================
   PRODUCT NODE CARDS DESIGN
   ==================================================== */
.sec-node-card {
    position: absolute;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(4px);
    border: 1px solid rgba(0, 0, 0, 0.05);
    border-radius: var(--radius-md);
    padding: 12px 18px; /* increased from 10px 16px */
    display: flex;
    align-items: center;
    gap: 10px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.015);
    z-index: 10;
    user-select: none;
    will-change: transform, opacity;
    transition: transform 0.4s ease, border-color 0.4s ease, box-shadow 0.4s ease, background-color 0.4s ease;
}

.sec-node-logo {
    width: 24px; /* increased from 20px */
    height: 24px;
    object-fit: contain;
    flex-shrink: 0;
    display: block;
    transition: transform 0.3s ease;
}

.sec-node-name {
    font-size: 0.85rem; /* increased from 0.8rem */
    font-weight: 700;
    color: var(--color-primary);
    white-space: nowrap;
}

/* Product priority heights and spacing scaling */
.sec-node-card.primary-node {
    padding: 16px 26px; /* increased from 14px 22px */
    border-radius: var(--radius-lg);
    z-index: 15;
}

.sec-node-card.primary-node .sec-node-logo {
    width: 32px; /* increased from 28px */
    height: 32px;
}

.sec-node-card.primary-node .sec-node-name {
    font-size: 1.05rem; /* increased from 0.95rem */
}

.sec-node-card.secondary-node {
    padding: 14px 22px; /* increased from 12px 18px */
    z-index: 12;
}

.sec-node-card.secondary-node .sec-node-logo {
    width: 28px; /* increased from 24px */
    height: 28px;
}

.sec-node-card.secondary-node .sec-node-name {
    font-size: 0.92rem; /* increased from 0.86rem */
}

/* Positions of 4 diagonal security cards mapping coordinates relative to center (50%, 50%) */
.node-auth         { top: 22%; left: 20%; transform: translate(-50%, -50%); background: rgba(16, 185, 129, 0.04) !important; border-color: rgba(16, 185, 129, 0.2) !important; }
.node-data         { top: 22%; left: 80%; transform: translate(-50%, -50%); background: rgba(16, 185, 129, 0.04) !important; border-color: rgba(16, 185, 129, 0.2) !important; }
.node-access       { top: 78%; left: 20%; transform: translate(-50%, -50%); background: rgba(16, 185, 129, 0.04) !important; border-color: rgba(16, 185, 129, 0.2) !important; }
.node-audit        { top: 78%; left: 80%; transform: translate(-50%, -50%); background: rgba(16, 185, 129, 0.04) !important; border-color: rgba(16, 185, 129, 0.2) !important; }

/* Subtext and status indicator layout inside security cards */
.sec-card-text {
    display: flex;
    flex-direction: column;
    text-align: left;
}

.sec-node-subtext {
    font-size: 0.72rem;
    color: var(--color-text-muted);
    font-weight: 500;
    margin-top: 2px;
}

.sec-status-dot {
    width: 6px;
    height: 6px;
    background-color: #10b981;
    border-radius: 50%;
    margin-left: 12px;
    box-shadow: 0 0 8px #10b981;
}

/* Subtle GPU-friendly diagonal floating offsets */
.animate-in .node-auth   { animation: floatNW 8s ease-in-out infinite alternate; }
.animate-in .node-data   { animation: floatNE 9s ease-in-out infinite alternate; }
.animate-in .node-access { animation: floatSW 7s ease-in-out infinite alternate; }
.animate-in .node-audit  { animation: floatSE 8s ease-in-out infinite alternate; }

@keyframes floatNW { 0% { transform: translate3d(-50%, -50%, 0); } 100% { transform: translate3d(calc(-50% - 3px), calc(-50% - 3px), 0); } }
@keyframes floatNE { 0% { transform: translate3d(-50%, -50%, 0); } 100% { transform: translate3d(calc(-50% + 3px), calc(-50% - 3px), 0); } }
@keyframes floatSW { 0% { transform: translate3d(-50%, -50%, 0); } 100% { transform: translate3d(calc(-50% - 3px), calc(-50% + 3px), 0); } }
@keyframes floatSE { 0% { transform: translate3d(-50%, -50%, 0); } 100% { transform: translate3d(calc(-50% + 3px), calc(-50% + 3px), 0); } }

/* ====================================================
   INTERACTION PHASE HIGHLIGHTS DEFINITION
   ==================================================== */

/* Highlight active connection lines */
.active-phase-0 #path-auth,
.active-phase-1 #path-data,
.active-phase-2 #path-access,
.active-phase-3 #path-audit {
    stroke: #10b981 !important;
    stroke-width: 4.5px !important;
    opacity: 0.85 !important;
}

/* Highlight active security capability cards */
.active-phase-0 .node-auth,
.active-phase-1 .node-data,
.active-phase-2 .node-access,
.active-phase-3 .node-audit {
    border-color: #10b981 !important;
    background: rgba(16, 185, 129, 0.12) !important;
    box-shadow: 0 8px 20px rgba(16, 185, 129, 0.15) !important;
    transform: translate(-50%, -50%) scale(1.03) !important;
}

/* Core glow highlights matching features */
.active-phase-0 .sec-viz-glow-core,
.active-phase-1 .sec-viz-glow-core,
.active-phase-2 .sec-viz-glow-core,
.active-phase-3 .sec-viz-glow-core { 
    background: radial-gradient(circle, rgba(16, 185, 129, 0.15) 0%, rgba(16, 185, 129, 0) 70%) !important; 
}

.active-phase-0 .security-core,
.active-phase-1 .security-core,
.active-phase-2 .security-core,
.active-phase-3 .security-core {
    filter: drop-shadow(0 10px 28px rgba(16, 185, 129, 0.12)) !important;
}
.active-phase-1 .security-core { border-color: rgba(78, 77, 108, 0.3); }
.active-phase-2 .security-core { border-color: rgba(234, 88, 12, 0.3); }
.active-phase-3 .security-core { border-color: rgba(255, 92, 53, 0.3); }


/* ====================================================
   RESPONSIVE DESIGN ADAPTATIONS
   ==================================================== */

@media (max-width: 1024px) {
    .security-grid {
        grid-template-columns: 1fr;
        gap: 40px;
    }
    
    .security-content {
        text-align: center;
    }
    
    .security-info-panel {
        max-width: 580px;
        margin: 36px auto 0;
        text-align: left;
    }
    
    .security-visualization {
        height: 460px;
    }

    /* Scaling visualization coordinates down for tablet sizes */
    .node-auth, .node-access { left: 18%; }
    .node-data, .node-audit  { left: 82%; }
}

@media (max-width: 768px) {
    .security-title {
        font-size: 2.25rem;
    }
    
    .security-visualization {
        height: 380px;
    }

    /* Shrink Security Core size for mobile */
    .security-core {
        width: 105px;
        height: 105px;
    }
    .security-core-shield {
        width: 24px;
        height: 24px;
        margin-bottom: 4px;
    }
    .security-core-label {
        font-size: 0.65rem;
    }

    /* Shrink capability nodes for mobile and fit within boundaries */
    .sec-node-card {
        padding: 8px 12px;
    }
    .sec-node-logo {
        width: 16px !important;
        height: 16px !important;
    }
    .sec-node-name {
        font-size: 0.75rem !important;
    }
    .sec-node-subtext {
        font-size: 0.58rem !important;
    }

    /* Mobile diagonal positions mapping */
    .node-auth   { top: 24%; left: 18%; }
    .node-data   { top: 24%; left: 82%; }
    .node-access { top: 76%; left: 18%; }
    .node-audit  { top: 76%; left: 82%; }

    /* Reduce float movement to save mobile redraws */
    @keyframes floatNW { 0% { transform: translate3d(-50%, -50%, 0); } 100% { transform: translate3d(calc(-50% - 1px), calc(-50% - 1px), 0); } }
    @keyframes floatNE { 0% { transform: translate3d(-50%, -50%, 0); } 100% { transform: translate3d(calc(-50% + 1px), calc(-50% - 1px), 0); } }
    @keyframes floatSW { 0% { transform: translate3d(-50%, -50%, 0); } 100% { transform: translate3d(calc(-50% - 1px), calc(-50% + 1px), 0); } }
    @keyframes floatSE { 0% { transform: translate3d(-50%, -50%, 0); } 100% { transform: translate3d(calc(-50% + 1px), calc(-50% + 1px), 0); } }
}

@media (prefers-reduced-motion: reduce) {
    .animate-in .sec-node-card,
    .animate-in .security-core,
    .security-core-status::before,
    .sec-data-particle {
        animation: none !important;
        transform: none !important;
    }
}