:root {
    --card-bg: rgba(255, 255, 255, 0.9);
    --col-bg: rgba(255, 255, 255, 0.15);
    --text-dark: #2C3E50;
    --text-light: #F8F9FA;
    --accent: #84A98C;
}

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

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background-color: #000000;
    color: var(--text-dark);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    position: relative;
    z-index: 0;
}

body::before {
    content: "";
    position: fixed;
    top: 10vh;
    left: 5vw;
    width: 90vw;
    height: 80vh;
    background: url('background.jpg') center/contain no-repeat;
    opacity: 0.5;
    z-index: -1;
    pointer-events: none;
}

.page-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
    padding: 0 5vw;
    min-height: 90vh;
}

.header {
    text-align: center;
    padding: 2.5rem 1rem 1.5rem;
    color: var(--text-light);
}

.header h1 {
    font-size: 2.8rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    text-shadow: 0 2px 10px rgba(0,0,0,0.5);
    letter-spacing: -0.5px;
}

.top-intro-container {
    width: 100%;
    max-width: none;
    display: flex;
    justify-content: center;
    margin-top: 2rem;
    z-index: 10;
}

.top-intro-container .intro-panel {
    width: 100%;
}

.main-layout {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    padding: 0 0 2rem 0;
    margin-top: 2rem;
    gap: 2rem;
    width: 100%;
    max-width: none;
    flex: 1;
    overflow-x: visible;
}

.side-panel {
    flex: 0 0 auto;
    align-self: flex-end;
}

.photo-panel {
    background: var(--card-bg);
    padding: 1rem;
    border-radius: 16px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
    backdrop-filter: blur(8px);
    width: 20vw;
    min-width: 250px;
    max-width: 320px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.photo-panel:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.2);
}

.photo-panel h2 {
    font-size: 1.3rem;
    margin-bottom: 1rem;
    color: var(--text-dark);
    font-weight: 600;
    text-align: center;
}

.img-wrapper {
    width: 100%;
    border-radius: 8px;
    overflow: hidden;
    background: #e0e0e0;
}

.panel-img {
    width: 100%;
    height: auto;
    display: block;
    transition: transform 0.5s ease;
}

.photo-panel:hover .panel-img {
    transform: scale(1.02);
}

/* Custom Scrollbar for layout */
.main-layout::-webkit-scrollbar {
    height: 10px;
}
.main-layout::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
    margin: 0 2.5rem;
}
.main-layout::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.3);
    border-radius: 4px;
}

.center-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
    flex: 1 1 auto;
    width: 100%;
    min-width: 0;
    gap: 2rem;
}

.comm-history-panel, .intro-panel {
    background: var(--card-bg);
    padding: 1.5rem 2.5rem;
    border-radius: 16px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
    backdrop-filter: blur(8px);
    width: 100%;
    min-width: 300px; /* Fixed from 600px to avoid cutoff */
    text-align: left;
    box-sizing: border-box;
}

.comm-history-panel h2, .intro-panel h2 {
    color: var(--text-dark);
    margin-bottom: 1rem;
    font-size: 1.4rem;
    font-weight: 600;
    border-bottom: 2px solid rgba(0,0,0,0.1);
    padding-bottom: 0.5rem;
}

.history-content, .intro-content {
    color: #555;
    font-size: 1rem;
    line-height: 1.5;
}

.history-content p, .intro-content p {
    margin-bottom: 1rem;
}

.history-content ul, .intro-content ul {
    margin-left: 1.5rem;
    margin-bottom: 1rem;
    list-style-type: disc;
}

.history-content ol, .intro-content ol {
    margin-left: 1.5rem;
    margin-bottom: 1rem;
    list-style-type: decimal;
}

.history-content li, .intro-content li {
    margin-bottom: 0.25rem;
}

.history-content ul ul, .intro-content ul ul,
.history-content ol ol, .intro-content ol ol,
.history-content ul ol, .intro-content ul ol,
.history-content ol ul, .intro-content ol ul {
    margin-bottom: 0;
}

.center-panel {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.5rem;
    width: 100%;
    align-items: start;
}

.column {
    background: var(--col-bg);
    border-radius: 16px;
    width: 100%;
    max-width: 100%;
    padding: 1.25rem;
    display: flex;
    flex-direction: column;
    max-height: calc(100vh - 150px);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-sizing: border-box;
}

.column-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.25rem;
    padding-bottom: 0.75rem;
    border-bottom: 2px solid rgba(255, 255, 255, 0.2);
}

.column-title {
    color: var(--text-light);
    font-size: 1.2rem;
    font-weight: 600;
    text-shadow: 0 1px 4px rgba(0,0,0,0.5);
}

.card-count {
    background: rgba(255, 255, 255, 0.2);
    color: var(--text-light);
    padding: 0.2rem 0.6rem;
    border-radius: 12px;
    font-size: 0.85rem;
    font-weight: 600;
}

.cards-container {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    overflow-y: auto;
    flex: 1;
    padding-right: 0.5rem;
}

/* Custom Scrollbar for cards */
.cards-container::-webkit-scrollbar {
    width: 6px;
}
.cards-container::-webkit-scrollbar-track {
    background: transparent;
}
.cards-container::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.4);
    border-radius: 4px;
}

.card {
    background: var(--card-bg);
    border-radius: 10px;
    padding: 1.25rem;
    box-shadow: 0 4px 6px rgba(0,0,0,0.05);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    cursor: default;
    border-left: 4px solid var(--accent);
}

.card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 16px rgba(0,0,0,0.1);
}

.card h3 {
    font-size: 1.05rem;
    margin-bottom: 0.5rem;
    color: #2c3e50;
    font-weight: 600;
}

.card p {
    font-size: 0.9rem;
    color: #555;
    line-height: 1.5;
}

.admin-link {
    position: fixed;
    bottom: 1rem;
    right: 1.5rem;
    color: rgba(255, 255, 255, 0.6);
    text-decoration: none;
    font-size: 0.85rem;
    font-weight: 600;
    transition: color 0.3s;
}

.admin-link:hover {
    color: white;
}

@media (max-width: 1400px) {
    .main-layout {
        flex-direction: column;
        align-items: center;
        gap: 3rem;
    }
}

@media (max-width: 768px) {
    .photo-panel {
        width: 100%;
        max-width: 100%;
    }
    
    .center-panel {
        margin-top: 2rem;
    }
    
    .main-layout {
        margin-top: 150px;
    }
    
    .comm-history-panel, .intro-panel {
        padding: 1rem 1.5rem;
    }
}
