/* General Header Styles */
.header {
    width: auto;
    background-color: #ffffff;
    display: flex;
    justify-content: space-between;
    align-items: left;
    padding: 5% 5%;
    padding-bottom: 0px;
    box-shadow: 0 -2px 5px rgba(0, 0, 0, 0.1);
}

.header-logo-home {
    position: absolute; /* Position the logo absolutely */
    left: 20%;          /* Move it to the center horizontally */
    transform: translateX(-50%); /* Adjust for the logo's width */
    display: flex;
    justify-content: center;
    align-items: center;
    height: 120px; /* Set the height of the Agora logo */
}

.header-logo-index {
    position: absolute; /* Position the logo absolutely */
    left: 50%;          /* Move it to the center horizontally */
    transform: translateX(-50%); /* Adjust for the logo's width */
    display: flex;
    justify-content: center;
    align-items: center;
    height: 120px; /* Set the height of the Agora logo */
}

.header-text-home {
    display: flex;
    flex-direction: column;
    justify-content: space-evenly;
    align-items: flex-end;
    text-align: right;
    margin-left: auto;
    height: 120px;
}

.header-title {
    color: black;
    font-size: 20px;
    font-family: 'Inter', sans-serif;
    font-weight: 400; 
    line-height: 0;
    padding-bottom: 0px;
    margin-bottom: 0;
}
.header-logo-img {
    max-height: 110px;   /* Adjust as needed */
    width: auto;
    display: block;
}

.ueber-agora-btn {
    background: url('../imgs/Jigsaw-Blue.png') center center no-repeat;
    background-size: contain;
    border: none;
    color: #fff;
    font-size: 1.2em;
    font-weight: bold;
    width: 190px;      /* Make button larger, adjust as needed */
    height: 160px;     /* Make button larger, adjust as needed */
    cursor: pointer;
    position: relative;
    box-shadow: none;
    outline: none;
    display: block;
    align-items: center;
    justify-content: center;
}

.ueber-agora-btn-text {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 2;
    text-shadow: 0 1px 4px rgba(0,0,0,0.25);
    color: #fff;
    font-weight: bold;
    font-size: 1.2em;
    pointer-events: none;
}

.ueber-agora-modal {
    position: fixed;
    z-index: 1001;
    left: 0; top: 0; width: 100vw; height: 100vh;
    background: rgba(0,0,0,0.4);
    display: flex;
    align-items: center;
    justify-content: center;
}
.ueber-agora-modal-content {
    background: #fff;
    padding: 32px 24px;
    border-radius: 8px;
    max-width: 420px;
    width: 90vw;
    box-shadow: 0 2px 16px rgba(0,0,0,0.2);
    position: relative;
}
.ueber-agora-modal-close {
    position: absolute;
    top: 12px;
    right: 16px;
    font-size: 28px;
    font-weight: bold;
    color: #888;
    cursor: pointer;
}
.ueber-agora-modal-content h2, .ueber-agora-modal-content h3 {
    margin-top: 0;
}

/* Header Links */
.header-links {
    display: flex;
    flex-direction: column; /* Stack the flags and text vertically */
    gap: 10px; /* Add spacing between each flag and text */
    align-items: flex-end; /* Align the flags and text to the right */
}

.header-link {
    display: flex;
    align-items: center;
    text-decoration: none;
    color: black;
    gap: 10px; /* Add spacing between the flag and the text */
}

.header-link img {
    height: auto; /* Set a consistent height for all flags */
    width: 30px;
}

.header-link span {
    font-size: 20px; /* Match the font size of "National Agoras" */
    font-family: 'Inter', sans-serif;
    font-weight: 700;
    text-align: right; /* Align the text to the right */
}

/* Responsive Styles */
@media (max-width: 768px) {
    .header {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }

    .header-link img {
        height: 20px; /* Adjust flag size for smaller screens */
    }

    .header-link span {
        font-size: 20px; /* Adjust font size for smaller screens */
    }
}

/* Responsive Styles */
@media screen and (max-width: 768px) {
    .header {
        flex-direction: column;
        padding: 15px;
    }
    
    .header-links {
        justify-content: center;
    }
}

/* For very small screens */
@media screen and (max-width: 480px) {
    .header-title {
        font-size: 18px;
    }
    
    .header-link span {
        font-size: 12px;
    }
    
    .header-link img {
        height: 20px;
    }
}
/* General Footer Styles */
.footer {
    background-color: #ffffff;
    padding: 0; /* Remove padding here to avoid conflicts */
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    box-shadow: 0 -2px 5px rgba(0, 0, 0, 0.1);
    margin-top: auto;
    position: relative;
    bottom: 0;
    z-index: 1000;
    width: 100%;
}

/* Footer Top Section */
.footer .top-section {
    display: flex;
    align-items: center;
    justify-content: space-around; /* Changed from space-between to space-around */
    padding: 20px 30px; /* Reduced horizontal padding from 50px to 30px */
    gap: 15px; /* Reduced gap from 20px to 15px */
    width: 100%;
    box-sizing: border-box;
}

.footer .top-section .democrat-logo {
     flex: 0 0 auto;
    max-height: 100px;
    width: auto;
}

.footer .catalan-logo-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    flex: 0 0 auto;
}

.footer .catalan-logo {
    /* Catalan Department of Education logo */
    flex: 0 0 auto;
    max-height: 50px;
    width: auto;
    object-fit: contain;
}

.footer .funding-container {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 15px;
    max-width: 40%; /* Increased from 50% to 60% to use more space */
}

.footer .europe-flag {
    flex: 0 0 auto;
    width: 150px;
    height: auto;
}

.footer .funding-text {
    flex: 1;
    font-size: 12px;
    line-height: 1.4;
    text-align: left;
}

.footer .catcollab {
    font-size: 13px; /* Change this value to your desired size */
    font-style: italic;
    color: #666;
    text-align: center;
    display: block;
    margin-top: 5px;
}

/* Footer Bottom Section */
.footer .bottom-section {
    padding: 10px 50px 20px 50px;
    text-align: center;
    width: 100%;
    box-sizing: border-box;
    position: relative;
}

.footer .bottom-section span {
    font-size: 12px;
    color: #666;
}

.footer .bottom-section a {
    font-size: 12px;
    color: #0056b3;
    text-decoration: none;
}

.footer .bottom-section a:hover {
    text-decoration: underline;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .footer .top-section {
        flex-direction: column;
        text-align: center;
        gap: 15px;
        padding: 20px;
    }
    
    .footer .funding-container {
        max-width: 100%;
        flex-direction: column;
        gap: 10px;
    }
    
    .footer .catalan-logo {
        max-width: 120px;
        max-height: 50px;
    }
    
    .footer .bottom-section {
        padding: 10px 20px 20px 20px;
    }
}

/* Hamburger Menu */
.hamburger-menu {
    display: none;
    cursor: pointer;
    position: absolute;
    top: 20px;
    right: 20px;
    z-index: 100;
}
.hamburger-menu span {
    display: block;
    width: 25px;
    height: 3px;
    background-color: #000;
    margin: 5px 0;
    transition: all 0.3s;
}

/* Show menu by default on desktop */
.header-nav {
    display: block !important;
    width: auto;
    background: #fff;
    box-shadow: 0 2px 6px rgba(0,0,0,0.03);
    z-index: 10;
    padding-left: 20%;
}

.header-nav ul {
    display: flex;
    justify-content: center;
    gap: 32px;
    margin: 0;
    padding: 0;
    list-style: none; /* Remove the dots! */
}
.header-nav li {
    margin: 0;
    list-style: none !important;
}
.header-nav a {
    display: block;
    padding: 16px 10px;
    color: #222;
    text-decoration: none;
    font-weight: 500;
    font-size: 1.08rem;
    transition: color 0.2s;
}
.header-nav a:hover {
    color: #007bff;
}

/* Responsive Styles */
@media screen and (max-width: 768px) {
    .header {
        flex-direction: column;
        padding: 15px;
    }
    .hamburger-menu {
        display: block;
    }
    .header-nav {
        display: none;
        width: 100%;
    }
    .header-nav.active {
        display: block;
    }
    .header-nav ul {
        flex-direction: column;
        text-align: center;
        padding: 0;
    }
    .header-nav li {
        margin: 10px 0;
        list-style: none;
    }
    .hamburger-menu.active span:nth-child(1) {
        transform: rotate(45deg) translate(5px, 6px);
    }
    .hamburger-menu.active span:nth-child(2) {
        opacity: 0;
    }
    .hamburger-menu.active span:nth-child(3) {
        transform: rotate(-45deg) translate(5px, -6px);
    }
}