@import url("https://cdn.jsdelivr.net/gh/orioncactus/pretendard@v1.3.9/dist/web/static/pretendard.min.css");
@import url("style_login.css");

:root {
    --primary-color: #2c3e50;
    --accent-color: #e67e22; /* Warm orange for dining */
    --text-color: #333;
    --bg-color: #f8f9fa;
    --white: #ffffff;
    --max-width: 1200px;
    --header-height: 80px;
    
    /* Event Status Colors */
    --status-open: #27ae60;    /* Green */
    --status-wait: #f39c12;    /* Orange */
    --status-closed: #95a5a6;  /* Gray */
}

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

html {
    font-size: 16px; /* Base size for rem */
}

body {
    font-family: "Pretendard", -apple-system, BlinkMacSystemFont, system-ui, Roboto, "Helvetica Neue", "Segoe UI", "Apple SD Gothic Neo", "Noto Sans KR", "Malgun Gothic", "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", sans-serif;
    color: var(--text-color);
    background-color: var(--bg-color);
    line-height: 1.6;
}

a {
    text-decoration: none;
    color: inherit;
}

ul {
    list-style: none;
}

/* Layout */
.container {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 1rem;
}

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

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

.logo {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-color);
}

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

nav ul {
    display: flex;
    gap: 2rem;
}

nav a {
    font-size: 1.125rem;
    font-weight: 500;
    transition: color 0.3s;
}

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

/* Mobile Menu Button */
.menu-toggle {
    display: none;
    font-size: 1.5rem;
    cursor: pointer;
}

/* Main Content */
main {
    padding: 3rem 0;
    min-height: calc(100vh - var(--header-height) - 200px);
}

/* Section Common */
.intro-section {
    text-align: center;
    padding: 4rem 0;
}

.section-title {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    text-align: center;
}

.section-subtitle {
    text-align: center;
    color: #666;
    margin-bottom: 3rem;
    margin-top: -1rem;
}

.intro-text {
    max-width: 800px;
    margin: 0 auto;
    line-height: 1.8;
}

.intro-text strong {
    font-weight: 700;
    color: var(--primary-color);
}

.divider {
    border: 0;
    border-top: 1px solid #eee;
    margin: 2rem 0;
}

/* Vision Section (Consortium) */
.vision-section {
    padding: 2rem 0;
}

.vision-title {
    font-size: 1.5rem;
    color: var(--primary-color);
    margin-bottom: 1rem;
    text-align: center;
}

.vision-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 2rem;
    justify-content: center;
    margin-top: 2rem;
}

.vision-card {
    flex: 1;
    min-width: 300px;
    background: #fff;
    padding: 2rem;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.05);
}

.vision-card h4 {
    margin-bottom: 1rem;
}

.vision-card h4.orange { color: #e67e22; }
.vision-card h4.blue { color: #2980b9; }

/* Member Section (Consortium) */
.member-section {
    padding: 4rem 0;
}

.member-card {
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0,0,0,0.05);
    margin-bottom: 2rem;
}

.member-card.placeholder {
    background: #f8f9fa;
    border: 2px dashed #ddd;
    text-align: center;
    color: #999;
    padding: 2rem;
}

.member-header {
    background: var(--primary-color);
    color: #fff;
    padding: 1rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.member-header h4 {
    font-size: 1.25rem;
}

.status-badge {
    background: var(--accent-color);
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.875rem;
}

.member-body {
    padding: 2rem;
}

.member-quote {
    margin-bottom: 1.5rem;
    font-weight: 600;
    font-size: 1.1rem;
}

.member-details {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
}

.member-sub-section h5 {
    margin-bottom: 0.5rem;
    font-size: 1.1rem;
}

.member-sub-section h5.blue { color: var(--primary-color); }
.member-sub-section h5.orange { color: var(--accent-color); }

.member-list {
    list-style: disc;
    padding-left: 1.5rem;
    color: #666;
}

.member-footer {
    margin-top: 2rem;
    text-align: right;
}

/* CTA Section */
.cta-section {
    text-align: center;
    padding: 3rem 0;
}

.cta-section h3 {
    margin-bottom: 1rem;
}

.cta-text {
    margin-bottom: 2rem;
}

.cta-highlight {
    font-weight: 600;
    color: var(--primary-color);
}

/* Social Dining Page Styles */
.what-is-section {
    padding: 2rem 0;
}

.feature-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.feature-card {
    background: var(--white);
    padding: 2rem;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.05);
}

.feature-card h4 {
    margin-bottom: 1rem;
    font-size: 1.25rem;
}

.feature-card h4.orange { color: #e67e22; }
.feature-card h4.green { color: #27ae60; }
.feature-card h4.blue { color: #2980b9; }

.program-section {
    padding: 4rem 0;
}

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

.program-card {
    background: var(--white);
    padding: 2rem;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.05);
    text-align: center;
    transition: transform 0.3s;
    border: 2px solid transparent; /* Default border */
}

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

.program-card.border-orange { border-color: #e67e22; }
.program-card.border-blue { border-color: #2c3e50; }
.program-card.border-green { border-color: #27ae60; }

.program-card h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
}

.program-card h3.orange { color: #e67e22; }
.program-card h3.blue { color: #2c3e50; }
.program-card h3.green { color: #27ae60; }

.program-card p {
    color: #666;
    margin-bottom: 1.5rem;
}

.program-list {
    text-align: left;
    margin-bottom: 1.5rem;
    font-size: 0.9rem;
    color: #666;
    padding-left: 1rem;
    list-style: disc;
}

/* Calendar Section */
.calendar-section {
    background: var(--white);
    padding: 2rem;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.05);
    margin-bottom: 3rem;
}

.calendar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 1px;
    background: #eee;
    border: 1px solid #eee;
}

.calendar-day-header {
    background: #f1f3f5;
    padding: 1rem;
    text-align: center;
    font-weight: 600;
}

.calendar-day {
    background: var(--white);
    min-height: 150px;
    padding: 0.5rem;
    position: relative;
    display: flex;
    flex-direction: column;
}

.calendar-day.empty {
    background: #fcfcfc;
}

.date-num {
    display: block;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

/* Event Chip (Card) */
.event-chip {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    background: transparent;
    border: none;
    padding: 0.5rem 0;
    margin-bottom: 1.5rem;
    min-height: auto;
    box-shadow: none;
    border-bottom: 1px dashed #eee;
}

/* Remove bottom border for last event */
.event-chip:last-child {
    border-bottom: none;
    margin-bottom: 0;
}

.event-content {
    flex-grow: 1;
}

.event-time {
    color: #888;
    font-size: 0.75rem;
    margin-bottom: 0.2rem;
    font-weight: 500;
}

/* More Info Button (Dots) */
.more-btn {
    background: none;
    border: none;
    color: #aaa;
    font-size: 1.2rem;
    line-height: 1;
    cursor: pointer;
    padding: 0 0.5rem;
    margin-top: -2px;
}

.more-btn:hover {
    color: #333;
}

/* Event Tooltip */
.event-tooltip {
    position: absolute;
    background: #333;
    color: #fff;
    padding: 1rem;
    border-radius: 8px;
    font-size: 0.85rem;
    line-height: 1.5;
    z-index: 10;
    max-width: 280px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
    white-space: pre-wrap; /* Preserve line breaks */
}

/* Tooltip Arrow (Optional) */
.event-tooltip::after {
    content: "";
    position: absolute;
    /* Adjust arrow position logic in JS or simplify with centered tooltip */
}

.event-title {
    font-weight: 700;
    margin-bottom: 0.2rem;
    line-height: 1.3;
    font-size: 0.95rem;
    color: #333;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.event-target {
    font-size: 0.75rem;
    color: #888; 
    background: transparent; 
    padding: 0; 
}

.event-info {
    font-size: 0.75rem;
    color: #666;
    margin-bottom: 0.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.wait-info {
    color: #999;
    font-size: 0.7rem;
}

.event-btn {
    display: block;
    width: 100%;
    padding: 0.3rem 0;
    border: none;
    border-radius: 4px;
    color: #fff;
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
    transition: opacity 0.2s;
}

.event-btn:hover {
    opacity: 0.9;
}

.btn-open {
    background-color: var(--status-open);
}

.btn-waitlist {
    background-color: var(--status-wait);
}

.btn-closed {
    background-color: var(--status-closed);
    cursor: not-allowed;
}

/* User Status Buttons */
.btn-applied {
    background-color: #3498db; /* Blue for confirmed application */
}

.btn-waiting-applied {
    background-color: #9b59b6; /* Purple for waitlist application */
}

.mobile-bottom-nav {
    display: none; /* Hidden by default (desktop) */
}

/* Quick Links Section */
.quick-links {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
    margin-bottom: 3rem;
}

.link-card {
    background: var(--white);
    padding: 2rem;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.05);
    text-align: center;
    transition: transform 0.3s;
    border: 1px solid #eee;
}

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

.link-card h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    color: var(--primary-color);
}

.link-card p {
    color: #666;
    margin-bottom: 1.5rem;
}

.btn {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    background: var(--primary-color);
    color: var(--white);
    border-radius: 6px;
    font-weight: 600;
    transition: background 0.3s;
}

.btn:hover {
    background: #34495e;
}

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

.btn.accent:hover {
    background: #d35400;
}

/* Recent Notices */
.recent-notices {
    background: var(--white);
    padding: 2rem;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.05);
}

.notice-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.notice-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem;
    border-bottom: 1px solid #eee;
}

.notice-item:last-child {
    border-bottom: none;
}

.notice-title {
    font-weight: 500;
    flex: 1;
}

.notice-date {
    color: #999;
    font-size: 0.875rem;
    margin-left: 1rem;
}

/* Notice Board Styles (notice.php) */
.notice-section {
    padding: 4rem 0;
}

.notice-container {
    background: var(--white);
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0,0,0,0.05);
}

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

.notice-table th {
    background: #f8f9fa;
    border-bottom: 2px solid #eee;
    padding: 1rem;
    font-weight: 600;
    color: var(--primary-color);
}

.notice-table td {
    padding: 1rem;
    border-bottom: 1px solid #eee;
    color: #666;
}

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

.notice-table th.no, .notice-table td.no {
    text-align: center;
    width: 60px;
}

.notice-table th.date, .notice-table td.date {
    text-align: center;
    width: 120px;
}

.notice-table th.subject {
    text-align: left;
}

.notice-table td.subject a {
    color: var(--text-color);
    transition: color 0.2s;
}

.notice-table td.subject a:hover {
    color: var(--accent-color);
    text-decoration: underline;
}

/* Footer */
footer {
    background: var(--primary-color);
    color: var(--white);
    padding: 3rem 0;
    margin-top: auto;
}

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

.footer-info h4 {
    font-size: 1.25rem;
    margin-bottom: 1rem;
}

.footer-info p {
    color: #bdc3c7;
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
}

/* Responsive */
@media (max-width: 1024px) {
    .menu-toggle {
        display: block;
    }

    nav {
        position: absolute;
        top: var(--header-height);
        left: 0;
        width: 100%;
        background: var(--white);
        padding: 1rem 0;
        box-shadow: 0 4px 4px rgba(0,0,0,0.1);
        display: none;
    }

    nav.active {
        display: block;
    }

    nav ul {
        flex-direction: column;
        gap: 0;
    }

    nav a {
        display: block;
        padding: 1rem 2rem;
    }

    .quick-links {
        grid-template-columns: 1fr;
    }
    
    .feature-grid {
        grid-template-columns: 1fr;
    }
    
    .program-grid {
        grid-template-columns: 1fr;
    }

    /* Mobile Calendar Layout */
    .calendar-grid {
        grid-template-columns: repeat(1, 1fr); /* Mobile: 1 column */
    }

    .calendar-day-header {
        display: none; /* Hide headers on mobile */
    }

    .calendar-day {
        min-height: auto;
        height: auto;
        border-bottom: 1px solid #eee;
        padding: 1rem;
        overflow-y: visible;
    }
    
    /* Hide Empty Days on Mobile */
    .calendar-day.empty,
    .calendar-day.no-event {
        display: none;
    }
    
    /* Show "Month + Date" on Mobile using pseudo-element content via JS attribute */
    .date-num {
        font-size: 0; /* Hide default number */
    }
    
    .date-num::after {
        content: attr(data-mobile-date);
        font-size: 1rem; /* Restore font size */
        display: block;
        padding: 0.5rem 0;
        background: #f8f9fa; /* Light background for header feel */
        margin: -1rem -1rem 1rem -1rem;
        padding: 0.75rem 1rem;
        border-bottom: 1px solid #eee;
    }

    .event-chip {
        min-height: auto; 
        margin-top: 0.5rem;
    }
    
    /* Mobile Calendar Header Layout */
    .calendar-header {
        flex-direction: column;
        gap: 1rem;
        align-items: center;
    }
    
    .calendar-nav {
        width: 100%;
        display: flex;
        justify-content: center; /* Center align items */
        align-items: center;
        gap: 1.5rem; /* Space between buttons and text */
    }
    
    /* Mobile Bottom Nav */
    .mobile-bottom-nav {
        display: flex;
        justify-content: center; /* Center align items */
        align-items: center;
        margin-top: 1.5rem;
        padding-top: 1rem;
        border-top: 1px solid #eee;
        gap: 1.5rem;
    }
    
    .footer-content {
        flex-direction: column;
        gap: 2rem;
    }
    
    /* Notice Table Mobile */
    .notice-table th.no, .notice-table td.no,
    .notice-table th.date, .notice-table td.date {
        display: none;
    }
    
    .notice-table th {
        display: none; /* Hide header completely on mobile */
    }
    
    .notice-table tr {
        display: block;
        border-bottom: 1px solid #eee;
        padding: 1rem;
    }
    
    .notice-table td {
        display: block;
        padding: 0;
        border: none;
    }
    
    .notice-table td.subject {
        margin-bottom: 0.5rem;
        font-weight: 500;
    }
    
    /* Show date below title on mobile */
    .notice-table td.date {
        display: block;
        font-size: 0.8rem;
        color: #999;
        text-align: left;
    }
}
