@import 'reset.css';

:root {
    --dark: #333;
    --gray: #eeeeee;
    --green: #4c6b4a;
    --green-dark: #3a523a;
    --green-light: #eaf2e9;
    --text-muted: #666;
}

* {
    box-sizing: border-box;
    scroll-behavior: smooth;
}

html {
    font-size: 16.5px;
}

body {
    background: #fff;
    color: var(--dark);
    font-family: 'Inter', sans-serif;
    font-size: 100%;
    line-height: 1.2;
}

h1, h2, h3, h4, h5, h6 {
    margin-bottom: 1rem;
}

h1, h2, h3 {
    font-weight: 800;
}

h1 {
  font-size: 2.5rem;
}

h2 {
  font-size: 1.75rem;
}

h3 {
  font-size: 1.5rem;
}

h4 {
  font-size: 1.25rem;
}

h5 {
  font-size: 1.1rem;
}

h6 {
  font-size: 1rem;
}

p {
    margin-bottom: 1rem;
}

hr {
    border: 0;
    border-top: 1px solid var(--gray);

margin: 2rem 0
}

img {
    height: auto;
}

button {
    border: 0;
}

.button {
    background-color: var(--green);
    border-radius: 5px;
    color: white;
    cursor: pointer;
    display: inline-block;
    font-weight: 600;
    padding: 0.75rem 1.5rem;
    text-decoration: none;
    transition: background-color 0.3s ease;
}
.button:focus, .button:hover {
    background-color: var(--green-dark);
}

.button.button-small {
    padding: 0.5rem 1rem;
}

.button.button-light {
    background-color: var(--green-light);
    color: var(--green-dark);
}

.container {
    margin: 0 auto;
    max-width: 1200px;
}

header .header-inner {
    align-items: center;
    background: #fff;
    border-bottom: 1px solid #ddd;
    display: flex;
    justify-content: space-between;
    padding: 1rem;
    position: relative;
    top: 0;
    z-index: 10;
}

.logo {
    display: flex;
}

.logo img {
    max-width: 200px;
}

nav {
    align-items: center;
    display: flex;
    gap: 2rem;
}

@media (max-width: 767px) {
    nav {
        display: none;
    }
}

nav a {
    color: var(--dark);
    font-weight: 600;
    text-decoration: none;
}
nav a:focus, nav a:hover {
    text-decoration: underline;
}

.hamburger {
    cursor: pointer;
    display: none;
}

@media (max-width: 767px) {
    .hamburger {
        display: block;
    }
}

.sidebar {
    background: #fff;
    box-shadow: -2px 0 10px rgba(0, 0, 0, 0.1);
    height: 100vh;
    padding: 1rem;
    position: fixed;
    right: -100%;
    top: 0;
    transition: right 0.3s ease;
    width: 250px;
    z-index: 100;
}

.sidebar.open {
    right: 0;
}

.sidebar-header {
    display: flex;
    justify-content: flex-end;
    padding: 1rem;
    position: absolute;
    right: 0;
    top: 0;
}

.sidebar-links {
    display: flex;
    flex-direction: column;
    gap: .5rem;
    margin-top: 2rem;
}

.sidebar a {
    color: inherit;
    font-size: 1.2rem;
    padding: .5rem 1rem;
    text-decoration: none;
}

.sidebar a:focus, .sidebar a:hover {
    text-decoration: underline;
}

.sidebar-close svg {
    cursor: pointer;
    fill: var(--dark);
    height: 24px;
    width: 24px;
}

.overlay {
    background: rgba(0, 0, 0, 0.3);
    display: none;
    inset: 0;
    position: fixed;
    z-index: 90;
}

.overlay.visible {
    display: block;
}

.hero {
    background-image: image-set(
      url('../images/downtown-knoxville.webp') type('image/webp') 1x,
      url('../images/downtown-knoxville.jpg') 1x
    );
    background-position: 50%;
    background-size: cover;
    color: white;
    padding: 6rem 3rem;
    position: relative;
    text-align: center;
    z-index: 1;
}

.hero::before {
    background-image: linear-gradient(to bottom, rgba(0,0,0,.5), rgba(0,0,0,.2) );
    bottom: 0;
    content: '';
    left: 0;
    position: absolute;
    right: 0;
    top: 0;
    z-index: -1;
}

.hero p {
    font-style: italic;
    margin-bottom: .25rem;
}

.hero-buttons {
    align-items: center;
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    justify-content: center;
    margin-top: 1rem;
    position: relative;
    z-index: 1;
}

section {
    padding: 3rem 1rem;
}

#about .about-inner {
    align-items: center;
    display: grid;
    gap: 2rem;
    grid-template-columns: 1fr 1fr;
}

@media (max-width: 767px) {
    #about .about-inner {
        grid-template-columns: 1fr;
    }
}

#about p:last-child {
    margin-bottom: 0;
}

#about img {
    border-radius: 10px;
    margin: 0 auto;
    max-width: 350px;
    width: 100%;
}

#events {
    background: var(--green-light);
}

#events .event-carousel {
    counter-reset: card;
    display: flex;
    gap: 1.5rem;
    overflow-x: auto;
    padding: 1rem 1rem 0;
}

#events .event-card {
    background: white;
    border-radius: 10px;
    box-shadow: 0 0 5px rgba(0, 0, 0, 0.1);
    min-width: 250px;
    padding: 1.5rem 1rem 1rem;
    position: relative;
}

#events .event-card::before {
    align-items: center;
    background: var(--green);
    border-radius: 50%;
    color: white;
    content: counter(card);
    counter-increment: card;
    display: flex;
    font-weight: bold;
    height: 30px;
    justify-content: center;
    left: -10px;
    position: absolute;
    top: -10px;
    width: 30px;
}

#events .event-card[data-status="ended"] {
    filter: grayscale(100%);
    opacity: .75;
}

#events .event-card[data-status="ended"]::after {
    color: var(--text-muted);
    content: "Ended";
    font-size: 12px;
    position: absolute;
    right: 10px;
    text-transform: uppercase;
    top: 10px;
}

#events .event-card p {
    margin-bottom: 0;
}

#events .event-card .button {
    margin-top: 1rem;
}

#resources .resource-grid {
    display: grid;
    gap: 1rem;
    grid-template-columns: repeat(3, 1fr);
}

@media (max-width: 767px) {
    #resources .resource-grid {
        grid-template-columns: 1fr;
    }
}

#resources .resource-card {
    display: flex;
}

#resources .resource-card a {
    align-items: center;
    background-color: var(--gray);
    border-radius: 8px;
    box-shadow: 0 0 5px rgba(0, 0, 0, 0.05);
    color: inherit;
    display: flex;
    flex-direction: column;
    gap: .5rem;
    padding: 1rem;
    text-align: center;
    text-decoration: none;
    width: 100%;
}

#resources .resource-card a:focus, #resources .resource-card a:hover {
    color: var(--green);
    font-weight: bold;
}

footer {
    background-color: var(--green-dark);
    color: white;
    padding: 2rem 1rem;
    text-align: center;
}

footer p {
    margin: 0;
}

#announcement {
    background: var(--green-light);
    padding: 2rem;
}

#announcement .announcement {
    margin: 0 auto;
    max-width: 550px;
}

#announcement .announcement-header {
    align-items: center;
    display: flex;
    gap: .5rem;
    margin-bottom: .75rem;
}
#announcement .announcement-header svg {
    flex-shrink: 0;
}

.modal {
    align-items: center;
    background-color: rgba(0, 0, 0, 0.5);
    display: flex;;
    height: 100vh;
    justify-content: center;
    left: 0;
    opacity: 0;
    position: fixed;
    top: 0;
    width: 100vw;
    z-index: 1000;

visibility: hidden
}

.modal.active {
    opacity: 1;
    visibility: visible;
}

.modal-content {
    background: white;
    border-radius: 8px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
    max-width: 400px;
    opacity: 0;
    padding: 1.5rem;
    position: relative;
    transform: translateY( calc(-50% + 30px) );
    transition: opacity 0.3s ease, transform 0.3s ease;
    width: 90%;
}

@media (min-width: 576px) {
    .modal-content {
        min-width: 500px;
    }
}
.modal.active .modal-content {
    opacity: 1;
    transform: translateY(-50%);
}

.modal-content p {
    margin-bottom: 0;
}

.modal-close-button {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 1.5rem;
    position: absolute;
    right: 0.75rem;
    top: 0.5rem;
}