/* --- FONT DEFINITIONS --- */
@font-face {
  font-family: 'Neothic';
  src: url('fonts/Neothic.ttf') format('truetype');
  font-weight: normal;
  font-style: normal;
}

@font-face {
  font-family: 'MasterOfBreak';
  src: url('fonts/Master_of_break.ttf') format('truetype');
  font-weight: normal;
  font-style: normal;
}

/* --- COLOR & STYLE VARIABLES --- */
:root {
    --title-color: rgba(105, 105, 105, 0.25);
    --underline-color: #687eb1;
    --bar-color: rgba(128, 128, 128, 0.5);
    --shadow-color: rgba(0, 0, 0, 0.5);
}

/* --- GENERAL BODY STYLES --- */
body {
    margin: 0;
    font-family: Arial, sans-serif;
    background-color: #ffffff;
    overflow-x: hidden; /* Prevent horizontal scroll */
}

/* --- HEADER & NAVIGATION --- */
.top-header {
    background-color: var(--bar-color);
    box-shadow: 0 0 34.3px var(--shadow-color);
    padding: 0 2rem;
    position: relative;
    z-index: 5;
}

.main-nav {
    display: flex;
    justify-content: flex-end;
    align-items: flex-end; 
    height: 80px;
}

.nav-links {
    list-style: none;
    margin: 0;
    padding: 0;
    position: relative;
    display: flex;
    justify-content: center;
    padding-bottom: 0; 
}

.nav-link {
    display: block;
    padding: 15px 15px 5px 15px;
    text-decoration: none;
    color: #ffffff;
    font-family: Helvetica, Arial, sans-serif;
    font-size: 0.9rem;
    font-weight: bold;
    transition: color 0.3s ease;
}

.underline {
    position: absolute;
    bottom: 0;
    height: 3px;
    background-color: var(--underline-color);
    border-radius: 2px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* NEW: Hamburger menu is hidden on desktop */
.hamburger-menu {
    display: none;
}


/* --- HERO SECTION (HOMEPAGE) --- */
.hero-section {
    position: relative;
    display: flex;
    justify-content: flex-start;
    align-items: flex-start;
    min-height: 70vh;
    padding-bottom: 200; /* Adjusted for slideshow */
    padding-top: 30rem;
    padding-left: 2rem;
    padding-right: 2rem;
    text-align: left;
    overflow: hidden;
    margin-top: -80px;
    margin-bottom: 3rem; /* or more if needed */
    z-index: 2;
}

.hero-background-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: 1;
    opacity: 0.3;
    mask-image: linear-gradient(to bottom, black 60%, transparent 100%);
}

.hero-logo-overlay {
    position: absolute;
    top: 150px; 
    left: 50%;
    transform: translateX(-50%);
    z-index: 2;
    width: 800px;
    height: auto;
    opacity: 1;
}

.hero-logo-overlay .logo-svg * {
    fill: #000000;
}

.top-header-text {
    position: absolute;
    z-index: 1000;
    /* padding-left: 96px;  */
    margin-top: -5rem;
  /*   margin-bottom: 10rem; */
}

.main-heading {
    font-family: 'MasterOfBreak', sans-serif;
    font-size: 6.65rem;
    /* margin: 0; */
    color: #808080;
    opacity: 0.5;
    line-height: 1.3;         /* Increase line-height */
    padding-top: 2rem;        /* Add top padding */
     padding-left: 4rem;        /* Add left padding */
     padding-right: 1.9rem;        /* Add right padding */
}

/* === FIREFOX-ONLY RENDER FIX (Edge Untouched) === */
@supports (-moz-appearance: none) {
    .main-heading {
        /* Anti-overlap: Ultra-subtle spacing (tighter for connected feel) */
        letter-spacing: 0.03em !important;  /* Reduced from 0.08em—balances flow */
        
        /* Anti-dark/bold: Keep light + crisp */
        font-weight: 300 !important;
        -moz-osx-font-smoothing: grayscale !important;
        
        /* Softer shadow + legibility */
        text-shadow: 0 0.5px 1px rgba(0,0,0,0.2) !important;
        text-rendering: optimizeLegibility !important;
        
        /* Fine-tune word spacing for cursive flow */
        word-spacing: -0.03em !important;  /* Pulls words closer if needed */
    }
}




/* --- CONTENT PAGES (About Us, etc.) --- */
.content-page {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    min-height: 70vh;
    padding: 4rem 2rem;
    background-color: #ffffff;
    margin-top: -80px;
    overflow: visible; /* Do not cut off top of title */
}

/* ============================================= */
/* --- CONTENT STYLING (Beliefs Page, etc.) --- */
/* ============================================= */

.page-content {
    max-width: 800px;
    width: 100%;
    margin-top: 7rem;
    color: #333;
    margin-left: auto;
    margin-right: auto;
}

.page-content a {
    color: var(--underline-color);
    text-decoration: none;
    font-weight: bold;
}

.page-content a:hover {
    text-decoration: underline;
}


.calendar-content {
    max-width: 400px;
}

.page-content h2 {
    font-family: 'Helvetica', sans-serif;
    font-size: 2rem;
    text-align: center;
    margin-bottom: 2.5rem;
    font-weight: bold;
}

.page-content h3 {
    font-family: 'Helvetica', sans-serif;
    font-size: 1.5rem;
    color: var(--underline-color);
    margin-top: 2rem;
    margin-bottom: 0.5rem;
    font-weight: bold;
    text-align: left; 
}

.page-content h4 {
    font-family: 'Helvetica', sans-serif;
    font-size: 1.2rem;
    margin-top: 1.5rem;
    margin-bottom: 0.5rem;
    font-weight: bold;
}

.h4-centered {
    text-align: center;
}

.text-block {
    font-family: Georgia, serif;
    line-height: 1.7;
    font-size: 1rem;
    margin-bottom: 1rem;
    text-align: left; 
}

.h4-centered + .text-block {
    text-align: center;
}

.centered-content {
    text-align: center;
    margin-top: 3rem;
}

.centered-content .text-block {
    text-align: center;
}

/* --- FOOTER STYLES --- */
.site-footer {
    background-color: #f5f5f5;
    color: #444;
    padding: 2rem 1rem;
    font-family: Helvetica, Arial, sans-serif;
}

.footer-grid {
    display: flex;
    justify-content: space-around;
    align-items: flex-start;
    flex-wrap: wrap;
    gap: 2rem;
    max-width: 1200px;
    margin: 0 auto;
}

.footer-column {
    flex: 1;
    min-width: 220px;
    text-align: center;
}

.footer-column h4 {
    font-size: 1.1rem;
    margin-bottom: 1rem;
    color: #000;
}

.footer-column p, .footer-column address {
    font-style: normal;
    line-height: 1.6;
    margin: 0 0 1rem 0;
}

.footer-column a {
    color: #444;
    text-decoration: none;
    transition: color 0.2s ease-in-out;
}

.footer-column a:hover {
    color: var(--underline-color);
}

.footer-column .logo-svg {
    width: 180px;
    height: auto;
    fill: #000;
}

.footer-column .iamcs-logo {
    max-width: 200px;
    height: auto;
}

.footer-button {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    background-color: var(--underline-color);
    /* border: 1px solid var(--underline-color); */
    color: #ffffff;
    border-radius: 5px;
    font-weight: bold;
    margin-top: 0.5rem;
    transition: background-color 0.2s ease-in-out;
}

.footer-column a.footer-button {
    color: #ffffff; /* Ensure text is white */
}

.footer-column a.footer-button:hover {
    background-color: white;
    color: #5a6a9a;
    border: 1px solid #5a6a9a;
}

.social-icons {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
    margin-top: 1rem;
}

.social-icons a svg {
    width: 32px;
    height: 32px;
    transition: fill 0.2s ease-in-out;
}

.social-icons a:hover svg {
    fill: var(--underline-color);
}


/* --- ACCORDION STYLES --- */

.accordion-item {
    border: 1px solid #ddd;
    border-radius: 5px;
    margin-bottom: 0;
    background-color: #f0f0f0;
    transition: background-color 0.3s ease-out;
}

.accordion-item.active {
    background-color: #ffffff;
}

.accordion-header {
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 1rem 0 1rem;
}

.page-content h4.accordion-header {
    margin-top: 0;
    margin-bottom: 0;
}

.accordion-toggle {
    display: flex;
    justify-content: center;
    align-items: center;
    background-color: #000;
    color: #fff;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    font-size: 1.3rem;
    font-weight: normal;
    line-height: 24px;
    flex-shrink: 0; 
}

.accordion-panel {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease-out;
    text-align: center;
    padding: 0 1.5rem;
}

.accordion-panel > *:first-child {
    margin-top: 0;
}

.accordion-panel > *:last-child {
    margin-bottom: 1.5rem;
}

/* --- TEAM STYLING --- */
.team-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 2rem;
    padding-bottom: 1rem;
}

.team-member {
    text-align: center;
    width: 200px;
    background-color: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 5px;
    padding: 1rem;
    box-shadow: 0 4px 10px rgba(0,0,0,0.15);
}

.team-member img {
    width: 100%;
    height: auto;
    border-radius: 4px;
}

.team-name {
    margin-top: 1rem;
    margin-bottom: 0.25rem;
    font-size: 1.1rem;
    color: #7483C4;
    font-weight: bold;
}

.team-title {
    margin-top: 0;
    font-style: italic;
    color: #666;
    font-size: 0.9rem;
}

/* Style for the wide leadership card */
.team-member.full-width {
    width: 440px; /* Makes this card twice as wide */
}

/* Creates the side-by-side layout for the titles */
.team-info-split {
    display: flex;
    justify-content: space-around;
    align-items: flex-start;
    margin-top: 1rem;
}

.info-block {
    flex: 1;
}

/* --- MISSIONS PAGE STYLING --- */
.mission-card {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 1.5rem;
    background-color: #fdfdfd;
    margin-bottom: 1.5rem; /* Space between cards */
}

.mission-logo {
    flex: 0 0 150px; /* Logo container is 150px wide */
    text-align: center;
}

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

.mission-details {
    flex: 1; /* Text content takes up remaining space */
}

.mission-details h4 {
    margin-top: 0;
}

/* ============================================= */
/* --- CAROUSEL SLIDESHOW STYLES --- */
/* ============================================= */
.slideshow-section {
    background-color: #f9f9f9;
    padding: 2rem 0;
    position: absolute;
    top: 40rem; /* Adjust this value to position the slideshow */
    left: 0;
    width: 100%;
}

.carousel-container {
    position: relative;
    max-width: 1000px;
    margin: 0 auto;
    aspect-ratio: 16 / 9; /* Creates a stable, rectangular shape */
    padding: 0 40px; /* Adds space on the sides for prev/next slides */
}

.carousel-slides {
    width: 100%;
    height: 100%;
    position: relative;
}

.slide-item {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    transition: transform 0.5s ease, opacity 0.5s ease, visibility 0.5s ease;
    visibility: hidden;
    opacity: 0;
}

.slide-item.active {
    transform: translateX(0) scale(1);
    visibility: visible;
    opacity: 1;
    z-index: 10;
}

.slide-item.prev {
    transform: translateX(-50%) scale(0.7);
    visibility: visible;
    opacity: 0.6;
    z-index: 5;
}

.slide-item.next {
    transform: translateX(50%) scale(0.7);
    visibility: visible;
    opacity: 0.6;
    z-index: 5;
}

.slide-image-wrapper {
    width: 100%;
    height: 100%;
    position: relative;
    overflow: hidden;
    border-radius: 5px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
}

.slide-full-img {
    width: 100%;
    height: 100%;
    object-fit: cover; /* This will now work correctly */
    object-position: center;
}

/* --- Carousel Navigation Styles --- */
.carousel-nav {
    position: absolute;
    bottom: 10px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 20;
    display: flex;
    align-items: center;
    gap: 1rem;
    background-color: rgba(0,0,0,0.3);
    border-radius: 25px;
    padding: 5px 10px;
}

.carousel-arrow {
    background: none;
    color: white;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    width: 40px;
    height: 40px;
    line-height: 40px;
}

.carousel-dots {
    display: flex;
    gap: 8px;
}

.carousel-dot {
    width: 10px;
    height: 10px;
    border: 1px solid white;
    border-radius: 50%;
    background-color: transparent;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.carousel-dot.active {
    background-color: white;
}

/* ============================================= */
/* --- TABLET & PHONE RESPONSIVE STYLES --- */
/* ============================================= */
@media (max-width: 950px) {
    
/*     .content-page {
        margin-top: -10px;
    }  */
        
/*     .hero-section {
        margin-top: -10px;
    }  */


    /* MODIFIED: This is the fix. It allows the text to appear above the header. */
    .hero-section {
        overflow: visible;
          padding-bottom: 2rem;
        margin-bottom: 5rem; /* or more if needed */
    }
        
    /* Do not cut off top of title */
/*     .content-page {
        overflow: visible;
    } */

    /* MODIFIED: Hamburger menu now starts at tablet size */
    .main-nav {
        justify-content: flex-end;
        align-items: center; /* Center the hamburger icon vertically */
        height: 60px;
    }

    .hamburger-menu {
        display: block;
        background: transparent;
        border: none;
        cursor: pointer;
        z-index: 1001;
    }
    
    /* MODIFIED: Styles for the narrow, right-aligned dropdown */
    .nav-links {
        display: none;
        position: absolute;
        top: 60px;
        left: 0;
        right: 0;
        left: auto; /* Unset the left property */
        width: max-content; /* Make width fit the content */
        background-color: rgba(40, 40, 40, 0.95);
        flex-direction: column;
        align-items: flex-start; /* Align text to the left */
        padding: 0.5rem;
        border-radius: 5px;
        box-shadow: 0 4px 10px rgba(0,0,0,0.3);
        z-index: 1001; /* display above the top-header-text */
    }
    
    .nav-links.nav-open {
        display: flex;
    }
    
    .nav-link {
        width: 100%;
        text-align: left; /* Align text to the left */
        padding: 0.75rem 1.5rem;
        font-size: 1rem;
    }

    .underline {
        display: none;
    }
    
    .nav-link.active {
        background-color: rgba(255, 255, 255, 0.1);
    }

    .top-header {
        padding: 0 1rem;
    }

    .hero-logo-overlay {
        width: 80vw;
        max-width: 450px;
   /*      top: 80px; */
    }

    .page-content {
        margin-top: 3rem;
    }

    .main-heading {
        font-size: 4rem;
    }
    
    .footer-grid {
        flex-direction: column;
        align-items: center;
    }
    .footer-column {
        min-width: 100%;
    }

/*     .slideshow-section {
        margin-top: -35rem;
        position: relative;
         top: 0; 
    }  */ 

    .carousel-container {
        height: 30vh;
        min-height: 250px;
        width: 60%;
        padding: 0;
        /* overflow: hidden; */
    }
    
  /*   .carousel-nav {
        left: 50%;
        transform: translateX(-50%);
        width: auto;
        bottom: 8px; 
    } */
    .mission-card {
        flex-direction: column;
        text-align: center;
    }
}


@media (max-width: 480px) {
/*     .hero-section {
        padding-bottom: 2rem;
        margin-bottom: 2rem;
    } */

    .hero-logo-overlay {
        width: 70vw;
        max-width: 280px;
    }

    .main-heading {
        font-size: 3rem; 
    }

    .page-content {
        max-width: 90%;
    }

/*       .slideshow-section {
        margin-top: -22rem;
        position: relative;
         top: 0; 
    }    */

    .slideshow-section {
        /* margin-top: 30rem; */
        /* position: relative; */
         top: 30rem; 
    }    
    .carousel-container {
        height: 30vh;
        min-height: 250px;
        width: 60%;
        padding: 0;
        /* overflow: hidden; */
    }
    
  /*   .carousel-nav {
        left: 50%;
        transform: translateX(-50%);
        width: auto;
        bottom: 8px; 
    } */

    .mission-logo {
        flex-basis: 100px;
    }
}

    /* Tablet Landscape: 768px – 1366px wide, landscape only */
    @media (min-width: 768px) and (max-width: 1366px) and (orientation: landscape) {
    /* Pull hero content up — reduce massive top padding */
    .hero-section {
        padding-top: 30rem !important;     /* Was 30rem — now compact */
        padding-bottom: 1rem;
        min-height: auto;
        /* margin-top: -60px; */
        overflow: visible;
    }

    /* Smaller logo — fits in viewport */
    .hero-logo-overlay {
        width: 55vw !important;
        max-width: 520px !important;
        top: 55px !important;
        transform: translateX(-50%);
    }

    /* Tighter heading */
    .main-heading {
        font-size: 4.2rem !important;
        padding-left: 1.5rem !important;
        padding-right: 1rem !important;
        padding-top: 0.5rem !important;
        line-height: 1.2;
    }

    /* Pull slideshow up into view */
    .slideshow-section {
           top: 18rem; 
    }

    .carousel-container {
        width: 80% !important;
        max-width: 800px;
        height: 30vh !important;
        min-height: 160px;
        margin: 0 auto;
    }

    /* Optional: Slightly smaller header */
    .top-header {
        height: 65px;
    }
    .main-nav {
        height: 65px;
    }
}
