:root {
    /* Colors tailored for a warm, welcoming village (trust, warmth, comfort) */
    --bg-main: #fcfbf9;
    /* Soft cream/off-white */
    --text-primary: #2C3631;
    /* Deep forest green / almost dark grey */
    --text-secondary: #5E6D66;
    --border-color: rgba(44, 54, 49, 0.15);

    --bg-sidebar: #1E3B32;
    /* Deep Trusting Green representing nature */
    --text-sidebar: #E8F0ED;
    --text-sidebar-muted: #95B4A7;
    --border-sidebar: rgba(232, 240, 237, 0.15);

    --accent: #E07A5F;
    /* Warm terracotta/orange for warmth and attention */
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', sans-serif;
    background-color: #E5E0D8;
    /* Outer background */
    color: var(--text-primary);
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    padding: 2rem;
}

.app-container {
    display: flex;
    width: 100%;
    max-width: 1400px;
    height: 90vh;
    min-height: 800px;
    background-color: var(--bg-main);
    box-shadow: 0 40px 80px -20px rgba(0, 0, 0, 0.2);
    border-radius: 12px;
    overflow: hidden;
}

/* MAIN PANEL */
.main-panel {
    flex: 1;
    display: flex;
    flex-direction: column;
    padding: 2.5rem 3.5rem;
    /* Reduced top/bottom padding */
    position: relative;
    overflow: hidden;
    /* Prevent scrolling */
}



.header-top {
    margin-bottom: 1rem;
    /* Reduced from 2rem */
}

.subtitle {
    font-size: 0.65rem;
    font-weight: 600;
    letter-spacing: 0.15em;
    color: var(--text-secondary);
    margin-bottom: 0.75rem;
}

.logo {
    font-size: 1.5rem;
    /* Reduced from 2rem */
    font-weight: 700;
    line-height: 1.1;
    letter-spacing: -0.02em;
}

/* Hero Section capturing the vibe of the original big text + image */
.hero-section {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    /* Reduced to bring layout up */
    padding-bottom: 1.5rem;
    border-bottom: 1px solid var(--border-color);
    gap: 3rem;
}

.hero-text-block {
    flex: 1;
}

.section-label {
    font-size: 0.65rem;
    font-weight: 600;
    letter-spacing: 0.15em;
    color: var(--text-secondary);
    margin-bottom: 1rem;
}

.hero-title {
    font-size: 3.5rem;
    /* Reduced from 5rem */
    font-weight: 300;
    line-height: 0.95;
    letter-spacing: -0.04em;
    color: var(--text-primary);
}

.hero-title .outline {
    font-weight: 600;
    color: transparent;
    -webkit-text-stroke: 1.5px var(--text-primary);
}

.hero-image-block {
    position: relative;
    width: 60%;
    height: 240px;
    /* Increased size */
    border-radius: 12px;
    overflow: hidden;
}

.hero-image-block .carousel-img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: brightness(0.9);
    opacity: 0;
    transition: opacity 1s ease-in-out;
}

.hero-image-block .carousel-img.active {
    opacity: 1;
}

.big-number {
    position: absolute;
    bottom: -1rem;
    right: 1rem;
    font-size: 4rem;
    /* Reduced relative to 6rem */
    font-weight: 300;
    line-height: 1;
    color: rgba(255, 255, 255, 0.8);
    opacity: 0.7;
}

/* Layout Grid */
.layout-grid {
    display: flex;
    flex: 1;
}

/* Navigation */
.side-nav {
    width: 200px;
    padding-right: 2rem;
    border-right: 1px solid var(--border-color);
}

.side-nav ul {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.side-nav a {
    text-decoration: none;
    color: var(--text-secondary);
    font-size: 1.25rem;
    font-weight: 400;
    display: flex;
    align-items: baseline;
    gap: 0.5rem;
    transition: color 0.2s;
}

.side-nav a:hover,
.side-nav a.active {
    color: var(--text-primary);
    font-weight: 500;
}

.side-nav .num {
    font-size: 1rem;
    opacity: 0.6;
}

/* Content Area */
.content-area {
    flex: 1;
    display: flex;
    flex-direction: column;
    padding-left: 3rem;
    overflow-y: auto;
    /* Allow inner scrolling if needed to fully see cards */
}

.content-area::-webkit-scrollbar {
    display: none;
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
}

.service-card {
    text-decoration: none;
    color: inherit;
    padding: 1.5rem 2rem;
    /* Reduced top-bottom padding to condense height */
    border-bottom: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    justify-content: center;
    transition: background-color 0.2s;
    min-height: 120px;
    /* Reduced for single page fit */
}

.service-card:nth-child(odd) {
    border-right: 1px solid var(--border-color);
}

.service-card:hover {
    background-color: rgba(44, 54, 49, 0.03);
}

.card-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    color: var(--text-secondary);
}

.svc-id {
    font-size: 0.65rem;
    font-weight: 600;
    letter-spacing: 0.1em;
}

.card-icon {
    margin-bottom: 1.5rem;
}

.card-icon i {
    width: 28px;
    height: 28px;
    stroke-width: 1.5;
    color: var(--text-primary);
}

.service-card h3 {
    font-size: 1.1rem;
    font-weight: 500;
    line-height: 1.3;
}

.icon-sm {
    width: 16px;
    height: 16px;
    opacity: 0.7;
}

/* Hide old announcements in middle CSS to avoid layout breaks, replace with sidebar ones */

/* Footer */
.main-footer {
    position: absolute;
    bottom: 3.5rem;
    left: 3.5rem;
    font-size: 0.65rem;
    font-weight: 600;
    color: var(--text-secondary);
    letter-spacing: 0.1em;
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

/* SIDEBAR */
.sidebar {
    width: 320px;
    background-color: var(--bg-sidebar);
    color: var(--text-sidebar);
    padding: 3.5rem 3rem;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}



.sidebar-middle {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.announcements-sidebar {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.sidebar-section-header {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    border-bottom: 1px solid var(--border-sidebar);
    padding-bottom: 0.75rem;
    margin-bottom: 0.5rem;
}

.sidebar-section-header h4 {
    font-size: 0.65rem;
    font-weight: 600;
    color: var(--text-sidebar-muted);
    letter-spacing: 0.15em;
}

.view-all-sidebar {
    font-size: 0.6rem;
    font-weight: 600;
    letter-spacing: 0.1em;
    color: var(--text-sidebar-muted);
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 0.25rem;
    transition: color 0.2s;
}

.view-all-sidebar:hover {
    color: var(--text-sidebar);
}

.announcement-list-sidebar {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.announcement-sidebar {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.announcement-sidebar .badge {
    align-self: flex-start;
    display: inline-block;
    padding: 0.2rem 0.5rem;
    border-radius: 4px;
    font-size: 0.6rem;
    font-weight: 700;
    letter-spacing: 0.05em;
}

.announcement-sidebar .badge.urgent {
    background-color: var(--accent);
    color: #FFF;
}

.announcement-sidebar .badge.community {
    background-color: rgba(232, 240, 237, 0.1);
    color: var(--text-sidebar-muted);
}

.announcement-sidebar p {
    font-size: 0.85rem;
    line-height: 1.5;
    color: var(--text-sidebar);
}

.sidebar-bottom {
    margin-top: 2rem;
}

.emergency-box {
    background-color: var(--accent);
    padding: 2rem;
    color: #FFF;
    position: relative;
    border-radius: 4px;
}

.emergency-box::before {
    content: '';
    position: absolute;
    bottom: -6px;
    right: -6px;
    width: 100%;
    height: 100%;
    background-color: rgba(224, 122, 95, 0.3);
    /* Lighter accent color for drop shadow effect */
    z-index: -1;
    border-radius: 4px;
}

.emergency-box .label {
    font-size: 0.65rem;
    font-weight: 700;
    letter-spacing: 0.15em;
    margin-bottom: 1.5rem;
    color: rgba(255, 255, 255, 0.8);
}

.contact-link {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 1.5rem;
    font-weight: 400;
    color: #FFF;
    text-decoration: none;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.3);
}

.contact-info {
    font-size: 0.8rem;
    line-height: 1.5;
    color: rgba(255, 255, 255, 0.9);
}

/* Responsive */
@media (max-width: 1024px) {
    body {
        padding: 0;
    }

    .app-container {
        flex-direction: column;
        height: auto;
        border-radius: 0;
    }

    .hero-section {
        flex-direction: column;
        align-items: flex-start;
    }

    .hero-image-block {
        width: 100%;
    }

    .layout-grid {
        flex-direction: column;
    }

    .side-nav {
        width: 100%;
        margin-bottom: 2rem;
    }

    .side-nav ul {
        flex-direction: row;
        overflow-x: auto;
    }

    .sidebar {
        width: 100%;
        flex-direction: row;
        flex-wrap: wrap;
        gap: 2rem;
    }
}