/*
Theme Name: CFIS
Theme URI: cfis.bard.edu
Author: Aarati Akkapeddi
Author URI: https://aarati.online
Description: A custom WordPress theme with Block Editor, ACF, and Custom Post Types support
Version: 1.0.0
Requires at least: 6.0
Tested up to: 6.7
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: cfis
*/

/* ==========================================================================
   TABLE OF CONTENTS
   ==========================================================================
   1. CSS Variables
   2. Base Styles
   3. Typography
   4. Layout Containers
   5. Header & Logo
   6. Navigation
   7. Main Content
   8. Footer
   9. Buttons
   10. WordPress Block Editor
   11. Gutenberg Blocks (Images, Paragraphs, Buttons, Sections, Cards)
   12. Courses
   13. Events & Carousels
   14. Homepage
   15. Animations
   16. Responsive Media Queries
   ========================================================================== */

/* ==========================================================================
   1. CSS VARIABLES 
   ========================================================================== */

:root {
    /* Colors */
    --color-about: #144092;
    --color-academics: #7C0310;
    --color-events: #3B6C42;
    --color-resources: #000000;
    --color-scholarships: #802168;
    --color-white: #FFFFFF;
    
    /* Horizontal Spacing */
    --hori-spacing-s: 0.5vw;
    --hori-spacing-m: 3vw;
    --hori-spacing-l: 5vw;
    
    /* Vertical Spacing */
    --vert-spacing-s: 10px;
    --vert-spacing-m: 25px;
    --vert-spacing-l: 75px;
    
    /* Typography */
    --font-family: 'Roboto Condensed', sans-serif;
    --font-weight-light: 300;
    --font-weight-regular: 400;
    --font-weight-medium: 500;
    --font-weight-semibold: 600;
    --font-weight-bold: 700;
    --font-size-sm: 0.875rem;
    --font-size-md: clamp(16px, 1.2vw, 24px);
    --font-size-lg: clamp(16px, 1.8vw, 100px);
    --font-size-xl: 1.75rem;
    --font-size-xxl: clamp(16px, 3vw, 200px);
}

/* ==========================================================================
   2. BASE STYLES
   ========================================================================== */

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    padding: 0;
    font-family: var(--font-family);
    font-size: var(--font-size-lg);
    font-weight: var(--font-weight-medium);
    line-height: 1.6;
    background-color: var(--color-white);
    color: var(--color-base);
    --color-base: var(--color-about); /* Default color */
}

/* Body Color Variations */
body.academics,
body.course-template-default,
body.affiliated-faculty-and-staff,
body.course-listings,
body.library-acquisitions,
body.symposia-and-archived-academic-events {
    --color-base: var(--color-academics);
}

body.archive,
body.events,
body.event-template-default,
body.annual-symposium,
body.lectures,
body.performances-and-commissions,
body.workshops-screenings {
    --color-base: var(--color-events);
}

body.resources,
body.archives-and-rethinking-place {
    --color-base: var(--color-resources);
}

body.scholarships,
body.undergraduate-scholarships,
body.graduate-scholarships {
    --color-base: var(--color-scholarships);
}


/* ==========================================================================
   3. TYPOGRAPHY
   ========================================================================== */

h1, h2, h3, h4, h5, h6 {
    font-weight: var(--font-weight-semibold);
    line-height: 1.2;
    margin-top: 0;
}

h1 {
    display: inline-block;
    font-size: var(--font-size-xxl);
    margin: var(--vert-spacing-m) 0;
}

h2 {
    font-size: var(--font-size-xl);
}

h3 {
    font-size: var(--font-size-lg);
}

h4 {
    font-size: var(--font-size-md);
}

h5, h6 {
    font-size: var(--font-size-sm);
    font-weight: var(--font-weight-bold);
    text-transform: uppercase;
    letter-spacing: 1.4px;
}

a {
    color: currentColor;
    text-decoration: underline;
}

a:hover {
    text-decoration: none;
}
.post-thumbnail-caption{
    font-size: var(--font-size-md);
}
/* ==========================================================================
   4. LAYOUT CONTAINERS
   ========================================================================== */

.site-container {
    margin: 0 auto;
    padding: 0 var(--hori-spacing-m);
}

.content-container {
    max-width: var(--content-width);
    margin: 0 auto;
}

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

.back-to {
    text-align: center;
    margin: var(--vert-spacing-l) auto;
}

/* ==========================================================================
   5. HEADER & LOGO
   ========================================================================== */

.site-header {
    background-color: var(--color-white);
    border-right: 2px solid var(--color-base);
    color: var(--color-base);
    position: fixed;
    width: 18vw;
    top: 0;
    left:0;
    z-index: 1000;
    transition: 1s;
    height: 100vh;
}
#content{
    /* margin-top: 50px; */
    margin-left: 18vw;
}
.header-container {
    margin: 0 auto;
    padding: var(--vert-spacing-m) calc(var(--hori-spacing-s) * 2);
    display: flex;
    justify-content: flex-start;
    align-items: flex-start;
    flex-direction: column;
}

.site-logo {
    flex-shrink: 0;
    margin-top: 5px;
    margin-bottom: var(--vert-spacing-m);
}

.site-logo svg {
    width: 13.5vw;
}

.site-logo svg path {
    fill: var(--color-base);
}

.site-logo a {
    display: block;
    text-decoration: none;
}

/* ==========================================================================
   6. NAVIGATION
   ========================================================================== */

.main-navigation {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.primary-menu {
    list-style: none;
    display: flex;
    gap: var(--spacing-sm);
    margin: 0;
    padding: 0;
    flex-direction: column;
}

.primary-menu li {
    margin: 0;
}

.primary-menu a {
    font-family: var(--font-family);
    font-size: var(--font-size-md);
    font-weight: var(--font-weight-medium);
    text-decoration: none;
    text-transform: uppercase;
    color: var(--color-base);
    padding: 8px 0;
    display: flex;
    align-items: center;
    column-gap: 8px;
    transition: 2s;
}

.primary-menu a svg {
    flex-shrink: 0;
    margin-bottom: 2px;
    height: calc(var(--font-size-md) * 1.5);
    transition: transform 2s;
    position: relative;
    transform-origin: center;
    top: 0;
}

.primary-menu a:hover svg {
    transform: rotate(180deg);
}

.primary-menu a:hover {
    text-decoration: underline;
}

.primary-menu .current_page_item > a {
    text-decoration: underline;
}

/* Navigation Item Colors */
#about, #about + ul a{
    color: var(--color-about);
}

#about svg path {
    fill: var(--color-about);
}

#events, #events + ul a{
    color: var(--color-events);
}

#events svg path {
    fill: var(--color-events);
}

#academics, #academics + ul a{
    color: var(--color-academics);
}

#academics svg path {
    fill: var(--color-academics);
}

#resources, #resources + ul a   {
    color: var(--color-resources);
}

#resources svg path {
    fill: var(--color-resources);
}

#scholarships, #scholarships + ul a {
    color: var(--color-scholarships);
}

#scholarships svg path {
    fill: var(--color-scholarships);
}

/* Submenu Styles */
.primary-menu .sub-menu {
    display: none;
    margin: 0;
    padding: 0;
    list-style: none;
    padding-left: 15px;
}

.primary-menu .menu-item-has-children.open > .sub-menu {
    display: block;
}

.primary-menu .sub-menu li {
    margin: 0;
    display: block;
}

.primary-menu .sub-menu a {
    padding: 8px 15px;
    display: block;
    transition: background-color 0.2s ease;
}

/* Remove icons from submenu items */
.primary-menu .sub-menu a svg {
    display: none;
}

.primary-menu .sub-menu a:hover {

}

/* Submenu inherits parent color */
#about .sub-menu a {
    color: var(--color-about);
}

#events .sub-menu a {
    color: var(--color-events);
}

#academics .sub-menu a {
    color: var(--color-academics);
}

#resources .sub-menu a {
    color: var(--color-resources);
}

#scholarships .sub-menu a {
    color: var(--color-scholarships);
}

/* Nested submenus (third level) */
.primary-menu .sub-menu .sub-menu {
    padding-left: 30px;
}

/* Make parent menu items with submenus clickable for toggling */
.primary-menu .menu-item-has-children > a.menu-parent-link {
    cursor: pointer;
}

/* Style for duplicate parent link in submenu */
.primary-menu .sub-menu .parent-duplicate a {
    font-weight: var(--font-weight-semibold);
}

/* Mobile Menu Toggle */
.mobile-menu-toggle {
    display: none;
    border: none;
    background: none;
    padding: 8px 12px;
    cursor: pointer;
    font-size: 7vw;
    vertical-align: top;
    position: relative;
    top: -5px;
    line-height: 0.6;
    color: var(--color-base);
}

/* ==========================================================================
   7. MAIN CONTENT
   ========================================================================== */

.site-main {
    padding: var(--spacing-lg) 0;
    min-height: 60vh;
}

.entry-content {
    margin-top: var(--spacing-md);
}

.entry-header {
    margin-bottom: var(--spacing-md);
}

/* Post and Event Templates */

body.event-template-default .post-thumbnail,
body.course-template-default .post-thumbnail,
body.post-template-default .post-thumbnail {
    float: left;
    margin: var(--vert-spacing-s);
    width: calc(((100% - (var(--hori-spacing-s) * 5)) / 6 * 2) + var(--hori-spacing-s));
}

body.event-template-default .post-thumbnail img,
body.course-template-default .post-thumbnail img,
body.post-template-default .post-thumbnail img {
    width: 100%;
    height: auto;
}

body.event-template-default .entry-content,
body.course-template-default .entry-content,
body.post-template-default .entry-content {
    margin-left: calc(((100% - (var(--hori-spacing-s) * 5)) / 6 * 2) + (var(--hori-spacing-s) * 2));
    width: calc(((100% - (var(--hori-spacing-s) * 5)) / 6 * 4) + var(--hori-spacing-s));
    padding-left: var(--hori-spacing-m);
    padding-bottom: var(--vert-spacing-m);
}

body.event-template-default .wp-block-cfis-section,
body.course-template-default .wp-block-cfis-section,
body.post-template-default .wp-block-cfis-section {
    padding-bottom: var(--vert-spacing-l);
    overflow: hidden;
}


/* lightbox */
/* ==========================================================================
   CUSTOM LIGHTBOX
   ========================================================================== */

.custom-lightbox {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.95);
    z-index: 10000;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.custom-lightbox.active {
    display: flex;
    opacity: 1;
}

.lightbox-image {
    max-width: 90%;
    max-height: 85vh;
    object-fit: contain;
    animation: lightboxZoom 0.3s ease;
}

@keyframes lightboxZoom {
    from {
        transform: scale(0.8);
        opacity: 0;
    }
    to {
        transform: scale(1);
        opacity: 1;
    }
}

.lightbox-close,
.lightbox-prev,
.lightbox-next {
    position: absolute;
    color: white;
    font-size: 40px;
    font-weight: bold;
    cursor: pointer;
    user-select: none;
    padding: 10px 15px;
    transition: opacity 0.3s ease;
    font-family: monospace;
}

.lightbox-close:hover,
.lightbox-prev:hover,
.lightbox-next:hover {
    opacity: 0.7;
}

.lightbox-close {
    top: 20px;
    right: 35px;
    font-size: 50px;
}

.lightbox-prev {
    left: 20px;
    top: 50%;
    transform: translateY(-50%);
}

.lightbox-next {
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
}

.lightbox-caption {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    color: white;
    text-align: center;
    padding: 10px 20px;
    background-color: rgba(0, 0, 0, 0.7);
    border-radius: 5px;
    max-width: 80%;
    font-size: var(--font-size-md);
}

/* Mobile styles */
@media (max-width: 768px) {
    .lightbox-image {
        max-width: 95%;
        max-height: 80vh;
    }

    .lightbox-close {
        top: 10px;
        right: 10px;
        font-size: 40px;
    }

    .lightbox-prev,
    .lightbox-next {
        font-size: 30px;
        padding: 5px 10px;
    }

    .lightbox-prev {
        left: 10px;
    }

    .lightbox-next {
        right: 10px;
    }

    .lightbox-caption {
        font-size: var(--font-size-sm);
        bottom: 10px;
        max-width: 90%;
    }
}

/* ==========================================================================
   8. FOOTER
   ========================================================================== */

.site-footer {
    border-top: 2px solid var(--color-base);
    color: var(--color-base);
    padding: calc(var(--vert-spacing-s) * 2) var(--hori-spacing-m);
    gap: var(--hori-spacing-s);
    margin-left: 18vw;
}

.footer-container {
    margin: 0 auto;
    display: flex;
    font-size: var(--font-size-md);
    text-align: left;
    justify-content: space-between;
    align-items: flex-start;
}

.site-footer a {
    flex-basis: 16.666%;
}
.site-footer .footer-logo{
        width: 8vw;
        align-self:center;
    }
/* Newsletter Signup */
.site-footer #newsletter-signup {
    align-self: center;
    display: flex;
    justify-content: flex-end;
    flex-basis: 31.66%;
    align-items: center;
}

.site-footer #newsletter-signup .footercol {
    display: flex;
    gap: var(--hori-spacing-s);
    flex-direction: column;
    position: relative;
    top:calc(-1 * var(--vert-spacing-s)*2);
}

.site-footer #newsletter-signup input {
    border: 1px solid var(--color-base);
    color: var(--color-base);
    font-family: var(--font-family);
    font-size: var(--font-size-md);
}

.site-footer #newsletter-signup .button {
    background-color: var(--color-base);
    color: var(--color-white);
    font-family: var(--font-family);
    font-size: var(--font-size-md);
    border: 1px solid var(--color-base);
    padding: 3px 5px;
    cursor: pointer;
}

.site-footer #newsletter-signup .button:hover {
    color: var(--color-base);
    background-color: var(--color-white);
}

.site-footer #mc_embed_signup_scroll {
    display: flex;
    gap: 5px;
}

/* ==========================================================================
   9. BUTTONS
   ========================================================================== */

.btn,
.cfis-filter-reset,
.wp-block-button__link {
    display: inline-block;
    padding: 0.2rem 0.5rem;
    background-color: var(--color-base);
    color: var(--color-white);
    text-decoration: none;
    font-weight: var(--font-weight-medium);
    border-radius: 0;
    font-size: var(--font-size-lg);
    cursor: pointer;
    transition: all 0.3s ease;
    border: 2px solid var(--color-base);
}

.btn:hover,
.wp-block-button__link:hover {
    background-color: var(--color-white);
    color: var(--color-base);
}

/* Buttons in Colored Sections */
.wp-block-cfis-section .btn,
.wp-block-cfis-section .wp-block-button__link {
    background-color: var(--color-white);
    color: var(--color-base);
    border: 2px solid var(--color-white);
}

.wp-block-cfis-section .btn:hover,
.wp-block-cfis-section .wp-block-button__link:hover {
    background-color: var(--color-base);
    color: var(--color-white);
}

/* ==========================================================================
   10. WORDPRESS BLOCK EDITOR
   ========================================================================== */

.alignwide {
    max-width: var(--wide-width);
    margin-left: auto;
    margin-right: auto;
}

.alignfull {
    max-width: 100%;
    width: 100vw;
    margin-left: calc(50% - 50vw);
    margin-right: calc(50% - 50vw);
}

/* Editor Styles */
.is-root-container,
.edit-post-visual-editor__post-title-wrapper {
    margin: var(--vert-spacing-s) var(--hori-spacing-m);
}

.editor-styles-wrapper :where(:not(.is-layout-flex, .is-layout-grid)) > .wp-block {
    margin-left: inherit;
}

/* ==========================================================================
   11. GUTENBERG BLOCKS - COLUMN-BASED SIZING
   6-column layout with 20px gaps
   ========================================================================== */

/* --- Image Block Width Styles --- */
.wp-block-image.is-width-1col img,
.wp-block-image.is-width-1col img + figcaption {
    width: calc((100% - (var(--hori-spacing-s) * 5)) / 6);
    max-width: 100%;
    height: auto;
}

.wp-block-image.is-width-2col img,
.wp-block-image.is-width-2col img + figcaption {
    width: calc(((100% - (var(--hori-spacing-s) * 5)) / 6 * 2) + var(--hori-spacing-s));
    max-width: 100%;
    height: auto;
}

.wp-block-image.is-width-3col img,
.wp-block-image.is-width-3col img + figcaption {
    width: calc(((100% - (var(--hori-spacing-s) * 5)) / 6 * 3) + (var(--hori-spacing-s) * 2));
    max-width: 100%;
    height: auto;
}


.wp-block-image.is-width-4col img,
.wp-block-image.is-width-4col img + figcaption {
    width: calc(((100% - (var(--hori-spacing-s) * 5)) / 6 * 4) + (var(--hori-spacing-s) * 3));
    max-width: 100%;
    height: auto;
}

.wp-block-image.is-width-5col img,
.wp-block-image.is-width-5col img + figcaption {
    width: calc(((100% - (var(--hori-spacing-s) * 5)) / 6 * 5) + (var(--hori-spacing-s) * 4));
    max-width: 100%;
    height: auto;
}

.wp-block-image.is-width-full img,
.wp-block-image.is-width-full img + figcaption {
    width: 100%;
    height: auto;
}

/* --- Image Block Margin Styles --- */
.wp-block-image.is-margin-0 {
    margin-left: 0;
}

.wp-block-image.is-margin-1col,
.editor-styles-wrapper :where(:not(.is-layout-flex, .is-layout-grid)) > .wp-block.is-margin-1col {
    margin-left: calc(((100% - (var(--hori-spacing-s) * 5)) / 6) + var(--hori-spacing-s));
}

.wp-block-image.is-margin-2col,
.editor-styles-wrapper :where(:not(.is-layout-flex, .is-layout-grid)) > .wp-block.is-margin-2col {
    margin-left: calc(((100% - (var(--hori-spacing-s) * 5)) / 6 * 2) + (var(--hori-spacing-s) * 2));
}

.wp-block-image.is-margin-3col,
.editor-styles-wrapper :where(:not(.is-layout-flex, .is-layout-grid)) > .wp-block.is-margin-3col {
    margin-left: calc(((100% - (var(--hori-spacing-s) * 5)) / 6 * 3) + (var(--hori-spacing-s) * 3));
}

.wp-block-image.is-margin-4col,
.editor-styles-wrapper :where(:not(.is-layout-flex, .is-layout-grid)) > .wp-block.is-margin-4col {
    margin-left: calc(((100% - (var(--hori-spacing-s) * 5)) / 6 * 4) + (var(--hori-spacing-s) * 4));
}

/* --- Paragraph Block Width Styles --- */
p.is-width-1col {
    width: calc((100% - (var(--hori-spacing-s) * 5)) / 6);
    max-width: 100%;
}

p.is-width-2col {
    width: calc(((100% - (var(--hori-spacing-s) * 5)) / 6 * 2) + var(--hori-spacing-s));
    max-width: 100%;
}

p.is-width-3col {
    width: calc(((100% - (var(--hori-spacing-s) * 5)) / 6 * 3) + (var(--hori-spacing-s) * 2));
    max-width: 100%;
}

p.is-width-4col {
    width: calc(((100% - (var(--hori-spacing-s) * 5)) / 6 * 4) + (var(--hori-spacing-s) * 3));
    max-width: 100%;
}

p.is-width-5col {
    width: calc(((100% - (var(--hori-spacing-s) * 5)) / 6 * 5) + (var(--hori-spacing-s) * 4));
    max-width: 100%;
}

p.is-width-full {
    width: 100%;
}

/* --- Paragraph Block Margin Styles --- */
p.is-margin-0 {
    margin-left: 0;
}

p.is-margin-1col {
    margin-left: calc(((100% - (var(--hori-spacing-s) * 5)) / 6) + var(--hori-spacing-s));
}

p.is-margin-2col {
    margin-left: calc(((100% - (var(--hori-spacing-s) * 5)) / 6 * 2) + (var(--hori-spacing-s) * 2));
}

p.is-margin-3col {
    margin-left: calc(((100% - (var(--hori-spacing-s) * 5)) / 6 * 3) + (var(--hori-spacing-s) * 3));
}

p.is-margin-4col {
    margin-left: calc(((100% - (var(--hori-spacing-s) * 5)) / 6 * 4) + (var(--hori-spacing-s) * 4));
}

/* --- Button Block Margin Styles --- */
.wp-block-button.is-margin-0,
.wp-block-buttons > .wp-block.is-margin-0,
.wp-block-buttons > .wp-block-button.wp-block-button.wp-block-button.wp-block-button.wp-block-button.is-margin-0 {
    margin-left: 0;
}

.wp-block-button.is-margin-1col,
.wp-block-buttons > .wp-block.is-margin-1col,
.wp-block-buttons > .wp-block-button.wp-block-button.wp-block-button.wp-block-button.wp-block-button.is-margin-1col {
    margin-left: calc(((100% - (var(--hori-spacing-s) * 5)) / 6) + var(--hori-spacing-s));
}

.wp-block-button.is-margin-2col,
.wp-block-buttons > .wp-block.is-margin-2col,
.wp-block-buttons > .wp-block-button.wp-block-button.wp-block-button.wp-block-button.wp-block-button.is-margin-2col {
    margin-left: calc(((100% - (var(--hori-spacing-s) * 5)) / 6 * 2) + (var(--hori-spacing-s) * 2));
}

.wp-block-button.is-margin-3col,
.wp-block-buttons > .wp-block.is-margin-3col,
.wp-block-buttons > .wp-block-button.wp-block-button.wp-block-button.wp-block-button.wp-block-button.is-margin-3col {
    margin-left: calc(((100% - (var(--hori-spacing-s) * 5)) / 6 * 3) + (var(--hori-spacing-s) * 3));
}

.wp-block-button.is-margin-4col,
.wp-block-buttons > .wp-block.is-margin-4col,
.wp-block-buttons > .wp-block-button.wp-block-button.wp-block-button.wp-block-button.wp-block-button.is-margin-4col {
    margin-left: calc(((100% - (var(--hori-spacing-s) * 5)) / 6 * 4) + (var(--hori-spacing-s) * 4));
}

/* --- Color Section Block --- */
.wp-block-cfis-section,
.editor-styles-wrapper :where(:not(.is-layout-flex, .is-layout-grid)) > .wp-block.wp-block-cfis-section {
    background-color: var(--color-base);
    color: var(--color-white);
    width: calc(100% + var(--hori-spacing-m) * 2);
    max-width: none;
    margin-left: calc(-1 * var(--hori-spacing-m));
    padding: var(--vert-spacing-s) var(--hori-spacing-m);
}

/* --- Cards Block Grid Layout --- */
.cfis-cards-grid {
    display: grid;
    gap: var(--hori-spacing-s);
    width: 100%;
}

.cfis-cards-columns-1 { grid-template-columns: repeat(1, 1fr); }
.cfis-cards-columns-2 { grid-template-columns: repeat(2, 1fr); }
.cfis-cards-columns-3 { grid-template-columns: repeat(3, 1fr); }
.cfis-cards-columns-4 { grid-template-columns: repeat(4, 1fr); }
.cfis-cards-columns-5 { grid-template-columns: repeat(5, 1fr); }
.cfis-cards-columns-6 { grid-template-columns: repeat(6, 1fr); }

/* Card Styling */
.cfis-card {
    display: flex;
    flex-direction: column;
    position: relative;
}

.cfis-card-image {
    width: 100%;
    margin-bottom: 10px;
}

.cfis-card-image img {
    width: 100%;
    height: auto;
    display: block;
}

.cfis-card-text {
    font-size: 1rem;
}

.cfis-card-text a {
    color: inherit;
    text-decoration: underline;
}

/* Editor-only Card Styles */
.block-editor .cfis-card {
    border: 1px dashed #ccc;
    padding: 15px;
    margin-bottom: 10px;
}

.block-editor .cfis-remove-card {
    margin-top: 10px;
}

.block-editor .cfis-card-image-wrapper {
    position: relative;
}

.block-editor .cfis-remove-image {
    position: absolute;
    top: 10px;
    right: 10px;
}

:where(.editor-styles-wrapper) .cfis-card {
    border: 1px solid lime;
}

/* ==========================================================================
   12. COURSES
   ========================================================================== */

.cfis-course-editor-item {
    background-color: #000000 !important;
}

/* ==========================================================================
   13. EVENTS & CAROUSELS
   ========================================================================== */
/*-- single event--*/
.single-event-item{
    display: flex;
    width: 70%;
    margin: 0 auto;
    flex-direction: column;
    gap: var(--vert-spacing-m);
    padding: var(--vert-spacing-m) var(--hori-spacing-m);
}
.single-event-item .single-event-image{
        flex-basis: 50%;
}
.single-event-item .single-event-
.single-event-item .single-event-image > a{
    display: inline-block;
}
.single-event-item .single-event-image > a img{
    width: 100%;
    height: auto;
    object-fit: cover;
}
/* --- Carousel Container --- */
.carousel-container {
    position: relative;
    display: flex;
    align-items: center;
    gap: 1rem;
    width: 90%;
    max-width: none;
    margin: 0 auto;
}

.carousel-wrapper {
    flex: 1;
    overflow: hidden;
    position: relative;
}

.carousel-track {
    display: flex;
    transition: transform 0.5s ease-in-out;
    overflow: visible;
}

.carousel-item {
    flex: 0 0 100%;
    position: relative;
    max-width: 100%;
}

/* --- Carousel Caption --- */
.carousel-caption {
    background-color: var(--color-base);
    color: var(--color-white);
    padding: var(--vert-spacing-m);
    z-index: 2;
    display: inline-block;
    vertical-align: bottom;
    position: absolute;
    right: 0;
    bottom: 0;
    font-size: var(--font-size-md);
    width: 70%;
}

.carousel-caption .btn {
    font-size: var(--font-size-md);
    border: 1px solid var(--color-white);
}

.carousel-caption .event-title a {
    text-decoration: none;
}

.carousel-caption .event-title {
    margin-bottom: 0;
}

/* --- Carousel Image --- */
.carousel-image {
    width: 30%;
    z-index: 1;
    left: 2px;
    bottom: var(--vert-spacing-m);
    position: relative;
    display: inline-block;
}

.carousel-image img {
    height: auto;
    width: 200%;
    display: block;
}

/* --- Carousel Controls --- */
.carousel-arrow {
    background: transparent;
    border: none;
    color: var(--color-base);
    width: 48px;
    height: 48px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: 0.3s ease;
    flex-shrink: 0;
    z-index: 10;
}

.carousel-arrow:hover {
    transform: scale(1.2);
}

.carousel-arrow:active {
    transform: scale(0.95);
}

.carousel-dots {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    margin-top: var(--vert-spacing-m);
    margin-bottom: var(--vert-spacing-m);
}

.carousel-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    border: 1px solid var(--color-base);
    cursor: pointer;
    padding: 0;
    background: var(--color-white);
    transition: background 0.3s ease;
}

.carousel-dot.active,
.carousel-dot:hover {
    background: var(--color-base);
}

/* --- News Carousel --- */
.news-carousel {
    padding-bottom: var(--vert-spacing-l);
}

.news-carousel .news-title a {
    text-decoration: none;
}

.news-carousel .section-title {
    font-size: var(--font-size-l);
    text-transform: uppercase;
    text-align: center;
    margin: var(--vert-spacing-l) auto;
}

.news-carousel .carousel-arrow {
    color: var(--color-white);
}

.news-carousel .carousel-dot {
    background: var(--color-base);
    border: 1px solid var(--color-white);
}

.news-carousel .carousel-dot.active,
.news-carousel .carousel-dot:hover {
    background: var(--color-white);
}

.news-carousel .carousel-caption {
    border: 2px solid var(--color-white);
    right: 2px;
}

/* --- Event Filters --- */
.event-filters {
    display: flex;
    flex-wrap: wrap;
    gap: var(--hori-spacing-m);
    margin-bottom: 2rem;
    margin-left: calc(((100% - (var(--hori-spacing-s) * 5)) / 6) + var(--hori-spacing-s));
    padding: 1.5rem;
}

.filter-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.filter-group label {
    font-weight: var(--font-weight-regular);
    font-size: var(--font-size-md);
}

.filter-group select {
    padding: 0.5rem;
    border-radius: 0;
    background-color: transparent;
    border: 1px solid var(--color-white);
    color: var(--color-white);
    font-family: var(--font-family);
    min-width: 150px;
    font-size: var(--font-size-md);
}

.filter-group-checkboxes {
    flex: 1;
    min-width: 250px;
}

.checkbox-group {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    gap: var(--hori-spacing-m);
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    font-size: 14px;
    font-weight: normal;
}

.checkbox-label input[type="checkbox"] {
    cursor: pointer;
    width: 16px;
    height: 16px;
}

.filter-buttons {
    display: flex;
    flex-direction: row;
    gap: var(--hori-spacing-m);
    justify-content: flex-end;
    align-content: center;
    align-items: center;
}

.btn.filter-btn,
.btn.reset-btn {
    background-color: var(--color-base);
    font-size: var(--font-size-md);
    font-family: var(--font-family);
    text-align: center;
    color: var(--color-white);
    padding: 0.7em;
    line-height: 1;
}

.btn.filter-btn:hover,
.btn.reset-btn:hover {
    background-color: var(--color-white);
    color: var(--color-base);
}

.reset-btn {
    border: 1px solid var(--color-white);
}

.reset-btn:hover {
    background-color: var(--color-white);
    color: var(--color-base);
    border: 1px solid var(--color-white);
}

/* --- Events Grid --- */
.events-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(calc(33% - (var(--hori-spacing-s) * 2)), 1fr));
    gap: var(--hori-spacing-m);
    padding-bottom: var(--hori-spacing-m);
}

.event-card {
    transition: transform 0.3s ease;
}
.event-card-image img{
            width: 100%;
            height: auto;
            object-fit: cover;
    }
.event-card:hover {
    opacity: 0.9;
}

.event-thumbnail img {
    width: 100%;
    height: 45vh;
    object-fit: cover;
}

.event-content {
    padding: var(--spacing-sm);
}

.event-content .entry-title,
.event-content .entry-summary {
    font-size: var(--font-size-md);
}

.event-content .event-date {
    display: none;
}

.event-date {
    color: var(--color-events);
    font-size: var(--font-size-sm);
    margin: var(--spacing-xs) 0;
}

/* ==========================================================================
   14. HOMEPAGE
   ========================================================================== */

/* Events Section */
.events-section {
    padding-bottom: var(--vert-spacing-l);
}

.events-container {
    margin: 0 auto;
}

.events-container h2 {
    font-size: var(--font-size-l);
    text-transform: uppercase;
    margin: var(--vert-spacing-l) auto;
    text-align: center;
}
/* Homepage Events */
.events-cards {
    display: flex;
    gap: 30px;
    flex-wrap: wrap;
    justify-content: center;
}

.events-cards .event-card {
    flex: 1;
    min-width: 280px;
    max-width: calc(33.333% - 20px);
    overflow: hidden;
    transition: transform 0.3s ease;
}

/* When there's only one event, make it larger */
.events-cards .event-card:only-child {
    max-width: 50%;
}

/* When there are exactly two events, make them slightly larger */
.events-cards .event-card:first-child:nth-last-child(2),
.events-cards .event-card:first-child:nth-last-child(2) ~ .event-card {
    max-width: calc(50% - 15px);
}

.events-cards .event-card:hover {
    opacity: 0.9;
}


/* ==========================================================================
   15. ANIMATIONS
   ========================================================================== */



/* Homepage Header Animation */
.site-header .site-logo,
.site-header.header-intro svg path {
    transition: 0s;
    transform-origin: 0 0;
}
.site-header.header-intro nav,
.site-header.header-intro .primary-menu a span,
    .site-header.header-intro .primary-menu a svg,
    .site-header.header-intro .primary-menu a svg path{
    transition:0s;
}

.site-header.header-intro .header-container{
    flex-direction: column;
    align-items: center;
}
@keyframes fadeOut {
    0% {  opacity: 1; }
    90% { opacity: 1; }
    100% { opacity: 0; }
}
.site-header{
    transition: 0s;
}
/* .site-header.header-intro *{
     animation: fadeOut 2s ease forwards;
} */
.home .site-header{
    position:fixed;
}
.site-header.header-intro {
    background-color: var(--color-base);
    transition: background-color 1s;
    border: none;
    display: flex;
    height: 100vh;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    width: 100vw;
}
@keyframes glow {
    0% {
        bottom: 5vh;
    }
    50% {
        bottom: 4.5vh;
    }
    100% {
        bottom: 5vh;
    }
}
 @keyframes rotation {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
 }
  .site-header.header-intro .primary-menu a svg {
    animation: rotation 2s ease-in-out;
}
.site-header.header-intro::after{
    /* content: url('assets/images/arrow.svg'); */
    content:" ";
    color: var(--color-white);
    bottom: 5vh;
    left: 50%;
    transform: translateX(-50%);
    position: absolute;
    font-size: 70px;
    cursor: pointer;
    font-family: monospace;
    /* animation: glow 1s linear infinite; */
}

.site-header.header-intro .main-navigation, .site-header.header-intro .primary-menu{
    flex-direction: row;
}
.site-header.header-intro .site-logo {
    transform: scale(3);
    pointer-events: none;
    transform-origin: center;
    margin-top: -13vh;
}

.site-header.header-intro .site-logo svg path {
    
    fill: var(--color-white);
}

.site-header.header-intro .primary-menu a {
    pointer-events: none;
}

.site-header.header-intro .primary-menu a span {
    font-size: 0;
    color: transparent;
    transition:0;
}


.site-header.header-intro .primary-menu a#about svg path,
.site-header.header-intro .primary-menu a#academics svg path,
.site-header.header-intro .primary-menu a#events svg path,
.site-header.header-intro .primary-menu a#scholarships svg path,
.site-header.header-intro .primary-menu a#resources svg path {
    fill: var(--color-white);
}
body.home .site-container .wp-block-cfis-section:first-child .sprinkle-container {
  opacity: 0;
  transition:1s;
}
body.home.scrolled .site-container .wp-block-cfis-section:first-child .sprinkle-container {
  opacity: 1;
}
.site-header .primary-menu a svg {
    transform-origin: center;
}

.site-header.header-intro .primary-menu a svg {
    height: 9.25vw;
    transform: rotate(360deg);
    top: 7vh;
}

.site-header.header-intro .primary-menu {
    height: 2em;
    overflow: visible;
}


/* ==========================================================================
   16. RESPONSIVE MEDIA QUERIES
   ========================================================================== */

@media (max-width: 768px) {

    /* Adjust Spacing Variables */
    :root {
        --vert-spacing-s: 5px;
        --vert-spacing-m: 25px;
        --vert-spacing-l: 50px;
        --font-size-sm: 0.875rem;
        --font-size-md: clamp(16px, 1.2vw, 24px);
        --font-size-lg: clamp(16px, 2vw, 100px);
        --font-size-xl: 1.75rem;
        --font-size-xxl: clamp(16px, 8vw, 200px);
    }
    
    /* Header */
    .header-container {
        flex-wrap: wrap;
    }

    .site-logo {
        order: 1;
        margin: 0;
        margin-top:5px;
    }

    .site-logo svg {
        width: 25vw;
    }

    .mobile-menu-toggle {
        display: block;
        order: 3;
    }
    .mobile-menu-toggle.active span{
        content: "X";
    }
    .mobile-menu-toggle.active + nav{
        height: 100vh;
    }
    /* Homepage Header Animation */
    .site-header{
        border-right: none;
        border-bottom: 2px solid var(--color-base);
        width: 100vw;
        height: auto;
    }
    .site-header.header-intro .header-container{
        width: auto;
    }
    .header-container{
        justify-content: space-between;
        padding: calc(var(--vert-spacing-s)*2) calc(var(--hori-spacing-s));
        align-items: center;
        flex-direction: row;
        width: calc(100% - var(--vert-spacing-s) * 2);
    }
    .site-header.header-intro .site-logo {
        transform: scale(3);
    }
    .site-header.header-intro .primary-menu{
        flex-direction: row;
        width: 100%;
        justify-content: flex-end;
    }
    
    .site-header.header-intro .main-navigation {
        overflow: visible;
    }
   
    /* Navigation */
    .main-navigation {
        order: 4;
        width: 100%;
        height:0;
        overflow: hidden;
    }

    .main-navigation.active {
        display: block;
        height: auto;
        margin-top: var(--spacing-sm);
    }

    .primary-menu {
        flex-direction: column;
        gap: 0;
    }

    .primary-menu a {
        display: block;
        padding: 12px;
        text-align: center;
    }

    .primary-menu a > * {
        vertical-align: top;
    }
    
    /* Submenu Mobile Styles */
    .primary-menu .sub-menu {
        position: static;
        box-shadow: none;
        width: 100%;
        padding-left: var(--hori-spacing-s);
    }
    
    .primary-menu .sub-menu a {
        padding: 8px 15px;
    }
    
    /* Footer */
    .footer-container{
        flex-direction: column;
        align-items: flex-start;
        gap: var(--vert-spacing-m);
    }
    .site-footer{
        margin-left:0;
    }
    .site-footer #newsletter-signup .footercol{
        flex-direction: column;
    }
    .site-footer #newsletter-signup{
        align-self: flex-start;
    }
    .site-footer .footer-logo{
         width: 17vw;
         align-self: flex-start
    }
    /* Carousel */
    .carousel-container{
        width: 100vw;
        margin-left: calc(-1 * var(--hori-spacing-m));
    }
    .carousel-caption,
    .carousel-image {
        display: block;
        position: relative;
        width: 100%;
        bottom: 0;
    }

    .carousel-image img {
        width: 100%;
    }
    .carousel-item{ 
        background-color: var(--color-base);
    }
  
    /* single event */
    body.event-template-default .post-thumbnail, body.post-template-default .post-thumbnail{
        float: none;
    }
    body.event-template-default .entry-content, body.post-template-default .entry-content{
        margin-left:0;
        width: 100%;
        padding:0;
    }
    body.event-template-default .post-thumbnail, body.post-template-default .post-thumbnail{
        width: 100%;
        margin: 0;
        margin-bottom: var(--vert-spacing-m);
    }
    
    /* Event Filters */
    .event-filters {
        flex-direction: column;
        margin-left: 0;
    }

    .filter-group,
    .filter-group-checkboxes {
        width: 100%;
        min-width: 100%;
    }
    #content{
    margin-top: 8vh;
    margin-left:0;
    }
    #content .site-container > *:first-child{
        margin-top: 8vh;
    }
    .wp-block-image.is-width-5col img, .wp-block-image.is-width-5col img + figcaption {
        width: 100%;
    }
    .wp-block-image.is-width-4col img, .wp-block-image.is-width-4col img + figcaption {
        width: 100%;
    }
    .filter-buttons {
        width: 100%;
    }

    .filter-btn,
    .reset-btn {
        width: 100%;
    }

    /* Events Grid */
    .events-grid {
        grid-template-columns: repeat(auto-fill, minmax(calc(50% - (var(--hori-spacing-s) * 2)), 1fr));
    }

    .event-thumbnail img {
        width: 100%;
        height: 35vh;
        object-fit: cover;
    }

    /* Homepage Events */
    .events-cards {
        flex-direction: column;
    }
    .events-cards .event-card:only-child {
        max-width: 100%;
    }
    .events-cards .event-card{
        max-width: 100%;
    }
    .event-card {
        max-width: 100%;
    }
    
    .cfis-cards-columns-6 {
        grid-template-columns: repeat(2, 1fr);
    }
   /**/
   p.is-margin-1col{
     margin-left:0;
   }
   p.is-width-5col, 
   p.is-width-4col{
    width: 100%;
   }
   .wp-block-button.is-margin-1col, .wp-block-buttons > .wp-block.is-margin-1col, .wp-block-buttons > .wp-block-button.wp-block-button.wp-block-button.wp-block-button.wp-block-button.is-margin-1col{
    margin-left:0;
   }
   .site-header.header-intro .primary-menu a svg{
    top:0;
   }
   
}

/* ==========================================================================
   UTILITY CLASSES
   ========================================================================== */

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

.mt-small { margin-top: var(--spacing-sm); }
.mt-medium { margin-top: var(--spacing-md); }
.mt-large { margin-top: var(--spacing-lg); }

.mb-small { margin-bottom: var(--spacing-sm); }
.mb-medium { margin-bottom: var(--spacing-md); }
.mb-large { margin-bottom: var(--spacing-lg); }