/* Home Page Styles (css/home.css) */

/* Official USCIS Study Guide Brochure Covers */
img.brochure {
    margin: 10px;
    border-radius: 10px;
    border-top: 1px solid white;
    border-right: 6px solid #666;
}

/* Keep all SEO headings in DOM without visual clutter */
#title.seo-headings-source {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip-path: inset(50%);
    white-space: nowrap;
    border: 0;
}

/* Patriotic Swallowtail Pennant Bunting Banner Under Hero Title */
.patriotic-bunting-banner {
    position: relative;
    z-index: 20;
    width: 100%;
    max-width: 960px;
    margin: 0 auto 2px auto;
    padding: 0 28px 54px 28px;
    overflow: visible;
}

.bunting-string-svg {
    position: absolute;
    top: 0;
    left: 14px;
    width: calc(100% - 28px);
    height: 74px;
    pointer-events: none;
    z-index: 0;
    overflow: visible;
    filter: drop-shadow(0 1.5px 1.5px rgba(15, 23, 42, 0.24));
}

/* Clean Metallic Nails Pinning Both Ends of the White Cotton Rope */
.bunting-cord-end {
    position: absolute;
    top: 3px;
    width: 14px;
    height: 14px;
    pointer-events: none;
    z-index: 2;
    filter: drop-shadow(0 1.5px 1.5px rgba(15, 23, 42, 0.3));
}

.bunting-cord-end--left {
    left: 7px;
}

.bunting-cord-end--right {
    right: 7px;
}

#bunting-track {
    position: relative;
    z-index: 1;
    display: flex;
    flex-wrap: nowrap;
    align-items: flex-start;
    justify-content: center;
    gap: 8px;
}

.bunting-pennant {
    display: inline-flex;
    filter: drop-shadow(0 3px 4px rgba(15, 23, 42, 0.24));
    transform-origin: top center;
    transform: translateY(var(--drop, 0px)) rotate(var(--tilt, 0deg));
    user-select: none;
}

.bunting-pennant-wind {
    display: flex;
    width: 100%;
    transform-origin: top center;
    animation: pennantWind var(--wind-dur, 6s) ease-in-out var(--wind-delay, 0s) infinite;
    will-change: transform;
}

@keyframes pennantWind {
    0%, 100% {
        transform: perspective(260px) rotateX(0deg) rotateZ(0deg) skewX(0deg) scaleY(1);
    }
    25% {
        transform: perspective(260px) rotateX(10deg) rotateZ(1.8deg) skewX(-3.5deg) scaleY(0.95);
    }
    50% {
        transform: perspective(260px) rotateX(-6deg) rotateZ(-1.3deg) skewX(2.8deg) scaleY(1.03);
    }
    75% {
        transform: perspective(260px) rotateX(7deg) rotateZ(1deg) skewX(-2deg) scaleY(0.97);
    }
}

@media (prefers-reduced-motion: reduce) {
    .bunting-pennant-wind {
        animation: none;
    }
}

.bunting-pennant--slot {
    flex: 1 1 0;
    max-width: 142px;
    min-width: 0;
}

.bunting-pennant-body {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 38px;
    padding: 2px 8px 9px 8px;
    clip-path: polygon(0 0, 100% 0, 100% 100%, 50% 76%, 0 100%);
    box-sizing: border-box;
    text-align: center;
}

/* Subtle string grommet dots near top corners */
.bunting-pennant-body::before,
.bunting-pennant-body::after {
    content: "";
    position: absolute;
    top: 3px;
    width: 2.5px;
    height: 2.5px;
    border-radius: 9999px;
    background: rgba(15, 23, 42, 0.35);
    pointer-events: none;
}

.bunting-pennant-body::before { left: 6px; }
.bunting-pennant-body::after { right: 6px; }

.bunting-pennant--flag {
    width: 36px;
    height: 38px;
    flex-shrink: 0;
}

.bunting-flag-svg {
    display: block;
    width: 36px;
    height: 38px;
}

.bunting-pennant--navy {
    background-color: #172554;
    background-image:
        repeating-linear-gradient(45deg, rgba(255, 255, 255, 0.05) 0 1px, transparent 1px 11px),
        repeating-linear-gradient(-45deg, rgba(255, 255, 255, 0.05) 0 1px, transparent 1px 11px),
        linear-gradient(180deg, #1e3a8a 0%, #172554 100%);
    color: #ffffff;
}

.bunting-pennant--red {
    background-color: #c81e1e;
    background-image:
        repeating-linear-gradient(45deg, rgba(255, 255, 255, 0.06) 0 1px, transparent 1px 11px),
        linear-gradient(180deg, #dc2626 0%, #b91c1c 100%);
    color: #ffffff;
}

.bunting-pennant--white {
    background-color: #ffffff;
    background-image: linear-gradient(180deg, #ffffff 0%, #f5efe3 100%);
    color: #172554;
}

/* Smooth Slow Deep Blur -> Swap -> Unblur Text Transition */
.bunting-pennant-text {
    display: inline-block;
    font-family: 'Inter', system-ui, sans-serif;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.03em;
    text-transform: uppercase;
    line-height: 1.08;
    overflow-wrap: break-word;
    filter: blur(0px);
    opacity: 1;
    transition: filter 1.35s ease-out, opacity 1.25s ease-out;
    will-change: filter, opacity;
}

.bunting-pennant-text.word-blur-out {
    filter: blur(14px);
    opacity: 0.04;
    transition: filter 1.2s ease-in, opacity 1.15s ease-in;
}

/* Responsive compact sizing on narrow screens */
@media (max-width: 767px) {
    .patriotic-bunting-banner {
        padding: 0 18px 32px 18px;
    }

    .bunting-string-svg {
        left: 10px;
        width: calc(100% - 20px);
        height: 44px;
    }

    .bunting-cord-end {
        width: 11px;
        height: 11px;
        top: 1px;
    }

    .bunting-cord-end--left { left: 5px; }
    .bunting-cord-end--right { right: 5px; }

    #bunting-track {
        gap: 4px;
    }

    .bunting-pennant-body {
        height: 32px;
        padding: 2px 3px 7px 3px;
    }

    .bunting-pennant--flag,
    .bunting-flag-svg {
        width: 28px;
        height: 32px;
    }

    .bunting-pennant-text {
        font-size: 8.5px;
        letter-spacing: 0.01em;
    }
}
