/* Basic Reset & Body Styling */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* 1. IMPLEMENT RESPONSIVE ROOT FONT SIZE (Matches indexstyle.css) */
html {
    /* Base font size: 0.6rem + 0.4vw for responsive scaling */
    font-size: calc(0.6rem + 0.4vw); 
    /* Scroll behavior should be on HTML */
    scroll-behavior: smooth; 
}

body {
    /* Matches indexstyle.css font family */
    font-family: 'Roboto', sans-serif; 
    
    line-height: 1.6;
    color: #333;
    
    /* Matches indexstyle.css background color */
    background-color: #f8f9fa; 
    
    /* Set body text to 1x the responsive root size */
    font-size: 1rem; 
}

/* UPDATED CONTAINER STYLES FOR SMALL DEVICES */
.container {
    max-width: 1200px;
    margin: 0 auto;
    /* Matches indexstyle.css padding */
    padding: 0 1.25rem; 
}

/* Header */
.main-header {
    background-color: #0d47a1;
    color: #fff;
    padding: 15px 0;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
}

.main-header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    display: flex;
    align-items: center;
    text-decoration: none;
    color: #fff;
    font-weight: 700;
    /* Now scales smaller relative to new root font size */
    font-size: 1.5em; 
}

.logo img {
    height: 40px;
    margin-right: 10px;
}

.logo-text {
    margin-left: 5px;
}

.main-nav ul {
    list-style: none;
    display: flex;
    gap: 20px;
}

.main-nav a {
    color: #fff;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease;
    padding: 5px 0;
    white-space: nowrap;
    font-size: 0.9rem;
}

.main-nav a:hover {
    color: #90caf9;
}

/* Mobile Navigation Toggle */
.nav-toggle {
    display: none;
    flex-direction: column;
    justify-content: space-between;
    width: 30px;
    height: 20px;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0;
}

.hamburger {
    display: block;
    width: 100%;
    height: 3px;
    background-color: #fff;
    border-radius: 3px;
    position: relative;
    transition: background-color 0.3s ease;
}

.hamburger::before,
.hamburger::after {
    content: '';
    position: absolute;
    width: 100%;
    height: 3px;
    background-color: #fff;
    left: 0;
    transition: transform 0.3s ease;
}

.hamburger::before {
    top: -8px;
}

.hamburger::after {
    top: 8px;
}

.nav-toggle.active .hamburger {
    background-color: transparent;
}

.nav-toggle.active .hamburger::before {
    transform: translateY(8px) rotate(45deg);
}

.nav-toggle.active .hamburger::after {
    transform: translateY(-8px) rotate(-45deg);
}

/* Hero Section */
.hero-section {
    position: relative;
    height: auto;
    padding: 60px 0;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: #fff;
    overflow: hidden;
    width: 100%;
}

.hero-media-placeholder {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    z-index: 1;
}

.hero-media-placeholder img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0;
    transition: opacity 1.5s ease-in-out;
}

.hero-media-placeholder img.active {
    opacity: 1;
}

.hero-content-study {
    position: relative;
    z-index: 3;
    padding: 20px;
    width: 100%;
}

.hero-inner-container {
    background-color: rgba(255, 255, 255, 0.85);
    padding: 30px;
    border-radius: 10px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2);
    max-width: 700px;
    margin: 0 auto;
    color: #333;
    /* UPDATED: Add width constraints for small devices */
    width: 100%;
}

.hero-section h1 {
    font-family: 'Montserrat', sans-serif;
    font-size: 1.5em;  /* Reduced from 1.8em */
    margin-bottom: 12px;
    line-height: 1.2;
    text-shadow: none;
    color: #1a237e;
}

.hero-section .tagline-study {
    /* Scales smaller */
    font-size: 1.1em; 
    margin-bottom: 20px;
    font-weight: 300;
    text-shadow: none;
    color: #3f51b5;
}

.hero-section .study-purpose,
.hero-section .collaboration-info {
    /* Scales smaller */
    font-size: 1em; 
    margin-bottom: 15px;
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
    text-shadow: none;
    color: #555;
}

.hero-actions-buttons {
    margin-top: 25px;
    margin-bottom: 25px;
    display: flex;
    justify-content: center;
    gap: 20px;
}

.researcher-contact {
    margin-top: 25px;
    background-color: rgba(0, 0, 0, 0.05);
    padding: 15px 20px;
    border-radius: 8px;
    display: inline-block;
    color: #333;
}

.researcher-contact p {
    margin-bottom: 8px;
    text-shadow: none;
}

.researcher-contact .contact-link {
    color: #1976d2;
    text-decoration: none;
    transition: color 0.3s ease;
}

.researcher-contact .contact-link:hover {
    color: #1565c0;
    text-decoration: underline;
}

/* General Button Styles */
.btn {
    display: inline-block;
    background-color: #1976d2;
    color: #fff;
    padding: 10px 20px;
    border-radius: 5px;
    text-decoration: none;
    font-weight: bold;
    transition: background-color 0.3s ease, transform 0.2s ease, box-shadow 0.3s ease;
    border: none;
    cursor: pointer;
}

.btn:hover {
    background-color: #1565c0;
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(0,0,0,0.2);
}

.btn.large-btn {
    padding: 12px 25px;
    /* Scales smaller */
    font-size: 1.1em; 
}

.btn-action-main {
    background-color: #ff9800;
    color: white;
    padding: 12px 25px;
    border-radius: 5px;
    text-decoration: none;
    font-weight: bold;
    transition: background-color 0.3s ease, transform 0.2s ease, box-shadow 0.3s ease;
    border: none;
    cursor: pointer;
}

.btn-action-main:hover {
    background-color: #fb8c00;
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(0,0,0,0.2);
}

.btn.btn-primary {
    background-color: #1976d2;
}

.btn.btn-primary:hover {
    background-color: #1565c0;
}

.content-section h1,
.content-section h2 {
    font-family: 'Montserrat', sans-serif;
    color: #1a237e;
    margin-bottom: 20px;
    text-align: center;
    font-weight: 700;
}

.content-section h1 {
    font-size: 1.8em;  /* About half of 2.2em */
    margin-top: 30px;
}

.content-section h2 {
    font-size: 1.4em;  /* About half of 1.8em */
    margin-top: 30px;
}

.content-section h3 {
    font-family: 'Montserrat', sans-serif;
    color: #3f51b5;
    margin-top: 25px;
    margin-bottom: 12px;
    font-size: 1.1em;  /* About half of 1.4em */
    font-weight: 600;
}

.content-section h4 {
    font-family: 'Montserrat', sans-serif;
    color: #5c6bc0;
    margin-top: 20px;
    margin-bottom: 10px;
    font-size: 1em;    /* About half of 1.2em */
    font-weight: 600;
}
/* Section Grid for Text and Media */
.section-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 60px;
    align-items: center;
    margin-top: 40px;
    margin-bottom: 60px;
}

.section-grid .text-content {
    text-align: justify;
    grid-column: 1 / -1;
}

.section-grid .media-content {
    text-align: center;
    grid-column: 1 / -1;
}

.responsive-img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}

.image-caption {
    font-style: italic;
    /* Scales smaller */
    font-size: 0.9em; 
    color: #555;
    margin-top: 15px;
}

/* Table Styling */
table {
    width: 100%;
    border-collapse: collapse;
    margin: 40px 0;
    /* Scales smaller */
    font-size: 0.9em; 
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

table th, table td {
    border: 1px solid #ddd;
    padding: 14px 18px;
    text-align: left;
}

table th {
    background-color: #e3f2fd;
    color: #1a237e;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

table tr:nth-child(even) {
    background-color: #f5f5f5;
}

table tr:hover {
    background-color: #eef;
}

.citation {
    font-style: italic;
    /* Scales smaller */
    font-size: 0.9em; 
    text-align: right;
    color: #777;
    margin-top: 50px;
    border-top: 1px dashed #ccc;
    padding-top: 15px;
}

/* Contact Section Specifics */
.contact-form-section {
    background-color: #fff;
    padding: 50px;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
    text-align: center;
    margin-top: 50px;
}

.contact-form-section p {
    /* Scales smaller */
    font-size: 1.1em; 
    margin-bottom: 30px;
    color: #555;
}

.contact-form-section .btn {
    margin-bottom: 35px;
}

.social-links {
    margin-top: 25px;
}

.social-links p {
    /* Scales smaller */
    font-size: 1em; 
    margin-bottom: 20px;
}

.social-links a {
    display: inline-block;
    margin: 0 12px;
}

.social-links img {
    width: 45px;
    height: 45px;
    transition: transform 0.2s ease;
}

.social-links img:hover {
    transform: translateY(-5px);
}

/* Footer */
.main-footer {
    background-color: #263238;
    color: #e0e0e0;
    padding: 30px 0;
    /* Scales smaller */
    font-size: 0.9em; 
}

.main-footer .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
}

.footer-nav ul {
    list-style: none;
    display: flex;
    gap: 20px;
}

.footer-nav a {
    color: #e0e0e0;
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer-nav a:hover {
    color: #90caf9;
}

/* Layout for content and sidebar */
.content-with-sidebar {
    display: grid;
    grid-template-columns: 1fr;
    gap: 30px;
    align-items: start;
}

.main-content {
    grid-column: 1;
}

/* Static Table of Contents Sidebar */
.static-toc-sidebar {
    position: sticky;
    top: 70px;
    height: auto;
    max-height: none;
    overflow-y: visible;
    background-color: #e3f2fd;
    border: 1px solid #90caf9;
    border-radius: 8px;
    padding: 12px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    align-self: start;
    text-align: left;
    display: none;
    z-index: 10;
}

.static-toc-sidebar h2 {
    font-family: 'Montserrat', sans-serif;
    /* Scales smaller */
    font-size: 1em; 
    color: #1a237e;
    margin-top: 0;
    margin-bottom: 10px;
    text-align: center;
}

.static-toc-sidebar ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.static-toc-sidebar ul li {
    margin-bottom: 8px;
}

.static-toc-sidebar ul li a {
    color: #1976d2;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease, font-weight 0.3s ease;
    padding: 2px 0;
    display: block;
    /* Scales smaller */
    font-size: 0.85em; 
}

.static-toc-sidebar ul li a:hover {
    color: #0d47a1;
    text-decoration: underline;
}

.static-toc-sidebar ul li a.active {
    color: #e65100;
    font-weight: 700;
    background-color: rgba(255, 152, 0, 0.1);
    border-left: 4px solid #e65100;
    padding-left: 12px;
    border-radius: 0 4px 4px 0;
}

/* Beaming CTA Section */
.beaming-cta {
    background: linear-gradient(45deg, #ffc107, #ffeb3b, #ffc107);
    border: 2px solid transparent;
    border-radius: 10px;
    padding: 8px 15px;
    margin-top: 10px;
    text-align: center;
    box-shadow: 0 4px 10px rgba(255, 152, 0, 0.3);
    animation: pulse-beaming 2s infinite alternate;
    height: auto;
    overflow: visible;
}

#static-toc-list {
    max-height: none;
    overflow: visible;
    padding-bottom: 10px;
}

#static-toc-list li {
    margin-bottom: 10px;
}

.beaming-cta h3 {
    font-family: 'Montserrat', sans-serif;
    /* Scales smaller */
    font-size: 1em; 
    color: #333;
    margin-bottom: 2px;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.1);
    line-height: 1.1;
}

.beaming-cta p {
    /* Scales smaller */
    font-size: 0.75em; 
    color: #555;
    margin-bottom: 7px;
    line-height: 1.2;
    letter-spacing: -0.02em;
}

.btn-beaming-cta {
    background-color: #e65100;
    color: #fff;
    padding: 6px 12px;
    /* Scales smaller */
    font-size: 0.8em; 
    border-radius: 50px;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.2);
    transition: background-color 0.3s ease, transform 0.2s ease, box-shadow 0.3s ease;
    border: none;
    cursor: pointer;
}

.btn-beaming-cta:hover {
    background-color: #ff5722;
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(0,0,0,0.3);
}

@keyframes pulse-beaming {
    0% {
        box-shadow: 0 8px 20px rgba(255, 152, 0, 0.3);
        transform: scale(1);
    }
    100% {
        box-shadow: 0 8px 30px rgba(255, 152, 0, 0.6), 0 0 15px rgba(255, 152, 0, 0.4);
        transform: scale(1.02);
    }
}

/* Mobile-specific CTA styling */
@media (max-width: 992px) {
    .static-toc-sidebar {
        position: fixed;
        bottom: 20px;
        right: 20px;
        width: auto;
        max-width: 180px;
        padding: 6px;
        background-color: rgba(227, 242, 253, 0.3);
        border: none;
        box-shadow: none;
        display: block !important;
        z-index: 100;
    }

    .static-toc-content {
        display: flex;
        flex-direction: column;
        align-items: flex-end;
    }

    #static-toc-list,
    #table-of-contents-list,
    .static-toc-sidebar h2 {
        display: none;
    }

    .beaming-cta {
        display: block !important;
        position: fixed;
        bottom: 20px;
        right: 20px;
        width: auto;
        max-width: 180px;
        margin: 0;
        z-index: 100;
    }

    .beaming-cta h3 {
        /* Scales smaller */
        font-size: 0.9em; 
        margin-bottom: 5px;
        line-height: 1.2;
    }

    .beaming-cta p {
        /* Scales smaller */
        font-size: 0.7em; 
        margin-bottom: 8px;
        line-height: 1.2;
    }

    .btn-beaming-cta {
        padding: 6px 10px;
        /* Scales smaller */
        font-size: 0.7em; 
        width: 100%;
    }

    @keyframes pulse-beaming-mobile {
        0% {
            box-shadow: 0 4px 10px rgba(255, 152, 0, 0.3);
        }
        100% {
            box-shadow: 0 4px 15px rgba(255, 152, 0, 0.6);
        }
    }
     .content-section h1 {
        font-size: 1.4em;
    }
    
    .content-section h2 {
        font-size: 1.2em;
        margin-top: 25px;
    }
    
    .content-section h3 {
        font-size: 1.05em;
        margin-top: 20px;
    }
    
    .content-section h4 {
        font-size: 0.95em;
        margin-top: 15px;
    }
    
    .hero-section h1 {
        font-size: 1.3em; 
    }
}


@media (max-width: 480px) {
    .static-toc-sidebar {
        right: 10px;
        bottom: 10px;
        max-width: 150px;
    }

    .beaming-cta {
        max-width: 150px;
        padding: 5px;
    }

    .beaming-cta h3 {
        /* Scales smaller */
        font-size: 0.8em; 
    }

    .beaming-cta p {
        /* Scales smaller */
        font-size: 0.6em; 
    }
     .content-section h1 {
        font-size: 1.2em;
        margin-top: 25px;
    }
    
    .content-section h2 {
        font-size: 1.1em;
        margin-top: 25px;
    }
    
    .content-section h3 {
        font-size: 1em;
        margin-top: 15px;
    }
    
    .content-section h4 {
        font-size: 0.9em;
        margin-top: 12px;
    }
    
    .hero-section h1 {
        font-size: 1.1em; 
    }
}

/* Other responsive adjustments */
@media (max-width: 992px) {
    .main-nav {
        display: none;
        flex-direction: column;
        width: 100%;
        position: absolute;
        top: 70px;
        left: 0;
        background-color: #0d47a1;
        box-shadow: 0 5px 10px rgba(0,0,0,0.2);
    }

    .main-nav.nav-open {
        display: flex;
    }

    .main-nav ul {
        flex-direction: column;
        width: 100%;
        padding: 20px 0;
        gap: 15px;
    }

    .main-nav ul li {
        text-align: center;
        margin: 5px 0;
    }

    .nav-toggle {
        display: flex;
    }

    .hero-section {
        height: auto;
        padding: 40px 0;
    }

    .hero-inner-container {
        padding: 25px;
        max-width: 90%;
    }

    .hero-section h1 {
        /* Scales smaller */
        font-size: 1.43em; 
    }

    .hero-section .tagline-study {
        /* Scales smaller */
        font-size: 0.93em; 
    }

    .hero-section .study-purpose,
    .hero-section .collaboration-info {
        /* Scales smaller */
        font-size: 0.9em; 
    }

    .section-grid {
        grid-template-columns: 1fr;
        gap: 30px;
    }

    .section-grid .media-content {
        order: -1;
        margin-bottom: 20px;
    }

    .main-footer .container {
        flex-direction: column;
        gap: 15px;
    }

    .footer-nav ul {
        flex-direction: column;
        gap: 10px;
    }

    .hero-content-study {
        padding: 25px;
    }

    .hero-actions-buttons {
        flex-direction: column;
        gap: 15px;
    }

    .table-of-contents-inline {
        display: none;
    }

    /* New styles for full-width header and hero on mobile */
    .main-header {
        /* Added for consistent side space */
        padding: 15px 1.25rem; 
    }

    .hero-media-placeholder {
        left: 0;
        right: 0;
        width: 100%;
    }

    .hero-content-study {
        padding: 20px;
    }

    /* NEW: Make container width match hero inner container on mobile */
    .content-section .container,
    .content-with-sidebar {
        width: 100%;
        max-width: 100%;
        padding-left: 0;
        padding-right: 0;
    }
    
    /* NEW: Center and constrain main content on mobile */
    .main-content {
        width: 90%;
        max-width: 700px;
        margin: 0 auto;
        padding: 0;
    }
    
    /* NEW: Adjust tables for mobile container */
    .main-content table {
        width: 100%;
        overflow-x: auto;
        display: block;
    }

    /* Ensure header and hero content match the container width */
    .main-header .container,
    .hero-section .container {
        /* Removed fixed px padding to allow responsive container padding to take over */
        padding-left: 0;
        padding-right: 0;
        width: 100%;
        max-width: 100%;
    }

    /* Adjust hero content padding */
    .hero-content-study {
        padding: 20px 0;
    }

    /* Ensure hero inner container matches content width */
    .hero-inner-container {
        width: 100%;
        max-width: 100%;
        margin: 0;
        border-radius: 0;
    }
}

@media (min-width: 993px) {
    .content-with-sidebar {
        grid-template-columns: 3fr 1fr;
        gap: 20px;
    }
    
    .static-toc-sidebar {
        grid-column: 2;
        display: block;
    }
    
    .main-content {
        grid-column: 1;
    }
    
    .table-of-contents-inline {
        display: none;
    }

    /* Change "Table of Contents" to "On This Page" for index.html */
    #table-of-contents-list + h2 {
        content: "On This Page";
    }
}

@media (max-width: 480px) {
    /* Updated for consistent mobile padding */
    .container {
        padding: 0 1rem; 
    }
    
    .hero-section h1 {
        /* Scales smaller */
        font-size: 1.04em; 
    }
    
    .hero-section .tagline-study {
        /* Scales smaller */
        font-size: 0.846em; 
    }
    
    .hero-section .study-purpose,
    .hero-section .collaboration-info {
        /* Scales smaller */
        font-size: 0.85em; 
    }
    
    .btn {
        padding: 8px 15px;
        /* Scales smaller */
        font-size: 0.85em; 
    }
    
    .btn.large-btn {
        padding: 10px 20px;
        /* Scales smaller */
        font-size: 0.9em; 
    }
    
    .hero-inner-container {
        padding: 15px;
    }
    
    .btn-action-main {
        padding: 12px 20px;
        /* Scales smaller */
        font-size: 1em; 
    }

    /* Ensure full width for header and hero on smallest screens */
    .main-header .container {
        /* Padding handled by .main-header rule above */
        padding-left: 0;
        padding-right: 0;
    }
    
    .main-header {
        /* Consistent side space */
        padding: 15px 1rem; 
    }

    .hero-section {
        padding: 30px 0;
    }

    /* NEW: Adjust main content width for smallest screens */
    .main-content {
        width: 95%;
        max-width: 700px;
        margin: 0 auto;
        padding: 0;
    }
    
    /* NEW: Further adjustments for content containers */
    .content-section .container,
    .content-with-sidebar {
        width: 100%;
        max-width: 100%;
        padding-left: 0;
        padding-right: 0;
    }

    /* Further adjustments for smallest screens */
    .main-header .container,
    .hero-section .container {
        padding-left: 0;
        padding-right: 0;
    }

    .hero-inner-container {
        padding: 15px;
    }
}

/* 3. FONT SCALING LOCK FOR EXTREMES (New Addition) */

/* Lock the root font size on standard mobile screens (Min Size) */
@media (max-width: 600px) {
    html {
        /* Lock at 15px for readability on small devices */
        font-size: 15px; 
    }
}

/* Lock the root font size on very large screens (Max Size) */
@media (min-width: 1400px) {
    html {
        /* Lock at 19px maximum size */
        font-size: 19px; 
    }
}
/* Navigation - Add Explore Opportunities */
.main-nav ul {
    gap: 15px;
}

.main-nav ul li.explore-opportunities {
    margin-left: 10px;
}

.main-nav ul li.explore-opportunities a {
    background-color: #ff9800;
    padding: 8px 15px;
    border-radius: 5px;
    transition: background-color 0.3s ease;
}

.main-nav ul li.explore-opportunities a:hover {
    background-color: #fb8c00;
    color: #fff;
}

/* For mobile menu */
@media (max-width: 992px) {
    .main-nav ul li.explore-opportunities {
        margin-left: 0;
        margin-top: 10px;
    }
    
    .main-nav ul li.explore-opportunities a {
        display: inline-block;
        width: auto;
    }
}

/* Change TOC heading to "On This Page" */
.static-toc-sidebar h2 {
    content: "On This Page";
}
/* Update the static TOC styling */
.static-toc-sidebar h2 {
    font-family: 'Montserrat', sans-serif;
    /* Scales smaller */
    font-size: 1.1em; 
    color: #1a237e;
    margin-top: 0;
    margin-bottom: 15px;
    text-align: left;
    padding-bottom: 5px;
    border-bottom: 1px solid #ddd;
}

.static-toc-sidebar ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.static-toc-sidebar ul li {
    margin-bottom: 12px;
    position: relative;
}

.static-toc-sidebar ul li a {
    color: #1976d2;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
    padding: 4px 0 4px 12px;
    display: block;
    /* Scales smaller */
    font-size: 0.9em; 
    border-left: 3px solid transparent;
    margin-left: -12px;
}

.static-toc-sidebar ul li a:hover,
.static-toc-sidebar ul li a.active {
    color: #e65100;
    border-left: 3px solid #e65100;
    background-color: rgba(230, 81, 0, 0.05);
    padding-left: 12px;
}

.static-toc-sidebar ul li a.active {
    font-weight: 700;
    background-color: rgba(230, 81, 0, 0.1);
}

/* NEW: Additional mobile-specific adjustments for consistent container sizing */
@media (max-width: 768px) {
    /* Ensure all content sections have consistent width */
    .content-section .container {
        display: flex;
        justify-content: center;
    }
    
    /* Center all content in the main area */
    .main-content > * {
        width: 100%;
    }
    
    /* Make sure images in content don't overflow */
    .main-content img {
        max-width: 100%;
        height: auto;
    }
    
    /* Adjust table overflow for mobile */
    .main-content table {
        display: block;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
}

/* NEW: Apply the same container logic to supply-chain.html content */
.supply-chain-content .main-content {
    width: 90%;
    max-width: 700px;
    margin: 0 auto;
    padding: 0;
}

@media (max-width: 480px) {
    .supply-chain-content .main-content {
        width: 95%;
    }
}
/* Update or replace the modal CSS in style.css */

/* READ MORE MODAL/POPUP WINDOW - FOR ALL SCREENS */
.read-more-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.85);
    z-index: 9999;
    overflow-y: auto;
    padding: 20px;
}

.read-more-modal.active {
    display: flex;
    justify-content: center;
    align-items: flex-start;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.modal-content-container {
    background-color: white;
    width: 95%;
    max-width: 1200px;
    max-height: 90vh;
    overflow-y: auto;
    border-radius: 10px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    position: relative;
    margin-top: 20px;
    margin-bottom: 20px;
    animation: slideUp 0.3s ease;
}

@keyframes slideUp {
    from { 
        transform: translateY(30px);
        opacity: 0;
    }
    to { 
        transform: translateY(0);
        opacity: 1;
    }
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 25px;
    background-color: #f5f5f5;
    border-bottom: 1px solid #ddd;
    border-radius: 10px 10px 0 0;
    position: sticky;
    top: 0;
    z-index: 100;
}

.modal-title {
    font-family: 'Montserrat', sans-serif;
    font-size: 1.6em;
    color: #1a237e;
    margin: 0;
    flex-grow: 1;
}

.modal-close-btn {
    background: none;
    border: none;
    font-size: 2em;
    color: #666;
    cursor: pointer;
    padding: 0;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: background-color 0.3s ease, color 0.3s ease;
}

.modal-close-btn:hover {
    background-color: #f0f0f0;
    color: #333;
}

.modal-body {
    padding: 25px;
    font-size: 1rem;
    line-height: 1.7;
}

/* Desktop-specific modal adjustments */
@media (min-width: 769px) {
    .modal-content-container {
        max-width: 1100px;
        margin-top: 40px;
        margin-bottom: 40px;
    }
    
    .modal-body {
        padding: 30px;
        font-size: 1.1rem;
    }
    
    /* Hide the inline dropdown content on ALL screens */
    .read-more-content {
        display: none !important;
    }
}

/* Mobile-only modal adjustments */
@media (max-width: 768px) {
    .modal-content-container {
        width: 98%;
        max-height: 95vh;
        margin-top: 10px;
        margin-bottom: 10px;
    }
    
    .modal-header {
        padding: 12px 15px;
    }
    
    .modal-title {
        font-size: 1.3em;
    }
    
    .modal-body {
        padding: 15px;
    }
    
    .modal-body table {
        font-size: 0.8em;
    }
    
    .modal-body img {
        max-width: 100%;
        height: auto;
    }
}

@media (max-width: 480px) {
    .read-more-modal {
        padding: 10px;
    }
    
    .modal-content-container {
        width: 100%;
        max-height: 98vh;
        border-radius: 0;
    }
    
    .modal-body {
        padding: 12px;
    }
    
    .modal-body h1,
    .modal-body h2,
    .modal-body h3,
    .modal-body h4 {
        font-size: 1.2em;
    }
}

/* Hide dropdown content on ALL screens - VERY IMPORTANT */
.read-more-content {
    display: none !important;
}

/* Keep the arrow animation for all screens */
#read-more-toggle-nuclear.open #read-more-arrow-nuclear,
#read-more-toggle-turbine.open #read-more-arrow-turbine,
#read-more-toggle-bop.open #read-more-arrow-bop {
    transform: rotate(180deg);
}

/* Remove the old mobile-only rule that was hiding the modal on desktop */
/* DELETE THIS SECTION if it exists in your CSS:
@media (min-width: 769px) {
    .read-more-modal {
        display: none !important;
    }
}
*/
/* --- Hamburger Toggle Button Styles --- */
.nav-toggle {
    /* Hidden by default on desktop */
    display: none; 
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.75rem;
    z-index: 1001;
    position: relative;
    width: 35px;
    height: 35px;
}

.hamburger-icon,
.hamburger-icon::before,
.hamburger-icon::after {
    content: '';
    display: block;
    width: 100%;
    height: 3px;
    background-color: #fff; /* White lines for visibility */
    position: absolute;
    left: 0;
    transition: all 0.3s ease-in-out;
    border-radius: 3px;
}

.hamburger-icon {
    top: 50%;
    transform: translateY(-50%);
}

.hamburger-icon::before {
    transform: translateY(-10px);
}

.hamburger-icon::after {
    transform: translateY(10px);
}

/* State when the button is active (menu is open) */
.nav-toggle.active .hamburger-icon {
    transform: rotate(45deg); /* Center line rotates to form the X */
}

.nav-toggle.active .hamburger-icon::before {
    transform: translateY(0) rotate(90deg); /* Top line moves to center and rotates */
}

.nav-toggle.active .hamburger-icon::after {
    opacity: 0; /* Hide the bottom line */
}


/* --- Mobile Menu & Toggle Visibility (Small Screen Styles) --- */
@media (max-width: 992px) {
    /* 1. Show the hamburger icon */
    .nav-toggle {
        display: block;
        margin-left: 1rem;
    }
    
    /* 2. Style the desktop navigation for mobile */
    .main-nav {
        /* Hide by default, show when .active */
        display: none; 
        position: absolute;
        top: 100%; /* Position right below the header */
        left: 0;
        width: 100%;
        background-color: #0d47a1; /* Header background color */
        box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    }
    
    /* 3. Show mobile navigation when the button is clicked */
    .main-nav.active {
        display: block;
    }
    
    /* 4. Stack the list items vertically */
    .main-nav ul {
        flex-direction: column;
        padding: 0;
        text-align: center;
    }
    
    .main-nav ul li {
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
        margin: 0;
    }
    
    .main-nav ul li:last-child {
        border-bottom: none;
    }
    
    .main-nav ul li a {
        display: block;
        padding: 1rem 1.25rem;
        font-size: 1.1rem;
    }
}
/* Section Links Styling */
.section-links {
    margin: 20px 0;
    padding-left: 20px;
}

.section-links li {
    margin-bottom: 10px;
}

.section-links a {
    color: #1976d2;
    text-decoration: none;
    font-weight: 500;
    padding: 4px 0;
    display: inline-block;
    transition: color 0.3s ease;
}

.section-links a:hover {
    color: #0d47a1;
    text-decoration: none;
}

/* ===== MOBILE TABLE OF CONTENTS (On This Page) - NEW ===== */
.mobile-toc-container {
    display: none; /* Hidden by default (desktop) */
    background: #e3f2fd; /* Light blue background */
    padding: 1rem;
    border-radius: 8px;
    margin-bottom: 2rem;
    border: 1px solid #bbdefb;
    grid-column: 1 / -1; /* Make it span the full width of the container on small screens */
}

.mobile-toc-container h2 {
    font-family: 'Montserrat', sans-serif;
    font-size: 1.2rem;
    color: #1a237e;
    margin-bottom: 0.75rem;
    border-bottom: 2px solid #90caf9;
    padding-bottom: 0.5rem;
}

.mobile-toc-container ul {
    list-style: none; /* Remove list bullets */
    display: flex; /* Arrange links horizontally */
    flex-wrap: wrap; /* Allow wrapping */
    gap: 0.75rem; /* Reduced gap for smaller screens */
    padding: 0;
    margin: 0;
}

.mobile-toc-container ul li {
    flex-shrink: 0;
}

.mobile-toc-container ul li a {
    color: #1976d2;
    text-decoration: none; /* *** REMOVE UNDERLINE (Requested) *** */
    font-weight: 500;
    padding: 0.5rem 0.75rem; /* Slightly smaller padding */
    display: inline-block;
    background-color: #f1f8ff;
    border-radius: 4px;
    transition: background-color 0.3s ease;
    border: 1px solid #bbdefb;
    font-size: 0.9rem;
}

.mobile-toc-container ul li a:hover {
    background-color: #bbdefb;
    color: #1a237e;
}

/* Mobile-specific CTA and TOC styling (≤ 992px) */ 
@media (max-width: 992px) {
    .content-with-sidebar { 
        grid-template-columns: 1fr; 
        gap: 2rem; 
    }
    
    .main-content { 
        grid-column: 1; 
    }
    
    /* Hide the entire static sidebar TOC on mobile */ 
    .static-toc-sidebar { 
        display: none !important; 
    } 

    /* NEW: Show the mobile TOC */
    .mobile-toc-container {
        display: block;
    }
    
}
/* General Link Styling (Requested: Blue color, no underline) */
a {
    color: #007bff; /* Standard, accessible blue */
    text-decoration: none; /* Remove underline (Requested) */
    transition: color 0.3s ease;
}

a:hover {
    color: #0056b3; /* Darker blue on hover for feedback */
    text-decoration: underline; /* Optional: Adds underline back on hover for accessibility */
}

/* Ensure existing header links keep their white color */
.main-nav a {
    color: #fff;
    /* text-decoration: none; is preserved by the general 'a' rule, or explicitly added for safety */
}

/* NEW: Styles for the content inside the modal for a clean, professional look (Requested) */
.modal-body p {
    margin-bottom: 1.5rem; /* Increase spacing after paragraphs */
    text-align: justify;
}

.modal-body h3, .modal-body h4 {
    border-left: 5px solid #1976d2; /* Professional accent border */
    padding-left: 15px;
    margin-top: 2.5rem; /* More space before subtopics */
    margin-bottom: 1rem;
}

.modal-body ul {
    margin-bottom: 1.5rem; /* Spacing after lists */
    padding-left: 25px; /* Ensure lists are indented properly */
    list-style: disc; /* Ensure default list style is present */
}

/* Style the modal trigger buttons */
#read-more-toggle-nuclear, #read-more-toggle-turbine, #read-more-toggle-bop {
    background-color: #e8f0fe !important; /* Lighter, more professional background */
    color: #1a237e !important; /* Darker, professional text */
    border: 1px solid #c5d8ff !important;
    padding: 15px !important;
    margin: 20px 0 !important;
    transition: all 0.3s ease;
}

#read-more-toggle-nuclear:hover, #read-more-toggle-turbine:hover, #read-more-toggle-bop:hover {
    background-color: #d0e1ff !important;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}
/* ... existing CSS content ... */

/* NEW: Styles for the content inside the modal for a clean, professional look (Requested) */
.modal-body p {
    margin-bottom: 1.5rem; /* Increase spacing after paragraphs */
    text-align: justify;
}

.modal-body h3, .modal-body h4 {
    border-left: 5px solid #1976d2; /* Professional accent border */
    padding-left: 15px;
    margin-top: 2.5rem; /* More space before subtopics */
    margin-bottom: 1rem;
}

.modal-body ul {
    margin-bottom: 1.5rem; /* Spacing after lists */
    padding-left: 25px; /* Ensure lists are indented properly */
    list-style: disc; /* Ensure default list style is present */
}

/* Style the modal trigger buttons */
#read-more-toggle-nuclear, #read-more-toggle-turbine, #read-more-toggle-bop {
    background-color: #e8f0fe !important; /* Lighter, more professional background */
    color: #1a237e !important; /* Darker, professional text */
    /* ... other styles ... */
}

/* FIX: Ensure the beaming mobile CTA and its container reappear (as requested by user) */
/* This rule is placed at the end to guarantee it overrides any conflicting 'display: none' rule. */
@media (max-width: 992px) {
    /* Re-assert visibility for the mobile CTA's container */
    .static-toc-sidebar {
        display: block !important;
    }
    /* Re-assert visibility for the CTA itself */
    .beaming-cta {
        display: block !important;
    }
}
/* style.css modification */

/* ... other styles ... */
.logo {
    display: flex;
    align-items: center;
    text-decoration: none;
    color: #fff;
    font-weight: 700;
    /* Now scales smaller relative to new root font size */
    font-size: 1.5em;
}

.logo img {
    /* Existing rules */
    height: 40px;
    margin-right: 10px;
    
    /* NEW: Rules to make the image circular */
    width: 40px; 
    border-radius: 50%;
}
/* ... other styles ... */
/* Add to style.css - Button press animation for close button */
.modal-close-btn:active {
    background-color: #ddd !important;
    transform: scale(0.95);
    transition: transform 0.1s ease, background-color 0.1s ease;
}

/* Optional: Add a subtle animation to modal when closing */
.read-more-modal.active {
    animation: fadeIn 0.3s ease;
}

.read-more-modal:not(.active) .modal-content-container {
    animation: slideOut 0.3s ease;
}

@keyframes slideOut {
    from { 
        transform: translateY(0);
        opacity: 1;
    }
    to { 
        transform: translateY(30px);
        opacity: 0;
    }
}
/* Add this to the very end of style.css */

/* 0.8x FONT SIZES FOR MOBILE PHONES */
@media (max-width: 992px) {
    /* Base font scaling */
    html {
        font-size: calc(15px * 0.9) !important; /* 12px instead of 15px */
    }
    
    body {
        font-size: calc(1rem * 0.9) !important; /* 0.9rem instead of ~1rem */
    }
    
    /* Headings - 0.9x reduction */
    .hero-section h1 {
        font-size: calc(1.43em * 0.9) !important; /* ~1.14em */
    }
    
    .hero-section .tagline-study {
        font-size: calc(0.93em * 0.9) !important; /* ~0.74em */
    }
    
    .hero-section .study-purpose,
    .hero-section .collaboration-info {
        font-size: calc(0.9em * 0.9) !important; /* ~0.72em */
    }
    
    .content-section h1 {
        font-size: calc(1.4em * 0.9) !important; /* ~1.12em */
    }
    
    .content-section h2 {
        font-size: calc(1.2em * 0.9) !important; /* ~0.96em */
    }
    
    .content-section h3 {
        font-size: calc(1.05em * 0.9) !important; /* ~0.84em */
    }
    
    .content-section h4 {
        font-size: calc(0.95em * 0.9) !important; /* ~0.76em */
    }
    
    /* Buttons and text - 0.8x reduction */
    .btn {
        font-size: calc(0.85em * 0.9) !important; /* ~0.68em */
        padding: calc(8px * 0.9) calc(15px * 0.8) !important; /* ~6.4px 12px */
    }
    
    .btn.large-btn {
        font-size: calc(0.9em * 0.9) !important; /* ~0.72em */
        padding: calc(10px * 0.9) calc(20px * 0.9) !important; /* ~8px 16px */
    }
    
    p, .hero-inner-container, .researcher-contact {
        font-size: calc(1em * 0.9) !important; /* ~0.8em */
        line-height: 1.5 !important;
    }
    
    table {
        font-size: calc(0.9em * 0.9) !important; /* ~0.72em */
    }
    
    table th, table td {
        padding: calc(14px * 0.9) calc(18px * 0.9) !important; /* ~11.2px 14.4px */
    }
    
    .image-caption {
        font-size: calc(0.9em * 0.9) !important; /* ~0.72em */
    }
    
    /* Container padding reduction */
    .hero-inner-container {
        padding: calc(25px * 0.9) !important; /* ~20px */
    }
    
    .container {
        padding: 0 calc(1.25rem * 0.9) !important; /* ~1rem */
    }
    
    /* Logo and navigation */
    .logo {
        font-size: calc(1.5em * 0.9) !important; /* ~1.2em */
    }
    
    .main-nav a {
        font-size: calc(0.9rem * 0.9) !important; /* ~0.72rem */
    }
    
    /* Footer */
    .main-footer {
        font-size: calc(0.9em * 0.9) !important; /* ~0.72em */
    }
}

@media (max-width: 480px) {
    /* Further 0.8x reduction for very small screens */
    html {
        font-size: calc(15px * 0.8) !important; /* 10.5px for extra small */
    }
    
    .hero-section h1 {
        font-size: calc(1.1em * 0.9) !important; /* ~0.88em */
    }
    
    .content-section h1 {
        font-size: calc(1.2em * 0.9) !important; /* ~0.96em */
    }
    
    .content-section h2 {
        font-size: calc(1.1em * 0.9) !important; /* ~0.88em */
    }
    
    .btn {
        font-size: calc(0.85em * 0.9) !important; /* ~0.68em */
        padding: calc(8px * 0.9) calc(15px * 0.9) !important; /* ~6.4px 12px */
    }
    
    .hero-inner-container {
        padding: calc(15px * 0.9) !important; /* ~12px */
    }
    
    /* Mobile TOC */
    .mobile-toc-container h2 {
        font-size: calc(1.1rem * 0.9) !important; /* ~0.88rem */
    }
    
    .mobile-toc-container ul li a {
        font-size: calc(0.85em * 0.9) !important; /* ~0.68em */
        padding: calc(0.4rem * 0.9) calc(0.6rem * 0.9) !important; /* ~0.32rem 0.48rem */
    }
    
    /* Static sidebar CTA */
    .beaming-cta h3 {
        font-size: calc(0.8em * 0.9) !important; /* ~0.64em */
    }
    
    .beaming-cta p {
        font-size: calc(0.6em * 0.9) !important; /* ~0.48em */
    }
    
    .btn-beaming-cta {
        font-size: calc(0.7em * 0.9) !important; /* ~0.56em */
        padding: calc(6px * 0.9) calc(10px * 0.9) !important; /* ~4.8px 8px */
    }
}