/*
 * AVIVO Section Interjurassienne - Main Stylesheet
 */

/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    font-size: 16px;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f9f9f9;
    overflow-x: hidden;
}

/* Color Scheme */
:root {
    --primary-color: #2c5a2a;
    --secondary-color: #45a049;
    --accent-color: #f39c12;
    --dark-color: #333;
    --light-color: #f9f9f9;
    --border-color: #ddd;
    --success-color: #28a745;
    --danger-color: #dc3545;
    --warning-color: #ffc107;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    color: var(--primary-color);
    margin: 1.5rem 0 0.75rem 0;
}

h1 {
    font-size: 2.5rem;
}

h2 {
    font-size: 2rem;
}

h3 {
    font-size: 1.5rem;
}

p {
    margin-bottom: 1rem;
}

a {
    color: var(--secondary-color);
    text-decoration: none;
    transition: color 0.3s ease;
}

a:hover {
    color: var(--primary-color);
    text-decoration: underline;
}

/* Container and Layout */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
}

.row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(300px, 100%), 1fr));
    gap: 2rem;
}

.row.two-column {
    grid-template-columns: 1fr 1fr;
}

.col-md-8 {
    grid-column: span 2;
}

.col-md-4 {
    grid-column: span 1;
}

@media (max-width: 768px) {
    .col-md-8,
    .col-md-4 {
        grid-column: span 1;
    }
}

/* Utilities */
.py-5 {
    padding: 3rem 0;
}

.mt-5 {
    margin-top: 3rem;
}

.mb-3 {
    margin-bottom: 1rem;
}

.text-center {
    text-align: center;
}

.text-muted {
    color: #666;
    font-size: 0.9rem;
}

/* Header and Navigation */
header {
    background-color: white;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    position: sticky;
    top: 0;
    z-index: 100;
}

.navbar {
    background-color: white;
    padding: 1rem 0;
    position: relative;
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-logo {
    display: flex;
    align-items: center;
    font-weight: bold;
    font-size: 1.5rem;
}

.logo-link {
    color: var(--primary-color);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 1.5rem;
    flex: 1;
    margin: 0 2rem;
}

.nav-item {
    position: relative;
}

.nav-link {
    color: var(--dark-color);
    font-weight: 500;
    transition: color 0.3s ease;
}

.nav-link:hover {
    color: var(--secondary-color);
    text-decoration: none;
}

.nav-item.active > .nav-link {
    color: var(--secondary-color);
    border-bottom: 2px solid var(--secondary-color);
}

/* Dropdown Menu */
.dropdown {
    position: relative;
    padding-bottom: 0.5rem;
    margin-bottom: -0.5rem;
}

.dropdown-toggle::after {
    content: ' ▼';
    font-size: 0.7rem;
}

.dropdown-menu {
    display: none;
    position: absolute;
    top: calc(100% + 0.5rem);
    left: -1rem;
    padding-top: 0;
    background-color: white;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    list-style: none;
    min-width: 200px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    z-index: 1000;
}

/* Invisible hover bridge above the dropdown to prevent gap */
.dropdown-menu::before {
    content: '';
    position: absolute;
    top: -20px;
    left: 0;
    right: 0;
    height: 20px;
    background: transparent;
}

.dropdown:hover > .dropdown-menu {
    display: block;
}

.dropdown-link {
    display: block;
    padding: 0.75rem 1rem;
    color: var(--dark-color);
    transition: background-color 0.3s ease;
    text-decoration: none;
}

.dropdown-link:hover {
    background-color: var(--light-color);
    color: var(--secondary-color);
    text-decoration: none;
}

/* Right Navigation */
.nav-right {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.connexion-link {
    color: var(--dark-color);
    font-weight: 500;
}

/* Mobile-only items: hidden on desktop */
.mobile-only {
    display: none;
}

/* Hamburger Menu */
.hamburger {
    display: none;
    flex-direction: column;
    cursor: pointer;
    gap: 5px;
}

.hamburger span {
    width: 25px;
    height: 3px;
    background-color: var(--dark-color);
    border-radius: 2px;
    transition: all 0.3s ease;
}

@media (max-width: 768px) {
    .nav-menu {
        display: none;
        position: absolute;
        top: 60px;
        left: 0;
        width: 100%;
        background-color: white;
        flex-direction: column;
        gap: 0;
        margin: 0;
        border-top: 1px solid var(--border-color);
    }

    .nav-menu.active {
        display: flex;
    }

    .nav-item {
        width: 100%;
    }

    .nav-link {
        display: block;
        padding: 1rem;
        border-bottom: 1px solid var(--border-color);
    }

    .hamburger {
        display: flex;
    }

    .hamburger.active span:nth-child(1) {
        transform: translateY(8px) rotate(45deg);
    }

    .hamburger.active span:nth-child(2) {
        opacity: 0;
    }

    .hamburger.active span:nth-child(3) {
        transform: translateY(-8px) rotate(-45deg);
    }

    .nav-right {
        display: none;
    }

    /* Mobile dropdown: open on click via .open class */
    .dropdown-menu {
        position: static;
        box-shadow: none;
        border: none;
        border-radius: 0;
        min-width: 0;
        background-color: #f5f5f5;
    }

    .dropdown-menu::before {
        display: none;
    }

    .dropdown:hover > .dropdown-menu {
        display: none;
    }

    .dropdown.open > .dropdown-menu {
        display: block;
    }

    .dropdown-link {
        padding: 0.75rem 2rem;
        border-bottom: 1px solid var(--border-color);
    }

    /* Mobile-only nav items (Adhesion + Connexion) */
    .mobile-only {
        display: block;
    }

    .mobile-nav-adhesion .nav-link {
        color: var(--secondary-color);
        font-weight: 600;
    }

    .mobile-nav-connexion .nav-link {
        color: #666;
    }
}

/* Hero Section */
.hero {
    background: var(--primary-color);
    color: white;
    padding: 0;
    text-align: center;
    position: relative;
    min-height: 65vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background-size: cover;
    background-position: center;
    overflow: hidden;
}

/* Dark overlay for text readability on photo */
.hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.35);
    z-index: 1;
}

.hero-content {
    position: relative;
    z-index: 2;
    padding: 3rem 1rem;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.5);
}

.hero-content h1 {
    color: white;
    margin-bottom: 1rem;
    font-size: 2.8rem;
}

.hero-content p {
    font-size: 1.3rem;
    margin-bottom: 0;
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 4px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    text-align: center;
}

.btn-primary {
    background-color: var(--secondary-color);
    color: white;
}

.btn-primary:hover {
    background-color: var(--primary-color);
    color: white;
}

.btn-green {
    background-color: var(--secondary-color);
    color: white;
}

.btn-green:hover {
    background-color: var(--primary-color);
    color: white;
}

.btn-light {
    background-color: white;
    color: var(--primary-color);
    border: 2px solid white;
}

.btn-light:hover {
    background-color: var(--light-color);
}

.btn-sm {
    padding: 0.5rem 1rem;
    font-size: 0.9rem;
}

.btn-lg {
    padding: 1rem 2rem;
    font-size: 1.1rem;
}

/* Cards */
.card {
    background-color: white;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 1.5rem;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.card h3 {
    margin-top: 0;
}

/* Forms */
.form-group {
    margin-bottom: 1.5rem;
}

label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: var(--dark-color);
}

input[type="text"],
input[type="email"],
input[type="tel"],
input[type="date"],
textarea,
select {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    font-family: inherit;
    font-size: 1rem;
    transition: border-color 0.3s ease;
}

input[type="text"]:focus,
input[type="email"]:focus,
input[type="tel"]:focus,
input[type="date"]:focus,
textarea:focus,
select:focus {
    outline: none;
    border-color: var(--secondary-color);
    box-shadow: 0 0 0 3px rgba(69, 160, 73, 0.1);
}

.form-group.checkbox input[type="checkbox"] {
    width: auto;
    margin-right: 0.5rem;
}

.form-group.checkbox label {
    display: inline;
    margin-bottom: 0;
}

/* Alerts */
.alert {
    padding: 1rem;
    border-radius: 4px;
    margin-bottom: 1.5rem;
}

.alert-success {
    background-color: #d4edda;
    border: 1px solid #c3e6cb;
    color: #155724;
}

.alert-danger {
    background-color: #f8d7da;
    border: 1px solid #f5c6cb;
    color: #721c24;
}

.alert-warning {
    background-color: #fff3cd;
    border: 1px solid #ffeeba;
    color: #856404;
}

/* Footer */
footer {
    background-color: #f5f5f5;
    border-top: 1px solid var(--border-color);
    margin-top: 0;
}

.footer-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 3rem 1rem;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
}

.footer-column h3 {
    margin-top: 0;
    color: var(--primary-color);
}

.schedule-table {
    width: 100%;
    border-collapse: collapse;
}

.schedule-table td {
    padding: 0.5rem;
    border-bottom: 1px solid var(--border-color);
}

.schedule-table .day {
    font-weight: 600;
    width: 100px;
}

.footer-form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.footer-form .form-group {
    margin-bottom: 0;
}

.social-links {
    margin-top: 1rem;
    display: flex;
    gap: 1rem;
}

.social-links a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background-color: var(--secondary-color);
    color: white;
    border-radius: 50%;
    transition: background-color 0.3s ease;
}

.social-links a:hover {
    background-color: var(--primary-color);
}

.footer-copyright {
    background-color: var(--primary-color);
    color: white;
    text-align: center;
    padding: 1.5rem;
    font-size: 0.9rem;
}

/* CTA Section */
.cta-section {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    padding: 3rem 1rem;
    text-align: center;
}

.cta-container {
    max-width: 1200px;
    margin: 0 auto;
}

.cta-section h2 {
    color: white;
    margin-bottom: 2rem;
}

/* Lists */
ul, ol {
    margin: 1rem 0 1rem 2rem;
}

li {
    margin-bottom: 0.5rem;
}

/* Special Sections */
.bulletin-item,
.event-item,
.committee-member {
    background-color: white;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    border-left: 4px solid var(--secondary-color);
    border-radius: 4px;
}

/* Event with image: default side-by-side layout (landscape) */
.event-item {
    display: flex;
    gap: 1.5rem;
    align-items: flex-start;
}

.event-image {
    flex-shrink: 0;
    width: 220px;
    border-radius: 6px;
    overflow: hidden;
}

.event-image img {
    width: 100%;
    height: auto;
    object-fit: contain;
    display: block;
    border-radius: 6px;
}

/* Landscape images: constrain height for a clean side-by-side look */
.event-item.event-landscape .event-image img {
    max-height: 180px;
    object-fit: cover;
}

.event-content {
    flex: 1;
    min-width: 0;
}

/* Portrait/flyer images: image centered above text */
.event-item.event-portrait {
    flex-direction: column;
    align-items: center;
}

.event-item.event-portrait .event-image {
    width: 100%;
    max-width: 320px;
    margin-bottom: 0.5rem;
}

.event-item.event-portrait .event-image img {
    max-height: 420px;
    object-fit: contain;
}

.event-item.event-portrait .event-content {
    text-align: center;
    width: 100%;
}

/* Mobile: always stack vertically */
@media (max-width: 600px) {
    .event-item {
        flex-direction: column;
        align-items: center;
    }

    .event-image {
        width: 100%;
        max-width: 300px;
    }

    .event-image img {
        max-height: 350px;
    }

    .event-item.event-portrait .event-image {
        max-width: 280px;
    }
}

.bulletin-item h2,
.event-item h3 {
    color: var(--primary-color);
    margin-top: 0;
}

.bulletin-date,
.event-date,
.event-location {
    color: #666;
    font-size: 0.9rem;
    margin-bottom: 1rem;
}

.committee-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(250px, 100%), 1fr));
    gap: 2rem;
    margin: 2rem 0;
}

.member-card {
    background-color: white;
    padding: 1.5rem;
    border-radius: 8px;
    text-align: center;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.member-card h3 {
    color: var(--secondary-color);
}

.member-name {
    font-weight: 600;
    font-size: 1.1rem;
}

.member-role {
    color: #666;
    font-size: 0.9rem;
}

/* Links Grid */
.links-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(300px, 100%), 1fr));
    gap: 2rem;
    margin: 2rem 0;
}

.link-category {
    background-color: white;
    padding: 1.5rem;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.link-category h2 {
    font-size: 1.3rem;
    margin-top: 0;
}

.link-category ul {
    margin: 0;
    list-style: none;
}

.link-category li {
    margin-bottom: 0.5rem;
}

/* Links inside partner cards: only non-button links get green color */
.link-category a:not(.btn) {
    color: var(--primary-color);
    font-weight: 500;
    text-decoration: underline;
}

.link-category a:not(.btn):hover {
    color: var(--secondary-color);
}

/* Ensure buttons inside link cards keep their own colors */
.link-category .btn {
    color: white !important;
}

/* Error Container */
.error-container {
    padding: 3rem;
    background-color: white;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.error-container h1 {
    color: var(--danger-color);
}

/* Responsive */
@media (max-width: 768px) {
    h1 {
        font-size: 1.8rem;
    }

    h2 {
        font-size: 1.4rem;
    }

    .hero {
        min-height: 40vh;
    }

    .hero-content h1 {
        font-size: 1.6rem;
    }

    .hero-content p {
        font-size: 1rem;
    }

    .footer-container {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .cta-container h2 {
        font-size: 1.5rem;
    }

    .row {
        grid-template-columns: 1fr;
    }

    .row.two-column {
        grid-template-columns: 1fr;
    }

    .col-md-8,
    .col-md-4 {
        grid-column: auto;
    }

    .page-content {
        padding: 1.25rem;
    }

    /* Tables: horizontal scroll on small screens */
    .presidents-table,
    .schedule-table {
        display: block;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    .py-5 {
        padding: 2rem 0;
    }

    .container {
        padding: 0 0.75rem;
    }
}

/* Logo Image */
.logo-img {
    height: 50px;
    width: auto;
}

/* Dropdown Menu Gap Fix - handled in main dropdown section above */

/* Blasons Section */
.blasons-section {
    background-color: white;
    padding: 1.5rem 0;
    border-bottom: 1px solid var(--border-color);
}

.blasons-row {
    display: flex;
    flex-direction: row;
    justify-content: center;
    align-items: center;
    gap: 3rem;
    flex-wrap: wrap;
}

.blason-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.blason-item img {
    height: 60px;
    width: auto;
    margin-bottom: 0.5rem;
}

.blason-item span {
    font-size: 0.85rem;
    color: var(--primary-color);
    font-weight: 500;
}

.blason-divider {
    width: 1px;
    height: 50px;
    background-color: var(--border-color);
    margin: 0 0.5rem;
}

.blason-stat {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    font-size: 0.85rem;
    color: var(--primary-color);
    font-weight: 500;
}

.blason-stat-number {
    font-size: 1.6rem;
    font-weight: 700;
    color: var(--secondary-color);
    line-height: 1.2;
    margin-bottom: 0.2rem;
}

/* Stats Grid */
.stats-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    margin: 2rem 0;
}

.stat-item {
    background-color: white;
    padding: 2rem;
    border-radius: 8px;
    text-align: center;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.stat-number {
    font-size: 2.5rem;
    font-weight: bold;
    color: var(--secondary-color);
    margin-bottom: 0.5rem;
}

.stat-label {
    font-size: 0.9rem;
    color: #666;
}

/* Bulletin Page Styles */
.bulletin-year-group {
    margin-bottom: 2rem;
}

.bulletin-year-title {
    font-size: 1.3rem;
    font-weight: 600;
    border-left: 4px solid var(--secondary-color);
    padding-left: 1rem;
    margin-bottom: 1rem;
    color: var(--primary-color);
}

.bulletins-grid {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.bulletin-card {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 1rem;
    background-color: white;
    padding: 1rem;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.bulletin-card-icon {
    font-size: 1.5rem;
    color: var(--secondary-color);
    flex-shrink: 0;
}

.bulletin-card-info {
    flex: 1;
}

.bulletin-card-button {
    flex-shrink: 0;
}

/* Photo Gallery */
.photo-gallery {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
    margin: 2rem 0;
}

.gallery-item {
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.gallery-item .gallery-lightbox-trigger {
    position: relative;
    display: block;
    cursor: pointer;
}

.gallery-item .gallery-lightbox-trigger:hover .gallery-image-zoom {
    opacity: 1;
}

.gallery-image-zoom {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(0,0,0,0.5);
    color: #fff;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
}

.gallery-item img {
    width: 100%;
    height: 300px;
    object-fit: cover;
    display: block;
}

.gallery-caption {
    padding: 0.75rem;
    background-color: white;
    font-size: 0.85rem;
    color: #666;
    text-align: center;
}

/* Presidents Table */
.presidents-table {
    width: 100%;
    border-collapse: collapse;
    background-color: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.presidents-table thead {
    background-color: var(--secondary-color);
    color: white;
}

.presidents-table th,
.presidents-table td {
    padding: 1rem;
    border-bottom: 1px solid var(--border-color);
    text-align: left;
}

.presidents-table tbody tr:last-child td {
    border-bottom: none;
}

.presidents-table tbody tr:hover {
    background-color: var(--light-color);
}

/* Partner Card Styles */
.partner-card {
    background-color: white;
    padding: 1.5rem;
    border-radius: 8px;
    text-align: center;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.partner-logo {
    margin-bottom: 1rem;
}

.partner-logo img {
    max-height: 80px;
    max-width: 100%;
    width: auto;
    display: inline-block;
    object-fit: contain;
}

/* Past Event Opacity */
.past-event {
    opacity: 0.7;
}

/* Member Photo Circular */
.member-photo {
    margin-bottom: 1rem;
}

.member-photo img {
    width: 160px;
    height: 160px;
    border-radius: 50%;
    object-fit: cover;
    display: block;
    margin: 0 auto;
}

/* Page Content */
.page-content {
    background-color: white;
    padding: 2rem;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    line-height: 1.8;
}

.page-content h2 {
    margin-top: 1.5rem;
    margin-bottom: 0.75rem;
}

.page-content p {
    margin-bottom: 1rem;
    color: #333;
}

.page-content ul,
.page-content ol {
    margin-left: 2rem;
    margin-bottom: 1rem;
}

.page-content li {
    margin-bottom: 0.5rem;
}

/* Homepage Sections Overview */
.sections-overview {
    background-color: #f0f7f0;
    padding: 3rem 0;
}

.sections-overview h2 {
    text-align: center;
    margin-bottom: 2rem;
}

.sections-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1.5rem;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
}

.section-card {
    background-color: white;
    border-radius: 8px;
    padding: 1.5rem;
    text-align: center;
    box-shadow: 0 2px 4px rgba(0,0,0,0.08);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    text-decoration: none;
    display: block;
    color: inherit;
    border-top: 3px solid var(--secondary-color);
}

.section-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 6px 16px rgba(0,0,0,0.12);
    text-decoration: none;
    color: inherit;
}

.section-card .section-icon {
    font-size: 2rem;
    color: var(--secondary-color);
    margin-bottom: 0.75rem;
}

.section-card h3 {
    font-size: 1.1rem;
    margin: 0 0 0.5rem 0;
    color: var(--primary-color);
}

.section-card p {
    font-size: 0.85rem;
    color: #666;
    margin: 0;
    line-height: 1.4;
}

/* Homepage Events Preview */
.events-preview {
    padding: 3rem 0;
}

.events-preview h2 {
    text-align: center;
    margin-bottom: 2rem;
}

.events-preview-list {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
}

/* Homepage Welcome Row */
.welcome-section {
    padding: 3rem 0;
}

.welcome-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 2rem;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
}

/* Partner card in links page */
.partner-card {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    min-height: 200px;
}

.partner-card h2 {
    font-size: 1.1rem;
}

.partner-card p {
    color: #666;
    font-size: 0.9rem;
    flex: 1;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .stats-grid {
        grid-template-columns: 1fr;
    }

    .photo-gallery {
        grid-template-columns: repeat(2, 1fr);
    }

    .presidents-table {
        font-size: 0.9rem;
    }

    .presidents-table th,
    .presidents-table td {
        padding: 0.75rem;
    }

    .blasons-row {
        gap: 1.5rem;
    }

    .bulletin-card {
        flex-direction: column;
        text-align: center;
    }

    .bulletin-card-icon {
        font-size: 1.2rem;
    }

    .member-photo img {
        width: 130px;
        height: 130px;
    }

    .sections-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1rem;
    }

    .welcome-grid {
        grid-template-columns: 1fr;
    }

}

/* Extra small screens (phones < 480px) */
@media (max-width: 480px) {
    h1 {
        font-size: 1.5rem;
    }

    h2 {
        font-size: 1.2rem;
    }

    .hero {
        min-height: 35vh;
    }

    .hero-content h1 {
        font-size: 1.3rem;
    }

    .hero-content p {
        font-size: 0.9rem;
    }

    .sections-grid {
        grid-template-columns: 1fr;
        gap: 0.75rem;
    }

    .photo-gallery {
        grid-template-columns: 1fr;
    }

    .gallery-item img {
        height: 200px;
    }

    .stats-grid {
        gap: 1rem;
    }

    .stat-item {
        padding: 1.25rem;
    }

    .stat-number {
        font-size: 2rem;
    }

    .blasons-row {
        gap: 1rem;
    }

    .blason-item img {
        height: 45px;
    }

    .blason-item span {
        font-size: 0.75rem;
    }

    .btn {
        padding: 0.6rem 1rem;
        font-size: 0.9rem;
    }

    .footer-container {
        padding: 2rem 0.75rem;
    }

    .page-content {
        padding: 1rem;
    }

    .event-image img {
        max-height: 300px;
    }
}

/* ================================
   Popup Modal
   ================================ */
.popup-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.75);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.popup-overlay.popup-visible {
    opacity: 1;
    visibility: visible;
}

.popup-modal {
    position: relative;
    max-width: 90vw;
    max-height: 90vh;
}

.popup-image {
    display: block;
    max-width: 100%;
    max-height: 85vh;
    border-radius: 8px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
}

.popup-close {
    position: absolute;
    top: -15px;
    right: -15px;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: #fff;
    color: #333;
    border: none;
    font-size: 24px;
    font-weight: bold;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
    transition: background-color 0.2s ease;
    z-index: 1;
}

.popup-close:hover {
    background-color: #e74c3c;
    color: #fff;
}

/* ================================
   News / Actualités Section
   ================================ */
.news-section {
    padding: 3rem 5%;
    max-width: 1200px;
    margin: 0 auto;
}

.news-section h2 {
    text-align: center;
    color: var(--primary-color);
    margin-bottom: 2rem;
    font-size: 1.8rem;
}

.news-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 1.5rem;
}

.news-card {
    background: #fff;
    border-radius: 8px;
    padding: 1.5rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    border-left: 4px solid var(--secondary-color);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.news-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
}

.news-card .news-date {
    font-size: 0.85rem;
    color: var(--text-muted, #888);
    margin-bottom: 0.5rem;
}

.news-card h3 {
    color: var(--primary-color);
    margin-bottom: 0.75rem;
    font-size: 1.15rem;
}

.news-card .news-content {
    color: #555;
    font-size: 0.95rem;
    line-height: 1.6;
}

.news-card .news-content p:last-child {
    margin-bottom: 0;
}

.news-card .news-excerpt {
    color: #555;
    font-size: 0.95rem;
    line-height: 1.6;
    margin-bottom: 1rem;
}

.news-card .news-readmore {
    display: inline-block;
    margin-top: auto;
}

/* News detail page */
.news-detail {
    max-width: 800px;
}

.news-detail h1 {
    color: var(--primary-color);
    margin-bottom: 1.5rem;
}

.news-detail-date {
    color: var(--text-muted, #888);
    font-size: 0.9rem;
    margin-bottom: 0.75rem;
}

/* ================================
   Chorale Manager Message Card
   ================================ */
.chorale-message-card {
    background: linear-gradient(135deg, #f0f7f0 0%, #e8f5e9 100%) !important;
    border: 2px solid var(--secondary-color) !important;
    border-radius: 8px;
    padding: 1.5rem;
}

.chorale-message-card h3 {
    color: var(--primary-color);
    margin-bottom: 0.75rem;
}

.chorale-message-content {
    color: #444;
    font-style: italic;
    line-height: 1.7;
}

/* ================================
   Event Image Lightbox
   ================================ */
.event-lightbox-trigger {
    display: block;
    position: relative;
    cursor: pointer;
    text-decoration: none;
}

.event-lightbox-trigger:hover {
    text-decoration: none;
}

.event-image-zoom {
    position: absolute;
    bottom: 8px;
    right: 8px;
    background: rgba(0, 0, 0, 0.6);
    color: #fff;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    opacity: 0;
    transition: opacity 0.2s ease;
    pointer-events: none;
}

.event-lightbox-trigger:hover .event-image-zoom {
    opacity: 1;
}

.event-lightbox-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.85);
    z-index: 10000;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.event-lightbox-overlay.event-lightbox-visible {
    opacity: 1;
    visibility: visible;
}

.event-lightbox-img {
    max-width: 90vw;
    max-height: 85vh;
    object-fit: contain;
    border-radius: 6px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.4);
}

.event-lightbox-caption {
    color: #fff;
    font-size: 1rem;
    margin-top: 1rem;
    text-align: center;
    max-width: 80vw;
}

.event-lightbox-close {
    position: absolute;
    top: 20px;
    right: 20px;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background-color: #fff;
    color: #333;
    border: none;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
    transition: background-color 0.2s ease;
    z-index: 1;
}

.event-lightbox-close:hover {
    background-color: #e74c3c;
    color: #fff;
}

/* ================================
   Responsive adjustments for new features
   ================================ */
@media (max-width: 768px) {
    .news-grid {
        grid-template-columns: 1fr;
    }

    .popup-modal {
        max-width: 95vw;
    }

    .popup-close {
        top: -10px;
        right: -10px;
        width: 35px;
        height: 35px;
        font-size: 20px;
    }

    .news-section {
        padding: 2rem 1rem;
    }

    .event-lightbox-close {
        top: 10px;
        right: 10px;
        width: 38px;
        height: 38px;
        font-size: 24px;
    }
}

