/* Removed hero-zoom animation as requested */


@keyframes pulsar {
    0% {
        opacity: 0;
        transform: scale(0.6);
    }

    50% {
        opacity: 0.6;
    }

    100% {
        opacity: 0;
        transform: scale(1);
    }
}

.animate-pulsar {
    animation: pulsar 4s infinite ease-out;
}

.juramento-line {
    transition: color 0.3s ease;
}

.juramento-line:hover {
    color: #2b5597;
}

/* --- Entrance Animations --- */
.animate-on-scroll {
    opacity: 0 !important;
    transform: translateY(30px);
    transition: opacity 0.8s cubic-bezier(0.22, 1, 0.36, 1), transform 0.8s cubic-bezier(0.22, 1, 0.36, 1);
    will-change: opacity, transform;
}

.animate-on-scroll.is-visible {
    opacity: 1 !important;
    transform: none;
}

/* Stagger delays */
.delay-100 {
    transition-delay: 0.1s;
}

.delay-200 {
    transition-delay: 0.2s;
}

.delay-300 {
    transition-delay: 0.3s;
}

/* --- Refined Puzzle System (Pseudo-elements) --- */

.puzzle-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0;
    /* Gap handled by borders for perfect interlock */
    width: 100%;
    margin: 0 auto;
    padding: 1rem;
}

.puzzle-item {
    position: relative;
    background-color: #2b5597;
    /* impact-blue */
    padding: 2rem;
    color: white;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    border-radius: 1rem;
    /* Rounded corners for the block */
    box-shadow: none;
    border: 10px solid #f5f5f5;
    /* Simulates gap while allowing interlock */
    transition: transform 0.3s ease-out, background-color 0.3s ease-out;
    min-height: 140px;
    z-index: 10;
    overflow: visible;
    /* Allow tabs to stick out */
}

.puzzle-item:hover {
    background-color: #1DA1F2;
    /* impact-blue-light */
    transform: scale(0.98);
}





/* --- Puzzle Tabs and Slots Generators --- */

/* Shape Base */
.puzzle-shape {
    position: absolute;
    width: 40px;
    /* Size of the connector */
    height: 40px;
    border-radius: 50%;
    z-index: 20;
    pointer-events: none;
}

/* Tab (Outie): Creates a bump. Same color as item. */
.puzzle-tab {
    background-color: inherit;
    /* Should match parent always */
    transition: inherit;
    /* Should match parent transition always */
    /* Add a small box-shadow to blend or stand out? 
       To look seamless with the block, no shadow on the connection side. */
}

/* Slot (Innie): Creates a hole visual. Same color as SECTION background. */
.puzzle-slot {
    background-color: #f5f5f5;
    /* impact-gray */
    box-shadow: none;
    z-index: 30;
}

/* Locations */
.shape-top {
    top: -20px;
    left: 50%;
    transform: translateX(-50%);
}

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

.shape-left {
    left: -20px;
    top: 50%;
    transform: translateY(-50%);
}

.shape-right {
    right: -20px;
    top: 50%;
    transform: translateY(-50%);
}

/* Responsive Logic Helpers */
.mobile-only {
    display: block;
}

.desktop-only {
    display: none;
}

@media (min-width: 768px) {
    .puzzle-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 0;
    }

    .mobile-only {
        display: none;
    }

    .desktop-only {
        display: block;
    }

    /* Adjust connector shapes: Wider (75px) but same protrusion (25px offset from 50px length) */
    .shape-top,
    .shape-bottom {
        width: 75px;
        height: 50px;
        border-radius: 50%;
    }

    .shape-left,
    .shape-right {
        width: 50px;
        height: 75px;
        border-radius: 50%;
    }

    /* Offsets based on 50px dimension (25px protrusion) */
    .shape-top {
        top: -25px;
    }

    .shape-bottom {
        bottom: -25px;
    }

    .shape-left {
        left: -25px;
    }

    .shape-right {
        right: -25px;
    }
}

/* Text Stylings */
.puzzle-text {
    font-family: 'Roboto', sans-serif;
    font-size: 1.1rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    position: relative;
    z-index: 40;
}



/* --- Responsive Logic --- */

/* Mobile (1 Column): Vertical Chain */
@media (max-width: 767px) {

    /* Rules for vertical stack */
    /* Items 1-5 have Bottom Tab */
    .puzzle-item:not(:last-child) .mobile-tab-bottom {
        display: block;
    }

    /* Items 2-6 have Top Slot */
    .puzzle-item:not(:first-child) .mobile-slot-top {
        display: block;
    }

    /* Hide desktop shapes */
    .desktop-shape {
        display: none;
    }
}

/* Desktop (2 Columns): 2x3 Grid */
@media (min-width: 768px) {
    .puzzle-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 0;
        /* Larger gap */
    }

    /* Hide mobile shapes */
    .mobile-shape {
        display: none;
    }

    .desktop-shape {
        display: block;
    }
}

/* Specific puzzle logic is applied via HTML elements helper classes or structure */
/* --- Puzzle Z-Index Stacking Order --- */
/* Ensures source pieces (Tabs) always sit on top of destination pieces (Slots) */
.puzzle-item-1 {
    z-index: 60;
}

.puzzle-item-2 {
    z-index: 50;
}

.puzzle-item-3 {
    z-index: 40;
}

.puzzle-item-4 {
    z-index: 30;
}

.puzzle-item-5 {
    z-index: 20;
}

.puzzle-item-6 {
    z-index: 10;
}

/* Ensure Blue Tabs (Balls) are always visible and 'pop' */
.puzzle-tab {
    z-index: 100 !important;
    /* Force high priority within the item */
    box-shadow: none;
}

/* Ensure Slots are strictly for cutting (lower than tabs if in same context, but higher than bg) */
.puzzle-slot {
    z-index: 5 !important;
}