/* ====== PROTOCOL PAGE STYLES ====== */

/* Hero Section */
.cta-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    background: #ffffff;
    color: #0d0d0d;
    border-radius: 9999px;
    text-decoration: none;
    font-weight: var(--font-weight-semibold);
    transition: all 0.3s ease;
    font-size: var(--fs-18-16);
    width: clamp(335px, calc(335px + 65 * ((100vw - 375px) / 1065)), 400px);
    height: 56px; /* Tablet/Mobile default */
    margin-inline: auto;
    margin: 64px auto 0;
}

@media (min-width: 992px) {
    .cta-btn {
        height: 64px;
    }

    /* Big screens */
}

.cta-btn:hover,
.cta-btn:focus,
.cta-btn:active {
    background: #ffffff;
    color: #0d0d0d;
    text-decoration: none;
}

/* Architecture Overview Section */
.architecture-overview {
    background: white;
    color: #121314;
    /* Section spacing handled by .section tokenized paddings */
}

.architecture-content {
    border: 2px solid #e0e0e0;
    background: white;
}

/* Architecture Image Enlargement */
.architecture-image {
    position: relative;
}

.tap-enlarge-btn {
    background: #e8e8e8;
    color: #333;
    border: none;
    border-radius: 25px;
    padding: 12px 40px;
    font-size: 14px;
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s ease;
    min-width: 180px;
    white-space: nowrap;
}

.tap-enlarge-btn:hover {
    background: #d5d5d5;
    transform: scale(1.05);
}

/* Image Modal */
.image-modal {
    display: flex;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.95);
    z-index: 9999;
    backdrop-filter: blur(5px);
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.image-modal.active {
    opacity: 1;
    visibility: visible;
}

.image-modal-content {
    position: relative;
    width: 95%;
    height: 95%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.image-modal-close {
    position: absolute;
    top: 20px;
    right: 20px;
    background: rgba(255, 255, 255, 0.9);
    color: #000;
    border: none;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    font-size: 18px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    z-index: 10001;
}

.image-modal-close:hover {
    background: white;
    transform: scale(1.1);
}

.image-container {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    width: 100%;
    height: 100%;
    position: relative;
}

.image-container img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    transition: transform 0.3s ease;
    cursor: move;
}

/* Zoom Controls */
.zoom-controls {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 10px;
    background: rgba(0, 0, 0, 0.7);
    padding: 10px;
    border-radius: 25px;
    backdrop-filter: blur(10px);
}

.zoom-btn {
    background: rgba(255, 255, 255, 0.2);
    color: white;
    border: none;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    font-size: 16px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.zoom-btn:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: scale(1.1);
}

/* Mobile specific styles */
@media (max-width: 767.98px) {
    .architecture-image img {
        cursor: pointer;
    }

    .tap-enlarge-btn {
        animation: pulse 2s infinite;
    }

    @keyframes pulse {
        0% {
            box-shadow: 0 0 0 0 rgba(255, 255, 255, 0.7);
        }
        70% {
            box-shadow: 0 0 0 10px rgba(255, 255, 255, 0);
        }
        100% {
            box-shadow: 0 0 0 0 rgba(255, 255, 255, 0);
        }
    }

    .image-modal-content {
        padding: 20px;
    }

    .zoom-controls {
        bottom: 40px;
    }

    .cards-wrapper {
        border-radius: 20px !important;
    }

    .architecture-content {
        padding: 20px;
    }

}

.section-header {
    text-align: left;
    margin-bottom: 3rem;
}


.section-subtitle {
    font-size: .8rem;
    color: #666;
    margin: 0;
    font-weight: 400;
}

/* Architecture Tags */
.architecture-tags {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 4rem;
    background: #121314;
    border-radius: 50px;
    padding: 5px;
}

.arch-tag {
    background: #f0f0f0;
    border: 1px solid #ddd;
    color: #121314;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
    letter-spacing: 0.5px;
    display: inline-flex;
    align-items: center;
    gap: 19px;
}

.arch-tag-icon {
    width: 25px;
    height: 25px;
    flex-shrink: 0;
}

/* Architecture Diagram */
.architecture-diagram {
    margin: 4rem 0;
}

.diagram-container {
    display: grid;
    grid-template-columns: 1fr 2fr 1fr;
    gap: 3rem;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
}

/* Data Sections */
.data-section h4 {
    text-align: center;
    font-weight: 600;
    margin-bottom: 1.5rem;
    color: #121314;
}

.data-items {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.data-item {
    background: #121314;
    border-radius: 8px;
    padding: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    height: 50px;
    width: 50px;
    margin: 0 auto;
}

.data-item img {
    width: 24px;
    height: 24px;
    filter: invert(1);
}

/* Central Barnabus Core */
.barnabus-core {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.operational-level,
.routing-level {
    display: flex;
    justify-content: center;
}

.operational-box,
.routing-box {
    background: #121314;
    color: white;
    padding: 1rem 2rem;
    border-radius: 8px;
    text-align: center;
    min-width: 250px;
}

.navar-box {
    background: #4a9eff;
}

.axon-box {
    background: #8b5cf6;
}

.level-label {
    font-size: 0.8rem;
    opacity: 0.8;
    display: block;
    margin-bottom: 0.5rem;
}

.operational-box h3,
.routing-box h3 {
    font-size: 1.5rem;
    font-weight: bold;
    margin: 0.5rem 0;
}

.subtitle {
    font-size: 0.9rem;
    opacity: 0.8;
}


.barnabus-logo h2 {
    font-size: 2.5rem;
    font-weight: 900;
    margin-bottom: 0.5rem;
}

.tagline {
    font-size: 0.95rem;
    line-height: 1.4;
    opacity: 0.9;
}

/* Agent Stack Section */
.agent-stack-section {
    /*padding: 4rem 0;*/
    /*background: #f8f9fa;*/
    transition: all 0.4s ease-in-out;
    overflow: hidden;
}

.agent-stack-section.slide-down {
    /*max-height: 2000px;*/
    opacity: 1;
}

.agent-stack-section.slide-up {
    max-height: 0;
    opacity: 0;
    padding: 0;
}

/* Agent Categories */
.agent-categories {
    /*margin-top: 3rem;*/
}

.agent-category {
    margin-bottom: 3rem;
}

.agent-category h4 {
    font-size: 24px;
    font-weight: var(--font-weight-semibold);
    margin-bottom: 1rem;
    color: #121314;
    text-align: left;
    text-transform: uppercase;
    /*letter-spacing: 1px;*/
}

/* Agent Cards */
.agent-card {
    background: white;
    padding: 1rem;
    border-radius: 20px;
    border: 1px solid #e8e8e8;
    height: 100%;
    transition: all 0.3s ease;
    /*box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);*/
}

.agent-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
    /*border-color: #3BF5FF;*/
    border-color: #121314;
}


.agent-card h5 {
    font-size: 20px;
    font-weight: var(--font-weight-semibold);
}

.agent-card p {
    font-size: 16px;
    color: #484E57;
    margin-bottom: 0;
    font-weight: var(--font-weight-regular);
}

/* Special styling for core intelligence agents */
.agent-barnabus {
    background: linear-gradient(135deg, #F6FFDB 0%, #F6FFDB 100%);
    border: 2px solid #121314;
}

.agent-barnabus h5 {
    color: #121314;
}

.agent-axon {
    background: linear-gradient(135deg, #EDE4FF 0%, #EDE4FF 100%);
    border: 2px solid #7C3AFF;
}

.agent-nayar {
    background: linear-gradient(135deg, #DEFDFF 0%, #DEFDFF 100%);
    border: 2px solid #3BF5FF;
}

/* Agent Stack Divider */
.agent-stack-divider {
    height: 2px;
    background: linear-gradient(90deg, transparent 0%, #121314 20%, #121314 80%, transparent 100%);
    margin: 3rem 0 0 0;
    width: 100%;
    margin-bottom: 45px;
    margin-top: 45px;
}

/* Toggle Button Styling */
#agentStackToggle {
    /*border: none;*/
    cursor: pointer;
    position: relative;
    z-index: 1;
}

#agentStackToggle:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
}

#toggleIcon {
    margin-left: 8px;
    font-size: 1.2rem;
    transition: transform 0.3s ease;
}

/* Agent Tags (keep existing for compatibility) */
.agent-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.agent-tag {
    background: #121314;
    color: white;
    padding: 6px 12px;
    border-radius: 16px;
    font-size: 14px;
    font-weight: 600;
}

/* Boundaries Section */
.boundaries-section {
    color: #121314;
    padding: var(--spacing-48-24) 0;
}

.boundaries-section h2 {
    color: #121314;
}

.boundaries-section p {
    margin-bottom: 0 !important;
}

.boundaries-cta {
    position: relative;
}

.boundaries-cta::before {
    content: '';
    position: absolute;
    top: 80%;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, transparent 0%, #000000 50%, #000000 50%, transparent 100%);
    transform: translateY(-50%);
    z-index: 0;
}

.cta-btn-outline {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    margin-top: var(--spacing-96-48);
    background: #E8E8E8;
    color: #121314;
    border: 2px solid #E8E8E8;
    padding: 0 32px; /* horizontal only to keep fixed height */
    height: 56px; /* Tablet/Mobile default */
    border-radius: 40px;
    text-decoration: none;
    font-weight: var(--font-weight-semibold);
    transition: all 0.3s ease;
    position: relative;
    z-index: 1;
}

@media (min-width: 992px) {
    .cta-btn-outline {
        height: 64px;
    }
}

.cta-btn-outline:hover {
    color: #0d0d0d;
    text-decoration: none;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
}

/* Active state for Agent Stack toggle */
.cta-btn-outline.is-active {
    background: #ffffff;
}

.cta-btn-outline img {
    width: 21px;
    height: 21px;
    /*margin-left: 8px;*/
}

/* Cards Section */
.cards-section {
    color: #121314;
    /*padding: 50px 0;*/
}

.cards-wrapper {
    border: 2px solid #7C3AFF;
    background: radial-gradient(ellipse 70% 35% at bottom center,
    rgba(124, 58, 255, 0.22) 0%,
    rgba(124, 58, 255, 0.15) 30%,
    rgba(124, 58, 255, 0.05) 60%,
    #ffffff 100%);
}

.info-card {
    height: 100%;
}

.info-card-right {
    padding-left: 30%;
}

@media (max-width: 767px) {
    .info-card-right {
        padding-left: 0;
        padding-top: 24px;
    }
}

.info-card p .highlight {
    color: #121314;
    font-weight: var(--font-weight-light);
    font-size: var(--fs-24-20);
}

/* Learning Motion Section */
.learning-motion-section {
    color: #121314;
}

.learning-motion-section .row {
    align-items: stretch;
}


.ep-learning-card {
    border: 2px solid #3BF5FF;
    border-radius: 32px;
    background: linear-gradient(to bottom,
    #ffffff 8%,
    #72f8ff 100%);
    height: 100%;
    display: flex;
    flex-direction: column;
}

.ep-alignment-card {
    border: 2px solid #D8FF5A;
    border-radius: 32px;
    /*background: linear-gradient(to bottom,*/
    /*#ffffff 8%,*/
    /*rgba(216, 255, 90, 0.45) 100%);*/


    background: radial-gradient(ellipse 70% 55% at bottom center,
    rgba(216, 255, 90, 0.35) 0%,
    rgba(216, 255, 90, 0.27) 30%,
    rgba(216, 255, 90, 0.17) 60%,
    #ffffff 100%);
}

.ep-evolving-card {
    border: 2px solid #EAEAEA;
    border-radius: 32px;
}

.ep-list {
    display: grid;
    gap: 12px;
    margin-top: var(--spacing-48-24);
}

.ep-list.tight {
    gap: 10px;
}

.ep-list-item {
    background: rgba(255, 255, 255);
    border-radius: 16px;
    padding: var(--spacing-24-16);
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: var(--spacing-24-16);
    text-align: left;
}

/* Mobile: center the content */
@media (max-width: 767.98px) {
    .ep-list-item {
        align-items: center;
        text-align: center;
    }
}

.ep-list-item h5 {
    font-size: var(--fs-24-20);
    font-weight: var(--font-weight-semibold);
    color: #121314;

    margin: 0;
    flex: 1;
}

.ep-list-item p {
    margin: 0;
    color: #484E57;
    font-size: 14px;
    font-weight: var(--font-weight-regular);
}

.ep-right-stack {
    display: flex;
    flex-direction: column;
    gap: 12px;
    height: 100%;
    width: 100%;
}

.ep-right-stack .ep-card {
    flex: 1 1 0;
}

.point-icon {
    background: #3BF5FF;
    width: 68px;
    height: 68px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.point-icon img {
    width: 42px;
    height: 42px;
}

/* Alignment as Architecture Section Styles */
.ep-alignment-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px 24px;
    margin-top: var(--spacing-48-24);
}

.ep-alignment-item {
    display: flex;
    align-items: flex-start;
    gap: 12px;
}

.checkmark-icon {
    border: 2px solid #121314;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    margin-top: 2px;
}

.checkmark {
    width: 18px;
    height: 8px;
    border: 2px solid #121314;
    border-top: none;
    border-right: none;
    transform: rotate(-45deg);
}

.alignment-content {
    flex: 1;
}

/* Mobile responsive */
@media (max-width: 767.98px) {
    .ep-alignment-grid {
        grid-template-columns: 1fr;
        gap: 12px;
    }
}

/* Evolving Protocol Section */
.evolving-protocol-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    align-items: center;
}

.evolving-left-column {
    padding-right: 1rem;
}

.evolving-right-column {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
    padding-left: 48px;
}
@media (max-width: 767px) {
    .evolving-right-column {
        padding-left: 0;
    }
}

/* Timeline Styles */
.timeline-container {
    position: relative;
    margin-top: 1.5rem;
    padding-left: 1rem;
}

.timeline-container::before {
    content: '';
    position: absolute;
    left: 23px;
    top: 0;
    bottom: 0;
    width: 2px;
    /*background-color: #e0e0e0;*/
    background: linear-gradient(to bottom, transparent, #121314 20%, #121314 80%, transparent);

}

.timeline-item {
    position: relative;
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.timeline-item:last-child {
    margin-bottom: 0;
}

.timeline-circle {
    width: 16px;
    height: 16px;
    /*border: 2px solid #e0e0e0;*/
    border-radius: 50%;
    background-color: white;
    flex-shrink: 0;
    position: relative;
    z-index: 2;
    margin-top: 17px;
    box-shadow: 0 0 2px 1px #121314;
}

.timeline-circle.active {
    background-color: #121314;
    border: #FFFFFF solid 1px;
    box-shadow: 0 0 10px 1.25px #121314;
}

.timeline-circle.active::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background-color: #121314;
}

.timeline-content {
    flex: 1;
}

.phase-label {
    margin: 0 0 4px;
    font-size: var(--fs-16-14);
    color: #484E57;
    font-weight: var(--font-weight-regular);
}

.timeline-item h5 {
    margin: 0;
    font-size: var(--fs-18-16);
    font-weight: var(--font-weight-regular);
    color: #121314;
    line-height: 1.4;
}

.timeline-item.active h5 {
    font-weight: var(--font-weight-semibold);
    color: #121314;
}

/* Quote Block Styles */
.quote-block {
    text-align: center;
    position: relative;
    padding: 2rem 1rem;
}

.quote-mark {
    font-size: 3rem;
    color: #3BF5FF;
    font-family: Georgia, serif;
    line-height: 1;
}

.quote-mark.opening {
    position: absolute;
    left: 14px;
    transform: translateY(-50%);
}

.quote-mark.closing {
    position: absolute;
    right: 14px;
    /*top: 50%;*/
    transform: translateY(-50%);
}

.quote-text {
    font-size: 24px;
    font-weight: var(--font-weight-light);
    color: #121314;
    line-height: 1.5;
    /*margin: 2rem 0;*/
    margin: 36px 0;
    text-align: left;
    /*padding-left: 48px;*/
}

/* Mobile responsive */
@media (max-width: 767.98px) {
    .evolving-protocol-layout {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .evolving-left-column {
        padding-right: 0;
    }
}

/* Learning Section */
.learning-section {
    background: #0d0d0d;
    background-image: radial-gradient(rgba(255, 255, 255, 0.07) 1px, transparent 1px);
    background-size: 10px 10px;
    color: white;
    padding: 80px 0;
}

.learning-section h2 {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.subtitle {
    font-size: 1rem;
    opacity: 0.7;
    margin-bottom: 2rem;
}

.learning-points {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.learning-point {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
}

.point-content h4 {
    font-size: 1.1rem;
    font-weight: 600;
    margin: 0;
    line-height: 1.4;
}

.alignment-features {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-bottom: 2rem;
}

.feature-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.feature-item i {
    color: #b8ff63;
    font-size: 1.1rem;
}

.evolving-protocol h3 {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.protocol-items {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.protocol-item {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    padding: 1rem 0;
}

.protocol-number {
    background: rgba(184, 255, 99, 0.2);
    color: #b8ff63;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.8rem;
    flex-shrink: 0;
}

.protocol-content h5 {
    font-size: 1rem;
    font-weight: 600;
    margin: 0 0 0.25rem 0;
}

.protocol-content p {
    font-size: 0.9rem;
    opacity: 0.7;
    margin: 0;
}

.protocol-description {
    margin-left: 1rem;
}

.protocol-description p {
    font-size: 0.9rem;
    opacity: 0.8;
    margin: 0;
    font-style: italic;
}

/* Responsive Design */
@media (max-width: 768px) {
    .hero h1 {
        font-size: 2.5rem;
    }

    .hero p {
        font-size: 1rem;
    }

    .diagram-container {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .data-items {
        flex-direction: row;
        justify-content: center;
        flex-wrap: wrap;
        gap: 0.5rem;
    }

    .operational-box,
    .routing-box {
        min-width: 200px;
    }

    .architecture-tags {
        gap: 8px;
    }

    .arch-tag {
        font-size: 0.75rem;
        padding: 6px 12px;
    }


    /* Mobile button styles - keep fixed height while reducing width padding */
    /*.cta-btn-outline {*/
    /*    padding: 0 20px;*/
    /*    font-size: 0.9rem;*/
    /*}*/

    /* Ensure boundaries-cta timeline is visible on mobile */
    .boundaries-cta {
        margin: 2rem 0;
    }

    .boundaries-cta::before {
        display: block;
    }
}