/*
Theme Name: IEC Theme
Template: shapely
*/

:root {
	--polimi-blue: #102c53;
	--polimi-hover: #004b93;
}

/* 1. Header & Container Resets */
.site-header, .main-navigation {
	background: #fff !important;
	padding: 0 !important;
	display: block !important;
	box-shadow: none !important;
}

.branding-wrapper {
	display: flex;
	flex-direction: column;
	align-items: center; /* Center horizontally */
	padding: 20px 0 10px 0;
}

/* 2. Logo and Title Styling */
.iec-logo-center { margin-bottom: 20px; }
.iec-logo-center img { max-height: 70px; width: auto; }

.iec-titles-stack { width: 100%; text-align: center; }

/* The Sandwich Lines for the School Name */
.iec-school-line {
	width: 100%;
	border-top: 1px solid var(--polimi-blue);
	border-bottom: 1px solid var(--polimi-blue);
	padding: 8px 0;
	margin-bottom: 12px;
}

.iec-school-line a, .iec-course-center a {
	color: var(--polimi-blue);
	text-decoration: none;
	display: block;
}

.iec-school-line a { font-size: 16px; }
.iec-course-center a { font-size: 22px; font-weight: 700; }
.iec-thin { font-weight: 300; }

/* --- BLUE BAR & HORIZONTAL MENU --- */
.iec-blue-bar {
    background-color: #102c53 !important;
    width: 100%;
    min-height: 50px;
    display: block !important;
}

ul.iec-horizontal-menu {
    display: flex !important;
    flex-direction: row !important;
    align-items: center;
    list-style: none !important;
    margin: 0 !important;
    padding: 0 !important;
    width: 100%;
}

/* TARGET THE FIRST ITEM (THE ICON) */
ul.iec-horizontal-menu li:first-child {
    margin-right: auto; /* This pushes the icon to the far left */
    flex: 0 1 auto;      /* Prevents the icon from stretching */
}

/* TARGET ALL OTHER ITEMS (CENTERED) */
ul.iec-horizontal-menu li:not(:first-child) {
    flex: 1;            /* Makes other items take equal space */
    text-align: center;
}

ul.iec-horizontal-menu li a {
    color: #ffffff !important;
    text-decoration: none !important;
    text-transform: uppercase;
    font-size: 12px;
    font-weight: 600;
    padding: 15px 20px;
    display: block;
    white-space: nowrap;
}

/* Hover and Active states */
ul.iec-horizontal-menu li a:hover,
ul.iec-horizontal-menu li.current-menu-item a {
    background-color: #004b93 !important;
}

/* Aggiunge spazio ai lati del contenuto principale */
#content .container, 
.main-container {
    padding-left: 50px !important;
    padding-right: 50px !important;
    max-width: 1200px; /* Limita la larghezza massima per migliorare la leggibilità */
    margin: 0 auto !important; /* Centra il blocco nella pagina */
}

/* Regolazione per i dispositivi mobili (riduce lo spazio su schermi piccoli) */
@media (max-width: 768px) {
    #content .container, 
    .main-container {
        padding-left: 20px !important;
        padding-right: 20px !important;
    }
}