/* GPAC Website Styles */

/* Color Palette */
:root {
  --primary-brand-crimson: #990000;
  --secondary-brand-cream: #F5F5DC;
  --supporting-dark-crimson: #800000;
  --supporting-light-cream: #FFFFF0;
  --supporting-charcoal: #333333;
  --accent-gold: #D4AF37;
  --accent-diamond-white: #FFFFFF;
  --functional-success-green: #28A745;
  --functional-alert-red: #DC3545;

  /* New color assignments based on user feedback */
  --header-footer-bg-new: var(--secondary-brand-cream); /* Cream for header/footer */
  --header-footer-text-new: var(--primary-brand-crimson); /* Crimson text on cream */
  --section-bg-alternate: var(--primary-brand-crimson); /* Crimson for alternating sections */
  --text-on-crimson-section: var(--secondary-brand-cream); /* Cream text for crimson sections */
  --button-primary-bg: var(--primary-brand-crimson);
  --button-primary-text: var(--accent-diamond-white);
  --button-secondary-bg: var(--accent-gold);
  --button-secondary-text: var(--supporting-charcoal);
}

body {
  font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
  margin: 0;
  padding: 0;
  background-color: var(--supporting-light-cream); /* Default page background */
  color: var(--supporting-charcoal);
  line-height: 1.7;
  font-size: 16px;
}

.container {
  width: 90%;
  max-width: 1200px;
  margin: auto;
  overflow: hidden;
  padding: 0 20px;
}

/* Header - Updated */
header {
  background: var(--header-footer-bg-new); /* Cream background */
  color: var(--header-footer-text-new); /* Crimson text */
  padding: 15px 0;
  border-bottom: var(--accent-gold) 3px solid;
  box-shadow: 0 2px 5px rgba(0,0,0,0.1);
  position: sticky; /* Sticky header */
  top: 0;
  z-index: 1000; /* Ensure header is above other content */
  width: 100%;
}

header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

header a {
  color: var(--header-footer-text-new);
  text-decoration: none;
  text-transform: uppercase;
  font-size: 1em;
  font-weight: bold;
  transition: color 0.3s ease;
}

header ul {
  padding: 0;
  margin: 0;
  list-style: none;
}

header li {
  display: inline;
  padding: 0 12px;
}

header #branding {
  display: flex;
  align-items: center;
}

header #branding img {
  height: 150px; /* 2X-3X larger logo - adjust as needed, e.g., 120px, 150px */
  margin-right: 15px;
}

header #branding .logo-text-group {
    display: flex;
    flex-direction: column;
}

header #branding .logo-chapter-name {
  font-size: 1.2em; /* Adjusted for new header bg */
  color: var(--primary-brand-crimson);
  font-weight: bold;
  line-height: 1.2;
}

header .current a, header a:hover {
  color: var(--accent-gold);
}



/* Hero Section - Beta.org style */
.hero {
  height: 75vh; /* Adjusted height */
  min-height: 550px;
  position: relative;
  text-align: center;
  color: var(--accent-diamond-white);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  overflow: hidden; /* Important for clip-path */
  background-color: var(--supporting-charcoal); /* Fallback */
  /* Angled bottom using clip-path, adjust the 50% 100% for the point, and 100% 90% for the sides */
  clip-path: polygon(0 0, 100% 0, 100% 90%, 50% 100%, 0 90%);
}

.hero video {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
  object-fit: cover;
  object-position: center 5%; /* This adjusts the high of the hero video. */
}

.hero::after { /* Shadow box / Dark overlay */
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.1); /* Slightly darker overlay for beta.org feel */
    z-index: 2;
}

.hero-content {
  position: relative;
  z-index: 10;
  padding: 20px;
  max-width: 800px;
}

.hero h1 {
  font-size: 4em; /* Large, bold heading like beta.org */
  margin-bottom: 15px;
  color: var(--accent-diamond-white);
  text-shadow: 2px 2px 8px rgba(0,0,0,0.8);
  font-weight: 700;
  line-height: 1.1;
}

.hero p {
  font-size: 1.5em; /* Subheading */
  margin-bottom: 30px;
  color: var(--accent-diamond-white);
  text-shadow: 1px 1px 5px rgba(0,0,0,0.7);
}

.hero .tagline-hero {
  font-size: 1.7em;
  font-style: italic;
  margin-top: -10px;
  margin-bottom: 35px;
  color: var(--accent-gold);
  text-shadow: 1px 1px 4px rgba(0,0,0,0.6);
}

/* Button Styles */
.button {
  display: inline-block;
  background-color: var(--button-primary-bg);
  color: var(--button-primary-text);
  padding: 15px 30px;
  text-decoration: none;
  border-radius: 5px;
  font-weight: bold;
  font-size: 1.1em;
  text-transform: uppercase;
  letter-spacing: 1px;
  transition: all 0.3s ease;
  border: 2px solid var(--button-primary-bg);
  box-shadow: 0 4px 8px rgba(0,0,0,0.2);
  text-shadow: 1px 1px 2px rgba(0,0,0,0.3);
}

.button:hover {
  background-color: var(--accent-gold);
  color: var(--supporting-charcoal);
  border-color: var(--accent-gold);
  transform: translateY(-2px);
  box-shadow: 0 6px 12px rgba(0,0,0,0.3);
  text-shadow: none;
}

/* Content Sections - Alternating Backgrounds */
main {
    padding-top: 0;
}

.content-section {
    padding: 70px 0;
    border-bottom: 1px solid #dddddd;
}

.content-section:last-child {
    border-bottom: none;
}

/* Default section background (cream, as Polemarch message is first after hero) */
#polemarch-message {
    background-color: var(--supporting-light-cream);
}

/* Alternating background for subsequent sections */
.content-section.alternate-bg-crimson {
    background-color: var(--section-bg-alternate); /* Crimson */
    color: var(--text-on-crimson-section);
}

.content-section.alternate-bg-crimson h2,
.content-section.alternate-bg-crimson h3,
.content-section.alternate-bg-crimson p strong,
.content-section.alternate-bg-crimson .social-media a {
    color: var(--accent-diamond-white); /* White or light cream headings/links on crimson */
}

.content-section.alternate-bg-crimson p {
    color: var(--secondary-brand-cream); /* Cream text on crimson */
}

.content-section.alternate-bg-crimson .button {
    background-color: var(--accent-gold);
    color: var(--supporting-charcoal);
}
.content-section.alternate-bg-crimson .button:hover {
    background-color: #b8860b; /* Darker gold */
    color: var(--accent-diamond-white);
}

.content-section h2 {
    text-align: center;
    font-size: 3em;
    margin-bottom: 50px;
    font-weight: 700;
}

/* Polemarch Message Section */
#polemarch-message .two-column-layout {
    display: flex;
    align-items: center; /* Vertically center align */
    gap: 50px;
}

#polemarch-message .column-left {
    flex: 0 0 320px;
}

#polemarch-message .column-left img {
    width: 100%;
    height: auto;
    border-radius: 10px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.2);
}

#polemarch-message .column-right p {
    font-size: 1.15em;
    margin-bottom: 1.5em;
}

/* Upcoming Events & News Announcements (Card-like style) */
.event-list, .news-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 35px;
}

.event-item, .news-item {
    background: var(--accent-diamond-white); /* White cards on cream or crimson sections */
    color: var(--supporting-charcoal); /* Default text color for cards */
    padding: 30px;
    border-radius: 10px;
    box-shadow: 0 6px 25px rgba(0,0,0,0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex; 
    flex-direction: column; 
}

.section-stock-image {
    width: 100%;
    height: 200px; 
    object-fit: cover; 
    border-radius: 8px 8px 0 0; 
    margin-bottom: 20px; 
}

.content-section.alternate-bg-crimson .event-item,
.content-section.alternate-bg-crimson .news-item {
    background: var(--supporting-light-cream); /* Light cream cards on crimson sections */
}

.event-item:hover, .news-item:hover {
    transform: translateY(-8px);
    box-shadow: 0 10px 30px rgba(0,0,0,0.15);
}

.event-item h3, .news-item h3 {
    font-size: 1.7em;
    color: var(--primary-brand-crimson);
    margin-top: 0;
    margin-bottom: 15px;
}

.event-item p, .news-item p {
    font-size: 1.05em;
    margin-bottom: 12px;
}

.event-item p strong, .news-item p strong {
    color: var(--primary-brand-crimson);
}

/* Enhanced Upcoming Events Section Styles */
.alternate-bg-crimson .event-list-wrapper {
    background-color: var(--accent-diamond-white);
    background-image: linear-gradient(rgba(255, 255, 255, 0.95), rgba(255, 255, 255, 0.95)), 
                      url('data:image/svg+xml;utf8,<svg width="40" height="40" viewBox="0 0 40 40" xmlns="http://www.w3.org/2000/svg"><path d="M0 20 L20 0 L40 20 L20 40 Z" fill="none" stroke="%23990000" stroke-width="1" stroke-opacity="0.1"/></svg>');
    background-size: 40px 40px;
    border-radius: 10px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    padding: 25px;
    position: relative;
}

.event-list-wrapper::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 6px;
    background: linear-gradient(to right, var(--primary-brand-crimson), var(--accent-gold), var(--primary-brand-crimson));
    border-radius: 10px 10px 0 0;
}

.event-list-item {
    margin-bottom: 24px;
    padding-bottom: 24px;
    border-bottom: 1px solid rgba(153, 0, 0, 0.1);
    display: flex;
    flex-wrap: wrap;
    position: relative; /* For absolute positioning of the button */
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    align-items: flex-start; /* Align items at the top */
    padding-right: 120px; /* Ensure space for the button */
}

.event-list-item-content {
    flex: 1;
    display: flex;
    flex-direction: column; /* Stack title, date, and location vertically */
}

.event-list-item:hover {
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(153, 0, 0, 0.1);
    padding-left: 12px;
    margin-left: -12px;
    padding-right: 132px; /* Adjust for hover padding */
    margin-right: -12px;
    border-radius: 5px;
}

.event-list-item::before {
    content: "";
    display: block;
    width: 12px;
    height: 12px;
    background-color: var(--primary-brand-crimson);
    border-radius: 50%;
    position: absolute;
    left: -5px;
    top: 8px;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.event-list-item:hover::before {
    opacity: 1;
}

.event-title {
    font-size: 1.5em;
    color: var(--primary-brand-crimson);
    margin: 0 0 12px 0;
    font-weight: bold;
    position: relative;
    width: 100%;
}

.event-date {
    color: var(--supporting-dark-crimson);
    font-weight: bold;
    background-color: rgba(153, 0, 0, 0.05);
    padding: 5px 10px;
    border-radius: 4px;
    display: block; /* Ensure it takes full width and stacks */
    width: 100%;
    margin-bottom: 12px; /* Increased spacing between date and location */
}

.event-location {
    color: var(--supporting-charcoal);
    font-style: italic;
    border-left: 3px solid var(--accent-gold);
    padding-left: 10px;
    margin-top: 0; /* Remove top margin since it's directly below date */
    display: block; /* Ensure it takes full width and stacks */
    width: 100%;
}

.event-view-details {
    position: absolute;
    top: 10px; /* Position from the top of the event item */
    right: 20px; /* Position from the right */
    color: var(--accent-diamond-white) !important;
    background-color: var(--primary-brand-crimson);
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 0.9em;
    text-decoration: none;
    transition: background-color 0.3s ease, transform 0.2s ease;
    box-shadow: 0 3px 8px rgba(153, 0, 0, 0.2);
    z-index: 5;
}

.event-view-details:hover {
    background-color: var(--supporting-dark-crimson);
    color: var(--accent-diamond-white) !important;
    transform: translateY(-2px);
    box-shadow: 0 5px 12px rgba(153, 0, 0, 0.3);
    text-decoration: none !important;
}

.see-all-events {
    display: block;
    text-align: center;
    margin: 20px auto 10px auto;
    padding: 12px;
    font-weight: bold;
    color: var(--accent-diamond-white) !important;
    text-decoration: none !important;
    transition: all 0.3s ease;
    font-size: 1.1em;
    background-color: var(--primary-brand-crimson);
    border-radius: 5px;
    max-width: 250px;
    box-shadow: 0 3px 10px rgba(153, 0, 0, 0.2);
}

.see-all-events:hover {
    color: var(--accent-gold) !important;
    background-color: var(--supporting-dark-crimson);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(153, 0, 0, 0.3);
}

.no-events-message {
    text-align: center;
    color: var(--supporting-charcoal) !important;
    font-style: italic;
    padding: 40px 0;
    font-size: 1.2em;
    background-color: rgba(153, 0, 0, 0.03);
    border-radius: 5px;
}

@media (max-width: 768px) {
    .event-list-item {
        padding-right: 0; /* Remove padding for button on small screens */
    }
    .event-list-item:hover {
        padding-right: 12px; /* Adjust for hover padding */
    }
    .event-date {
        display: block;
        width: 100%;
        margin-bottom: 12px;
    }
    .event-location {
        display: block;
        width: 100%;
        margin-bottom: 8px;
    }
    .event-list-item::before {
        display: none;
    }
    
    /* Teaser Image Mobile Styles */
    .flyer-teaser-wrapper {
        max-width: 240px;
    }
    
    .flyer-teaser-container {
        margin: 20px 0;
    }
    
    .overlay-text {
        font-size: 1em;
        padding: 8px 16px;
    }
}

@media (max-width: 600px) {
    .event-view-details {
        position: static; /* Remove absolute positioning on small screens */
        margin-top: 10px;
        margin-left: auto;
        margin-right: auto;
        display: block;
        text-align: center;
    }
}

/* News Carousel Adjustments for Crimson Background */
.alternate-bg-crimson .carousel-container {
    background-color: var(--accent-diamond-white);
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.3);
}

.alternate-bg-crimson .carousel-slide h3 {
    color: var(--primary-brand-crimson);
}

.alternate-bg-crimson .carousel-slide .news-date {
    color: var(--supporting-dark-crimson);
}

.alternate-bg-crimson .carousel-slide p {
    color: var(--supporting-charcoal);
}

.alternate-bg-crimson .carousel-btn {
    background-color: var(--accent-diamond-white);
    color: var(--primary-brand-crimson);
}

.alternate-bg-crimson .carousel-btn:hover {
    background-color: var(--accent-gold);
    color: var(--supporting-charcoal);
}

.alternate-bg-crimson .carousel-indicator {
    background-color: var(--secondary-brand-cream);
    border: 2px solid var(--primary-brand-crimson);
}

.alternate-bg-crimson .carousel-indicator.active {
    background-color: var(--primary-brand-crimson);
}

.alternate-bg-crimson .carousel-indicator:not(.active) {
    background-color: transparent;
}

/* Standing Meetings Section Styles */
.meeting-cards-container {
    display: flex;
    justify-content: center;
    gap: 40px;
    flex-wrap: wrap;
    margin-top: 40px;
}

.meeting-card {
    background-color: var(--accent-diamond-white);
    border-radius: 10px;
    box-shadow: 0 6px 18px rgba(0,0,0,0.15);
    width: 100%;
    max-width: 480px;
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.meeting-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 24px rgba(0,0,0,0.2);
}

.meeting-card-header {
    background-color: var(--primary-brand-crimson);
    color: var(--accent-diamond-white);
    padding: 20px;
    position: relative;
    display: flex;
    align-items: center;
}

.meeting-card-header h3 {
    margin: 0;
    font-size: 1.5em;
    margin-left: 15px;
}

.meeting-icon {
    font-size: 1.8em;
    /* Using ::before for icons since we don't have Font Awesome loaded */
}

.meeting-icon.fa-calendar::before {
    content: "📅";
}

.meeting-icon.fa-users::before {
    content: "👥";
}

.meeting-card-content {
    padding: 25px;
}

.meeting-card-content p {
    margin-bottom: 12px;
    color: var(--supporting-charcoal);
    line-height: 1.6;
}

.meeting-card-content a {
    color: var(--primary-brand-crimson);
    text-decoration: none;
    transition: color 0.3s ease;
}

.meeting-card-content a:hover {
    color: var(--accent-gold);
    text-decoration: underline;
}

.directions-link {
    display: inline-block;
    margin-top: 5px;
    padding: 4px 10px;
    border-radius: 15px;
    background-color: var(--primary-brand-crimson);
    color: var(--accent-diamond-white) !important;
    font-size: 0.9em;
    transition: background-color 0.3s ease;
}

.directions-link:hover {
    background-color: var(--supporting-dark-crimson);
    text-decoration: none !important;
}

/* Responsive adjustments */
@media (max-width: 992px) {
    .meeting-cards-container {
        gap: 30px;
    }
    
    .meeting-card {
        max-width: 100%;
    }
}

@media (max-width: 768px) {
    .meeting-card-header {
        padding: 15px;
    }
    
    .meeting-card-header h3 {
        font-size: 1.3em;
    }
    
    .meeting-card-content {
        padding: 20px;
    }
}

/* Footer Styles - Updated */
footer {
    background: var(--header-footer-bg-new); /* Cream background */
    color: var(--header-footer-text-new); /* Crimson text */
    padding: 50px 0 20px 0;
    border-top: var(--accent-gold) 3px solid;
    box-shadow: 0 -2px 5px rgba(0,0,0,0.1);
}

.footer-main-content {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    margin-bottom: 40px;
}

.footer-logo-area {
    flex-basis: 30%;
    margin-right: 30px;
}

.footer-logo-area img {
    width: 180px;
    margin-bottom: 15px;
}

.footer-tagline {
    font-style: italic;
    color: var(--primary-brand-crimson);
    font-size: 1.1em;
    margin-top: 0;
}

.footer-menu-area {
    flex-basis: 65%;
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
}

.footer-column {
    flex-basis: 30%;
    margin-bottom: 20px;
}

.footer-column h4 {
    color: var(--primary-brand-crimson);
    margin-top: 0;
    margin-bottom: 15px;
    font-size: 1.2em;
    position: relative;
    padding-bottom: 10px;
}

.footer-column h4::after {
    content: "";
    position: absolute;
    bottom: 0;
    left: 0;
    width: 40px;
    height: 3px;
    background: var(--accent-gold);
}

.footer-column ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-column li {
    margin-bottom: 10px;
}

.footer-column a {
    color: var(--supporting-charcoal);
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer-column a:hover {
    color: var(--primary-brand-crimson);
    text-decoration: underline;
}

.footer-bottom {
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid rgba(153, 0, 0, 0.2);
}

.footer-bottom p {
    margin: 5px 0;
    font-size: 0.9em;
    color: var(--supporting-charcoal);
}

/* Social Media Links */
.social-media {
    margin-top: 20px;
}

.social-media a {
    display: inline-block;
    margin-right: 15px;
    color: var(--primary-brand-crimson);
    font-size: 1.5em;
    transition: color 0.3s ease;
}

.social-media a:hover {
    color: var(--accent-gold);
}

/* Polemarch Message Modal Styles */
.modal {
    display: none; /* Hidden by default */
    position: fixed; /* Stay in place */
    z-index: 1000; /* Sit on top */
    left: 0;
    top: 0;
    width: 100%; /* Full width */
    height: 100%; /* Full height */
    overflow: auto; /* Enable scroll if needed */
    background-color: rgba(0,0,0,0.6); /* Black w/ opacity */
    padding-top: 60px; /* Location of the box */
}

.modal-content {
    background-color: var(--secondary-brand-cream);
    color: var(--supporting-charcoal);
    margin: 5% auto; /* 5% from the top and centered */
    padding: 25px;
    border: 1px solid var(--supporting-dark-crimson);
    width: 80%; /* Could be more or less, depending on screen size */
    max-width: 700px; /* Maximum width */
    border-radius: 8px;
    position: relative;
    box-shadow: 0 5px 15px rgba(0,0,0,0.3);
}

.modal-header {
    display: flex;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid var(--primary-brand-crimson);
}

.modal-polemarch-image {
    width: 80px; /* Adjust as needed */
    height: 80px;
    border-radius: 50%;
    margin-right: 20px;
    border: 2px solid var(--primary-brand-crimson);
}

.modal-header h2 {
    color: var(--primary-brand-crimson);
    font-size: 1.8em;
    margin: 0;
}

.modal-body {
    max-height: 60vh; /* Limit height and enable scroll */
    overflow-y: auto;
    text-align: left;
    line-height: 1.7;
}

.modal-body p {
    margin-bottom: 15px;
}

.modal-body strong {
    color: var(--primary-brand-crimson);
}

.close-button {
    color: var(--supporting-charcoal);
    float: right;
    font-size: 32px;
    font-weight: bold;
    position: absolute;
    top: 10px;
    right: 20px;
}

.close-button:hover,
.close-button:focus {
    color: var(--primary-brand-crimson);
    text-decoration: none;
    cursor: pointer;
}

/* Timeline specific styles - Updated for cream background */
.timeline-heading {
    text-align: center;
    font-size: 2.5em; /* Increased size */
    margin: 50px 0 40px;
    color: var(--primary-brand-crimson);
    font-weight: 700;
}

.timeline-container {
    display: flex;
    position: relative;
    max-width: 1200px;
    margin: 0 auto;
    padding: 40px 0;
    justify-content: space-between;
}

.timeline-line {
    position: absolute;
    height: 8px; /* Thicker line */
    background-color: var(--primary-brand-crimson);
    opacity: 0.4; /* Slightly more visible */
    top: 90px; /* Adjusted to align with center of diamonds */
    left: 0;
    right: 0;
    z-index: 0;
}

.timeline-item {
    position: relative;
    width: 23%; /* Adjusted for better spacing */
    padding: 15px;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    align-items: center;
    z-index: 1;
    transition: all 0.3s ease;
}

.timeline-diamond {
    width: 30px; /* Larger diamond */
    height: 30px;
    background-color: var(--primary-brand-crimson);
    transform: rotate(45deg);
    border-radius: 4px; /* Slightly rounded corners */
    margin-bottom: 25px;
    transition: all 0.3s ease;
    z-index: 2;
    border: 3px solid var(--secondary-brand-cream); /* Cream border for contrast */
}

.timeline-content {
    padding: 20px;
    background: var(--accent-diamond-white);
    border: 1px solid #dcdcdc;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    text-align: center;
    width: 100%;
}

.timeline-content p {
    color: var(--supporting-charcoal);
    font-size: 1.05em;
    margin-top: 8px;
    margin-bottom: 0;
    line-height: 1.6;
}

.timeline-year {
    display: inline-block;
    padding: 6px 18px;
    background-color: var(--primary-brand-crimson);
    color: white;
    border-radius: 25px;
    font-weight: bold;
    font-size: 1.1em;
    margin-bottom: 12px;
}

.timeline-item:hover .timeline-diamond {
    transform: rotate(45deg) scale(1.4);
    box-shadow: 0 0 20px var(--primary-brand-crimson);
}

.timeline-item:hover .timeline-content {
    box-shadow: 0 6px 18px rgba(139,0,0,0.25);
    transform: translateY(-5px);
}

/* Mobile responsiveness for timeline */
@media screen and (max-width: 992px) { /* Adjust breakpoint for better stacking */
    .timeline-container {
        flex-wrap: wrap; /* Allow wrapping */
        justify-content: center; /* Center items when wrapped */
    }
    .timeline-item {
        width: 45%; /* Two items per row */
        margin-bottom: 40px;
    }
    .timeline-line {
        display: none; /* Hide horizontal line on wrap */
    }
}

@media screen and (max-width: 600px) { /* Single column on very small screens */
    .timeline-item {
        width: 80%;
    }
}

/* Responsive adjustments for header */
@media(max-width: 768px) {
    /* These styles are now handled by the hamburger menu section above */
    /* Keeping this section for any additional mobile adjustments */
    
    .hero h1 {
        font-size: 2.8em;
    }
    .hero p {
        font-size: 1.2em;
    }
    .hero .tagline-hero {
        font-size: 1.4em;
    }
    .content-section h2 {
        font-size: 2.2em;
    }
    #polemarch-message .two-column-layout {
        flex-direction: column;
    }
    #polemarch-message .column-left,
    #polemarch-message .column-right {
        flex: 1 1 100%;
        padding-left: 0;
        padding-right: 0;
        text-align: center;
    }
    #polemarch-message .column-left img {
        margin: 0 auto 20px auto;
        display: block;
    }
    .event-list, .news-list {
        grid-template-columns: 1fr; /* Single column on mobile */
    }
    #connect-with-us .connect-content {
        flex-direction: column;
        gap: 40px;
    }
    .footer-main-content, .footer-menu-area {
        flex-direction: column;
        align-items: center; /* Center items in footer columns */
        text-align: center;
    }
    .footer-logo-area, .footer-column {
        flex-basis: 100%; /* Full width for footer columns */
        margin-right: 0;
        margin-bottom: 30px;
    }
    .footer-column ul {
        text-align: center;
    }
    
}

/* Clean solution with proper HTML structure */
.programs-section .image-feature {
    margin: 0 auto 30px auto;
    max-width: 80%;
    text-align: center;
}

.programs-section .image-feature figure {
    margin: 0 auto;
    padding: 0;
    display: inline-block;
    max-width: 100%;
    position: relative;
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
    border-radius: 8px;
    overflow: hidden;
}

.programs-section .image-feature img {
    display: block;
    width: 100%;
    height: auto;
}

.programs-section .image-feature .overlay {
    display: block;
    width: 100%;
    background-color: rgba(153, 0, 0, 0.8);
    padding: 10px 0;
    text-align: center;
    margin: 0;
}

.programs-section .image-feature .overlay h4 {
    color: var(--accent-diamond-white);
    margin: 0;
    font-size: 1.2em;
}

/* Responsive adjustment */
@media (max-width: 768px) {
    .programs-section .image-feature {
        max-width: 100%;
    }
}

/* Fix for the two-column layout in Get Involved section */
.two-column-container {
    display: flex;
    flex-wrap: wrap;
    gap: 30px;
    margin-bottom: 40px;
}

.two-column-container .column {
    flex: 1;
    min-width: 300px;
    display: flex;
    flex-direction: column;
    gap: 30px; /* Add consistent gap between elements */
}

/* Fix for the Get Involved cards and image features to make them equal height */
.get-involved-card {
    background-color: var(--accent-diamond-white);
    padding: 25px;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    height: 350px; /* Fixed height to match image blocks */
    display: flex;
    flex-direction: column;
}

.get-involved-card h4 {
    color: var(--primary-brand-crimson);
    margin-top: 0;
    margin-bottom: 15px;
    font-size: 1.5em;
}

.get-involved-card ul {
    padding-left: 20px;
    margin: 0;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.get-involved-card li {
    margin-bottom: 10px;
    line-height: 1.5;
}

/* Make image-feature the same fixed height */
.two-column-container .column .image-feature {
    margin: 0;
    max-width: 100%;
    height: 350px; /* Fixed height to match text cards */
}

.two-column-container .column .image-feature figure {
    height: 100%;
    width: 100%;
    margin: 0;
}

.two-column-container .column .image-feature img {
    height: calc(100% - 39px); /* Subtract overlay height */
    object-fit: cover;
    width: 100%;
}

/* Fix for volunteer opportunities section */
.volunteer-opportunities {
    width: 100%;
    max-width: 100%;
    overflow-x: auto;
}

.volunteer-table {
    width: 100%;
    border-collapse: collapse;
    margin: 40px 0;
    box-shadow: 0 10px 30px rgba(0,0,0,0.15);
    border-radius: 10px;
    overflow: hidden;
}

/* Responsive adjustments */
@media (max-width: 992px) {
    .two-column-container {
        flex-direction: column;
    }
    
    .two-column-container .column {
        width: 100%;
    }
    
    /* Maintain equal heights on tablet/mobile */
    .get-involved-card,
    .two-column-container .column .image-feature {
        height: 350px; /* Keep consistent height */
    }
}

@media (max-width: 768px) {
    .volunteer-table {
        display: block;
        overflow-x: auto;
        white-space: nowrap;
    }
    
    /* Adjust heights for smaller screens if needed */
    .get-involved-card,
    .two-column-container .column .image-feature {
        height: 350px; /* Keep consistent height even on mobile */
    }
}


/* ===== HAMBURGER MENU STYLES ===== */

/* Hamburger Menu Button */
.hamburger-menu {
    display: none; /* Hidden by default on desktop */
    flex-direction: column;
    justify-content: space-around;
    width: 30px;
    height: 30px;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0;
    z-index: 1001;
    transition: transform 0.3s ease;
}

.hamburger-menu:hover {
    transform: scale(1.1);
}

.hamburger-line {
    width: 100%;
    height: 3px;
    background-color: var(--primary-brand-crimson);
    border-radius: 2px;
    transition: all 0.3s ease;
    transform-origin: center;
}

/* Hamburger Animation - Active State */
.hamburger-menu.active .hamburger-line:nth-child(1) {
    transform: rotate(45deg) translate(6px, 6px);
}

.hamburger-menu.active .hamburger-line:nth-child(2) {
    opacity: 0;
}

.hamburger-menu.active .hamburger-line:nth-child(3) {
    transform: rotate(-45deg) translate(6px, -6px);
}

/* Mobile Navigation Styles */
@media (max-width: 768px) {
    /* Show hamburger menu on mobile */
    .hamburger-menu {
        display: flex;
    }
    
    /* Header adjustments for mobile */
    header .container {
        flex-direction: row; /* Keep horizontal layout for logo and hamburger */
        justify-content: space-between;
        align-items: center;
    }
    
    header #branding {
        margin-bottom: 0; /* Remove bottom margin */
        text-align: left; /* Keep logo left-aligned */
    }
    
    header #branding img {
        height: 80px; /* Smaller logo on mobile */
        margin-right: 10px;
    }
    
    /* Hide navigation by default on mobile */
    header nav {
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background-color: var(--header-footer-bg-new);
        border-top: 3px solid var(--accent-gold);
        box-shadow: 0 5px 15px rgba(0,0,0,0.1);
        transform: translateY(-100%);
        opacity: 0;
        visibility: hidden;
        transition: all 0.3s ease;
        z-index: 1000;
    }
    
    /* Show navigation when active */
    header nav.active {
        transform: translateY(0);
        opacity: 1;
        visibility: visible;
    }
    
    header nav ul {
        flex-direction: column;
        padding: 20px 0;
        margin: 0;
        text-align: center;
    }
    
    header nav li {
        display: block;
        padding: 15px 0;
        border-bottom: 1px solid rgba(153, 0, 0, 0.1);
        margin: 0 20px;
    }
    
    header nav li:last-child {
        border-bottom: none;
    }
    
    header nav li a {
        font-size: 1.1em;
        padding: 10px 20px;
        display: block;
        transition: all 0.3s ease;
    }
    
    header nav li a:hover {
        background-color: rgba(153, 0, 0, 0.1);
        color: var(--accent-gold);
        border-radius: 5px;
    }
    
    /* Current page indicator */
    header nav li.current a {
        background-color: var(--primary-brand-crimson);
        color: var(--accent-diamond-white);
        border-radius: 5px;
    }
}

/* Tablet adjustments */
@media (max-width: 992px) and (min-width: 769px) {
    header #branding img {
        height: 100px; /* Medium size for tablets */
    }
    
    header nav li {
        padding: 0 8px; /* Reduce padding on tablets */
    }
    
    header nav li a {
        font-size: 0.9em; /* Slightly smaller text */
    }
}

/* Prevent body scroll when mobile menu is open */
body.menu-open {
    overflow: hidden;
}

/* Overlay for mobile menu */
.menu-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 999;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.menu-overlay.active {
    display: block;
    opacity: 1;
}

@media (max-width: 768px) {
    /* Ensure header has proper positioning context */
    header {
        position: relative;
    }
    
    /* Adjust hero section to account for mobile header */
    .hero {
        margin-top: 0; /* Remove any top margin that might interfere */
    }
}


/* ===== MOBILE TEXT FORMATTING FIXES ===== */

/* Fix for text wrapping issues on mobile */
@media (max-width: 768px) {
    /* Force proper container widths */
    .container {
        width: 100% !important;
        max-width: 100% !important;
        padding: 0 15px !important;
        margin: 0 auto !important;
        box-sizing: border-box !important;
    }
    
    /* Fix About page content area */
    .about-content {
        width: 100% !important;
        max-width: 100% !important;
        padding: 30px 15px !important;
        margin: 0 !important;
        box-sizing: border-box !important;
    }
    
    /* Fix navigation timeline container */
    .nav-timeline-container {
        width: 100% !important;
        max-width: 100% !important;
        padding: 0 15px !important;
        margin: 0 auto !important;
        box-sizing: border-box !important;
    }
    
    /* Ensure all text elements use full width */
    .about-content p,
    .about-content h1,
    .about-content h2, 
    .about-content h3,
    .about-content h4,
    .about-content h5,
    .about-content h6,
    .about-content div {
        width: 100% !important;
        max-width: 100% !important;
        word-wrap: break-word !important;
        overflow-wrap: break-word !important;
        hyphens: auto !important;
        box-sizing: border-box !important;
    }
    
    /* Fix any two-column layouts on mobile */
    .about-two-column {
        display: block !important;
        width: 100% !important;
    }
    
    .about-column {
        width: 100% !important;
        max-width: 100% !important;
        margin-bottom: 20px !important;
        box-sizing: border-box !important;
    }
    
    /* Fix About Us page specific two-column layouts */
    .two-column-layout {
        display: block !important;
        flex-direction: column !important;
        gap: 20px !important;
        margin-bottom: 30px !important;
    }
    
    .column-left,
    .column-right {
        flex: none !important;
        width: 100% !important;
        max-width: 100% !important;
        margin-bottom: 20px !important;
        box-sizing: border-box !important;
    }
    
    /* Ensure images in About Us columns are responsive */
    .column-left img,
    .column-right img {
        width: 100% !important;
        height: auto !important;
        max-width: 100% !important;
    }
    
    /* Fix video containers in About Us */
    .column-left video,
    .column-right video {
        width: 100% !important;
        height: auto !important;
        max-width: 100% !important;
    }
    
    /* Fix navigation boxes */
    .nav-timeline-wrapper {
        flex-direction: column !important;
        gap: 15px !important;
        padding: 20px 0 !important;
    }
    
    .nav-box {
        width: 100% !important;
        max-width: 300px !important;
        margin: 0 auto !important;
        box-sizing: border-box !important;
    }
    
    /* Ensure proper text flow */
    p {
        line-height: 1.6 !important;
        margin-bottom: 15px !important;
        text-align: left !important;
    }
    
    /* Fix headings */
    h1, h2, h3, h4, h5, h6 {
        line-height: 1.3 !important;
        margin-bottom: 15px !important;
        text-align: left !important;
    }
}

/* Additional fixes for very small screens */
@media (max-width: 480px) {
    body {
        font-size: 14px !important;
        line-height: 1.5 !important;
    }
    
    .container,
    .about-content,
    .nav-timeline-container {
        padding: 0 10px !important;
    }
    
    h1 { font-size: 1.8em !important; }
    h2 { font-size: 1.5em !important; }
    h3 { font-size: 1.3em !important; }
    h4 { font-size: 1.1em !important; }
}

/* ===== HERO VIDEO POSITIONING - DESKTOP AND MOBILE SPECIFIC ===== */

/* Desktop video - default display */
.hero .hero-video-desktop {
  display: block !important;
}

/* Mobile video - hidden by default */
.hero .hero-video-mobile {
  display: none !important;
}

/* Mobile-specific styles - try multiple media query approaches */
@media only screen and (max-device-width: 768px),
       only screen and (max-width: 768px) {
    
    .hero .hero-video-desktop {
        display: none !important;
        visibility: hidden !important;
    }
    
    .hero .hero-video-mobile {
        display: block !important;
        visibility: visible !important;
    }
    
    .hero {
        height: 60vh !important;
        min-height: 400px !important;
    }
    
    .hero-content {
        position: relative !important;
        z-index: 10 !important;
        padding: 0 15px !important;
    }
}

/* Alternative mobile detection for very small screens */
@media only screen and (max-device-width: 480px),
       only screen and (max-width: 480px) {
    
    .hero .hero-video-desktop {
        display: none !important;
        visibility: hidden !important;
    }
    
    .hero .hero-video-mobile {
        display: block !important;
        visibility: visible !important;
    }
    
    .hero {
        height: 50vh !important;
        min-height: 350px !important;
    }
}

/* Fallback for mobile devices using orientation */
@media only screen and (orientation: portrait) and (max-width: 768px) {
    .hero .hero-video-desktop {
        display: none !important;
    }
    
    .hero .hero-video-mobile {
        display: block !important;
    }
}



/* ===== CONTACT FORM STYLES ===== */
.contact-form-container {
    flex: 1;
    min-width: 300px;
    background-color: var(--accent-diamond-white);
    border-radius: 10px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.1);
    padding: 30px;
}

.contact-form-container h3 {
    color: var(--primary-brand-crimson);
    margin-top: 0;
    margin-bottom: 25px;
    font-size: 1.8em;
    position: relative;
    padding-bottom: 15px;
}

.contact-form-container h3::after {
    content: "";
    position: absolute;
    bottom: 0;
    left: 0;
    width: 60px;
    height: 3px;
    background: var(--accent-gold);
    border-radius: 1.5px;
}

.form-group {
    margin-bottom: 25px;
    position: relative;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: var(--primary-brand-crimson);
    font-size: 1.1em;
}

.form-control {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #ddd;
    border-radius: 8px;
    font-size: 16px;
    font-family: inherit;
    transition: all 0.3s ease;
    background-color: var(--accent-diamond-white);
    box-sizing: border-box;
}

.form-control:focus {
    outline: none;
    border-color: var(--primary-brand-crimson);
    box-shadow: 0 0 0 3px rgba(153, 0, 0, 0.1);
}

.form-control::placeholder {
    color: #999;
    font-style: italic;
}

/* Form validation states */
.form-group.success .form-control {
    border-color: var(--functional-success-green);
    background-color: #f8fff8;
}

.form-group.error .form-control {
    border-color: var(--functional-alert-red);
    background-color: #fff8f8;
}

.error-message {
    color: var(--functional-alert-red);
    font-size: 14px;
    margin-top: 5px;
    min-height: 20px;
    display: block;
}

/* Form message (success/error feedback) */
.form-message {
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 20px;
    font-weight: 500;
    display: none;
}

.form-message.success {
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.form-message.error {
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

/* Submit button */
.submit-button {
    background-color: var(--primary-brand-crimson);
    color: var(--accent-diamond-white);
    padding: 15px 30px;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    width: 100%;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.submit-button:hover {
    background-color: var(--supporting-dark-crimson);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(153, 0, 0, 0.3);
}

.submit-button:active {
    transform: translateY(0);
}

.submit-button:disabled {
    background-color: #ccc;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

/* Textarea specific styles */
textarea.form-control {
    resize: vertical;
    min-height: 120px;
    font-family: inherit;
    line-height: 1.5;
}

/* Responsive form adjustments */
@media (max-width: 768px) {
    .contact-form-container {
        padding: 20px;
    }
    
    .form-control {
        padding: 10px 12px;
        font-size: 16px; /* Prevent zoom on iOS */
    }
    
    .submit-button {
        padding: 12px 25px;
        font-size: 15px;
    }
}

/* Focus styles for accessibility */
.form-control:focus,
.submit-button:focus {
    outline: 2px solid var(--primary-brand-crimson);
    outline-offset: 2px;
}

/* Loading state for submit button */
.submit-button:disabled::after {
    content: "";
    display: inline-block;
    width: 16px;
    height: 16px;
    margin-left: 10px;
    border: 2px solid transparent;
    border-top: 2px solid currentColor;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

