:root {
    --primary-color: #6c5ce7;
    --secondary-color: #00d2d3;
    --accent-color: #ff6b6b;
    --dark-bg: #0a0e27;
    --light-bg: #1a1f3a;
    --text-light: #e0e0e0;
    --text-dark: #333;
    --gradient-1: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --gradient-2: linear-gradient(135deg, #00d2d3 0%, #6c5ce7 100%);
    --shadow-color: rgba(108, 92, 231, 0.3);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Rajdhani', sans-serif;
    background-color: var(--dark-bg);
    color: var(--text-light);
    overflow-x: hidden;
}

/* Preloader */
.preloader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: var(--dark-bg);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    transition: opacity 0.5s ease, visibility 0.5s ease;
}

.preloader.hidden {
    opacity: 0;
    visibility: hidden;
}

.loader {
    width: 80px;
    height: 80px;
    border: 5px solid rgba(108, 92, 231, 0.2);
    border-top: 5px solid var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Header & Navigation */
header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    transition: background-color 0.3s ease;
}

header.scrolled {
    background-color: rgba(10, 14, 39, 0.95);
    backdrop-filter: blur(10px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
}

nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 5%;
    max-width: 1400px;
    margin: 0 auto;
}

.logo {
    font-family: 'Orbitron', sans-serif;
    font-size: 1.8rem;
    font-weight: 900;
    color: var(--text-light);
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 10px;
}

.logo i {
    color: var(--secondary-color);
    font-size: 2rem;
}

.nav-links {
    display: flex;
    list-style: none;
    gap: 30px;
}

.nav-links a {
    color: var(--text-light);
    text-decoration: none;
    font-size: 1.1rem;
    font-weight: 500;
    position: relative;
    transition: color 0.3s ease;
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--gradient-2);
    transition: width 0.3s ease;
}

.nav-links a:hover {
    color: var(--secondary-color);
}

.nav-links a:hover::after {
    width: 100%;
}

.menu-toggle {
    display: none;
    flex-direction: column;
    cursor: pointer;
}

.menu-toggle span {
    width: 25px;
    height: 3px;
    background-color: var(--text-light);
    margin: 3px 0;
    transition: 0.3s;
}

/* 1. Make sure the container covers the FULL screen */
.models-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    pointer-events: none;
    z-index: 10;
    overflow: visible;
}

/* Sections Animation Classes */
.section-container {
    opacity: 0;
    overflow: hidden;
}

.section-title {
    font-family: 'Orbitron', sans-serif;
    font-size: 2.5rem;
    font-weight: 700;
    text-align: center;
    margin-bottom: 20px;
    background: var(--gradient-2);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    position: relative;
    display: inline-block;
    transition: transform 0.3s ease;
    cursor: pointer;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 3px;
    background: var(--gradient-2);
    transition: width 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.section-title:hover {
    transform: translateY(-5px);
}

.section-title:hover::after {
    width: 100%;
}

.section-title.animated::after {
    width: 80px;
}

.section-subtitle {
    text-align: center;
    font-size: 1.2rem;
    margin-bottom: 50px;
    color: var(--text-light);
    opacity: 0.8;
}

/* Animation keyframes */
@keyframes flyInFromLeft {
    from { transform: translateX(-100vw); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}

@keyframes flyInFromRight {
    from { transform: translateX(100vw); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}

@keyframes flyInFromTop {
    from { transform: translateY(-100vh); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

@keyframes flyInFromBottom {
    from { transform: translateY(100vh); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

@keyframes flyInFromTopLeft {
    from { transform: translate(-100vw, -100vh); opacity: 0; }
    to { transform: translate(0, 0); opacity: 1; }
}

@keyframes flyInFromTopRight {
    from { transform: translate(100vw, -100vh); opacity: 0; }
    to { transform: translate(0, 0); opacity: 1; }
}

@keyframes flyInFromBottomLeft {
    from { transform: translate(-100vw, 100vh); opacity: 0; }
    to { transform: translate(0, 0); opacity: 1; }
}

@keyframes flyInFromBottomRight {
    from { transform: translate(100vw, 100vh); opacity: 0; }
    to { transform: translate(0, 0); opacity: 1; }
}

@keyframes titleSlideIn {
    from { transform: translateY(-50px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

@keyframes subtitleSlideIn {
    from { transform: translateY(30px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

/* Sections */
section {
    padding: 80px 5%;
    max-width: 1400px;
    margin: 0 auto;
}

/* 2. Push text to the bottom to create room in the middle */
#home {
    height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: flex-end; /* This pushes the text to the bottom */
    align-items: center;
    text-align: center;
    position: relative;
    padding-bottom: 8vh;       /* Adds space at the very bottom (8% of viewport) */
    background: radial-gradient(ellipse at center, rgba(108, 92, 231, 0.2) 0%, rgba(10, 14, 39, 0) 70%);
}

.hero-content {
    z-index: 5;
    max-width: 800px;
    margin-bottom: 20px; /* Slight lift from the padding-bottom */
}

.hero-title {
    font-family: 'Orbitron', sans-serif;
    font-size: 4rem;
    font-weight: 900;
    margin-bottom: 10px; /* Reduced from 20px */
    background: var(--gradient-1);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: glow 2s ease-in-out infinite alternate;
}

@keyframes glow {
    from { text-shadow: 0 0 10px #6c5ce7, 0 0 20px #6c5ce7; }
    to { text-shadow: 0 0 20px #00d2d3, 0 0 30px #00d2d3; }
}

.hero-subtitle {
    font-size: 1.5rem;
    margin-bottom: 15px; /* Reduced from 30px */
    opacity: 0.9;
}

.hero-description {
    font-size: 1.1rem;
    margin-bottom: 25px; /* Reduced from 40px */
    line-height: 1.6;
    opacity: 0.8;
}

.cta-buttons {
    display: flex;
    gap: 20px;
    justify-content: center;
    flex-wrap: wrap;
}

.btn {
    padding: 12px 30px;
    font-size: 1.1rem;
    font-weight: 600;
    border: none;
    border-radius: 50px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-block;
    position: relative;
    overflow: hidden;
}

.btn-primary {
    background: var(--gradient-2);
    color: white;
}

.btn-secondary {
    background: transparent;
    color: var(--text-light);
    border: 2px solid var(--secondary-color);
}

.btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 20px var(--shadow-color);
}

.btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.2);
    transition: left 0.5s ease;
}

.btn:hover::before {
    left: 100%;
}

/* About Section */
#about {
    background-color: var(--light-bg);
    border-radius: 20px;
    margin-top: 50px;
}

.about-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 50px;
    align-items: center;
}

.about-text {
    font-size: 1.1rem;
    line-height: 1.8;
}

.about-stats {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 30px;
}

.stat-card {
    background: rgba(108, 92, 231, 0.1);
    border-radius: 15px;
    padding: 30px;
    text-align: center;
    border: 1px solid rgba(108, 92, 231, 0.3);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.stat-card:hover {
    transform: translateY(-10px) scale(1.05);
    box-shadow: 0 15px 30px var(--shadow-color);
}

.stat-number {
    font-family: 'Orbitron', sans-serif;
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--secondary-color);
    margin-bottom: 10px;
}

.stat-label {
    font-size: 1.1rem;
    font-weight: 600;
}

/* Services Section */
#services {
    margin-top: 50px;
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    margin-top: 50px;
}

.service-card {
    background: rgba(26, 31, 58, 0.7);
    border-radius: 15px;
    padding: 40px 30px;
    text-align: center;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: 1px solid rgba(108, 92, 231, 0.2);
    position: relative;
    overflow: hidden;
}

.service-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 5px;
    background: var(--gradient-2);
}

.service-card:hover {
    transform: translateY(-10px) scale(1.05);
    box-shadow: 0 15px 30px var(--shadow-color);
}

.service-icon {
    font-size: 3rem;
    color: var(--secondary-color);
    margin-bottom: 20px;
}

.service-title {
    font-family: 'Orbitron', sans-serif;
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 15px;
}

.service-description {
    font-size: 1rem;
    line-height: 1.6;
    opacity: 0.8;
}

/* Portfolio Section */
#portfolio {
    background-color: var(--light-bg);
    border-radius: 20px;
    margin-top: 50px;
}

.portfolio-filters {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-bottom: 40px;
    flex-wrap: wrap;
}

.filter-btn {
    padding: 10px 20px;
    background: transparent;
    border: 1px solid var(--secondary-color);
    color: var(--text-light);
    border-radius: 30px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 1rem;
    font-weight: 600;
}

.filter-btn.active,
.filter-btn:hover {
    background: var(--gradient-2);
    border-color: transparent;
}

.portfolio-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 30px;
}

.portfolio-item {
    position: relative;
    border-radius: 15px;
    overflow: hidden;
    height: 300px;
    cursor: pointer;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.portfolio-item:hover {
    transform: scale(1.05);
    box-shadow: 0 15px 30px var(--shadow-color);
}

.portfolio-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.portfolio-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to top, rgba(10, 14, 39, 0.9) 0%, rgba(10, 14, 39, 0.4) 50%, rgba(10, 14, 39, 0.1) 100%);
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: 20px;
    opacity: 0;
    transition: opacity 0.3s ease;
    cursor: pointer; /* Clickable cursor */
}

.portfolio-item:hover .portfolio-overlay {
    opacity: 1;
}

.portfolio-title {
    font-family: 'Orbitron', sans-serif;
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 10px;
}

.portfolio-category {
    font-size: 1rem;
    color: var(--secondary-color);
}

.portfolio-icon {
    margin-top: 15px;
    font-size: 2rem;
    color: white;
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.3s ease 0.1s;
}

.portfolio-item:hover .portfolio-icon {
    opacity: 1;
    transform: translateY(0);
}

/* Models Section */
#models {
    background-color: var(--light-bg);
    border-radius: 20px;
    margin-top: 50px;
}

.models-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 30px;
    margin-top: 50px;
    margin-bottom: 50px;
}

.model-card {
    background: rgba(26, 31, 58, 0.7);
    border-radius: 15px;
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: 1px solid rgba(108, 92, 231, 0.2);
    cursor: pointer;
    position: relative;
}

.model-card:hover {
    transform: translateY(-10px) scale(1.05);
    box-shadow: 0 15px 30px var(--shadow-color);
}

.model-thumbnail {
    width: 100%;
    height: 200px;
    object-fit: cover;
    background: linear-gradient(135deg, rgba(108, 92, 231, 0.3) 0%, rgba(0, 210, 211, 0.3) 100%);
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 3rem;
    color: var(--secondary-color);
}

.model-info {
    padding: 20px;
}

.model-name {
    font-family: 'Orbitron', sans-serif;
    font-size: 1.3rem;
    font-weight: 700;
    margin-bottom: 8px;
    color: var(--text-light);
}

.model-type {
    font-size: 0.9rem;
    color: var(--secondary-color);
    margin-bottom: 10px;
}

.model-description {
    font-size: 0.95rem;
    line-height: 1.5;
    opacity: 0.8;
}

/* 3D Model Viewer */
.model-viewer-container {
    margin-top: 50px;
    background: rgba(10, 14, 39, 0.5);
    border-radius: 15px;
    border: 1px solid rgba(108, 92, 231, 0.2);
    overflow: hidden;
    position: relative;
}

.model-viewer-header {
    background: rgba(26, 31, 58, 0.9);
    padding: 20px;
    border-bottom: 1px solid rgba(108, 92, 231, 0.2);
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 15px;
}

.viewer-controls {
    display: flex;
    gap: 15px;
    align-items: center;
    flex-wrap: wrap;
}

.file-input-wrapper {
    position: relative;
    overflow: hidden;
    display: inline-block;
}

.file-input-wrapper input[type=file] {
    position: absolute;
    left: -9999px;
}

.file-input-label {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    background: var(--gradient-2);
    color: white;
    border-radius: 30px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s ease;
}

.file-input-label:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px var(--shadow-color);
}

.viewer-info {
    color: var(--text-light);
    font-size: 0.9rem;
    opacity: 0.8;
}

.model-viewer-canvas {
    width: 100%;
    height: 600px;
    position: relative;
    background: radial-gradient(ellipse at center, rgba(108, 92, 231, 0.1) 0%, rgba(10, 14, 39, 0) 70%);
}

.viewer-instructions {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
    color: var(--text-light);
    opacity: 0.7;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.viewer-instructions.hidden {
    opacity: 0;
}

.viewer-instructions i {
    font-size: 3rem;
    margin-bottom: 15px;
    color: var(--secondary-color);
}

.viewer-instructions p {
    font-size: 1.1rem;
    margin-bottom: 10px;
}

.viewer-instructions small {
    font-size: 0.9rem;
    opacity: 0.7;
}

/* Team Section */
#team {
    margin-top: 50px;
}

.team-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 30px;
    margin-top: 50px;
}

.team-member {
    background: rgba(26, 31, 58, 0.7);
    border-radius: 15px;
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: 1px solid rgba(108, 92, 231, 0.2);
}

.team-member:hover {
    transform: translateY(-10px) scale(1.05);
    box-shadow: 0 15px 30px var(--shadow-color);
}

.member-image {
    width: 100%;
    height: 300px;
    object-fit: cover;
}

.member-info {
    padding: 25px;
}

.member-name {
    font-family: 'Orbitron', sans-serif;
    font-size: 1.4rem;
    font-weight: 700;
    margin-bottom: 5px;
}

.member-role {
    color: var(--secondary-color);
    font-weight: 600;
    margin-bottom: 15px;
}

.member-bio {
    font-size: 0.95rem;
    line-height: 1.6;
    opacity: 0.8;
}

.member-socials {
    display: flex;
    gap: 15px;
    margin-top: 20px;
}

.social-link {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(108, 92, 231, 0.2);
    display: flex;
    justify-content: center;
    align-items: center;
    color: var(--text-light);
    transition: all 0.3s ease;
}

.social-link:hover {
    background: var(--gradient-2);
    transform: translateY(-5px);
}

/* Contact Section */
#contact {
    background-color: var(--light-bg);
    border-radius: 20px;
    margin-top: 50px;
}

.contact-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 50px;
    margin-top: 50px;
}

.contact-info {
    display: flex;
    flex-direction: column;
    gap: 30px;
}

.contact-item {
    display: flex;
    align-items: center;
    gap: 20px;
    transition: transform 0.3s ease;
}

.contact-item:hover {
    transform: translateX(10px);
}

.contact-icon {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: var(--gradient-2);
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 1.5rem;
}

.contact-details h3 {
    font-family: 'Orbitron', sans-serif;
    font-size: 1.2rem;
    margin-bottom: 5px;
}

.contact-details p {
    font-size: 1rem;
    opacity: 0.8;
}

.contact-form {
    background: rgba(10, 14, 39, 0.5);
    border-radius: 15px;
    padding: 30px;
    border: 1px solid rgba(108, 92, 231, 0.2);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.contact-form:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 30px var(--shadow-color);
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
}

.form-control {
    width: 100%;
    padding: 12px 15px;
    background: rgba(26, 31, 58, 0.7);
    border: 1px solid rgba(108, 92, 231, 0.3);
    border-radius: 8px;
    color: var(--text-light);
    font-size: 1rem;
    transition: all 0.3s ease;
}

.form-control:focus {
    outline: none;
    border-color: var(--secondary-color);
    box-shadow: 0 0 0 3px rgba(0, 210, 211, 0.2);
}

textarea.form-control {
    resize: vertical;
    min-height: 120px;
}

.form-message {
    padding: 10px;
    border-radius: 8px;
    margin-bottom: 20px;
    display: none;
}

.form-message.success {
    background: rgba(76, 175, 80, 0.2);
    border: 1px solid rgba(76, 175, 80, 0.5);
    color: #4caf50;
}

.form-message.error {
    background: rgba(244, 67, 54, 0.2);
    border: 1px solid rgba(244, 67, 54, 0.5);
    color: #f44336;
}

.map-container {
    margin-top: 50px;
    border-radius: 15px;
    overflow: hidden;
    height: 400px;
    border: 1px solid rgba(108, 92, 231, 0.2);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.map-container::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    /* Use a semi-transparent purple color (e.g., your primary color) */
    background-color: rgba(108, 92, 231, 0.5); /* Primary Color with 30% opacity */
    pointer-events: none; /* Allows user to interact (zoom/pan) with the map underneath */
    z-index: 2; /* Ensures it sits above the map canvas (z-index 1) but below the custom marker (z-index 100+) */
    border-radius: 15px; /* Matches the container's border-radius */
}

.map-container:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 30px var(--shadow-color);
}

.map-container iframe {
    width: 100%;
    height: 100%;
    border: none;
}

/* Footer */
footer {
    background-color: var(--light-bg);
    padding: 50px 5% 20px;
    margin-top: 50px;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 40px;
    margin-bottom: 30px;
}

.footer-column h3 {
    font-family: 'Orbitron', sans-serif;
    font-size: 1.3rem;
    margin-bottom: 20px;
    position: relative;
    padding-bottom: 10px;
}

.footer-column h3::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 50px;
    height: 2px;
    background: var(--gradient-2);
}

.footer-links {
    list-style: none;
}

.footer-links li {
    margin-bottom: 10px;
}

.footer-links a {
    color: var(--text-light);
    text-decoration: none;
    transition: color 0.3s ease;
    display: inline-block;
    position: relative;
}

.footer-links a::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 1px;
    background: var(--secondary-color);
    transition: width 0.3s ease;
}

.footer-links a:hover {
    color: var(--secondary-color);
}

.footer-links a:hover::after {
    width: 100%;
}

.social-icons {
    display: flex;
    gap: 15px;
    margin-top: 20px;
}

.copyright {
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid rgba(108, 92, 231, 0.2);
    font-size: 0.9rem;
    opacity: 0.7;
}

/* Lightbox / Modal - NEW STYLES */
.lightbox {
    display: none; 
    position: fixed; 
    z-index: 2000; 
    left: 0;
    top: 0;
    width: 100%; 
    height: 100%; 
    overflow: auto; 
    background-color: rgba(10, 14, 39, 0.98); 
    backdrop-filter: blur(8px);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.lightbox.show {
    opacity: 1;
}

.lightbox-content {
    margin: 50px auto;
    width: 90%;
    max-width: 1000px;
    position: relative;
    background-color: transparent;
    border-radius: 15px;
}

.lightbox-header {
    background: linear-gradient(to right, rgba(26, 31, 58, 0.9), rgba(10, 14, 39, 0.9));
    padding: 20px;
    border-radius: 10px 10px 0 0;
    border-bottom: 1px solid var(--primary-color);
    margin-bottom: 20px;
    text-align: center;
    position: relative;
    box-shadow: 0 5px 15px rgba(0,0,0,0.3);
}

.lightbox-title {
    font-family: 'Orbitron', sans-serif;
    color: var(--text-light);
    font-size: 2rem;
    margin-bottom: 5px;
    text-shadow: 0 0 10px var(--primary-color);
}

.lightbox-category {
    color: var(--secondary-color);
    font-size: 1.1rem;
    text-transform: uppercase;
    letter-spacing: 2px;
}

/* Gallery Viewer */
.lightbox-viewer {
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
    background-color: black;
    min-height: 400px;
    max-height: 80vh;
    overflow: hidden;
    margin-bottom: 20px;
    border-radius: 10px;
}

.lightbox-image {
    max-width: 100%;
    max-height: 80vh;
    object-fit: contain;
    display: block;
    transition: opacity 0.3s ease;
}

/* Navigation Arrows */
.lightbox-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(10, 14, 39, 0.7);
    color: var(--secondary-color);
    border: 1px solid var(--secondary-color);
    padding: 15px 10px;
    cursor: pointer;
    font-size: 2rem;
    transition: background 0.3s ease, color 0.3s ease;
    z-index: 10;
    border-radius: 5px;
}

.lightbox-nav:hover {
    background: var(--secondary-color);
    color: var(--dark-bg);
}

.arrow-left {
    left: 10px;
}

.arrow-right {
    right: 10px;
}

/* Image Counter */
.image-count {
    text-align: center;
    font-size: 1rem;
    color: var(--primary-color);
    margin-top: -10px;
}

/* Close Button */
#close-lightbox-x {
    position: absolute;
    top: 10px;
    right: 20px;
    color: #fff;
    font-size: 40px;
    font-weight: bold;
    cursor: pointer;
    transition: 0.3s;
    line-height: 1;
    z-index: 100; /* Ensure the X is clickable over the image */
}

#close-lightbox-x:hover {
    color: var(--secondary-color);
    transform: rotate(90deg);
}

@media (max-width: 992px) {
    .nav-links {
        position: fixed;
        top: 0;
        right: -100%;
        width: 70%;
        height: 50vh;
        background-color: var(--dark-bg);
        flex-direction: column;
        justify-content: center;
        align-items: center;
        transition: right 0.5s ease;
        z-index: 999;
    }

    .nav-links.active {
        right: 0;
    }

    .menu-toggle {
        display: flex;
        z-index: 1000;
    }

    .menu-toggle.active span:nth-child(1) {
        transform: rotate(-45deg) translate(-5px, 6px);
    }

    .menu-toggle.active span:nth-child(2) {
        opacity: 0;
    }

    .menu-toggle.active span:nth-child(3) {
        transform: rotate(45deg) translate(-5px, -6px);
    }

    /* HEADER MODELS HIDDEN */
    .models-container {
        display: none;
    }
    
    /* NEW FIX: SHRINK THE HOME SECTION HEIGHT AND ADJUST PADDING */
    #home {
        height: auto;           /* Allow height to shrink based on content */
        min-height: 50vh;       /* Ensures it's still large enough for a hero area */
        padding-top: 120px;     /* Ensures content clears the fixed header/menu (~50px gap + 70px header) */
        padding-bottom: 50px;   /* Reduces bottom padding dramatically */
        justify-content: flex-start; /* Pushes content from the top */
    }

    .hero-title {
        /* Adjusted font size for better mobile fit */
        font-size: 3rem;
    }
    
    /* ABOUT SECTION FIXES (TEXT ON TOP OF SQUARES) */
    .about-content {
        grid-template-columns: 1fr;
        /* Reorder elements for mobile view */
        display: flex;
        flex-direction: column;
    }
    
    .about-stats {
        /* Pushes stats below the text */
        order: 2; 
        margin-top: 30px;
    }
    
    .about-text {
        order: 1;
    }

    /* CONTACT SECTION FIXES (INFO ON TOP OF FORM) */
    .contact-content {
        grid-template-columns: 1fr;
        display: flex;
        flex-direction: column;
    }
    
    .contact-form {
        /* Pushes form below the info block */
        order: 2; 
    }
    
    .contact-info {
        order: 1;
        margin-bottom: 30px;
    }
}

@media (max-width: 768px) {
    .hero-title {
        font-size: 2.5rem;
    }

    .hero-subtitle {
        font-size: 1.2rem;
    }

    .section-title {
        font-size: 2rem;
    }

    .portfolio-grid {
        grid-template-columns: 1fr;
    }

    .team-grid {
        grid-template-columns: 1fr;
    }

    .about-stats {
        grid-template-columns: 1fr;
    }

    .model-viewer-canvas {
        height: 400px;
    }
}

@media (max-width: 576px) {
    .hero-title {
        font-size: 2rem;
    }

    .cta-buttons {
        flex-direction: column;
        align-items: center;
    }

    .btn {
        width: 100%;
        max-width: 300px;
    }
    
    .lightbox-content {
        margin: 20px auto;
        width: 95%;
    }
    .lightbox-nav {
        font-size: 1.5rem;
        padding: 8px 5px;
    }
}

/* Custom Neon Marker Style (used by AdvancedMarkerElement in JS) */
.neon-map-marker {
    width: 18px;
    height: 18px;
    background-color: var(--secondary-color); /* Cyan/Blue Glow */
    border: 3px solid var(--primary-color);   /* Purple Border */
    border-radius: 50%;
    box-shadow: 0 0 10px var(--secondary-color), 0 0 5px var(--primary-color) inset;
}