/* ========================================
   1. ROOT & GLOBAL RESET (from style.css)
======================================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

@view-transition {
    navigation: auto;
}

/* Custom fade speed and timing */
::view-transition-old(root),
::view-transition-new(root) {
    animation-duration: 0.3s;
    animation-timing-function: ease-in-out;
}

:root {
    --safe-top: env(safe-area-inset-top, 0px);
    --safe-right: env(safe-area-inset-right, 0px);
    --safe-bottom: env(safe-area-inset-bottom, 0px);
    --safe-left: env(safe-area-inset-left, 0px);

    --bg-black: #000;
    --bg-dark-red: #210202;

    --red: #e30000;
    --bright-red: #ff0000;
    --dark-red: #cc0000;
    --muted-red: #aa0000;

    --font-main:
        "Helvetica World",
        "Helvetica Neue",
        Helvetica,
        Arial,
        sans-serif;
}

html {
    width: 100%;
    min-height: 100%;
    background: var(--bg-black);
    scroll-behavior: smooth;
}

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

body {
    width: 100%;
    min-height: 100%;
    margin: 0;
    padding: 0;
    overflow-x: hidden;
    background: var(--bg-dark-red);
    color: #fff;
}

body.loaded {
    overflow-y: auto !important;
}

main {
    width: 100%;
    min-width: 100%;
}

img {
    max-width: 100%;
    height: auto;
    -webkit-user-drag: none;
    -webkit-touch-callout: none;
    user-select: none;
    -webkit-user-select: none;
}

.guidelines-page {
    display: flex;
    flex-direction: column;

    width: 100%;
}

/* ========================================
   NAVIGATION
======================================== */

.section-nav {
    position: fixed;
    left: 50%;
    bottom: 2.5%;

    display: flex;
    flex-direction: row;
    gap: clamp(12px, 3vw, 25px);

    padding: 1.5vh 1.5vw;

    background: #1413137d;
    border-radius: 50px;

    opacity: 0;
    visibility: hidden;

    transform: translateX(-50%);

    transition:
        opacity 0.8s ease,
        visibility 0.8s ease;

    z-index: 1000;
}

.section-nav.show {
    opacity: 1;
    visibility: visible;
}

.section-nav a {
    display: flex;
    align-items: center;
    justify-content: center;

    width: clamp(38px, 8vw, 55px);
    height: clamp(38px, 8vw, 55px);

    color: #aaa2a2;
    font-size: clamp(16px, 3.5vw, 22px);
    text-decoration: none;

    transition: 0.3s ease;
}

.section-nav a.active {
    color: var(--red);
    transform: scale(1.2);
}

.section-nav i {
    font-size: 18px;
}


/* ========================================
   SECTION HEADER
======================================== */

.section-header {
    position: fixed;
    left: 0;
    width: 100%;
    height: 5dvh;

    padding:
        max(10px, var(--safe-top))
        4vw
        10px;

    background: rgba(0, 0, 0, 0.75);

    backdrop-filter: blur(3px);
    -webkit-backdrop-filter: blur(3px);

    transform: translateY(-100%);

    transition:
        opacity 0.4s ease,
        transform 0.4s ease,
        visibility 0.4s ease;

    pointer-events: auto;
    z-index: 999;
}

.section-header-content {
    width: 100%;
    height: 100%;

    display: flex;
    align-items: center;
    justify-content: center;
}

.section-header-brand {
    display: flex;
    align-items: center;
    justify-content: center;

    height: 100%;
    gap: 10px;

    color: var(--red);
    font-family: var(--font-main);
    font-size: 10px;
    font-weight: bold;
    line-height: 0.9;
}

.section-header-brand img {
    width: auto;
    height: 100%;
}

.section-header-brand small {
    font-size: 8px;
    font-weight: normal;
}

.section-header-title {
    color: var(--bright-red);
    font-family: var(--font-main);
    font-size: clamp(14px, 3vw, 24px);
    font-weight: 900;
    letter-spacing: -0.04em;
}

.section-header-nav {
    display: none;
}



/* ========================================
   3. MOBILE FLOATING NAV (from style.css)
======================================== */
.section-nav {
    position: fixed;
    left: 50%;
    bottom: 2.5%;
    display: flex;
    flex-direction: row;
    gap: clamp(12px, 3vw, 25px);
    padding: 1.5vh 1.5vw;
    background: #1413137d;
    border-radius: 50px;
    transform: translateX(-50%);
    z-index: 1000;
}

.section-nav.show {
    opacity: 1;
    visibility: visible;
}

.section-nav a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: clamp(38px, 8vw, 55px);
    height: clamp(38px, 8vw, 55px);
    color: #aaa2a2;
    font-size: clamp(16px, 3.5vw, 22px);
    text-decoration: none;
    transition: 0.3s ease;
}

.section-nav a.active {
    color: var(--red);
    transform: scale(1.2);
}

.section-nav i {
    font-size: 18px;
}


/* ========================================
   4. COMMON TYPOGRAPHY & HEADERS (from style.css)
======================================== */
.block-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 14px;
}

.block-title {
    margin: 0;
    color: var(--bright-red);
    font-family: var(--font-main);
    font-size: clamp(2.4rem, 2.2vw, 5cqh);
    font-weight: 800;
    line-height: 1;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    text-align: center;
}


/* ========================================
   5. COSTUME GUIDELINES PAGE SPECIFICS
======================================== */
.guidelines-page {
    width: 100%;
    height:100%;
    margin: 5vh 0 0 0;
    background: #210202;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.guidelines-hero {
    display: flex;
    justify-content: center; /* Horizontally centers the text */
    align-items: center;     /* Vertically centers the text */
    
    text-align: center;
    margin: 0 0 30px;
    background-image: url("Assets/website2.png");
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    width: 100%;
    height: 25svh;
}

/* Base Mobile Portrait Default */
.guidelines-content-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
}

/* Image styling to ensure responsiveness */
.hero-logo-img {
    max-width: 50%;
    max-height: 50%;
    width: auto;
    height: auto;
    object-fit: contain;
    filter: drop-shadow(0 0 10px rgba(227, 0, 0, 0.5));
}

.guidelines-section {
    width: 100%;
    max-width: 480px;
    padding: 0 5vw;
}

.block-icon-img {
    height: clamp(2.4rem, 2.2vw, 5cqh);
    width: auto;                      
    object-fit: contain;
    flex-shrink: 0;
}

.block-header {
    display: flex;
    align-items: center;
    justify-content: center; /* Centers icon and title horizontally */
    gap: 12px;
    margin-bottom: 14px;
    width: 100%;
}

.center-header {
    justify-content: center;
}

.block-icon-fa {
    font-size: clamp(20px, 4.5vw, 30px);
}

.text-bright-red {
    color: var(--bright-red);
}

/* Card Grid */
.cards-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    width: 100%;
}

.guide-card {
    background: var(--bg-dark-red);
    border: 1px solid var(--red);
    border-radius: 16px;
    padding: 16px 12px;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.7);
}

.full-width-card {
    width: 100%;
    padding: 20px 16px;
    margin: 6px 0;
}

.card-icon {
    font-size: 1.8rem;
    color: var(--bright-red);
    margin-bottom: 10px;
}

/* Image-specific rule for card icons */
img.card-icon {
    height: 1em;         /* Locks image height to the font-size of .card-icon */
    width: auto;          /* Maintains original aspect ratio */
    object-fit: contain;
}

.guide-card p {
    color: white;
    font-family: var(--font-main);
    font-size: clamp(11px, 2.2vw, 22px);
    line-height: 1.2;
    font-weight: normal;
}

/* Dividers */
.section-divider {
    width: 100%;
    max-width: 90vw;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--red), transparent);
    margin: 28px 0;
}

/* Container spacing for stacked vote cards */
.vote-cards-container {
    display: flex;
    flex-direction: column;
    width: 100%;
}

/* Center alignment for prize content container */
.prize-card .prize-content {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    margin-top: 10px;
}

/* Center alignment for the category list and paragraph text */
.prize-categories {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.prize-categories p {
    text-align: center;
    white-space: nowrap;
}

.prize-categories strong {
    color: #fff;
    font-weight: 700;
}

.prize-item {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
}

.prize-line {
    width: 5vw;               /* Adjust this value to make the line longer or shorter */
    height: 2px;                /* Thickness of the line */
    background-color: white;  /* Color of the line */
    display: inline-block;
    flex-shrink: 0;
}



/* ========================================
   FOOTER
======================================== */

.footer-black {
    position: relative;
    z-index: 10;

    display: block;

    width: 100%;
    height: 10vh;

    background: #210202;
}

/* ========================================
   PHONE LANDSCAPE
======================================== */

@media (orientation: landscape) and (max-height: 500px) {
.section-header {
    height: 10vh;
    top:0;
    transform: translateY(0);
}

.guidelines-hero{
    height: 35svh;
    margin: 0 0 5vh;
}

.hero-logo-img{
    max-height: 70%;
    padding-top: 5vh;
}

.guidelines-section {
    max-width: 85dvw;
    padding: 0 0;
}

.block-header{
    margin-bottom: 5vh;
}

.cards-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    
    width: 100%;
}

.guide-card {
    padding: 5vh 1.5vw;
}

.card-icon {
    font-size: 1.2rem;
    margin-bottom: 4px;
}

.guide-card p {
    font-size: clamp(12px, 1.5vw, 24px);
    text-align: justify;
    text-justify: inter-word;
    text-align-last: center;
}

.img.card-icon{
    height: 10vh;
}

.card-icon{
    font-size:10vh;
    margin: 3vh;
}

.section-nav{
    gap: 10px;
    bottom:5%;
}
.section-nav a{
    height: 5vh;
}
.section-nav i {
    font-size: 15px;
}

.section-divider{
    max-width: 90vw;
}

/* 1. Turn the vote container into a 2-column grid */
.vote-cards-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    width: 100%;
}

/* 2. Override margins so full-width-cards fit nicely in 2 columns */
.vote-section .full-width-card {
    width: 100%;
    margin: 0;
    padding: 5vh 1.5vw;
}

/* 3. Compact typography/lines inside prize card for short screen heights */
.prize-categories {
    gap: 4px;
}

.prize-item {
    font-size: 11px;
}

.prize-line {
    width: 20px; /* Shorten horizontal line to fit tight card width */
}

}

/* ========================================
   TABLET PORTRAIT
======================================== */
@media (min-width: 768px) and (orientation: portrait) {
.guidelines-section {
    max-width: 90%;
}

.img.card-icon{
    height: 5vh;
}

.card-icon{
    font-size: 5vh;
    margin: 1vh;
}

.guide-card {
    padding: 2vh 2vw;
}

.section-nav{
        bottom:2.5%;
    }
}

/* ========================================
   TABLET LANDSCAPE & DESKTOP (3-Column Full-Height Layout)
======================================== */
@media (min-width: 768px) and (orientation: landscape) and (min-height: 501px) {

    /* Fixed Header */
    .section-header {
        top: 0;
        height: 7vh;
        transform: translateY(0);
        position: static;
    }

    .guidelines-page{
        margin:0;
    }

    /* Hero Banner */
    .guidelines-hero {
        height: 25svh;
    }

    .hero-logo-img {
        max-height: 60%;
    }

    /* 1. Main Content Wrapper - Fills remaining page height side-by-side */
    .guidelines-content-wrapper {
    display: flex;
    flex-direction: row;
    justify-content: center; /* Center layout; gap handles spacing */
    align-items: stretch;
    gap: 1.5vw;
    width: 100%;
    padding: 0 2vw 20px;
    margin: 0 auto;
    box-sizing: border-box; /* Ensures padding does not add to total width */
    }

    /* DO'S & DO NOT: 40% width each */
    .guidelines-section {
        flex: 0 0 calc(35% - 1vw); 
        max-width: calc(35% - 1vw);
        display: flex;
        flex-direction: column;
        padding: 0;
        box-sizing: border-box;
    }

    /* HOW TO VOTE: 20% width */
    .guidelines-section.vote-section {
        flex: 0 0 calc(25% - 1vw);
        max-width: calc(25% - 1vw);
    }

    /* Vertical Column Dividers */
    .section-divider {
        flex: 0 0 1px;
        width: 1px;
        height: auto;
        min-height: 100%;
        margin: 0;
        background: linear-gradient(180deg, transparent, var(--red), transparent);
    }

    /* 4. Column 1 & 2 Card Grids */
    .cards-grid {
        flex: 1; /* Fills section height */
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }

    .guide-card {
        padding: 2vh 2vw;
    }

    .card-icon {
        font-size: 3rem;
    }

    .guide-card p {
        font-size: clamp(13px, 2.2vw, 15px);
        text-align: center;
        text-justify: inter-word;
        text-align-last: center;
    }

/* Enable Container Query tracking on the card */
.vote-section .prize-card {
    container-type: inline-size;
    container-name: prizecard;
}

/* 5. Column 3 Stacked Vote Cards */
.vote-cards-container {
    flex: 1; /* Fills section height */
    display: flex;
    flex-direction: column;
    gap: 12px;
    width: 100%;
}

.vote-section .full-width-card {
    flex: 1; /* Allows vote cards to expand evenly */
    margin: 0;
    padding: 2vh 2vw;
    box-sizing: border-box;
}

/* Prize Line Default Width */
.prize-line {
    width: 10px;
    height: 2px;
    background-color: #fff;
    flex-shrink: 0;
    display: inline-block;
}

/* AUTOMATICALLY REMOVE LINE WHEN COLUMN IS TOO NARROW */
@container prizecard (max-width: 220px) {
    .prize-line {
        display: none; /* Removes the line to give text full width */
    }

    .prize-item {
        flex-direction: column; /* Stacks '1st Place' and 'Best Costume' vertically */
        gap: 2px;
        text-align: center;
    }

    .prize-item strong{
        text-decoration: underline;;
    }

    .prize-item span{
        margin-bottom:1vh;
    }
}

/* Footer toggle */
.footer-black {
    display: none;
}
}

/* ========================================
   DESKTOP
======================================== */

@media (orientation: landscape)
    and (min-width: 1024px)
    and (min-height: 501px) {

.guidelines-page {
    height: 93vh;
}

.section-nav.show{
    display: none;
}

.section-header-content {
    display: flex;
    justify-content: space-between; /* Pushes Brand left and Nav right */
    align-items: center;            /* Vertically centers both items */
    width: 100%;
    height: 100%;
    padding: 0 2vw;                  /* Adjust side padding as needed */
    box-sizing: border-box;
}

.section-header-brand {
    display: flex;
    align-items: center;
    justify-content: flex-start;    /* Changed from center to flex-start */
    height: 100%;
    gap: 10px;
    color: var(--red);
    font-family: var(--font-main);
    font-size: 10px;
    font-weight: bold;
    line-height: 0.9;
}

    .section-header-nav {
        display: flex;
        align-items: center;
        gap: 1.5vw;
    }

    .section-header-nav a {
        display: flex;
        align-items: center;
        justify-content: center;

        width: 3vw;
        height: 3vw;

        color: #aaa2a2;

        font-size: 1vw;
        text-decoration: none;

        transition:
            color 0.3s ease,
            transform 0.3s ease;
    }

    .section-header-nav a.active {
        color: var(--red);
        transform: scale(1.1);
    }
}
