/* General Styles */
/* Added box-sizing for consistent layout behavior */
* {
    box-sizing: border-box;
}

body {
    font-family: Arial, sans-serif;
    line-height: 1.6;
    margin: 0;
    padding: 0;
    background-color: #f8f9fa; /* Light background */
    color: #333; /* Dark text color */
}

.header, .footer {
    background-color: #007bff; /* Bootstrap primary color */
    color: white;
}

/* --- Navigation Styles --- */
.main-nav {
    background-color: #f8f9fa; 
    padding: 0;
    border-bottom: 1px solid #dee2e6;
}

/* 
 * Styling for 'ul' inside .main-nav, as {% show_menu %} generates a <ul>.
*/
.main-nav ul {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    justify-content: flex-start;
    align-items: center;
    flex-wrap: wrap; /* Allows nav items to wrap on small screens */
}

.main-nav li {
    margin: 0;
}

.main-nav a {
    display: inline-block;
    padding: 15px 20px;
    color: #212529; 
    text-decoration: none;
    line-height: 1;
    font-weight: 500;
    border-bottom: 3px solid transparent; /* For an active/hover effect */
    transition: all 0.2s ease-in-out;
}

.main-nav a:hover {
    background-color: #e9ecef;
    border-bottom-color: #ced4da;
}

/* Styling for the currently active page (Django CMS adds the 'selected' class) */
.main-nav li.selected a {
    color: #007bff;
    border-bottom-color: #007bff;
}
/* --- End of Navigation CSS --- */

/* Hero Section */
.hero {
    background-color: #e9ecef;
    padding: 40px 20px;
    text-align: center;
}

.hero__title {
    font-size: 2.5rem;
    margin-bottom: 10px;
    color: white;
    background-color: #003366;
}

.hero__description {
    font-size: 1.25rem;
    margin-bottom: 20px;
}

.hero__image-container {
    margin-top: 20px;
}

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

/* Content Wrapper */
.content-wrapper {
    max-width: 80vw;
    margin: 20px auto;
    padding: 20px;
    background-color: whitesmoke;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

/* Remove background from subsequent content wrappers */
.content-wrapper:nth-of-type(n+2) {
    background-color: transparent; 
}

/* Section Titles (Consolidated) */
.section-title {
    font-size: 2.2rem;
    margin-bottom: 1rem;
    color: white;
    background-color: #003366;
}

/* About Section Card */
.card--about {
    background-color: #f1f1f1;
    padding: 20px;
    border-radius: 8px;
    margin-top: 20px;
}

/* --- Team Profiles Section (Grid Layout) --- */
/* Updated selector from .profile-grid to .profiles-placeholder to match HTML */
.profiles-placeholder { 
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 2rem;
    padding: 2rem 1rem;
    justify-items: center; /* ALIGNMENT FIX: Centers items in their grid cell */
    align-items: start;
    background-color: #fafafa;
}
  
/* --- Each Profile Card --- */
/* Updated selector from .profile-card to .profile to match HTML */
.profile { 
    background: #fff;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
    text-align: center;
    width: 100%;
    max-width: 280px;
}
  
.profile:hover {
    transform: translateY(-6px);
    box-shadow: 0 6px 18px rgba(0,0,0,0.12);
}
  
/* --- Profile Image Handling --- */
.profile img {
    /* ROUND EDGES FIX: Added border-radius 50% */
    border-radius: 50%; 
    width: 180px; /* Specific width */
    height: 180px; /* Specific height */
    object-fit: cover; /* ensures faces fill the frame neatly */
    display: block;
    margin: 0 auto 1rem; /* Centering and spacing */
    border: 3px solid #ddd; /* Border styling */
}

/* --- Name and Position Text --- */
.profile h3 {
    font-size: 1.1rem;
    margin: 0.8rem 0 0.3rem;
    color: #222;
}
  
.profile p {
    color: #666;
    font-size: 0.9rem;
    margin-bottom: 1rem;
  }
  
  /* --- Message for Empty State --- */
  .no-members-message {
    text-align: center;
    color: #888;
    font-style: italic;
    grid-column: 1 / -1;
  }

/* FAQ Section */
.faq {
    background-color: darkseagreen;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    margin: 20px 0;
    font-family: Arial, sans-serif;
    color: #333;
}

.faq dt {
    font-weight: bold;
    margin-top: 1rem;
}

.faq dd {
    margin-left: 0;
    padding-left: 1rem;
}

/* Brand Styles */
.brand {
    display: flex;
    align-items: center;
    text-decoration: none;
    color: #333;
    padding: 10px;
}

.brand img {
    max-width: 20px;
    margin-right: 10px;
}

.establishment {
    background-color: rgba(255, 255, 0, 0.7);
    color: black;
    font-style: italic;
    padding: 2px 5px;
    border-radius: 3px;
    margin-left: 5px;
}

/* News Section */
.news-container {
    padding: 20px;
    background-color: #ffffff;
    border-radius: 5px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.news-title {
    font-size: 1.5em;
    margin-bottom: 10px;
}

.news-intro {
    margin-bottom: 15px;
    color: #555;
}

.news-sources {
    list-style-type: none;
    padding: 0;
}

.news-sources li {
    margin-bottom: 8px;
}

.news-sources a {
    text-decoration: none;
    color: #007bff;
    transition: color 0.3s;
}

.news-sources a:hover {
    color: #0056b3;
}

/* Footer */
.main-footer {
    background-color: #b1cae5;
    color: #333; /* Improved contrast */
    text-align: center;
    padding: 20px 0;
}

/* Responsive Design */
@media (max-width: 768px) {
    /* Updated selector to use .main-nav consistently */
    .main-nav ul { 
        flex-direction: column;
    }
    .main-nav a {
        padding: 15px;
        text-align: center;
    }
}
