/*
Theme Name:     Neve Child
Theme URI:      https://themeisle.com/themes/neve/
Template:       neve
Author:         ThemeIsle
Author URI:     https://themeisle.com
Description:    Neve Child Theme
Version:        1.0.0
License:        GNU General Public License v2 or later
License URI:    http://www.gnu.org/licenses/gpl-2.0.html
Text Domain:    neve
*/

/* =========================================
   1. CUSTOM HEADER & SOCIAL MEDIA
   ========================================= */

/* Background and Layout */
#custom-top-bar {
    background-color: #226161; 
    color: #fff;
    padding: 8px 0;
    width: 100%;
    display: block;
    z-index: 9999;
    position: relative;
}

.wp-block-button__link {
	background-color: #226161; 
}

/* Container to align items to the RIGHT */
.top-bar-inner {
    display: flex;
    justify-content: flex-end; 
    align-items: center;
    max-width: 1200px; 
    margin: 0 auto;
    padding-right: 20px; 
    padding-left: 20px;
}

/* Icon Styling */
#custom-top-bar a {
    color: #fff;
    text-decoration: none;
    margin-left: 20px; /* Space between icons */
    font-size: 16px;
    transition: color 0.3s ease;
}

/* Hover Effect */
#custom-top-bar a:hover {
    color: #cccccc; /* Light grey on hover */
    opacity: 0.8;
}

/* Mobile Adjustments for Header */
@media (max-width: 768px) {
    .top-bar-inner {
        justify-content: center; /* Center on mobile */
    }
}

/* =========================================
   2. CONSORTIUM PILLS
   ========================================= */

.pills-container {
    padding-bottom: 30px;
    position: sticky;
    top: 0; 
    z-index: 999;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: center;
}

.pill {
    padding: 10px 20px;
    background-color: #236161;
    color: white !important; /* Use !important to override theme link colors */
    border-radius: 36px;
    cursor: pointer;
    transition: background-color 0.3s;
    font-family: sans-serif;
    font-size: 14px;
    border: none;
    outline: none;
    text-decoration: none;
}

.pill:hover {
    background-color: #113030;
}

/* =========================================
   3. GENERAL PANEL & ACCORDION STYLES
   ========================================= */

.panel {
    margin-bottom: 36px;
    background-color: #fff;
    border: 1px solid transparent;
    border-radius: 4px;
    -webkit-box-shadow: 0 1px 1px rgba(0, 0, 0, .05);
    box-shadow: 0 1px 1px rgba(0, 0, 0, .05);
}

.panel-body {
    padding: 15px;
}

.panel-heading {
    padding: 10px 15px;
    border-bottom: 1px solid transparent;
    border-top-left-radius: 3px;
    border-top-right-radius: 3px;
}

.panel-title {
    margin-top: 0;
    margin-bottom: 0;
    font-weight: 500;
    color: inherit;
}

.panel-title > a,
.panel-title > small,
.panel-title > .small,
.panel-title > small > a,
.panel-title > .small > a {
    color: inherit;
}

.panel-footer {
    padding: 10px 15px;
    background-color: #f5f5f5;
    border-top: 1px solid #ddd;
    border-bottom-right-radius: 3px;
    border-bottom-left-radius: 3px;
}

.panel-group {
    margin-bottom: 20px;
}

.panel-group .panel {
    margin-bottom: 0;
    border-radius: 4px;
}

.panel-group .panel + .panel {
    margin-top: 5px;
}

.panel-group .panel-heading {
    border-bottom: 0;
}

.panel-group .panel-heading + .panel-collapse > .panel-body,
.panel-group .panel-heading + .panel-collapse > .list-group {
    border-top: 1px solid #ddd;
}

.panel-group .panel-footer {
    border-top: 0;
}

.panel-group .panel-footer + .panel-collapse .panel-body {
    border-bottom: 1px solid #ddd;
}

.panel-default {
    border-color: #ddd;
}

.panel-default > .panel-heading {
    color: #333;
    background-color: #f5f5f5;
    border-color: #ddd;
}

.panel-default > .panel-heading + .panel-collapse > .panel-body {
    border-top-color: #ddd;
}

.panel-default > .panel-heading .badge {
    color: #f5f5f5;
    background-color: #333;
}

.panel-default > .panel-footer + .panel-collapse > .panel-body {
    border-bottom-color: #ddd;
}

.ac_title_class {
    line-height: 24px;
}

/* =========================================
   4. NEW: OBJECTIVES 2-COLUMN GRID
   ========================================= */

/* Replace .page-id-123 with your actual Page ID (e.g., .page-id-45) */
.page-id-501 .panel-group {
    display: grid;
    grid-template-columns: 1fr 1fr; /* Two equal columns */
    gap: 20px; /* Space between the rectangles */
}

/* Ensure individual panels fill their column */
.page-id-501 .panel-group .panel {
    width: 100%;
    margin-bottom: 0; 
}

/* Mobile Responsiveness: Switch back to 1 column on screens smaller than 768px */
@media (max-width: 768px) {
    .page-id-501 .panel-group {
        grid-template-columns: 1fr;
    }
}

/* =========================================
   5. PUBLICATIONS TABLE
   ========================================= */

.publications-table tr {
    border-top: none !important;
}

.publications-table tr {
    border-bottom: 1px solid #e0e0e0; 
}

.publications-table td:first-child {
    width: 40px; 
    vertical-align: top; 
    padding-top: 15px; 
}

/* =========================================
   6. MODAL STYLES
   ========================================= */

.modal-open {
    overflow: hidden;
}

.modal {
    display: none;
    overflow: hidden;
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    z-index: 1050;
    -webkit-overflow-scrolling: touch;
    outline: 0;
}

.modal.fade .modal-dialog {
    -webkit-transform: translate(0, -25%);
    -ms-transform: translate(0, -25%);
    -o-transform: translate(0, -25%);
    transform: translate(0, -25%);
    -webkit-transition: -webkit-transform 0.3s ease-out;
    -o-transition: -o-transform 0.3s ease-out;
    transition: transform 0.3s ease-out;
}

.modal.in .modal-dialog {
    -webkit-transform: translate(0, 0);
    -ms-transform: translate(0, 0);
    -o-transform: translate(0, 0);
    transform: translate(0, 0);
}

.modal-open .modal {
    overflow-x: hidden;
    overflow-y: auto;
}

.modal-dialog {
    position: relative;
    width: auto;
    margin: 10px;
}

.modal-content {
    position: relative;
    background-color: #ffffff;
    border: 1px solid #999999;
    border: 1px solid rgba(0, 0, 0, 0.2);
    border-radius: 6px;
    -webkit-box-shadow: 0 3px 9px rgba(0, 0, 0, 0.5);
    box-shadow: 0 3px 9px rgba(0, 0, 0, 0.5);
    -webkit-background-clip: padding-box;
    background-clip: padding-box;
    outline: 0;
}

.modal-backdrop {
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    z-index: 1040;
    background-color: #000000;
}

.modal-backdrop.fade {
    opacity: 0;
    filter: alpha(opacity=0);
}

.modal-backdrop.in {
    opacity: 0.5;
    filter: alpha(opacity=50);
}

.modal-header {
    padding: 15px;
    border-bottom: 1px solid #e5e5e5;
}

.modal-header .close {
    margin-top: -2px;
}

.modal-title {
    margin: 0;
    line-height: 1.42857143;
    font-weight: 500;
}

.modal-body {
    position: relative;
    padding: 15px;
}

.modal-footer {
    padding: 15px;
    text-align: right;
    border-top: 1px solid #e5e5e5;
}

.modal-footer .btn + .btn {
    margin-left: 5px;
    margin-bottom: 0;
}

.modal-footer .btn-group .btn + .btn {
    margin-left: -1px;
}

.modal-footer .btn-block + .btn-block {
    margin-left: 0;
}

.modal-scrollbar-measure {
    position: absolute;
    top: -9999px;
    width: 50px;
    height: 50px;
    overflow: scroll;
}

@media (min-width: 768px) {
    .modal-dialog {
        width: 600px;
        margin: 30px auto;
    }
    .modal-content {
        -webkit-box-shadow: 0 5px 15px rgba(0, 0, 0, 0.5);
        box-shadow: 0 5px 15px rgba(0, 0, 0, 0.5);
    }
    .modal-sm {
        width: 300px;
    }
}

@media (min-width: 992px) {
    .modal-lg {
        width: 900px;
    }
}

.clearfix:before,
.clearfix:after,
.modal-header:before,
.modal-header:after,
.modal-footer:before,
.modal-footer:after {
    content: " ";
    display: table;
}

.clearfix:after,
.modal-header:after,
.modal-footer:after {
    clear: both;
}

/* =========================================
   WORK PACKAGES GRID LAYOUT
   ========================================= */

.work-packages-grid {
    display: grid;
    grid-template-columns: 1fr 1fr; /* Create two equal columns */
    gap: 30px; /* Space between columns and rows */
    align-items: start; /* Aligns boxes to the top so they don't stretch weirdly */
}

/* Ensure the panel takes full width of the grid cell */
.work-packages-grid .panel {
    width: 100%;
    height: 100%; /* Optional: Makes panels in the same row equal height */
    margin-bottom: 0; /* Remove default margin as grid gap handles spacing */
}

/* Optional: Make panels flex containers to align footers at the bottom if using height: 100% */
.work-packages-grid .panel {
    display: flex;
    flex-direction: column;
}
.work-packages-grid .panel-body {
    flex-grow: 1;
}

/* Responsive: Switch to 1 column on tablets and mobile phones */
@media (max-width: 768px) {
    .work-packages-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
}

/* Container styling */
.mc-form-wrapper {
    max-width: 450px;
    margin: 20px auto;
    padding: 30px;
    background: #ffffff;
    box-shadow: 0 10px 25px rgba(0,0,0,0.05);
    font-family: inherit; /* Uses your theme's font */
}

/* Group spacing */
.mc-field-group {
    margin-bottom: 20px;
}

/* Labels */
.mc-field-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    font-size: 14px;
    color: #333;
}

.required {
    color: #e74c3c;
}

/* Input Fields */
.mc-form-wrapper input[type="text"],
.mc-form-wrapper input[type="email"] {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 16px;
    transition: all 0.3s ease;
    box-sizing: border-box; /* Critical for layout */
}

.mc-form-wrapper input:focus {
    outline: none;
    border-color: #0073aa; /* Standard WP Blue, change to your brand color */
    box-shadow: 0 0 0 3px rgba(0, 115, 170, 0.1);
}

/* Checkbox Styling */
.mc-checkbox-group {
    margin-bottom: 25px;
}

.checkbox-container {
    display: flex;
    align-items: flex-start;
    cursor: pointer;
    font-size: 13px;
    line-height: 1.4;
    color: #666;
}

.checkbox-container input {
    margin-top: 3px;
    margin-right: 10px;
    cursor: pointer;
}

.checkbox-text a {
    color: #0073aa;
    text-decoration: underline;
}

/* Submit Button */
.mc-button {
    width: 100%;
    background-color: #0073aa; /* Your brand color */
    color: white;
    padding: 14px;
    border: none;
    border-radius: 6px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.3s ease, transform 0.1s ease;
}

.mc-button:hover {
    background-color: #005177;
    transform: translateY(-1px);
}

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