:root {
    /* Maintained Color Palette */
    --primary: #2C5282;          /* Compassion Blue */
    --primary-hover: #1E3B5E;    /* Darkened for hover */
    --secondary: #ED8936;        /* Earth Warmth / Action */
    --secondary-hover: #D47B31;  /* Darkened for hover */
    --bg-color: #F7FAFC;         /* Soft Paper */
    --urgent: #E53E3E;           /* Urgent Needs */
    --success: #38A169;          /* Success State */
    
    /* Variables used from previous styling */
    --nav-bg: var(--primary);    /* Using primary for a Material App Bar look */
    --nav-text: #FFFFFF;
    --text-main: #1A202C;
    --text-light: #4A5568;
    --shadow-nav: 0 4px 5px 0 rgba(0,0,0,0.14), 0 1px 10px 0 rgba(0,0,0,0.12), 0 2px 4px -1px rgba(0,0,0,0.20);
    --shadow-dropdown: 0 8px 10px 1px rgba(0,0,0,0.14), 0 3px 14px 2px rgba(0,0,0,0.12), 0 5px 5px -3px rgba(0,0,0,0.20);
}

body {
    margin: 0;
    padding: 0;
    font-family: 'Inter', sans-serif;
    background-color: var(--bg-color);
    color: var(--text-main);
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    min-height: 100dvh; /* Dynamic viewport height to account for mobile browser bottom navigation */
}

/* Navbar Styles (Material inspired App Bar) */
.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.5rem 1.5rem;
    background-color: var(--nav-bg);
    box-shadow: var(--shadow-nav);
    position: sticky;
    top: 0;
    z-index: 1000;
    height: 64px; /* Material standard height */
    color: var(--nav-text);
}

.nav-section {
    display: flex;
    align-items: center;
    position: relative;
}

.nav-btn {
    background: none;
    border: none;
    font-size: 1.5rem;
    color: var(--nav-text);
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 50%; /* Circular ripple effect area typical in Material */
    transition: background-color 0.2s, color 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
}

.nav-btn:hover {
    background-color: rgba(255, 255, 255, 0.15);
}

.navbar h1 {
    margin: 0;
    font-size: 1.5rem;
    font-weight: 600;
    letter-spacing: 0.5px;
    color: var(--nav-text);
}

/* Dropdown Menus */
.dropdown-menu {
    position: absolute;
    top: calc(100% + 10px);
    background: #FFFFFF;
    min-width: 220px;
    border-radius: 4px; /* Material dropdown radius */
    box-shadow: var(--shadow-dropdown);
    padding: 0.5rem 0;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    transform-origin: top left;
    transition: opacity 0.2s ease, transform 0.2s ease;
    opacity: 1;
    transform: scale(1);
}

.dropdown-menu.hidden {
    opacity: 0;
    transform: scale(0.95);
    pointer-events: none;
}

/* Specifically for left menu */
#hamburger-menu {
    left: 0;
    transform-origin: top left;
}

/* Specifically for right menu */
#user-menu {
    right: 0;
    transform-origin: top right;
}

.dropdown-menu a {
    padding: 12px 16px;
    text-decoration: none;
    color: var(--text-main);
    font-weight: 500;
    font-size: 1rem;
    display: flex;
    align-items: center;
    gap: 16px;
    transition: background-color 0.2s;
}

/* Custom icon colors in dropdown */
.dropdown-menu a i {
    color: var(--primary);
    width: 24px;
    text-align: center;
}

.dropdown-menu a:hover {
    background-color: #F3F4F6;
}

/* Content Area */
#content-area {
    flex: 1;
    display: flex;
    flex-direction: column;
    position: relative;
    max-width: 1200px;
    margin: 0 auto;
    width: 100%;
}

.centered-content {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 2.5rem;
    font-weight: 800;
    color: var(--text-light);
    animation: fadeIn 0.4s ease-out;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Materialize Helper Overrides */
/* Ensuring buttons adhere to the new palette */
.btn, .btn-large, .btn-small {
    background-color: var(--secondary);
}
.btn:hover, .btn-large:hover, .btn-small:hover {
    background-color: var(--secondary-hover);
}

.urgent-text {
    color: var(--urgent) !important;
}
.success-text {
    color: var(--success) !important;
}
.secondary-bg {
    background-color: var(--secondary) !important;
}
.secondary-bg:hover {
    background-color: var(--secondary-hover) !important;
}

/* Home Page Hero Section */
.home-hero {
    position: relative;
    width: 100%;
    min-height: calc(100vh - 64px); 
    min-height: calc(100dvh - 64px);
    overflow: hidden;
}

.hero-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center top;
    display: block;
}

/* Fade down to the primary color #2C5282 starting around half way */
.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to bottom, rgba(44, 82, 130, 0) 40%, var(--primary) 85%);
}

.hero-text-bottom {
    position: absolute;
    bottom: 2rem; /* Revert shift since the floating button moved */
    left: 2rem;
    width: calc(100% - 4rem);
    max-width: 900px;
    text-align: left; /* Left justify as requested */
    color: white;
    z-index: 2;
}

.hero-text-bottom p {
    font-size: 1.5rem;
    font-weight: 500;
    line-height: 1.4;
    text-shadow: 0 2px 4px rgba(0,0,0,0.5);
    margin: 0;
}

/* Action Button (Help Out - Upper Right) */
.help-out-btn {
    position: absolute; /* Absolute within the hero section */
    top: 2rem;
    right: 2rem;
    z-index: 10; /* Stay above content overlays but below the navbar dropdowns */
    background-color: var(--secondary) !important;
    border-radius: 24px; /* Rounded pill shape */
}

.help-out-btn:hover {
    background-color: var(--secondary-hover) !important;
}

/* Articles Section */
.articles-section {
    padding: 4rem 2rem;
    background-color: var(--bg-color);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2rem;
}

.articles-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2.5rem;
    width: 100%;
    max-width: 1100px;
}

.article-card {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    flex-direction: column;
}

.article-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 30px rgba(0,0,0,0.12);
}

.article-image-container {
    width: 100%;
    height: 200px;
    overflow: hidden;
}

.article-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.article-card:hover .article-image {
    transform: scale(1.05);
}

.article-content {
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    flex: 1;
}

.article-title {
    margin: 0 0 1rem 0;
    font-size: 1.4rem;
    color: var(--primary);
}

.article-text {
    font-size: 1rem;
    color: var(--text-light);
    line-height: 1.6;
    margin-bottom: 1.5rem;
    flex: 1;
}

.read-more-btn {
    align-self: flex-start;
    color: var(--secondary);
    font-weight: 800;
    padding: 0;
    text-transform: uppercase;
    display: flex;
    align-items: center;
    gap: 8px;
    background: none;
    border: none;
    cursor: pointer;
    transition: gap 0.2s ease;
}

.read-more-btn:hover {
    gap: 12px;
    background: none !important;
}

.read-more-btn i {
    font-size: 0.9rem;
}

/* Schedule Section */
.schedule-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
    width: 100%;
}

.event-card {
    background: #FFFFFF;
    border-radius: 8px;
    padding: 1.5rem;
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
    border-left: 5px solid var(--primary);
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    transition: transform 0.2s, box-shadow 0.2s;
}

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

.event-card.type-survey { border-left-color: var(--secondary); }
.event-card.type-distribution { border-left-color: var(--success); }
.event-card.type-gathering { border-left-color: var(--primary); }

.event-date {
    font-size: 0.95rem;
    color: var(--text-light);
    font-weight: 600;
}

.event-type {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 16px;
    font-size: 0.75rem;
    font-weight: 800;
    text-transform: uppercase;
    width: fit-content;
}

.event-description {
    font-size: 1.1rem;
    color: var(--text-main);
    font-weight: 500;
    line-height: 1.5;
    flex-grow: 1; /* Pushes participants to the bottom */
}

.event-participants {
    font-size: 0.85rem;
    color: var(--text-light);
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-top: 0.5rem;
    padding-top: 0.75rem;
    border-top: 1px solid #ECEFF1;
}
