/* ============================================
   Knights of St. John International - Sierra Leone
   Design System: Black, Red, White, Gold
   ============================================ */

:root {
    --color-black: #000000;
    --color-red: #DC143C;
    --color-white: #FFFFFF;
    --color-gold: #D4AF37;
    --color-gold-dark: #B8941E;
    --color-gold-light: #E5C158;
    --color-gray-dark: #1a1a1a;
    --color-gray-light: #f5f5f5;
}

/* ============================================
   Base Styles
   ============================================ */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', 'Cantarell', 'Georgia', 'Times New Roman', serif;
    line-height: 1.8;
    color: var(--color-black);
    background-color: var(--color-white);
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Respect reduced-motion user preferences */
@media (prefers-reduced-motion: reduce) {
    html:focus-within {
        scroll-behavior: auto;
    }
    *, *::before, *::after {
        animation-duration: 0.001ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.001ms !important;
        scroll-behavior: auto !important;
    }
}

/* Scroll progress bar */
.scroll-progress {
    position: fixed;
    top: 0;
    left: 0;
    height: 3px;
    width: 0%;
    background: linear-gradient(90deg, var(--color-gold), var(--color-red));
    z-index: 9999;
    box-shadow: 0 0 12px rgba(212, 175, 55, 0.35);
    transition: width 120ms linear;
}

/* Ensure container and row work even if Bootstrap doesn't load */
.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
}

.row {
    display: flex;
    flex-wrap: wrap;
    margin: 0 -15px;
}

.row > * {
    padding: 0 15px;
}

h1, h2, h3, h4, h5, h6 {
    font-weight: 700;
    line-height: 1.3;
    margin-bottom: 1rem;
    color: var(--color-black);
}

h1 {
    font-size: 2.5rem;
}

h2 {
    font-size: 2rem;
}

h3 {
    font-size: 1.75rem;
}

h4 {
    font-size: 1.5rem;
}

p {
    margin-bottom: 1rem;
}

a {
    color: var(--color-red);
    text-decoration: none;
    transition: color 0.3s ease;
}

a:hover {
    color: var(--color-gold);
}

img {
    max-width: 100%;
    height: auto;
}

/* ============================================
   Header & Navigation
   ============================================ */

.navbar {
    background-color: var(--color-black);
    padding: 0.8rem 0;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(10px);
    transition: all 0.3s ease;
    position: relative;
    z-index: 1030;
}

.navbar .container {
    padding-left: 2rem;
    padding-right: 2rem;
}

.navbar-brand {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    color: var(--color-white) !important;
    text-decoration: none;
    transition: all 0.3s ease;
    padding-left: 0;
    flex-shrink: 0;
    margin-right: 2rem;
}

.navbar-logo {
    width: 50px;
    height: 50px;
    object-fit: cover;
    border-radius: 50%;
    border: 2px solid var(--color-gold);
    padding: 2px;
}

.navbar-brand-text {
    font-size: 1.3rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--color-white);
}

.navbar-brand:hover {
    transform: scale(1.05);
}

.navbar-brand:hover .navbar-brand-text {
    color: var(--color-gold) !important;
}

.navbar-nav {
    display: flex;
    align-items: center;
    flex-wrap: nowrap;
    padding-right: 0;
    margin-left: auto;
    gap: 0.25rem;
}

.navbar-nav .nav-link {
    color: var(--color-white) !important;
    font-weight: 500;
    padding: 0.6rem 1rem !important;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    transition: all 0.3s ease;
    white-space: nowrap;
    font-size: 0.9rem;
}

.navbar-nav .nav-link:hover {
    color: var(--color-gold) !important;
    background-color: rgba(212, 175, 55, 0.1);
}

.dropdown-menu {
    background-color: var(--color-black) !important;
    border: 1px solid var(--color-gold) !important;
    border-radius: 8px;
    padding: 0.5rem 0;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.5);
    margin-top: 0.5rem;
    z-index: 1031;
}

.dropdown-menu-dark .dropdown-item {
    color: var(--color-white) !important;
    padding: 0.75rem 1.5rem;
    transition: all 0.3s ease;
}

.dropdown-menu-dark .dropdown-item:hover {
    background-color: rgba(212, 175, 55, 0.2) !important;
    color: var(--color-gold) !important;
    padding-left: 2rem;
}

.navbar-toggler {
    border-color: var(--color-gold);
}

.navbar-toggler-icon {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='rgba(212, 175, 55, 1)' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e");
}

/* ============================================
   Hero Section
   ============================================ */

/* Modern Hero Section with Carousel */
.hero-section-modern {
    position: relative;
    min-height: 100vh;
    background: var(--color-black);
    overflow: hidden;
}

.hero-slide {
    padding: 5rem 0;
    min-height: 100vh;
    display: flex;
    align-items: center;
    background: linear-gradient(135deg, rgba(0, 0, 0, 0.9), rgba(26, 26, 26, 0.8));
}

.hero-text {
    color: var(--color-white);
    z-index: 2;
}

.hero-title {
    font-size: 3rem;
    font-weight: 800;
    margin-bottom: 1.5rem;
    color: var(--color-white);
    line-height: 1.2;
}

.hero-subtitle {
    font-size: 1.6rem;
    color: var(--color-gold);
    margin-bottom: 0.5rem;
    font-weight: 400;
    letter-spacing: 2px;
}

.hero-location {
    font-size: 1.2rem;
    color: var(--color-gold);
    margin-bottom: 1.5rem;
    font-weight: 300;
}

.hero-description {
    font-size: 1.1rem;
    line-height: 1.8;
    margin-bottom: 2rem;
    color: rgba(255, 255, 255, 0.9);
}

.hero-buttons {
    margin-top: 2rem;
}

.hero-image {
    text-align: center;
    position: relative;
    padding: 1rem;
}

.hero-image .carousel {
    position: relative;
}

.hero-img {
    max-width: 100%;
    height: auto;
    max-height: 700px;
    min-height: 500px;
    object-fit: cover;
    border-radius: 16px;
    box-shadow: 0 10px 40px rgba(212, 175, 55, 0.3);
    border: 3px solid var(--color-gold);
    transition: transform 0.3s ease;
    width: 100%;
}

.hero-image .carousel-control-prev,
.hero-image .carousel-control-next {
    width: 50px;
    height: 50px;
    background-color: rgba(212, 175, 55, 0.5);
    border-radius: 50%;
    top: 50%;
    transform: translateY(-50%);
    opacity: 0.8;
    transition: all 0.3s ease;
    border: 2px solid var(--color-gold);
}

.hero-image .carousel-control-prev:hover,
.hero-image .carousel-control-next:hover {
    opacity: 1;
    background-color: rgba(212, 175, 55, 0.8);
    transform: translateY(-50%) scale(1.1);
}

.hero-image .carousel-control-prev {
    left: 1rem;
}

.hero-image .carousel-control-next {
    right: 1rem;
}

.hero-image .carousel-control-prev-icon,
.hero-image .carousel-control-next-icon {
    filter: brightness(0) invert(1);
}

/* Old Hero Section (for other pages) */
.hero-section {
    position: relative;
    min-height: 100vh;
    background: linear-gradient(135deg, rgba(0, 0, 0, 0.85), rgba(26, 26, 26, 0.75)),
                url('../img/logo.jpeg') center/cover;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: var(--color-white);
    padding: 5rem 2rem;
    z-index: 1;
    overflow: hidden;
}

.hero-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle at 30% 50%, rgba(212, 175, 55, 0.15) 0%, transparent 50%);
    pointer-events: none;
}

.hero-section::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 100px;
    background: linear-gradient(to bottom, transparent, var(--color-white));
    pointer-events: none;
}

.hero-content h1 {
    color: var(--color-white);
    font-size: 3.5rem;
    margin-bottom: 1.5rem;
    text-shadow: 2px 2px 8px rgba(0, 0, 0, 0.8);
    font-weight: 800;
    letter-spacing: 1px;
}

.hero-content {
    position: relative;
    z-index: 2;
}

.hero-content .hero-subtitle {
    font-size: 1.6rem;
    color: var(--color-gold);
    margin-bottom: 2rem;
    font-weight: 400;
    letter-spacing: 3px;
    text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.5);
}

.hero-divider {
    width: 100px;
    height: 3px;
    background-color: var(--color-gold);
    margin: 2rem auto;
}

/* ============================================
   Buttons
   ============================================ */

.btn-primary {
    background-color: var(--color-red);
    border: 2px solid var(--color-gold);
    color: var(--color-white);
    padding: 0.75rem 2rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: all 0.3s ease;
    border-radius: 0;
}

.btn-primary:hover {
    background-color: var(--color-gold);
    border-color: var(--color-gold);
    color: var(--color-black);
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
}

.btn-outline {
    background-color: transparent;
    border: 2px solid var(--color-gold);
    color: var(--color-gold);
    padding: 0.75rem 2rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: all 0.3s ease;
    border-radius: 0;
}

.btn-outline:hover {
    background-color: var(--color-gold);
    color: var(--color-black);
}

.btn-modern {
    background: linear-gradient(135deg, var(--color-red), #c1122f);
    border: none;
    color: var(--color-white);
    padding: 0.875rem 2rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: all 0.3s ease;
    border-radius: 4px;
    box-shadow: 0 4px 15px rgba(220, 20, 60, 0.3);
}

.btn-modern:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(220, 20, 60, 0.4);
    background: linear-gradient(135deg, #c1122f, var(--color-red));
    color: var(--color-white);
}

.btn-outline-modern {
    background-color: transparent;
    border: 2px solid var(--color-gold);
    color: var(--color-gold);
    padding: 0.875rem 2rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: all 0.3s ease;
    border-radius: 4px;
}

.btn-outline-modern:hover {
    background-color: var(--color-gold);
    color: var(--color-black);
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(212, 175, 55, 0.3);
}

/* ============================================
   Section Styles
   ============================================ */

.section {
    padding: 5rem 0;
    display: block;
    visibility: visible;
    opacity: 1;
    position: relative;
    z-index: 1;
}

.section-dark {
    background-color: var(--color-black);
    color: var(--color-white);
    min-height: 200px;
}

.section-dark h2,
.section-dark h3,
.section-dark h4 {
    color: var(--color-white);
}

.section-light {
    background-color: var(--color-white);
    color: var(--color-black);
    min-height: 200px;
}

.section-gray {
    background-color: var(--color-gray-light);
    min-height: 200px;
}

.section-gradient {
    background: linear-gradient(135deg, var(--color-black) 0%, #1a1a1a 50%, var(--color-black) 100%);
    color: var(--color-white);
    min-height: 200px;
    position: relative;
    overflow: hidden;
}

.section-gradient::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle at 50% 50%, rgba(212, 175, 55, 0.1) 0%, transparent 70%);
    pointer-events: none;
}

.section-title {
    text-align: center;
    margin-bottom: 4rem;
    position: relative;
    padding-bottom: 1.5rem;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 100px;
    height: 4px;
    background: linear-gradient(90deg, transparent, var(--color-gold), transparent);
    border-radius: 2px;
}

.section-title h2 {
    text-transform: uppercase;
    letter-spacing: 2px;
    color: var(--color-black);
}

.section-dark .section-title h2 {
    color: var(--color-white);
}

.section-title .subtitle {
    color: var(--color-red);
    font-size: 1rem;
    font-weight: 400;
    margin-top: 0.5rem;
    text-transform: none;
    letter-spacing: 1px;
}

/* ============================================
   Cards
   ============================================ */

.card {
    border: none;
    border-radius: 16px;
    background: linear-gradient(180deg, #ffffff, #fbfbfb);
    /* Stronger shadow so cards clearly separate from white/gray section backgrounds */
    box-shadow: 0 14px 40px rgba(0, 0, 0, 0.12);
    transition: transform 260ms cubic-bezier(.2,.9,.2,1), box-shadow 260ms cubic-bezier(.2,.9,.2,1);
    margin-bottom: 1.75rem;
    height: 100%;
    overflow: hidden;
    position: relative;
}

/* subtle border + shine */
.card::after {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 16px;
    pointer-events: none;
    border: 1px solid rgba(0, 0, 0, 0.06);
}

.card::before {
    content: '';
    position: absolute;
    top: -40%;
    left: -60%;
    width: 120%;
    height: 160%;
    background: radial-gradient(circle, rgba(212, 175, 55, 0.14) 0%, transparent 60%);
    opacity: 0;
    transform: rotate(12deg);
    transition: opacity 300ms ease;
}

.card:hover {
    transform: translateY(-6px);
    box-shadow: 0 26px 70px rgba(0, 0, 0, 0.18);
}

.card:hover::before {
    opacity: 1;
}

.card-header {
    background: linear-gradient(135deg, var(--color-black), #1a1a1a);
    color: var(--color-white);
    padding: 1.4rem 1.6rem;
    text-align: center;
    border-bottom: 4px solid var(--color-gold);
    position: relative;
    overflow: hidden;
}

.card-header::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(212, 175, 55, 0.1) 0%, transparent 70%);
    animation: pulse 4s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 0.3; }
    50% { opacity: 0.6; }
}

.card-header h3 {
    color: var(--color-white);
    margin: 0;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-size: 1.5rem;
}

.card-body {
    padding: 1.75rem;
    background: var(--color-white);
}

.card-gold {
    border-top: 4px solid var(--color-gold);
    position: relative;
}

.card-gold::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--color-gold), var(--color-gold-light));
}

.card-red {
    border-top: 4px solid var(--color-red);
    position: relative;
}

.card-red::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--color-red), #c1122f);
}

/* ============================================
   Leadership Cards
   ============================================ */

.leadership-section {
    background-color: var(--color-black);
    color: var(--color-white);
    padding: 4rem 0;
}

.leadership-tier {
    margin-bottom: 4rem;
}

.leadership-tier-title {
    text-align: center;
    color: var(--color-gold);
    text-transform: uppercase;
    font-size: 2rem;
    margin-bottom: 2rem;
    letter-spacing: 2px;
    font-weight: 700;
}

.leadership-divider {
    width: 100%;
    height: 2px;
    background: linear-gradient(to right, transparent, var(--color-gold), transparent);
    margin: 3rem 0;
}

.leadership-card {
    background-color: var(--color-gray-dark);
    background: linear-gradient(135deg, var(--color-gray-dark), #2a2a2a);
    border: 1px solid rgba(212, 175, 55, 0.55);
    padding: 2.25rem 2rem;
    text-align: center;
    margin-bottom: 2rem;
    transition: transform 260ms cubic-bezier(.2,.9,.2,1), box-shadow 260ms cubic-bezier(.2,.9,.2,1), border-color 260ms ease;
    border-radius: 16px;
    box-shadow: 0 14px 40px rgba(0, 0, 0, 0.45);
}

.leadership-card:hover {
    border-color: var(--color-gold-light);
    box-shadow: 0 26px 70px rgba(212, 175, 55, 0.22), 0 18px 60px rgba(0, 0, 0, 0.45);
    transform: translateY(-6px);
}

/* Modern Leadership Cards for Home Page */
.modern-leadership-card {
    background: linear-gradient(135deg, var(--color-gray-dark), #2a2a2a);
    border: 2px solid var(--color-gold);
    border-radius: 16px;
    padding: 3rem 2rem;
    text-align: center;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    position: relative;
    overflow: hidden;
    height: 100%;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.3);
}

.modern-leadership-card::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(212, 175, 55, 0.1) 0%, transparent 70%);
    transition: all 0.6s ease;
    pointer-events: none;
}

.modern-leadership-card:hover::before {
    top: -30%;
    right: -30%;
}

.modern-leadership-card:hover {
    transform: translateY(-10px) scale(1.02);
    border-color: var(--color-gold-light);
    box-shadow: 0 15px 50px rgba(212, 175, 55, 0.4);
}

.leadership-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 1.5rem;
    background: linear-gradient(135deg, var(--color-gold), var(--color-gold-dark));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    color: var(--color-black);
    box-shadow: 0 4px 15px rgba(212, 175, 55, 0.4);
    transition: all 0.3s ease;
}

.modern-leadership-card:hover .leadership-icon {
    transform: scale(1.1) rotate(5deg);
    box-shadow: 0 6px 25px rgba(212, 175, 55, 0.6);
}

/* Leadership Portrait for Home Page */
.leadership-portrait-link {
    display: block;
    text-decoration: none;
    margin: 0 auto 1.5rem;
    width: fit-content;
    cursor: pointer;
}

.leadership-portrait-home {
    width: 220px;
    height: 220px;
    border-radius: 50%;
    border: 5px solid var(--color-gold);
    overflow: hidden;
    background-color: var(--color-gray-dark);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 6px 20px rgba(212, 175, 55, 0.4);
    transition: all 0.3s ease;
    position: relative;
}

.leadership-portrait-home::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.2);
    opacity: 0;
    transition: opacity 0.3s ease;
    border-radius: 50%;
}

.leadership-portrait-link:hover .leadership-portrait-home::after {
    opacity: 1;
}

.leadership-portrait-home img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.leadership-portrait-link:hover .leadership-portrait-home {
    transform: scale(1.08);
    box-shadow: 0 10px 40px rgba(212, 175, 55, 0.6);
    border-color: var(--color-gold-light);
}

.leadership-portrait-link:hover .leadership-portrait-home img {
    transform: scale(1.1);
}

.leadership-info {
    margin: 1.5rem 0;
}

.leadership-label {
    color: var(--color-gold);
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    margin-bottom: 0.5rem;
    font-weight: 500;
}

.leadership-name-large {
    color: var(--color-white);
    font-size: 1.5rem;
    font-weight: 700;
    margin: 0;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* News & Activities Cards */
.news-card {
    background: var(--color-white);
    border-radius: 16px;
    padding: 2.5rem 2rem;
    text-align: center;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    height: 100%;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    border: 1px solid rgba(0, 0, 0, 0.05);
    position: relative;
    overflow: hidden;
}

.news-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--color-red), var(--color-gold));
    transform: scaleX(0);
    transition: transform 0.4s ease;
}

.news-card:hover::before {
    transform: scaleX(1);
}

.news-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.15);
}

.news-icon {
    width: 70px;
    height: 70px;
    margin: 0 auto 1.5rem;
    background: linear-gradient(135deg, var(--color-red), #c1122f);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
    color: var(--color-white);
    box-shadow: 0 4px 15px rgba(220, 20, 60, 0.3);
    transition: all 0.3s ease;
}

.news-card:hover .news-icon {
    transform: scale(1.15) rotate(-5deg);
    box-shadow: 0 6px 25px rgba(220, 20, 60, 0.5);
}

.news-card h4 {
    color: var(--color-black);
    font-size: 1.4rem;
    margin-bottom: 1rem;
    font-weight: 700;
}

.news-card p {
    color: #666;
    line-height: 1.8;
    margin-bottom: 1.5rem;
    font-size: 1rem;
}

.news-link {
    color: var(--color-red);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-size: 0.9rem;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.news-link:hover {
    color: var(--color-gold);
    gap: 0.8rem;
}

.news-link i {
    transition: transform 0.3s ease;
}

.news-link:hover i {
    transform: translateX(5px);
}

/* Event Cards */
.event-card {
    background: var(--color-white);
    border-radius: 16px;
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    height: 100%;
    box-shadow: 0 14px 40px rgba(0, 0, 0, 0.12);
    border: 1px solid rgba(0, 0, 0, 0.05);
    display: flex;
    flex-direction: column;
}

.event-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 26px 70px rgba(0, 0, 0, 0.18);
}

.event-image {
    width: 100%;
    height: 200px;
    overflow: hidden;
    position: relative;
}

.event-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}

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

.event-content {
    padding: 2rem;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.event-date {
    color: var(--color-red);
    font-weight: 600;
    font-size: 0.9rem;
    margin-bottom: 1rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.event-date i {
    margin-right: 0.5rem;
}

.event-content h4 {
    color: var(--color-black);
    font-size: 1.5rem;
    margin-bottom: 1rem;
    font-weight: 700;
}

.event-content p {
    color: #666;
    line-height: 1.8;
    margin-bottom: 1.5rem;
    font-size: 1rem;
    flex-grow: 1;
}

.btn-read-more {
    background: transparent;
    border: 2px solid var(--color-red);
    color: var(--color-red);
    padding: 0.75rem 1.5rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: all 0.3s ease;
    border-radius: 4px;
    font-size: 0.9rem;
    display: inline-flex;
    align-items: center;
    width: fit-content;
}

.btn-read-more:hover {
    background: var(--color-red);
    color: var(--color-white);
    transform: translateX(5px);
    box-shadow: 0 4px 15px rgba(220, 20, 60, 0.3);
}

/* Event Detail Page */
.event-detail-content {
    background: var(--color-white);
    padding: 2rem;
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.event-detail-image {
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

.event-detail-image img {
    width: 100%;
    height: auto;
    display: block;
}

.event-meta {
    background: var(--color-gray-light);
    padding: 1.5rem;
    border-radius: 8px;
    border-left: 4px solid var(--color-gold);
}

.event-meta-item {
    margin-bottom: 1rem;
    font-size: 1rem;
    line-height: 1.6;
}

.event-meta-item i {
    margin-right: 0.5rem;
    font-size: 1.1rem;
}

.event-description h3 {
    color: var(--color-black);
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid var(--color-gold);
}

.event-description h4 {
    color: var(--color-red);
    margin-top: 2rem;
    margin-bottom: 1rem;
    font-size: 1.3rem;
}

.event-list {
    list-style: none;
    padding-left: 0;
}

.event-list li {
    padding: 0.75rem 0;
    padding-left: 2rem;
    position: relative;
    font-size: 1.05rem;
    line-height: 1.8;
    color: #555;
}

.event-list li::before {
    content: '\f00c';
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    position: absolute;
    left: 0;
    color: var(--color-gold);
    font-size: 1rem;
}

.event-sidebar .card {
    margin-bottom: 1.5rem;
}

.event-sidebar .card-header h4 {
    margin: 0;
    font-size: 1.2rem;
}

/* Activities Cards */
.activity-card {
    background: var(--color-white);
    border-radius: 16px;
    padding: 2.5rem 2rem;
    text-align: center;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    height: 100%;
    box-shadow: 0 14px 40px rgba(0, 0, 0, 0.12);
    border: 1px solid rgba(0, 0, 0, 0.14);
    position: relative;
    overflow: hidden;
}

.activity-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--color-red), var(--color-gold));
    transform: scaleX(0);
    transition: transform 0.4s ease;
}

.activity-card:hover::before {
    transform: scaleX(1);
}

.activity-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 26px 70px rgba(0, 0, 0, 0.18);
    border-color: rgba(212, 175, 55, 0.55);
}

.activity-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 1.5rem;
    background: linear-gradient(135deg, var(--color-red), #c1122f);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    color: var(--color-white);
    box-shadow: 0 4px 15px rgba(220, 20, 60, 0.3);
    transition: all 0.3s ease;
}

.activity-card:hover .activity-icon {
    transform: scale(1.15) rotate(-5deg);
    box-shadow: 0 6px 25px rgba(220, 20, 60, 0.5);
}

.activity-card h4 {
    color: var(--color-black);
    font-size: 1.5rem;
    margin-bottom: 1rem;
    font-weight: 700;
}

.activity-card p {
    color: #666;
    line-height: 1.8;
    margin-bottom: 2rem;
    font-size: 1rem;
}

.btn-view-more {
    background: transparent;
    border: 2px solid var(--color-red);
    color: var(--color-red);
    padding: 0.75rem 1.5rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: all 0.3s ease;
    border-radius: 4px;
    font-size: 0.9rem;
}

.btn-view-more:hover {
    background: var(--color-red);
    color: var(--color-white);
    transform: translateX(5px);
    box-shadow: 0 4px 15px rgba(220, 20, 60, 0.3);
}

/* About Page Split Layout */
.about-image-wrapper {
    position: relative;
    padding: 1rem;
    background: linear-gradient(135deg, var(--color-gold), var(--color-gold-light));
    border-radius: 16px;
    box-shadow: 0 10px 40px rgba(212, 175, 55, 0.3);
}

.about-image {
    border-radius: 12px;
    width: 100%;
    height: auto;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.2);
}

.leadership-portrait {
    width: 150px;
    height: 150px;
    border-radius: 50%;
    border: 4px solid var(--color-gold);
    margin: 0 auto 1.5rem;
    overflow: hidden;
    background-color: var(--color-gray-dark);
    display: flex;
    align-items: center;
    justify-content: center;
}

.leadership-portrait img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.leadership-name {
    color: var(--color-white);
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    text-transform: uppercase;
}

.leadership-title {
    color: var(--color-gold);
    font-size: 1rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-weight: 500;
}

/* ============================================
   Timeline
   ============================================ */

.timeline {
    position: relative;
    padding: 4rem 0;
    max-width: 1200px;
    margin: 0 auto;
}

.timeline-line {
    position: absolute;
    left: 50%;
    top: 0;
    bottom: 0;
    width: 4px;
    background-color: var(--color-gold);
    transform: translateX(-50%);
}

.timeline-item {
    position: relative;
    margin-bottom: 4rem;
    display: flex;
    align-items: center;
}

.timeline-item:nth-child(odd) {
    flex-direction: row;
}

.timeline-item:nth-child(even) {
    flex-direction: row-reverse;
}

.timeline-marker {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    width: 30px;
    height: 30px;
    background-color: var(--color-red);
    border: 4px solid var(--color-gold);
    border-radius: 50%;
    z-index: 2;
}

.timeline-content {
    width: 45%;
    background-color: var(--color-white);
    padding: 2rem;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    border-left: 4px solid var(--color-red);
}

.timeline-item:nth-child(even) .timeline-content {
    border-left: none;
    border-right: 4px solid var(--color-red);
}

.timeline-date {
    color: var(--color-red);
    font-weight: 700;
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
}

.timeline-event {
    color: var(--color-black);
    font-size: 1.1rem;
    line-height: 1.6;
}

/* ============================================
   Gallery
   ============================================ */

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 1.5rem;
    padding: 2rem 0;
}

.gallery-item {
    position: relative;
    overflow: hidden;
    aspect-ratio: 1;
    cursor: pointer;
    border: 2px solid var(--color-gold);
    transition: transform 0.3s ease;
}

.gallery-item:hover {
    transform: scale(1.05);
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: opacity 0.3s ease;
}

.gallery-item:hover img {
    opacity: 0.8;
}

/* ============================================
   Footer
   ============================================ */

.footer {
    background-color: var(--color-black);
    color: var(--color-white);
    padding: 3rem 0 1rem;
    border-top: 3px solid var(--color-gold);
}

.footer-content {
    text-align: center;
    margin-bottom: 2rem;
}

.footer-logo {
    width: 100px;
    height: 100px;
    margin: 0 auto 1rem;
    border: 3px solid var(--color-gold);
    border-radius: 50%;
    padding: 10px;
    background-color: var(--color-white);
}

.footer-logo img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.footer-title {
    color: var(--color-gold);
    font-size: 1.5rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    margin-bottom: 1rem;
    font-weight: 700;
}

.footer-divider {
    width: 200px;
    height: 2px;
    background: linear-gradient(to right, transparent, var(--color-gold), transparent);
    margin: 1.5rem auto;
}

.footer-contact {
    margin: 1rem 0;
}

.footer-contact a {
    color: var(--color-white);
    text-decoration: none;
    margin: 0 1rem;
    transition: color 0.3s ease;
}

.footer-contact a:hover {
    color: var(--color-gold);
}

.footer-bottom {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid rgba(212, 175, 55, 0.3);
    color: var(--color-gold);
    font-size: 0.9rem;
}

.footer-seal {
    margin-top: 2rem;
    text-align: center;
}

.footer-seal-text {
    font-size: 0.85rem;
    color: var(--color-gold);
    font-style: italic;
    letter-spacing: 1px;
}

/* ============================================
   Commanderies Registry
   ============================================ */

.commandery-card {
    background-color: var(--color-white);
    border: 2px solid var(--color-gold);
    padding: 2rem;
    margin-bottom: 2rem;
    transition: all 0.3s ease;
}

.commandery-card:hover {
    border-color: var(--color-red);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.commandery-number {
    color: var(--color-red);
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.commandery-name {
    color: var(--color-black);
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 1rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.commandery-location {
    color: var(--color-black);
    font-size: 1rem;
}

/* ============================================
   Contact Form
   ============================================ */

.contact-form {
    max-width: 800px;
    margin: 0 auto;
    padding: 2rem;
    background-color: var(--color-white);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.form-control {
    border: 2px solid var(--color-gray-dark);
    border-radius: 0;
    padding: 0.75rem;
    font-size: 1rem;
    transition: border-color 0.3s ease;
}

.form-control:focus {
    border-color: var(--color-gold);
    box-shadow: 0 0 0 0.2rem rgba(212, 175, 55, 0.25);
    outline: none;
}

.contact-info {
    background-color: var(--color-black);
    color: var(--color-white);
    padding: 2rem;
    margin-top: 2rem;
}

.contact-info h3 {
    color: var(--color-gold);
    margin-bottom: 1.5rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.contact-info p {
    margin-bottom: 0.5rem;
}

.contact-info a {
    color: var(--color-white);
}

.contact-info a:hover {
    color: var(--color-gold);
}

/* ============================================
   Utilities
   ============================================ */

.text-gold {
    color: var(--color-gold);
}

.text-red {
    color: var(--color-red);
}

.bg-black {
    background-color: var(--color-black);
}

.bg-gold {
    background-color: var(--color-gold);
}

.border-gold {
    border-color: var(--color-gold);
}

/* Content visible by default - ensures content shows even without JavaScript */
.fade-in {
    opacity: 1;
    transform: translateY(0);
    visibility: visible;
}

/* When JavaScript is enabled and ready, hide elements initially for animation */
body.js-ready .fade-in:not(.visible) {
    opacity: 0;
    transform: translateY(20px);
    filter: blur(2px);
    transition: opacity 0.7s cubic-bezier(.2,.9,.2,1), transform 0.7s cubic-bezier(.2,.9,.2,1), filter 0.7s cubic-bezier(.2,.9,.2,1);
}

/* When element becomes visible, animate it in */
body.js-ready .fade-in.visible {
    opacity: 1;
    transform: translateY(0);
    filter: blur(0);
    transition: opacity 0.7s cubic-bezier(.2,.9,.2,1), transform 0.7s cubic-bezier(.2,.9,.2,1), filter 0.7s cubic-bezier(.2,.9,.2,1);
}

/* Note: hover effects are defined per-component (cards/events/activities/leadership). */

/* ============================================
   Responsive Design
   ============================================ */

/* Large screens (1200px and up) */
@media (min-width: 1200px) {
    /* Avoid overly large negative margins that can clip on ultra-wide screens */
    .navbar-brand { margin-left: 0; }
    .navbar-nav { margin-right: 0; }
    .navbar .container { padding-left: 2rem; padding-right: 2rem; }
}

/* Medium screens (992px to 1199px) */
@media (min-width: 992px) and (max-width: 1199px) {
    .navbar-brand { margin-left: 0; margin-right: 1.5rem; }
    .navbar-brand-text { font-size: 1.1rem; }
    .navbar-nav { margin-right: 0; }
    .navbar-nav .nav-link { padding: 0.5rem 0.75rem !important; font-size: 0.85rem; }
    .hero-title { font-size: 2.6rem; }
    .hero-subtitle { font-size: 1.35rem; }
    .hero-img { max-height: 520px; min-height: 360px; }
    .gallery-grid { grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); }
    .event-card .card-body,
    .activity-card,
    .modern-leadership-card { padding: 2rem 1.75rem; }
}

/* Tablet screens (768px to 991px) */
@media (min-width: 768px) and (max-width: 991px) {
    .navbar-brand { margin-left: 0; }
    .navbar-nav { margin-right: 0; }
    .navbar .container { padding-left: 1.25rem; padding-right: 1.25rem; }
    
    .hero-title {
        font-size: 2.3rem;
    }
    
    .hero-subtitle {
        font-size: 1.2rem;
    }
    
    .hero-img {
        max-height: 420px;
        min-height: 300px;
    }

    .section { padding: 3rem 0; }
    .card-body { padding: 1.75rem; }
    .gallery-grid { grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 1.2rem; }
    .event-card,
    .activity-card,
    .modern-leadership-card { padding: 1.75rem 1.5rem; }
    .event-image { height: 190px; }
    .timeline-item { padding-left: 60px; }
}

/* Mobile and small screens (up to 767px) */
@media (max-width: 767px) {
    .container {
        padding-left: 1rem;
        padding-right: 1rem;
    }
    
    .navbar .container {
        padding-left: 1rem;
        padding-right: 1rem;
    }
    
    .navbar-brand {
        margin-left: 0;
    }
    
    .navbar-nav {
        margin-right: 0;
    }
    
    .hero-section-modern {
        min-height: auto;
    }
    
    .hero-slide {
        padding: 3rem 0;
        min-height: auto;
    }
    
    .hero-content h1 {
        font-size: 2.5rem;
    }

    .hero-content .hero-subtitle {
        font-size: 1.3rem;
        letter-spacing: 2px;
    }
    
    .hero-title {
        font-size: 2rem;
    }
    
    .hero-subtitle {
        font-size: 1.2rem;
    }
    
    .hero-location {
        font-size: 1rem;
    }
    
    .hero-description {
        font-size: 1rem;
    }
    
    .hero-img {
        max-height: 400px;
        min-height: 300px;
    }
    
    .hero-text {
        margin-bottom: 2rem;
        text-align: center;
    }
    
    .hero-buttons {
        flex-direction: column;
        gap: 1rem;
        display: flex;
    }
    
    .hero-buttons .btn {
        width: 100%;
        margin: 0 !important;
    }
    
    .modern-leadership-card,
    .news-card,
    .activity-card,
    .event-card {
        margin-bottom: 2rem;
    }
    
    .leadership-portrait-home {
        width: 180px;
        height: 180px;
    }
    
    .leadership-portrait-link {
        margin-bottom: 1rem;
    }
    
    .event-image {
        height: 180px;
    }
    
    .event-content {
        padding: 1.5rem;
    }
    
    .section {
        padding: 3rem 0;
    }
    
    .navbar-brand-text {
        font-size: 1rem;
    }
    
    .navbar-logo {
        width: 40px;
        height: 40px;
    }
    
    .navbar-nav .nav-link {
        font-size: 0.85rem;
        padding: 0.5rem 0.75rem !important;
    }
    
    .carousel-control-prev,
    .carousel-control-next {
        width: 40px;
        height: 40px;
    }
    
    .hero-image .carousel-control-prev {
        left: 0.5rem;
    }
    
    .hero-image .carousel-control-next {
        right: 0.5rem;
    }
    
    .about-image-wrapper {
        margin-top: 2rem;
    }
    
    .card-body {
        padding: 1.5rem;
    }
    
    .modern-leadership-card,
    .activity-card {
        padding: 2rem 1.5rem;
    }
    
    .leadership-icon,
    .activity-icon {
        width: 60px;
        height: 60px;
        font-size: 1.5rem;
    }
    
    .leadership-portrait-home {
        width: 150px;
        height: 150px;
    }
    
    .leadership-portrait-link {
        margin-bottom: 1rem;
    }
    
    .event-image {
        height: 150px;
    }
    
    .event-content {
        padding: 1.25rem;
    }
    
    .event-content h4 {
        font-size: 1.25rem;
    }
    
    .event-detail-content {
        padding: 1.5rem;
    }
    
    .event-meta {
        padding: 1rem;
    }
    
    .event-meta-item {
        font-size: 0.9rem;
        margin-bottom: 0.75rem;
    }
    
    .section-title {
        margin-bottom: 2rem;
    }
    
    .section-title h2 {
        font-size: 1.75rem;
    }
    
    h1 {
        font-size: 2rem;
    }

    h2 {
        font-size: 1.75rem;
    }
    
    h3 {
        font-size: 1.5rem;
    }
    
    .card-header h3 {
        font-size: 1.25rem;
    }
    
    .leadership-name-large {
        font-size: 1.25rem;
    }
    
    .commandery-card {
        padding: 1.5rem;
    }
    
    .contact-form {
        padding: 1.5rem;
    }
    
    .footer {
        padding: 2rem 0 1rem;
    }
    
    .footer-logo {
        width: 80px;
        height: 80px;
    }

    h1 {
        font-size: 2rem;
    }

    h2 {
        font-size: 1.75rem;
    }

    .section {
        padding: 2rem 0;
    }

    .timeline-line {
        left: 20px;
    }

    .timeline-item {
        flex-direction: row !important;
        padding-left: 50px;
    }

    .timeline-marker {
        left: 20px;
    }

    .timeline-content {
        width: 100%;
        border-left: 4px solid var(--color-red);
        border-right: none;
    }

    .leadership-portrait {
        width: 120px;
        height: 120px;
    }

    .gallery-grid {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
        gap: 1rem;
    }

    /* Tighten hero and cards for small tablets/large phones */
    .hero-section,
    .hero-section-modern { padding-top: 1.5rem; }
    .hero-content { text-align: center; }
    .card { margin-bottom: 1.5rem; }
    .gallery-item img { object-fit: cover; width: 100%; height: 180px; }
}

/* Extra small screens (up to 575px) */
@media (max-width: 575px) {
    .hero-section-modern {
        min-height: auto;
    }
    
    .hero-slide {
        padding: 2rem 0;
        min-height: auto;
    }
    
    .hero-content h1 {
        font-size: 1.75rem;
    }
    
    .hero-title {
        font-size: 1.75rem;
    }
    
    .hero-subtitle {
        font-size: 1rem;
    }
    
    .hero-location {
        font-size: 0.9rem;
    }
    
    .hero-description {
        font-size: 0.95rem;
    }
    
    .hero-img {
        max-height: 300px;
        min-height: 250px;
    }

    .section-title h2 {
        font-size: 1.5rem;
    }

    .leadership-tier-title {
        font-size: 1.5rem;
    }
    
    .navbar-brand-text {
        font-size: 0.9rem;
    }
    
    .navbar-logo {
        width: 35px;
        height: 35px;
    }
    
    .navbar-nav .nav-link {
        font-size: 0.8rem;
        padding: 0.4rem 0.5rem !important;
    }
    
    .section {
        padding: 2rem 0;
    }
    
    .card-body {
        padding: 1.25rem;
    }
    
    .modern-leadership-card,
    .activity-card {
        padding: 1.5rem 1rem;
    }
    
    .leadership-icon,
    .activity-icon {
        width: 50px;
        height: 50px;
        font-size: 1.2rem;
    }
    
    .leadership-portrait-home {
        width: 120px;
        height: 120px;
    }
    
    .leadership-portrait-link {
        margin-bottom: 0.75rem;
    }
    
    .event-image {
        height: 120px;
    }
    
    .event-content {
        padding: 1rem;
    }
    
    .event-content h4 {
        font-size: 1.1rem;
    }
    
    .event-content p {
        font-size: 0.9rem;
    }
    
    .event-detail-content {
        padding: 1rem;
    }
    
    .event-meta {
        padding: 0.75rem;
    }
    
    .event-meta-item {
        font-size: 0.85rem;
        margin-bottom: 0.5rem;
    }
    
    .event-list li {
        font-size: 0.95rem;
        padding: 0.5rem 0;
        padding-left: 1.5rem;
    }
    
    .btn-primary,
    .btn-modern,
    .btn-outline-modern,
    .btn-view-more {
        padding: 0.6rem 1.5rem;
        font-size: 0.85rem;
    }
    
    .hero-buttons .btn {
        padding: 0.75rem 1.5rem;
    }
}

