/* Reset & Global Styles */

/* Define the Shadowhand font */
@font-face {
    font-family: 'Shadowhand';
    src: url('/fonts/shadowhand.woff2') format('woff2');
    font-weight: normal;
    font-style: normal;
    font-display: swap; /* Ensures text appears immediately with fallback, then swaps */
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Helvetica Neue', sans-serif;
    background-color: #121212;
    color: #D4D4D4;
    line-height: 1.6;
}

body,
p,
li,
label,
input,
textarea {
    font-family: 'Helvetica Neue', sans-serif;
}

body.no-scroll {
    overflow: hidden; /* Prevent scrolling when menu is open */
}

a {
    text-decoration: none;
    color: inherit;
    transition: color 0.3s ease;
}

a:hover {
    color: #550000;
}

ul {
    list-style: none;
    padding: 0;
}

/* Header Styles */

#header {
    width: 100%;
    height: 100vh;
    background-image: url(images/header-bg1.jpg);
    background-size: cover;
    background-position: center;
    position: relative;
    z-index: 1;
    overflow: hidden;
}

#header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    z-index: -1;
}

.container {
    padding: 10px 10%;
    max-width: 1400px;
    margin: 0 auto;
}

nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    padding: 20px 0;
}

.logo {
    width: 120px;
}

nav ul li {
    display: inline-block;
    margin: 0 15px;
}

nav ul li a {
    color: #D4D4D4;
    font-size: 1rem;
    font-weight: 500;
    position: relative;
    transition: color 0.3s ease;
}

nav ul li a::after {
    content: '';
    width: 0;
    height: 2px;
    background: #550000;
    position: absolute;
    left: 0;
    bottom: -4px;
    transition: width 0.3s ease;
}

nav ul li a:hover::after,
nav ul li a:focus::after {
    width: 100%;
}

nav ul li a:hover,
nav ul li a:focus {
    color: #550000;
}

.header-text {
    margin-top: 15%;
    font-size: 1.4rem;
    text-align: center;
}

.header-subtitle {
    font-size: 1.1rem;
    margin-top: 10px;
    color: #D4D4D4;
    opacity: 0;
    transform: translateY(20px);
    animation: slideUpParagraph 0.8s ease-out forwards 0.7s;
}

.header-text h1 {
    font-size: 3.5rem;
    margin-top: 20px;
    font-weight: normal;
    color: #fff;
    opacity: 0;
    transform: translateY(20px);
    animation: fadeInHeading 1s ease forwards 0.2s;
}

.brand-name {
    color: #550000;
    font-family: 'Shadowhand', cursive;
    font-weight: bold;
}

@keyframes fadeInHeading {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideUpParagraph {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* General Section Styles */

section {
    padding: 4rem 0;
    /* Removed border-bottom: 1px solid #333; */
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.8s ease, transform 0.8s ease;
    margin-bottom: -30px;
    /* added negative margin */
}

section.visible {
    opacity: 1;
    transform: translateY(0);
}

.section-title {
    font-size: 2.2rem;
    margin-bottom: 2rem;
    color: #550000 !important;
    text-align: center;
    font-weight: 600;
}

#about .section-title {
    font-size: 2.2rem;
    margin-bottom: 2rem;
    color: #550000;
    text-align: center;
    font-weight: 600;
}


/* ----------ABOUT---------- */

#about {
    padding: 60px 0;
    background-size: cover;
    background-position: center;
    position: relative;
    background-image: url('images/about-bg.jpg');
    /* add an image */
}

#about::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 1;
}

.about-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    position: relative;
    z-index: 2;
}

.about-text {
    flex: 1;
    font-size: 1rem;
    line-height: 1.8;
    color: #D4D4D4;
    text-align: center;
    max-width: 800px;
}

.about-text p {
    margin-bottom: 1.2rem;
}

/* ----------SERVICES---------- */

#services {
    padding: 60px 0;
    background-color: #1E1E1E;
    background-position: center;
    position: relative;
    color: #D4D4D4;
}

.services-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 20px;
    margin-top: 30px;
    padding-bottom: 2rem;
}

.service-item {
    background: #252525;
    padding: 20px;
    border-radius: 6px;
    line-height: 1.4;
    font-weight: 300;
    transition: background 0.3s ease, transform 0.3s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    transform: translateY(0px);
    color: #D4D4D4;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.3);
    /* Subtle shadow */
}

.service-item:hover,
.service-item:focus {
    background: #333;
    transform: translateY(-5px);
    transform: scale(1.03);
}

.service-item>*last-child {
    margin-bottom: 0px;
}

.service-item i {
    font-size: 40px;
    margin-bottom: 15px;
    color: #550000;
}

.service-item h3 {
    font-size: 1.2rem;
    font-weight: 500;
    margin-bottom: 10px;
    color: #D4D4D4;
}

.service-item p {
    font-size: 0.9rem;
    color: #D4D4D4;
}

/* ----------TEAM---------- */

#team {
    padding: 60px 0;
    background-color: #252525;
    /* Slightly lighter than body */
    /* background-image: url('images/team-bg.jpg');   Add background image here if needed */
    background-size: cover;
    background-position: center;
    position: relative;
}

.team-intro {
    text-align: center;
    margin-bottom: 1rem;
    color: #D4D4D4;
}

.team-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 20px;
    margin-top: 30px;
    padding-bottom: 2rem;
}

.team-member {
    background: #333;
    /* Slightly darker background */
    padding: 20px;
    border-radius: 6px;
    text-align: center;
    transition: transform 0.3s ease, background 0.3s ease;
    color: #D4D4D4;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.3);
}

.team-member:hover,
.team-member:focus {
    transform: translateY(-5px);
    transform: scale(1.03);
    background: #444;
    /* Darker on hover */
}

.team-member-img {
    width: 100%;
    border-radius: 6px;
    margin-bottom: 10px;
}

.team-member h3 {
    font-size: 1.2rem;
    margin-bottom: 5px;
    color: #D4D4D4;
}

.team-member p {
    font-size: 0.9rem;
    color: #D4D4D4;
    margin-bottom: 10px;
}

.team-member .social-icons a {
    color: #808080;
    transition: color 0.3s ease;
}

.team-member .social-icons a:hover {
    color: #550000;
}

/* ----------EVENTS---------- */

#events {
    padding: 60px 0;
    background-color: #1E1E1E;
    background-image: url('images/up-bg.jpg');
    background-size: cover;
    background-position: center;
    position: relative;
    color: #D4D4D4;
    width: 100%;
    height: auto;
    overflow: hidden;
}

.events-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    margin-top: 30px;
    padding-bottom: 2rem;
}

.event-item {
    background: #252525;
    border-radius: 6px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    max-width: 400px;
    margin: 0 auto;
    transition: transform 0.3s ease, background 0.3s ease;
    color: #D4D4D4;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.3);
}

.event-item:hover {
    transform: translateY(-5px);
    transform: scale(1.03);
    background: #333;
}

.event-item img {
    width: 100%;
    height: auto;
    display: block;
}

.event-details {
    padding: 15px;
    text-align: center;
}

.event-details h3 {
    font-size: 1.2rem;
    margin-bottom: 5px;
    color: #D4D4D4;
}

.event-details p {
    font-size: 0.9rem;
    color: #D4D4D4;
    margin-bottom: 10px;
}

.event-btn {
    display: inline-block;
    background-color: #550000;
    border: 2px solid #550000;
    padding: 10px 20px;
    border-radius: 4px;
    text-decoration: none;
    color: #D4D4D4;
    margin-top: 10px;
    font-weight: 500;
    text-align: center;
    transition: background-color 0.3s ease, color 0.3s ease;
}

.event-btn:hover,
.event-btn:focus {
    background-color: transparent;
    color: #550000;
    border: 2px solid #550000;
}

/* ---------- COMMUNITY ---------- */
#community {
    padding: 60px 0;
    background-color: #121212; 
    background-position: center;
    background-size: cover;
    position: relative;
    color: #D4D4D4;
}

.community-content {
    text-align: center; /* Center the text block */
    max-width: 800px; /* Limit width for readability, similar to About */
    margin: 0 auto; /* Center the block horizontally */
    padding: 0 1rem; /* Add some horizontal padding */
}

.community-content p {
    margin-bottom: 1.2rem; /* Spacing between paragraphs */
    font-size: 1rem; /* Consistent font size */
    line-height: 1.8; /* Consistent line height */
}


/* ---------CONTACT-------- */

#contact {
    padding: 80px 0;
    background-color: #121212;
}

#contact .section-title {
    text-align: center;
    font-size: 2.5rem;
    color: #550000;
    margin-bottom: 40px;
}

.contact-container {
    display: flex;
    flex-wrap: wrap;
    gap: 40px;
    max-width: 1000px;
    margin: 0 auto;
    padding: 20px;
    background-color: #1E1E1E;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.contact-details,
.contact-form {
    flex: 1;
    min-width: 300px;
}

.contact-details {
    padding: 20px;
    border-right: 1px solid #333; /* Only apply border if needed */
}

.contact-details h3, /* Corrected from .contact-info h3 */
.social-links h3,
.contact-form h3 {
    font-size: 1.5rem;
    color: #D4D4D4;
    margin-bottom: 20px;
}

.contact-details p { /* Corrected from .contact-info p */
    font-size: 1rem;
    color: #808080;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
}

.contact-details p i { /* Corrected from .contact-info p i */
    color: #550000;
    margin-right: 10px;
    font-size: 1.2rem;
}

.social-links {
    margin-top: 30px;
}

.social-icons {
    display: flex;
    gap: 15px;
}

.social-icons a {
    text-decoration: none;
    font-size: 1.5rem;
    color: #808080;
    transition: color 0.3s ease;
}

.social-icons a:hover {
    color: #550000;
}

.contact-form {
    padding: 20px;
}

.contact-form .form-group {
    margin-bottom: 20px;
}

.contact-form input,
.contact-form textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid #333;
    border-radius: 4px;
    font-size: 1rem;
    color: #D4D4D4;
    background-color: #252525;
    transition: border-color 0.3s ease;
}

.contact-form input:focus,
.contact-form textarea:focus {
    border-color: #550000;
    outline: none;
}

.contact-form textarea {
    resize: vertical;
    min-height: 150px;
}

.btn {
    display: inline-block;
    background-color: #550000;
    color: #D4D4D4;
    padding: 12px 30px;
    border: none;
    border-radius: 4px;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: background-color 0.3s ease, color 0.3s ease;
}

.btn:hover {
    background-color: transparent;
    color: #550000;
    border: 1px solid #550000;
}

/* Copyright Style */

.copyright {
    width: 100%;
    text-align: center;
    padding: 20px 0;
    background: #1E1E1E;
    font-weight: 300;
    font-size: 0.9rem;
    margin-top: 3rem; /* Adjust if negative margin from sections causes issues */
    color: #808080;
}

.copyright i {
    color: #550000;
}

/* Mobile menu style */

.menu-icons {
    display: none;
}


/* Overlay Styles (NEW) */

#overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    /* Semi-transparent black */
    z-index: 10;
    /* Below the menu but above everything else */
    display: none;
    /* Initially hidden */
}

#overlay.active {
    display: block;
}

@media only screen and (max-width: 768px) {
    .container {
        padding: 10px 5%;
    }

    .logo {
        width: 100px;
    }

    nav ul {
        background: #1E1E1E; /* Consider matching this color theme or making it consistent */
        position: fixed;
        top: 0;
        right: -200px;
        width: 200px;
        height: 100vh;
        padding-top: 50px;
        z-index: 11;
        /* Higher than the overlay */
        transition: right 0.5s;
    }

    nav ul li {
        display: block;
        margin: 25px;
    }

    .menu-icons {
        display: block;
    }

    .menu-icons i {
        font-size: 2rem;
        color: #D4D4D4;
    }


    .show-mobile-menu {
        right: 0;
    }

    .header-text {
        margin-top: 40%;
        font-size: 1.2rem;
    }

    .header-text h1 {
        font-size: 2.5rem;
    }

    .section-title {
        font-size: 2rem;
    }

    .services-list, /* Apply single column layout to more grids on mobile */
    .team-list,
    .events-list {
        grid-template-columns: 1fr;
    }

    .contact-container {
        flex-direction: column; /* Stack contact info and form */
    }

    .contact-details {
        border-right: none; /* Remove border when stacked */
        border-bottom: 1px solid #333; /* Add border below details */
        padding-bottom: 20px; /* Add some space */
    }

    .contact-form {
        padding-top: 0; /* Adjust padding */
    }

    .community-content {
        max-width: 100%; /* Allow full width on mobile */
    }
}