/* Header Styles from section-headers-showcase.html */

/* Style 5: Tech Grid Pattern */
.header-style-5 {
    font-size: 48px;
    font-weight: 700;
    text-align: center;
    position: relative;
    padding: 40px 0;
    color: #1a1a1a;
}

.header-style-5::before {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 300px;
    height: 100%;
    background-image: 
        repeating-linear-gradient(0deg, transparent, transparent 35px, rgba(0, 102, 255, 0.15) 35px, rgba(0, 102, 255, 0.15) 36px),
        repeating-linear-gradient(90deg, transparent, transparent 35px, rgba(0, 102, 255, 0.15) 35px, rgba(0, 102, 255, 0.15) 36px);
    z-index: -1;
}

/* Style 17: Smart Contract */
.header-style-17 {
    font-size: 48px;
    font-weight: 700;
    text-align: center;
    color: #1a1a1a;
    position: relative;
    padding: 30px 60px;
}

.contract-bracket {
    position: absolute;
    font-size: 60px;
    font-weight: 300;
    color: #0F91F2;
    opacity: 0.3;
    top: 50%;
    transform: translateY(-50%);
}

.contract-bracket.left {
    left: 0;
}

.contract-bracket.right {
    right: 0;
}

/* Style 23: All Combined - Hash + Grid + Gradient */
.header-style-23 {
    font-size: 48px;
    font-weight: 700;
    text-align: center;
    background: linear-gradient(135deg, #0F91F2, #3FEAC2);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    position: relative;
    padding: 40px 0;
}

.header-style-23::before {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 500px;
    height: 100%;
    background-image: 
        repeating-linear-gradient(0deg, transparent, transparent 30px, rgba(0, 102, 255, 0.05) 30px, rgba(0, 102, 255, 0.05) 31px),
        repeating-linear-gradient(90deg, transparent, transparent 30px, rgba(0, 212, 106, 0.05) 30px, rgba(0, 212, 106, 0.05) 31px);
    z-index: -1;
}

.header-style-23 .hash-decoration {
    font-size: 11px;
    font-family: 'Courier New', monospace;
    color: #0F91F2;
    opacity: 0.4;
    position: absolute;
    letter-spacing: 1px;
    animation: fadeInOut 4s ease-in-out infinite;
}

.header-style-23 .hash-decoration.top-left {
    top: 10px;
    left: 10%;
}

.header-style-23 .hash-decoration.top-right {
    top: 10px;
    right: 10%;
}

.header-style-23 .hash-decoration.bottom-left {
    bottom: 10px;
    left: 10%;
}

.header-style-23 .hash-decoration.bottom-right {
    bottom: 10px;
    right: 10%;
}

@keyframes fadeInOut {
    0%, 100% { opacity: 0.4; }
    50% { opacity: 0.8; }
}

/* Style 25: Dynamic Hash Flow with Tech Grid + Gradient + Multi-Color Hash */
.header-style-25 {
    font-size: 48px;
    font-weight: 700;
    text-align: center;
    background: linear-gradient(90deg, #0F91F2, #3FEAC2, #0F91F2);
    background-size: 200% auto;
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: gradientShift 3s ease infinite;
    position: relative;
    padding: 45px 0;
    margin: 0;
    z-index: 1;
}

/* Wrapper for Style 25 to contain all elements */
.style-25-wrapper {
    position: relative;
    display: block;
    width: 100%;
    overflow: visible;
    padding: 40px 0;
    margin: 20px 0;
}

/* Container for hash flows */
.style-25-wrapper .hash-flow-container {
    position: absolute;
    top: 50%;
    left: 0;
    transform: translateY(-50%);
    width: 35%;
    height: 120px;
    z-index: 1;
    pointer-events: none;
    overflow: visible;
}

/* Tech Grid on the left side */
.style-25-wrapper::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 0;
    transform: translateY(-50%);
    width: 35%;
    height: 120px;
    background-image: 
        repeating-linear-gradient(0deg, transparent, transparent 25px, rgba(0, 102, 255, 0.1) 25px, rgba(0, 102, 255, 0.1) 26px),
        repeating-linear-gradient(90deg, transparent, transparent 25px, rgba(0, 102, 255, 0.1) 25px, rgba(0, 102, 255, 0.1) 26px);
    mask-image: linear-gradient(90deg, rgba(0,0,0,0.8) 0%, rgba(0,0,0,0.4) 80%, rgba(0,0,0,0) 100%);
    -webkit-mask-image: linear-gradient(90deg, rgba(0,0,0,0.8) 0%, rgba(0,0,0,0.4) 80%, rgba(0,0,0,0) 100%);
    z-index: 0;
    overflow: hidden;
}

/* Grid corner hashes - positioned at actual grid corners */
.style-25-wrapper > span.grid-corner-hash {
    position: absolute;
    font-size: 8px;
    font-family: 'Courier New', monospace;
    font-weight: 400;
    z-index: 3;
    opacity: 0.6;
}

.style-25-wrapper > span.grid-corner-hash.grid-top-left {
    top: calc(50% - 60px);
    left: 5px;
    color: #0F91F2;
}

.style-25-wrapper > span.grid-corner-hash.grid-top-right {
    top: calc(50% - 60px);
    left: calc(35% - 35px);
    color: #3FEAC2;
}

.style-25-wrapper > span.grid-corner-hash.grid-bottom-left {
    top: calc(50% + 50px);
    left: 5px;
    color: #ff6b6b;
}

.style-25-wrapper > span.grid-corner-hash.grid-bottom-right {
    top: calc(50% + 50px);
    left: calc(35% - 35px);
    color: #4ecdc4;
}

/* Hash flows - positioned in the grid area */
.style-25-wrapper .hash-flow {
    position: absolute;
    font-size: 11px;
    font-family: 'Courier New', monospace;
    white-space: nowrap;
    color: #999999;
    z-index: 5;
    font-weight: 400;
    letter-spacing: 0.5px;
    opacity: 0.6;
}

.style-25-wrapper .hash-flow-container .hash-flow:first-child {
    top: 35%;
    animation: hashFlowSimple 10s linear infinite;
}

.style-25-wrapper .hash-flow-container .hash-flow:last-child {
    top: 65%;
    animation: hashFlowSimple 10s linear infinite;
    animation-delay: 5s;
}

/* Static corner hashes for the whole wrapper */
.style-25-wrapper .corner-hash {
    position: absolute;
    font-size: 14px;
    font-family: 'Courier New', monospace;
    font-weight: 700;
    z-index: 10;
    opacity: 1;
    text-shadow: 0 0 10px currentColor;
}

.style-25-wrapper .corner-hash.top-left {
    top: 0;
    left: 10px;
    color: #0F91F2;
}

.style-25-wrapper .corner-hash.top-right {
    top: 0;
    right: 10px;
    color: #3FEAC2;
}

.style-25-wrapper .corner-hash.bottom-left {
    bottom: 0;
    left: 10px;
    color: #ff6b6b;
}

.style-25-wrapper .corner-hash.bottom-right {
    bottom: 0;
    right: 10px;
    color: #4ecdc4;
}

@keyframes hashFlow {
    0% {
        transform: translateX(0);
        opacity: 0;
    }
    10% {
        opacity: 0.6;
    }
    90% {
        opacity: 0.6;
    }
    100% {
        transform: translateX(calc(100vw + 400px));
        opacity: 0;
    }
}

@keyframes hashFlowGrid {
    0% {
        transform: translateX(-300px);
        opacity: 0;
    }
    5% {
        transform: translateX(-200px);
        opacity: 0.8;
    }
    10% {
        transform: translateX(0);
        opacity: 0.8;
    }
    40% {
        transform: translateX(calc(35vw - 100px));
        opacity: 0.8;
    }
    45% {
        transform: translateX(calc(35vw));
        opacity: 0;
    }
    100% {
        transform: translateX(calc(35vw));
        opacity: 0;
    }
}

@keyframes gradientShift {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

@keyframes hashFlowInGrid {
    0% {
        transform: translateX(0);
    }
    100% {
        transform: translateX(calc(35vw + 400px));
    }
}

@keyframes hashFlowSimple {
    0% {
        left: -400px;
    }
    100% {
        left: calc(35% + 50px);
    }
}

/* Additional adjustments for existing headers */
.section-header .tech-grid-bg {
    position: relative;
}

/* Hide any existing tech-grid-bg backgrounds when using style-25-wrapper */
.style-25-wrapper + .tech-grid-bg,
.tech-grid-bg:has(.header-style-25) {
    background: none !important;
}

/* Override tech-grid-bg when inside style-25-wrapper */
.style-25-wrapper .tech-grid-bg::before {
    display: none !important;
}

/* Ensure proper stacking order */
.style-25-wrapper > * {
    position: relative;
    z-index: 5;
}

/* Fix for sections that have both style-25-wrapper and section-container */
.section-container .style-25-wrapper {
    margin-left: -20px;
    margin-right: -20px;
    padding-left: 20px;
    padding-right: 20px;
}

/* Ensure no duplicate backgrounds */
.product-showcase .tech-grid-bg,
.how-it-works .tech-grid-bg,
.benefits-section .tech-grid-bg,
.testimonials-section .tech-grid-bg,
.academic-institutions-section .tech-grid-bg {
    background: none !important;
}

.product-showcase .tech-grid-bg::before,
.how-it-works .tech-grid-bg::before,
.benefits-section .tech-grid-bg::before,
.testimonials-section .tech-grid-bg::before,
.academic-institutions-section .tech-grid-bg::before {
    display: none !important;
}

/* Ensure hash flows are visible */
.style-25-wrapper .hash-flow {
    display: block !important;
    visibility: visible !important;
}

/* Style 16: Distributed Nodes */
.header-style-16 {
    font-size: 48px;
    font-weight: 700;
    text-align: center;
    color: #1a1a1a;
    position: relative;
    padding: 40px 0;
}

.node {
    position: absolute;
    width: 12px;
    height: 12px;
    background: #0F91F2;
    border-radius: 50%;
    opacity: 0.6;
}

.node::after {
    content: '';
    position: absolute;
    width: 100%;
    height: 100%;
    border: 2px solid #0F91F2;
    border-radius: 50%;
    animation: nodePulse 2s infinite;
}

.node:nth-child(1) { top: 10%; left: 20%; animation-delay: 0s; }
.node:nth-child(2) { top: 30%; left: 10%; animation-delay: 0.5s; }
.node:nth-child(3) { top: 20%; right: 15%; animation-delay: 1s; }
.node:nth-child(4) { bottom: 20%; left: 25%; animation-delay: 1.5s; }
.node:nth-child(5) { bottom: 10%; right: 20%; animation-delay: 2s; }

@keyframes nodePulse {
    0% {
        transform: scale(1);
        opacity: 0.6;
    }
    50% {
        transform: scale(2);
        opacity: 0;
    }
    100% {
        transform: scale(1);
        opacity: 0;
    }
}

/* Style 15: Cryptographic Hash (for AS FEATURED BY) */
.header-style-15 {
    font-size: 48px;
    font-weight: 700;
    text-align: center;
    color: #1a1a1a;
    position: relative;
}

.hash-decoration {
    font-size: 12px;
    font-family: 'Courier New', monospace;
    color: #0F91F2;
    opacity: 0.5;
    position: absolute;
    letter-spacing: 2px;
}

.hash-decoration.top {
    top: -20px;
    left: 50%;
    transform: translateX(-50%);
}

.hash-decoration.bottom {
    bottom: -20px;
    left: 50%;
    transform: translateX(-50%);
}

/* Style 3: Modern Minimalist (for "See Blockchain in Action" header) */
.header-style-3 {
    font-size: 48px;
    font-weight: 300;
    text-align: center;
    letter-spacing: -1px;
    position: relative;
    margin-bottom: 40px;
    color: #1a1a1a;
}

.header-style-3 .highlight {
    font-weight: 700;
    position: relative;
    z-index: 1;
}

.header-style-3 .highlight::before {
    content: '';
    position: absolute;
    bottom: 0;
    left: -10px;
    right: -10px;
    height: 40%;
    background: rgba(0, 212, 106, 0.2);
    z-index: -1;
    transform: skewX(-5deg);
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .header-style-5,
    .header-style-17,
    .header-style-23,
    .header-style-25,
    .header-style-15,
    .header-style-3 {
        font-size: 32px;
    }
    
    .contract-bracket {
        font-size: 40px;
    }
    
    .style-25-wrapper::before {
        width: 50%;
    }
    
    .style-25-wrapper .corner-hash {
        font-size: 9px;
    }
}