/*==============================
      Base Styles
==============================*/
body {
  font-family: 'Plus Jakarta Sans', sans-serif;
  background-color: #F2EDEB; /* Ollion White */
  color: #12130F; /* Ollion Black */
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/*==============================
      Headings
==============================*/
h1, h2, h3 {
  font-family: 'Newsreader', serif;
  font-weight: 600;
  color: #12130F;
  line-height: 1.2;
}

/*==============================
      Accent Colors
==============================*/
.accent-color {
  color: #C1911B; /* Ollion Gold */
}

/*==============================
      Navigation
==============================*/
.nav-link {
  transition: all 0.3s ease;
  will-change: color, border-color;
  color: #12130F;
}
.nav-link:hover {
  color: #3B4430; /* Darker shade */
}
.nav-link.active {
  color: #C1911B; /* Ollion Gold */
  border-bottom-color: #C1911B;
  font-weight: 600;
}

/*==============================
      Content Sections
==============================*/
.content-section {
  display: block;
  opacity: 1;
  transition: opacity 0.3s ease;
}
.content-section:not(.active) {
  display: none;
  opacity: 0;
}

/*==============================
      Cards
==============================*/
.card {
  background-color: #F2EDEB; /* Ollion White */
  border-radius: 0.75rem;
  box-shadow: 0 4px 6px -1px rgba(18,19,15,0.1), 0 2px 4px -1px rgba(18,19,15,0.06);
  border: 1px solid #3B4430;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.card:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 8px -1px rgba(18,19,15,0.1), 0 4px 6px -1px rgba(18,19,15,0.06);
}

/*==============================
      Accordion
==============================*/
.accordion-content {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.5s ease-out;
  will-change: max-height;
}

/*==============================
      Chart Container
==============================*/
.chart-container {
  position: relative;
  width: 100%;
  max-width: 900px;
  margin: 0 auto;
  height: 450px; /* Default height */
  max-height: 550px; /* Max height for larger screens */
}

/*==============================
      Typography
==============================*/
p, li {
  color: #12130F;
  line-height: 1.6;
  word-break: break-word; 
}

/*==============================
      Responsive Adjustments
==============================*/
@media (max-width: 768px) { /* md breakpoint */
  .chart-container {
    height: 380px; 
    max-height: 450px;
  }
  .card {
    margin: 0.5rem;
  }
}

@media (max-width: 480px) { /* Smaller devices */
  .chart-container {
    height: 320px; 
    max-height: 350px;
  }
  h1.text-2xl { 
    font-size: 1.5rem; 
  }
  h2.text-2xl, h2.text-3xl, h2.lg\:text-4xl {
    font-size: 1.375rem; 
  }
   h3.text-xl, h3.text-2xl, h3.lg\:text-3xl {
    font-size: 1.125rem; 
  }
}


/*==============================
      Print Styles
==============================*/
@media print {
  .content-section {
    display: block;
    opacity: 1;
  }
  .card {
    box-shadow: none;
    border: 1px solid #3B4430;
  }
  .accordion-content {
    max-height: none;
  }
}

/*==============================
      Gemini Result
==============================*/
.gemini-result {
  margin-top: 1rem;
  padding: 0.75rem;
  background-color: #F2EDEB;
  border-left: 4px solid #C1911B;
  border-radius: 0.25rem;
  font-size: 0.9rem;
  white-space: pre-wrap;
}

/*==============================
      Loading Spinner
==============================*/
.loading-spinner {
  border: 4px solid #F2EDEB;
  border-top: 4px solid #C1911B;
  border-radius: 50%;
  width: 24px;
  height: 24px;
  animation: spin 1s linear infinite;
  margin-right: 8px;
}
@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/*==============================
      Modal
==============================*/
.modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(18,19,15,0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
}
.modal-content {
  background-color: #F2EDEB;
  padding: 20px;
  border-radius: 8px;
  text-align: center;
  box-shadow: 0 0 10px rgba(18,19,15,0.25);
}
.modal-close-btn {
  margin-top: 15px;
  padding: 8px 16px;
  background-color: #EC4632;
  color: #F2EDEB;
  border: none;
  border-radius: 4px;
  cursor: pointer;
}

/*==============================
      Carousel (Rebuilt)
==============================*/

#useCasesCarousel {
  position: relative;
  /* Increased padding-top to make space for indicators */
  padding: 2.5rem 0.5rem 0.5rem; 
  overflow: hidden;
  min-height: 280px; 
}

@media (min-width: 640px) { /* sm breakpoint */
  #useCasesCarousel {
    /* Increased padding-top */
    padding: 2.75rem 1rem 1rem;
  }
}

@media (min-width: 768px) { /* md breakpoint */
  #useCasesCarousel {
    /* Increased padding-top */
    padding: 3.5rem 2rem 2rem; 
  }
}

#useCasesCarousel .carousel-slide {
  width: 100%;
  flex-shrink: 0;
  box-sizing: border-box;
  background-color: #F2EDEB; 
  border-radius: 0.5rem;
  box-shadow: 0 2px 6px rgba(18,19,15,0.1);
  padding: 0.75rem; /* Default p-3 for smallest screens */
}

#useCasesCarousel .carousel-slide p,
#useCasesCarousel .carousel-slide li {
  word-break: break-word; 
}

@media (min-width: 640px) { /* sm breakpoint */
    #useCasesCarousel .carousel-slide {
        padding: 1rem; 
    }
}
@media (min-width: 1024px) { /* lg breakpoint */
    #useCasesCarousel .carousel-slide {
        padding: 1.5rem; 
    }
}

/* Adjust text sizes within carousel slides on very small screens */
@media (max-width: 480px) {
    #useCasesCarousel .carousel-slide {
        padding: 0.5rem; 
    }
    #useCasesCarousel .carousel-slide h3 {
      font-size: 1rem; 
      margin-bottom: 0.5rem; 
    }
    #useCasesCarousel .carousel-slide p,
    #useCasesCarousel .carousel-slide li {
      font-size: 0.75rem; 
      line-height: 1.4; 
      margin-bottom: 0.25rem; 
    }
     #useCasesCarousel .carousel-slide p.font-semibold { 
        font-size: 0.8rem; 
        margin-bottom: 0.35rem;
    }
    #useCasesCarousel .carousel-slide ul {
        padding-left: 0.75rem; 
        margin-top: 0.25rem; 
    }
    /* #carouselIndicatorsWrapper top adjusted below */
    #carouselIndicatorsWrapper .text-lg { 
        font-size: 0.875rem; 
    }
    #carouselIndicators .carousel-indicator { 
        padding: 0.25rem 0.5rem; 
        font-size: 0.75rem; 
    }
}

/* Added a slightly less aggressive small screen for between 481px and 639px (sm breakpoint) */
@media (min-width: 481px) and (max-width: 639px) {
    #useCasesCarousel .carousel-slide {
        padding: 0.75rem; 
    }
    #useCasesCarousel .carousel-slide h3 {
      font-size: 1.125rem; 
      margin-bottom: 0.6rem;
    }
    #useCasesCarousel .carousel-slide p,
    #useCasesCarousel .carousel-slide li {
      font-size: 0.825rem; 
      line-height: 1.5;
      margin-bottom: 0.4rem;
    }
    #useCasesCarousel .carousel-slide ul {
        padding-left: 1rem; 
    }
}

/* Ensure carousel indicator wrapper is still correctly positioned */
#carouselIndicatorsWrapper {
  position: absolute;
  /* Adjusted top to be smaller, pushing it higher */
  top: 0.25rem; 
  left: 50%;
  transform: translateX(-50%);
  z-index: 20;
  /* Ensure it has a defined background for visual stacking if needed */
  background-color: rgba(242, 237, 235, 0.9); /* Ollion White with opacity from existing styles */
}

/*==============================
      Governance Table Responsive
==============================*/
@media (max-width: 768px) { /* Corresponds to Tailwind 'md' breakpoint */
    #governance .overflow-x-auto table th,
    #governance .overflow-x-auto table td {
        font-size: 0.8rem; /* Slightly smaller than text-sm */
        padding: 0.5rem 0.75rem; /* Tailwind: py-2 px-3 */
    }

    #governance .overflow-x-auto table th.text-sm { /* Targeting header specifically if it was text-sm */
        font-size: 0.75rem; /* text-xs */
    }
    
    #governance .overflow-x-auto table td.text-base { /* Targeting body cells that were text-base */
        font-size: 0.8rem; 
    }

    #governance .overflow-x-auto table .bg-slate-50 td { /* Phase headers like "Phase 0: Mobilization..." */
        font-size: 0.85rem; /* Keep phase headers slightly more prominent */
        padding: 0.6rem 0.75rem;
    }

    #governance .overflow-x-auto table tfoot td {
        font-size: 0.7rem; /* Make legend even smaller */
        padding: 0.5rem 0.75rem;
    }
    #governance .overflow-x-auto table tfoot td strong {
        margin-right: 0.5rem; /* Reduce space between legend items */
    }
}

@media (max-width: 480px) { /* Extra small screens */
    #governance .overflow-x-auto table th,
    #governance .overflow-x-auto table td {
        font-size: 0.7rem; /* Even smaller font */
        padding: 0.35rem 0.5rem; /* Tailwind: approx py-1.5 px-2 */
        line-height: 1.3; /* Adjust line height for smaller font */
    }

    #governance .overflow-x-auto table th.text-sm {
        font-size: 0.65rem; 
    }
    
    #governance .overflow-x-auto table td.text-base {
        font-size: 0.7rem;
    }

    #governance .overflow-x-auto table .bg-slate-50 td {
        font-size: 0.75rem; 
        padding: 0.4rem 0.5rem;
    }

    #governance .overflow-x-auto table tfoot td {
        font-size: 0.6rem; 
        padding: 0.35rem 0.5rem;
        letter-spacing: -0.5px; /* Tighten letter spacing if needed */
    }
     #governance .overflow-x-auto table tfoot td strong {
        margin-right: 0.25rem; 
    }
}

/*==============================
      Roadmap Info Popup Panel
==============================*/
#roadmapInfoPopup {
    background-color: #F2EDEB;
    border: 1px solid #3B4430;
    border-radius: 0.75rem;
    box-shadow: 0 4px 6px -1px rgba(18,19,15,0.1), 0 2px 4px -1px rgba(18,19,15,0.06);
    padding: 1rem; 
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
    align-self: flex-start;
    max-height: 450px; 
    overflow-y: auto;
    height: 100%;
}

#roadmapInfoPopup.visible {
    opacity: 1;
    visibility: visible;
}

#roadmapInfoPopup h3 {
    margin-top: 0;
    color: #12130F;
    font-family: 'Newsreader', serif;
    font-size: 1.125em; 
    font-weight: 600;
    border-bottom: 1px solid #e0e0e0; 
    padding-bottom: 0.4rem;
    margin-bottom: 0.75rem;
}

#roadmapInfoPopup p {
    margin: 0.4rem 0;
    line-height: 1.5;
    color: #12130F;
    font-size: 0.875em; 
}
#roadmapInfoPopup strong {
    color: #3B4430;
    font-weight: 600;
}
#roadmapInfoPopup .activities-title {
    margin-top: 0.75rem;
    font-weight: 600;
     font-size: 0.875em; 
}
#roadmapInfoPopup ul {
    list-style-type: disc;
    margin-left: 1rem; 
    padding-left: 0;
}
#roadmapInfoPopup ul li {
    margin-bottom: 0.2rem;
    font-size: 0.8em; 
}

/* Responsive adjustments for the roadmap section specifically */
@media (max-width: 767px) { 
    #roadmap .flex.flex-col.md\:flex-row {
        flex-direction: column;
    }
    #roadmap .chart-container.md\:w-2\/3,
    #roadmap #roadmapInfoPopup.md\:w-1\/3 {
        width: 100%;
    }
    #roadmapInfoPopup {
        max-height: 300px; 
        margin-top: 1rem; 
        height: auto; 
    }
}

@media (max-width: 480px) {
    #roadmapInfoPopup {
        max-height: 250px; 
        padding: 0.75rem;
    }
    #roadmapInfoPopup h3 {
        font-size: 1em; 
    }
    #roadmapInfoPopup p, #roadmapInfoPopup .activities-title {
        font-size: 0.8em;
    }
    #roadmapInfoPopup ul li {
        font-size: 0.75em;
    }
}


/*==============================
      Footer
==============================*/
footer {
  background-color: #12130F;
  color: #F2EDEB;
}


/*==============================
      Key Considerations Tabs
==============================*/
.tab-item {
    display: flex;
    align-items: center;
    position: relative; /* Needed to appear above the indicator */
    z-index: 10;
    width: 100%;
    padding: 0.75rem 1rem;
    font-weight: 500;
    color: #374151; /* text-gray-700 */
    border: none;
    background-color: transparent; /* Tabs are transparent, indicator provides background */
    transition: color 0.2s ease-in-out;
    text-align: left;
    cursor: pointer;
}

.tab-item:hover,
.tab-item:focus {
    color: #111827; /* text-gray-900 */
}

/* --- Active state for the tab button --- */
.tab-item.active {
    color: #C1911B; /* accent-color */
    font-weight: 600;
}

/* --- Animated Indicator --- */
#activeTabIndicator {
    position: absolute;
    z-index: 5;
    background-color: #FFFFFF;
    border-radius: 0.375rem; /* rounded-md */
    border: 1px solid #e5e7eb; /* border-gray-200 */
    box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px -1px rgba(0, 0, 0, 0.1);
    transition: top 0.3s ease, height 0.3s ease;
}


/* --- Tab Content Transition --- */
.tab-content {
    opacity: 0;
    transform: translateY(10px);
    transition: opacity 0.3s ease-in-out, transform 0.3s ease-in-out;
    display: none;
    will-change: opacity, transform;
}

.tab-content.active {
    opacity: 1;
    transform: translateY(0);
    display: block;
}