/* Global Styles */
body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #FFF 0%, #EBE4D3 100%);
    min-height: 100vh;
    margin: 0;
    padding: 0;
    color: #333;
    background-attachment: fixed;
    /* Keeps background static while scrolling */
}

.container {
    max-width: 1000px;
    margin: 10px auto;
    padding: 10px;
}

h1,
h2 {
    color: #fff;
    /* White text for better contrast on dark gradient */
    text-align: center;
    margin-bottom: 30px;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
    font-weight: 600;
}

/* Glassmorphism Common Style */
.glass-panel {
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-radius: 12px;
    box-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.37);
    border: 1px solid rgba(255, 255, 255, 0.18);
}

/* Admin Form Styles */
.form-container {
    background: rgba(255, 255, 255, 0.95);
    /* Slightly more opaque for readability */
    padding: 40px;
    border-radius: 12px;
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.2);
    max-width: 600px;
    margin: 0 auto;
}

.form-group {
    margin-bottom: 25px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #2c3e50;
}

.form-group input[type="text"],
.form-group input[type="password"],
.form-group input[type="date"],
.form-group textarea,
.form-group input[type="file"] {
    width: 100%;
    padding: 12px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    box-sizing: border-box;
    font-size: 16px;
    transition: border-color 0.3s;
    background: #f9f9f9;
}

.form-group input:focus,
.form-group textarea:focus {
    border-color: #667eea;
    outline: none;
    background: #fff;
}

.form-group textarea {
    height: 150px;
    resize: vertical;
}

button.submit-btn {
    background: linear-gradient(to right, #667eea, #764ba2);
    color: white;
    border: none;
    padding: 5px 10px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    width: 80%;
    transition: transform 0.2s, box-shadow 0.2s;
    text-transform: uppercase;
    letter-spacing: 1px;
}

button.submit-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.4);
}

button.submit-btn:active {
    transform: translateY(0);
}

/* Login Page Specifics */
.login-body {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
}

.login-container {
    width: 100%;
    max-width: 400px;
    padding: 20px;
}

.login-header {
    margin-bottom: 30px;
    text-align: center;
}

.login-header h2 {
    color: #333;
    text-shadow: none;
    margin: 0;
}

.error-msg {
    color: #e74c3c;
    background: #fadbd8;
    padding: 10px;
    border-radius: 4px;
    text-align: center;
    margin-bottom: 20px;
    border: 1px solid #eba49e;
}

/* News List Styles */
.news-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    /* Force 3 columns */
    gap: 20px;
}

.news-card {
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(5px);
    border-radius: 12px;
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    transition: transform 0.3s, box-shadow 0.3s;
    display: flex;
    flex-direction: column;
    border: 1px solid rgba(255, 255, 255, 0.5);
}

.news-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.2);
}

.news-img {
    width: 100%;
    height: 180px;
    object-fit: contain;
    background-color: #fff;
    border-bottom: 1px solid #eee;
}

.news-content {
    padding: 20px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.news-title {
    font-size: 1.4em;
    margin: 0 0 10px 0;
    color: #2c3e50;
    font-weight: 700;
}

.news-date {
    font-size: 0.9em;
    color: #666;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
}

.news-date::before {
    content: "📅";
    margin-right: 5px;
}

.news-desc {
    font-size: 1em;
    line-height: 1.6;
    color: #555;
    margin-bottom: 20px;
    flex-grow: 1;
}

.read-more-btn {
    display: inline-block;
    background: linear-gradient(to right, #e74c3c, #c0392b);
    color: white;
    padding: 10px 25px;
    text-decoration: none;
    border-radius: 25px;
    text-align: center;
    align-self: flex-start;
    transition: transform 0.2s, box-shadow 0.2s;
    font-weight: 500;
    box-shadow: 0 4px 6px rgba(231, 76, 60, 0.3);
}

.read-more-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(231, 76, 60, 0.4);
}

/* Detail Page Styles */
.detail-container {
    background: rgba(255, 255, 255, 0.95);
    padding: 50px;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
}

.detail-header {
    border-bottom: 2px solid #eee;
    padding-bottom: 20px;
    margin-bottom: 30px;
}

.detail-header h1 {
    color: #2c3e50;
    text-shadow: none;
    text-align: left;
}

.detail-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 20px;
    margin-bottom: 40px;
}

.detail-gallery img {
    width: 100%;
    height: 220px;
    object-fit: cover;
    border-radius: 8px;
    cursor: pointer;
    transition: transform 0.3s;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.detail-gallery img:hover {
    transform: scale(1.05);
    z-index: 1;
}

.detail-text {
    line-height: 1.8;
    font-size: 1.15em;
    color: #444;
}

.back-link {
    display: inline-block;
    margin-bottom: 20px;
    color: #fff;
    text-decoration: none;
    font-weight: 500;
    background: rgba(255, 255, 255, 0.2);
    padding: 8px 16px;
    border-radius: 20px;
    backdrop-filter: blur(5px);
    transition: background 0.3s;
}

.back-link:hover {
    background: rgba(255, 255, 255, 0.4);
}

/* Logout Button */
.logout-btn {
    position: absolute;
    top: 20px;
    right: 20px;
    background: rgba(255, 255, 255, 0.9);
    color: #e74c3c;
    padding: 8px 15px;
    border-radius: 6px;
    text-decoration: none;
    font-weight: bold;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    transition: all 0.3s;
}

.logout-btn:hover {
    background: #fff;
    color: #c0392b;
    transform: translateY(-2px);
}

/* Tab Styles */
.tab-container {
    max-width: 800px;
    margin: 0 auto 30px auto;
    display: flex;
    justify-content: center;
    border-bottom: 2px solid rgba(255, 255, 255, 0.3);
}

.tab-button {
    background: transparent;
    border: none;
    outline: none;
    cursor: pointer;
    padding: 14px 24px;
    font-size: 18px;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.7);
    transition: 0.3s;
    border-bottom: 3px solid transparent;
    margin: 0 5px;
}

.tab-button:hover {
    color: #fff;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 5px 5px 0 0;
}

.tab-button.active {
    color: #fff;
    border-bottom: 3px solid #fff;
}

.tab-content {
    display: none;
    animation: fadeEffect 0.5s;
}

.tab-content.active {
    display: block;
}

@keyframes fadeEffect {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}