/* Global Styles */
:root {
    --primary-color: #2c3e50;
    --secondary-color: #3498db;
    --accent-color: #e74c3c;
    --light-color: #ecf0f1;
    --dark-color: #34495e;
    --text-color: #333;
    --link-color: #2980b9;
    --footer-color: #2c3e50;
    --border-radius: 5px;
    --box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

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

body {
    font-family: Arial, Helvetica, sans-serif;
    line-height: 1.6;
    color: var(--text-color);
    background-color: #f8f9fa;
}

a {
    color: var(--link-color);
    text-decoration: none;
    transition: all 0.3s ease;
}

a:hover {
    color: var(--accent-color);
    text-decoration: underline;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    margin-bottom: 0.5em;
    line-height: 1.2;
    color: var(--primary-color);
}

h1 {
    font-size: 2.5em;
}

h2 {
    font-size: 2em;
    border-bottom: 2px solid var(--secondary-color);
    padding-bottom: 0.5rem;
    margin-bottom: 1.5rem;
}

h3 {
    font-size: 1.5em;
    margin-top: 1.5rem;
}

h4 {
    font-size: 1.25em;
    margin-top: 1rem;
}

p {
    margin-bottom: 1em;
}

.indented-text {
    padding-left: 1.5rem;
    border-left: 4px solid var(--secondary-color);
    margin-bottom: 1.5rem;
}

.centered-text {
    text-align: center;
    margin: 1.5rem 0;
}

.highlighted-text {
    background-color: rgba(52, 152, 219, 0.1);
    border-left: 3px solid var(--secondary-color);
    padding: 1rem;
    margin: 1.5rem 0;
}

/* Header */
header {
    background-color: var(--primary-color);
    color: white;
    padding: 1rem 5%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
}

.logo {
    display: flex;
    align-items: center;
}

.logo h1 {
    color: white;
    font-size: 1.8rem;
    margin-bottom: 0;
}

.logo i {
    color: var(--accent-color);
    margin-right: 0.5rem;
}

/* Hamburger menu toggle */
.nav-toggle {
    display: none; /* Hide the checkbox */
  }
  
  .nav-toggle-label {
    display: none; /* Hidden by default on desktop */
    cursor: pointer;
    font-size: 1.5rem;
    margin-left: auto;
    padding: 0.5rem;
  }
  

nav ul {
    display: flex;
    list-style: none;
    flex-wrap: wrap;
    align-items: center;
    margin-bottom: -0.5rem;
}

nav ul li {
    margin-left: 1.5rem;
}

nav ul li a {
    color: white;
    padding: 0.5rem;
    display: block;
    text-decoration: none;
}

nav ul li a:hover {
    color: var(--secondary-color);
    text-decoration: none;
}

nav ul li.active a {
    color: var(--secondary-color);
    font-weight: bold;
    border-bottom: 2px solid var(--secondary-color);
}



/* Index Banner Container */
.index-banner {
    position: relative;
    max-width: 1200px;
    margin: 20px auto;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
}

/* Index Banner Image Section */
.index-banner-image {
    position: relative;
    width: 100%;
    height: 400px; /* Fixed height for consistent appearance */
}

.index-banner-image img {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
    transition: transform 0.3s ease-in-out;
    opacity: 0.8;
}

/* Image hover effect */
.index-banner-image:hover img {
    transform: scale(1.02);
}

/* Attribution styling */
.attribution {
    position: absolute;
    bottom: 10px;
    right: 15px;
    background-color: rgba(0, 0, 0, 0.6);
    color: #fff;
    padding: 5px 10px;
    border-radius: 4px;
    font-size: 12px;
    opacity: 0.75;
    transition: opacity 0.3s ease;
    backdrop-filter: blur(2px);
}

.index-banner-image:hover .attribution {
    opacity: 1;
}

/* Index Banner Text Section */
.index-banner-text {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    padding: 30px;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.85), rgba(0, 0, 0, 0));
    color: #fff;
}

.index-banner-text h2 {
    font-size: 2.2rem;
    margin-bottom: 12px;
    font-weight: 600;
    text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.5);
    line-height: 1.2;
    color: #fff;
}

.index-banner-text p {
    font-size: 1.2rem;
    max-width: 700px;
    margin-bottom: 5px;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.5);
    opacity: 0.9;
}



/* Banner */
.banner, .page-banner {
    background-color: var(--dark-color);
    color: white;
    text-align: center;
    padding: 3rem 1rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.banner-image, .banner-img {
    max-width: 100%;
    height: auto;
    margin-bottom: 1.5rem;
}

.banner svg {
    width: 100%;
    max-width: 800px;
    height: auto;
}

.banner-text h2 {
    color: white;
    border-bottom: none;
    margin-bottom: 0.5rem;
}

.page-banner h2 {
    color: white;
    border-bottom: none;
}

.mental-health-banner {
    background-color: #3a539b;
}

.chronic-diseases-banner {
    background-color: #446cb3;
}

.access-banner {
    background-color: #2c3e50;
}

/* Main Content */
main {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem 5%;
}

section {
    margin-bottom: 3rem;
}

.two-column {
    display: flex;
    flex-wrap: wrap;
    gap: 2rem;
    margin-bottom: 2rem;
}

.column {
    flex: 1;
    min-width: 300px;
}

/* Lists */
ul, ol {
    margin-left: 1.5rem;
    margin-bottom: 1.5rem;
}

ul li, ol li {
    margin-bottom: 0.5rem;
}

.reading-list li {
    margin-bottom: 1rem;
}

/* Fact Box */
.fact-box {
    background-color: var(--light-color);
    border-radius: var(--border-radius);
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    box-shadow: var(--box-shadow);
}

.fact-box h3, .fact-box h4 {
    color: var(--primary-color);
    margin-top: 0;
    margin-bottom: 1rem;
}

.fact-box ul {
    margin-bottom: 0;
}

/* Quote Box */
.quote-box {
    background-color: rgba(52, 152, 219, 0.1);
    border-radius: var(--border-radius);
    padding: 1.5rem;
    margin: 1.5rem 0;
}

.quote-box blockquote {
    font-style: italic;
    margin-bottom: 0.5rem;
}

.quote-box cite {
    display: block;
    text-align: right;
    font-style: normal;
    font-weight: bold;
}

/* Tables */
table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 2rem;
    box-shadow: var(--box-shadow);
}

caption {
    font-weight: bold;
    padding: 0.5rem;
    background-color: var(--dark-color);
    color: white;
    border-radius: var(--border-radius) var(--border-radius) 0 0;
}

th, td {
    padding: 0.75rem;
    text-align: left;
    border: 1px solid #ddd;
}

th {
    background-color: var(--primary-color);
    color: white;
}

tr:nth-child(even) {
    background-color: #f2f2f2;
}

.note-cell {
    background-color: rgba(231, 76, 60, 0.1);
    font-style: italic;
}

.note {
    font-style: italic;
    color: #666;
    margin-top: 0.5rem;
}

/* Thumbnails and Images */
.image-gallery {
    margin: 2rem 0;
}

.thumbnails {
    display: flex;
    flex-wrap: wrap;
    gap: 1.5rem;
    justify-content: center;
}

.thumbnail {
    width: 200px;
    text-align: center;
    transition: all 0.3s ease;
}

.thumbnail:hover {
    transform: translateY(-5px);
}

.thumbnail-img {
    width: 100%;
    height: 150px;
    object-fit: cover;
    border-radius: var(--border-radius);
    border: 2px solid var(--secondary-color);
    box-shadow: var(--box-shadow);
    margin-bottom: 0.5rem;
}

.caption {
    display: block;
    font-weight: bold;
    color: var(--dark-color);
}

/* Call to Action */
.action-steps {
    display: flex;
    flex-wrap: wrap;
    gap: 1.5rem;
    justify-content: center;
    margin: 2rem 0;
}

.step {
    flex: 1;
    min-width: 250px;
    background-color: var(--light-color);
    border-radius: var(--border-radius);
    padding: 1.5rem;
    text-align: center;
    box-shadow: var(--box-shadow);
}

.step i {
    color: var(--accent-color);
    margin-bottom: 1rem;
}

.step h3 {
    margin-top: 0;
}

/* Challenges and Solutions */
.challenges-list, .strategies, .solutions {
    display: flex;
    flex-wrap: wrap;
    gap: 1.5rem;
    margin: 2rem 0;
}

.challenge, .strategy, .solution {
    flex: 1;
    min-width: 250px;
    background-color: var(--light-color);
    border-radius: var(--border-radius);
    padding: 1.5rem;
    box-shadow: var(--box-shadow);
}

.challenge h3, .strategy h3, .solution h3 {
    color: var(--dark-color);
    margin-top: 0;
    display: flex;
    align-items: center;
}

.challenge i, .strategy i, .solution i {
    color: var(--accent-color);
    margin-right: 0.5rem;
}

/* Resources */
.resources {
    margin: 2rem 0;
}

.resource-items {
    display: flex;
    flex-wrap: wrap;
    gap: 1.5rem;
    justify-content: center;
}

.resource {
    flex: 1;
    min-width: 250px;
    text-align: center;
    padding: 1.5rem;
    background-color: var(--light-color);
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
}

.resource i {
    color: var(--accent-color);
    margin-bottom: 1rem;
}

.resource h4 {
    margin-top: 0;
}

/* External Resources */
.resource-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 1.5rem;
    margin: 2rem 0;
}

.external-resource {
    background-color: var(--light-color);
    border-radius: var(--border-radius);
    padding: 1.5rem;
    box-shadow: var(--box-shadow);
}

.external-resource h4 {
    margin-top: 0;
    color: var(--dark-color);
    display: flex;
    align-items: center;
}

.external-resource i {
    color: var(--accent-color);
    margin-right: 0.5rem;
}

.resource-details {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid #ddd;
}

.resource-details p {
    margin-bottom: 0.5rem;
}

/* Reference List */
.reference-list {
    margin-left: 2rem;
}

.reference-list li {
    margin-bottom: 1rem;
}

/* Footer */
footer {
    background-color: var(--footer-color);
    color: white;
    padding: 2rem 5%;
}

.footer-content {
    display: flex;
    flex-wrap: wrap;
    gap: 2rem;
    max-width: 1200px;
    margin: 0 auto;
}

.footer-section {
    flex: 1;
    min-width: 250px;
}

.footer-section h3 {
    color: white;
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
    padding-bottom: 0.5rem;
    margin-bottom: 1rem;
}

.footer-section ul {
    list-style: none;
    margin-left: 0;
}

.footer-section li {
    margin-bottom: 0.5rem;
}

.footer-section a {
    color: rgba(255, 255, 255, 0.8);
}

.footer-section a:hover {
    color: white;
}

.copyright {
    text-align: center;
    margin-top: 2rem;
    padding-top: 1rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

/* Media Queries */

/* Responsive Adjustments */
@media (max-width: 992px) {
    .index-banner-image {
        height: 350px;
    }
    
    .index-banner-text h2 {
        font-size: 1.8rem;
    }
    
    .index-banner-text p {
        font-size: 1.1rem;
    }
}

@media screen and (max-width: 768px) {
    header {
        flex-direction: row; /* Keep header as row for toggle placement */
        flex-wrap: wrap;
        justify-content: space-between;
        padding: 1rem;
      }
      
      .nav-toggle-label {
        display: block; /* Show hamburger on mobile */
      }
      
      nav {
        width: 100%;
        order: 3; /* Push navigation below logo and toggle button */
        overflow: hidden;
        max-height: 0; /* Collapsed by default */
        transition: max-height 0.5s ease;
      }
      
      .nav-toggle:checked ~ nav {
        max-height: 350px; /* Expand when checked */
      }
      
      nav ul {
        flex-direction: column; /* Stack menu items vertically */
        width: 100%;
        padding: 0.5rem 0;
        margin-bottom: 10rem;
        align-items: center;
      }
      
      nav ul li {
        margin: 0;
        width: 100%;
        text-align: center;
      }
      
      nav ul li a {
        padding: 1rem;
        width: 100%;
        display: block;
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
      }
      
      .logo {
        margin-right: auto; /* Push logo to the left */
      }
   
    

    .index-banner-image {
        height: 300px;
    }
    
    .index-banner-text {
        padding: 20px;
    }
    
    .index-banner-text h2 {
        font-size: 1.5rem;
    }
    
    .index-banner-text p {
        font-size: 1rem;
        max-width: 100%;
    }
    
    .banner, .page-banner {
        padding: 2rem 1rem;
    }
    
    .two-column {
        flex-direction: column;
    }
    
    .action-steps, .challenges-list, .strategies, .solutions {
        flex-direction: column;
    }
    
    .resource-grid {
        grid-template-columns: 1fr;
    }
    
    table {
        font-size: 0.9rem;
    }
    
    th, td {
        padding: 0.5rem;
    }
}

@media screen and (max-width: 480px) {
    h1 {
        font-size: 2em;
    }
    
    h2 {
        font-size: 1.75em;
    }
    
    h3 {
        font-size: 1.25em;
    }
    
    .thumbnail {
        width: 100%;
    }
    
    nav ul {
        flex-direction: column;
    }
    
    nav ul li {
        margin: 0.25rem 0;
    }

    .index-banner-image {
        height: 250px;
    }
    
    .index-banner-text h2 {
        font-size: 1.3rem;
    }
}