/* AMITI Custom Styles - Next.js globals.css 동일 */

:root {
    --primary: #0033CC;
    --primary-dark: #002299;
    --primary-light: #3366E6;
    --secondary: #042D7D;
    --secondary-light: #1A4A9A;
    --accent: #008195;
    --accent-dark: #006B7A;
    --accent-light: #00A3B5;
    --safety: #E04500;
    --robotics: #006699;
    --robotics-light: #0088CC;

    --text-primary: #1A1A2E;
    --text-secondary: #4A4A5A;
    --text-light: #8B8B9A;
    --text-mono: #8B949E;

    --bg-section: #F0F2F8;
    --bg-card: #F5F5F8;
    --bg-dark: #0A1628;

    --border: #D0D0DA;
    --border-light: #E5E7EB;
    --border-tech: rgba(255, 255, 255, 0.1);
}

/* Base */
html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Pretendard', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    color: var(--text-primary);
    -webkit-font-smoothing: antialiased;
}

/* ====================== */
/* Container (from globals.css) */
/* ====================== */
.container-custom {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 2rem;
}

/* Glass effect for GNB (from globals.css) */
.glass {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}

.shadow-glass {
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05), 0 4px 12px rgba(0, 0, 0, 0.04);
}

/* Skip to content */
.skip-link {
    position: absolute;
    top: -100%;
    left: 0;
    background: var(--primary);
    color: white;
    padding: 8px 16px;
    z-index: 100;
    transition: top 0.3s;
}
.skip-link:focus {
    top: 0;
}

/* ====================== */
/* GNB Header (matching GNB.tsx) */
/* ====================== */
.gnb-header {
    position: sticky;
    top: 0;
    z-index: 50;
    transition: box-shadow 0.3s ease;
}
.gnb-header.scrolled {
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
}

/* GNB Dropdown (matching GNB.tsx) */
.gnb-menu-item {
    position: relative;
}

.gnb-dropdown {
    opacity: 0;
    visibility: hidden;
    transform: translateY(-4px);
    transition: all 0.2s ease;
}

.gnb-menu-item:hover .gnb-dropdown {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

/* ====================== */
/* Mobile menu */
/* ====================== */
.mobile-menu {
    position: fixed;
    top: 0;
    right: -100%;
    width: 300px;
    max-width: 85vw;
    height: 100vh;
    height: 100dvh;
    background: white;
    z-index: 100;
    overflow-y: auto;
    transition: right 0.3s ease;
    box-shadow: -5px 0 20px rgba(0,0,0,0.2);
}
.mobile-menu.open {
    right: 0;
}
.mobile-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    z-index: 99;
}
.mobile-overlay.open {
    display: block;
}

.mobile-menu-section {
    border-bottom: 1px solid var(--border-light);
}
.mobile-menu-title {
    padding: 14px 20px;
    font-weight: 700;
    color: var(--secondary);
    background: #F8F9FA;
    font-size: 0.95rem;
}
.mobile-menu-link {
    display: block;
    padding: 10px 20px 10px 36px;
    color: var(--text-secondary);
    font-size: 0.9rem;
    transition: all 0.2s;
}
.mobile-menu-link:hover {
    background-color: #F3F4F6;
    color: var(--primary);
}

/* ====================== */
/* Sub Header (Breadcrumb) */
/* ====================== */
.sub-header {
    background: linear-gradient(135deg, var(--secondary) 0%, #0A1628 100%);
    color: white;
    padding: 4rem 0 3rem;
    position: relative;
    overflow: hidden;
}
.sub-header::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 50%;
    height: 100%;
    background: radial-gradient(circle at 80% 50%, rgba(0,51,204,0.15) 0%, transparent 70%);
}

/* ====================== */
/* Hero Banner (matching HeroBanner.tsx) */
/* ====================== */
.hero-section {
    position: relative;
    min-height: 70vh;
    display: flex;
    align-items: center;
    overflow: hidden;
    max-width: calc(100% - 32px);
    margin: 0 auto;
}

.hero-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 1s ease;
}
.hero-slide.active {
    opacity: 1;
}

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

/* ====================== */
/* Organization Chart */
/* ====================== */
.org-chart {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2rem;
}
.org-node {
    padding: 12px 24px;
    border-radius: 8px;
    font-weight: 600;
    text-align: center;
    min-width: 140px;
    position: relative;
}
.org-director {
    background: var(--secondary);
    color: white;
    font-size: 1.1rem;
    padding: 16px 32px;
}
.org-division {
    background: var(--primary);
    color: white;
}
.org-team {
    background: #E8EDFF;
    color: var(--secondary);
    border: 1px solid #C7D2FE;
}

.org-connector-v {
    width: 2px;
    height: 24px;
    background: var(--border);
    margin: 0 auto;
}
.org-connector-h {
    height: 2px;
    background: var(--border);
}

/* ====================== */
/* Vision page */
/* ====================== */
.vision-card {
    background: white;
    border-radius: 16px;
    padding: 2rem;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.06);
    transition: all 0.3s ease;
    border-top: 4px solid transparent;
}
.vision-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.12);
}

/* ====================== */
/* Pagination */
/* ====================== */
.pagination {
    display: flex;
    justify-content: center;
    gap: 4px;
    margin-top: 2rem;
}
.pagination a,
.pagination span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 8px;
    font-size: 0.9rem;
    color: var(--text-secondary);
    transition: all 0.2s;
}
.pagination a:hover {
    background-color: #F3F4F6;
    color: var(--primary);
}
.pagination .active {
    background-color: var(--primary);
    color: white;
    font-weight: 600;
}

/* ====================== */
/* Board Table */
/* ====================== */
.board-table {
    width: 100%;
    border-top: 2px solid var(--secondary);
}
.board-table th {
    background: #F8F9FA;
    padding: 12px 16px;
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--text-secondary);
    border-bottom: 1px solid var(--border-light);
}
.board-table td {
    padding: 14px 16px;
    border-bottom: 1px solid var(--border-light);
    font-size: 0.95rem;
}
.board-table tr:hover td {
    background: #F8FAFF;
}

/* ====================== */
/* News card */
/* ====================== */
.news-card {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
    transition: all 0.3s ease;
}
.news-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.1);
}

/* ====================== */
/* Admin sidebar */
/* ====================== */
.admin-sidebar {
    width: 260px;
    background: var(--secondary);
    min-height: 100vh;
    color: white;
}
.admin-sidebar a {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 20px;
    color: rgba(255,255,255,0.7);
    transition: all 0.2s;
    font-size: 0.95rem;
}
.admin-sidebar a:hover,
.admin-sidebar a.active {
    background: rgba(255,255,255,0.1);
    color: white;
}

/* ====================== */
/* Button styles */
/* ====================== */
.btn-primary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 24px;
    background: var(--primary);
    color: white;
    border-radius: 8px;
    font-weight: 500;
    transition: all 0.2s;
    border: none;
    cursor: pointer;
    text-decoration: none;
}
.btn-primary:hover {
    background: var(--primary-dark);
}
.btn-secondary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 24px;
    background: white;
    color: var(--text-primary);
    border: 1px solid var(--border);
    border-radius: 8px;
    font-weight: 500;
    transition: all 0.2s;
    cursor: pointer;
    text-decoration: none;
}
.btn-secondary:hover {
    background: #F3F4F6;
}

/* ====================== */
/* Badge */
/* ====================== */
.badge {
    display: inline-block;
    padding: 2px 10px;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 600;
    white-space: nowrap;
}
.badge-notice { background: #DBEAFE; color: #1E40AF; }
.badge-press { background: #D1FAE5; color: #065F46; }
.badge-recruit { background: #FEE2E2; color: #991B1B; }
.badge-activity { background: #E0E7FF; color: #3730A3; }
.badge-pinned { background: #FEF3C7; color: #92400E; }

/* ====================== */
/* Animations */
/* ====================== */
@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}
.fade-in-up {
    animation: fadeInUp 0.6s ease forwards;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}
.animate-pulse {
    animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

/* ====================== */
/* Search input */
/* ====================== */
.search-input {
    width: 100%;
    padding: 14px 20px 14px 48px;
    border: 2px solid var(--border-light);
    border-radius: 12px;
    font-size: 1rem;
    transition: border-color 0.2s;
    outline: none;
}
.search-input:focus {
    border-color: var(--primary);
}

/* ====================== */
/* Form */
/* ====================== */
.form-group {
    margin-bottom: 1.25rem;
}
.form-label {
    display: block;
    font-weight: 600;
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
    color: var(--text-primary);
}
.form-input {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid var(--border);
    border-radius: 8px;
    font-size: 0.95rem;
    transition: border-color 0.2s;
    outline: none;
}
.form-input:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(0,51,204,0.1);
}

/* ====================== */
/* News Tab (matching RecentNews.tsx) */
/* ====================== */
.news-tab {
    padding: 0.75rem 1.5rem;
    border-radius: 0.5rem;
    font-size: 0.875rem;
    font-weight: 600;
    transition: all 0.2s;
    cursor: pointer;
    border: 1px solid transparent;
}
.news-tab.active {
    background: var(--primary);
    color: white;
}
.news-tab:not(.active) {
    background: white;
    color: var(--text-secondary);
    border-color: var(--border);
}
.news-tab:not(.active):hover {
    background: #F3F4F6;
}

/* ====================== */
/* Responsive */
/* ====================== */
@media (min-width: 768px) {
    .hero-section {
        min-height: 80vh;
        max-width: calc(100% - 60px);
    }
}

@media (max-width: 768px) {
    .container-custom {
        padding: 0 1rem;
    }
    .sub-header {
        padding: 2.5rem 0 1.5rem;
    }
    .sub-header h1 {
        font-size: 1.5rem;
    }
    .board-table .hide-mobile {
        display: none;
    }
    .board-table td,
    .board-table th {
        padding: 10px 8px;
        font-size: 0.85rem;
    }
    /* Disable heavy backdrop-filter on mobile for performance */
    .glass {
        backdrop-filter: none;
        -webkit-backdrop-filter: none;
        background: rgba(255, 255, 255, 0.98);
    }
}

/* ====================== */
/* Print styles */
/* ====================== */
@media print {
    .gnb-header, .site-footer, .mobile-menu, .mobile-overlay {
        display: none;
    }
}

/* ====================== */
/* Reduced Motion */
/* ====================== */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}
