/* =====================================================================
   TWB — The Waffle & Brew Cafe
   Design tokens
   ===================================================================== */

.twb-page {
    --twb-ink: #0F2733;
    --twb-ink-soft: #3E5A66;
    --twb-white: #FFFFFF;
    --twb-offwhite: #EAF7FF;
    --twb-primary: #8CDBFC;
    --twb-primary-dark: #4FB8E3;
    --twb-primary-deep: #1C8FBF;
    --twb-navy: #123A4A;
    --twb-navy-light: #1F4E63;
    --twb-sky-light: #D3F1FE;
    --twb-line: rgba(15, 39, 51, .13);
    --twb-shadow: 0 20px 45px -18px rgba(15, 39, 51, .25);
    background: var(--twb-white);
    color: var(--twb-ink);
    overflow-x: clip;
    position: relative;
}

.twb-page * {
    box-sizing: border-box;
}

/* =====================================================================
   TYPOGRAPHY - Responsive
   ===================================================================== */
.twb-page .twb-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-family: var(--font-script);
    font-size: clamp(1.2rem, 3vw, 1.5rem);
    color: var(--twb-primary-deep);
    line-height: 1;
    margin-bottom: 10px;
}

.twb-page .twb-eyebrow::before {
    content: "";
    width: clamp(18px, 2vw, 26px);
    height: 2px;
    background: var(--twb-primary-dark);
    display: inline-block;
    border-radius: 2px;
}

.twb-page h1,
.twb-page h2,
.twb-page h3,
.twb-page h4 {
    font-family: var(--font-display);
    /* color: var(--twb-ink); */
    letter-spacing: -0.01em;
}

.twb-page h2 {
    font-size: clamp(1.8rem, 4vw, 2.8rem);
}

.twb-page .twb-accent {
    color: var(--twb-primary-dark);
    font-style: italic;
}

.twb-page .twb-section {
    padding: clamp(60px, 8vh, 110px) 0;
    position: relative;
}

/* =====================================================================
   REVEAL ON SCROLL
   ===================================================================== */
.twb-page .twb-reveal {
    opacity: 0;
    transform: translateY(38px);
    transition: opacity .9s cubic-bezier(.16, 1, .3, 1), transform .9s cubic-bezier(.16, 1, .3, 1);
}

.twb-page .twb-reveal.in-view {
    opacity: 1;
    transform: translateY(0);
}

.twb-page .twb-reveal-stagger.in-view > * {
    animation: twbFadeUp .8s cubic-bezier(.16, 1, .3, 1) both;
}

.twb-page .twb-reveal-stagger.in-view > *:nth-child(1) { animation-delay: .05s; }
.twb-page .twb-reveal-stagger.in-view > *:nth-child(2) { animation-delay: .15s; }
.twb-page .twb-reveal-stagger.in-view > *:nth-child(3) { animation-delay: .25s; }
.twb-page .twb-reveal-stagger.in-view > *:nth-child(4) { animation-delay: .35s; }
.twb-page .twb-reveal-stagger.in-view > *:nth-child(5) { animation-delay: .45s; }
.twb-page .twb-reveal-stagger.in-view > *:nth-child(6) { animation-delay: .55s; }

@keyframes twbFadeUp {
    from { opacity: 0; transform: translateY(30px) scale(.97); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

/* =====================================================================
   TOP BREW PROGRESS BAR
   ===================================================================== */
.twb-brew-progress {
    position: fixed;
    top: 0;
    left: 0;
    height: 4px;
    width: 0%;
    background: linear-gradient(90deg, var(--twb-primary), var(--twb-navy));
    z-index: 9999;
    box-shadow: 0 0 12px rgba(140, 219, 252, .8);
    transition: width .12s linear;
}

/* =====================================================================
   HERO - Fully Responsive
   ===================================================================== */
.twb-hero {
    min-height: 90vh;
    min-height: 90dvh;
    display: flex;
    align-items: center;
    position: relative;
    overflow: hidden;
    padding-top: clamp(70px, 12vh, 90px);
    background: var(--twb-ink);
}

.twb-hero-bg {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: 0;
    animation: twbHeroZoom 18s ease-in-out infinite alternate;
}

@keyframes twbHeroZoom {
    from { transform: scale(1); }
    to { transform: scale(1.08); }
}

.twb-hero-scrim {
    position: absolute;
    inset: 0;
    z-index: 1;
    background: linear-gradient(172deg, rgb(2 18 26 / 47%) 0%, rgb(6 31 43 / 67%) 32%, rgb(0 4 6 / 35%) 55%, rgb(1 18 26 / 15%) 75%), linear-gradient(0deg, rgb(4 23 33 / 55%), #0c010100 40%);
    /* background: linear-gradient(172deg, rgb(15 39 51 / 47%) 0%, rgb(15 39 51 / 67%) 32%, rgba(15, 39, 51, .35) 55%, rgba(15, 39, 51, .15) 75%), 
                linear-gradient(0deg, rgba(15, 39, 51, .55), transparent 40%); */
}

.twb-hero-inner {
    position: relative;
    z-index: 2;
    max-width: 700px;
    padding: 0 clamp(16px, 4vw, 40px);
    width: 100%;
}

.twb-hero-brand {
    display: flex;
    align-items: center;
    gap: clamp(10px, 2vw, 14px);
    margin-bottom: clamp(18px, 3vh, 26px);
    flex-wrap: wrap;
}

.twb-hero-logo {
    width: clamp(60px, 10vw, 100px);
    height: clamp(60px, 10vw, 100px);
    border-radius: 50%;
    object-fit: contain;
    background: var(--twb-primary);
    box-shadow: 0 0 0 4px rgba(140, 219, 252, .25);
    animation: twbLogoPulse 3.2s ease-in-out infinite;
    flex-shrink: 0;
}

@keyframes twbLogoPulse {
    0%, 100% { box-shadow: 0 0 0 4px rgba(140, 219, 252, .25); }
    50% { box-shadow: 0 0 0 10px rgba(140, 219, 252, .12); }
}

.twb-hero-brand span {
    color: var(--twb-white);
    font-family: var(--font-display);
    font-weight: 600;
    letter-spacing: .04em;
    text-transform: uppercase;
    font-size: clamp(1.4rem, 4vw, 2.95rem);
}

.twb-hero h1 {
    color: var(--twb-white);
    font-size: clamp(2rem, 7vw, 4.4rem);
    line-height: 1.05;
    margin-bottom: clamp(14px, 2vh, 22px);
}

.twb-hero h1 em {
    font-style: italic;
    color: var(--twb-primary);
    position: relative;
}

.twb-hero p.twb-lead {
    /* color: rgba(255, 255, 255, .8); */
    color: #fff;
    font-size: clamp(0.95rem, 1.6vw, 1.12rem);
    line-height: 1.8;
    max-width: 540px;
    margin-bottom: clamp(24px, 3vh, 34px);
}

.twb-hero-cta {
    display: flex;
    gap: clamp(10px, 2vw, 18px);
    flex-wrap: wrap;
}

.twb-scroll-cue {
    position: absolute;
    bottom: 34px;
    left: 50%;
    transform: translateX(-50%);
    color: rgba(255, 255, 255, .6);
    font-size: .78rem;
    letter-spacing: .16em;
    text-transform: uppercase;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    z-index: 2;
}

.twb-scroll-cue span {
    width: 1px;
    height: 34px;
    background: linear-gradient(var(--twb-primary), transparent);
    animation: twbScrollCue 1.8s ease-in-out infinite;
}

@keyframes twbScrollCue {
    0%, 100% { transform: scaleY(.4); opacity: .4; }
    50% { transform: scaleY(1); opacity: 1; }
}

/* =====================================================================
   BUTTONS
   ===================================================================== */
.twb-btn {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: clamp(12px, 2vh, 16px) clamp(20px, 3vw, 34px);
    border-radius: 50px;
    font-weight: 700;
    font-size: clamp(0.85rem, 1.2vw, 0.95rem);
    letter-spacing: .01em;
    border: none;
    cursor: pointer;
    overflow: hidden;
    isolation: isolate;
    transition: transform .45s cubic-bezier(.16, 1, .3, 1), box-shadow .45s;
    text-decoration: none;
}

.twb-btn-primary {
    background: var(--twb-primary);
    color: var(--twb-ink);
    box-shadow: 0 16px 34px -12px rgba(140, 219, 252, .7);
}

.twb-btn-outline {
    background: transparent;
    color: var(--twb-white);
    border: 2px solid rgba(255, 255, 255, .4);
}

.twb-btn::before {
    content: "";
    position: absolute;
    inset: 0;
    background: var(--twb-navy);
    border-radius: 50px;
    transform: translateY(101%);
    transition: transform .5s cubic-bezier(.65, 0, .35, 1);
    z-index: -1;
}

.twb-btn-primary:hover::before,
.twb-btn-outline:hover::before {
    transform: translateY(0);
}

.twb-btn-primary:hover,
.twb-btn-outline:hover {
    color: var(--twb-white);
    transform: translateY(-4px);
    box-shadow: 0 22px 40px -12px rgba(18, 58, 74, .55);
}

.twb-btn-outline:hover {
    border-color: transparent;
}

.twb-btn .twb-ripple {
    position: absolute;
    border-radius: 50%;
    background: rgba(255, 255, 255, .5);
    transform: scale(0);
    animation: twbRipple .6s ease-out;
    pointer-events: none;
}

@keyframes twbRipple {
    to { transform: scale(3); opacity: 0; }
}

/* =====================================================================
   ABOUT - Responsive
   ===================================================================== */
.twb-about-media {
    position: relative;
    height: clamp(320px, 50vh, 460px);
    min-height: 280px;
}

.twb-photo-card {
    position: absolute;
    border-radius: 18px;
    border: 6px solid var(--twb-white);
    box-shadow: var(--twb-shadow);
    background: linear-gradient(160deg, var(--twb-sky-light), var(--twb-offwhite));
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--twb-ink-soft);
    font-family: var(--font-script);
    font-size: clamp(1rem, 1.5vw, 1.3rem);
    text-align: center;
    padding: 18px;
    transition: transform .6s cubic-bezier(.16, 1, .3, 1);
    overflow: hidden;
}

.twb-photo-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.twb-photo-card.a {
    width: 62%;
    height: 78%;
    top: 0;
    left: 0;
    transform: rotate(-4deg);
    z-index: 2;
}

.twb-photo-card.b {
    width: 52%;
    height: 55%;
    right: 0;
    bottom: 0;
    transform: rotate(5deg);
    z-index: 3;
}

.twb-about-media:hover .twb-photo-card.a { transform: rotate(-7deg) translateY(-6px); }
.twb-about-media:hover .twb-photo-card.b { transform: rotate(8deg) translateY(-10px); }

.twb-badge-years {
    position: absolute;
    left: clamp(45%, 50%, 58%);
    top: clamp(5%, 6%, 8%);
    z-index: 4;
    background: var(--twb-navy);
    color: var(--twb-white);
    width: clamp(80px, 12vw, 108px);
    height: clamp(80px, 12vw, 108px);
    border-radius: 50%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    box-shadow: 0 14px 30px -8px rgba(18, 58, 74, .6);
    /* animation: twbSpinSlow 16s linear infinite; */
}

.twb-badge-years strong {
    font-family: var(--font-display);
    font-size: clamp(1.2rem, 2vw, 1.5rem);
    line-height: 1;
    /* animation: twbCounterSpin 16s linear infinite reverse; */
}

.twb-badge-years span {
    font-size: clamp(0.5rem, 0.8vw, .62rem);
    letter-spacing: .08em;
    text-transform: uppercase;
    /* animation: twbCounterSpin 16s linear infinite reverse; */
    line-height: 1.2;
}

@keyframes twbSpinSlow {
    from { transform: rotate(0deg); }
    to { transform: rotate(120deg); }
}

@keyframes twbCounterSpin {
    from { transform: rotate(0deg); }
    to { transform: rotate(-120deg); }
}

.twb-feature-row {
    display: flex;
    gap: 16px;
    align-items: flex-start;
    padding: 18px 0;
    border-top: 1px solid var(--twb-line);
}

.twb-feature-row:last-child { border-bottom: 1px solid var(--twb-line); }

.twb-f-ico {
    width: clamp(38px, 5vw, 46px);
    height: clamp(38px, 5vw, 46px);
    border-radius: 50%;
    background: var(--twb-offwhite);
    color: var(--twb-primary-deep);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    font-size: clamp(0.9rem, 1.2vw, 1.1rem);
    transition: transform .4s cubic-bezier(.34, 1.56, .64, 1), background .4s, color .4s;
}

.twb-feature-row:hover .twb-f-ico {
    background: var(--twb-primary);
    color: var(--twb-ink);
    transform: rotate(-12deg) scale(1.12);
}

/* =====================================================================
   SIGNATURE MENU
   ===================================================================== */
.twb-menu-scroller {
    display: flex;
    gap: clamp(16px, 2vw, 24px);
    overflow-x: auto;
    padding: 30px 6px 30px;
    scroll-snap-type: x mandatory;
    cursor: grab;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
}

.twb-menu-scroller::-webkit-scrollbar { display: none; }
.twb-menu-scroller.twb-dragging { cursor: grabbing; scroll-snap-type: none; }

.twb-ticket {
    flex: 0 0 clamp(200px, 25vw, 240px);
    scroll-snap-align: start;
    background: var(--twb-white);
    border-radius: 4px 4px 14px 14px;
    box-shadow: var(--twb-shadow);
    padding: 16px 16px 20px;
    transform-style: preserve-3d;
    transition: transform .15s ease-out, box-shadow .3s;
    position: relative;
}

.twb-ticket::before {
    content: "";
    position: absolute;
    top: -1px;
    left: 8px;
    right: 8px;
    height: 14px;
    background: radial-gradient(circle at 10px 0, transparent 8px, var(--twb-white) 8.5px) repeat-x;
    background-size: 20px 14px;
}

.twb-ticket-photo {
    height: clamp(120px, 18vw, 150px);
    border-radius: 4px;
    background: linear-gradient(155deg, var(--twb-primary), var(--twb-primary-deep));
    display: flex;
    align-items: center;
    justify-content: center;
    color: rgba(255, 255, 255, .85);
    font-size: clamp(1.8rem, 2.5vw, 2.2rem);
    margin-bottom: 14px;
    position: relative;
    overflow: hidden;
}

.twb-ticket-photo::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(115deg, transparent 40%, rgba(255, 255, 255, .35) 50%, transparent 60%);
    transform: translateX(-120%);
    transition: transform .7s;
}

.twb-ticket:hover .twb-ticket-photo::after { transform: translateX(120%); }
.twb-ticket:hover { box-shadow: 0 26px 46px -16px rgba(15, 39, 51, .4); }

.twb-ticket h5 {
    font-size: clamp(0.9rem, 1.1vw, 1.02rem);
    margin-bottom: 4px;
}

.twb-ticket p {
    font-size: clamp(0.75rem, 0.9vw, .82rem);
    color: var(--twb-ink-soft);
    margin: 0;
}

.twb-ticket-tag {
    position: absolute;
    top: 10px;
    right: 10px;
    background: var(--twb-navy);
    color: var(--twb-white);
    font-family: var(--font-script);
    font-size: clamp(0.8rem, 1vw, .95rem);
    padding: 2px 10px;
    border-radius: 50px;
    transform: rotate(6deg);
}

/* =====================================================================
   STATS - Responsive
   ===================================================================== */
.twb-stats-panel {
    background: var(--twb-ink);
    border-radius: clamp(16px, 2vw, 26px);
    padding: clamp(30px, 5vh, 60px) clamp(20px, 3vw, 40px);
    position: relative;
    overflow: hidden;
    color: var(--twb-white);
}

.twb-stats-panel::before {
    content: "";
    position: absolute;
    inset: 0;
    background-image: repeating-linear-gradient(45deg, rgba(140, 219, 252, .05) 0 10px, transparent 10px 20px);
    animation: twbWaffleDrift 30s linear infinite;
}

.twb-stats-grid {
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: clamp(20px, 3vw, 30px);
    text-align: center;
}

.twb-stat-num {
    font-family: var(--font-display);
    font-size: clamp(1.8rem, 4.5vw, 2.8rem);
    color: var(--twb-primary);
    display: block;
    line-height: 1;
    margin-bottom: 8px;
}

.twb-stat-label {
    font-size: clamp(0.75rem, 1vw, .82rem);
    color: rgba(255, 255, 255, .68);
    letter-spacing: .03em;
}

.twb-service-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(clamp(180px, 22vw, 220px), 1fr));
    gap: clamp(14px, 2vw, 18px);
    margin-top: clamp(30px, 5vh, 50px);
}

.twb-service-item {
    background: var(--twb-white);
    border: 1px solid var(--twb-line);
    border-radius: clamp(12px, 1.5vw, 16px);
    padding: clamp(18px, 2.5vw, 24px);
    transition: transform .4s cubic-bezier(.16, 1, .3, 1), box-shadow .4s, border-color .4s;
}

.twb-service-item:hover {
    transform: translateY(-8px);
    box-shadow: var(--twb-shadow);
    border-color: var(--twb-primary);
}

.twb-service-item i {
    color: var(--twb-navy);
    font-size: clamp(1.2rem, 1.6vw, 1.4rem);
    margin-bottom: 12px;
    display: inline-block;
}

.twb-service-item h6 {
    font-size: clamp(0.95rem, 1.1vw, 1.05rem);
    margin-bottom: 4px;
}

/* =====================================================================
   MARQUEE
   ===================================================================== */
.twb-marquee {
    position: relative;
    background: var(--twb-navy);
    padding: clamp(14px, 2vh, 22px) 0;
    overflow: hidden;
}

.twb-marquee-track {
    display: flex;
    width: max-content;
    animation: twbMarqueeScroll 26s linear infinite;
}

.twb-marquee:hover .twb-marquee-track { animation-play-state: paused; }

@keyframes twbMarqueeScroll {
    from { transform: translateX(0); }
    to { transform: translateX(-50%); }
}

.twb-marquee-track span {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    color: var(--twb-white);
    font-family: var(--font-display);
    font-size: clamp(1rem, 1.8vw, 1.3rem);
    font-style: italic;
    padding: 0 clamp(16px, 3vw, 34px);
    white-space: nowrap;
}

.twb-marquee-track span i {
    color: var(--twb-primary);
    font-size: clamp(0.5rem, 0.7vw, .7rem);
}

/* =====================================================================
   FRANCHISE FORM - Fully Responsive
   ===================================================================== */
.twb-own {
    background: var(--twb-offwhite);
    position: relative;
}

.twb-form-card {
    background: var(--twb-white);
    border-radius: clamp(16px, 2.5vw, 26px);
    box-shadow: var(--twb-shadow);
    padding: clamp(24px, 4vw, 44px);
    position: relative;
}

.twb-form-card::before {
    content: "\2615";
    position: absolute;
    top: -26px;
    right: clamp(16px, 4vw, 34px);
    width: clamp(44px, 5vw, 52px);
    height: clamp(44px, 5vw, 52px);
    background: var(--twb-primary);
    color: var(--twb-ink);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: clamp(1.1rem, 1.5vw, 1.3rem);
    box-shadow: 0 10px 24px -8px rgba(140, 219, 252, .7);
}

.twb-field {
    position: relative;
    margin-bottom: clamp(18px, 2.5vh, 26px);
}

.twb-field input,
.twb-field select {
    width: 100%;
    background: transparent;
    border: none;
    border-bottom: 2px solid var(--twb-line);
    padding: 10px 2px;
    font-family: var(--font-body);
    font-size: clamp(0.9rem, 1.1vw, 1rem);
    color: var(--twb-ink);
    transition: border-color .35s;
    appearance: none;
    -webkit-appearance: none;
}

.twb-field select { cursor: pointer; }

.twb-field input:focus,
.twb-field select:focus {
    outline: none;
    border-color: transparent;
}

.twb-field label {
    position: absolute;
    left: 2px;
    top: 12px;
    color: var(--twb-ink-soft);
    font-size: clamp(0.85rem, 1vw, .95rem);
    pointer-events: none;
    transition: transform .3s cubic-bezier(.16, 1, .3, 1), font-size .3s, color .3s;
    transform-origin: left top;
}

.twb-field input:focus + label,
.twb-field input:not(:placeholder-shown) + label,
.twb-field.twb-filled label {
    transform: translateY(-20px);
    font-size: clamp(0.65rem, 0.8vw, .74rem);
    color: var(--twb-primary-deep);
    letter-spacing: .04em;
}

.twb-field-underline {
    position: absolute;
    left: 0;
    bottom: 0;
    height: 2px;
    width: 0;
    background: linear-gradient(90deg, var(--twb-primary), var(--twb-navy));
    transition: width .4s cubic-bezier(.16, 1, .3, 1);
}

.twb-field input:focus ~ .twb-field-underline,
.twb-field select:focus ~ .twb-field-underline {
    width: 100%;
}

.twb-submit-btn {
    width: 100%;
    justify-content: center;
    position: relative;
}

.twb-submit-btn .twb-btn-label,
.twb-submit-btn .twb-btn-success {
    display: flex;
    align-items: center;
    gap: 10px;
    transition: opacity .3s, transform .3s;
}

.twb-submit-btn .twb-btn-success {
    position: absolute;
    opacity: 0;
    transform: translateY(10px);
}

.twb-submit-btn.twb-sent .twb-btn-label {
    opacity: 0;
    transform: translateY(-10px);
}

.twb-submit-btn.twb-sent .twb-btn-success {
    opacity: 1;
    transform: translateY(0);
    position: static;
}

.twb-field-static-label {
    display: block;
    position: static;
    font-size: clamp(0.85rem, 1vw, .95rem);
    font-weight: 700;
    color: var(--twb-ink);
    margin-bottom: 10px;
    transform: none;
}

.twb-phone-row {
    display: flex;
    align-items: center;
    gap: 10px;
    border-bottom: 2px solid var(--twb-line);
}

.twb-phone-code {
    font-weight: 700;
    font-size: clamp(0.85rem, 1vw, .95rem);
    color: var(--twb-ink-soft);
    white-space: nowrap;
    padding-bottom: 10px;
}

.twb-phone-row input {
    border-bottom: none !important;
}

.twb-check-group {
    margin-bottom: clamp(18px, 2.5vh, 26px);
}

.twb-check-option {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 9px 2px;
    cursor: pointer;
    font-size: clamp(0.85rem, 1vw, .95rem);
    color: var(--twb-ink-soft);
    user-select: none;
}

.twb-check-option input {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

.twb-check-box {
    width: clamp(18px, 2vw, 20px);
    height: clamp(18px, 2vw, 20px);
    flex-shrink: 0;
    border-radius: 6px;
    border: 2px solid var(--twb-line);
    position: relative;
    transition: border-color .3s, background .3s, transform .2s;
}

.twb-check-box::after {
    content: "\2713";
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: clamp(0.7rem, 0.9vw, .78rem);
    color: var(--twb-ink);
    opacity: 0;
    transform: scale(.4);
    transition: opacity .25s, transform .25s cubic-bezier(.34, 1.56, .64, 1);
}

.twb-check-option:hover .twb-check-box {
    border-color: var(--twb-primary-dark);
}

.twb-check-option input:checked + .twb-check-box {
    background: var(--twb-primary);
    border-color: var(--twb-primary-dark);
    transform: scale(1.05);
}

.twb-check-option input:checked + .twb-check-box::after {
    opacity: 1;
    transform: scale(1);
}

.twb-own-side {
    padding: clamp(12px, 2vw, 20px) clamp(8px, 1.5vw, 10px);
}

.twb-own-list {
    list-style: none;
    padding: 0;
    margin: clamp(18px, 3vh, 26px) 0 0;
}

.twb-own-list li {
    display: flex;
    gap: 14px;
    padding: clamp(10px, 1.5vh, 14px) 0;
    border-bottom: 1px dashed var(--twb-line);
    align-items: flex-start;
    font-size: clamp(0.85rem, 1vw, 0.95rem);
}

.twb-own-list li i {
    color: var(--twb-navy);
    margin-top: 4px;
}

/* =====================================================================
   PHOTO GALLERY - Fully Responsive
   ===================================================================== */
.twb-gallery-grid {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 4px;
}

/* Gallery responsive breakpoints */
@media (max-width: 1024px) {
    .twb-gallery-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

@media (max-width: 768px) {
    .twb-gallery-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 480px) {
    .twb-gallery-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

.twb-gallery-cell {
    aspect-ratio: 1;
    position: relative;
    overflow: hidden;
    background: linear-gradient(160deg, var(--twb-sky-light), var(--twb-primary));
    display: flex;
    align-items: center;
    justify-content: center;
    color: rgba(15, 39, 51, .55);
    font-size: clamp(1rem, 1.8vw, 1.4rem);
    cursor: pointer;
}

.twb-gallery-cell img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.twb-gallery-cell:hover img {
    transform: scale(1.08);
}

.twb-gallery-cell::after {
    content: attr(data-label);
    position: absolute;
    inset: 0;
    background: rgba(15, 39, 51, .78);
    color: var(--twb-white);
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font-script);
    font-size: clamp(0.8rem, 1.2vw, 1.1rem);
    text-align: center;
    padding: 8px;
    opacity: 0;
    transform: scale(1.15);
    transition: opacity .4s, transform .4s;
    pointer-events: none;
}

.twb-gallery-cell:hover::after {
    opacity: 1;
    transform: scale(1);
}

/* =====================================================================
   POPUP - Responsive
   ===================================================================== */
#twbSuccessPopup {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    z-index: 9999;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

#twbSuccessPopup.show {
    display: flex !important;
}

#twbSuccessPopup > div {
    background: #fff;
    border-radius: clamp(16px, 3vw, 24px);
    padding: clamp(30px, 5vw, 50px) clamp(20px, 4vw, 40px);
    max-width: 420px;
    width: 100%;
    text-align: center;
    box-shadow: 0 20px 60px rgba(0,0,0,0.3);
    animation: twbPopupIn 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}

#twbSuccessPopup .check-icon {
    width: clamp(55px, 8vw, 70px);
    height: clamp(55px, 8vw, 70px);
    background: #8CDBFC;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
    font-size: clamp(26px, 4vw, 32px);
    color: #0F2733;
}

#twbSuccessPopup h3 {
    font-family: var(--font-display);
    color: #0F2733;
    margin-bottom: 10px;
    font-size: clamp(1.4rem, 2.5vw, 1.8rem);
}

#twbSuccessPopup p {
    color: #3E5A66;
    font-size: clamp(0.9rem, 1.3vw, 1rem);
    line-height: 1.6;
}

#twbSuccessPopup button {
    margin-top: 20px;
    padding: clamp(10px, 1.5vh, 12px) clamp(30px, 4vw, 40px);
    background: #0F2733;
    color: #fff;
    border: none;
    border-radius: 50px;
    font-weight: 700;
    cursor: pointer;
    transition: background 0.3s;
    font-size: clamp(0.9rem, 1.1vw, 1rem);
}

#twbSuccessPopup button:hover {
    background: #1F4E63;
}

@keyframes twbPopupIn {
    from {
        opacity: 0;
        transform: scale(0.8) translateY(20px);
    }
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

/* =====================================================================
   RESPONSIVE BREAKPOINTS
   ===================================================================== */

/* Large Desktops (1200px+) */
@media (min-width: 1200px) {
    .twb-hero-inner {
        padding: 0 40px;
    }
}

/* Tablets and Small Desktops (992px - 1199px) */
@media (max-width: 1199px) {
    .twb-stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .twb-hero-inner {
        max-width: 80%;
    }
}

/* Tablets (768px - 991px) */
@media (max-width: 991px) {
    .twb-about-media {
        height: 380px;
        margin-bottom: 30px;
    }
    
    .twb-hero-inner {
        max-width: 90%;
    }
    
    .twb-hero-brand span {
        font-size: clamp(1.6rem, 3.5vw, 2.2rem);
    }
    
    .twb-hero h1 {
        font-size: clamp(2.2rem, 5vw, 3rem);
    }
    
    .twb-stats-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
    }
    
    .twb-service-list {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Mobile Landscape (576px - 767px) */
@media (max-width: 767px) {
    .twb-page .twb-section {
        padding: 50px 0;
    }
    
    .twb-hero {
        min-height: 85vh;
        min-height: 85dvh;
        padding-top: 80px;
    }
    
    .twb-hero-inner {
        max-width: 100%;
        padding: 0 20px;
    }
    
    .twb-hero-brand {
        gap: 12px;
    }
    
    .twb-hero-brand span {
        font-size: clamp(1.2rem, 3vw, 1.6rem);
    }
    
    .twb-hero-logo {
        width: clamp(50px, 8vw, 70px);
        height: clamp(50px, 8vw, 70px);
    }
    
    .twb-hero h1 {
        font-size: clamp(1.8rem, 4.5vw, 2.4rem);
    }
    
    .twb-hero p.twb-lead {
        font-size: 0.95rem;
    }
    
    .twb-hero-cta {
        flex-direction: column;
        align-items: stretch;
    }
    
    .twb-hero-cta .twb-btn {
        justify-content: center;
        text-align: center;
    }
    
    .twb-about-media {
        height: 320px;
    }
    
    .twb-badge-years {
        width: 70px;
        height: 70px;
    }
    
    .twb-badge-years strong {
        font-size: 1rem;
    }
    
    .twb-badge-years span {
        font-size: 0.5rem;
    }
    
    .twb-stats-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 16px;
    }
    
    .twb-service-list {
        grid-template-columns: 1fr 1fr;
        gap: 12px;
    }
    
    .twb-form-card {
        padding: 24px 18px;
    }
    
    .twb-form-card::before {
        right: 18px;
        width: 40px;
        height: 40px;
        font-size: 1rem;
        top: -20px;
    }
    
    .twb-own-list li {
        font-size: 0.9rem;
    }
    
    .twb-marquee-track span {
        font-size: 1rem;
        padding: 0 20px;
    }
    
    .twb-stats-panel {
        padding: 30px 20px;
    }
    
    .twb-stat-num {
        font-size: 2rem;
    }
}

/* Mobile Portrait (375px - 575px) */
@media (max-width: 575px) {
    .twb-hero {
        min-height: 80vh;
        min-height: 80dvh;
        padding-top: 70px;
    }
    
    .twb-hero-inner {
        padding: 0 16px;
    }
    
    .twb-hero-brand span {
        font-size: 1.1rem;
    }
    
    .twb-hero-logo {
        width: 45px;
        height: 45px;
    }
    
    .twb-hero h1 {
        font-size: 1.6rem;
    }
    
    .twb-hero p.twb-lead {
        /* font-size: 0.85rem; */
        font-size: 0.99rem;
    }
    
    .twb-btn {
        padding: 12px 20px;
        font-size: 0.85rem;
    }
    
    .twb-about-media {
        height: 260px;
    }
    
    .twb-photo-card {
        border-width: 4px;
        border-radius: 12px;
    }
    
    .twb-badge-years {
        width: 60px;
        height: 60px;
    }
    
    .twb-badge-years strong {
        font-size: 0.85rem;
    }
    
    .twb-badge-years span {
        font-size: 0.4rem;
    }
    
    .twb-stats-grid {
        grid-template-columns: 1fr 1fr;
        gap: 12px;
    }
    
    .twb-stat-num {
        font-size: 1.6rem;
    }
    
    .twb-stat-label {
        font-size: 0.7rem;
    }
    
    .twb-service-list {
        grid-template-columns: 1fr 1fr;
        gap: 10px;
    }
    
    .twb-service-item {
        padding: 16px;
    }
    
    .twb-service-item i {
        font-size: 1.1rem;
    }
    
    .twb-service-item h6 {
        font-size: 0.85rem;
    }
    
    .twb-service-item p {
        font-size: 0.75rem !important;
    }
    
    .twb-form-card {
        padding: 20px 14px;
    }
    
    .twb-form-card h4 {
        font-size: 1.2rem;
    }
    
    .twb-field input,
    .twb-field select {
        font-size: 0.85rem;
        padding: 8px 2px;
    }
    
    .twb-field label {
        font-size: 0.8rem;
        top: 10px;
    }
    
    .twb-check-option {
        font-size: 0.8rem;
        padding: 7px 2px;
    }
    
    .twb-own-list li {
        font-size: 0.8rem;
        gap: 10px;
        padding: 8px 0;
    }
    
    .twb-own-side h2 {
        font-size: 1.4rem;
    }
    
    .twb-marquee-track span {
        font-size: 0.85rem;
        padding: 0 14px;
    }
    
    .twb-scroll-cue {
        display: none;
    }
    
    #twbSuccessPopup > div {
        padding: 24px 18px;
    }
    
    #twbSuccessPopup h3 {
        font-size: 1.2rem;
    }
    
    #twbSuccessPopup p {
        font-size: 0.85rem;
    }
}

/* Small Mobile (320px - 374px) */
@media (max-width: 374px) {
    .twb-hero h1 {
        font-size: 1.3rem;
    }
    
    .twb-hero-brand span {
        font-size: 0.95rem;
    }
    
    .twb-hero-logo {
        width: 38px;
        height: 38px;
    }
    
    .twb-hero p.twb-lead {
        font-size: 0.78rem;
    }
    
    .twb-btn {
        padding: 10px 16px;
        font-size: 0.8rem;
        gap: 6px;
    }
    
    .twb-stat-num {
        font-size: 1.3rem;
    }
    
    .twb-stat-label {
        font-size: 0.65rem;
    }
    
    .twb-service-list {
        grid-template-columns: 1fr;
    }
    
    .twb-stats-grid {
        grid-template-columns: 1fr 1fr;
        gap: 10px;
    }
    
    .twb-form-card {
        padding: 16px 12px;
    }
    
    .twb-own-list li {
        font-size: 0.75rem;
    }
}

/* =====================================================================
   REDUCED MOTION
   ===================================================================== */
@media (prefers-reduced-motion: reduce) {
    .twb-page * {
        animation-duration: .001ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: .001ms !important;
    }
}

/* =====================================================================
   TOUCH DEVICE OPTIMIZATIONS
   ===================================================================== */
@media (hover: none) {
    .twb-photo-card {
        transform: none !important;
    }
    
    .twb-service-item:hover {
        transform: none;
    }
    
    .twb-gallery-cell::after {
        opacity: 1;
        transform: scale(1);
        background: rgba(15, 39, 51, 0.5);
        font-size: clamp(0.7rem, 1.2vw, 1rem);
    }
    
    .twb-gallery-cell img {
        transform: none !important;
    }
    
    .twb-ticket:hover {
        transform: none !important;
        box-shadow: var(--twb-shadow);
    }
    
    .twb-ticket:hover .twb-ticket-photo::after {
        transform: translateX(-120%);
    }
    
    .twb-feature-row:hover .twb-f-ico {
        transform: none;
    }
    
    .twb-btn:hover {
        transform: none !important;
    }
}

/* =====================================================================
   SAFARI / IOS SAFE AREA
   ===================================================================== */
@supports (padding: max(0px)) {
    .twb-hero {
        padding-top: max(70px, env(safe-area-inset-top));
        padding-bottom: max(20px, env(safe-area-inset-bottom));
    }
    
    .twb-hero-inner {
        padding-left: max(16px, env(safe-area-inset-left));
        padding-right: max(16px, env(safe-area-inset-right));
    }
}

/* =====================================================================
   PRINT STYLES
   ===================================================================== */
@media print {
    .twb-hero-bg,
    .twb-hero-scrim,
    .twb-scroll-cue,
    .twb-brew-progress,
    .twb-marquee {
        display: none !important;
    }
    
    .twb-hero {
        min-height: auto;
        padding: 40px 0;
        background: #fff !important;
    }
    
    .twb-hero h1,
    .twb-hero h1 em,
    .twb-hero-brand span {
        color: #000 !important;
    }
    
    .twb-hero p.twb-lead {
        color: #333 !important;
    }
    
    .twb-btn {
        border: 1px solid #000 !important;
        background: #fff !important;
        color: #000 !important;
    }
    
    .twb-btn::before {
        display: none !important;
    }
}


    /* <!-- Popup Styles & Gallery Styles --> */
  
        @keyframes twbPopupIn {
            from {
                opacity: 0;
                transform: scale(0.8) translateY(20px);
            }
            to {
                opacity: 1;
                transform: scale(1) translateY(0);
            }
        }

        #twbSuccessPopup {
            display: none;
        }

        #twbSuccessPopup.show {
            display: flex !important;
        }
        
        .alert {
            display: flex;
            align-items: center;
            gap: 10px;
        }

        .twb-gallery-tabs {
            display: flex;
            justify-content: center;
            gap: 10px;
            flex-wrap: wrap;
            margin-bottom: 30px;
        }
        .twb-g-tab {
            padding: 8px 22px;
            border-radius: 50px;
            border: 2px solid var(--border-soft, #cbd5e1);
            background: transparent;
            color: var(--ink-soft, #475569);
            font-weight: 600;
            font-size: 0.85rem;
            cursor: pointer;
            transition: all 0.35s ease;
        }
        .twb-g-tab:hover, .twb-g-tab.active {
            background: var(--twb-primary, #0284c7);
            border-color: var(--twb-primary, #0284c7);
            color: #fff;
        }
        .twb-gallery-cell.d-none-item {
            display: none !important;
        }


    .twb-gallery-grid .d-none-item {
        display: none !important;
    }

    /* optional: smooth fade when filtering */
    .twb-gallery-cell {
        transition: opacity .3s ease, transform .3s ease;
    }

    
/* =====================================================================
   NEW HERO SLIDER — reuses Home Page .hero-slider/.heroSwiper/.hero-slide
   markup & typography (style.css). This block only re-tints the parts
   that are brand-colour (chili/mustard) on the Home page so the TWB
   hero reads in the TWB blue palette without touching style.css.
   ===================================================================== */
/* Defensive fallback: guarantees full hero height even if the shared
   .heroSwiper class is ever missing from the markup, so the slide
   content never has to squeeze/overflow into the navbar above it. */
.twb-hero-slider .swiper {
    min-height: 480px;
}

@media (min-width: 992px) {
    .twb-hero-slider .swiper { min-height: 640px; }
}

@media (min-width: 1200px) {
    .twb-hero-slider .swiper { min-height: 720px; }
}

/* The page-wide ".twb-page h1/h2/h3/h4 { color: var(--twb-ink) }" rule
   above ties in specificity with style.css's ".hero-slide-content h1
   { color:#fff }" — and since this file loads after style.css, it was
   winning that tie and rendering the hero heading in dark navy instead
   of white. This override raises specificity so the hero heading is
   always legible over the photo regardless of load order. */
.twb-page .hero-slide-content h1 {
    color: #fff;
    text-shadow: 0 2px 12px rgba(0, 0, 0, .55), 0 1px 4px rgba(0, 0, 0, .5);
}

.twb-hero-slider .hero-slide-content .hero-eyebrow {
    color: #8CDBFC;
}

.twb-hero-slider .hero-slide-content h1 em {
    color: #8CDBFC;
}

.twb-hero-slider .hero-slide-overlay {
    background: linear-gradient(180deg, rgba(15, 39, 51, .55) 0%, rgba(15, 39, 51, .55) 45%, #0F2733 100%);
}

.twb-hero-slider .hero-pagination .swiper-pagination-bullet-active {
    background: #8CDBFC;
}

.twb-hero-slider .hero-nav:hover {
    background: #1C8FBF;
    border-color: #1C8FBF;
}

.twb-hero-slider .hero-slide-content .hero-cta .twb-btn {
    text-decoration: none;
}

/* =====================================================================
   ABOUT TWB — blue accents on the reused Home Page About Us classes
   (.eyebrow / .section-title .accent / .about-exp-badge / .feature-row)
   plus the TWB logo badge added to the image collage.
   ===================================================================== */
.twb-about-blue .eyebrow {
    color: var(--twb-primary-deep, #1C8FBF);
}

.twb-about-blue .eyebrow::before {
    background: var(--twb-primary-dark, #4FB8E3);
}

.twb-about-blue .section-title .accent {
    color: var(--twb-primary-deep, #1C8FBF);
}

.twb-about-blue .about-exp-badge {
    background: var(--twb-navy, #123A4A) !important;
}

.twb-about-blue .feature-row .f-ico {
    color: var(--twb-primary-deep, #1C8FBF);
    background: var(--twb-offwhite, #EAF7FF);
}

.twb-about-blue .feature-row:hover .f-ico {
    background: var(--twb-primary, #8CDBFC);
    color: var(--twb-ink, #0F2733);
}

.twb-about-blue .about-img-grid {
    position: relative;
}

.twb-about-logo-badge {
    position: absolute;
    left: 8%;
    top: 6%;
    z-index: 5;
    width: clamp(56px, 8vw, 76px);
    height: clamp(56px, 8vw, 76px);
    border-radius: 50%;
    background: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 14px 30px -8px rgba(18, 58, 74, .45);
    padding: 8px;
}

.twb-about-logo-badge img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

@media (max-width: 767px) {
    .twb-about-logo-badge {
        width: 54px;
        height: 54px;
        left: 4%;
        top: 4%;
    }
}

/* =====================================================================
   SERVICES (blue modifier) — reuses Home Page .services-flip /
   .service-flip-* classes as-is; only re-tints the chili-specific
   accents so the icon/number/underline/checks read in TWB blue.
   Card-back gradients are set per-card via inline style in twb.php.
   ===================================================================== */
.twb-services-blue.services-flip {
    background: var(--twb-white, #fff);
}

.twb-services-blue.services-flip::before {
    background: radial-gradient(circle, rgba(28, 143, 191, 0.05) 0%, transparent 70%);
}

.twb-services-blue.services-flip::after {
    background: radial-gradient(circle, rgba(79, 184, 227, 0.06) 0%, transparent 70%);
}

.twb-services-blue .eyebrow {
    color: var(--twb-primary-deep, #1C8FBF);
}

.twb-services-blue .eyebrow::before {
    background: var(--twb-primary-dark, #4FB8E3);
}

.twb-services-blue .section-title .accent {
    color: var(--twb-primary-deep, #1C8FBF);
}

.twb-services-blue .service-flip-front::before {
    background: linear-gradient(90deg, #1C8FBF, #4FB8E3);
}

.twb-services-blue .service-flip-icon {
    background: linear-gradient(135deg, rgba(28, 143, 191, 0.10), rgba(79, 184, 227, 0.12));
    color: #1C8FBF;
}

.twb-services-blue .service-flip-card:hover .service-flip-icon,
.twb-services-blue .service-flip-card.flipped .service-flip-icon {
    background: linear-gradient(135deg, #1C8FBF, #123A4A);
    color: #fff;
    box-shadow: 0 6px 20px -6px rgba(28, 143, 191, 0.45);
}

.twb-services-blue .service-flip-number {
    color: rgba(28, 143, 191, 0.08);
}

.twb-services-blue .service-flip-card:hover .service-flip-number,
.twb-services-blue .service-flip-card.flipped .service-flip-number {
    color: rgba(28, 143, 191, 0.18);
}

.twb-services-blue .service-flip-back-content h3::after {
    background: #8CDBFC;
}

.twb-services-blue .service-flip-features li i {
    color: #8CDBFC;
}

/* =====================================================================
   BECOME A TWB PARTNER — blue modifier over the reused .fr-* classes
   from franchise.css (Own a Franchise form), scoped to this section
   only so franchise.php's own red-themed form is untouched.
   ===================================================================== */
.twb-partner-section {
    background: var(--twb-offwhite, #EAF7FF);
}

.twb-partner-section .fr-eyebrow {
    color: var(--twb-primary-deep, #1C8FBF);
    background: rgba(28, 143, 191, .08);
}

.twb-partner-section .fr-eyebrow span.dot {
    background: var(--twb-primary-deep, #1C8FBF);
}

.twb-partner-section .fr-title .accent {
    color: var(--twb-primary-deep, #1C8FBF);
}

.twb-partner-section .fr-field label .req {
    color: var(--twb-primary-deep, #1C8FBF);
}

.twb-partner-section .fr-input:focus,
.twb-partner-section .fr-select:focus,
.twb-partner-section .fr-textarea:focus {
    border-color: var(--twb-primary-deep, #1C8FBF);
    box-shadow: 0 0 0 4px rgba(28, 143, 191, .12);
}

.twb-partner-section .fr-input.fr-invalid,
.twb-partner-section .fr-select.fr-invalid,
.twb-partner-section .fr-textarea.fr-invalid,
.twb-partner-section .fr-error-msg {
    border-color: #C81D25;
    color: #C81D25;
}

.twb-partner-section .fr-toggle-btn.is-active {
    background: var(--twb-primary-deep, #1C8FBF);
    border-color: var(--twb-primary-deep, #1C8FBF);
    color: #fff;
    box-shadow: 0 10px 22px -8px rgba(28, 143, 191, .5);
}

.twb-partner-section .fr-form-note i {
    color: var(--twb-primary-deep, #1C8FBF);
}

.twb-partner-section .fr-form-feedback.fr-feedback-success {
    background: rgba(28, 143, 191, .1);
    color: var(--twb-navy, #123A4A);
    border: 1px solid rgba(28, 143, 191, .25);
}

.twb-partner-section .fr-form-feedback.fr-feedback-error {
    background: rgba(200, 29, 37, .08);
    color: #C81D25;
    border: 1px solid rgba(200, 29, 37, .2);
}

.twb-partner-section .fr-submit-btn:disabled {
    opacity: .65;
    cursor: not-allowed;
}

/* =====================================================================
   MEDIA SECTION — replicates gallery.php's masonry / hover-overlay /
   lightbox design (that page styles itself inline, so these classes
   are defined fresh here) in the TWB blue palette.
   ===================================================================== */
.twb-media-section .gallery-header-box {
    text-align: center;
    margin-bottom: 30px;
}

.twb-media-section .gallery-eyebrow {
    color: var(--twb-primary-deep, #1C8FBF);
    font-weight: 600;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    margin-bottom: 10px;
    display: inline-block;
}

.twb-media-section .gallery-main-title {
    font-family: var(--font-display);
    font-size: clamp(1.8rem, 4vw, 2.8rem);
    font-weight: 800;
    color: var(--twb-ink, #0F2733);
    margin-bottom: 15px;
}

.twb-media-section .gallery-main-title .accent {
    color: var(--twb-primary-deep, #1C8FBF);
    font-style: italic;
}

.twb-media-section .gallery-desc {
    color: var(--twb-ink-soft, #3E5A66);
    max-width: 650px;
    margin: 0 auto 20px;
    line-height: 1.6;
    font-size: 0.95rem;
}

.twb-media-section .gallery-dots {
    display: flex;
    justify-content: center;
    gap: 6px;
    margin-top: 15px;
    margin-bottom: 40px;
}

.twb-media-section .gallery-dots span {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background-color: var(--twb-primary, #8CDBFC);
}

.twb-media-section .gallery-dots span:nth-child(2) {
    background-color: var(--twb-primary-deep, #1C8FBF);
    transform: scale(1.3);
}

.twb-media-section .gallery-filters {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 12px;
    margin-bottom: 40px;
}

.twb-media-section .filter-btn {
    padding: 8px 24px;
    border-radius: 50px;
    background: transparent;
    color: var(--twb-ink-soft, #3E5A66);
    border: 1px solid var(--twb-line, rgba(15, 39, 51, .13));
    font-weight: 500;
    font-size: 0.95rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.twb-media-section .filter-btn:hover {
    border-color: var(--twb-primary-deep, #1C8FBF);
    color: var(--twb-primary-deep, #1C8FBF);
}

.twb-media-section .filter-btn.active {
    background: var(--twb-primary-deep, #1C8FBF);
    color: #fff;
    border-color: var(--twb-primary-deep, #1C8FBF);
    box-shadow: 0 6px 16px rgba(28, 143, 191, 0.3);
}

.twb-media-section .masonry-gallery {
    column-count: 3;
    column-gap: 20px;
    max-width: 100%;
    margin: 0 auto;
}

@media (min-width: 1400px) {
    .twb-media-section .masonry-gallery { column-count: 4; }
}

.twb-media-section .masonry-item {
    break-inside: avoid;
    margin-bottom: 20px;
    border-radius: 12px;
    overflow: hidden;
    cursor: pointer;
    display: none;
    position: relative;
    background: #111;
}

.twb-media-section .masonry-item.show {
    display: block;
    animation: twbFadeInMasonry 0.5s ease-in-out;
}

@keyframes twbFadeInMasonry {
    from { opacity: 0; transform: translateY(15px); }
    to { opacity: 1; transform: translateY(0); }
}

.twb-media-section .masonry-item img {
    width: 100%;
    /* min-height: 240px; */
    max-height: 460px;
    display: block;
    object-fit: cover;
    border-radius: 12px;
    transition: transform 0.5s ease;
}

.twb-media-section .masonry-item:hover img {
    transform: scale(1.08);
}

.twb-media-section .gallery-item-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(15, 39, 51, 0.92) 0%, rgba(15, 39, 51, 0.3) 50%, transparent 100%);
    opacity: 0;
    transition: opacity 0.4s ease;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: 24px;
    text-align: left;
    border-radius: 12px;
}

.twb-media-section .masonry-item:hover .gallery-item-overlay {
    opacity: 1;
}

.twb-media-section .gallery-icon-btn {
    width: 44px;
    height: 44px;
    background-color: var(--twb-primary-deep, #1C8FBF);
    color: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    margin-bottom: 12px;
    transform: translateY(20px);
    transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    box-shadow: 0 4px 12px rgba(28, 143, 191, 0.5);
}

.twb-media-section .masonry-item:hover .gallery-icon-btn {
    transform: translateY(0);
}

.twb-media-section .gallery-text-content h4 {
    color: #fff;
    font-size: 1.15rem;
    font-family: var(--font-display);
    font-weight: 700;
    margin: 0;
    transform: translateY(20px);
    transition: transform 0.4s ease;
    transition-delay: 0.05s;
}

.twb-media-section .masonry-item:hover .gallery-text-content h4 {
    transform: translateY(0);
}

@media (max-width: 991px) {
    .twb-media-section .masonry-gallery { column-count: 3; }
}

@media (max-width: 768px) {
    .twb-media-section .masonry-gallery { column-count: 2; column-gap: 12px; }
    .twb-media-section .masonry-item { margin-bottom: 12px; }
    .twb-media-section .masonry-item img { min-height: 160px; max-height: 320px; }
    .twb-media-section .filter-btn { padding: 6px 18px; font-size: 0.85rem; }
    .twb-media-section .gallery-item-overlay { padding: 15px; }
    .twb-media-section .gallery-icon-btn { width: 36px; height: 36px; font-size: 14px; }
}

@media (max-width: 480px) {
    .twb-media-section .masonry-gallery { column-count: 2; column-gap: 10px; }
    .twb-media-section .masonry-item { margin-bottom: 10px; }
    .twb-media-section .masonry-item img { min-height: 130px; max-height: 260px; }
    .twb-media-section .filter-btn { padding: 5px 14px; font-size: 0.8rem; }
}

/* Lightbox modal — page-scoped, mirrors gallery.php's #mediaModal design */
.twb-page .custom-modal {
    position: fixed;
    inset: 0;
    background: rgba(15, 39, 51, 0.95);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    padding: 20px;
}

.twb-page .custom-modal.open { display: flex; }

.twb-page .custom-modal-close {
    position: absolute;
    top: 25px;
    right: 30px;
    background: none;
    border: none;
    color: #fff;
    font-size: 35px;
    cursor: pointer;
    z-index: 10;
}

.twb-page .custom-modal-content {
    position: relative;
    max-width: 90vw;
    max-height: 85vh;
    width: 100%;
    display: flex;
    justify-content: center;
}

.twb-page .custom-modal-content img {
    max-width: 100%;
    max-height: 85vh;
    border-radius: 8px;
    object-fit: contain;
}

.twb-page .custom-modal-caption {
    position: absolute;
    bottom: -40px;
    left: 0;
    width: 100%;
    text-align: center;
    color: #fff;
    font-size: 1.1rem;
}