:root {
    /* Light Mode Theme */
    --bg-color: #ffffff;
    --bg-alt: #f8f9fa;
    --text-color: #212529;
    --text-muted: #6b7280;
    --primary: #ca8a04;
    /* Construction Yellow/Gold */
    --primary-hover: #a16207;
    --border-color: #e5e7eb;
    --card-bg: #ffffff;
    --card-bg-transparent: rgba(255, 255, 255, 0);
    --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);

    /* Hero/Video variables for Light Mode (Whitish overlay, no shadows) */
    --hero-overlay: rgba(255, 255, 255, 0.7);
    --hero-text-shadow: none;
    --nav-text-shadow: none;

    /* Layout */
    --nav-height: 80px;
    --container-width: 1200px;
}

[data-theme="dark"] {
    /* Dark Mode Theme */
    --bg-color: #121212;
    --bg-alt: #1e1e1e;
    --text-color: #f3f4f6;
    --text-muted: #9ca3af;
    --primary: #facc15;
    --primary-hover: #eab308;
    --border-color: #374151;
    --card-bg: #1f2937;
    --card-bg-transparent: rgba(31, 41, 55, 0);
    --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.3), 0 2px 4px -1px rgba(0, 0, 0, 0.2);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.4), 0 4px 6px -2px rgba(0, 0, 0, 0.3);

    /* Hero/Video variables for Dark Mode (Dark overlay, text shadows) */
    --hero-overlay: rgba(0, 0, 0, 0.6);
    --hero-text-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
    --nav-text-shadow: 0 1px 3px rgba(0, 0, 0, 0.5);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    scroll-padding-top: var(--nav-height);
}

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--bg-color);
    color: var(--text-color);
    line-height: 1.6;
    transition: background-color 0.3s ease, color 0.3s ease;
    overflow-x: hidden;
}

h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: 'Outfit', sans-serif;
    font-weight: 700;
    line-height: 1.2;
}

a {
    color: var(--text-color);
    text-decoration: none;
    transition: color 0.3s ease;
}

ul {
    list-style: none;
}

.container {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 2rem;
}

.section {
    padding: 6rem 0;
}

.bg-alt {
    background-color: var(--bg-alt);
}

/* Typography Helpers */
.lead {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 1rem;
    color: var(--primary);
}

.highlight {
    font-weight: 800;
    font-size: 1.1rem;
    margin: 1.5rem 0;
    padding-left: 1rem;
    border-left: 4px solid var(--primary);
}

.mt-4 {
    margin-top: 2rem;
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    border-radius: 4px;
    font-weight: 600;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s ease;
    border: none;
    font-family: 'Outfit', sans-serif;
}

.btn-primary {
    background-color: var(--primary);
    color: #fff;
    box-shadow: 0 4px 14px 0 rgba(202, 138, 4, 0.39);
}

[data-theme="dark"] .btn-primary {
    color: #121212;
}

.btn-primary:hover {
    background-color: var(--primary-hover);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(202, 138, 4, 0.4);
}

.btn-full {
    width: 100%;
}

/* Navigation */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: var(--nav-height);
    background-color: transparent;
    z-index: 1000;
    transition: all 0.3s ease;
}

.navbar.scrolled {
    background: var(--bg-color);
    opacity: 0.95;
    box-shadow: var(--shadow);
}

.nav-container {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 100%;
}

.logo {
    font-size: 1.5rem;
    font-weight: 800;
    font-family: 'Outfit', sans-serif;
    color: var(--text-color);
}

.navbar:not(.scrolled) .logo,
.navbar:not(.scrolled) .nav-link,
.navbar:not(.scrolled) .theme-toggle,
.navbar:not(.scrolled) .nav-phone-btn,
.navbar:not(.scrolled) .mobile-menu-btn {
    color: var(--text-color);
    text-shadow: var(--nav-text-shadow);
}

.nav-links {
    display: flex;
    gap: 2rem;
}

.nav-link {
    font-weight: 600;
    font-size: 0.95rem;
    position: relative;
}

.nav-link::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: -4px;
    left: 0;
    background-color: var(--primary);
    transition: width 0.15s ease;
}

.nav-link:hover::after,
.nav-link.active::after {
    width: 100%;
}

.nav-controls {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.nav-controls {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.theme-toggle,
.nav-phone-btn {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 1.25rem;
    color: var(--text-color);
    transition: color 0.3s ease, transform 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    text-decoration: none;
}

.nav-phone-container {
    position: relative;
    display: flex;
    align-items: center;
}

.phone-dropdown {
    position: absolute;
    top: calc(100% + 15px);
    right: 0;
    background: var(--card-bg);
    border-radius: 12px;
    padding: 0.75rem 1rem;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.5);
    display: flex;
    flex-direction: column;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s ease;
    min-width: 250px;
    z-index: 1000;
    border: 1px solid var(--border-color);
}

.phone-dropdown::before,
.phone-dropdown::after {
    content: '';
    position: absolute;
    right: 12px;
    /* Centers with the 40px wide button (12px + 8px triangle = 20px) */
    width: 0;
    height: 0;
    border-left: 8px solid transparent;
    border-right: 8px solid transparent;
}

.phone-dropdown::before {
    top: -8px;
    border-bottom: 8px solid var(--border-color);
}

.phone-dropdown::after {
    top: -7px;
    border-bottom: 8px solid var(--card-bg);
}

.phone-dropdown.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.phone-number-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    color: var(--text-color);
    font-weight: 600;
    font-size: 1.1rem;
}

.copy-btn {
    background: var(--primary);
    border: none;
    color: #fff;
    border-radius: 6px;
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background 0.2s ease;
}

.copy-btn:hover {
    background: var(--primary-hover);
}

.dropdown-divider {
    height: 1px;
    background: var(--border-color);
    margin: 0.5rem 0;
}

.call-btn {
    background: var(--primary);
    color: #fff;
    text-decoration: none;
    padding: 0.4rem 0.8rem;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    font-weight: 600;
    font-size: 0.95rem;
    transition: background 0.2s ease;
}

.call-btn:hover {
    background: var(--primary-hover);
    color: #fff;
}

.theme-toggle:hover,
.nav-phone-btn:hover {
    color: var(--primary);
    transform: rotate(15deg);
}

@keyframes iconSpin {
    0% {
        transform: rotate(0deg) scale(0.5);
        opacity: 0;
    }

    50% {
        transform: rotate(180deg) scale(1.2);
    }

    100% {
        transform: rotate(360deg) scale(1);
        opacity: 1;
    }
}

.theme-toggle i.animating {
    animation: iconSpin 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.mobile-menu-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--text-color);
    width: 35px;
    text-align: center;
}

#hamburger-btn {
    opacity: 0;
    pointer-events: none;
}

/* Hero Section */
.hero {
    height: 100vh;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: var(--text-color);
}

.video-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    z-index: -1;
    background-color: #111;
}

.hero-video {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--hero-overlay);
    transition: background 0.3s ease;
}

.hero-content {
    max-width: 800px;
    padding: 0 2rem;
    z-index: 1;
}

.hero-title {
    font-size: 4.5rem;
    margin-bottom: 1rem;
    text-shadow: var(--hero-text-shadow);
}

.hero-subtitle {
    font-size: 1.5rem;
    font-weight: 300;
    margin-bottom: 2.5rem;
    text-shadow: var(--hero-text-shadow);
}

/* Section Header */
.section-header {
    text-align: center;
    margin-bottom: 4rem;
}

.section-header h2 {
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
}

.divider {
    height: 3px;
    width: 60px;
    background-color: var(--primary);
    margin: 0 auto;
    border-radius: 2px;
}

/* About Section */
.about-content {
    max-width: 800px;
    margin: 0 auto;
    font-size: 1.1rem;
}

.about-content p {
    margin-bottom: 1.5rem;
}

.signature {
    font-style: italic;
    font-size: 1.2rem;
    margin-top: 2rem;
}

/* Services Grid */
.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.service-card {
    background-color: var(--card-bg);
    padding: 2.5rem 2rem;
    border-radius: 8px;
    text-align: center;
    box-shadow: var(--shadow);
    transition: transform 0.15s ease, box-shadow 0.15s ease, border-bottom-color 0.15s ease;
    border-bottom: 3px solid transparent;
}

.service-card:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-lg);
    border-bottom-color: var(--primary);
}

.service-card.reveal.active {
    transition: transform 0.15s ease, box-shadow 0.15s ease, border-bottom-color 0.15s ease;
}

@media (max-width: 768px) {
    .services-grid {
        grid-template-columns: 1fr 1fr;
        gap: 1rem;
    }
    
    .service-card {
        padding: 1.5rem 1rem;
    }
    
    .service-card h3 {
        font-size: 1rem;
    }
}

.service-icon {
    font-size: 2.5rem;
    color: var(--primary);
    margin-bottom: 1.5rem;
}

/* Stats Section */
.stats-section {
    background: linear-gradient(rgba(0, 0, 0, 0.8), rgba(0, 0, 0, 0.8)), url('../images/danfi-hatter33.jpg') center/cover;
    color: #fff;
    padding: 5rem 0;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 2rem;
    text-align: center;
}

.stat-number {
    font-size: 3.5rem;
    font-weight: 800;
    font-family: 'Outfit', sans-serif;
    color: var(--primary);
    margin-bottom: 0.5rem;
}

.stat-item p {
    font-size: 1.1rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* Gallery Grid (Machines & References) */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
}

.gallery-item {
    position: relative;
    border-radius: 8px;
    overflow: hidden;
    aspect-ratio: 4/3;
    box-shadow: var(--shadow);
    background-color: var(--card-bg);
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.gallery-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    padding: 2rem 1.5rem 1.5rem;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.9), transparent);
    color: #fff;
    transform: translateY(100%);
    transition: transform 0.3s ease;
}

.gallery-item:hover img {
    transform: scale(1.05);
}

.gallery-item:hover .gallery-overlay {
    transform: translateY(0);
}

.gallery-overlay h4 {
    font-size: 1.25rem;
    margin-bottom: 0.25rem;
}

@media (max-width: 768px) {
    .gallery-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.5rem;
    }

    .gallery-overlay {
        transform: translateY(0);
        padding: 0.5rem;
    }

    .gallery-overlay h4 {
        font-size: 0.8rem;
    }

    .gallery-overlay p {
        font-size: 0.7rem;
        /* Optionally hide description if cards get too small: */
        /* display: none; */
    }

    .gallery-overlay .spec-tags {
        display: none;
    }
}

.gallery-item.hidden {
    display: none;
}

.expand-btn-container {
    text-align: center;
    margin-top: 2rem;
}

.expand-btn {
    background: transparent;
    border: 2px solid var(--primary);
    color: var(--text-color);
    padding: 0.75rem 2rem;
    border-radius: 30px;
    font-size: 1.1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.expand-btn:hover {
    background: var(--primary);
    color: #fff;
}

.expand-btn i {
    transition: transform 0.3s ease;
}

.expand-btn.expanded i {
    transform: rotate(180deg);
}

/* Contact Section */
.contact-grid {
    display: grid;
    grid-template-columns: 1fr 1.5fr;
    gap: 4rem;
}

.contact-info h3 {
    margin-bottom: 2rem;
}

.contact-info h3.mt-4 {
    margin-top: 3rem;
}

.info-item {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    margin-bottom: 2rem;
    font-size: 1.1rem;
}

.info-item i {
    font-size: 1.25rem;
    color: var(--primary);
    margin-top: 0.25rem;
}

.contact-form {
    background-color: var(--card-bg);
    padding: 2.5rem;
    border-radius: 8px;
    box-shadow: var(--shadow);
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    background-color: var(--bg-color);
    color: var(--text-color);
    font-family: 'Inter', sans-serif;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(202, 138, 4, 0.2);
}

/* Modal Styles */
.modal {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(5px);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.modal.show {
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 1;
}

.modal-content {
    background-color: var(--card-bg);
    margin: auto;
    padding: 0;
    border-radius: 12px;
    width: 90%;
    max-width: 1000px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
    position: relative;
    overflow: hidden;
    transform: translateY(-50px);
    transition: transform 0.3s ease, width 0.3s ease, height 0.3s ease;
    display: flex;
    flex-direction: row;
    min-height: 400px;
}

.modal.show .modal-content {
    transform: translateY(0);
}

.close-modal {
    position: absolute;
    top: 15px;
    right: 20px;
    color: var(--text-color);
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    z-index: 10;
    background: var(--card-bg);
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: background 0.3s ease, color 0.3s ease;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.close-modal:hover,
.close-modal:focus {
    background: var(--primary);
    color: #000;
    text-decoration: none;
}

.modal-img-container {
    position: relative;
    width: 60%;
    flex: 1.5;
    overflow: hidden;
    background: var(--card-bg);
    /* Blend seamlessly with the text side */
    transition: height 0.3s ease;
}

.modal-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}



.carousel-track {
    display: flex;
    transition: transform 0.3s ease-in-out;
    width: 100%;
    height: 100%;
}

.carousel-track img {
    flex: 0 0 100%;
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.carousel-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0, 0, 0, 0.5);
    color: white;
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    transition: background 0.3s ease;
    z-index: 10;
}

.carousel-btn:hover {
    background: rgba(0, 0, 0, 0.8);
}

.prev-btn {
    left: 10px;
}

.next-btn {
    right: 10px;
}

.image-counter,
.carousel-counter {
    position: absolute;
    bottom: 10px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.6);
    color: white;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.9rem;
    z-index: 10;
}

.modal-info {
    padding: 3rem 2rem;
    width: 40%;
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    overflow-y: auto;
    max-height: 80vh;
}

@media (max-width: 768px) {
    .modal-content {
        flex-direction: column;
        min-height: auto;
    }

    .modal-img-container {
        width: 100%;
        height: 300px;
        flex: none;
    }

    .modal-info {
        width: 100%;
        padding: 1.5rem 1rem;
    }

    #modal-title {
        font-size: 1.2rem;
    }

    #modal-desc {
        font-size: 0.9rem;
    }
}

#modal-title {
    font-size: 1.8rem;
    margin-bottom: 1rem;
    color: var(--primary);
}

#modal-desc {
    font-size: 1.1rem;
    line-height: 1.6;
}

.clickable {
    cursor: pointer;
}

/* Footer */
.footer {
    background-color: #111;
    color: #fff;
    padding: 4rem 0 2rem;
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 3rem;
}

.footer-logo h2 {
    color: var(--primary);
}

.social-links a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background-color: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    color: #fff;
    margin-left: 1rem;
    transition: background-color 0.3s ease, transform 0.3s ease;
}

.social-links a:hover {
    background-color: var(--primary);
    transform: translateY(-3px);
}

.footer-bottom {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    color: #9ca3af;
}

.gdpr-link {
    color: inherit;
    text-decoration: none;
    transition: color 0.3s ease;
    margin-left: 0.25rem;
    font-size: 1.1rem;
}

.gdpr-link:hover {
    color: var(--primary);
}

/* Animations & Reveal */
.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.6s cubic-bezier(0.5, 0, 0, 1);
}

.reveal.active {
    opacity: 1;
    transform: translateY(0);
}

.delay-1 {
    transition-delay: 0.1s;
}

.delay-2 {
    transition-delay: 0.2s;
}

.delay-3 {
    transition-delay: 0.3s;
}

.delay-4 {
    transition-delay: 0.4s;
}

.delay-5 {
    transition-delay: 0.5s;
}

/* Location Horizontal Scroll for Map */
.location-scroll-container {
    display: flex;
    overflow-x: auto;
    gap: 0.75rem;
    padding-bottom: 0.5rem;
    scrollbar-width: thin;
    scrollbar-color: var(--primary) var(--bg-color);
}

.location-scroll-container::-webkit-scrollbar {
    height: 6px;
}

.location-scroll-container::-webkit-scrollbar-track {
    background: var(--bg-color);
    border-radius: 4px;
}

.location-scroll-container::-webkit-scrollbar-thumb {
    background-color: var(--primary);
    border-radius: 4px;
}

.location-btn {
    background-color: var(--card-bg);
    border: 1px solid var(--border-color);
    color: var(--text-color);
    padding: 0.6rem 1.2rem;
    border-radius: 50px;
    font-size: 0.95rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.location-btn:hover {
    border-color: var(--primary);
    color: var(--primary);
}

.location-btn.active {
    background-color: var(--primary);
    color: #000;
    border-color: var(--primary);
    font-weight: 700;
}

/* Responsive */
@media (max-width: 992px) {
    .contact-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .hero-title {
        font-size: 3rem;
    }

    .mobile-menu-btn {
        /* already flex */
    }

    #hamburger-btn {
        opacity: 1;
        pointer-events: auto;
    }

    .nav-links {
        position: fixed;
        top: var(--nav-height);
        left: -100%;
        width: 100%;
        height: calc(100vh - var(--nav-height));
        background-color: var(--bg-color);
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 2rem;
        transition: left 0.3s ease;
    }

    .nav-links.active {
        left: 0;
    }

    .navbar:not(.scrolled) .nav-links.active .nav-link {
        color: var(--text-color);
        text-shadow: none;
    }
}

/* Expandable Grid Styles - Height transition */
.gallery-grid {
    position: relative;
}

.gallery-grid.expandable {
    max-height: 450px;
    /* Approximately height of 1 row */
    overflow: hidden;
    transition: max-height 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.gallery-grid.expandable.expanded {
    /* max-height is set dynamically in JS */
}

.gallery-grid.expandable:not(.expanded)::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 150px;
    background: linear-gradient(to bottom, transparent, var(--bg-color));
    pointer-events: none;
    z-index: 5;
}


/* Custom Toast Notification */
.toast-notification {
    visibility: hidden;
    min-width: 300px;
    background-color: var(--card-bg);
    color: var(--text-color);
    text-align: center;
    border-radius: 8px;
    padding: 2rem 1.5rem;
    position: fixed;
    z-index: 3000;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    border: 1px solid var(--border-color);
    opacity: 0;
    transition: opacity 0.3s, visibility 0.3s;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.toast-notification.show {
    visibility: visible;
    opacity: 1;
}

.toast-notification .toast-icon {
    font-size: 3rem;
    color: var(--primary);
    margin-bottom: 1rem;
}

.toast-notification .toast-icon.error {
    color: #ef4444;
}

.toast-notification p {
    margin-bottom: 0;
    font-weight: 500;
    font-size: 1.1rem;
}

.toast-progress {
    position: absolute;
    bottom: 0;
    left: 0;
    height: 5px;
    background-color: var(--primary);
    width: 100%;
}

.toast-notification.show .toast-progress {
    animation: toastProgress 4s linear forwards;
}

@keyframes toastProgress {
    0% {
        width: 100%;
    }

    100% {
        width: 0%;
    }
}


.close-toast {
    position: absolute;
    top: 10px;
    right: 15px;
    background: none;
    border: none;
    color: var(--text-color);
    font-size: 1.5rem;
    cursor: pointer;
    opacity: 0.6;
    transition: opacity 0.3s;
}

.close-toast:hover {
    opacity: 1;
    color: var(--primary);
}


/* Interactive Map Layout */
.interactive-map-wrapper {
    display: grid;
    grid-template-columns: 250px 1fr;
    gap: 1.5rem;
    align-items: stretch;
}

@media (max-width: 768px) {
    .interactive-map-wrapper {
        grid-template-columns: 1fr;
    }
}

.locations-sidebar {
    background-color: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 1rem;
    max-height: 450px;
    overflow-y: auto;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.05);
}

@media (max-width: 768px) {
    .gallery-grid.expandable {
        max-height: 55vw;
        /* Dynamically scales to always show exactly 1.5 rows */
    }

    .gallery-grid.expandable.expanded {
        /* Set dynamically by JS */
    }

    .gallery-grid.expandable:not(.expanded)::after {
        height: 20vw;
        /* Scales with the half-row */
    }
}

.locations-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.locations-list li {
    padding: 0.75rem 1rem;
    margin-bottom: 0.5rem;
    border-radius: 6px;
    cursor: pointer;
    background-color: var(--bg-color);
    border: 1px solid transparent;
    opacity: 0.6;
    transition: all 0.3s ease;
    font-weight: 500;
    display: flex;
    align-items: center;
}

.locations-list li::before {
    content: '\f3c5';
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    margin-right: 10px;
    color: var(--primary);
    transition: transform 0.3s ease;
}

.locations-list li:hover,
.locations-list li.active {
    opacity: 1;
    background-color: var(--card-bg);
    border-color: var(--primary);
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.locations-list li:hover::before,
.locations-list li.active::before {
    transform: scale(1.2) translateY(-2px);
}

/* Map Marker Animations */
@keyframes markerPulse {
    0% {
        filter: drop-shadow(0 0 4px var(--primary)) brightness(1);
    }

    50% {
        filter: drop-shadow(0 0 15px var(--primary)) brightness(1.4);
    }

    100% {
        filter: drop-shadow(0 0 4px var(--primary)) brightness(1);
    }
}

.leaflet-marker-icon.highlighted {
    animation: markerPulse 1.2s ease-in-out infinite;
    z-index: 1000 !important;
}

.leaflet-marker-icon {
    transition: filter 0.3s ease;
}


/* Back to Top Button */
.back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    background-color: var(--primary);
    color: var(--darker-bg);
    border: none;
    border-radius: 50%;
    font-size: 1.2rem;
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px);
    transition: all 0.3s ease;
    z-index: 999;
}

.back-to-top.visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.back-to-top:hover {
    background-color: var(--light-text);
    color: var(--primary);
    transform: translateY(-5px);
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.4);
}


@media (max-width: 768px) {
    .desktop-only {
        display: none !important;
    }
}

.navbar.nav-hidden {
    transform: translateY(-100%);
}

/* Quick Specs Tags */
.spec-tags {
    display: flex;
    gap: 0.5rem;
    margin-top: 0.5rem;
    flex-wrap: wrap;
}

.spec-tag {
    background: var(--primary);
    color: #fff;
    font-size: 0.75rem;
    padding: 0.2rem 0.5rem;
    border-radius: 4px;
    display: flex;
    align-items: center;
    gap: 0.3rem;
    font-weight: 600;
}

/* Reference Showcase (Munkáink) */
.reference-showcase {
    display: flex;
    flex-direction: row;
    width: 100%;
    height: 600px;
    margin-bottom: 3rem;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 15px 35px rgba(0,0,0,0.2);
    background: var(--card-bg);
}

.showcase-main {
    flex: 2.5;
    position: relative;
    overflow: hidden;
}

.showcase-image-slider {
    width: 100%;
    height: 100%;
    position: relative;
    background: #000;
    transition: opacity 0.4s ease-in-out;
}

.showcase-carousel-track {
    display: flex;
    transition: transform 0.4s cubic-bezier(0.25, 1, 0.5, 1);
    width: 100%;
    height: 100%;
}

.showcase-carousel-img {
    flex: 0 0 100%;
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.showcase-controls {
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    transform: translateY(-50%);
    display: flex;
    justify-content: space-between;
    padding: 0 1rem;
    pointer-events: none;
    z-index: 10;
}

.showcase-controls button {
    pointer-events: auto;
    background: rgba(0,0,0,0.5);
    color: #fff;
    border: none;
    width: 45px;
    height: 45px;
    border-radius: 50%;
    font-size: 1.2rem;
    cursor: pointer;
    backdrop-filter: blur(5px);
    transition: background 0.3s ease;
}

.showcase-controls button:hover {
    background: var(--primary);
}

.showcase-counter {
    position: absolute;
    bottom: 1.5rem;
    right: 1.5rem;
    background: rgba(0,0,0,0.6);
    color: #fff;
    padding: 0.3rem 0.8rem;
    border-radius: 20px;
    font-size: 0.9rem;
    backdrop-filter: blur(5px);
    z-index: 10;
}

/* Sleek Progress Line */
.showcase-progress-bar {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background: rgba(255,255,255,0.2);
    z-index: 10;
}

.progress-fill {
    height: 100%;
    width: 0%;
    background: var(--primary);
    transition: width 0.1s linear; /* Smooth fill */
}

/* Sidebar Info & Queue */
.showcase-sidebar {
    flex: 1;
    display: flex;
    flex-direction: column;
    border-left: 1px solid var(--border-color);
    background: var(--card-bg);
}

.showcase-info {
    padding: 2rem;
    flex: 1;
    border-bottom: 1px solid var(--border-color);
    overflow-y: auto;
    display: flex;
    flex-direction: column;
}

.showcase-info h2 {
    font-size: 1.5rem;
    color: var(--primary);
    margin-bottom: 1rem;
}

.showcase-info p {
    font-size: 0.95rem;
    color: var(--text-color);
    line-height: 1.5;
    flex: 1;
}

/* Mobile Nav (Hidden on Desktop) */
.showcase-mobile-nav {
    display: none;
    justify-content: space-between;
    margin-top: 1.5rem;
    gap: 1rem;
}

.showcase-mobile-nav button {
    flex: 1;
    background: var(--bg-alt);
    color: var(--text-color);
    border: 1px solid var(--border-color);
    padding: 0.75rem;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.showcase-mobile-nav button:hover {
    background: var(--primary);
    color: #fff;
    border-color: var(--primary);
}

.showcase-queue {
    flex: 1.5;
    padding: 1.5rem;
    overflow-y: hidden;
    background: var(--bg-alt);
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.queue-title {
    font-size: 0.85rem;
    text-transform: uppercase;
    color: var(--text-muted);
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.queue-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    opacity: 0.7;
    transition: opacity 0.3s ease;
}

.queue-item:hover {
    opacity: 1;
    cursor: pointer;
}

.queue-item img {
    width: 60px;
    height: 60px;
    object-fit: cover;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.queue-item span {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-color);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Mobile Responsiveness for Showcase */
@media (max-width: 992px) {
    .reference-showcase {
        flex-direction: column;
        height: auto;
    }
    
    .showcase-main {
        height: 350px;
        flex: none;
    }
    
    .showcase-image-slider {
        touch-action: pan-y;
    }

    .showcase-sidebar {
        flex: none;
        border-left: none;
    }
    
    .showcase-queue {
        display: none; /* Hide queue on mobile to save space */
    }

    .showcase-mobile-nav {
        display: flex; /* Show the nav buttons */
    }
}

