/* ========================================
   THEORY SECTION
   ======================================== */
.theory-cards {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: var(--gap-md);
}

@media (max-width: 768px) {
    .theory-cards {
        grid-template-columns: 1fr;
    }
}

.theory-card {
    position: relative;
    overflow: hidden;
}

.theory-card .icon-bg {
    position: absolute;
    top: 0;
    right: 0;
    padding: 1rem;
    opacity: 0.08;
    transition: opacity var(--transition-normal);
}

.theory-card:hover .icon-bg {
    opacity: 0.15;
}

.theory-card .icon-bg .material-symbols-outlined {
    font-size: 7rem;
}

.theory-card h3 {
    color: var(--primary);
    font-size: 1.125rem;
    margin-bottom: 0.75rem;
}

.theory-card p {
    color: var(--text-primary);
    font-size: 0.875rem;
    line-height: 1.7;
    position: relative;
    z-index: 1;
}

/* ========================================
   ARCHITECTURE SECTION
   ======================================== */
.architecture-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--gap-md);
    position: relative;
}

@media (max-width: 768px) {
    .architecture-grid {
        grid-template-columns: 1fr;
    }
}

/* Connecting line */
.architecture-grid::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--primary), transparent);
    opacity: 0.3;
    z-index: 0;
}

@media (max-width: 768px) {
    .architecture-grid::before {
        display: none;
    }
}

.arch-card {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
}

.arch-card.center {
    transform: translateY(-0.5rem);
    border-width: 2px;
}

.arch-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.arch-label {
    font-size: 0.625rem;
    font-weight: 700;
    padding: 0.25rem 0.5rem;
    background: var(--bg-dark);
    border: 1px solid var(--primary);
    color: var(--primary);
    text-transform: uppercase;
}

.arch-card h3 {
    color: var(--primary);
    font-size: 1.125rem;
    margin-bottom: 0.75rem;
}

.arch-card p {
    font-size: 0.875rem;
    color: var(--text-muted);
    margin-bottom: 1rem;
}

.arch-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    flex: 1;
}

.arch-list li {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.875rem;
}

.arch-list .material-symbols-outlined {
    font-size: 1rem;
}

/* Progress Bar */
.progress-container {
    margin-top: auto;
    padding-top: 1rem;
    border-top: 1px solid var(--primary);
}

.progress-bar {
    height: 0.5rem;
    background: var(--bg-dark);
    border: 1px solid var(--primary);
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: var(--primary);
    width: 0;
    position: relative;
    animation: progressLoad 2s ease-out forwards, progressPulse 1.5s ease-in-out 2s infinite;
}

@keyframes progressLoad {
    from {
        width: 0;
    }

    to {
        width: 66%;
    }
}

@keyframes progressPulse {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0.7;
    }
}

.progress-fill::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.4), transparent);
    animation: shimmer 1.5s infinite;
    background-size: 200% 100%;
}

.progress-info {
    display: flex;
    justify-content: space-between;
    margin-top: 0.25rem;
    font-size: 0.75rem;
    color: var(--primary);
}

/* ========================================
   CAPABILITIES SECTION
   ======================================== */
.capabilities-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--gap-md);
}

@media (max-width: 992px) {
    .capabilities-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 640px) {
    .capabilities-grid {
        grid-template-columns: 1fr;
    }
}

.capability-card {
    cursor: pointer;
    transition: background var(--transition-normal);
}

.capability-card:hover {
    background: var(--bg-dark);
}

.capability-card h3 {
    color: var(--primary);
    font-size: 1.125rem;
    margin-bottom: 0.75rem;
}

.capability-card p {
    color: var(--text-muted);
    font-size: 0.875rem;
    line-height: 1.6;
    margin-bottom: 1.5rem;
    word-break: break-word;
    overflow-wrap: break-word;
}

/* Mini Visualizations */
.mini-chart {
    height: 8rem;
    background: var(--bg-dark);
    border: 1px solid var(--border);
    position: relative;
    overflow: hidden;
}

/* Bar Chart */
.bar-chart {
    display: flex;
    align-items: flex-end;
    justify-content: space-around;
    height: 100%;
    padding: 0.5rem;
}

.bar {
    width: 15%;
    background: var(--primary);
    transition: height 0.5s ease;
}

/* Network Map */
.network-map {
    background: url('../assets/network-map.svg');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

.network-map::after {
    display: none;
}

/* Gauge */
.gauge-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    padding: 1rem;
}

.gauge-labels {
    display: flex;
    justify-content: space-between;
    width: 100%;
    font-size: 0.625rem;
    color: var(--primary);
    margin-bottom: 0.25rem;
}

.gauge-bar {
    width: 100%;
    height: 0.5rem;
    background: var(--bg-card);
    border: 1px solid var(--border);
    overflow: hidden;
}

.gauge-fill {
    height: 100%;
    background: var(--primary);
    width: 70%;
}

/* ========================================
   DASHBOARD PREVIEW SECTION
   ======================================== */
.dashboard-section {
    position: relative;
    overflow: hidden;
}

/* Grid Background */
.dashboard-section::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image: radial-gradient(var(--primary) 1px, transparent 1px);
    background-size: 32px 32px;
    opacity: 0.1;
    pointer-events: none;
}

.dashboard-preview {
    position: relative;
    z-index: 1;
}

.browser-frame {
    border: 1px solid var(--primary);
    background: var(--bg-card);
    overflow: hidden;
}

.browser-header {
    height: 2.5rem;
    background: var(--bg-dark);
    border-bottom: 1px solid var(--primary);
    display: flex;
    align-items: center;
    padding: 0 1rem;
    gap: 0.5rem;
}

.browser-dot {
    width: 0.75rem;
    height: 0.75rem;
    background: var(--primary);
}

.browser-url {
    flex: 1;
    margin-left: 1rem;
    padding: 0.25rem 0.75rem;
    background: var(--bg-dark);
    border: 1px solid var(--border);
    font-size: 0.75rem;
    color: var(--text-muted);
    text-align: center;
}

.dashboard-content {
    display: grid;
    grid-template-columns: 4rem 1fr 280px;
    min-height: 500px;
}

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

/* Sidebar */
.dash-sidebar {
    background: var(--bg-card);
    border-right: 1px solid var(--border);
    padding: 1rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.5rem;
}

@media (max-width: 992px) {
    .dash-sidebar {
        flex-direction: row;
        justify-content: center;
    }
}

.dash-sidebar .logo-icon {
    width: 2.5rem;
    height: 2.5rem;
}

.dash-nav {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

@media (max-width: 992px) {
    .dash-nav {
        flex-direction: row;
    }
}

.dash-nav .material-symbols-outlined {
    cursor: pointer;
    transition: color var(--transition-fast);
}

.dash-nav .material-symbols-outlined:hover {
    color: var(--text-primary);
}

/* Map Area */
.dash-map {
    position: relative;
    background-size: cover;
    background-position: center;
}

.dash-map::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0.8));
}

.map-header {
    position: relative;
    z-index: 1;
    display: flex;
    justify-content: space-between;
    padding: 1rem;
}

.region-badge {
    background: var(--bg-dark);
    border: 1px solid var(--primary);
    padding: 0.75rem;
}

.region-badge h4 {
    font-size: 0.625rem;
    color: var(--primary);
    text-transform: uppercase;
    margin-bottom: 0.25rem;
}

.region-badge .location {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 700;
}

.region-badge .location-dot {
    width: 0.5rem;
    height: 0.5rem;
    background: var(--primary);
}

.map-controls {
    display: flex;
    gap: 0.5rem;
}

.map-controls button {
    width: 2.5rem;
    height: 2.5rem;
    background: var(--bg-dark);
    border: 1px solid var(--primary);
    color: var(--primary);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--transition-fast);
}

.map-controls button:hover {
    background: var(--primary);
    color: var(--bg-dark);
}

/* Map Markers */
.map-marker {
    position: absolute;
    cursor: pointer;
}

.marker-dot {
    width: 1rem;
    height: 1rem;
    background: var(--primary);
    position: relative;
}

.marker-dot::before {
    content: '';
    position: absolute;
    inset: -4px;
    background: var(--primary);
    opacity: 0.3;
    animation: pulse 2s infinite;
}

.marker-tooltip {
    position: absolute;
    left: 1.5rem;
    top: 0;
    background: var(--bg-dark);
    border: 1px solid var(--primary);
    padding: 0.5rem;
    font-size: 0.75rem;
    width: 10rem;
    opacity: 0;
    pointer-events: none;
    transition: opacity var(--transition-fast);
}

.map-marker:hover .marker-tooltip {
    opacity: 1;
}

/* Alerts Panel */
.dash-alerts {
    background: var(--bg-card);
    border-left: 1px solid var(--border);
    display: flex;
    flex-direction: column;
}

.alerts-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem;
    border-bottom: 1px solid var(--border);
}

.alerts-header h3 {
    color: var(--primary);
    font-size: 0.875rem;
    font-weight: 700;
}

.live-badge {
    background: var(--primary);
    color: var(--bg-dark);
    font-size: 0.625rem;
    font-weight: 700;
    padding: 0.25rem 0.5rem;
}

.alerts-list {
    flex: 1;
    overflow-y: auto;
    padding: 1rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.alert-item {
    padding: 0.75rem;
    border: 1px solid var(--border);
    cursor: pointer;
    transition: border-color var(--transition-fast);
}

.alert-item:hover {
    border-color: var(--primary);
}

.alert-meta {
    display: flex;
    justify-content: space-between;
    margin-bottom: 0.5rem;
}

.alert-id {
    font-size: 0.75rem;
    color: var(--primary);
}

.alert-time {
    font-size: 0.75rem;
    color: var(--text-dim);
}

.alert-text {
    font-size: 0.875rem;
    line-height: 1.5;
}