:root{
    --dark-blue: #1b4f8e;
    --blue: #00c;
    --red: #c00;
    --gold:#feca04;
    --green: #2a7c45;
    --dark-green: #00270c;
    --pale-gold: #fffbed;
    --xtra-light:#fafafa;
    --light:#f4f4f4;
    --med-light: #ddd;
    --medium:#aaa;
    --dark:#222;
    --primary:#0b0b0b;

    --body-font: Inter, sans-serif;
    --heading-font: Oswald, sans-serif;
}

*{box-sizing:border-box}

body{
    margin:0;
    font-family:var(--body-font);
    background:var(--light);
    color:var(--dark);
}

.debug{
    background-color: var(--gold);
    color: var(--red);
    padding: 2rem;
}

h1,h2,h3{
    font-family:var(--heading-font);
    letter-spacing:1px;
}

a{
    color: var(--blue);
    text-decoration: none;
}
a:hover{
    color: var(--red);
    text-decoration: underline;
}

/* NAVIGATION */

header{
    background:rgba(0,0,0,0.9);
    color:#fff;
    position:fixed;
    width:100%;
    top:0;
    z-index:1000;
}

.navbar{
    display:flex;
    justify-content:space-between;
    align-items:center;
    padding:16px 28px;
}

.logo{
    font-family:var(--heading-font);
    font-size:1.3rem;
    letter-spacing:2px;
}
.logo img{
    width: 10%;
    min-width: 90px;
    height: auto;
    position: absolute;
    top: .5rem;
    left: .5rem;
}

.nav-links{
    display:flex;
    gap:24px;
    list-style: none;
}

.nav-links a{
    text-decoration:none;
    color:#fff;
    font-weight:500;
    position:relative;
}

.nav-links a:after{
    content:"";
    position:absolute;
    width:0%;
    height:2px;
    bottom:-4px;
    left:0;
    background:var(--green);
    transition:0.3s;
}

.nav-links a:hover:after{
    width:100%;
}
.nav-links .here a:after{
    width:100%;
    background:var(--gold);
}

/* FOOTER LINKS */

.foot-links a{
    color: var(--medium);
    display: inline-block;
    margin: 0 .75rem;
    text-decoration: none;
}
.foot-links a:hover{
    text-decoration: underline;
}

/* HAMBURGER */

.hamburger{
    display:none;
    flex-direction:column;
    cursor:pointer;
}

.hamburger span{
    background:white;
    height:3px;
    width:26px;
    margin:4px 0;
}

.mobile-menu{
    display:none;
    flex-direction:column;
    background:#000;
    padding:20px;
    list-style: none;
}

.mobile-menu a{
    display: block;
    color:var(--xtra-light);
    margin: .5rem 0;
    padding: .5rem;
    text-decoration:none;
    border-bottom:1px solid rgba(255,255,255,0.1);
}
.mobile-menu a:hover {
    color:var(--primary);
    background-color: var(--pale-gold);
}

.mobile-menu.active{
    display:flex;
}

/* HERO VIDEO */

.hero{
    height:100vh;
    min-height: 75vh;
    position:relative;
    color:white;
    display:flex;
    align-items:center;
    justify-content:center;
    text-align:center;
    overflow:hidden;
}
.hero>img,
.hero video{
    position:absolute;
    top:50%;
    left:50%;
    transform:translate(-50%,-50%);
    min-width:100%;
    min-height:100%;
    object-fit:cover;
    z-index:-2;
}

.hero-overlay{
    position:absolute;
    inset:0;
    background:linear-gradient(rgba(0,0,0,0.65),rgba(0,0,0,0.75));
    z-index:-1;
}

.hero-content{
    max-width:900px;
    padding:20px;
}

.hero h1{
    font-size:3.5rem;
    margin-bottom:10px;
}

.hero p{
    font-size:1.2rem;
    opacity:.9;
    margin-bottom:30px;
}

.hero-buttons{
    display:flex;
    justify-content:center;
    flex-wrap:wrap;
}

img{
    height: auto;
    max-width: 100%;
}
figure{
    padding: 0;
    margin: 0 auto;
    max-width: 100%;
    text-align: center;
}

.btn{
    padding:14px 30px;
    border:none;
    border-radius: 10px;
    font-weight:600;
    margin:8px;
    cursor:pointer;
    font-size:.95rem;
    display: inline-block;
    text-decoration: none;
}

.btn-primary{
    background:var(--dark-blue);
    color:white;
}
.btn-primary:hover{
    background:var(--green);
    color:white;
}
.btn-primary:hover a,
.btn-primary:hover a:hover{
    color:white;
}

.btn-outline{
    background:transparent;
    border:2px solid white;
    color:white;
}
.btn-outline:hover{
    color:var(--gold);
}
.btn-outline:hover a,
.btn-outline:hover a:hover{
    color:var(--gold);
}

.hero-stats{
    margin-top:50px;
    display:flex;
    justify-content:center;
    gap:50px;
    flex-wrap:wrap;
    font-weight:600;
}

.hero-stat-number{
    font-size:2rem;
    font-family:var(--heading-font);
    color:var(--gold);
}

/* SECTIONS */

section{
    padding:4rem 10%;
}
section.first{
    padding-top: 83px;
}
section.no-top-pad{
    padding-top: 0;
}

.section-title{
    text-align:center;
    margin-bottom:40px;
    font-size:2rem;
}

/* CARD GRID */

.cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    justify-content: center; /* center the row if not full */
}

.card {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    width: 100%;
    max-width: 450px;
    height: 100%;
    box-sizing: border-box;
    border-radius: 10px;
    padding: 1rem;
    box-shadow:0 10px 30px rgba(0,0,0,0.1);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    background-color: var(--xtra-light);
    margin: auto;
    color: var(--primary);
    overflow:hidden;
}

.cards .card > * {
    flex: 1 0 auto;
}

.card a{
    color: var(--primary);
}

.card:hover{
    transform:translateY(-6px);
}

.card img{
    width:100%;
    height:170px;
    object-fit:cover;
}

.card-content{
    padding:20px;
}

.card-content h3{
    margin-top:0;
    color: var(--primary);
}

.card-content p.date{
    color: var(--dark-green);
}

/* MAP */

#map_canvas{
    height:380px;
    background:var(--med-light);
    display:flex;
    justify-content:center;
    align-items:center;
    font-weight:600;
    color:#444;
    border-radius:10px;
}
div.infoWin{
    line-height: 1.35;
    overflow: hidden;
    white-space: nowrap;
}

/* SCHOOL LIST */

#school-list {
    margin: 3rem 0 0 0;
    color: var(--primary);
}

#school-list h4 {
    margin: 0 0 0.25rem 0;
    color: var(--dark-green);
}

#school-list a {
    color: var(--primary);
    text-decoration: none;
}

#school-list a:hover {
    text-decoration: underline;
}

#school-list em {
    display: block;
}

/* SCHOOL INFO */

@media (min-width: 750px) {
    section.school-info {
        display: grid;
        grid-template-columns: 300px 1fr;
        gap: 2rem;
        align-items: start;
        width: fit-content;
        margin: 0 auto;
    }
}

section.school-info #school-logo img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* MASTERS */

#masters .card{
    max-width: 300px;
}

#masters .card img{
    object-position: top;
}

/* POSTS */

section.post p:has(img) {
    text-align: center;
}
section.post p>img{
    max-width: 100%;
    width: 600px;
}

/* EVENTS */

section.event{
    padding-top: 0;
}

section.event h2{
    margin-top: 4rem;
}

section.event figure img{
    max-width: 100%;
    width: 600px;
}

/* ACCOUNT */

#account-menu {
    padding-bottom: 0;
}
#account-menu ul {
    display: flex;
    flex-wrap: wrap;
    list-style: none;
    width: 100%;
}
#account-menu ul li {
    flex: 0 0 auto;
}

#account-menu ul li a {
    display: block;
    white-space: nowrap;
    color: var(--green);
}
#account-menu ul li a:hover {
    color: var(--dark-blue);
}

#account-content{

}

/* SCHOOL EDIT FORM */

#cform fieldset{
    margin: 0 0 3em 0 !important;
    padding: .5em 1em !important;
    border-left: solid var(--dark-blue) 1px !important;
    border-top: solid var(--dark-blue) 1px !important;
    border-bottom: solid var(--dark-blue) 0 !important;
    border-right: solid var(--dark-blue) 0 !important;
}
#cform fieldset legend{
    font-weight: bold;
    font-style: italic;
    color: var(--dark-blue);
    padding: 0 1em;
    text-align: center;
}
#cform label{
    margin-bottom: .5em !important;
}
#cform fieldset > div{
    margin: 0 0 1.5em 0;
}
#cform fieldset p{
    margin: 0 0 2em 0;
}
#cform p.instructions{
    font-style: italic;
    font-size: .8em;
    color: #999;
    margin: 0;
}
#cform .assets-field{
    margin: 0 !important;
}
#cform input[type=submit]{
    color: var(--xtra-light);
    padding: 1em 1.5em;
}

/* CTA */

.cta{
    background:var(--dark-green);
    color:white;
    text-align:center;
}

/* JUDGING LIST TABLE */

table.judges-info{
    width: 90%;
    border: solid black 2px;
    border-collapse: collapse;
    margin: auto;
}
table.judges-info tr{
    border-collapse: collapse;
}
table.judges-info tr.even{
    background-color: #dfdfdf;
}
table.judges-info tr.Inactive{
    color: #999;
}
table.judges-info tr.Inactive td a{
    color: #999;
}

table.judges-info tr th{
    background-color: #000;
    color: #fff;
}
table.judges-info tr td{
    border: solid #ccc 1px;
    vertical-align: top;
}
table.judges-info tr td.expire-3-months{
    color: #f00;
}
table.judges-info tr td.expire-6-months{
    color: #ffbc25;
}
table.judges-info tr td.expire-12-months{
    color: #ff0;
}
table.judges-info tr td.good-standing{
    color: #0f0;
}

/* CONTENT TABLE */

figure.table table{
    border: solid var(--primary) 1px;
    min-width: 65%;
}
figure.table tbody tr:nth-child(even){
    background-color: var(--med-light);
}
figure.table tbody tr th{
    background-color: var(--primary);
    color: var(--xtra-light);
    padding: .25rem .5rem;
    text-align: center;
    font-weight: bold;
}
figure.table tbody tr td{
    padding: .25rem .5rem;
    text-align: left;
}

/* CONTACT FORM */

form.contact-form > div,
form.contact-form fieldset > div{
    margin-bottom: 1rem;
}

form.contact-form label{
    display: inline-block;
    width: 7rem;
    font-weight: bold;
    vertical-align: top;
}

form.contact-form input[type=text],
form.contact-form input[type=email],
form.contact-form input[type=password]{
    padding: .5rem 1rem;
    border-radius: 10px;
    border-collapse: collapse;
    border: solid 1px var(--dark);
    font-family: var(--body-font);
    max-width: 100%;
    width: 35rem;
}

form.contact-form textarea{
    padding: .5rem 1rem;
    border-radius: 10px;
    border-collapse: collapse;
    border: solid 1px var(--dark);
    font-family: var(--body-font);
    max-width: 100%;
    width: 35rem;
    height: 8rem;
}

    /* FOOTER */

footer{
    background:#000;
    color:var(--medium);
    padding:40px 20px;
    text-align:center;
}

/* MOBILE */

@media (max-width:768px){
    .nav-links{
        display:none;
    }

    .hamburger{
        display:flex;
    }

    .hero h1{
        font-size:2.2rem;
    }

    .hero-stats{
        flex-direction:column;
    }

    section{
        padding:60px 7%;
    }

}
