:root {
    --primary-color: #d32f2f;
    --primary-dark: #b71c1c;
    --text-color: #333333;
    --text-light: #666666;
    --bg-color: #ffffff;
    --bg-light: #f5f5f5;
    --transition: all 0.3s ease;
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Montserrat', sans-serif;
    color: var(--text-color);
    line-height: 1.6;
    background-color: var(--bg-color);
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Typography */
h1, h2, h3 {
    font-weight: 700;
    line-height: 1.2;
}

a {
    text-decoration: none;
    color: inherit;
}

ul {
    list-style: none;
}

/* Navigation */
.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 1000;
    background: transparent;
    transition: var(--transition);
}

.navbar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 80px;
}

.logo {
    font-size: 1.5rem;
    font-weight: 700;
    color: #fff;
    transition: var(--transition);
}

.logo span {
    color: var(--primary-color);
}

.nav-links {
    display: flex;
    gap: 30px;
}

.nav-links a {
    font-weight: 500;
    transition: var(--transition);
    position: relative;
    color: #fff;
    padding: 10px 0;
}

.nav-links a:hover {
    color: var(--primary-color);
}

.nav-links a::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    background: var(--primary-color);
    bottom: -5px;
    left: 0;
    transition: var(--transition);
}

.nav-links a:hover::after {
    width: 100%;
}

.hamburger {
    display: none;
    cursor: pointer;
}

.hamburger .bar {
    display: block;
    width: 25px;
    height: 3px;
    margin: 5px auto;
    transition: all 0.3s ease-in-out;
    background-color: #fff;
}

/* Scrolled Navbar State */
.navbar.scrolled {
    background: rgba(255, 255, 255, 0.75);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px); /* Safari support */
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
}

.navbar.scrolled .logo {
    color: #333;
}

.navbar.scrolled .nav-links a {
    color: var(--text-color);
}

.navbar.scrolled .nav-links a:hover {
    color: var(--primary-color);
}

.navbar.scrolled .hamburger .bar {
    background-color: #333;
}


/* Hero Section */
.hero {
    height: 100vh;
    background-image: url('images/elevator-hero.jpg');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    position: relative;
    display: flex;
    align-items: center;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(rgba(0,0,0,0.7), rgba(0,0,0,0.5));
}

.hero-content {
    position: relative;
    z-index: 1;
    color: #fff;
    max-width: 800px;
}

.hero-content h1 {
    font-size: 4.5rem;
    font-weight: 800;
    margin-bottom: 15px;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.5);
    letter-spacing: -1px;
}

.hero-content h2 {
    font-size: 2rem;
    margin-bottom: 25px;
    color: #f1f1f1;
    font-weight: 400;
    letter-spacing: 0.5px;
}

.hero-content p {
    font-size: 1.2rem;
    margin-bottom: 40px;
    opacity: 0.95;
}

.btn {
    display: inline-block;
    padding: 14px 34px;
    border-radius: 30px;
    font-weight: 600;
    transition: var(--transition);
    cursor: pointer;
    border: none;
    font-size: 1.1rem;
}

.btn-primary {
    background: var(--primary-color);
    color: #fff;
}

.btn-primary:hover {
    background: var(--primary-dark);
    transform: translateY(-3px);
    box-shadow: 0 10px 20px rgba(211, 47, 47, 0.3);
}

/* Sections General */
.section {
    padding: 100px 0;
}

.section-title {
    text-align: center;
    margin-bottom: 60px;
}

.section-title h2 {
    font-size: 2.5rem;
    margin-bottom: 15px;
}

.underline {
    height: 4px;
    width: 60px;
    background: var(--primary-color);
    margin: 0 auto;
    border-radius: 2px;
}

.bg-light {
    background-color: var(--bg-light);
}

/* About Section */
.about-content {
    display: flex;
    gap: 50px;
    align-items: center;
}

.about-text {
    flex: 1;
}

.about-text p {
    margin-bottom: 20px;
    font-size: 1.1rem;
    color: var(--text-light);
}

.about-stats {
    flex: 1;
    display: flex;
    gap: 20px;
}

.stat-box {
    background: #fff;
    padding: 40px 30px;
    border-radius: 10px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.05);
    text-align: center;
    flex: 1;
    border-bottom: 4px solid var(--primary-color);
    transition: transform 0.3s;
}

.stat-box:hover {
    transform: translateY(-10px);
}

.stat-box h3 {
    font-size: 3rem;
    color: var(--primary-color);
    margin-bottom: 10px;
}

/* Services */
.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

.service-card {
    background: #fff;
    padding: 40px 30px;
    border-radius: 10px;
    box-shadow: 0 15px 30px rgba(0,0,0,0.05);
    transition: var(--transition);
    text-align: center;
}

.service-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 40px rgba(0,0,0,0.1);
}

.service-icon {
    font-size: 3rem;
    margin-bottom: 20px;
}

.service-card h3 {
    margin-bottom: 15px;
    font-size: 1.5rem;
}

.service-card p {
    color: var(--text-light);
}

/* Elevators */
.elevator-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 30px;
}

.elevator-card {
    background: #fff;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 10px 20px rgba(0,0,0,0.05);
    transition: var(--transition);
    cursor: pointer;
}

.elevator-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 40px rgba(0,0,0,0.1);
}

.elevator-img-wrapper {
    height: 250px;
    overflow: hidden;
}

.elevator-img-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.elevator-card:hover .elevator-img-wrapper img {
    transform: scale(1.1);
}

.elevator-info {
    padding: 25px;
}

.elevator-info h3 {
    margin-bottom: 10px;
    color: #333;
}

.elevator-info p {
    color: var(--text-light);
    font-size: 0.95rem;
}

/* Footer */
.footer {
    background: #111;
    color: #fff;
    padding: 80px 0 20px;
}

.footer-content {
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 40px;
    margin-bottom: 50px;
}

.footer-brand {
    flex: 1;
    min-width: 300px;
}

.footer-brand h2 {
    font-size: 2rem;
    margin-bottom: 15px;
}

.footer-brand span {
    color: var(--primary-color);
}

.footer-brand p {
    color: #aaa;
    max-width: 300px;
}

.footer-contact {
    flex: 1;
    min-width: 300px;
}

.footer-contact h3 {
    margin-bottom: 20px;
    font-size: 1.3rem;
    position: relative;
    padding-bottom: 10px;
}

.footer-contact h3::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: 0;
    width: 40px;
    height: 2px;
    background: var(--primary-color);
}

.footer-contact ul li {
    margin-bottom: 15px;
    color: #ccc;
    font-size: 0.95rem;
    line-height: 1.5;
}

.footer-contact ul li strong {
    color: #fff;
    display: inline-block;
    width: 90px;
}

.footer-contact a {
    color: var(--primary-color);
}

.footer-contact a:hover {
    text-decoration: underline;
}

.footer-bottom {
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid #333;
    color: #777;
    font-size: 0.9rem;
    width: 100%;
}

/* Animations */
.animate-up {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.8s ease;
}

.animate-up.in-view {
    opacity: 1;
    transform: translateY(0);
}

.scroll-fade {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.scroll-fade.is-visible {
    opacity: 1;
    transform: translateY(0);
}

.scroll-scale {
    opacity: 0;
    transform: scale(0.9);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.scroll-scale.is-visible {
    opacity: 1;
    transform: scale(1);
}

.delay-1 { transition-delay: 0.2s; }
.delay-2 { transition-delay: 0.4s; }
.delay-3 { transition-delay: 0.6s; }

/* Responsive */
@media (max-width: 900px) {
    .about-content {
        flex-direction: column;
    }
}

@media (max-width: 768px) {
    .hamburger {
        display: block;
    }

    .hamburger.active .bar:nth-child(2) {
        opacity: 0;
    }

    .hamburger.active .bar:nth-child(1) {
        transform: translateY(8px) rotate(45deg);
    }

    .hamburger.active .bar:nth-child(3) {
        transform: translateY(-8px) rotate(-45deg);
    }

    .nav-links {
        position: fixed;
        left: -100%;
        top: 80px;
        gap: 0;
        flex-direction: column;
        background: #fff;
        width: 100%;
        text-align: center;
        transition: 0.3s;
        box-shadow: 0 10px 10px rgba(0,0,0,0.1);
    }

    .nav-links.active {
        left: 0;
    }

    .nav-links li {
        margin: 16px 0;
    }

    .nav-links a {
        color: #333; /* For mobile menu items */
    }

    .hero-content h1 {
        font-size: 3rem;
    }

    .hero-content h2 {
        font-size: 1.5rem;
    }
}

/* Gallery Modal */
.modal {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    padding: 15px 0;
    box-sizing: border-box;
    background-color: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.modal.show {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    opacity: 1;
}

.modal-content {
    position: relative;
    max-width: 90%;
    height: 65vh;
    display: flex;
    justify-content: center;
    align-items: center;
}

#modal-img {
    max-width: 100%;
    max-height: 100%;
    border-radius: 8px;
    box-shadow: 0 5px 25px rgba(0,0,0,0.5);
    object-fit: contain;
}

.close-modal {
    position: absolute;
    top: 20px;
    right: 35px;
    color: #f1f1f1;
    font-size: 50px;
    font-weight: 300;
    cursor: pointer;
    transition: 0.3s;
    z-index: 2001;
}

.close-modal:hover,
.close-modal:focus {
    color: var(--primary-color);
    text-decoration: none;
    cursor: pointer;
}

.prev-btn, .next-btn {
    cursor: pointer;
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: auto;
    padding: 16px;
    color: white;
    font-weight: bold;
    font-size: 30px;
    transition: 0.3s;
    user-select: none;
    background-color: rgba(0,0,0,0.4);
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    width: 60px;
    height: 60px;
}

.prev-btn {
    left: -80px;
}

.next-btn {
    right: -80px;
}

@media (max-width: 768px) {
    .prev-btn {
        left: 10px;
    }
    .next-btn {
        right: 10px;
    }
}

.prev-btn:hover, .next-btn:hover {
    background-color: var(--primary-color);
}

#modal-caption {
    margin-top: 20px;
    color: #fff;
    font-size: 1.2rem;
    text-align: center;
    font-weight: 500;
    letter-spacing: 0.5px;
}

/* Modal Thumbnails */
.modal-thumbnails {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 20px;
    padding: 10px;
    max-width: 90%;
}

.modal-thumbnails img {
    height: 60px;
    width: 60px;
    flex-shrink: 0;
    object-fit: cover;
    border-radius: 4px;
    cursor: pointer;
    opacity: 0.5;
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

.modal-thumbnails img:hover {
    opacity: 0.8;
}

.modal-thumbnails img.active {
    opacity: 1;
    border-color: var(--primary-color);
    transform: scale(1.1);
}
