/* socioeconomic.css */

/* If your HTML still uses .container, but master.css uses .main-container, 
   keep this ONLY if your page actually references .container */
   .container {
    max-width: 900px;
    margin: 20px auto;
    padding: 40px;
    display: flex;
    flex-direction: column;
    gap: 20px;
    perspective: 1000px;
  }
  
  /* INTRODUCTION */
  .introduction {
    margin-bottom: 20px;
  }
  
  .introduction h3 {
    margin-top: 15px;
    font-size: 1.4rem;
    color: var(--jet-black); /* relies on master’s :root */
  }
  
  /* CHART SECTION */
  .chart-section {
    margin-bottom: 30px;
  }
  
  .chart-section h2 {
    margin-bottom: 15px;
    font-size: 1.8rem;
    color: var(--jet-black);
    text-shadow: 2px 2px 6px rgba(0, 0, 0, 0.5);
  }
  
  /* CHART WRAPPER */
  .chart-wrapper {
    background: var(--glass-white);
    padding: 10px;
    border-radius: 10px;
    border: 2px solid var(--jet-black);
    box-shadow: 4px 4px 12px rgba(0, 0, 0, 0.5);
    transform: perspective(800px) rotateY(10deg);
    transition: transform var(--transition-speed), box-shadow var(--transition-speed);
    margin: 20px 0;
  }
  
  .chart-wrapper:hover {
    transform: perspective(800px) rotateY(0deg);
    box-shadow: 6px 6px 16px rgba(0, 0, 0, 0.6);
  }
  
  .chart-wrapper canvas {
    display: block;
    width: 100%;
    height: 300px;
  }
  
  /* CAPTION */
  .caption {
    font-style: italic;
    font-size: 0.9rem;
    color: #000000;
    text-align: center;
    margin-top: 10px;
  }
  
  /* KEY TAKEAWAYS */
  .key-takeaways ul {
    list-style-type: disc;
    margin-left: 20px;
  }

/* 3D effect for the table container */
.table-wrapper {
    background: var(--glass-white);
    padding: 10px;
    border-radius: 10px;
    border: 2px solid var(--jet-black);
    box-shadow: 4px 4px 12px rgba(0, 0, 0, 0.5);
    transform: perspective(800px) rotateY(10deg);
    transition: transform var(--transition-speed), box-shadow var(--transition-speed);
    margin: 20px 0;
  }
  
  .table-wrapper:hover {
    transform: perspective(800px) rotateY(0deg);
    box-shadow: 6px 6px 16px rgba(0, 0, 0, 0.6);
  }
  
  /* Table Styling for Graph 3 */
  .table-wrapper table {
    width: 100%;
    border-collapse: collapse;
    margin: 10px 0;
  }
  
  .table-wrapper table th,
  .table-wrapper table td {
    border: 1px solid var(--jet-black);
    padding: 8px;
    text-align: left;
  }
  
  .table-wrapper table th {
    background-color: var(--jet-black);
    color: #fff;
    text-align: center;
  }
  
  .table-wrapper table tr:nth-child(even) {
    background-color: rgba(0, 0, 0, 0.05);
  }  
  
/* ===== RESPONSIVE DESIGN ===== */
@media (max-width: 768px) {
  /* Main content box - Ensure full width */
  .main-container {
    padding: 5px 10px;        /* Tight padding to avoid overflow */
    width: 100%;              /* Full width of the screen */
    box-sizing: border-box;
    margin: 0 auto;           /* Center content */
    display: flex;
    flex-direction: column;   /* Stack content vertically */
    justify-content: flex-start;
    height: auto;             /* Allow height to expand */
  }

  /* Ensuring all child boxes use the available space */
  .content-box,
  .glass-box, .info-container, .bullet-points-container {
    padding: 10px;
    width: 100%;              /* Full width */
    margin: 0;
    box-sizing: border-box;
    overflow: hidden;        /* Hide any overflows to force content fitting */
    word-wrap: break-word;    /* Break words when necessary */
    overflow-wrap: break-word; /* Ensure word breaks */
    display: block;
  }

  /* Reducing font sizes for mobile responsiveness */
  .main-container .content-box h1 {
    font-size: 1.4rem;        /* Adjust heading font size */
    line-height: 1.3;
    text-align: center;
    margin-bottom: 10px;
  }

  .main-container .content-box h2 {
    font-size: 1.2rem;        /* Adjust subheading font size */
    line-height: 1.3;
    text-align: center;
    margin-bottom: 10px;
  }

  .main-container .content-box p {
    font-size: 0.9rem;        /* Adjust paragraph font size */
    line-height: 1.5;
    margin-bottom: 15px;      /* Space between paragraphs */
  }

  /* Ensure list items fit */
  .main-container .content-box ul {
    padding-left: 20px;
    margin-bottom: 15px;
    font-size: 0.9rem;
    line-height: 1.5;
  }

  /* Adjust the chart container */
  .charts-container {
    display: flex;
    flex-direction: column;   /* Stack charts vertically */
    justify-content: center;
    align-items: center;
    width: 100%;              /* Full width */
    gap: 20px;                /* Space between charts */
    flex-grow: 1;             /* Allow expansion */
  }

  .chart-box {
    width: 100%;              /* Full width */
    height: 200px;            /* Adjust chart height */
    margin-bottom: 20px;
    padding: 10px;
    box-sizing: border-box;
    display: flex;
    justify-content: center;
    align-items: center;
  }

  /* Footer adjustments */
  .site-footer {
    padding: 1rem;            /* Footer padding */
    font-size: 1rem;          /* Footer font size */
    text-align: center;
  }

  /* Page title adjustments */
  .page-title {
    font-size: 1.6rem;       /* Adjust title font size */
    margin-bottom: 10px;
  }
}


