@font-face {
    font-family: 'Monotype Corsiva';
    src: url('media/Monotype Corsiva.ttf') format('truetype');
    font-display: swap;
}

/* Reset and base styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --pythias-blue: #1e3a8a;
    --pythias-light-blue: #3b82f6;
    --pythias-gold: #d4af37;
    --pythias-dark-gold: #b8860b;
    --cream: #f8f9fa;
    --dark-gray: #4a5568;
    --near-black: #1a1a1a;
}

body {
    font-family: 'Georgia', 'Times New Roman', serif;
    line-height: 1.6;
    color: var(--dark-gray);
    background-color: white;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

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

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

.logo-container {
    text-align: center;
    padding: 20px 0;
}

.logo {
    height: 80px;
    width: auto;
}

nav ul {
    list-style: none;
    display: flex;
    justify-content: center;
    gap: 30px;
    padding-bottom: 15px;
}

nav a {
    color: var(--pythias-blue);
    text-decoration: none;
    font-weight: 500;
    font-size: 16px;
    transition: color 0.3s ease;
}

nav a:hover,
nav a.active {
    color: var(--pythias-light-blue);
}

/* Main content */
main {
    flex: 1;
    margin: 0;
    padding: 0;
    background: linear-gradient(to bottom, white, var(--cream));
}

.hero {
    padding: 60px 0 40px 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    min-height: calc(100vh - 140px);
}

.fraternity-title {
    font-family: 'Monotype Corsiva', cursive;
    font-size: clamp(3rem, 8vw, 6rem);
    color: var(--pythias-blue);
    text-align: center;
    margin-bottom: 40px;
    font-style: italic;
}

.description {
    max-width: 800px;
    margin: 0 auto 60px;
    text-align: center;
}

.description p {
    font-size: 18px;
    line-height: 1.8;
    color: var(--dark-gray);
}

.group-photo {
    text-align: center;
    margin-bottom: 0;
}

.main-photo {
    max-width: 100%;
    height: auto;
    border-radius: 12px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.2);
    transition: transform 0.3s ease;
}

.main-photo:hover {
    transform: translateY(-5px);
}

/* Contact page styles */
.contact-section {
    padding: 60px 0;
}

.contact-title {
    font-family: 'Monotype Corsiva', cursive;
    font-size: 3rem;
    color: var(--pythias-blue);
    text-align: center;
    margin-bottom: 60px;
}

.board-photo {
    text-align: center;
    margin-bottom: 60px;
}

.board-photo img {
    max-width: 600px;
    width: 100%;
    height: auto;
    border-radius: 12px;
    box-shadow: 0 15px 40px rgba(0,0,0,0.15);
}

.contact-info {
    background-color: white;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    padding: 40px;
    max-width: 800px;
    margin: 0 auto;
}

.board-title {
    font-size: 2rem;
    color: var(--pythias-blue);
    text-align: center;
    margin-bottom: 30px;
}

.board-members {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 30px;
    margin-bottom: 40px;
}

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

.board-member h3 {
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--pythias-blue);
    margin-bottom: 8px;
}

.board-member .role {
    color: var(--pythias-gold);
    font-weight: 500;
    margin-bottom: 12px;
}

.board-member a {
    color: var(--pythias-blue);
    text-decoration: none;
}

.board-member a:hover {
    color: var(--pythias-light-blue);
    text-decoration: underline;
}

.general-contact {
    text-align: center;
    padding-top: 30px;
    border-top: 1px solid #e5e7eb;
}

.general-contact p {
    font-size: 16px;
    margin-bottom: 10px;
}

.general-contact a {
    font-size: 18px;
    font-weight: 600;
    color: var(--pythias-blue);
    text-decoration: none;
}

.general-contact a:hover {
    color: var(--pythias-light-blue);
    text-decoration: underline;
}

/* Instagram/Photos page */
.photos-section {
    padding: 60px 0;
}

.photos-title {
    font-family: 'Monotype Corsiva', cursive;
    font-size: 3rem;
    color: var(--pythias-blue);
    text-align: center;
    margin-bottom: 60px;
}

.instagram-embed {
    background-color: white;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    padding: 40px;
    text-align: center;
    margin-bottom: 60px;
}

.instagram-title {
    font-size: 2rem;
    color: var(--pythias-blue);
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.instagram-icon {
    font-size: 1.5em;
}

.instagram-description {
    font-size: 16px;
    color: var(--dark-gray);
    margin-bottom: 30px;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.instagram-feed-container {
    margin: 30px 0;
}

.instagram-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 20px;
}

.instagram-post {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    cursor: pointer;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.instagram-post:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 30px rgba(0,0,0,0.15);
}

.instagram-post-image {
    position: relative;
    width: 100%;
    height: 250px;
    overflow: hidden;
}

.instagram-post-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.instagram-post:hover .instagram-post-image img {
    transform: scale(1.05);
}

.video-indicator {
    position: absolute;
    top: 10px;
    right: 10px;
    background: rgba(0,0,0,0.7);
    color: white;
    padding: 5px 8px;
    border-radius: 4px;
    font-size: 12px;
}

.instagram-post-caption {
    padding: 15px;
}

.instagram-post-caption p {
    margin: 0;
    font-size: 14px;
    color: var(--dark-gray);
    line-height: 1.4;
}

.instagram-widget-container {
    margin: 30px 0;
    display: flex;
    justify-content: center;
}

.instagram-media {
    margin: 0 auto !important;
    max-width: 540px !important;
}

.instagram-fallback {
    display: none;
    background-color: #f8f9fa;
    border-radius: 8px;
    padding: 40px 20px;
    max-width: 540px;
    margin: 0 auto;
}

.instagram-preview-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 15px;
    margin-bottom: 20px;
}

.instagram-photo-placeholder {
    background: linear-gradient(135deg, #405de6, #5851db, #833ab4, #c13584, #e1306c, #fd1d1d);
    border-radius: 8px;
    padding: 30px 20px;
    color: white;
    text-align: center;
    min-height: 120px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    transition: transform 0.3s ease;
}

.instagram-photo-placeholder:hover {
    transform: translateY(-3px);
}

.instagram-photo-placeholder .photo-icon {
    font-size: 2rem;
    margin-bottom: 10px;
}

.instagram-photo-placeholder p {
    font-size: 14px;
    margin: 0;
    font-weight: 500;
}

.instagram-actions {
    display: flex;
    gap: 15px;
    justify-content: center;
    flex-wrap: wrap;
    margin-top: 30px;
}

.instagram-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 15px 30px;
    text-decoration: none;
    border-radius: 8px;
    font-weight: 500;
    transition: all 0.3s ease;
    font-size: 16px;
}

.instagram-link.primary {
    background: linear-gradient(135deg, #405de6, #5851db, #833ab4, #c13584, #e1306c, #fd1d1d);
    color: white;
}

.instagram-link.primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.15);
}

.instagram-link.secondary {
    background-color: var(--pythias-blue);
    color: white;
}

.instagram-link.secondary:hover {
    background-color: var(--pythias-light-blue);
}

/* Photo Gallery */
.photo-gallery {
    background-color: white;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    padding: 40px;
    margin-bottom: 40px;
}

.gallery-title {
    font-size: 2rem;
    color: var(--pythias-blue);
    text-align: center;
    margin-bottom: 20px;
}

.gallery-description {
    font-size: 16px;
    color: var(--dark-gray);
    text-align: center;
    margin-bottom: 40px;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.photo-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-top: 30px;
}

.photo-item {
    cursor: pointer;
    transition: transform 0.3s ease;
}

.photo-item:hover {
    transform: translateY(-5px);
}

.photo-placeholder {
    background: linear-gradient(135deg, var(--pythias-blue), var(--pythias-light-blue));
    border-radius: 12px;
    padding: 40px 20px;
    color: white;
    text-align: center;
    min-height: 160px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    transition: all 0.3s ease;
}

.photo-item:hover .photo-placeholder {
    background: linear-gradient(135deg, var(--pythias-light-blue), var(--pythias-gold));
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
}

.photo-placeholder .photo-icon {
    font-size: 3rem;
    margin-bottom: 15px;
    display: block;
}

.photo-placeholder p {
    font-size: 16px;
    font-weight: 500;
    margin: 0;
}

/* Redirect page */
.redirect-section {
    padding: 200px 0;
    text-align: center;
}

.redirect-title {
    font-size: 2rem;
    color: var(--pythias-blue);
    margin-bottom: 20px;
}

.redirect-text {
    font-size: 16px;
    color: var(--dark-gray);
}

.redirect-text a {
    color: var(--pythias-blue);
    text-decoration: none;
}

.redirect-text a:hover {
    text-decoration: underline;
}

/* Footer */
footer {
    background-color: var(--pythias-blue);
    color: white;
    text-align: center;
    padding: 20px 0;
    margin-top: 0;
    position: relative;
}

footer .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.footer-buttons {
    display: flex;
    gap: 40px;
    align-items: center;
}

.footer-left {
    text-align: left;
}

.footer-left a {
    color: #d1d5db;
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    padding: 8px 12px;
    border: 1px solid #9ca3af;
    border-radius: 4px;
    transition: all 0.3s ease;
    background-color: rgba(156, 163, 175, 0.1);
}

.footer-left a:hover {
    color: #f3f4f6;
    border-color: #e5e7eb;
    background-color: rgba(229, 231, 235, 0.2);
    transform: translateY(-1px);
}

footer p {
    margin: 0;
    text-align: center;
}

.footer-login {
    text-align: right;
}

.footer-login a {
    color: #d1d5db;
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    padding: 8px 12px;
    border: 1px solid #9ca3af;
    border-radius: 4px;
    transition: all 0.3s ease;
    background-color: rgba(156, 163, 175, 0.1);
}

.footer-login a:hover {
    color: #f3f4f6;
    border-color: #e5e7eb;
    background-color: rgba(229, 231, 235, 0.2);
    transform: translateY(-1px);
}

/* Leden page styles */
.leden-section {
    padding: 60px 0;
}

.leden-title {
    font-family: 'Monotype Corsiva', cursive;
    font-size: 3rem;
    color: var(--pythias-blue);
    text-align: center;
    margin-bottom: 30px;
}

.leden-description {
    max-width: 800px;
    margin: 0 auto 60px;
    text-align: center;
}

.leden-description p {
    font-size: 18px;
    line-height: 1.8;
    color: var(--dark-gray);
}

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

.lichting-section {
    background-color: white;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    padding: 40px;
    margin-bottom: 40px;
    border-left: 5px solid var(--pythias-blue);
}

.lichting-title {
    font-family: 'Monotype Corsiva', cursive;
    font-size: 2.5rem;
    color: var(--pythias-blue);
    text-align: center;
    margin-bottom: 30px;
    font-style: italic;
}

.members-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 25px;
    margin-top: 30px;
}

.member-card {
    text-align: center;
    transition: transform 0.3s ease;
}

.member-card:hover {
    transform: translateY(-5px);
}

.member-photo {
    width: 150px;
    height: 150px;
    border-radius: 50%;
    overflow: hidden;
    margin: 0 auto 15px;
    border: 4px solid var(--pythias-light-blue);
    box-shadow: 0 8px 20px rgba(0,0,0,0.1);
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.member-card:hover .member-photo {
    border-color: var(--pythias-gold);
    box-shadow: 0 12px 30px rgba(0,0,0,0.15);
}

.member-photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.member-card:hover .member-photo img {
    transform: scale(1.05);
}

.member-name {
    font-size: 16px;
    font-weight: 600;
    color: var(--pythias-blue);
    margin-top: 10px;
}

.loading,
.error-message,
.no-members {
    text-align: center;
    padding: 60px 20px;
    color: var(--dark-gray);
}

.error-message {
    color: #dc3545;
}

/* Admin members styles - UPDATED */
.admin-members-section {
    background: white;
    margin: 20px 0;
    padding: 20px;
    border-radius: 8px;
    border: 1px solid #ddd;
}

.lichting-admin {
    border: 1px solid #ddd;
    border-radius: 8px;
    margin: 15px 0;
    background: #f8f9fa;
}

.lichting-header {
    padding: 15px;
    background: var(--pythias-blue);
    color: white;
    border-radius: 8px 8px 0 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.lichting-members {
    padding: 20px;
}

.members-container {
    display: flex !important;
    flex-wrap: wrap !important;
    gap: 15px !important;
    justify-content: flex-start !important;
    align-items: flex-start !important;
}

.member-admin {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 15px;
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    background: white;
    min-width: 120px;
    max-width: 150px;
    text-align: center;
    flex: 0 0 auto;
}

.member-photo-admin {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    overflow: hidden;
    border: 2px solid var(--pythias-light-blue);
    position: relative;
    cursor: pointer;
    transition: all 0.3s ease;
    flex-shrink: 0;
}

.member-photo-admin:hover {
    border-color: var(--pythias-gold);
    transform: scale(1.05);
}

.member-photo-admin img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.photo-upload-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
    border-radius: 50%;
}

.member-photo-admin:hover .photo-upload-overlay {
    opacity: 1;
}

.photo-upload-overlay span {
    color: white;
    font-size: 20px;
}

.member-info {
    margin-top: 10px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    width: 100%;
}

.member-info strong {
    font-size: 13px;
    line-height: 1.2;
    margin-bottom: 5px;
}

.member-actions {
    display: flex;
    flex-direction: column;
    gap: 4px;
    align-items: center;
    width: 100%;
}

.member-actions small {
    font-size: 11px;
    color: #666;
    text-align: center;
}

.btn-secondary {
    background: #6c757d;
    color: white;
    padding: 3px 6px;
    border: none;
    border-radius: 3px;
    cursor: pointer;
    font-size: 10px;
    white-space: nowrap;
}

.btn-secondary:hover {
    background: #5a6268;
}

.add-member-form {
    display: grid;
    grid-template-columns: 1fr 1fr auto;
    gap: 10px;
    align-items: end;
    margin-top: 20px;
    padding: 15px;
    background: #f0f8ff;
    border-radius: 6px;
}

.btn-small {
    padding: 8px 16px;
    font-size: 14px;
}

.btn-danger-small {
    background: #dc3545;
    color: white;
    border: none;
    padding: 3px 6px;
    border-radius: 3px;
    cursor: pointer;
    font-size: 10px;
    white-space: nowrap;
}

.btn-danger-small:hover {
    background: #c82333;
}

/* Responsive design for mobile */
@media (max-width: 768px) {
    .members-container {
        flex-direction: column;
    }
    
    .member-admin {
        width: 100%;
        max-width: none;
    }
    
    .add-member-form {
        grid-template-columns: 1fr;
        gap: 10px;
    }
}

/* Responsive design */
@media (max-width: 768px) {
    .leden-title {
        font-size: 2rem;
    }
    
    .lichting-title {
        font-size: 1.8rem;
    }
    
    .members-grid {
        grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
        gap: 20px;
    }
    
    .member-photo {
        width: 120px;
        height: 120px;
    }
    
    .lichting-section {
        padding: 30px 20px;
    }
    
    .member-admin {
        width: 100%;
        max-width: none;
    }
    
    .add-member-form {
        grid-template-columns: 1fr;
        gap: 10px;
    }
    
    .container {
        padding: 0 15px;
    }
    
    nav ul {
        flex-wrap: wrap;
        gap: 20px;
    }
    
    .hero {
        padding: 40px 0 40px 0;
        margin: 0;
    }
    
    .board-members {
        grid-template-columns: 1fr;
    }
    
    .contact-info {
        padding: 30px 20px;
    }
    
    .instagram-embed,
    .photo-gallery {
        padding: 30px 20px;
    }
    
    .instagram-actions {
        flex-direction: column;
        align-items: center;
    }
    
    .instagram-link {
        width: 100%;
        max-width: 300px;
        justify-content: center;
    }
    
    .photo-grid {
        grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
        gap: 15px;
    }
    
    .instagram-preview-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .footer-login {
        position: static;
        transform: none;
        margin-top: 10px;
    }
    
    footer .container {
        flex-direction: column;
        gap: 15px;
        text-align: center;
    }
    
    footer p {
        order: 1;
    }
    
    .footer-buttons {
        order: 2;
        display: flex;
        justify-content: center;
        gap: 20px;
        align-items: center;
    }
    
    .footer-left,
    .footer-login {
        flex: none;
        text-align: center;
    }
    
    .footer-left a,
    .footer-login a {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        vertical-align: top;
        line-height: 1;
        min-height: 36px;
        box-sizing: border-box;
    }
    
    .footer-left,
    .footer-login {
        flex: none;
        text-align: center;
    }
}

@media (max-width: 480px) {
    .fraternity-title {
        font-size: 2.5rem;
    }
    
    .contact-title,
    .photos-title {
        font-size: 2rem;
    }
    
    .description p {
        font-size: 16px;
    }
    
    .instagram-title,
    .gallery-title {
        font-size: 1.5rem;
    }
    
    .photo-grid {
        grid-template-columns: 1fr;
    }
    
    .instagram-preview-grid {
        grid-template-columns: 1fr;
    }
    
    .photo-placeholder {
        padding: 30px 15px;
        min-height: 140px;
    }
    
    .photo-placeholder .photo-icon {
        font-size: 2.5rem;
    }
}

/* Desktop footer layout */
@media (min-width: 769px) {
    footer .container {
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
        text-align: initial;
    }
    
    footer p {
        order: 0;
        flex: 1;
        text-align: center;
        margin: 0 40px;
    }
    
    .footer-buttons {
        display: contents;
    }
    
    .footer-left {
        order: -1;
        flex: 1;
        text-align: left;
    }
    
    .footer-login {
        order: 1;
        flex: 1;
        text-align: right;
    }
}