/* Root Variables for Consistency */
:root {
    --primary-green: #e8f5e9;
    --primary-blue: #e3f2fd;
    --accent-green: #2e7d32;
    --accent-blue: #1565c0;
    --text-dark: #333333;
    --text-muted: #666666;
    --white: #ffffff;
    --shadow-sm: 0 2px 4px rgba(0,0,0,0.05);
    --shadow-md: 0 4px 12px rgba(0,0,0,0.1);
    --shadow-lg: 0 10px 25px rgba(0,0,0,0.15);
    --transition: all 0.3s ease;
    --border-radius: 12px;
}

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

body {
    font-family: 'Noto Sans KR', sans-serif;
    color: var(--text-dark);
    line-height: 1.6;
    overflow-x: hidden;
}

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

section {
    padding: 80px 0;
}

.bg-light {
    background-color: #f8fafc;
}

/* Typography */
h1, h2, h3, h4 {
    font-weight: 700;
    line-height: 1.3;
}

.section-title {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 50px;
    position: relative;
}

.section-title::after {
    content: '';
    display: block;
    width: 60px;
    height: 4px;
    background: var(--accent-green);
    margin: 15px auto 0;
    border-radius: 2px;
}

/* Header & Nav */
header {
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 1000;
    transition: var(--transition);
    padding: 20px 0;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
}

header.sticky {
    padding: 10px 0;
    background: var(--white);
    box-shadow: var(--shadow-sm);
}

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

.logo a {
    display: flex;
    align-items: center;
    text-decoration: none;
    gap: 10px;
}

.logo img {
    height: 45px;
}

.logo-text {
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--text-dark);
}

.logo-accent {
    color: var(--accent-green);
}

.nav-links {
    display: flex;
    list-style: none;
    gap: 30px;
}

.nav-links a {
    text-decoration: none;
    color: var(--text-dark);
    font-weight: 500;
    font-size: 1.05rem;
    transition: var(--transition);
    padding: 5px 0;
    position: relative;
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--accent-green);
    transition: var(--transition);
}

.nav-links a:hover::after,
.nav-links a.active::after {
    width: 100%;
}

.nav-links a:hover,
.nav-links a.active {
    color: var(--accent-green);
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 12px 30px;
    border-radius: 30px;
    font-weight: 600;
    text-decoration: none;
    transition: var(--transition);
    cursor: pointer;
    border: none;
}

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

.btn-primary:hover {
    background: #1b5e20;
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.btn-secondary {
    background: var(--white);
    color: var(--accent-green);
    border: 2px solid var(--accent-green);
}

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

/* Card Admin UI Styles - Essential for Admin Mode */
.card-admin-container {
    position: relative !important;
}

.card-admin-trigger {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 30px;
    height: 30px;
    background: rgba(255, 255, 255, 0.9);
    border-radius: 50%;
    display: none !important; /* Forces hidden state for normal users */
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 10;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
    transition: all 0.2s ease;
}

.admin-mode .card-admin-trigger {
    display: flex !important;
}

.card-admin-trigger:hover {
    background: #f1f5f9;
    transform: scale(1.1);
}

.card-admin-menu {
    position: absolute;
    top: 0;
    right: 40px; /* Opens to the left of the ellipsis to prevent clipping */
    background: white;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.15);
    width: 100px;
    display: none;
    flex-direction: column;
    padding: 5px 0;
    z-index: 1000; /* Higher z-index */
    overflow: hidden;
    border: 1px solid #e2e8f0;
}

.card-admin-menu.active {
    display: flex;
}

.card-admin-menu button {
    background: none;
    border: none;
    padding: 10px 15px;
    text-align: left;
    font-size: 0.9rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: background 0.2s;
    color: #475569;
}

.card-admin-menu button:hover {
    background: #f8fafc;
    color: var(--accent-green);
}

.card-admin-menu button.delete-item:hover {
    color: #ef4444;
    background: #fef2f2;
}

.admin-mode .card-admin-menu button.delete-item {
    display: flex !important; /* Force visibility for delete button */
}

/* Add Item Card Styles */
.add-item-card {
    display: none !important;
    border: 2px dashed #cbd5e1;
    background: #ffffff;
    cursor: pointer;
    transition: all 0.3s ease;
    border-radius: var(--border-radius);
    padding: 30px;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 200px;
    box-shadow: none;
    text-align: center;
}

.admin-mode .add-item-card {
    display: flex !important;
}

.add-item-card:hover {
    border-color: var(--accent-green) !important;
    background: #f0fdf4 !important;
    transform: translateY(-5px);
    box-shadow: var(--shadow-md);
}

.add-icon-circle {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: #f1f5f9;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #64748b;
    font-size: 1.5rem;
    transition: all 0.3s ease;
}

.add-item-card:hover .add-icon-circle {
    background: var(--accent-green);
    color: white;
    transform: scale(1.1);
}

/* Styles for the "Red" Admin Button when logged in */
.admin-mode-active .admin-active-btn {
    background-color: #ef4444 !important;
    color: white !important;
    border: none !important;
    border-radius: 6px;
}

.admin-mode-active .admin-active-btn:hover {
    background-color: #dc2626 !important;
}

/* Additional layout styles... */
.card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 30px;
}

.program-card {
    background: var(--white);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
}

.program-card:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-lg);
}

.card-img {
    height: 220px;
    overflow: hidden;
}

.card-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.card-body {
    padding: 25px;
}

.card-body h3 {
    margin-bottom: 12px;
}

.card-body p {
    color: var(--text-muted);
    font-size: 0.95rem;
    margin-bottom: 20px;
}

.hero {
    height: 80vh;
    display: flex;
    align-items: center;
    background: linear-gradient(rgba(255,255,255,0.7), rgba(255,255,255,0.7)), url('images/hero_bg.jpg') center/cover;
    text-align: center;
}

.hero h1 {
    font-size: 3.5rem;
    margin-bottom: 20px;
}

.highlight {
    color: var(--accent-green);
}

/* Footer */
.footer {
    background: #2D3436;
    color: white;
    padding: 80px 0 30px;
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 50px;
    margin-bottom: 50px;
}

/* Mobile responsive... */
@media (max-width: 768px) {
    .nav-links { display: none; }
    .hero h1 { font-size: 2.5rem; }
    .footer-grid { grid-template-columns: 1fr; }
}

/* Bottom Nav Fix for Mobile */
.bottom-nav {
    position: fixed;
    bottom: 0;
    width: 100%;
    background: white;
    display: none;
    justify-content: space-around;
    padding: 10px 0;
    box-shadow: 0 -2px 10px rgba(0,0,0,0.1);
    z-index: 999;
}

@media (max-width: 768px) {
    .bottom-nav { display: flex; }
    body { padding-bottom: 70px; }
}

.bottom-nav-item {
    text-decoration: none;
    color: #666;
    font-size: 0.8rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
}

.bottom-nav-item.active {
    color: var(--accent-green);
}

.bottom-nav-item i {
    font-size: 1.2rem;
}

.fab-call {
    position: fixed;
    right: 20px;
    bottom: 90px;
    width: 55px;
    height: 55px;
    background: #34A853;
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    box-shadow: var(--shadow-md);
    z-index: 1000;
}

/* =========================================================
   RESTORED CSS: Hero, Value Cards, Animations & Mobile Nav
   ========================================================= */

/* Mobile Menu Toggle & Nav */
.mobile-menu-btn {
    display: none;
    flex-direction: column;
    gap: 5px;
    cursor: pointer;
    z-index: 1001;
}

.mobile-menu-btn span {
    width: 25px;
    height: 3px;
    background: var(--text-dark);
    transition: var(--transition);
}

.mobile-nav {
    position: fixed;
    top: 0;
    right: -100%;
    width: 250px;
    height: 100vh;
    background: var(--white);
    box-shadow: -5px 0 15px rgba(0,0,0,0.1);
    z-index: 1000;
    padding-top: 80px;
    transition: right 0.3s ease;
}

.mobile-nav.open {
    right: 0;
}

.mobile-nav-links {
    list-style: none;
    padding: 0 20px;
}

.mobile-nav-links li {
    margin-bottom: 20px;
}

.mobile-nav-links a {
    text-decoration: none;
    color: var(--text-dark);
    font-size: 1.1rem;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 10px;
}

@media (max-width: 768px) {
    .mobile-menu-btn { display: flex; }
    .hero-content h1 { font-size: 2.2rem; }
}

/* Hero Section Restored */
.hero {
    position: relative;
    height: 80vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: none;
    overflow: hidden;
}

.hero-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    z-index: 1;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.3);
    z-index: 2;
}

.hero-content {
    position: relative;
    z-index: 3;
    text-align: center;
    padding: 0 20px;
    color: var(--white);
}

.hero-content h1 {
    color: var(--white);
}

.hero-content p {
    font-size: 1.2rem;
    color: var(--white);
    margin-bottom: 30px;
    text-shadow: 0 2px 4px rgba(0,0,0,0.3);
}

/* Value Cards Restored */
.value-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
    margin-top: 30px;
}

.value-card {
    background: var(--white);
    border-radius: var(--border-radius);
    padding: 40px 30px;
    text-align: center;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
    border-top: 4px solid transparent;
}

.value-card:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-lg);
}

.card-green { border-top-color: var(--accent-green); }
.card-blue { border-top-color: var(--accent-blue); }
.card-teal { border-top-color: #009688; }

.icon-box {
    width: 70px;
    height: 70px;
    border-radius: 50%;
    background: var(--primary-green);
    color: var(--accent-green);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
    margin: 0 auto 20px;
    transition: var(--transition);
}

.value-card:hover .icon-box {
    background: var(--accent-green);
    color: var(--white);
    transform: scale(1.1);
}

.value-card h3 {
    margin-bottom: 15px;
    color: var(--text-dark);
}

.value-card p {
    color: var(--text-muted);
}

/* Animation Utilities */
.fade-in-up {
    opacity: 0;
    transform: translateY(30px);
    animation: fadeInUp 0.8s forwards;
}

@keyframes fadeInUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Programs Grid Fix */
.program-grid, .gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 30px;
}

.gallery-item {
    position: relative;
    border-radius: var(--border-radius);
    overflow: hidden;
    height: 250px;
    box-shadow: var(--shadow-sm);
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition);
}

.gallery-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(46, 125, 50, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--white);
    font-size: 2rem;
    opacity: 0;
    transition: var(--transition);
    cursor: pointer;
}

.gallery-item:hover img {
    transform: scale(1.1);
}

.gallery-item:hover .gallery-overlay {
    opacity: 1;
}

/* Global No Scroll */
.no-scroll {
    overflow: hidden;
}

/* Admin Login Modal */
.modal {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.5);
    backdrop-filter: blur(5px);
    align-items: center;
    justify-content: center;
}

.modal.active {
    display: flex;
}

.modal-content {
    background-color: var(--white);
    padding: 40px;
    border-radius: 16px;
    width: 90%;
    max-width: 400px;
    box-shadow: var(--shadow-lg);
    position: relative;
    animation: modalFadeIn 0.3s ease-out;
}

@keyframes modalFadeIn {
    from { opacity: 0; transform: translateY(-20px); }
    to { opacity: 1; transform: translateY(0); }
}

.modal-header {
    margin-bottom: 25px;
    text-align: center;
}

.modal-header h2 {
    color: var(--accent-green);
    font-size: 1.8rem;
    margin: 0;
}

.close-modal {
    position: absolute;
    right: 20px;
    top: 15px;
    font-size: 1.8rem;
    cursor: pointer;
    color: var(--text-muted);
}

.modal-form .form-group {
    margin-bottom: 20px;
}

.modal-form label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
}

.modal-form input {
    width: 100%;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 1rem;
}

.modal-footer {
    margin-top: 30px;
}

/* Admin Logged In Button State */
.nav-links a.admin-logged-in-btn,
.mobile-nav-links a.admin-logged-in-btn {
    background-color: #ef4444 !important;
    color: white !important;
    padding: 8px 15px !important;
    border-radius: 6px !important;
    margin-top: -5px;
}

.nav-links a.admin-logged-in-btn::after {
    display: none;
}
/* Add Item Modal Specifics */
.add-modal-body {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.image-preview-container {
    width: 100%;
    height: 200px;
    background: #f1f5f9;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    border: 2px dashed #cbd5e1;
    position: relative;
    cursor: pointer;
}

.image-preview-container img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.image-preview-container .preview-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    color: #64748b;
    font-size: 0.9rem;
}

.image-preview-container .preview-placeholder i {
    font-size: 2rem;
    margin-bottom: 8px;
}

#image-upload-input {
    display: none;
}

.modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    margin-top: 30px;
}

.btn-secondary {
    background: #f1f5f9;
    color: #475569;
}

.form-group input, .form-group textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    font-family: inherit;
    font-size: 0.95rem;
    transition: all 0.3s ease;
}

.form-group input:focus, .form-group textarea:focus {
    outline: none;
    border-color: var(--accent-green);
    box-shadow: 0 0 0 3px rgba(46, 125, 50, 0.1);
}

.form-group textarea {
    min-height: 100px;
    resize: vertical;
}

/* Notice Board Admin Styles */
.admin-only {
    display: none;
}

.admin-mode .admin-only {
    display: revert;
}

.btn-icon {
    background: none;
    border: none;
    color: #64748b;
    cursor: pointer;
    padding: 5px;
    font-size: 1.1rem;
    transition: all 0.2s;
}

.btn-icon:hover {
    color: var(--accent-green);
    transform: scale(1.1);
}

.btn-icon.delete-notice:hover {
    color: #ef4444;
}

.notice-actions {
    min-width: 80px;
}

.notice-table tr[data-id] {
    transition: background 0.2s;
}

.notice-table tr[data-id]:hover {
    background: #f8fafc;
}

#notice-date {
    width: 100%;
    padding: 12px;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
}

/* Mantine Card & Activity Styles */
.mantine-card {
    background: #fff;
    border-radius: 12px;
    border: 1px solid #e9ecef;
    overflow: hidden;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    display: flex;
    flex-direction: column;
    position: relative;
    height: 100%;
}

.mantine-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0,0,0,0.05);
}

.card-img-wrapper {
    height: 200px;
    overflow: hidden;
    position: relative;
}

.card-img-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.mantine-card:hover .card-img-wrapper img {
    transform: scale(1.05);
}

.card-body {
    padding: 20px;
    flex-grow: 1;
}

.card-title {
    font-size: 1.1rem;
    font-weight: 700;
    color: #212529;
    margin-bottom: 8px;
    line-height: 1.4;
}

.card-desc {
    font-size: 0.9rem;
    color: #495057;
    line-height: 1.6;
    margin-bottom: 15px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.card-footer {
    padding: 15px 20px;
    border-top: 1px solid #e9ecef;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.card-stat {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.8rem;
    color: #868e96;
    font-weight: 500;
}

.year-section {
    margin-bottom: 60px;
}

.year-title {
    font-size: 2rem;
    font-weight: 800;
    color: var(--accent-green);
    margin-bottom: 30px;
    display: flex;
    align-items: center;
    gap: 15px;
    border-bottom: 2px solid #e2e8f0;
    padding-bottom: 10px;
}

.year-title span {
    font-size: 1.1rem;
    color: var(--text-muted);
    font-weight: 500;
}

.act-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 25px;
}

/* Mantine Card with Background Image - Moved from education.html */
.edu-bg-card {
    height: 400px;
    border-radius: 16px;
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: 25px;
    background-size: cover;
    background-position: center;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    cursor: pointer;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.edu-bg-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(0deg, rgba(0,0,0,0.85) 0%, rgba(0,0,0,0.3) 50%, rgba(0,0,0,0.1) 100%);
    z-index: 1;
    transition: background 0.3s ease;
}

.edu-bg-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 25px rgba(0,0,0,0.2);
}

.edu-bg-card:hover::before {
    background: linear-gradient(0deg, rgba(0,0,0,0.9) 0%, rgba(0,0,0,0.4) 60%, rgba(0,0,0,0.1) 100%);
}

.edu-card-content {
    position: relative;
    z-index: 2;
    color: white;
}

.edu-card-tag {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-weight: 700;
    margin-bottom: 8px;
    color: #90caf9;
    display: block;
}

.edu-card-title {
    font-size: 1.35rem;
    font-weight: 700;
    margin-bottom: 10px;
    line-height: 1.3;
}

.edu-card-desc {
    font-size: 0.9rem;
    color: rgba(255,255,255,0.8);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    line-height: 1.5;
}
