/* ===== RESET & BASE STYLES ===== */
* {
    margin: 0;
    padding: 0;
}

::-webkit-scrollbar {
    display: none;
}

html {
    scroll-behavior: smooth;
}

body {
    width: 100%;
    height: 100%;
    font-display: swap;
    font-family: "Teko", sans-serif;
    --header-height: 100px;
    --back: #04051A;
    --fore: #191A3A;
    --trim: #ed208b;
    --font: #ffffff;
    background-color: var(--back);
    color: var(--font);
}

a {
    color: white;
    text-decoration: none;
}

img {
    border: none;
}
/* ===== HEADER & NAVIGATION ===== */
header {
    height: var(--header-height);
    background-image: url("https://www.bosphilly.org/wordpress/wp-content/uploads/content-header-background.jpg");
    background-position: top;
    background-size: cover;
    border-bottom: 2px solid var(--trim);
    display: flex;
    justify-content: space-between;
    width: 100%;
    box-shadow: 0 5px 16px rgba(0, 0, 0, 0.1);
    backdrop-filter: blur(10px);
    position: sticky;
    top: 0;
    z-index: 999;
}

.header-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 40px;
}

/* Static captions for no-hover tiles */
.tile.container.no-hover { position: relative; overflow: hidden; }
.tile.container.no-hover a { display: block; position: relative; }
/* Uniform height & crop */
.tile.container.no-hover img { display: block; width: 100%; height: 300px; object-fit: cover; }
/* Bottom overlay caption */
.tile.container.no-hover .tile-caption {
    position: absolute;
    left: 0; right: 0; bottom: -1px; /* slight nudge to remove 1px gap */
    padding: 16px 12px 14px;
    font-size: 1.15rem;
    font-weight: 600;
    line-height: 1.2;
    text-align: center;
    color: #fff;
    letter-spacing: .5px;
    /* Lightened overlay */
    background: rgba(0,0,0,0.55);
    backdrop-filter: blur(3px);
    -webkit-backdrop-filter: blur(3px);
    box-shadow: 0 -10px 20px -8px rgba(0,0,0,0.6);
    font-size: 40px;
    text-transform: uppercase;
}
.tile.container.no-hover .overlay,
.tile.container.no-hover .hover-text,
.tile.container.no-hover .label { display: none !important; }

/* Override generic tile anchor sizing so caption can appear below image */
/* Override previous flex approach for no-hover tiles: we now overlay caption */
.tile.container.no-hover a { 
    height: auto !important; 
    display: block;
}
/* (Removed small padding override to preserve darker block) */

#logo {
    width: 117px;
    height: 84px;
    margin-top: 15px;
    margin-left: 0;
}

nav {
    font-size: 25px;
    font-weight: 700;
    display: flex;
    justify-content: space-around;
    flex-flow: row nowrap;
    align-items: center;
    margin-right: 0;
}

nav span {
    display: flex;
    flex-flow: nowrap;
    height: 36px;
}

#navbar {
    display: flex;
    flex-flow: row wrap;
    justify-content: flex-end;
    list-style: none;
}

#navbar li:not(:last-child)::after {
    content: '|';
    color: var(--trim);
    font-size: 15px;
    vertical-align: middle;
}

#navbar a {
    text-decoration: none;
    padding: 1em;
    color: var(--font);
}

.social {
    background-color: var(--trim);
    font-size: 15px;
    display: inline-block;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    vertical-align: middle;
    margin-left: 10px;
    text-align: center;
    color: var(--font);
}

.social svg {
    vertical-align: middle;
    width: 1em;
    height: 1em;
    margin-top: 7px;
}

#mobileToggle {
    display: none;
}
/* ===== SECTIONS & LAYOUT ===== */
section {
    border-bottom: 1px solid var(--trim);
}

section h1 {
    color: var(--font);
    text-align: center;
    font-size: 72px;
    padding-top: 20px;
}

.grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    width: 90%;
    margin: auto;
}

.tile {
    margin: 10px;
    background-color: var(--fore);
    border-radius: 20px;
    overflow: hidden;
    text-align: center;
    display: flex;
    flex-flow: column nowrap;
    justify-content: space-between;
    align-items: stretch;
    justify-self: center;
    align-self: stretch;
}

.tile img {
    width: 100%;
    object-fit: cover;
}

.container {
    position: relative;
    width: 50%;
}

.container .image {
    display: block;
    width: 100%;
    height: auto;
}

.container .overlay {
    position: absolute;
    top: 0;
    bottom: 0;
    left: 0;
    right: 0;
    height: 100%;
    width: 100%;
    opacity: 0;
    transition: 0.75s ease;
    background-color: var(--trim);
    white-space: nowrap;
}

.container:hover .overlay {
    opacity: 1;
}

.container .hover-text {
    color: black;
    font-size: 40px;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-transform: uppercase;
    text-align: center;
}
/* ===== SPLASH SECTION ===== */
#splash {
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    /* Fill viewport minus fixed header (cold-load + all breakpoints). */
    min-height: calc(100vh - var(--header-height));
    overflow: hidden;
}

@supports (height: 1svh) {
    #splash {
        min-height: calc(100svh - var(--header-height));
    }
}

.splash-title {
    position: absolute;
    display: flex;
    flex-flow: column wrap;
    justify-content: center;
    align-items: center;
    z-index: 1; /* ensure title sits above background video */
}

.splash-title h2 {
    color: var(--trim);
    font-size: 153px;
    font-weight: 600;
}

.splash-title p {
    font-size: 37px;
    font-weight: 600;
    letter-spacing: 1.3px;
    margin-top: -50px;
}

.splash-background { position: absolute; inset: 0; }
.splash-background video {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
    pointer-events: none;
}

video::-webkit-media-controls {
    display: none !important;
    pointer-events: none;
}
/* ===== CHARITY SECTION ===== */
#charity {
    text-align: center;
    width: 100%;
    height: 232px;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    border-top: 2px solid var(--trim);
    border-bottom: 2px solid var(--trim);
}

#charity h2 {
    font-size: 69px;
    font-weight: 600;
}

/* Stabilize counter width to avoid text reflow during animation */
.charity-title .counter {
    display: inline-block;
    font-variant-numeric: tabular-nums;
    font-feature-settings: "tnum" 1, "lnum" 1;
    min-width: 8ch; /* reserve width for up to 8 characters like 82497.33 */
    text-align: center;
}

#charity p {
    font-size: 19px;
}

.charity-background {
    height: 100%;
    width: 100%;
}

.charity-title {
    position: absolute;
    display: flex;
    flex-flow: column wrap;
    justify-content: center;
    align-items: center;
}

#parallax {
    height: 100%;
    width: 100%;
    background-image: url("https://www.bosphilly.org/wordpress/wp-content/uploads/content-charity-parallax.png");
    background-position: center;
    background-size: cover;
}
/* ===== EVENTS SECTION ===== */
#events {
    background-image: url("https://www.bosphilly.org/wordpress/wp-content/uploads/content-events-background.jpg");
    background-repeat: no-repeat;
    background-size: cover;
    background-position: center;
}

#events .button-container {
    padding-top: 25px;
}

#events button {
    margin-top: 20px;
}

#events .more {
    margin-top: 0;
}

#events .tile {
    width: 75%;
    border: 1px solid var(--font);
    margin: 25px;
    background-color: #191A3A;
}

#events .tile h3 {
    font-size: 50px;
    line-height: 50px;
    padding: 10px;
}

#events .tile h4 {
    font-family: "Helvetica", sans-serif;
    font-size: 1.125rem;
    font-weight: 100;
    text-transform: none;
    font-style: normal;
    text-decoration: none;
    line-height: 1.625em;
    letter-spacing: 0;
}

#events .tile img {
    width: 100%;
    height: 400px;
    object-fit: cover;
}

/* Event ticket/action buttons: adjust only width & spacing (no visual restyle) */
#events .ticket-actions {
    display: flex;
    flex-direction: row;
    gap: 12px; /* clearer separation between buttons */
    justify-content: space-between;
    align-items: stretch;
    margin: 12px auto 6px;
    width: 100%;
    padding: 0 12px; /* inset so buttons don't touch tile edges */
    box-sizing: border-box;
}
#events .ticket-actions a { flex: 1 1 0; }
#events .ticket-actions button.ticket {
    width: 100%;
    padding: 12px 10px; /* modest padding */
    font-size: 18px; /* keep original size */
    border-radius: 8px; /* original radius */
}
@media (max-width: 640px) {
    #events .ticket-actions { max-width: 100%; }
}

.tile.container a {
    display: block; /* Ensure percentage height works */
    height: 100%;   /* Make the anchor fill the height of its parent .tile.container */
    /* You might also need width: 100%; depending on the parent's display and other flex/grid properties */
}

.tile.container a img {
    display: block; /* Often helpful for images within block/flex/grid containers */
    width: 100%;      /* Make the image fill the width of its parent anchor */
    height: 100%;     /* Make the image fill the height of its parent anchor */
    object-fit: cover; /* Scale the image to cover the container while maintaining aspect ratio */
}



/* ===== BUTTONS & FORMS ===== */
.button-container {
    width: 100%;
    text-align: center;
    padding-top: 25px;
    padding-bottom: 25px;
}

button {
    margin-bottom: 20px;
    margin-left: auto;
    margin-right: auto;
    background-color: var(--trim);
    color: var(--font);
    border: 0;
    padding: 20px;
    border-radius: 10px;
    font-size: 16px;
    cursor: pointer;
}

.more,
.tickets {
    font-family: "Teko", sans-serif;
    font-size: 25px;
    font-weight: 600;
    width: fit-content;
}

.instagram,
.soundcloud {
    font-size: 24px;
    margin: 20px;
    padding: 20px;
    width: 100%;
}

.instagram svg,
.soundcloud svg {
    vertical-align: middle;
    width: 1em;
    height: 1em;
}

.instagram {
    background-color: var(--trim);
}

.soundcloud {
    background-color: #ff7700;
}
button#signup, button#calendar {
    display: flex;
    align-items: center;
    gap: 8px; /* Adjust the value as needed */
}
#signup,
#calendar {
    background-color: var(--trim);
    color: var(--font);
    border: none;
    border-radius: 25px;
    margin-top: 10px;
    text-align: center;
    padding: 20px;
    font-size: 16px;
    font-family: 'Work Sans', sans-serif;
}
#signup svg,
#calendar svg {
    width: 1em;
    height: 1em;
    vertical-align: middle;
    margin-right: 10px;
}

#email {
    padding: 5px 25px 5px;
    border-radius: 5px;
    height: 22px;
}

#email::placeholder {
    color: var(--trim);
    text-align: center;
}
/* ===== DJS & MODELS SECTIONS ===== */
#djs {
    background-image: url("https://www.bosphilly.org/wordpress/wp-content/uploads/content-djs-background.jpg");
    background-repeat: no-repeat;
    background-size: cover;
    background-position: center;
}

#djs .grid {
    grid-template-columns: repeat(4, 1fr);
}

#djs .container .hover-text {
    font-size: 30px;
    font-weight: bold;
}

#models {
    text-align: left;
    letter-spacing: 3px;
    background-image: url("https://www.bosphilly.org/wordpress/content-models-background");
    background-repeat: no-repeat;
    background-position: bottom center;
    background-size: cover;
}

#models .more {
    background-color: #191A3A;
    color: var(--font);
}

#models .grid {
    grid-template-columns: repeat(6, 1fr);
}

#models .tile {
    background-color: rgba(0, 0, 0, 0.1);
    filter: drop-shadow(25px 25px 25px #222);
}

#models .container .overlay {
    background-color: var(--fore);
}

#models .container .hover-text {
    color: var(--font);
}
/* ===== BOARD SECTION ===== */
#board {
    display: flex;
    flex-flow: column wrap;
}

#board h1,
#separator {
    margin: auto;
}

#separator {
    padding-bottom: 20px;
}

#board img {
    margin-bottom: 10px;
}

#board .grid {
    grid-template-rows: repeat(1, 1fr);
    grid-template-columns: repeat(5, 1fr);
}

.contact {
    padding: 0.5em;
    padding-bottom: 1em;
}

.contact a {
    padding: 0.5em;
    font-size: 24px;
    color: var(--trim);
}

.contact svg {
    width: 1em;
    height: 1em;
    vertical-align: middle;
}

/* ===== PARTNERS SECTION ===== */
#partners .title {
    background-image: url("https://www.bosphilly.org/wordpress/wp-content/uploads/content-partners-background.jpg");
    text-align: left;
    letter-spacing: 3px;
    background-position: bottom center;
    background-size: cover;
    margin: 0;
    width: 100%;
}

#partners h1 {
    text-align: left;
    width: 70%;
    padding-top: 0;
    padding-bottom: 0;
    margin: auto;
}

#partners-grid {
    width: 80%;
    margin: auto !important;
    padding-top: 20px;
    padding-bottom: 20px;
}

#partners-grid div {
    display: flex;
    flex-flow: row nowrap;
    justify-content: space-evenly;
    align-self: center;
    align-content: stretch;
    align-items: stretch;
}

#partners-grid div div {
    flex-grow: 1;
}

#partners-grid div img {
    width: 200px;
}

#circuitmom {
    width: 100px;
    height: 100px;
    object-fit: contain;
}
/* ===== FOOTER ===== */
footer {
    height: 50%;
    background: linear-gradient(rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0.5)), url("https://www.bosphilly.org/wordpress/wp-content/uploads/content-footer-background.jpg");
    background-position: center;
    background-size: cover;
    box-shadow: inset 0 0 0 1000px rgba(0, 0, 0, 0.2);
    display: flex;
    flex-flow: row nowrap;
    justify-content: space-evenly;
    padding-top: 50px;
    padding-bottom: 50px;
}

footer > div {
    display: flex;
    flex-flow: column nowrap;
    width: 30%;
}

footer div * {
    margin: 5px;
}

footer h3 {
    font-size: 30px;
}

footer p {
    font-family: 'Work Sans', sans-serif;
    font-weight: normal;
    font-size: 16px;
    line-height: 24px;
    text-align: justify;
}

footer span,
footer a {
    text-align: center;
}

footer .social {
    width: 50px;
    height: 50px;
    font-size: 25px;
}

footer .social svg {
    margin-top: 12px;
}

.learn-more {
    margin: 0;
    color: #ff00ff;
    font-weight: bold;
}

#connect,
#subscribe {
    display: flex;
    flex-flow: row nowrap;
    justify-content: center;
}
/* ===== ANIMATIONS & EFFECTS ===== */
.konami {
    transform: rotate(5deg);
    filter: invert(1);
}

.konami-spin {
    position: absolute;
    top: 0%;
    left: 0%;
    animation: spin 4s linear infinite;
}

@keyframes spin {
    100% {
        transform: rotate(360deg);
    }
}

/* ===== DESKTOP SPECIFIC STYLES ===== */
@media all and (min-width: 600px) {
    /* Match Galleries grid to DJs for consistent spacing */
    #galleries .grid { grid-template-columns: repeat(4, 1fr); }
    #galleries .tile { width: 278px; }
    /* Force uniform height so caption overlay is consistent */
    #galleries .tile img { height: 300px; object-fit: cover; }

    #models .tile,
    #models .tile img { width: 178px; height: 219px; }

    #djs .tile { width: 278px; }
    /* Uniform DJ image height */
    #djs .tile img { width: 100%; height: 300px; object-fit: cover; }
}

@media all and (min-width: 600px) and (max-width: 800px) {
    html,
    body {
        max-width: 100%;
        overflow-x: hidden;
    }
}

/* ===== MOBILE RESPONSIVE STYLES ===== */
@media all and (max-width: 600px) {
    /* Make captioned no-hover tiles mobile-friendly */
    .tile.container.no-hover .tile-caption {
        font-size: 18px; /* override large desktop size */
        padding: 10px 8px 9px;
        letter-spacing: .3px;
    }
    /* Base Mobile Layout */
    html,
    body {
        max-width: 100%;
        overflow-x: hidden;
    }

    .container {
        width: unset;
    }

    /* Header & Navigation */
    #logo {
        margin-top: 15px;
        margin-left: 15px;
    }

    nav {
        margin-right: 20px;
        flex-direction: column;
        align-items: baseline;
    }

    #navbar {
        display: none;
        font-size: 150%;
    }

    #navbar li {
        background-color: var(--fore);
        text-align: center;
        padding: 0.75em;
    }

    #navbar li + li {
        border-top: 1px solid white;
    }

    #navbar li:not(:last-child)::after {
        content: '';
    }

    #mobileToggle {
        display: inline-flex !important;
        align-items: center;
        justify-content: center;
        visibility: visible !important;
        opacity: 1 !important;
        pointer-events: auto;
        position: relative;
        z-index: 2000;
        margin-left: 20px;
    }

    /* Splash Section */
    /* On mobile, a full-viewport hero tends to crop the video too aggressively.
       Use a smaller responsive height while keeping it stable. */
    #splash { min-height: clamp(260px, 50vh, 420px); }
    @supports (height: 1svh) {
        #splash { min-height: clamp(260px, 50svh, 420px); }
    }

    .splash-background video {
        width: 100%;
        height: 100%;
        object-position: center top;
    }

    .splash-title {
        text-align: center;
        margin-top: 0;
    }

    .splash-title h2 {
        text-align: center;
        line-height: 50px;
        font-size: 50px;
    }

    .splash-title p {
        text-align: center;
        line-height: 20px;
        font-size: 20px;
        margin-top: unset;
    }

    /* Grid Layouts */
    .grid {
        padding: 20px;
        align-items: center;
        justify-content: center;
    }

    #events .grid {
        grid-template-columns: repeat(1, 1fr);
    }

    #events .tile {
        width: 100%;
    }

    #events .more {
        margin-top: 0;
    }

    #djs .grid {
        grid-template-columns: repeat(3, 1fr);
    }

    #djs .tile {
        background-color: unset;
    }

    #djs .tile img {
        width: 110px;
        height: 160px;
        border-radius: 20px;
    }

    #djs .hover-text {
        font-size: 10px !important;
        overflow-wrap: break-word;
    }

    #models .grid {
        grid-template-columns: repeat(3, 1fr);
    }

    #models .tile {
        filter: none;
        width: 120px;
    }

    #models .tile img {
        border-radius: 20px;
    }

    #galleries .tile {
        background-color: unset;
        border-radius: 0;
        width: auto; /* follow grid like DJs */
    }

    #galleries .tile img {
        width: 110px; /* match DJs mobile width */
        height: 160px; /* match DJs mobile height */
        border-radius: 20px;
    }

    #board .grid {
        width: 95%;
        grid-template-columns: repeat(2, 1fr);
    }

    #board .tile {
        width: 90%;
        border-radius: 0;
    }

    #board h1 {
        padding-bottom: 0;
    }

    /* Mobile-specific Elements */
    .hover {
        flex-basis: 100%;
    }

    .label {
        color: white;
        margin: 5px 10px;
        font-size: 16px;
        white-space: nowrap;
    }

    .emphasized {
        width: unset;
        margin: 10px;
    }

    .emphasized img {
        width: -webkit-fill-available;
        object-fit: contain;
        height: unset;
    }

    .info {
        grid-template-columns: repeat(1, 1fr);
    }

    /* Partners Section */
    #partners-grid {
        width: 90%;
        padding-top: 20px;
        padding-bottom: 0;
    }

    #partners-grid img {
        width: 80px !important;
    }

    #partners h1 {
        text-align: center;
    }

    /* Footer */
    footer {
        flex-flow: column nowrap;
        padding-top: 10px;
    }

    footer h3 {
        font-size: 20px;
    }

    footer div {
        width: 95%;
        margin: auto;
        text-justify: auto;
    }
}

/* ===== PANDERING SECTION ===== */
#pandering {
    text-align: center;
}

#pandering div {
    display: flex;
    flex-flow: row wrap;
    justify-content: space-around;
}

#pandering h2, #pandering h3, #pandering p {
    margin: 20px;
    width: 50%;
}

#pandering h3 {
    font-weight: normal;
}

#pandering a {
    color: #ed208b;
}