@import url('https://fonts.googleapis.com/css2?family=Rajdhani:wght@300;400;500;600;700&display=swap');

:root {
    --orange: #f47a23;
    --blue: #10afef;
    --green: #74c047;
    --dark-bg: #051428;
    --light-text: #ffffff;
    --semi-transparent: rgba(5, 20, 40, 0.85);
}

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

body {
    font-family: 'Rajdhani', sans-serif;
    background-color: var(--dark-bg);
    color: var(--light-text);
    letter-spacing: 0.03em;
}

html:not(.static-page-scroll) body {
    overflow: hidden; /* For index.html (main experience page) */
}

html.static-page-scroll body {
    overflow-y: auto;   /* Allow vertical scroll for static pages */
    overflow-x: hidden; /* Prevent horizontal scroll for static pages */
}

#scene-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 1s ease-in-out;
    cursor: default; /* For mouse panning */
    z-index: 1; /* Ensure it's below controls-info */
}

#scene-container.grabbing {
    cursor: grabbing;
}


#controls-info {
    position: fixed; /* JS will set top/left and transform for centering */
    width: 60px;
    height: 60px;
    background-color: rgba(255, 255, 255, 0.1); /* Subtle background */
    border: 2px solid rgba(255, 255, 255, 0.3);   /* Subtle border */
    border-radius: 8px;
    z-index: 999;    /* Keep it on top */
    opacity: 0;      /* JS will manage opacity for show/hide */
    /* pointer-events: none; /* JS sets to 'auto' when visible */
    
    /* Transitions for opacity (from JS) and hover effects */
    transition: opacity 0.3s ease-in-out, border-color 0.3s ease, background-color 0.3s ease;

    /* Ensure no old styles interfere */
    padding: 0;
    box-shadow: none;
    backdrop-filter: none;
    text-align: initial; /* Reset */
    max-width: initial; /* Reset */
    font-weight: initial; /* Reset */
    letter-spacing: initial; /* Reset */
}

#controls-info:hover {
    background-color: rgba(255, 255, 255, 0.2);
    border-color: var(--orange); /* Use theme orange for hover border */
}

/* Animated arrows for the controls guide */
.animated-arrow-container {
    position: relative;
    width: 250px;
    height: 140px;
    margin: 15px auto;
    background-color: rgba(5, 20, 40, 0.3);
    border-radius: 4px;
    overflow: hidden;
}

.animated-car {
    position: absolute;
    width: 40px;
    height: 20px;
    background-color: var(--blue);
    border-radius: 3px;
    top: 60px;
    left: 105px;
    z-index: 2;
}

.animated-car:before {
    content: "";
    position: absolute;
    top: -8px;
    left: 5px;
    width: 30px;
    height: 12px;
    background-color: var(--blue);
    border-radius: 3px 3px 0 0;
}

.animated-arrow {
    position: absolute;
    width: 0; /* Changed for CSS triangle arrows */
    height: 0; /* Changed for CSS triangle arrows */
    top: 60px; /* Adjusted for centering with car */
    opacity: 0.2;
    transition: opacity 0.5s ease;
}

.animated-arrow.left {
    left: 40px; /* Adjusted position */
    border-top: 10px solid transparent;
    border-bottom: 10px solid transparent;
    border-right: 20px solid var(--orange);
    animation: pulse-left 2s infinite alternate;
}

.animated-arrow.right {
    right: 40px; /* Adjusted position */
    border-top: 10px solid transparent;
    border-bottom: 10px solid transparent;
    border-left: 20px solid var(--orange);
    animation: pulse-right 2s infinite alternate;
}

@keyframes pulse-left {
    0% { opacity: 0.2; transform: translateX(5px) translateY(-50%); } /* Adjusted for centering */
    100% { opacity: 1; transform: translateX(0) translateY(-50%); } /* Adjusted for centering */
}

@keyframes pulse-right {
    0% { opacity: 0.2; transform: translateX(-5px) translateY(-50%); } /* Adjusted for centering */
    100% { opacity: 1; transform: translateX(0) translateY(-50%); } /* Adjusted for centering */
}


/* Section Text Display Styles - Based on reference image */
#section-text-container {
    position: fixed;
    top: 100px;
    left: 50px;
    width: 360px;
    z-index: 10;
    opacity: 0;
    transition: opacity 0.5s ease-in-out, transform 0.3s ease-in-out;
    pointer-events: auto; /* Allow interaction */
    max-height: calc(100vh - 150px); /* Allow for expansion without extending past viewport */
    display: flex;
    flex-direction: column;
}

/* Style for links in the navigation */
.nav-section a, #left-side-nav a { /* Added #left-side-nav a */
    color: var(--blue);
    text-decoration: none;
    transition: color 0.3s ease;
}

.nav-section a:hover, #left-side-nav a:hover { /* Added #left-side-nav a:hover */
    color: var(--orange);
    text-decoration: underline;
}

/* Style for lists in the navigation */
.nav-section ul {
    padding-left: 20px;
    margin-bottom: 15px;
}

.nav-section li {
    margin-bottom: 8px;
    line-height: 1.4;
}

#section-text {
    display: flex;
    flex-direction: column;
    background-color: var(--semi-transparent);
    color: var(--light-text);
    border-radius: 6px;
    font-size: 1rem;
    font-weight: 500;
    width: 100%;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.25);
    overflow: hidden;
    transition: all 0.4s ease-in-out;
    border: 1px solid rgba(16, 175, 239, 0.2);
}

.section-header {
    display: flex;
    align-items: center;
    padding: 16px;
    background-color: rgba(16, 175, 239, 0.1);
    cursor: pointer;
    flex-shrink: 0;
    z-index: 20; /* Ensure header is above content for click */
    border: 2px solid var(--orange);
    border-radius: 6px 6px 0 0; /* Keep top radius */
    box-shadow: 0 0 6px rgba(244, 122, 35, 0.4);
    cursor: pointer; /* Indicates the header is clickable */
}

.section-icon {
    width: 60px;
    height: 60px;
    border-radius: 6px;
    overflow: hidden;
    flex-shrink: 0;
    background-color: rgba(16, 175, 239, 0.15);
    margin-right: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    cursor: pointer; /* Make icon itself clickable */
    transition: transform 0.3s ease, background-color 0.3s ease;
}

.section-icon:hover {
    transform: scale(1.1);
    background-color: rgba(16, 175, 239, 0.3);
}

.section-icon svg {
    width: 36px;
    height: 36px;
    fill: var(--blue);
    stroke: var(--light-text);
    stroke-width: 0.5;
    filter: drop-shadow(0 2px 3px rgba(0,0,0,0.3));
}

/* Camera section icon animation */
.icon-camera circle,
.icon-camera rect {
    transform-origin: center;
    animation: pulse 2s infinite alternate ease-in-out;
}

/* Village section icon animation */
.icon-village path {
    transform-origin: bottom center;
    animation: sway 3s infinite alternate ease-in-out;
}

/* Playground section icon animation */
.icon-playground .swing {
    transform-origin: top center;
    animation: swing 3s infinite alternate ease-in-out;
}

/* Tata section icon animation */
.icon-tata path {
    stroke-dasharray: 100;
    stroke-dashoffset: 100;
    animation: draw 4s infinite alternate forwards;
}

/* Research section icon animation */
.icon-research path {
    transform-origin: center;
    animation: rotate 4s infinite linear;
}

/* Plane section icon animation */
.icon-plane path {
    transform-origin: center;
    animation: flyUpDown 4s infinite alternate ease-in-out;
}

/* Animation keyframes */
@keyframes pulse {
    0% { transform: scale(1); }
    100% { transform: scale(1.2); }
}

@keyframes sway {
    0% { transform: rotate(-5deg); }
    100% { transform: rotate(5deg); }
}

@keyframes swing {
    0% { transform: rotate(-15deg); }
    100% { transform: rotate(15deg); }
}

@keyframes draw {
    0% { stroke-dashoffset: 100; }
    100% { stroke-dashoffset: 0; }
}

@keyframes rotate {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

@keyframes flyUpDown {
    0% { transform: translateY(-5px) rotate(0deg); }
    100% { transform: translateY(5px) rotate(0deg); }
}

.section-header-text {
    flex: 1;
}

.section-title {
    font-size: 1.5rem;
    margin-bottom: 4px;
    font-weight: 600;
    color: var(--blue);
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.section-subtitle {
    font-size: 1rem;
    opacity: 0.9;
    font-weight: 500;
    line-height: 1.4;
    color: var(--light-text);
}

.section-content {
    padding: 0; /* Initial padding removed, handled by inner */
    max-height: 0;
    overflow-y: auto;
    transition: max-height 0.5s ease-in-out, opacity 0.5s ease-in-out, padding 0.5s ease-in-out; /* Added padding transition */
    opacity: 0;
    border-left: 2px solid var(--orange);
    border-right: 2px solid var(--orange);
    border-bottom: 2px solid var(--orange);
    border-radius: 0 0 6px 6px; /* Keep bottom radius */
    box-shadow: 0 4px 8px rgba(244, 122, 35, 0.3); /* Added shadow for depth */
}

.section-content-inner {
    padding: 24px;
    padding-bottom: 30px; /* Ensure space for scrollbar if content is long */
}

.section-content-inner p {
    color: var(--light-text);
    line-height: 1.6;
    margin-bottom: 16px;
}

#section-text.expanded .section-content { /* Use parent .expanded */
    max-height: calc(100vh - 300px); /* Adjusted max-height for better fit */
    opacity: 1;
    padding-top: 0; /* Ensure padding is applied correctly when expanded */
    padding-bottom: 0;
}

/* Landing Page Styles */
#landing-page {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: var(--dark-bg);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000; /* Ensure it's on top */
    transition: opacity 0.8s ease-in-out;
    color: var(--light-text);
    font-family: 'Rajdhani', sans-serif;
}

.landing-content {
    text-align: center;
    max-width: 800px;
    padding: 20px;
}

.landing-title {
    font-size: 4rem;
    margin-bottom: 20px;
    font-weight: 700;
    text-shadow: 0 2px 10px rgba(244, 122, 35, 0.5);
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: var(--orange);
}

.landing-subtitle {
    font-size: 1.6rem;
    margin-bottom: 40px;
    font-weight: 400;
    opacity: 0.9;
    max-width: 600px;
    margin-left: auto; /* Center if max-width is applied */
    margin-right: auto; /* Center if max-width is applied */
    color: var(--blue); /* Updated to match var */
    letter-spacing: 0.03em;
}

.loading-container { /* Wrapper for button and status */
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px; /* Space between button and status */
}

.loading-button {
    width: 280px; /* Fixed width */
    height: 60px; /* Fixed height */
    border-radius: 4px;
    border: 2px solid var(--orange);
    background-color: rgba(244, 122, 35, 0.1);
    color: var(--light-text);
    font-size: 1.2rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    cursor: default;
    position: relative;
    overflow: hidden;
    transition: all 0.5s ease;
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
    text-transform: uppercase;
    font-family: 'Rajdhani', sans-serif;
    display: flex; /* For centering span */
    align-items: center; /* For centering span */
    justify-content: center; /* For centering span */
}

.loading-button:before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    width: var(--loading-width, 0%); /* Use CSS variable for progress */
    background-color: var(--orange);
    opacity: 0.7;
    transition: width 0.5s ease;
    z-index: 0;
}

.loading-button span {
    position: relative;
    z-index: 1;
}

.loading-button.ready {
    background-color: rgba(244, 122, 35, 0.2);
    cursor: pointer;
    box-shadow: 0 0 15px rgba(244, 122, 35, 0.5);
}

.loading-button.ready:hover {
    background-color: rgba(244, 122, 35, 0.4);
    transform: translateY(-2px);
}

.loading-button.ready:before {
    width: 100%; /* Fill when ready, or keep dynamic if preferred */
}

.loading-status {
    /* Removed absolute positioning, now part of .loading-container flow */
    text-align: center;
    font-size: 0.9rem;
    opacity: 0.7;
    color: var(--light-text); /* Ensure visibility */
}

/* Shine effect for the enter button when ready */
@keyframes subtleShine {
    0% {
        box-shadow: 0 0 10px var(--accent-color), 0 0 20px var(--accent-color);
    }
    50% {
        box-shadow: 0 0 15px var(--accent-color), 0 0 30px var(--accent-color), 0 0 40px rgba(244, 122, 35, 0.5);
    }
    100% {
        box-shadow: 0 0 10px var(--accent-color), 0 0 20px var(--accent-color);
    }
}

.loading-button.ready.shine-effect {
    animation: subtleShine 2s infinite ease-in-out;
}

/* Hamburger Menu Styles */
.hamburger-menu {
    position: fixed;
    top: 20px;
    left: 20px;
    width: 40px;
    height: 40px;
    background-color: #f47a23; /* Explicit solid orange */
    border-radius: 4px;
    z-index: 1003; /* Slightly increased z-index */
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    transition: background-color 0.3s ease, transform 0.3s ease;
    box-shadow: 0 2px 5px rgba(0,0,0,0.3);
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
}

.hamburger-menu:hover {
    background-color: #d86a1e;
    transform: scale(1.05);
}

.hamburger-menu .hamburger-line { /* Specific to left toggle lines */
    width: 24px;
    height: 3px;
    background-color: #ffffff; /* Explicit solid white */
    margin: 2px 0; /* Adjusted margin for standard hamburger */
    transition: transform 0.3s ease, opacity 0.3s ease;
    border-radius: 1px; /* Slight rounding */
}

/* Animation for left toggle when its nav is open */
.hamburger-menu.open .hamburger-line:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
}

.hamburger-menu.open .hamburger-line:nth-child(2) {
    opacity: 0;
}

.hamburger-menu.open .hamburger-line:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
}

.side-nav { /* Renamed from #side-nav for consistency, ID is #left-side-nav */
    position: fixed;
    top: 0;
    left: -300px; /* Start off-screen */
    width: 300px;
    height: 100%;
    background-color: var(--semi-transparent);
    z-index: 1001; /* Below toggle */
    transition: left 0.4s ease-in-out; /* Changed from 0.3s */
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-right: 2px solid var(--orange); /* Matched var */
    overflow-y: auto;
    padding-top: 70px; /* Space for toggle */
}

.side-nav.open { /* Use .open class for JS control */
    left: 0;
}
/* Keep hover effect if desired, though click is primary now */
.hamburger-menu:hover + #left-side-nav, #left-side-nav:hover {
    left: 0;
}


.nav-header { /* Styles for header within nav panels */
    padding: 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    justify-content: space-between; /* Or center if no close button */
    align-items: center;
}

.nav-header h2 {
    color: var(--orange);
    margin: 0;
    font-size: 1.5rem; /* Consistent size */
}

.nav-links { /* Container for links in left-side-nav */
    padding: 20px;
    /* border-bottom: 1px solid rgba(255, 255, 255, 0.1); */ /* Optional */
    display: flex;
    flex-direction: column;
}

.nav-link { /* Individual link style */
    color: var(--light-text);
    text-decoration: none;
    padding: 12px 0; /* Increased padding */
    font-size: 1.1rem;
    font-weight: 500;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    transition: all 0.3s ease;
}

.nav-link:hover {
    color: var(--orange);
    padding-left: 10px; /* Indent on hover */
}

.nav-link:last-child {
    border-bottom: none;
}

/* ----- Right Info Panel ----- */
#right-nav-toggle {
    position: fixed;
    top: 20px;
    right: 20px; /* Positioned to the right */
    left: auto; /* Override potential inherited left */
    width: 40px;
    height: 40px;
    background-color: var(--orange); /* Or var(--blue) for distinction */
    border-radius: 4px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 5px; /* Original gap */
    cursor: pointer;
    z-index: 1001; /* Same level as side-navbar toggle */
    box-shadow: 0 2px 5px rgba(0,0,0,0.3);
    transition: all 0.3s ease;
}

#right-nav-toggle:hover {
    transform: scale(1.05);
    box-shadow: 0 3px 8px rgba(0,0,0,0.4);
    background-color: #d86a1e; /* Darken on hover */
}

#right-nav-toggle .hamburger-line { /* Specific to right toggle lines */
    width: 24px;
    height: 3px;
    background-color: white;
    transition: all 0.3s ease;
    border-radius: 2px; /* Original radius */
}

/* Animation for right toggle when its nav is active/open */
#right-nav-toggle.active .hamburger-line:nth-child(1) {
    transform: translateY(8px) rotate(45deg); /* Original transform */
}

#right-nav-toggle.active .hamburger-line:nth-child(2) {
    opacity: 0;
}

#right-nav-toggle.active .hamburger-line:nth-child(3) {
    transform: translateY(-8px) rotate(-45deg); /* Original transform */
}

.side-navbar { /* Renamed ID to #right-side-navbar */
    position: fixed;
    top: 0;
    right: -300px; /* Start off-screen */
    width: 300px;
    height: 100%;
    background-color: var(--semi-transparent);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px); /* Add prefix for wider compatibility */
    z-index: 1000; /* Below its toggle */
    transition: right 0.4s ease-in-out;
    box-shadow: -5px 0 15px rgba(0,0,0,0.2);
    padding: 80px 30px 30px 30px; /* Original padding, gives space for toggle */
    overflow-y: auto;
    border-left: 2px solid var(--blue);
}

.side-navbar.open { /* Use .open class for JS control */
    right: 0;
}

.nav-section { /* General section styling for nav panels */
    margin-bottom: 30px; /* Original: 40px, or 30px from other definition */
}

.nav-section h2 { /* Titles in right-side-navbar */
    color: var(--orange);
    font-size: 1.8rem;
    font-weight: 600;
    margin-bottom: 15px;
    border-bottom: 2px solid var(--blue);
    padding-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}
/* For .side-nav if it uses .nav-section h3 */
.nav-section h3 {
    color: var(--blue);
    margin-bottom: 15px;
    font-size: 1.2rem;
    border-bottom: 1px solid rgba(16, 175, 239, 0.3);
    padding-bottom: 5px;
}

.nav-section p {
    color: var(--light-text);
    line-height: 1.6;
    margin-bottom: 15px;
    font-size: 1rem;
    letter-spacing: 0.03em;
}

.contact-item {
    display: flex;
    align-items: center;
    margin-bottom: 15px;
    gap: 10px;
}

.contact-icon {
    width: 24px;
    height: 24px;
    fill: var(--blue);
    flex-shrink: 0; /* Prevent icon from shrinking */
}

.contact-text {
    color: var(--light-text);
    font-size: 0.95rem; /* Slightly smaller for contact details */
}

/* Language Toggle */
#language-toggle {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 1001; /* Higher than modal popups, navs, etc. */
}

#lang-button {
    background-color: var(--orange, #f47a23);
    color: var(--light-text, #ffffff);
    border: none;
    padding: 8px 15px;
    border-radius: 5px;
    font-family: 'Rajdhani', sans-serif;
    font-weight: 600;
    font-size: 0.9rem;
    cursor: pointer;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
    transition: background-color 0.3s ease, transform 0.2s ease;
}

#lang-button:hover {
    background-color: var(--blue, #10afef);
    transform: translateY(-1px);
}

#lang-button:active {
    transform: translateY(0px);
}

/* Media query for smaller screens to adjust padding/font if needed */
@media (max-width: 768px) {
    /* Mobile styles for Language Toggle Button */
    #language-toggle {
        top: 15px;
        right: 15px;
    }
    #lang-button {
        padding: 7px 12px;
        font-size: 0.85rem;
    }

    /* --- Existing mobile styles below this line --- */
    /* Page headers on static pages */
    .page-header h1 {
        font-size: 2.2rem; /* Slightly smaller header on mobile */
    }

    /* Team member profiles - already have some responsiveness */
    .team-member-profile {
        flex-basis: calc(100% - 20px); /* Stack them fully on smaller mobile */
    }

    /* MNH Contact Details */
    .mnh-contact-details {
        padding: 15px;
    }
    .mnh-contact-details h3, .mnh-contact-details h4 {
        font-size: 1.3rem;
    }

    /* Ensure hamburger menu is easily clickable */
    .hamburger-menu {
        padding: 15px; /* Ensure enough tap area */
        top: 15px;
        left: 15px;
    }

     /* Adjust expanded text box size on mobile for main scene */
    .text-box-expanded {
        max-height: 40vh; /* Limit height more on mobile */
        font-size: 0.9rem;
        padding: 15px;
    }

    .text-box-expanded h2 {
        font-size: 1.2rem;
    }
    /* Mobile adjustments for section-text-container */
    #section-text-container {
        width: 90%;
        left: 5%;
        top: auto;
        bottom: 15%; /* Changed from 20px */
        max-height: 45vh;
        font-size: 0.9rem;
    }

    #section-text .section-header {
        padding: 12px;
    }

    #section-text .section-icon {
        width: 30px; /* Smaller icon */
        height: 30px;
        margin-right: 8px;
    }

    #section-text .section-title {
        font-size: 1.2em; /* Relative to container's font size */
    }

    #section-text .section-subtitle {
        font-size: 0.9em; /* Relative to container's font size */
    }

    #section-text .section-content-inner {
        padding: 12px;
    }

    #section-text .section-content-inner p {
        font-size: 1em; /* Relative to container's font size */
        line-height: 1.5;
    }

    #section-text .section-media img {
        max-height: 100px; /* Smaller media images */
    }

    /* Adjustments for side navigation menus on mobile */
    .side-nav,
    .side-navbar {
        width: 250px; /* Narrower on mobile */
    }
}

@media (max-width: 480px) {
    /* Page headers on static pages */
    .page-header h1 {
        font-size: 1.8rem;
    }

    #section-text-container {
        font-size: 0.85rem;
        top: auto;
        bottom: 10%; /* Changed from 15px */
    }

    #section-text .section-title {
        font-size: 1.1em;
    }
}

/* Ensure footer is styled consistently for static pages */
.page-footer {
    text-align: center;
    padding: 20px;
    border-top: 1px solid var(--semi-transparent);
    margin-top: 40px;
}

/* Orientation Prompt Specifics (if any, otherwise uses general modal styles) */
#orientation-prompt {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: var(--dark-bg); /* Using site's dark background */
    color: var(--light-text);
    /* display: flex;  Will be controlled by JS, default is none from inline style */
    align-items: center;
    justify-content: center;
    text-align: center;
    z-index: 10000; /* Ensure it's on top of everything */
    font-family: 'Rajdhani', sans-serif;
    padding: 20px;
    box-sizing: border-box;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

#orientation-prompt.visible {
    opacity: 1;
    visibility: visible;
    display: flex; /* Make sure flex is applied when visible */
    flex-direction: column; /* Stack content vertically if needed */
}

#orientation-prompt p {
    font-size: 1.3rem;
    line-height: 1.7;
    max-width: 80%;
}

/* Blinking animation for interactive elements */
@keyframes blink-pulse {
    0% {
        opacity: 0.7;
        transform: translate(-50%, -50%) scale(0.95);
        box-shadow: 0 0 0 0 rgba(255, 255, 255, 0.5);
    }
    50% {
        opacity: 1;
        transform: translate(-50%, -50%) scale(1.05);
        box-shadow: 0 0 10px 5px rgba(255, 255, 255, 0.7);
    }
    100% {
        opacity: 0.7;
        transform: translate(-50%, -50%) scale(0.95);
        box-shadow: 0 0 0 0 rgba(255, 255, 255, 0.5);
    }
}

.blinking-indicator {
    animation: blink-pulse 1.5s infinite ease-in-out;
}

/* General styles for the scene and UI elements */
#scene-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 1s ease-in-out;
    cursor: default; /* For mouse panning */
    z-index: 1; /* Ensure it's below controls-info */
}

#scene-container.grabbing {
    cursor: grabbing;
}

#controls-info {
    position: fixed; /* JS will set top/left and transform for centering */
    width: 60px;
    height: 60px;
    background-color: rgba(255, 255, 255, 0.1); /* Subtle background */
    border: 2px solid rgba(255, 255, 255, 0.3);   /* Subtle border */
    border-radius: 8px;
    z-index: 999;    /* Keep it on top */
    opacity: 0;      /* JS will manage opacity for show/hide */
    /* pointer-events: none; /* JS sets to 'auto' when visible */
    
    /* Transitions for opacity (from JS) and hover effects */
    transition: opacity 0.3s ease-in-out, border-color 0.3s ease, background-color 0.3s ease;

    /* Ensure no old styles interfere */
    padding: 0;
    box-shadow: none;
    backdrop-filter: none;
    text-align: initial; /* Reset */
    max-width: initial; /* Reset */
    font-weight: initial; /* Reset */
    letter-spacing: initial; /* Reset */
}

#controls-info:hover {
    background-color: rgba(255, 255, 255, 0.2);
    border-color: var(--orange); /* Use theme orange for hover border */
}

#controls-info.blinking-indicator {
    animation: blink-pulse 1.5s infinite ease-in-out;
}

/* General Modal Popup Styles */
.modal-popup {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.6); /* Semi-transparent background overlay */
    display: none; /* Initially hidden */
    align-items: center;
    justify-content: center;
    z-index: 1000; /* Ensure it's on top */
    opacity: 0;
    transition: opacity 0.3s ease-in-out;
}

.modal-popup.show {
    display: flex; /* Use flex to center content */
    opacity: 1;
}

.popup-content {
    background-color: var(--dark-bg, #051428); /* Use CSS variable or fallback */
    color: var(--light-text, #ffffff);
    padding: 25px;
    border-radius: 8px;
    border: 1px solid var(--orange, #f47a23); /* Use CSS variable or fallback */
    box-shadow: 0 5px 15px rgba(0,0,0,0.3);
    text-align: left;
    max-width: 90%;
    width: 400px; /* Adjust as needed */
    position: relative; /* For positioning close button */
}

.popup-content h3 {
    color: var(--orange, #f47a23);
    margin-top: 0;
    margin-bottom: 15px;
    font-size: 1.5em;
}

.popup-content p {
    margin-bottom: 10px;
    line-height: 1.6;
    font-size: 1em;
}

.popup-close-button {
    position: absolute;
    top: 10px;
    right: 15px;
    font-size: 2em;
    font-weight: bold;
    color: var(--light-text, #ffffff);
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
    line-height: 1;
}

.popup-close-button:hover {
    color: var(--orange, #f47a23);
}

/* Orientation Prompt Specifics (if any, otherwise uses general modal styles) */
#orientation-prompt .popup-content {
    background-color: var(--dark-bg);
    padding: 30px;
    border-radius: 8px;
    border: 1px solid var(--accent-color);
    box-shadow: 0 5px 25px rgba(0,0,0,0.5);
    text-align: center;
    max-width: 450px;
    width: 90%;
    position: relative;
    color: var(--light-text);
}

.popup-content h3 {
    color: var(--accent-color);
    margin-top: 0;
    margin-bottom: 15px;
    font-size: 1.6em;
}

.popup-content p {
    margin-bottom: 10px;
    font-size: 1.1em;
    line-height: 1.6;
}

/* Details Overlay Styles */
.details-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.85); /* Darker, more immersive backdrop */
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    z-index: 2000; /* Ensure it's above other content */
    transition: opacity 0.35s ease-in-out, visibility 0.35s ease-in-out; /* Ensure visibility is transitioned */
}

.details-overlay.visible {
    opacity: 1;
    visibility: visible;
}

.details-overlay-content {
    background-color: #1E1E1E; /* Dark background for content area as fallback */
    color: #E0E0E0; /* Light default text color */
    padding: 0; /* Padding will be handled by inner elements or hero styling */
    border-radius: 8px; /* Subtle rounding */
    width: 100%;
    max-width: 950px; /* Can be wider for this style */
    height: 90vh; /* Use height for more control with flex */
    max-height: 700px; /* Cap the height */
    position: relative;
    box-shadow: 0 15px 50px rgba(0,0,0,0.3); /* More pronounced shadow for dark theme */
    transform: scale(0.97);
    transition: transform 0.35s cubic-bezier(0.165, 0.84, 0.44, 1), opacity 0.35s ease-in-out;
    opacity: 0; /* Handled by .details-overlay.visible */
    display: flex; /* Use flex to structure hero and content body */
    flex-direction: column;
    /* Background image (hero) is set by JavaScript on this element */
    background-size: cover;
    background-position: center top; /* Show top of image by default */
    background-repeat: no-repeat;
}

.details-overlay.visible .details-overlay-content {
    transform: scale(1);
    opacity: 1;
}

.details-overlay-close {
    position: absolute;
    top: 20px;
    right: 25px;
    background: rgba(0,0,0,0.3); /* Subtle background for better visibility on varied images */
    border: none;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    font-size: 1.8rem;
    font-weight: 300;
    color: #ffffff; /* White 'x' */
    cursor: pointer;
    line-height: 40px; /* Center 'x' in circle */
    text-align: center;
    padding: 0;
    transition: background-color 0.25s ease, transform 0.25s ease;
    z-index: 10; /* Ensure it's above content */
}

.details-overlay-close:hover {
    background-color: rgba(0,0,0,0.6);
    transform: rotate(90deg) scale(1.1);
}

#details-overlay-body {
    padding: 30px;
    overflow-y: auto;
    flex-grow: 1;
    position: relative;
    background-color: #1E1E1E;
}

/* Styling for the H1 title which will appear over the hero image */
#details-overlay-body h1 {
    font-family: 'Roboto', 'Rajdhani', sans-serif; /* Sharp heading font */
    font-size: 3.2rem; /* Large, prominent title */
    font-weight: 700; /* Bold */
    color: #ffffff; /* Bright white title */
    text-align: center;
    /* This padding creates the space for the hero visual. */
    /* The H1 is technically inside the scrollable body, but appears at the top of .details-overlay-content */
    padding: 18vh 30px 5vh 30px; 
    margin: 0; /* Remove default margins */
    border-bottom: none; /* Remove any previous underline */
    letter-spacing: -0.02em; /* Slightly tighter for modern feel */
    line-height: 1.2;
    text-shadow: 0 2px 10px rgba(0,0,0,0.6); /* Stronger shadow for readability on potentially complex images */
    position: relative; /* To ensure it's part of the flow but can have text-shadow */
}

#details-overlay-body h2 {
    font-family: 'Roboto', 'Rajdhani', sans-serif;
    font-size: 1.8rem;
    color: #E0E0E0;
    margin-top: 2.5em; /* More space before H2 */
    margin-bottom: 1em;
    font-weight: 600;
    border-bottom: 1px solid #444444; /* Subtle separator */
    padding-bottom: 0.4em;
}

#details-overlay-body h3 {
    font-family: 'Roboto', 'Rajdhani', sans-serif;
    font-size: 1.4rem;
    color: #C0C0C0;
    margin-top: 2em;
    margin-bottom: 0.8em;
    font-weight: 600;
}

#details-overlay-body p {
    line-height: 1.75;
    margin-bottom: 1.6em;
    font-size: 1.05rem; /* Readable size on dark */
    color: #B0B0B0; /* Softer white/grey for paragraphs */
    font-family: 'Open Sans', sans-serif; /* Or your preferred body font */
    max-width: 750px; /* Optimal reading line length */
    margin-left: auto; 
    margin-right: auto; 
}

#details-overlay-body strong {
    font-weight: 600;
    color: #E0E0E0; /* Brighter for emphasis */
}

#details-overlay-body img {
    max-width: 100%;
    height: auto;
    border-radius: 6px;
    margin: 2em auto; /* Centered with good spacing */
    display: block;
    box-shadow: 0 8px 20px rgba(0,0,0,0.25); /* Shadow suitable for dark theme */
}

#details-overlay-body a {
    color: var(--tata-orange, #f47a23); /* Use existing orange, with fallback */
    text-decoration: none;
    font-weight: 600;
    border-bottom: 1px solid transparent; /* Prepare for hover effect */
    transition: color 0.2s ease, border-bottom-color 0.2s ease;
}

#details-overlay-body a:hover {
    color: #ff9933; /* Brighter orange on hover */
    border-bottom-color: #ff9933;
}

#details-overlay-body ul,
#details-overlay-body ol {
    padding-left: 30px;
    margin-top: 0.5em;
    margin-bottom: 1.6em;
    line-height: 1.75;
    color: #B0B0B0;
    max-width: 750px;
    margin-left: auto;
    margin-right: auto;
}

#details-overlay-body li {
    margin-bottom: 0.7em;
}

/* Scrollbar styling for dark theme (Webkit browsers) */
#details-overlay-body::-webkit-scrollbar {
    width: 10px;
}

#details-overlay-body::-webkit-scrollbar-track {
    background: #2a2a2a; /* Dark track */
    border-radius: 10px;
}

#details-overlay-body::-webkit-scrollbar-thumb {
    background: #555555; /* Grey thumb */
    border-radius: 10px;
    border: 2px solid #2a2a2a; /* Creates padding around thumb, matching track */
}

#details-overlay-body::-webkit-scrollbar-thumb:hover {
    background: #777777; /* Lighter thumb on hover */
}

/* Ensure this new block is the definitive style for the overlay */
/* Any subsequent general styles for p, h1 etc. should not override these specific ones */

/* Placeholder for where the next distinct style block in your CSS file might begin */
/* For example, if you have .read-more-container styles after this, they would follow. */

/* Read More Button in Section Text Box */
.read-more-container {
    margin-top: 15px; /* Space above the button */
    text-align: right; /* Align button to the right, or 'left'/'center' as preferred */
}

.read-more-button {
    background-color: var(--tata-orange); /* Use Tata orange for primary action */
    color: #ffffff;
    border: none;
    padding: 10px 18px;
    border-radius: 5px;
    font-family: 'Roboto', sans-serif; /* Assuming Roboto is a primary font, adjust if needed */
    font-size: 0.9rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    cursor: pointer;
    transition: background-color 0.3s ease, transform 0.2s ease;
    display: inline-block;
    text-decoration: none; /* In case it was an <a> tag before and styles linger */
}

.read-more-button:hover, .read-more-button:focus {
    background-color: #e06a1a; /* Slightly darker orange on hover */
    color: #ffffff;
    transform: translateY(-2px);
    outline: none;
}

/* Ensure .hidden class is effective */
.hidden {
    display: none !important;
}