/*
Theme Name: E3P Modern
Author: Gemini
Description: A modern, clean, three-column theme for E3P, based on the existing e3p.eu layout.
Version: 1.0
*/

/*
:root
Defines CSS variables for colors, fonts, and layout values for consistency and easy maintenance.
*/
:root {
    /* Colors */
    --color-text: #000080;
    --color-link: #80b3ff;
    --color-link-hover: #000080;
    --color-background: #ffffff;
    --color-hover-bg: #eee;
    --color-overlay: rgba(128, 179, 255, 0.7);
    --color-selection-text: #ffffff;
    --color-hamburger: black;

    /* Fonts */
    --font-body: 'Lato', sans-serif;
    --font-heading: 'Lato', sans-serif;

    /* Layout */
    --width-side-column: 300px;
    --gap-column: 20px;
    --border-radius-box: 15px;
}

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

body {
    margin: 0;
    font-family: var(--font-body);
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    position: relative;
    color: var(--color-text);
    letter-spacing: 0.045em;
    line-height: 1.8em;
}

/* Background Overlay */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    background-image: url('background.webp');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
}

/* Background Color Overlay (on top of blurred image) */
body::after {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: var(--color-overlay);
    z-index: 0; /* Place above the blurred image (z-index: -1) */
}

::selection {
  color: var(--color-selection-text);
  background-color: var(--color-text);
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    color: var(--color-link);
}

a {
  color: var(--color-link);
  text-decoration: underline solid var(--color-link);
}

/* ==========================================================================
   Layout
   ========================================================================== */

.container {
    display: flex;
    justify-content: center;
    min-height: 100vh;
}

.left-column, .middle-column, .right-column {
    padding: var(--gap-column);
}

.left-column {
    width: var(--width-side-column);
    position: fixed;
    left: 0;
    top: 0;
    height: auto;
    z-index: 10;
    padding: 0; /* Override general column padding */
}

.middle-column {
    margin-left: calc(var(--width-side-column) + var(--gap-column));
    margin-right: calc(var(--width-side-column) + var(--gap-column));
    min-width: 400px;
    flex-grow: 1;
    z-index: 5;
}

.right-column {
    width: var(--width-side-column);
    position: fixed;
    right: 0;
    top: 0;
    height: 100vh;
    z-index: 5;
}

/* ==========================================================================
   Components
   ========================================================================== */

.box {
    background-color: var(--color-background);
    border-radius: var(--border-radius-box);
    padding: var(--gap-column);
    margin-top: 5vh;
    margin-bottom: 5vh;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.3);
}

/* Specific Box Styles */
.left-column .box {
    display: flex;
    flex-direction: column;
    height: auto;
    margin: 0;
    padding: var(--gap-column) 0; /* Vertical padding only */
    border-radius: 0;
    border-bottom-right-radius: var(--border-radius-box);
}

.middle-column .box {
    min-height: auto; /* Changed to auto to fit content */
    padding: 25px 40px 30px; /* Increased left and right padding */
}

.logo {
    text-align: center;
    margin-bottom: 20px;
    padding: 0 var(--gap-column); /* Horizontal padding */
}

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

.menu-wrapper {
    border-top: 3px solid var(--color-link);
    border-bottom: 3px solid var(--color-link);
    padding: 5px 0;
}

.menu, .menu ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.menu li {
    margin-bottom: 3px;
}

.menu a {
    text-decoration: none;
    color: var(--color-link);
    padding: 5px var(--gap-column);
    border-radius: 5px;
    transition: background-color 0.3s, color 0.3s;
    font-weight: bold;
}

.menu a:hover {
    background-color: var(--color-hover-bg);
    color: var(--color-link-hover);
}

.hamburger {
    display: none;
    cursor: pointer;
    padding: 15px;
}

.hamburger div {
    width: 35px;
    height: 5px;
    background-color: var(--color-hamburger);
    margin: 6px 0;
}

/* ==========================================================================
   WordPress Specific Styles
   ========================================================================== */
.current-menu-item > a {
    /* Style for the currently active menu item */
    color: var(--color-link-hover);
}


/* ==========================================================================
   Responsive Media Queries
   ========================================================================== */

/* Medium screens: Hide right column */
@media (max-width: 1200px) {
    .right-column {
        display: none;
    }
    .middle-column {
        margin-right: 0;
    }
}

/* Small screens: Left column becomes top header */
@media (max-width: 800px) {
    .left-column {
        width: 100%;
    }

    .left-column .box {
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
        min-height: 0;
        padding: 10px var(--gap-column);
        border-radius: 0; /* Full width header has no radius */
    }
    
    .logo {
        flex-grow: 0;
        text-align: left;
        margin: 0;
        padding: 0;
    }

    .logo img {
        max-height: 50px;
    }

    .middle-column {
        margin-left: 0;
        min-width: unset;
        /* Push content down by the height of the new header */
        padding-top: 90px; 
    }

    .middle-column .box {
        margin-top: var(--gap-column);
    }

    /* Hide the desktop menu and its wrapper */
    #mobile-menu-wrapper { /* Target the container by its new ID */
        display: none; /* Hidden by default */
        flex-direction: column; /* To stack menu items */
        position: absolute;
        top: 100%; /* Position below the .box */
        left: 0;
        width: 100%;
        background-color: var(--color-background);
        padding: 10px 0;
        border-top: 1px solid var(--color-hover-bg);
    }

    #mobile-menu-wrapper.active {
        display: flex; /* Show when active */
    }

    .menu li {
        margin: 0;
        text-align: left;
        padding-left: var(--gap-column);
    }

    .hamburger {
        display: block;
    }

    .language-switcher {
        display: none; /* Hide language switcher in mobile view */
    }
}

/* ==========================================================================
   Polylang Language Switcher
   ========================================================================== */

.language-switcher {
    padding: 15px 0 5px; /* Removed horizontal padding, kept vertical */
    border-top: none; /* Removed border */
    margin-top: 10px;
}

.language-switcher select {
    width: 100%;
    padding: 5px var(--gap-column); /* Match menu item padding */
    border: none; /* Remove border */
    background-color: var(--color-background);
    color: var(--color-link); /* Match menu item text color */
    font-weight: bold;
    font-family: var(--font-body);
    cursor: pointer;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    background-image: url('data:image/svg+xml;charset=US-ASCII,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%22292.4%22%20height%3D%22292.4%22%3E%3Cpath%20fill%3D%22%23000080%22%20d%3D%22M287%2069.4a17.6%2017.6%200%200%200-13-5.4H18.4c-5%200-9.3%201.8-12.9%205.4A17.6%2017.6%200%200%200%200%2082.2c0%205%201.8%209.3%205.4%2012.9l128%20127.9c3.6%203.6%207.8%205.4%2012.8%205.4s9.2-1.8%2012.8-5.4L287%2095c3.5-3.5%205.4-7.8%205.4-12.8%200-5-1.9-9.2-5.5-12.8z%22%2F%3E%3C%2Fsvg%3E');
    background-repeat: no-repeat;
    background-position: right 10px top 50%;
    background-size: 10px auto;
}

/* ==========================================================================
   Main Content Headings
   ========================================================================== */

.middle-column .box h1 {
    margin-top: 0; /* Keep top margin at 0 */
    margin-bottom: 1.5em; /* Increased bottom margin */
    font-size: 1.6em; /* Even smaller font size */
}

.middle-column .box h2 {
    margin-top: 0.4em;
    margin-bottom: 0.4em;
    font-size: 1.6em;
}

.middle-column .box h3 {
    margin-top: 0.3em;
    margin-bottom: 0.3em;
    font-size: 1.3em;
}

/* ==========================================================================
   Cropped Image Container
   ========================================================================== */

.my-cropped-image-container {
  width: calc(100% + 80px); /* Cover whole width + negative margins */
  height: 250px;  /* Fixed height */
  overflow: hidden; /* This hides the parts of the image that are outside the container */
  margin-left: -40px; /* Negative margin to ignore parent padding */
  margin-right: -40px; /* Negative margin to ignore parent padding */
}

.my-cropped-image-container img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center center; /* Aligns the image to the center, cropping accordingly */
}

.my-cropped-image-container {
  margin-bottom: 30px; /* Added space between image and content */
}

/* ==========================================================================
   Events Manager Plugin Overrides
   ========================================================================== */

/* Remove border, padding, and shadow from event lists */
.em.em-list.em-grid .em-item,
.em.em-list.size-small .em-item {
    border: none !important;
    padding: 0 !important;
    box-shadow: none !important;
}

/* Reset heading font sizes for pixelbones skin */
.em.pixelbones h1,
.em.pixelbones h2,
.em.pixelbones h3,
.em.pixelbones h4,
.em.pixelbones h5,
.em.pixelbones h6 {
    font-size: 1.2em !important;
}

.em.pixelbones a {
    text-decoration: none !important;
}

/* ==========================================================================
   Team Member Insert Template Styles
   ========================================================================== */

.placeholder-image {
  width: 100%;
  height: 250px;
  background-color: #a0a0b0; /* A grayish-blue color */
}

.team-member-container {
  margin-bottom: 2em; /* Add some space after the container */
}
