:root {
    --primary-color: #cf0000;
    /* Imperial Red */
    --hover-color: #ff3333;
    --bg-color: #111111;
    --text-color: #eeeeee;
    --header-bg: #000000;
    --card-bg: #1a1a1a;
    --footer-bg: #000000;
}

@font-face {
    font-family: "AvenirNext";
    src: url("../assets/fonts/AvenirNext-Regular.woff") format("woff");
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: "AvenirNext";
    src: url("../assets/fonts/AvenirNext-Italic.woff") format("woff");
    font-weight: 400;
    font-style: italic;
    font-display: swap;
}

@font-face {
    font-family: "AvenirNext";
    src: url("../assets/fonts/AvenirNext-Medium.woff") format("woff");
    font-weight: 500;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: "AvenirNext";
    src: url("../assets/fonts/AvenirNext-DemiBold.woff") format("woff");
    font-weight: 600;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: "AvenirNext";
    src: url("../assets/fonts/AvenirNext-Bold.woff") format("woff");
    font-weight: 700;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: "Avenir";
    src: url("../assets/fonts/Avenir-Heavy.woff") format("woff");
    font-weight: 800;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: "VadersFist";
    src: url("../assets/fonts/VADERS_FIST.TTF") format("truetype");
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Roboto', sans-serif;
    background-color: var(--bg-color);
    background-image: url('../assets/images/ISG-LOGO-WebBackgroundv2.jpg');
    background-repeat: no-repeat;
    background-position: center top;
    background-size: cover;
    color: var(--text-color);
    line-height: 1.6;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

a {
    text-decoration: none;
    color: inherit;
    transition: color 0.3s ease;
}

a:hover {
    color: var(--primary-color);
}

/* Header & Nav */
.site-header {
    position: sticky;
    top: 0;
    z-index: 1000;
    overflow: visible;
}

.header-top {
    background-color: #8b0000;
    border-bottom: 1px solid #5e0000;
    padding: 0 2rem;
    height: 2.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    position: relative;
    overflow: visible;
}

.header-title {
    display: inline-flex;
    align-items: baseline;
    gap: 0.5rem;
    font-family: "AvenirNext", "Segoe UI", Arial, sans-serif;
    letter-spacing: 0.12em;
    position: relative;
    top: 0px;
    z-index: 2;
}

.header-title .imperial {
    font-size: 1.75rem;
    font-weight: 500;
    text-transform: none;
}

.header-title .garrison {
    font-size: 1.75rem;
    font-weight: 800;
    text-transform: uppercase;
}

.header-bottom {
    background-color: var(--header-bg);
    border-bottom: 2px solid rgb(0, 0, 0);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1.5rem;
    padding: 0 2rem;
    min-height: 2.5rem;
    position: relative;
    overflow: visible;
}

.header-left img,
.header-right img {
    height: 50px;
    width: auto;
    display: block;
}

.header-left,
.header-right {
    position: absolute;
    top: -25px;
}

.header-left {
    left: 1.5rem;
}

.header-right {
    right: 1.5rem;
}

.header-right {
    display: flex;
    align-items: center;
    gap: 0;
}

.header-center {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

nav > ul {
    display: flex;
    list-style: none;
    gap: 1.5rem;
}

nav {
    position: relative;
}

nav > ul > li > a {
    font-family: "AvenirNext", "Avenir Next", "Segoe UI", Arial, sans-serif;
    font-weight: 500;
    text-transform: uppercase;
    font-size: 0.8rem;
    letter-spacing: 1px;
}

nav > ul > li {
    position: relative;
}

.dropdown-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    min-width: 210px;
    list-style: none;
    margin: 0;
    padding: 0.5rem 0;
    background-color: rgba(0, 0, 0, 0.5);
    border: 1px solid #2b2b2b;
    border-top: 2px solid var(--primary-color);
    z-index: 1001;
}

.dropdown:hover .dropdown-menu {
    display: block;
}

.dropdown-menu li a {
    display: block;
    padding: 0.5rem 0.9rem;
    font-family: "AvenirNext", "Avenir Next", "Segoe UI", Arial, sans-serif;
    font-size: 0.8rem;
    font-weight: 500;
    text-transform: none;
    letter-spacing: 0.2px;
    white-space: nowrap;
}

.menu-toggle {
    display: none;
    font-size: 1.5rem;
    cursor: pointer;
}

.social-icons {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.social-icons a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.social-icons img {
    width: 30px;
    height: 30px;
    display: block;
}

/* Hero Section */
.hero {
    background: linear-gradient(rgba(0, 0, 0, 0.7), rgba(0, 0, 0, 0.7)), url('../assets/images/20230305_142404.jpg');
    background-size: cover;
    background-position: center;
    height: 60vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 2rem;
    position: relative;
    overflow: hidden;
}

.hero.has-carousel {
    background: none;
}

.hero-carousel {
    position: absolute;
    inset: 0;
    z-index: 0;
}

.hero-slide {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center;
    opacity: 0;
    transition: opacity 0.8s ease-in-out;
}

.hero-slide video {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.hero-slide.is-active {
    opacity: 1;
}

.hero-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
    z-index: 1;
}

.hero-content {
    position: relative;
    z-index: 2;
    max-width: 700px;
    text-align: left;
    margin-left: auto;
    margin-right: auto;
    align-self: flex-end;
    padding-bottom: 2rem;
    transform: translateX(-40%);
}

.hero-title {
    font-family: "AvenirNext", "Segoe UI", Arial, sans-serif;
    text-transform: uppercase;
    letter-spacing: 2px;
    margin: 0;
    line-height: 1.05;
}

.hero-title--primary {
    font-size: clamp(2.5rem, 10vw, 96px);
    font-weight: 900;
    text-transform: uppercase;
    font-family: "Avenir", "AvenirNext", "Segoe UI", Arial, sans-serif;
    line-height: 1.25;
    color: #b30000;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.6);
	-webkit-text-stroke: 6px #b30000;
	}

.hero-title--secondary {
    font-size: clamp(1.75rem, 7vw, 68px);
    font-weight: 700;
    font-family: "AvenirNext", "Segoe UI", Arial, sans-serif;
	line-height: 0.5;
    color: #ffffff;
    margin-top: 0.3rem;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.6);
}

.hero-subtitle {
    font-family: "AvenirNext", "Segoe UI", Arial, sans-serif;
    font-size: 1.05rem;
    font-weight: 400;
    max-width: 520px;
    margin: 1rem 0 1.5rem;
    color: #f2f2f2;
}

.hero-control {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, 0.4);
    background: rgba(0, 0, 0, 0.4);
    color: #fff;
    font-size: 1.5rem;
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 2;
}

.hero-control.prev {
    left: 1rem;
}

.hero-control.next {
    right: 1rem;
}

.hero-dots {
    position: absolute;
    bottom: 1rem;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 0.5rem;
    z-index: 2;
}

.hero-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, 0.5);
    background: rgba(255, 255, 255, 0.25);
    cursor: pointer;
}

.hero-dot.is-active {
    background: var(--primary-color);
    border-color: var(--primary-color);
}

.hero-spacer {
    height: 110px;
    background-image: url('../assets/images/Hex100plus.png');
    background-repeat: repeat-x;
    background-position: center;
    background-size: auto 100%;
    border-top: 4px solid rgb(18, 21, 22);
 }

.btn {
    display: inline-block;
    background-color: var(--primary-color);
    color: white;
    padding: 0.8rem 2rem;
    text-transform: uppercase;
    font-weight: bold;
    border: none;
    cursor: pointer;
    border-radius: 4px;
    font-size: 1rem;
    transition: background 0.3s;
}

.btn:hover {
    background-color: var(--hover-color);
    color: white;
}

.hero-cta-group {
    display: flex;
    align-items: center;
    gap: 1.2rem;
    flex-wrap: wrap;
}

.hero-cta {
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.05rem;
    min-width: 230px;
    min-height: 96px;
    padding: 0.55rem 1.4rem;
    background-color: rgb(154, 1, 3);
    border: 1px solid #ffffff;
    border-radius: 10px;
    color: #fff;
    line-height: 0.9;
    text-align: center;
    text-decoration: none;
}

.hero-cta-row {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.35rem;
}

.hero-cta-row--second {
    gap: 0.25rem;
}

.hero-cta-top,
.hero-cta-mid,
.hero-cta-bottom {
    display: block;
    font-family: "VadersFist", "Avenir", "AvenirNext", "Segoe UI", Arial, sans-serif;
    font-weight: 400;
    letter-spacing: 1px;
    text-transform: uppercase;
    transition: transform 0.2s ease;
}

.hero-cta-top {
    font-size: 3.6rem;
}

.hero-cta-mid {
    font-size: 2.7rem;
}

.hero-cta-bottom {
    font-size: 3.6rem;
}

.hero-cta:hover,
.hero-cta:focus {
    background-color: rgb(154, 1, 3);
    border-color: transparent;
    color: #fff;
}

.hero-cta:hover .hero-cta-top,
.hero-cta:hover .hero-cta-mid,
.hero-cta:hover .hero-cta-bottom,
.hero-cta:focus .hero-cta-top,
.hero-cta:focus .hero-cta-mid,
.hero-cta:focus .hero-cta-bottom {
    transform: scale(0.9);
}

@media (max-width: 768px) {
    .hero-cta-group {
        justify-content: flex-start;
    }
}

.imperial-cogs {
    display: block;
    margin: 1.5rem auto;
}

/* Main Content */
main {
    flex: 1;
    padding: 2rem;
    max-width: 1400px;
    margin: 0 auto;
    width: 100%;
}

.main-layout {
    display: grid;
    grid-template-columns: minmax(0, 1.35fr) minmax(280px, 0.85fr);
    gap: 2rem;
    align-items: start;
}

.main-intro {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    align-items: stretch;
    margin-bottom: 2.5rem;
}

.main-intro-logos {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    flex-shrink: 0;
}

.main-intro-emblem {
    width: 110px;
    height: auto;
}

.main-intro-501st {
    width: 150px;
    height: auto;
}

.main-intro-501st-row {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.main-intro-501st-full {
    width: 100%;
    max-width: 500px;
    height: auto;
    object-fit: contain;
}

.main-intro-text p {
    font-family: "AvenirNext", "Avenir Next", "Segoe UI", Arial, sans-serif;
    font-size: 1rem;
    line-height: 1.55;
    color: #f0f0f0;
}

.section h2.recruits-heading,
.recruits-heading {
    font-family: "AvenirNext", "Avenir Next", "Segoe UI", Arial, sans-serif;
    font-size: 2rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: #fff;
    margin-bottom: 1.25rem;
    border: none;
    padding: 0;
}

.recruits-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1rem;
}

.recruit-card {
    position: relative;
    background: rgba(0, 0, 0, 0.55);
    border: 1px solid #2f2f2f;
    border-radius: 6px;
    overflow: hidden;
}

.recruit-card-photo {
    position: relative;
    width: 100%;
    aspect-ratio: 548 / 767;
    background: linear-gradient(180deg, #3a3a3a 0%, #1a1a1a 100%);
    overflow: hidden;
}

.recruit-card-photo img,
.recruit-card-photo video {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
}

.fundraising-panel {
    background: rgba(154, 1, 3, 0.72);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 12px;
    padding: 1.25rem 1.25rem 1.5rem;
}

.section h2.fundraising-heading,
.fundraising-heading {
    font-family: "AvenirNext", "Avenir Next", "Segoe UI", Arial, sans-serif;
    font-size: 2rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: #fff;
    margin: 0 0 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid rgba(255, 255, 255, 0.35);
}

.fundraising-panel-body {
    display: flex;
    gap: 1rem;
}

.fundraising-thermometer {
    display: flex;
    flex-direction: column;
    align-items: center;
    flex-shrink: 0;
    width: 42px;
}

.fundraising-thermometer-track {
    position: relative;
    width: 22px;
    height: 220px;
    background: #111;
    border: 2px solid #2a2a2a;
    border-radius: 12px 12px 4px 4px;
    overflow: hidden;
}

.fundraising-thermometer-fill {
    --thermometer-level: 0;
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 100%;
    background: linear-gradient(180deg, #ff4d4d 0%, rgb(154, 1, 3) 100%);
    transform: scaleY(var(--thermometer-level));
    transform-origin: bottom center;
    transition: transform 1.2s cubic-bezier(0.22, 1, 0.36, 1);
}

.fundraising-thermometer-bulb {
    width: 36px;
    height: 36px;
    margin-top: -6px;
    border-radius: 50%;
    background: radial-gradient(circle at 35% 30%, #ff6666, rgb(154, 1, 3) 65%, #5a0001 100%);
    border: 2px solid #2a2a2a;
}

.fundraising-details {
    flex: 1;
    min-width: 0;
}

.fundraising-details p {
    font-family: "AvenirNext", "Avenir Next", "Segoe UI", Arial, sans-serif;
    font-size: 0.9rem;
    line-height: 1.5;
    color: #f5f5f5;
    margin-bottom: 0.85rem;
}

.fundraising-total {
    font-size: 2rem;
    font-weight: 700;
    letter-spacing: 0.02em;
    margin: 0.5rem 0;
    color: #fff;
}

.fundraising-since {
    font-size: 0.85rem;
    color: #ececec;
    margin-bottom: 1rem;
}

.fundraising-intro {
    font-size: 0.82rem;
}

.charity-slideshows {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.65rem;
    margin-top: 0.5rem;
}

.charity-slideshow {
    position: relative;
    aspect-ratio: 16 / 7;
    background: #fff;
    border-radius: 4px;
    overflow: hidden;
}

.charity-slideshow--empty {
    background: rgba(0, 0, 0, 0.25);
    border: 1px dashed rgba(255, 255, 255, 0.35);
}

.charity-slideshow-img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: contain;
    padding: 0.35rem;
    transition: opacity 0.6s ease;
    background: #fff;
}

.charity-slideshow-img--next {
    opacity: 0;
}

.section {
    margin-bottom: 4rem;
}

.section h2 {
    font-size: 2rem;
    text-transform: uppercase;
    color: var(--primary-color);
    margin-bottom: 1.5rem;
    border-bottom: 1px solid #333;
    padding-bottom: 0.5rem;
}

.section h3 {
    margin-top: 1.5rem;
    margin-bottom: 0.5rem;
    color: #fff;
}

/* Grid Layouts */
.grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.card {
    background-color: var(--card-bg);
    padding: 1.5rem;
    border-radius: 8px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.3);
}

/* Forms */
.form-group {
    margin-bottom: 1rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
}

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 0.8rem;
    background-color: #333;
    border: 1px solid #444;
    color: white;
    border-radius: 4px;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary-color);
}

/* Footer */
footer {
    background-color: var(--footer-bg);
    padding: 2rem;
    text-align: center;
    border-top: 4px solid rgb(18, 21, 22);
    font-size: 6pt;
    color: #888;
}

footer p {
    margin-bottom: 0.5rem;
    font-size: 6pt;
}

footer .social-icons {
    justify-content: center;
    margin-bottom: 1.5rem;
}

footer .social-icons img {
    width: 36px;
    height: 36px;
}

/* Responsive */
@media (max-width: 1024px) {
    .main-layout {
        grid-template-columns: 1fr;
    }

    .fundraising-panel {
        max-width: 520px;
    }
}

@media (max-width: 768px) {
    .main-intro {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }

    .recruits-grid {
        grid-template-columns: 1fr;
    }

    .fundraising-panel-body {
        flex-direction: column;
        align-items: center;
    }

    .fundraising-thermometer-track {
        height: 180px;
    }

    .hero-content {
        transform: none;
        max-width: 100%;
        padding: 0 1rem 2rem;
        text-align: center;
    }

    .hero-subtitle {
        margin-left: auto;
        margin-right: auto;
    }

    .hero-cta-group {
        justify-content: center;
    }

    .hero-cta {
        min-width: 180px;
        min-height: 80px;
        padding: 0.45rem 1rem;
    }

    .hero-cta-top,
    .hero-cta-bottom {
        font-size: 2.6rem;
    }

    .hero-cta-mid {
        font-size: 1.95rem;
    }

    .menu-toggle {
        display: block;
    }

    .header-top {
        padding: 0 1rem;
        height: 2rem;
    }

    .header-bottom {
        flex-wrap: wrap;
        justify-content: center;
        padding: 0.75rem 1rem;
    }

    .header-left,
    .header-right {
        position: static;
        top: auto;
    }

    .header-center {
        width: 100%;
        justify-content: center;
        flex-wrap: wrap;
    }

    nav > ul {
        display: none;
        flex-direction: column;
        position: static;
        background-color: var(--header-bg);
        border-bottom: 2px solid var(--primary-color);
        padding: 1rem;
    }

    nav {
        width: 100%;
    }

    nav > ul.active {
        display: flex;
    }

    .dropdown-menu {
        position: static;
        border: none;
        border-top: 1px solid #2b2b2b;
        background-color: transparent;
        min-width: 0;
        padding: 0.4rem 0 0.2rem 0.8rem;
    }

    .dropdown:hover .dropdown-menu {
        display: none;
    }

    nav > ul.active .dropdown-menu {
        display: block;
    }

    .hero h1 {
        font-size: 2rem;
    }

    .social-icons img {
        width: 22px;
        height: 22px;
    }
}

@media (max-width: 480px) {
    main {
        padding: 1rem;
    }

    .main-left {
        display: contents;
    }

    .main-layout > .main-intro      { order: 1; }
    .main-layout > .fundraising-panel { order: 2; }
    .main-layout > .recruits-heading  { order: 3; }
    .main-layout > .recruits-grid     { order: 4; }

    .main-intro {
        margin-bottom: 1.5rem;
    }

    .fundraising-panel {
        max-width: 100%;
        margin-bottom: 1.5rem;
    }

    .recruits-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 0.6rem;
    }

    .hero-cta {
        min-width: 150px;
        min-height: 70px;
    }

    .hero-cta-top,
    .hero-cta-bottom {
        font-size: 2.1rem;
    }

    .hero-cta-mid {
        font-size: 1.55rem;
    }

    .header-title .imperial,
    .header-title .garrison {
        font-size: 1.25rem;
    }
}
