.container1 {
    text-align: center;
    color: var(--color);
    height: auto;
    align-items: center;
    padding: 30px;
    box-sizing: border-box;
}

.container1.first,
.container1.second {
    width: 100%;
    position: relative;
    padding-bottom: 30px;
}

.container1.second {
    background-image: none;
    min-height: 0;
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: space-around;
    padding-bottom: 30px;
}


/* Use a slim gradient divider like About page */
.blank,
.other {
    width: 80%;
    max-width: 800px;
    height: 2px;
    margin: 3rem auto;
    background: linear-gradient(to right,
        transparent 0%,
        rgba(0, 128, 128, 0.5) 25%,
        rgba(0, 128, 128, 0.8) 50%,
        rgba(0, 128, 128, 0.5) 75%,
        transparent 100%
    );
    box-shadow: 0 1px 3px rgba(0, 128, 128, 0.1);
}

.card {
    height: auto;
    width: 350px;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.card .card-header {
    background: var(--gradient-card) !important;
    opacity: 0.92;
    padding: 0.9rem;
    border: none;
    border-radius: 8px 8px 0 0;
    color: white;
    text-align: center;
}
.item {
    display: flex;
    max-width: 350px;
    flex-direction: column;
    align-items: stretch;
    border-radius: 8px;
    margin: 20px;
}
.wide-item {
    display: flex;
    width: 520px;
    min-height: 0;
    flex-direction: column;
    align-items: center;
    border-radius: 8px;
}

.wide-card {
    display: flex;
    flex-direction: column;
    width: 100%;
    background: #fff;
    border-radius: 8px;
    overflow: hidden;
    margin: 0;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.wide-item .card-header1 {
    width: 100%; /* Header spans the full width */
    background: var(--gradient-card) !important;
    opacity: 0.92;
    padding: 0.75rem;
    border: none;
    border-radius: 8px 8px 0 0;
    color: white;
    text-align: center; /* Center the header text */
    position: relative; /* Enable z-index */
    z-index: 1;
}

.wide-card .image {
    display: flex; /* Enable flexbox for centering */
    align-items: center; /* Center vertically */
    justify-content: center; /* Center horizontally */
    width: 100%; /* Image takes full width of the card */
    height:auto; /* Adjust height as needed */
    overflow: visible; /* Ensure the image stays within the card */
}

.wide-card .image img {
    width: 100%;
    height: auto;
    object-fit: cover;
}

.wide-card .wide-card-content {
    height: auto;
    padding: 20px;
    box-sizing: border-box;
    overflow: visible;
    text-align: justify;
}
p {
    max-width: 75ch;
    line-height: 1.3;
    padding: 1em 0;
    font-family: 'Poppins', sans-serif;
}

/* TT tab: About Us style alternating layout */
#climate .container1.second {
    display: block;
    padding: 2rem 0;
}

#climate .item {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: 4rem;
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.8s ease-out;
    max-width: 1000px;
    margin-left: auto;
    margin-right: auto;
    padding: 0 2rem;
}

#climate .item:nth-child(even) {
    transform: translateY(30px);
}

#climate .item.visible {
    opacity: 1;
    transform: translateY(0);
}

#climate .item:nth-child(2) { animation-delay: 0.2s; }
#climate .item:nth-child(3) { animation-delay: 0.4s; }
#climate .item:nth-child(4) { animation-delay: 0.6s; }

#climate .card {
    background: transparent !important;
    box-shadow: none !important;
    border: 0 !important;
    padding: 0 !important;
    flex: 1;
}

#climate .card-header,
#climate .card-header1 {
    display: none !important;
}

#climate .text-side {
    width: 100%;
    padding: 2rem;
    text-align: center;
}

#climate .text-side h4 {
    color: var(--teal-dark);
    font-size: 1.5rem;
    margin-bottom: 1rem;
    font-weight: 600;
    text-align: center;
}

#climate .text-side p {
    text-align: justify;
    line-height: 1.6;
    color: #333;
    margin: 0.5rem 0;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

#climate .image-side {
    flex: 1;
    min-width: 300px;
    max-width: 500px;
    display: flex;
    justify-content: center;
    align-items: center;
}

#climate .image-side img {
    width: 100%;
    height: 250px;
    object-fit: cover;
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
    transition: transform 0.3s ease;
}

#climate .image-side img:hover {
    transform: scale(1.02);
}

@media (max-width: 992px) {
    #climate .item {
        flex-direction: column !important;
        gap: 2rem;
        padding: 0 1rem;
    }
    
    #climate .item:nth-child(even) {
        flex-direction: column !important;
    }
    
    #climate .text-side {
        max-width: 100%;
        padding: 1rem;
    }
    
    #climate .image-side {
        min-width: 100%;
        max-width: 100%;
    }
    
    #climate .image-side img {
        height: 200px;
    }
}

h1 {
 text-align: center;
  font-size: 55px; 
  font-family: Poppins, sans-serif;
   background: linear-gradient(to top, #004D5A, #0097A7);
   -webkit-background-clip: text; 
   -webkit-text-fill-color: transparent;
    background-clip: text; 
    color: transparent; 
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

img {
    max-width: 100%;
    height: auto;  
}

/* TT tab: centered header matching section styling */
#climate h1 {
    text-align: center !important;
    font-size: 1.5rem !important;
    font-weight: 600 !important;
    color: var(--teal-dark) !important; /* match section headers */
    background: none !important;
    font-family: inherit !important;
    -webkit-text-fill-color: initial !important;
    background-clip: initial !important;
    text-shadow: none !important;
    margin-bottom: 1rem !important;
}

/* Style the main intro paragraph to match section styling */
#climate .container1.first span {
    text-align: justify !important;
    display: block;
    margin: 0.5rem 0;
    color: #333;
    line-height: 1.6;
    font-size: 14px;
    font-family: inherit;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

/* Style the section content (Temperature Patterns, etc.) */
#climate .text-side p {
    text-align: justify;
    line-height: 1.6;
    color: #333;
    margin: 0.5rem 0;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

/* Apply consistent styling to all climate tabs - only when active */
#vc.tab-pane.active h1,
#DP.tab-pane.active h1,
#driver.tab-pane.active h1,
#trends.tab-pane.active h1,
#projections.tab-pane.active h1,
#ae.tab-pane.active h1,
#mr.tab-pane.active h1 {
    text-align: center !important;
    font-size: 1.5rem !important;
    font-weight: 600 !important;
    color: var(--teal-dark) !important;
    background: none !important;
    font-family: inherit !important;
    -webkit-text-fill-color: initial !important;
    background-clip: initial !important;
    text-shadow: none !important;
    margin-bottom: 1rem !important;
}

/* Style paragraphs in all climate tabs - remove grey backgrounds */
#vc.tab-pane.active p,
#DP.tab-pane.active p,
#driver.tab-pane.active p,
#trends.tab-pane.active p,
#projections.tab-pane.active p,
#ae.tab-pane.active p,
#mr.tab-pane.active p {
    text-align: justify !important;
    line-height: 1.6 !important;
    color: #333 !important;
    margin: 0.25rem 0 !important;
    max-width: 800px !important;
    margin-left: auto !important;
    margin-right: auto !important;
    display: block !important;
    background: none !important;
    background-color: transparent !important;
    padding: 0 !important;
}

/* Center content in all climate tabs - only when active */
#vc.tab-pane.active .container1.first,
#DP.tab-pane.active .container1.first,
#driver.tab-pane.active .container1.first,
#trends.tab-pane.active .container1.first,
#projections.tab-pane.active .container1.first,
#ae.tab-pane.active .container1.first,
#mr.tab-pane.active .container1.first {
    text-align: center !important;
    max-width: 1000px !important;
    margin-left: auto !important;
    margin-right: auto !important;
    padding: 1rem !important;
    background: #fff !important;
    display: block !important;
    width: 100% !important;
}

/* Fix the main container positioning - only when active */
#vc.tab-pane.active .container1,
#DP.tab-pane.active .container1,
#driver.tab-pane.active .container1,
#trends.tab-pane.active .container1,
#projections.tab-pane.active .container1,
#ae.tab-pane.active .container1,
#mr.tab-pane.active .container1 {
    text-align: center !important;
    max-width: 1200px !important;
    margin-left: auto !important;
    margin-right: auto !important;
    padding: 1rem !important;
    display: block !important;
    width: 100% !important;
}

/* Remove grey backgrounds from all paragraph elements */
#vc p[style*="background:grey"],
#DP p[style*="background: grey"],
#driver p[style*="background:grey"],
#trends p[style*="background:grey"],
#projections p[style*="background:grey"],
#ae p[style*="background:grey"],
#mr p[style*="background:grey"] {
    background: none !important;
    background-color: transparent !important;
    color: #333 !important;
}

/* Override inline styles for grey backgrounds */
#vc p[style*="background: grey"],
#DP p[style*="background: grey"],
#driver p[style*="background: grey"],
#trends p[style*="background: grey"],
#projections p[style*="background: grey"],
#ae p[style*="background: grey"],
#mr p[style*="background: grey"] {
    background: none !important;
    background-color: transparent !important;
    color: #333 !important;
}

/* Style card content in all climate tabs */
#vc .card,
#DP .card,
#driver .card,
#trends .card,
#projections .card,
#ae .card,
#mr .card {
    background: transparent !important;
    box-shadow: none !important;
    border: 0 !important;
    padding: 0 !important;
    text-align: center !important;
    max-width: 800px !important;
    margin-left: auto !important;
    margin-right: auto !important;
    display: block !important;
    width: 100% !important;
}

/* Fix item positioning in all climate tabs */
#vc .item,
#DP .item,
#driver .item,
#trends .item,
#projections .item,
#ae .item,
#mr .item {
    display: block !important;
    text-align: center !important;
    max-width: 800px !important;
    margin-left: auto !important;
    margin-right: auto !important;
    padding: 0.5rem !important;
    margin-bottom: 1rem !important;
    width: 100% !important;
}

/* Style card headers in all climate tabs */
#vc .card-header,
#DP .card-header,
#driver .card-header,
#trends .card-header,
#projections .card-header,
#ae .card-header,
#mr .card-header {
    display: none !important;
}

/* Style card paragraphs in all climate tabs */
#vc .card p,
#DP .card p,
#driver .card p,
#trends .card p,
#projections .card p,
#ae .card p,
#mr .card p {
    text-align: justify !important;
    line-height: 1.6 !important;
    color: #333 !important;
    margin: 0.5rem 0 !important;
    max-width: 800px !important;
    margin-left: auto !important;
    margin-right: auto !important;
    background: none !important;
    background-color: transparent !important;
}

/* Global override for any grey backgrounds in climate tabs */
#vc *,
#DP *,
#driver *,
#trends *,
#projections *,
#ae *,
#mr * {
    background: none !important;
    background-color: transparent !important;
}

/* Restore white background for the main containers */
#vc .container1.first,
#DP .container1.first,
#driver .container1.first,
#trends .container1.first,
#projections .container1.first,
#ae .container1.first,
#mr .container1.first {
    background: #fff !important;
}

/* Fix text color for paragraphs */
#vc p,
#DP p,
#driver p,
#trends p,
#projections p,
#ae p,
#mr p {
    color: #333 !important;
}

/* Force centering for all content in climate tabs - only when active */
#vc.tab-pane.active,
#DP.tab-pane.active,
#driver.tab-pane.active,
#trends.tab-pane.active,
#projections.tab-pane.active,
#ae.tab-pane.active,
#mr.tab-pane.active {
    text-align: center !important;
    max-width: 1200px !important;
    margin-left: auto !important;
    margin-right: auto !important;
    padding: 0 1rem !important;
    display: block !important;
    width: 100% !important;
}

/* Override any existing positioning that might push content left */
#vc .col-sm-5,
#DP .col-sm-5,
#driver .col-sm-5,
#trends .col-sm-5,
#projections .col-sm-5,
#ae .col-sm-5,
#mr .col-sm-5 {
    text-align: center !important;
    max-width: 800px !important;
    margin-left: auto !important;
    margin-right: auto !important;
    float: none !important;
    display: block !important;
    width: 100% !important;
}

/* Left-align TT card headers and remove special fonts */
#climate .card-header,
#climate .card-header1 {
    text-align: left !important;
    font-family: inherit !important;
}

/* Drought Policy Definitions Section - Clean Layout */
#DP .definitions-section {
    text-align: center;
    max-width: 1000px;
    margin: 0 auto 3rem auto;
    padding: 2rem;
}

#DP .definitions-section h1 {
    color: var(--teal-dark);
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 1rem;
    text-align: center;
}

#DP .definitions-section p {
    text-align: justify;
    line-height: 1.6;
    color: #333;
    max-width: 800px;
    margin: 0 auto;
}

#DP .definitions-grid {
    max-width: 1000px;
    margin: 0 auto;
    padding: 0 2rem;
}

#DP .definition-item {
    margin-bottom: 3rem;
    padding: 1rem 0;
    background: transparent;
    border: none;
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.8s ease-out;
}

#DP .definition-item.visible {
    opacity: 1;
    transform: translateY(0);
}

#DP .definition-item .text-side h4 {
    color: var(--teal-dark);
    font-size: 1.4rem;
    margin-bottom: 1rem;
    font-weight: 600;
    text-align: left;
}

#DP .definition-item .text-side p {
    text-align: justify;
    line-height: 1.6;
    color: #333;
    margin: 0;
}

/* Assessment Section */
#DP .assessment-section {
    max-width: 1000px;
    margin: 0 auto;
    padding: 2rem;
    text-align: center;
}

#DP .assessment-section h1 {
    color: var(--teal-dark);
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 1rem;
}

#DP .assessment-section > p {
    text-align: justify;
    line-height: 1.6;
    color: #333;
    max-width: 800px;
    margin: 0 auto 2rem auto;
}

#DP .assessment-content {
    text-align: left;
}

#DP .assessment-item {
    margin-bottom: 2rem;
    padding: 1rem 0;
    background: transparent;
    border: none;
    box-shadow: none;
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.8s ease-out;
}

#DP .assessment-item.visible {
    opacity: 1;
    transform: translateY(0);
}

#DP .assessment-item h4 {
    color: var(--teal-dark);
    font-size: 1.3rem;
    margin-bottom: 1rem;
    font-weight: 600;
}

#DP .assessment-item p {
    text-align: justify;
    line-height: 1.6;
    color: #333;
    margin: 0.5rem 0;
}

#DP .assessment-item ul {
    margin: 1rem 0;
    padding-left: 1.5rem;
}

#DP .assessment-item li {
    margin-bottom: 0.5rem;
    line-height: 1.6;
}

/* Policy Section */
#DP .policy-section {
    max-width: 1000px;
    margin: 0 auto;
    padding: 2rem;
    text-align: center;
}

#DP .policy-section h1 {
    color: var(--teal-dark);
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 1rem;
}

#DP .policy-section > p {
    text-align: justify;
    line-height: 1.6;
    color: #333;
    max-width: 800px;
    margin: 0 auto 2rem auto;
}

#DP .policy-content {
    text-align: left;
}

#DP .policy-item {
    margin-bottom: 2rem;
    padding: 1rem 0;
    background: transparent;
    border: none;
    box-shadow: none;
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.8s ease-out;
}

#DP .policy-item.visible {
    opacity: 1;
    transform: translateY(0);
}

#DP .policy-item h4 {
    color: var(--teal-dark);
    font-size: 1.3rem;
    margin-bottom: 1rem;
    font-weight: 600;
}

#DP .policy-item p {
    text-align: justify;
    line-height: 1.6;
    color: #333;
    margin: 0.5rem 0;
}

#DP .formula {
    background: transparent;
    padding: 1rem 0;
    border: none;
    margin: 1rem 0;
}

#DP .formula strong {
    color: var(--teal-dark);
    font-size: 1.1rem;
}

#DP .formula ul {
    margin: 0.5rem 0 0 0;
    padding-left: 1.5rem;
}

#DP .formula li {
    margin-bottom: 0.25rem;
    line-height: 1.5;
}

/* Last Updated Text - Only show on Averages & Extremes tab */
#ae p[style*="Last updated"] {
    display: block !important;
}

/* Hide Last Updated text on all other tabs */
#vc p[style*="Last updated"],
#DP p[style*="Last updated"],
#driver p[style*="Last updated"],
#trends p[style*="Last updated"],
#projections p[style*="Last updated"],
#mr p[style*="Last updated"] {
    display: none !important;
}

/* Additional rule to hide Last Updated text globally except in #ae */
.tab-pane:not(#ae) p[style*="Last updated"] {
    display: none !important;
}

/* Ensure Last Updated only shows when #ae tab is active */
.tab-pane:not(.active) p[style*="Last updated"] {
    display: none !important;
}

/* Wind Rose Container - Horizontal Stacking */
.wind-rose-container {
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
    gap: 1rem !important;
    flex-wrap: wrap !important;
    width: 100% !important;
}

.wind-rose-container img {
    width: 450px !important;
    height: auto !important;
    flex-shrink: 0 !important;
    max-width: 30% !important;
}

@media (max-width: 768px) {
    .wind-rose-container {
        flex-direction: column !important;
        gap: 1rem !important;
    }
    
    .wind-rose-container img {
        max-width: 100% !important;
        width: 200px !important;
    }
}

/* Averages & Extremes Section - Alternating Layout */
#ae .ae-intro-section {
    max-width: 1000px;
    margin: 0 auto;
    padding: 2rem;
    text-align: center;
}

#ae .ae-intro-section h1 {
    color: var(--teal-dark);
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 1rem;
}

#ae .ae-intro-section p {
    text-align: justify;
    line-height: 1.6;
    color: #333;
    max-width: 800px;
    margin: 0 auto 2rem auto;
}

#ae .ae-content-section {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

#ae .ae-item {
    display: flex;
    align-items: center;
    gap: 3rem;
    margin-bottom: 4rem;
    opacity: 0;
    transform: translateX(-50px);
    transition: all 0.8s ease-out;
}

#ae .ae-item:nth-child(even) {
    flex-direction: row-reverse;
    transform: translateX(50px);
}

#ae .ae-item.visible {
    opacity: 1;
    transform: translateX(0);
}

#ae .ae-item .text-side {
    flex: 1;
    padding: 1rem;
}

#ae .ae-item .text-side h4 {
    color: var(--teal-dark);
    font-size: 1.5rem;
    margin-bottom: 1rem;
    font-weight: 600;
    text-align: left;
}

#ae .ae-item .text-side p {
    text-align: justify;
    line-height: 1.6;
    color: #333;
    margin: 0.5rem 0;
}

#ae .ae-item .image-side {
    flex: 1;
    min-width: 300px;
    max-width: 500px;
    display: flex;
    justify-content: center;
    align-items: center;
}

#ae .ae-item .image-side img {
    width: 100%;
    height: 300px;
    object-fit: cover;
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
    transition: transform 0.3s ease;
}

#ae .ae-item .image-side img:hover {
    transform: scale(1.02);
}

@media (max-width: 992px) {
    #ae .ae-item {
        flex-direction: column !important;
        gap: 2rem;
    }
    
    #ae .ae-item:nth-child(even) {
        flex-direction: column !important;
    }
    
    #ae .ae-item .image-side {
        min-width: 100%;
        max-width: 100%;
    }
    
    #ae .ae-item .image-side img {
        height: 250px;
    }
}

/* Gradient dividers like About Us */
#climate .gradient-divider {
    height: 2px;
    background: linear-gradient(to right,
        transparent 0%,
        rgba(0, 128, 128, 0.5) 25%,
        rgba(0, 128, 128, 0.8) 50%,
        rgba(0, 128, 128, 0.5) 75%,
        transparent 100%
    );
    margin: 4rem auto;
    width: 80%;
    max-width: 800px;
    display: block !important;
    position: relative;
    left: 50%;
    transform: translateX(-50%);
    z-index: 2;
    opacity: 1 !important;
    visibility: visible !important;
    box-shadow: 0 1px 3px rgba(0, 128, 128, 0.1);
}

@media (max-width: 768px) {
    #climate .gradient-divider {
        width: 90%;
        margin: 3rem auto;
    }
}