/* Google Fonts Import */
@import url('https://fonts.googleapis.com/css2?family=Noto+Sans+KR:wght@300;400;500;700&family=Outfit:wght@400;600;700&display=swap');

:root {
    /* Color Palette */
    --color-bg-page: #FDFBF7;
    /* Warm Off-white */
    --color-bg-white: #FFFFFF;

    --color-primary: #C05621;
    /* Warm Terracotta - Energy & Warmth */
    --color-primary-light: #FBD38D;

    --color-secondary: #2C5282;
    /* Trustworthy Blue - Professionalism */
    --color-secondary-dark: #1A365D;

    --color-text-main: #2D3748;
    /* Dark Grey - Readability */
    --color-text-light: #718096;

    --shadow-card: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-float: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);

    --container-width: 1200px;
    --header-height: 80px;
}

/* Reset & Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Noto Sans KR', 'Outfit', sans-serif;
    background-color: var(--color-bg-page);
    color: var(--color-text-main);
    line-height: 1.6;
    overflow-x: hidden;
}

a {
    text-decoration: none;
    color: inherit;
    transition: color 0.3s ease;
}

ul {
    list-style: none;
}

.container {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 20px;
}

/* Header & Navigation */
header {
    height: var(--header-height);
    background-color: var(--color-bg-page);
    /* Transparent feeling initially */
    display: flex;
    align-items: center;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
}

.logo a {
    font-family: 'Outfit', sans-serif;
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--color-secondary);
    letter-spacing: -0.5px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.logo span {
    color: var(--color-primary);
}

nav ul {
    display: flex;
    gap: 32px;
}

nav a {
    font-weight: 500;
    font-size: 1rem;
    color: var(--color-text-main);
}

nav a:hover {
    color: var(--color-primary);
}

/* Hero Section */
.hero {
    height: 80vh;
    min-height: 600px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 0 20px;
    background: radial-gradient(circle at 50% 50%, #ffffff 0%, var(--color-bg-page) 100%);
}

.hero-content h1 {
    font-family: 'Outfit', sans-serif;
    font-size: 4rem;
    font-weight: 700;
    color: var(--color-secondary-dark);
    margin-bottom: 24px;
    line-height: 1.2;
    letter-spacing: -1px;
}

.hero-content p {
    font-size: 1.5rem;
    color: var(--color-text-light);
    max-width: 600px;
    margin: 0 auto 48px;
    font-weight: 300;
}

.cta-button {
    display: inline-block;
    padding: 16px 48px;
    background-color: var(--color-primary);
    color: white;
    font-weight: 600;
    border-radius: 50px;
    font-size: 1.1rem;
    box-shadow: var(--shadow-float);
    transition: transform 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease;
}

.cta-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    background-color: #A04115;
    /* Darker Terracotta */
}

/* Footer & Bottom Menu */
footer {
    background-color: var(--color-bg-white);
    padding: 80px 0 40px;
    border-top: 1px solid rgba(0, 0, 0, 0.05);
}

.footer-grid {
    display: flex;
    flex-wrap: wrap;
    /* Default for mobile */
    gap: 25px;
    margin-bottom: 60px;
}

@media (min-width: 900px) {
    .footer-grid {
        flex-wrap: nowrap;
    }
}

/* Force the first column (Logo) to push others to the right */
.footer-column:first-child {
    margin-right: auto;
    flex: 1 1 300px;
    /* Allow logo section to be wider */
    max-width: 450px;
}

/* Specific width for Contact column to prevent wrapping */
.footer-column:last-child {
    min-width: 300px;
    flex-shrink: 0;
    /* Prevent shrinking */
}

.footer-column:last-child p {
    white-space: nowrap;
}

/* Specific width for Materials to keep text on one line */
.footer-column:nth-child(5) {
    min-width: 180px;
}

/* Standardize other columns */
.footer-column {
    flex: 0 1 auto;
    min-width: 140px;
    /* Prevent crushing on mobile */
}

/* Center align specific columns as requested */
.footer-column:nth-child(2),
.footer-column:nth-child(3),
.footer-column:nth-child(4),
.footer-column:nth-child(5) {
    text-align: center;
}

.footer-column h3 {
    font-family: 'Outfit', sans-serif;
    font-size: 1.2rem;
    color: var(--color-secondary);
    margin-bottom: 24px;
    font-weight: 600;
}

.footer-column p {
    margin-bottom: 16px;
    line-height: 1.6;
}

.footer-links li {
    margin-bottom: 12px;
}

.footer-links a {
    color: var(--color-text-main);
    /* Darker for better visibility */
    font-size: 1.05rem;
    /* Slightly larger */
    font-weight: 500;
    /* Medium weight */
    padding: 4px 0;
    display: inline-block;
}

.footer-links a:hover {
    color: var(--color-primary);
    transform: translateY(-2px);
    /* Slight lift instead of shift right */
    text-decoration: underline;
    text-underline-offset: 4px;
}

.footer-bottom {
    text-align: center;
    padding-top: 40px;
    border-top: 1px solid rgba(0, 0, 0, 0.05);
    color: #A0AEC0;
    font-size: 0.9rem;
}

/* Utilities for icons (if using SVG explicitly) */
.icon {
    width: 24px;
    height: 24px;
    vertical-align: middle;
    margin-right: 4px;
}

/* Responsive */
@media (max-width: 768px) {

    /* Footer Mobile Optimization */
    .footer-grid {
        flex-direction: column;
        align-items: center;
        gap: 40px;
    }

    /* Force all footer columns to be full width and center aligned */
    .footer-column {
        width: 100% !important;
        max-width: 100% !important;
        margin: 0 !important;
        text-align: center !important;
        min-width: auto !important;
        display: block !important;
        /* Reset flex if present */
    }

    /* Target specific children to ensure they center */
    .footer-column h3,
    .footer-column p,
    .footer-column ul,
    .footer-column li,
    .footer-column a {
        text-align: center !important;
        width: 100%;
    }

    .footer-links {
        padding: 0 !important;
        display: flex;
        flex-direction: column;
        align-items: center;
    }

    .footer-column:last-child p {
        white-space: normal !important;
    }

    .hero-content h1 {
        font-size: 2.5rem;
    }

    nav {
        display: block;
    }

    nav ul {
        gap: 15px;
    }

    nav a {
        font-size: 0.95rem;
    }
}

/* Split Layout for Paper S */
.split-container {
    display: flex;
    height: calc(100vh - var(--header-height));
    min-height: 600px;
    max-width: 1400px;
    margin: 0 auto;
    padding: 20px;
}

.split-left {
    width: 50%;
    display: flex;
    flex-direction: column;
    border-right: 1px solid rgba(0, 0, 0, 0.1);
}

.split-top {
    flex: 1;
    padding: 40px;
    overflow-y: auto;
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
    background-color: var(--color-bg-white);
}

.split-bottom {
    flex: 1;
    padding: 40px;
    overflow-y: auto;
    background-color: #faf9f7;
    /* Slightly different shade */
}

.split-right {
    width: 50%;
    background-color: #f0f0f0;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    position: relative;
}

.split-right img,
.split-right embed,
.split-right object {
    width: 100%;
    height: 100%;
    object-fit: contain;
    padding: 0;
    display: block;
}

.split-section-title {
    font-family: 'Outfit', sans-serif;
    font-size: 1.5rem;
    color: var(--color-primary);
    margin-bottom: 20px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 10px;
}

.split-content {
    font-size: 1.1rem;
    color: var(--color-text-main);
    line-height: 1.8;
}

/* Paper Board Styles */
.paper-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 30px;
}

.paper-card {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: var(--shadow-card);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    cursor: pointer;
    border: 1px solid rgba(0, 0, 0, 0.05);
    position: relative;
    display: flex;
    flex-direction: column;
}

.paper-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-float);
}

.paper-card-img {
    height: 200px;
    background-color: #f7fafc;
    overflow: hidden;
}

.paper-card-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.paper-card-content {
    padding: 24px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.paper-card-date {
    font-size: 0.85rem;
    color: var(--color-text-light);
    margin-bottom: 8px;
}

.paper-card-title {
    font-family: 'Outfit', sans-serif;
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--color-text-main);
    margin-bottom: 12px;
    line-height: 1.4;
}

.paper-card-summary {
    font-size: 0.95rem;
    color: var(--color-text-light);
    line-height: 1.6;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.delete-btn {
    position: absolute;
    top: 10px;
    right: 10px;
    background: rgba(255, 255, 255, 0.9);
    border: 1px solid #e53e3e;
    color: #e53e3e;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 0.8rem;
    cursor: pointer;
    opacity: 0;
    transition: opacity 0.2s ease;
}

.paper-card:hover .delete-btn {
    opacity: 1;
}

.delete-btn:hover {
    background: #e53e3e;
    color: white;
}

/* Login Modal Styles */
.login-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(253, 251, 247, 0.95);
    /* Slight transparency on page bg */
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(5px);
}

.login-modal {
    background: white;
    padding: 40px;
    border-radius: 16px;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    width: 100%;
    max-width: 400px;
    text-align: center;
    border: 1px solid rgba(0, 0, 0, 0.05);
}

/* Custom adjustment to move Activities, Paper S, and Resources left */
@media (min-width: 769px) {
    .footer-column:last-child {
        margin-right: -100px;
        margin-left: 60px;
    }
}