/* Reset and base layout */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: #f5f5f5;
    color: #222;
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Header */
header {
    background-color: #b52d2d;
    color: #fff;
    padding: 20px 30px 15px 30px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
    position: relative;
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    text-align: center;
    position: relative;
}

/* Member Info */
.member-info {
    position: absolute;
    top: 20px;
    right: 30px;
    text-align: right;
    font-size: 0.9em;
    color: white;
    line-height: 1.4;
}

.member-info .member-name {
    font-weight: bold;
    font-size: 1rem;
}

.member-info .member-ranktop {
    font-size: 0.85rem;
    opacity: 0.9;
}

.logout-btn {
    display: inline-block;
    margin-top: 5px;
    padding: 6px 12px;
    background-color: #fff;
    color: #b52d2d;
    border-radius: 4px;
    font-weight: bold;
    text-decoration: none;
    font-size: 0.85em;
    transition: background-color 0.2s;
}

.logout-btn:hover {
    background-color: #f0f0f0;
    color: #a31b1b;
}

/* Title */
.site-title {
    font-size: 2rem;
    font-weight: bold;
    margin: 0;
    text-align: center;
}

/* Navigation */
.main-nav {
    margin-top: 15px;
}

.main-nav ul {
    list-style: none;
    display: flex;
    justify-content: center;
    gap: 25px;
    margin: 0;
    padding: 0;
    flex-wrap: wrap;
}

.main-nav li a {
    color: white;
    font-weight: 600;
    text-decoration: none;
    padding: 6px 8px;
    border-radius: 4px;
    transition: background-color 0.2s;
}

.main-nav li a:hover {
    background-color: rgba(255, 255, 255, 0.15);
}

/* Main Content */
main {
    flex: 1;
    padding: 20px;
    max-width: 1000px;
    margin: 0 auto;
}

section {
    margin-bottom: 30px;
}

/* Footer */
footer {
    background-color: #333;
    color: #fff;
    padding: 15px;
    text-align: center;
}

/* Buttons */
button, .btn {
    padding: 10px 20px;
    background-color: #c62828;
    color: #fff;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    text-decoration: none;
    font-weight: bold;
}

button:hover, .btn:hover {
    background-color: #a31b1b;
}

/* Links */
a {
    color: #c62828;
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

/* Home Layout */
.home-wrapper {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
}

.home-main {
    flex: 2;
}

.news-column {
    flex: 1;
    min-width: 300px;
    background-color: #fff;
    padding: 15px;
    border: 1px solid #ddd;
    border-radius: 6px;
}

.news-column h3 {
    margin-bottom: 10px;
    font-size: 1.3em;
}

.photo-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 10px;
    margin-top: 10px;
}

.photo-grid img {
    width: 100%;
    height: auto;
    border-radius: 6px;
    object-fit: cover;
}

/* Forms */
.login-form {
    max-width: 400px;
    margin: 30px auto;
    background: #fff;
    padding: 20px;
    border-radius: 6px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.login-form input {
    width: 100%;
    padding: 10px;
    margin: 5px 0 15px;
}

.login-form button {
    width: 100%;
}

/* Timeline Styles */
.timeline {
    list-style: none;
    padding-left: 0;
    border-left: 4px solid #b52d2d;
    margin-top: 20px;
}

.timeline li {
    margin-bottom: 20px;
    padding-left: 20px;
    position: relative;
}

.timeline li::before {
    content: '';
    position: absolute;
    top: 5px;
    left: -10px;
    width: 12px;
    height: 12px;
    background-color: #b52d2d;
    border-radius: 50%;
    border: 2px solid #fff;
    box-shadow: 0 0 0 2px #b52d2d;
}

.timeline .year {
    font-weight: bold;
    color: #b52d2d;
    font-size: 1.1em;
    display: block;
    margin-bottom: 5px;
}

/* History Page Images */
.history-img {
    width: 100%;
    max-width: 400px;
    height: auto;
    border-radius: 10px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    object-fit: cover;
}

.hero-img {
    width: 100%;
    max-height: 300px;
    object-fit: cover;
    border-radius: 10px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    margin-top: 20px;
}

/* Responsive Layout */
@media (max-width: 900px) {
    .home-wrapper {
        flex-direction: column;
    }
}

@media (max-width: 768px) {
    .nav-container {
        padding-bottom: 10px;
    }

    .site-title {
        font-size: 1.5em;
    }

    .main-nav ul {
        flex-direction: column;
        align-items: center;
    }

    .member-info {
        position: static;
        text-align: center;
        margin-top: 15px;
    }

    .history-img {
        max-width: 100%;
    }

    .hero-img {
        max-height: 200px;
    }
}

.member-list {
    list-style: none;
    padding-left: 0;
    margin-bottom: 20px;
}

.member-list li {
    padding: 6px 10px;
    background-color: #fff;
    margin-bottom: 6px;
    border-left: 5px solid #b52d2d;
    border-radius: 4px;
}

.btn.small {
    padding: 6px 10px;
    font-size: 0.85em;
    margin-right: 6px;
}

.photo-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 20px;
    margin: 20px 0;
}

.member-photo {
    max-width: 100%;
    max-height: 180px;
    border-radius: 10px;
    object-fit: cover;
}

.manage-wrapper {
    max-width: 900px;
    margin: 30px auto;
    background: #fff;
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.1);
}

.manage-wrapper h2 {
    text-align: center;
    margin-bottom: 25px;
    font-size: 1.8em;
}

.manage-form {
    background-color: #fafafa;
    border: 1px solid #ddd;
    padding: 25px;
    border-radius: 6px;
    margin-bottom: 30px;
}

.manage-form label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
}

.manage-form input,
.manage-form select {
    width: 100%;
    padding: 10px;
    margin-bottom: 15px;
    border-radius: 4px;
    border: 1px solid #ccc;
}

.manage-form button {
    width: 100%;
    background-color: #b52d2d;
    color: white;
    font-weight: bold;
    border: none;
    padding: 12px;
    border-radius: 6px;
    transition: background 0.2s;
}

.manage-form button:hover {
    background-color: #911f1f;
}

.btn.danger {
    background-color: #c62828;
    color: white;
    padding: 6px 12px;
    border-radius: 4px;
    font-weight: bold;
    text-decoration: none;
}

.btn.danger:hover {
    background-color: #a31b1b;
}

.modal {
    display: none;
    position: fixed;
    z-index: 99;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0,0,0,0.4);
}

.modal-content {
    background-color: #fff;
    margin: 5% auto;
    padding: 25px;
    border: 1px solid #ccc;
    width: 600px;
    border-radius: 8px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
    position: relative;
}

.modal .close {
    position: absolute;
    top: 10px;
    right: 18px;
    font-size: 28px;
    font-weight: bold;
    color: #b52d2d;
    cursor: pointer;
}

.form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
}

.form-grid input,
.form-grid select,
.form-grid label {
    width: 100%;
}

.modal-form button {
    margin-top: 20px;
    display: block;
    width: 100%;
}

.add-member-form {
  display: flex;
  flex-direction: column;
  gap: 15px;
}

.form-row {
  display: flex;
  gap: 15px;
}

.form-row input,
.form-row select {
  flex: 1;
  padding: 10px;
  font-size: 1em;
}

.form-checkboxes {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 10px;
}

.form-checkboxes label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.95em;
}

.admin-table {
    width: 100%;
    max-width: 1200px;
    margin-top: 20px;
    border-collapse: collapse;
    background: #fff;
    border: 1px solid #ccc;
}

.admin-table th, .admin-table td {
    padding: 12px 10px;
    border: 1px solid #ddd;
    text-align: left;
    vertical-align: middle;
}

.admin-table th {
    background-color: #a63131;
    color: white;
    font-weight: bold;
}

.admin-table input[type="text"],
.admin-table input[type="email"],
.admin-table input[type="password"],
.admin-table select {
    width: 100%;
    padding: 6px;
    font-size: 0.95em;
    box-sizing: border-box;
}

.admin-table .checkbox-group {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
    font-size: 0.9em;
}

.admin-table .checkbox-group label {
    display: flex;
    align-items: center;
    gap: 4px;
}

.admin-table .action-buttons {
    display: flex;
    gap: 8px;
    margin-top: 8px;
}

.admin-table .btn {
    padding: 6px 12px;
    font-size: 0.85em;
    border-radius: 4px;
    cursor: pointer;
    background-color: #b52d2d;
    color: white;
    border: none;
    transition: background-color 0.2s ease;
}

.admin-table .btn:hover {
    background-color: #8e2323;
}

.admin-table .btn.danger {
    background-color: #9e1c1c;
}

.admin-table .btn.danger:hover {
    background-color: #7c1616;
}

