* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
	
	/* Common constants */
	--menu-spacing : 1.8rem;
	--hdr1-size : 2.5rem;
	--hdr2-size : 1.8rem;
	--hdr3-size : 1.6rem;
	--hdr4-size : 1.3rem;
	--hdr5-size : 1rem;
	--body-size : 1.1rem;
	--body-sm-size : 1rem;
	--body-lg-size : 1.2rem;
	--tiny-size : 0.7rem;
	--emoji-size : 3rem;
	--emoji-mdl-size : 1.8rem;
	
	/* Commonly re-used variables.*/
	--color-body : #d4d4d4; 		/* White */
	--color-bright : #f0f0f0;	/* Brighter White */
	--color-dim : #a9a9a9;		/* Light Grey */
	--color-header: #d4ac0d;	/* Gold */
	--color-bkgd-dk: #121212;		/* Dark Grey */
	--color-bkgd-med : #1a1a1a;		/* Med Grey */
	--color-bkgd-lt : #292929;		/* Light Grey */
	--color-hilite: #cf0000;	/* Red */
	--color-error: #c62828;		/* Lighter Red */
	--color-dark: #300E0E;		/* Very dark Brown */
	
	/* Font Names */
	--font-fancyhdr : 'Almendra', serif;
	--font-plainhdr : 'Prata', cursive;
	--font-bodytext : 'Fredoka', sans-serif;
	--font-serif : 'Georgia', 'Times New Roman', serif;
}
body {
    font-family: var(--font-bodytext);
    line-height: 1.2;
    color: var(--color-body); /* Changed from #e0e0e0 to a slightly softer white */
    background-color: var(--color-bkgd-dk);
}

a {
  color: var(--color-body); /* Changed from #e0e0e0 to a slightly softer white */
}

h2 {
	font-weight: 400;
    font-family: var(--font-fancyhdr);
    font-size: var(--hdr2-size);
    margin: .7rem 0 .7rem 0;
    text-align: center;
    color: var(--color-header);
}


h3 {
	font-weight: 400;
    color: var(--color-header);
    font-family: var(--font-bodytext);
    font-size: var(--hdr3-size);
    margin-bottom: 12px;
    position: relative;
}

h4 {
	font-weight: 400;
    color: var(--color-header);
    font-size: var(--hdr4-size);
    font-family: var(--font-fancyhdr);
}

/* Generic Paragraph Text */
p {
	padding-top: 10px;
	color: var(--color-body);
    font-size: var(--body-size);
}

strong {
    color: var(--color-bright);
    font-weight: 600;
}

li {
	margin-left: 1em;
	color: var(--color-body);
	font-size: var(--body-size);
}

li::marker {
	color: var(--color-header);
}

em {
    color: var(--color-header);
    font-style: italic;
}

/* Make images scale down for smaller screens. */
img {				
    max-width: 100%;
    height: auto;
}

.container {
    max-width: 2400px;
    margin: 0 auto;
    padding: 0 20px;
}

/* ------- Styles for the Main Header ----- */
.main-header {
    background: #111;
    padding: 0.5rem 0.5rem;
	display: flex;
    border-bottom: 1px solid var(--color-hilite);
    position: sticky;
    top: 0px;
  	z-index: 2000;  /* Ensures it's on top of other content */
	height: 68px;
}

.header-container {
	width: 100%;
    display: grid;
	grid-template-columns: 1fr 3fr 1fr;
	grid-template-areas: 'hdrGrid1 hdrGrid2 hdrGrid3' ;
    justify-content: inherit;
    align-items: center;
    margin: 0 auto;
    padding: 0 5px;
}

.logo {
	grid-area: hdrGrid1;
}

.logo a {
    text-decoration: none;
}

.logo a:hover {
    text-decoration: none;
}

.logo h1 {
    font-family: var(--font-fancyhdr);
    font-size: var(--hdr2-size); ;
	font-weight: 400;
    margin: 0;
    color: var(--color-hilite);
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
    text-decoration: none;
}

.tagline {
    font-size: var(--tiny-size); 
    color: var(--color-dim); 
    text-decoration: none;
	padding-top : 0;
}

/* Hide the tagline when screenwidth starts coming down and move the logo to the center.*/
@media screen and (max-width: 900px) {
	.logo {
		grid-area: hdrGrid2;
	}
}

.header-divider {
    position: absolute;
    bottom: -1px;
    left: 0;
    width: 100%;
    height: 20px;
    z-index: 10;
	/*
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1200 30' preserveAspectRatio='none'%3E%3Cpath d='M0,0 L1200,0 L1200,15 C1000,5 800,25 600,15 C400,5 200,20 0,10 L0,0 Z' fill='%23111'/%3E%3Cpath d='M0,10 C200,20 400,5 600,15 C800,25 1000,5 1200,15 L1200,30 L0,30 Z' fill='%23111' opacity='0.5'/%3E%3C/svg%3E");
	*/
    background-size: 100% 100%;
}

.header-divider::after {
    content: "";
    position: sticky;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    /*
	background-image:
        radial-gradient(circle at 20% 50%, rgba(212, 172, 13, 0.15) 1px, transparent 4px),
        radial-gradient(circle at 40% 70%, rgba(212, 172, 13, 0.1) 2px, transparent 5px),
        radial-gradient(circle at 60% 30%, rgba(212, 172, 13, 0.15) 1px, transparent 3px),
        radial-gradient(circle at 80% 60%, rgba(212, 172, 13, 0.1) 2px, transparent 4px);
	*/
    background-size: 150px 50px;
    pointer-events: none;
}


.hero-section {
    background-size: cover;
    background-position: center;
    height: 480px;
    display: flex;
    align-items: center;
    text-align: center;
    color: var(--color-bright); 
    position: relative;
}

.hero-home {
  background-image: url('../image/hero-home.jpg');
  height: 480px;
}

.content-hero-contact {
  background-image: url('../image/hero-contact.jpg');
}

.content-hero-membership {
  background-image: url('../image/hero-membership.jpg');
}

.hero-library {
  background-image: url('../image/library.jpg');
  height: 480px;
}

.content-hero-donate {
  background-image: url('../image/hero-donate.jpg');
}

.hero-section:before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
}
.hero-content {
    position: relative;
    z-index: 1;
    max-width: 800px;
    margin: 0 auto;
    padding: 0 20px;
}
.hero-content h1 {
    font-family: var(--font-fancyhdr);
    font-size: var(--hdr1-size);
    margin-bottom: 1rem;
    color: var(--color-header);
    font-weight: 400;
}
.hero-content p {
    font-size: var(--hdr4-size); 
    margin-bottom: 2rem;
}
.btn {
    display: inline-block;
    background: linear-gradient(135deg, var(--color-hilite), var(--color-header));
    color: var(--color-bright);
    padding: 12px 30px;
    text-decoration: none;
    border-radius: 30px;
    font-weight: 600;
    transition: all 0.3s ease;
    font-family: var(--font-fancyhdr);
    border: none;
    cursor: pointer;
}
.btn:hover {
    background-color: var(--color-header);
    color: #111;
    transform: translateY(-3px);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
}
.content-btn {
    display: inline-block;
    background: linear-gradient(135deg, var(--color-hilite), var(--color-header));
    padding: 8px 18px;
    border-radius: 20px;
    font-weight: 400;
    color: var(--color-bright) !important;
    font-family: var(--font-fancyhdr);
    font-size: var(--body-size); 
    text-decoration: none;
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
}


.about-section {
    background-color: var(--color-bkgd-med);
    text-align: center;
    padding: 25px 0;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='4' height='4' viewBox='0 0 4 4'%3E%3Cpath fill='%23333' fill-opacity='0.4' d='M1 3h1v1H1V3zm2-2h1v1H3V1z'%3E%3C/path%3E%3C/svg%3E");
    position: relative;
}
.about-section p {
    max-width: 800px;
    margin: 0 auto;
    font-size: var(--body-lg-size); ; 
    color: var(--color-body);
}

footer {
    background-color: #111;
    color: var(--color-dim); /* Changed from bright white to a softer gray */
    padding: 0px 20px 0px 20px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='4' height='4' viewBox='0 0 4 4'%3E%3Cpath fill='%23333' fill-opacity='0.4' d='M1 3h1v1H1V3zm2-2h1v1H3V1z'%3E%3C/path%3E%3C/svg%3E");
    position: relative;
}
.footer-content {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
}

/* .footer-info { */
    /* margin-bottom: 20px; */
/* } */
/* JDT */
/* footer ul { */
    /* list-style: none; */
/* } */
/* footer ul li { */
    /* margin-bottom: 10px; */
/* } */
/* JDT */
/* .footer-nav a, */
/* .footer-nav-section a { */
    /* color: var(--color-dim); */
    /* text-decoration: none; */
    /* transition: color 0.3s ease; */
/* } */
/* .footer-nav a:hover, */
/* .footer-nav-section a:hover { */
    /* color: var(--color-header);  */
/* } */

.footer-bottom {
    display: flex;
    flex-direction: column;
    /* padding-top: 20px; */
    /* margin-top: 30px; */
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    color: #888888; /* Added even softer color for copyright text */
	text-align: center;
}

.footer-bottom p {
	font-size: var(--tiny-size);
}


/* Improve button appearance on small screens */
@media (max-width: 768px) {
    .footer-bottom {
        flex-direction: column;
        text-align: center;
    }
    
}

.footer-info h2 {
    font-family: var(--font-fancyhdr);
    font-size: var(--hdr2-size);
    margin-bottom: 12px;
    color: var(--color-hilite);
}

.footer-sections {
    display: flex;
	flex-direction: column;
    flex-wrap: wrap;
    justify-content: center;
    width: 100%;
	text-align: center;
}

.footer-info {
    margin-bottom: 20px;
    min-width: 160px;
}

.footer-ibm-logo {
  margin-top: 30px;
}

@media (max-width: 899px) {
    .header-container {
        flex-direction: column;
        text-align: center;
    }
    
    .hero-content h1 {
        font-size: var(--hdr2-size);
    }
    
    .footer-content {
        flex-direction: column;
        text-align: center;
    }

    /* .footer-nav { */
        /* flex-direction: column; */
        /* gap: 20px; */
        /* align-items: center; */
    /* } */
    
    /* .footer-nav-section { */
        /* text-align: center; */
        /* width: 100%; */
    /* } */
    
    /* .footer-nav-section h3:after { */
        /* left: 50%; */
        /* transform: translateX(-50%); */
    /* } */

    /* .footer-sections { */
        /* flex-direction: column; */
        /* align-items: center; */
        /* text-align: center; */
    /* } */
    
    /* .footer-info  { */
        /* width: 100%; */
        /* text-align: center; */
    /* } */
    
    /* .footer-nav-section h3:after { */
        /* left: 50%; */
        /* transform: translateX(-50%); */
    /* } */
    
}

.btn-outline {
    background-color: transparent;
    border: 2px solid var(--color-header);
    color: var(--color-header);
    margin-top: 15px;
}
.btn-outline:hover {
    background-color: var(--color-header);
    color: #111;
    transform: translateY(-3px);
    box-shadow: 0 4px 10px rgba(212, 172, 13, 0.3);
}


.experience-magic-section {
    background-color: #0c0c0c;
    color: var(--color-bright);
    padding: 30px 0;
    position: relative;
    overflow: hidden;
    border-top: none;
    background-image: url('../image/experience.jpg');
    background-size: cover;
    background-position: center;
}
.experience-magic-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    z-index: 1;
}
.experience-magic-section .container {
    position: relative;
    z-index: 2;
}
.experience-magic-section .section-intro {
    max-width: 800px;
    margin: 0 auto 40px;
    text-align: center;
    font-size: var(--hdr3-size);
    color: var(--color-header);
    font-family: var(--font-fancyhdr);
    font-style: italic;
}
.magic-experience-content {
    max-width: 900);
    margin: 0 auto;
}
.magic-experience-text p {
    max-width: 800px;
    margin: 0 auto;
    font-size: var(--body-lg-size); 
    text-align: center;
    color: var(--color-body); 
}
/* .magic-benefits { */
    /* list-style: none; */
    /* margin: 30px 0; */
    /* padding: 0; */
/* } */
/* .magic-benefits li { */
    /* margin-bottom: 15px; */
    /* font-size: 1.15rem; /* Increased from 1.1rem */
    /* display: flex; */
    /* align-items: center; */
/* } */
/* .benefit-icon { */
    /* font-size: 1.5rem; */
    /* margin-right: 15px; */
    /* color: var(--color-header); */
/* } */
/* .cta-container { */
    /* text-align: center; */
    /* margin-top: 40px; */
/* } */
@media (max-width: 768px) {
    .experience-magic-section {
        padding: 60px 0;
    }
    
    .experience-magic-section .section-intro {
        font-size: var(--hdr4-size);
    }
    
    .magic-benefits li {
        font-size: var(--body-sm-size);
    }
}
.contact-section {
    background-color: #111;
    color: var(--color-bright);
    padding: 20px 0;
    position: relative;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='4' height='4' viewBox='0 0 4 4'%3E%3Cpath fill='%23333' fill-opacity='0.4' d='M1 3h1v1H1V3zm2-2h1v1H3V1z'%3E%3C/path%3E%3C/svg%3E");
    border-top: none;
}
.contact-section .section-intro {
    text-align: center;
    max-width: 700px;
    margin: 0 auto 0;
    font-size: var(--body-lg-size); 
    color: var(--color-body); /* Changed from #ddd */
}
.form-container {
    max-width: 800px;
    margin: 0 auto;
    background-color: rgba(25, 25, 25, 0.5);
    border-radius: 10px;
    padding: 30px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}
.contact-form {
    display: flex;
    flex-direction: row;
    gap: 6px 10px;
    flex-wrap: wrap;
	justify-content: left;
}

.form-group {
    display: flex;
    flex-direction: column;
    flex-wrap: wrap;
    width: 100%;
}

.form-row {
    display: flex;
    gap: 20px;
}

.form-group.half {
    width: 49%;
}

.form-group.third {
    width: 32.3%;
}

.form-group.quarter {
    width: 23%;
}

.form-group.half {
    width: 50%;
}

.form-group label {
    margin-bottom: 5px;
    font-weight: 500;
    color: var(--color-header);
}
.form-group input,
.form-group select,
.form-group textarea {
    background-color: var(--color-bkgd-lt);
    border: 1px solid #444;
    border-radius: 6px;
    padding: 5px 10px;
    color: var(--color-bright);
    font-family: var(--font-bodytext);
    font-size: var(--body-sm-size);
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
    width: 100%;
}

/* Radio buttons only need to take up just a little bit of space. */
.form-group input[type="radio"] {
    width: 20px;
}

.form-group label.form-radio {
    color: var(--color-body);
}

/* Add error styling for form inputs */
.form-group input.error,
.form-group select.error,
.form-group textarea.error {
    border: 2px solid var(--color-error);
    box-shadow: 0 0 5px rgba(198, 40, 40, 0.3);
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--color-header);
    box-shadow: 0 0 0 2px rgba(212, 172, 13, 0.3);
}

.form-group input::placeholder,
.form-group textarea::placeholder {
    color: #888;
}
.form-submit {
    margin-top: 10px;
    text-align: center;
	margin-left: auto;
	margin-right: auto;
}

.form-submit .btn {
    padding: 12px 40px;
    font-size: var(--body-size);
}
.form-submit .btn:hover {
    background-color: var(--color-header);
    color: #111;
    transform: translateY(-3px);
    box-shadow: 0 4px 12px rgba(212, 172, 13, 0.3);
}


/* Hide hidden and honeypot form fields */
.form-group.winnie,
.form-group.hidden {
    display: none;
}

/* Ensure error inputs have consistent styling */
.form-group input.error,
.form-group select.error,
.form-group textarea.error {
    border: 2px solid var(--color-error);
    box-shadow: 0 0 5px rgba(198, 40, 40, 0.3);
}

/* Add animation to form submit button when submitted */
.btn.submitting {
    opacity: 0.7;
    position: relative;
}

.btn.submitting:after {
    content: '';
    position: absolute;
    border: 2px solid transparent;
    border-top-color: var(--color-bright);
    border-radius: 50%;
    width: 16px;
    height: 16px;
    right: 10px;
    top: calc(50% - 8px);
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }
    100% {
        transform: rotate(360deg);
    }
}

@media (max-width: 768px) {
    .form-row {
        flex-direction: column;
        gap: 20px;
    }
    
    .form-group.half {
        width: 100%;
    }
    
}
.section-divider {
    height: 60px;
    margin-top: -60px;
    position: relative;
    z-index: 5;
    pointer-events: none;
}


.experience-magic-section::after,
.contact-section::after {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: linear-gradient(90deg, transparent, rgba(212, 172, 13, 0.5), transparent);
    opacity: 0.7;
}

.events-section,
.magic-arts-section, 
.experience-magic-section,
.contact-section {
    box-shadow: 0 -5px 15px rgba(0, 0, 0, 0.1);
}
.btn,
.content-btn
 {
    font-family: var(--font-fancyhdr);
	color: var(--font-header);
}

/* Magic Benefit Cards styling */
.magic-benefit-cards {
    display: flex
;   gap: 25px;
    margin: 30px 0;
    margin-left: auto;
    margin-right: auto;
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: center;
}

.magic-benefit-card {
    background-color: rgba(20, 20, 20, 0.7);
    border-radius: 8px;
    padding: 20px;
    text-align: center;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border-left: 3px solid var(--color-header);
	max-width: 250px
}

.magic-benefit-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3);
}

.magic-benefit-card .benefit-icon {
    font-size: 2rem;
    margin-bottom: 12px;
	margin-left: 0px;
    display: block;
    color: var(--color-header);
}

.magic-benefit-card h3 {
    color: var(--color-header);
    font-size: var(--hdr3-size);
    margin-bottom: 10px;
    font-family: var(--font-fancyhdr);
}

.magic-benefit-card p {
    color: var(--color-body); /* Changed from #ddd */
    line-height: 1.4;
    font-size: var(--body-sm-size);
}

/* Responsive adjustments for magic benefit cards */
@media (max-width: 768px) {
    .magic-benefit-cards {
        grid-template-columns: 1fr; /* Keep 2 cards per row on tablets   */
        gap: 15px;
    }
}

@media (max-width: 480px) {
    .magic-benefit-cards {
        grid-template-columns: 1fr; /* Switch to 1 card per row on small mobile */
    }
}

/* Keep the existing footer-nav style for compatibility */
/* .footer-nav { */
    /* margin-bottom: 20px; */
    /* display: flex; */
    /* flex-wrap: wrap; */
    /* justify-content: space-between; */
    /* gap: 30px; */
/* } */

.sub-navigation {
    display: flex;
	flex-wrap: wrap;
    justify-content: center;
    position: sticky;
    top: 68px;
    z-index: 1999;
    width: 100%;
    height: auto;
    box-shadow: 0 2px 10px rgba(0,0,0,0.3);
    padding: 5px 0;
    background-color: var(--color-bkgd-med);
    
}


.sub-navigation ul {
    list-style: none;
    padding: 0;
}

.sub-navigation a {
    color: var(--color-header);
    padding: 0px 8px;
    font-family: var(--font-fancyhdr);
    font-size: var(--hdr5-size);
    transition: all 0.3s ease;
    text-decoration: none;
}

.sub-navigation a:hover {
    background-color: var(--color-bkgd-dk);
    color: var(--color-bright);
    transform: translateY(-2px);
}

.sub-navigation a.active {
    background-color: var(--color-hilite);
    color: var(--color-bright);
}

/* Random Photo Styles */
.random-photo-container {
    max-width: 400px;
    margin: 0 auto;
    margin-top: 40px;
    margin-bottom: 40px;
    background-color: var(--color-bkgd-lt);
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.random-photo-container:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.4);
}

.random-photo-image {
    width: 100%;
    overflow: hidden;
}

.random-photo-image img {
    display: block;
    transition: transform 0.5s ease;
}

.random-photo-container:hover .random-photo-image img {
    transform: scale(1.03);
}

.random-photo-caption {
    padding: 15px;
    background-color: var(--color-bkgd-med);
    border-top: 2px solid var(--color-hilite);
}

.random-photo-caption p {
    margin: 0;
    color: var(--color-body);
    font-size: var(--body-sm-size);
    text-align: center;
    font-style: italic;
}

@media (max-width: 480px) {
    .random-photo-container {
        width: calc(100% - 20px);
        padding-left: 10px;
        padding-right: 10px;
    }
    
    .random-photo-caption p {
        font-size: var(--body-sm-size);
    }
}

/* Links Directory Styles */
.links-card {
    padding: 2rem;
}

.links-list {
	width: 100%;
    list-style: none;
    padding: 0;
    margin: 0;
}

.links-list h3 {
	font-family: var(--font-fancyhdr);
	margin-top: 12px;
}


.links-list-item {
    display: grid;
	grid-template-columns: 1fr 2fr;
	gap: 1rem;
	font-size: var(--body-sm-size);
}

.links-list a {
    display: block;
    color: var(--color-body);
    text-decoration: none;
    transition: all 0.3s ease;
}

.links-list a:hover {
    transform: translateX(5px);
	text-decoration: underline var(--color-header);
}

.links-list span {
	overflow-wrap: anywhere;
}

.link-title {
    display: block;
    font-size: var(--body-lg-size);
    font-weight: 600;
    color: var(--color-header);
    margin-bottom: 0.3rem;
}

.link-description {
    display: block;
    font-size: var(--body-sm-size);
    color: #eaeaea;
}

@media (max-width: 640px) {
	.links-list-item {
		grid-template-columns: 1fr auto;
	}

	.links-list span {
		display: none;
	}
}
