/* --- General Styles --- */

.background-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(26, 26, 26, 0.8);
    z-index: 0; 
}

.navbar {
    padding: 15px 30px;
    flex: 1;
    justify-content: space-between;
    align-items: center;
    position: relative;
    max-width: 1200px;
    z-index: 2; 
}

.hamburger-container {
    position: relative;
}

.hamburger {
    display: none;
    font-size: 30px;
    cursor: pointer;
    color: #ff9900;
}

main {
    animation: slideUp 1.5s ease-out forwards;
}
/* --- Hero Section --- */

.hero-poverty {
    display: flex;
    justify-content: center;
    align-items: center;
    text-align: center;
    min-height: 55vh;
    box-sizing: border-box;
    padding: 25%;
    overflow-y: auto;
    position: relative;
    z-index: 1;
}

.hero-content {
    max-width: 800px;
    margin: 0 auto;
    margin-top: -0px;
}

.hero-poverty h1 {
    color: #ff9900;
    font-size: 4rem; 
    margin-bottom: 20px;
    margin-top: -90px;
}

.hero-poverty .info-points {
    list-style: none;
    padding: 0;
    font-size: 1.2rem;
    line-height: 1.8;
    text-align: left;
    margin: 0 auto; 
    color: #f0f0f0; 
}

.hero-poverty .info-points li {
    margin-bottom: 15px;
}

.hero-poverty hr {
    margin-top: 30px;
    border: 0;
    height: 2px;
    background: #ff9900;
    width: 50%; 
    margin: 40px auto;
}

/* --- Statistics Section --- */

.statistics {
    padding: 50px 10%;
    text-align: center;
    color: #f0f0f0;
    box-sizing: border-box;
    min-height: 100vh; 
    margin-top: 0;
    overflow-y: auto; 
    position: relative;
    z-index: 1; 
}

.statistics h2 {
    font-size: 2.5rem;
    margin-top: -50px;
    margin-bottom: 40px;
    font-weight: bold;
    color: #ff9900;
}

.stats-container {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin: 0;
    padding: 0;
    flex-wrap: wrap;
}

.stat-box {
    position: relative;
    width: 100%;
    height: 150px;
    overflow: hidden;
    cursor: pointer;
    transition: height 0.5s ease, width 0.5s ease, box-shadow 0.3s ease;
    font-size: 10px;
    border-radius: 15px;
    background: linear-gradient(145deg, #2c2c2c, #383838);
    color: #f0f0f0;
    box-shadow: 4px 4px 10px rgba(0, 0, 0, 0.2), -4px -4px 10px rgba(255, 255, 255, 0.1);
    padding: 15px;
}

.stat-box:hover {
    height: 1000px;
    width: 150%;
    box-shadow: 6px 6px 20px rgba(0, 0, 0, 0.4), -6px -6px 20px rgba(255, 255, 255, 0.2);
}

.table-container {
    width: 100%;
    height: 100%;
    overflow-x: auto;
    background-color: rgba(0, 0, 0, 0.2);
    border-radius: 10px;
    padding: 10px;
}

.table-container table {
    width: 100%;
    border-collapse: collapse;
}

.table-container th, .table-container td {
    border: 1px solid rgba(255, 255, 255, 0.2);
    padding: 8px;
    text-align: left;
    color: #f0f0f0;
}

.table-container th {
    font-size: 1.5rem;
    background-color: #ff9900;
    color: #2c2c2c;
}

.table-container td {
    font-size: 1.3rem;
}

.table-container tr:nth-child(even) {
    background-color: #131111; 
}
/* --- Effects of Poverty Section --- */

.effects-of-poverty {
    padding: 50px 10%;
    text-align: center;
    color: #ff9900;
    box-sizing: border-box;
    min-height: 60vh;
    position: relative;
    z-index: 2; 
}

.effects-of-poverty h2 {
    margin-bottom: 50px;
    font-size: 2.5rem;
}

.effects-container {
    display: flex;
    justify-content: center;
    gap: 30px;
    flex-wrap: wrap;
    position: relative;
    z-index: 2;
}

.effect-box {
    background-color: #2c2c2c;
    width: 550px;
    height: auto;
    border-radius: 15px;
    padding: 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    box-shadow: 4px 4px 10px rgba(0, 0, 0, 0.2), -4px -4px 10px rgba(255, 255, 255, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    position: relative;
    z-index: 2; 
}

.effect-box img {
    width: 100%;
    height: 350px;
    border-radius: 10px;
    margin-bottom: 15px;
}

.effect-box h3 {
    color: #ff9900;
    margin-bottom: 10px;
    font-size: 1.5rem;
    text-align: center;
}

.effect-box p {
    font-size: 1rem;
    color: #f0f0f0;
    text-align: center;
}

.effect-box:hover {
    transform: translateY(-10px);
    box-shadow: 6px 6px 20px rgba(0, 0, 0, 0.4), -6px -6px 20px rgba(255, 255, 255, 0.2);
}

/* --- Responsive Adjustments --- */

@media screen and (max-width: 820px) {
    html, body {
        margin: 0;
        padding: 0;
        height: 100%;
        font-family: 'Arial', sans-serif;
        background-image: url('/assets/mbackground.png');
        background-size: cover;
        background-position: center;
        background-repeat: no-repeat;
        color: white;
        overflow-x: hidden;
    }

    .hamburger {
        display: block;
        font-size: 30px;
        cursor: pointer;
        color: #ffffff;
        padding: 10px;
        transition: transform 0.3s ease;
        margin-left: -100px;
    }

    #navMenu {
        display: none;
        flex-direction: column;
        background-color: rgba(0, 153, 255, 0.863);
        position: absolute;
        top: 100%;
        left: -120px; 
        transform: translateX(-30%); 
        min-width: 200px;
        max-width: 70%; 
        z-index: 3;
        border-radius: 15px;
        box-shadow: 0 8px 16px rgb(255, 255, 255);
        overflow: hidden;
        transition: max-height 0.5s ease-in-out, opacity 0.5s ease-in-out;
        opacity: 0; 
        max-height: 0; 
    }
    
    .hamburger-container:hover #navMenu,
    .hamburger-container:focus-within #navMenu {
        display: flex;
        max-height: 500px; 
        opacity: 1;
    }

    .navbar nav ul {
        flex-direction: column;
        width: 100%;
        padding: 0;
        margin: 0;
    }

    .navbar nav ul li {
        margin: 0;
        max-width: 100%;
        padding: 10px 10px;
        text-align: center;
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    }

    .navbar nav ul li:last-child {
        border-bottom: none;
    }

    .navbar nav ul li a {
        width: 100%;
        margin-left: -12px;
        display: block;
        color: #ffffff;
        text-decoration: none;
        font-weight: bold;
        transition: background-color 0.3s ease, color 0.3s ease;
    }

    .navbar nav ul li a:hover {
        background-color: rgba(255, 255, 255, 0.2);
        color: #0099ff; 
    }

    .navbar ul li a.active, .navbar ul li a:hover {
        background: #ffffff7c;
        color: #ffffff;
    }

    .navbar ul li a.donate {
        background: #2e2e2e;
        padding: 15px 20px;
        border-radius: 23px;
        transition: transform 0.3s ease, background-color 0.3s ease;
    }
    
    .navbar ul li a.donate:hover {
        background-color: #ffffff;
        transform: scale(1.1); 
        color: #0099ff;
    }

    .hero-poverty {
        padding: 20%;
        margin-top: 10%;
    }
    .hero-content {
        margin-top: -40px;
    }
    .hero-poverty h1 {
        font-size: 2.5rem;
        margin-top: 0px;
        color: #0099ff;
    }
    .hero-poverty .info-points {
        font-size: 1.2rem;
    }
    .stat-box {
        width: 100%;
    }
    .statistics h2 {
        font-size: 2rem;
        margin-top: 0;
    }
    .effects-of-poverty h2 {
        font-size: 2rem;
    }

    .section-container {
        display: flex;
        flex-direction: column;
        overflow-x: auto;
        scroll-snap-type: x mandatory;
        scroll-behavior: smooth;
        gap: 15px;
        padding: 20px 0;
    }

    .statistics, .effects-of-poverty {
        min-width: 100%;
        scroll-snap-align: start;
        box-sizing: border-box;
        background-color: rgba(66, 66, 66, 0.55);
        border-radius: 12px;
        text-align: center;
        padding-bottom: 20px;
        color: #0099ff
    }

    .statistics h2, .effects-of-poverty h2, .effects-of-poverty h3 {
        color: #0099ff
    }
    .table-container th {
        font-size: 1.2rem;
        background-color: #0099ff;
        color: white;
    }

    .stats-container, .effects-container {
        display: flex;
        flex-direction: row;
        flex-wrap: nowrap;
        justify-content: space-between;
        overflow-x: auto;
        gap: 30px;
        scroll-snap-type: x mandatory;
        scroll-behavior: smooth;
        padding: 10px 0;
        width: 600px;
    }

    .stat-box {
        flex: 0 0 auto;
        width: 150%;
        max-width: 550px;
        height: 1000px;
        background-color: rgba(66, 66, 66, 0.55);
        padding: 20px;
        border-radius: 12px;
        text-align: center;
        box-shadow: 0 6px 12px rgba(0, 0, 0, 0.25);
        transition: transform 0.3s ease, box-shadow 0.3s ease;
    }

    .effect-box {
        flex: 0 0 auto;
        width: 150%;
        max-width: 550px;
        height: auto;
        background-color: rgba(66, 66, 66, 0.55);
        padding: 20px;
        border-radius: 12px;
        text-align: center;
        box-shadow: 0 6px 12px rgba(0, 0, 0, 0.25);
        transition: transform 0.3s ease, box-shadow 0.3s ease;
    }


    .effect-box img {
        height: 350px;
    }
}

@media screen and (max-width: 430px) {
    .hero-poverty {
        padding: 5%; 
        align-items: flex-start;
    }
    .hero-content {
        margin-top: 100px;
    }
    .hero-poverty h1 {
        font-size: 2rem;
        margin-bottom: 10px;
        color: #0099ff
    }
    .hero-poverty .info-points {
        font-size: 0.9rem;
        line-height: 1.5;
    }
    .statistics h2 {
        font-size: 1.5rem;
        margin-top: 0;
    }
    .hero a.btn:hover {
        width: 100%;
        background-color: #0099ff;
    }
    .effects-of-poverty h2 {
        font-size: 1.8rem;
    }

    .section-container {
        display: flex;
        flex-direction: column;
        overflow-x: auto;
        scroll-snap-type: x mandatory;
        scroll-behavior: smooth;
        gap: 15px;
        padding: 20px 0;
    }

    .statistics, .effects-of-poverty {
        min-width: 100%;
        scroll-snap-align: start;
        box-sizing: border-box;
        background-color: rgba(66, 66, 66, 0.55);
        border-radius: 12px;
        text-align: center;
        padding-bottom: 20px;
        color: #0099ff
    }

    .statistics h2, .effects-of-poverty h2, .effects-of-poverty h3 {
        color: #0099ff
    }
    .table-container th {
        font-size: 0.8rem;
        background-color: #0099ff;
        color: white;
    }
    .table-container td {
        font-size: 0.7rem;
    }

    .stats-container, .effects-container {
        display: flex;
        flex-direction: row;
        flex-wrap: nowrap;
        justify-content: space-between;
        overflow-x: auto;
        gap: 30px;
        scroll-snap-type: x mandatory;
        scroll-behavior: smooth;
        padding: 10px 0;
        width: 350px;
    }

    .stat-box, .effect-box {
        flex: 0 0 auto;
        width: 150%;
        max-width: 300px;
        height: auto;
        background-color: rgba(66, 66, 66, 0.55);
        padding: 20px;
        border-radius: 12px;
        text-align: center;
        box-shadow: 0 6px 12px rgba(0, 0, 0, 0.25);
        transition: transform 0.3s ease, box-shadow 0.3s ease;
    }

    .effect-box img {
        height: 200px;
    }
}

@keyframes slideUp {
    0% {
        transform: translateY(20px);
        opacity: 0;
    }
    100% {
        transform: translateY(0);
        opacity: 1;
    }
}