@import url('https://fonts.googleapis.com/css2?family=Ubuntu:ital,wght@0,300;0,400;0,500;0,700;1,300;1,400;1,500;1,700&display=swap');

:root {
    --primary-color: #026da3;
    --secondary-color: #003d99;
    --accent-color: #ffd700;
    --text-color: #0d6176;
    --bg-color: #f8fafc;
    --bg-colorII: #bbbaba;
    --card-bg: #ffffff;
    --input-bg: #f1f5f9;
    --border-color: #d1d5db;
    --shadow-color: rgba(0, 0, 0, 0.415);
}

.dark-mode {
    --primary-color: #026da3;
    --secondary-color: #1a73e8;
    --accent-color: #ffca28;
    --text-color: #e2e8f0;
    --bg-color: #0f172a;
    --card-bg: #1e293b;
    --input-bg: #334155;
    --border-color: #475569;
    --shadow-color: rgba(255, 255, 255, 0.079);
}

html {
    scroll-behavior: smooth;
    scrollbar-color: var(--primary-color) var(--bg-colorII);
    scrollbar-width: thin;
    zoom: 80%;
}

body {
    color: var(--text-color);
    background-color: var(--bg-color);
    font-family: "Ubuntu", sans-serif;
    margin: 0;
    transition: background-color 0.3s ease, color 0.3s ease;
}

#backToTop {
    position: fixed;
    bottom: 30px;
    right: 30px;
    background: var(--primary-color);
    color: white;
    padding: 10px 14px;
    border-radius: 50%;
    font-size: 18px;
    display: none;
    z-index: 1000;
    transition: opacity 0.3s ease;
}

#backToTop:hover {
    background-color: var(--secondary-color);
    cursor: pointer;
    transform: translateY(-50%) scale(1.2);
    animation: pulse-btn 1s infinite;
}

#backToTop.in-footer {
    color: var(--primary-color);
    background: white;
}


nav {
    background-color: #026da3c6;
    color: white;
    top: 0;
    font-size: 1rem;
    box-shadow: 0 2px 5px var(--shadow-color);
    transition: background-color 0.3s ease, box-shadow 0.3s ease;
}

nav div {
    max-width: 1800px;
    margin: 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 0;
}

nav img {
    height: 6rem;
    transition: transform 0.3s ease;
}

nav img:hover {
    transform: scale(1.1);
}

.nav-menu {
    display: flex;
    list-style: none;
    padding: 0;
}

.nav-menu li {
    margin-left: 1rem;
    position: relative;
}

.nav-menu li a {
    color: white;
    text-decoration: none;
    font-size: 1.25rem;
    font-weight: 900;
    transition: color 0.3s ease, transform 0.2s ease;
    padding: 0.5rem 1rem;
}

.nav-menu li a:hover {
    color: var(--accent-color);
    transform: translateY(-2px);
}

/* Dropdown Styles */
.dropdown {
    position: relative;
    display: inline-block;
}

.dropbtn {
    color: white;
    text-decoration: none;
    font-weight: 900;
    padding: 0.5rem 1rem;
    cursor: pointer;
    transition: color 0.3s ease, transform 0.2s ease;
}

.dropbtn:hover {
    color: var(--accent-color);
    transform: translateY(-2px);
}

.dropdown-content {
    display: none;
    position: absolute;
    background-color: var(--primary-color);
    min-width: 160px;
    box-shadow: 0 8px 16px var(--secondary-color);
    z-index: 1;
    border-radius: 0.375rem;
    top: 100%;
    left: 0;
}

.dropdown-content a {
    color: white;
    padding: 0.75rem 1rem;
    text-decoration: none;
    display: block;
    transition: background-color 0.3s ease, color 0.3s ease;
}

.dropdown-content a:hover {
    background-color: var(--secondary-color);
    color: var(--accent-color);
    border-radius: 5px;
}

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

nav .social-links {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin: 1rem 0;
}

nav .social-links a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 3rem;
    height: 3rem;
    background-color: var(--input-bg);
    border-radius: 50%;
    color: var(--primary-color);
    font-size: 1.5rem;
    transition: background-color 0.3s ease, color 0.3s ease, transform 0.3s ease;
}

nav .social-links a:hover {
    background-color: var(--primary-color);
    color: white;
    transform: scale(1.1);
}

nav button {
    background: none;
    border: none;
    color: white;
    font-size: 3rem;
    cursor: pointer;
    transition: transform 0.3s ease, color 0.3s ease;
}

nav button:hover {
    transform: rotate(360deg);
}

section#home {
    background: linear-gradient(135deg, rgba(41, 157, 220, 0.2) 20%, rgb(33, 48, 63) 100%), url("img/slide1.jpg");
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    background-attachment: fixed;
    color: white;
    padding: 6rem 1rem;
    min-height: 110vh;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
    transition: background-color 0.3s ease;
}

.dark-mode section#home {
    background: linear-gradient(135deg, rgba(12, 116, 168, 0.099) 0%, rgba(33, 48, 63, 0.099) 100%), url("img/slide1.jpg");
    background-size: cover;
    background-position: center;
}

section#home::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.2) 0%, transparent 70%);
    animation: pulse 10s infinite;
}

section#home div {
    max-width: 1200px;
    margin: 0 auto;
    text-align: center;
    position: relative;
}

section#home h1 {
    font-size: 3.5rem;
    font-weight: bold;
    margin-bottom: 1rem;
    animation: fade-in 1s ease-out, scale-in 1s ease-out;
    transition: color 0.3s ease;
}

section#home p {
    font-size: 1.75rem;
    font-weight: 500;
    margin-bottom: 2rem;
    animation: slide-up 0.8s ease-out;
    transition: color 0.3s ease;
}

section#home a {
    background-color: var(--primary-color);
    color: white;
    font-size: 1.25rem;
    font-weight: 600;
    padding: 0.75rem 1.5rem;
    border-radius: 0.375rem;
    text-decoration: none;
    transition: background-color 0.3s ease, transform 0.2s ease, box-shadow 0.3s ease;
}

section#home a:hover {
    background-color: var(--secondary-color);
    transform: translateY(-2px);
    box-shadow: 0 4px 8px var(--shadow-color);
}

section#home div h3 {
    font-size: 2rem;
    font-weight: 600;
    margin-top: 2rem;
    animation: fade-in 1.2s ease-out;
    transition: color 0.3s ease;
}

section#gallery {
    padding: 4rem 0;
    background-color: var(--bg-color);
    transition: background-color 0.3s ease;
    background-size: 100% 2px;
    background-position: bottom;
    background-repeat: no-repeat;
}

section#gallery div {
    max-width: 1200px;
    margin: 0 auto;
}

section#gallery h2 {
    font-size: 2.5rem;
    font-weight: bold;
    text-align: center;
    margin-bottom: 3rem;
    color: var(--primary-color);
    animation: scale-in 1s ease-out;
    transition: color 0.3s ease;
}

section#gallery #carousel {
    position: relative;
    overflow: hidden;
}

section#gallery #carousel>div {
    display: flex;
    transition: transform 0.7s cubic-bezier(0.4, 0, 0.2, 1);
}

section#gallery #carousel>div>div {
    flex: 0 0 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    transition: opacity 0.5s ease, transform 0.5s ease;
}

section#gallery #carousel>div>div:nth-child(1) {
    opacity: 1;
    transform: scale(1);
}

section#gallery #carousel img {
    width: auto;
    height: 600px;
    object-fit: cover;
    border-radius: 0.5rem;
    margin-bottom: 1rem;
    transition: transform 0.3s ease;
}

section#gallery #carousel img:hover {
    transform: scale(1.05);
}

section#gallery #carousel p {
    font-size: 1rem;
    color: var(--text-color);
    max-width: 600px;
    margin: 0 auto;
    animation: fade-in 1s ease-out;
    transition: color 0.3s ease;
}

section#gallery #prev-btn,
section#gallery #next-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background-color: var(--primary-color);
    color: white;
    border: none;
    padding: .75rem 1.5rem;
    cursor: pointer;
    font-size: 1.5rem;
    border-radius: 50%;
    transition: background-color 0.3s ease, transform 0.3s ease;
}

section#gallery #prev-btn:hover,
section#gallery #next-btn:hover {
    background-color: var(--secondary-color);
    transform: translateY(-50%) scale(1.2);
    animation: pulse-btn 1s infinite;
}

section#gallery #prev-btn {
    left: 1rem;
}

section#gallery #next-btn {
    right: 1rem;
}

.title-h2 {
    padding: 2rem 0;
    background-color: var(--bg-color);
    transition: background-color 0.3s ease;
    background: linear-gradient(to right, transparent, var(--primary-color) 50%, transparent);
    background-size: 50% 3px;
    background-position: bottom;
    background-repeat: no-repeat;
    transition: color 0.3s ease, border-bottom-color 0.3s ease;

}

section#gallery,
section#hierarchy,
section#events,
section#contact,
section#register,
section#about,
section#footer {
    padding: 5rem 0;
    background-color: var(--bg-color);
    transition: background-color 0.3s ease;
    background: linear-gradient(to right, transparent, var(--primary-color) 50%, transparent);
    background-size: 50% 2px;
    background-position: bottom;
    background-repeat: no-repeat;
}

section#map .map-container {
    border-radius: 0.5rem;
    overflow: hidden;
    border: 1px solid var(--border-color);
    box-shadow: 0 4px 6px var(--shadow-color);
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

section#map iframe {
    animation: fade-in 1s ease-out;
}

section div {
    max-width: 1200px;
    margin: 0 auto;
}

section h2 {
    font-size: 2.5rem;
    font-weight: bold;
    text-align: center;
    margin-bottom: 3rem;
    color: var(--primary-color);
    animation: scale-in 1s ease-out;
    transition: color 0.3s ease;
}

h4 {
    font-size: 1.1rem;
    font-weight: bold;
    text-align: center;
    margin-bottom: 3rem;
    color: var(--primary-color);
    animation: scale-in 1s ease-out;
    transition: color 0.3s ease;
}

section#map,
section#book-events {
    background-color: var(--bg-color);
    padding: 10rem 0 10rem 0;
    transition: background-color 0.3s ease;
}

section#about>div>div {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    padding: 2rem;
}

section#about h3 {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 1rem;
    color: var(--primary-color);
    animation: fade-in 1s ease-out;
    transition: color 0.3s ease;
}

section#about>div>div>div:first-child {
    animation: slide-left 0.8s ease-out;
}

section#about>div>div>div:last-child {
    animation: slide-right 0.8s ease-out;
}

section#about a {
    color: var(--primary-color);
    text-decoration: underline;
    transition: color 0.3s ease;
}

section#about a:hover {
    color: var(--secondary-color);
}

section#events>div>div {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1rem;
}

section#events>div>div>div {
    background-color: var(--card-bg);
    padding: 1.5rem;
    border-radius: 0.5rem;
    box-shadow: 0 4px 6px var(--shadow-color);
    animation: slide-up 0.8s ease-out;
    transition: transform 0.3s ease, box-shadow 0.3s ease, background-color 0.3s ease;
}

section#events>div>div>div:hover {
    transform: scale(1.05);
    box-shadow: 0 6px 12px var(--shadow-color);
}

section#events img {
    width: auto;
    border-radius: 10px;
    margin-bottom: 1rem;
    transition: transform 0.3s ease;
}

section#events img:hover {
    transform: scale(1.1);
}

section#events h3 {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--primary-color);
    transition: color 0.3s ease;
}

section#join,
section#register,
section#contact {
    align-items: center;
    justify-content: center;
    padding: 4rem 0;
    transition: background-color 0.3s ease;
}

section#join>div,
section#register>div,
section#contact>div {
    display: flex;
    justify-content: center;
    align-items: center;
}

.section-card {
    width: 100%;
    padding: 2rem;
    background-color: var(--card-bg);
    border-radius: 0.75rem;
    box-shadow: 5px 6px 12px 2px var(--shadow-color);
    transition: transform 0.3s ease, box-shadow 0.3s ease, background-color 0.3s ease;
}

.section-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 16px var(--shadow-color);
}



section#join .join-buttons,
section#book-events .join-buttons,
section#register .join-buttons,
section#contact .join-buttons {
    display: flex;
    justify-content: center;
    text-align: center;
    gap: 1.5rem;
    margin: 1.5rem 0;
}

section#join .join-button,
section#book-events .join-button,
section#register .join-button,
section#contact .join-button {
    background-color: var(--primary-color);
    color: white;
    padding: 1rem 1.5rem;
    border: none;
    border-radius: 0.5rem;
    font-size: 1rem;
    font-weight: 600;
    text-decoration: none;
    text-transform: uppercase;
    transition: background-color 0.3s ease, transform 0.2s ease, box-shadow 0.3s ease;
}

section#join .join-button:hover,
section#book-events .join-button:hover,
section#register .join-button:hover,
section#contact .join-button:hover {
    background-color: var(--secondary-color);
    transform: translateY(-2px);
    box-shadow: 0 4px 8px var(--shadow-color);
}

.social-links {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
    margin: 1.5rem 0;
}

.social-links a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 3rem;
    height: 3rem;
    background-color: var(--input-bg);
    border-radius: 50%;
    color: var(--primary-color);
    font-size: 1.5rem;
    transition: background-color 0.3s ease, color 0.3s ease, transform 0.3s ease;
}

.social-links a:hover {
    background-color: var(--primary-color);
    color: white;
    transform: scale(1.1);
}

section#contact p {
    font-size: 1rem;
    font-weight: 500;
    margin-bottom: 1.5rem;
    text-align: center;
    color: var(--text-color);
    transition: color 0.3s ease;
}

section#contact p a {
    color: var(--primary-color);
    text-decoration: none;
    transition: color 0.3s ease;
}

section#contact p a:hover {
    color: var(--secondary-color);
}

footer {
    position: relative;
    width: 100%;
    background-color: var(--primary-color);
    height: auto;
    font-weight: 900;
    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: column;
    color: white;
    padding: 4rem 0;
    margin-top: 4rem;
    text-align: center;
}

footer .wave {
    position: absolute;
    top: -100px;
    left: 0;
    width: 100%;
    height: 100px;
    background: url(img/wave.png);
    background-size: 1000px 100px;
}

footer .wave#wave1 {
    z-index: 1000;
    opacity: 1;
    bottom: 0;
    animation: animatWave 6s linear infinite;
}

footer .wave#wave2 {
    z-index: 999;
    opacity: 0.5;
    bottom: 10px;
    animation: animatWave_02 6s linear infinite;
}

footer .wave#wave3 {
    z-index: 1000;
    opacity: 0.2;
    bottom: 10px;
    animation: animatWave 5s linear infinite;
}

footer .wave#wave4 {
    z-index: 1000;
    opacity: 0.7;
    bottom: 10px;
    animation: animatWave_02 5s linear infinite;
}

@keyframes animatWave {
    0% {
        background-position-x: 1000px;
    }

    100% {
        background-position-x: 0px;
    }
}

@keyframes animatWave_02 {
    0% {
        background-position-x: 0px;
    }

    100% {
        background-position-x: 1000px;
    }
}

@keyframes fade-in {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

@keyframes slide-up {
    from {
        transform: translateY(20px);
        opacity: 0;
    }

    to {
        transform: translateY(0);
        opacity: 1;
    }
}

@keyframes slide-left {
    from {
        transform: translateX(-20px);
        opacity: 0;
    }

    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes slide-right {
    from {
        transform: translateX(20px);
        opacity: 0;
    }

    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes scale-in {
    from {
        transform: scale(0.95);
        opacity: 0;
    }

    to {
        transform: scale(1);
        opacity: 1;
    }
}

@keyframes pulse {
    0% {
        transform: scale(1);
        opacity: 0.5;
    }

    50% {
        transform: scale(1.2);
        opacity: 0.3;
    }

    100% {
        transform: scale(1);
        opacity: 0.5;
    }
}

@keyframes pulse-btn {
    0% {
        transform: translateY(-50%) scale(1);
    }

    50% {
        transform: translateY(-50%) scale(1.1);
    }

    100% {
        transform: translateY(-50%) scale(1);
    }
}

/* Hierarchy Styles */
.hierarchy-section {
    max-width: 100rem;
    margin: 0 auto;
    padding: 4rem 1rem;
    background: linear-gradient(to bottom, rgba(0, 98, 155, 0.03), transparent);
    position: relative;
}

.hierarchy-title {
    font-size: 2.5rem;
    font-weight: 800;
    color: var(--primary-color);
    text-align: center;
    margin-bottom: 3.5rem;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    border-bottom: 3px solid var(--primary-color);
    padding-bottom: 0.75rem;
    transition: color 0.3s ease, border-bottom-color 0.3s ease;
}

.org-chart {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4rem;
}

.leadership,
.branch {
    width: 100%;
    text-align: center;
    position: relative;
}

.leadership h3,
.branch h3 {
    font-size: 2rem;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 2rem;
    position: relative;
    display: inline-block;
    padding: 0 1rem;
    background: linear-gradient(to right, transparent, var(--primary-color) 50%, transparent);
    background-size: 100% 2px;
    background-position: bottom;
    background-repeat: no-repeat;
    transition: color 0.3s ease;
}

.members {
    display: flex;
    justify-content: center;
    gap: 1.25rem;
    flex-wrap: nowrap;
    overflow-x: auto;
    padding: 0.75rem;
}

.member-card {
    width: auto;
    padding: 1.2rem;
    background-color: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 1rem;
    box-shadow: 0 4px 8px var(--shadow-color);
    transition: transform 0.3s ease, box-shadow 0.3s ease, background-color 0.3s ease, border-color 0.3s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.member-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 16px var(--shadow-color);
}

.member-card img {
    width: 8rem;
    height: 8rem;
    border-radius: 50%;
    object-fit: cover;
    margin-bottom: 0.75rem;
    border: 3px solid var(--primary-color);
    transition: transform 0.3s ease, border-color 0.3s ease;
}

.member-card img:hover {
    transform: scale(1.1);
}

.member-card h4 {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--text-color);
    margin-bottom: 0.25rem;
    transition: color 0.3s ease;
}

.member-card p {
    font-size: 1.25rem;
    color: var(--text-color);
    opacity: 0.85;
    transition: color 0.3s ease;
}

.branch {
    position: relative;
}

.branch:not(:first-child)::before {
    content: '';
    position: absolute;
    top: -2.5rem;
    left: 50%;
    transform: translateX(-50%);
    width: 2px;
    height: 2.5rem;
    background-color: var(--primary-color);
    opacity: 0.5;
    transition: background-color 0.3s ease;
}

.committee-levels {
    display: flex;
    flex-direction: column;
    gap: 3rem;
    width: 100%;
}

.committee-level {
    display: flex;
    justify-content: center;
    gap: 2rem;
    flex-wrap: nowrap;
    position: relative;
}

.committee-level:not(:last-child)::after {
    content: '';
    position: absolute;
    bottom: -1.5rem;
    left: 50%;
    transform: translateX(-50%);
    width: 2px;
    height: 1.5rem;
    background-color: var(--primary-color);
    opacity: 0.5;
    transition: background-color 0.3s ease;
}

.level-2,
.non-technical-level-2 {
    justify-content: center;
}

.committee {
    background-color: var(--card-bg);
    padding: 1.5rem;
    border-radius: 1rem;
    border: 1px solid var(--border-color);
    box-shadow: 0 4px 8px var(--shadow-color);
    transition: box-shadow 0.3s ease, background-color 0.3s ease, border-color 0.3s ease;
    width: auto;
    flex: 0 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.committee:hover {
    box-shadow: 0 8px 16px var(--shadow-color);
}

.committee h4 {
    font-size: 1.4rem;
    font-weight: 600;
    color: var(--text-color);
    margin-bottom: 1.5rem;
    text-align: center;
    border-bottom: 1px dashed var(--border-color);
    padding-bottom: 0.75rem;
    transition: color 0.3s ease, border-bottom-color 0.3s ease;
}

/* Form Styles for Event Booking */
.form-group {
    margin-bottom: 1.5rem;
    align-items: left;
}

.form-group label {
    display: block;
    font-size: 1.2rem;
    margin-bottom: 0.5rem;
    font-weight: bolder;
    color: var(--primary-color);

    transition: color 0.3s ease;
}

.form-group input,
#newsletter-form input {
    width: 100%;
    padding: 0.75rem;
    border: 5px solid var(--border-color);
    border-radius: 0.375rem;
    background-color: var(--input-bg);
    color: var(--text-color);
    font-size: 1rem;
    font-weight: bolder;
    transition: border-color 0.3s ease, background-color 0.3s ease, color 0.3s ease;
}

.form-group input:focus,
#newsletter-form input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 5px var(--shadow-color);
}

.form-group input::placeholder,
#newsletter-form input::placeholder {
    color: var(--text-color);
    opacity: 0.6;
}

.form-group select {
    width: 100%;
    padding: 0.75rem;
    border: 5px solid var(--border-color);
    border-radius: 0.375rem;
    background-color: var(--input-bg);
    color: var(--text-color);
    font-size: 1rem;
    transition: border-color 0.3s ease, background-color 0.3s ease, color 0.3s ease;
}

.form-group select:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 5px var(--shadow-color);
}

.form-group select option {
    background-color: var(--card-bg);
    color: var(--text-color);
}

.form-group select option:hover {
    background-color: var(--input-bg);
    color: white;
}

.form-group textarea {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid var(--border-color);
    border-radius: 0.375rem;
    background-color: var(--input-bg);
    color: var(--text-color);
    font-size: 1rem;
    transition: border-color 0.3s ease, background-color 0.3s ease, color 0.3s ease;
}

.form-group textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 5px var(--shadow-color);
}

.form-group textarea::placeholder {
    color: var(--text-color);
    opacity: 0.6;
}

#newsletter-form input[type="email"] {
    margin: 10px;
    width: 100%;
}

#newsletter-form button {
    padding: 10px 10px;
    font-weight: bold;
    color: white;
    border-radius: 5px;
    border: 1px solid white;
    cursor: pointer;
}

#newsletter-form button:hover {
    background-color: white;
    border: 2px solid var(--primary-color);
    color: var(--primary-color);
    transition: background-color 0.3s ease, border-color 0.3s ease, color 0.3s ease;
}

/* Modal Styles */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.5);
    transition: opacity 0.3s ease;
}

.modal-content {
    background-color: var(--card-bg);
    margin: 15% auto;
    padding: 2rem;
    border-radius: 0.75rem;
    box-shadow: 0 6px 12px var(--shadow-color);
    width: 90%;
    max-width: 400px;
    text-align: center;
    animation: slide-up 0.3s ease-out;
    transition: background-color 0.3s ease;
}

.modal-content h3 {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--primary-color);
    margin: 1rem 0;
    transition: color 0.3s ease;
}

.modal-content p {
    font-size: 1rem;
    color: var(--text-color);
    margin-bottom: 1rem;
    transition: color 0.3s ease;
}

.close {
    color: var(--text-color);
    float: right;
    font-size: 1.5rem;
    font-weight: bold;
    cursor: pointer;
    transition: color 0.3s ease;
}

.close:hover,
.close:focus {
    color: var(--primary-color);
    text-decoration: none;
}

@media (max-width: 768px) {
    nav div {
        flex-direction: row;
        padding: 1rem;
    }

    nav img {
        height: 4rem;
        width: auto;
        margin-right: 1rem;

    }

    nav ul {
        flex-direction: column;
        margin-top: 1rem;
    }

    nav ul li {
        margin: 0.5rem 0;
    }

    nav .social-links {
        flex-direction: column;
        justify-content: center;
        margin-top: 3rem;
    }

    nav .social-links a {
        width: 2rem;
        height: 2rem;
        font-size: 1.25rem;
    }

    nav button {
        font-size: 2rem;
    }

    #backToTop {
        position: fixed;
        bottom: 20px;
        right: 15px;
        background: var(--primary-color);
        color: white;
        padding: 5px 10px;
    }

    section#home h1 {
        font-size: 2rem;
    }

    section#home p {
        font-size: 1rem;
    }

    section h2 {
        font-size: 2rem;
    }

    section#gallery #carousel img {
        height: 300px;
    }

    .section-card {
        margin: 0 1rem;
    }

    .member-card {
        width: 110px;
    }

    .member-card img {
        width: 3.5rem;
        height: 3.5rem;
    }

    .member-card h4 {
        font-size: 0.9rem;
    }

    .member-card p {
        font-size: 0.8rem;
    }

    .leadership h3,
    .branch h3 {
        font-size: 1.75rem;
    }

    .committee h4 {
        font-size: 1.2rem;
    }

    .committee {
        width: 200px;
    }

    .committee-level {
        flex-wrap: nowrap;
        overflow-x: auto;
        justify-content: flex-start;
        padding: 0.5rem;
    }

    section#join .join-buttons {
        flex-direction: column;
        gap: 0.75rem;
    }

    section#join .join-button {
        width: 100%;
        text-align: center;
    }

    section#events>div>div {
        grid-template-columns: 1fr;
        gap: 1rem;
        margin: 50px;
    }

    section#map .map-container {
        width: 90%;
        height: auto;
    }

    section#map iframe {
        width: 100%;
        height: 400px;
    }

    section#events>div>div>div {
        padding: 1rem;
    }

    section#book-events {
        margin: 50px;

    }

    section#book-events .form-group {
        margin-bottom: 1rem;
    }

    section#book-events .form-group label {
        font-size: 0.9rem;
    }

    section#book-events .form-group input,
    section#book-events .form-group select,
    section#book-events .form-group textarea {
        font-size: 0.9rem;
        padding: 0.5rem;
    }

    section#about>div>div {
        grid-template-columns: 1fr;
        gap: 1rem;
        margin: 50px;
    }

    .modal-content {
        width: 80%;
        margin: 30% auto;
    }
}

@media (min-width: 768px) {
    .hierarchy-title {
        font-size: 3rem;
    }
}