/* Import Montserrat font */
@import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@300&display=swap');
* {
    font-family: 'Montserrat', sans-serif;
}

html,
body {
    overflow-x: hidden;
    width: 100%;
}

body {
    padding-top: 56px;
    background-color: #000;
    color: #fff;
    font-size: clamp(14px, 1.5vw, 18px);
}

.slideshow {
    position: relative;
    width: 100%;
    height: 80vh;
    overflow: hidden;
}

.slideshow img {
    position: absolute;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0;
    transition: opacity 4s ease-in-out;
}

.slideshow img.active {
    opacity: 1;
}

.slideshow img.center {
    object-position: center;
}

.slideshow img.bottom {
    object-position: bottom;
}

.slideshow img.top {
    object-position: top;
}

.slideshow-text {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    background-color: rgba(0, 0, 0, 0.5);
    color: white;
    padding: 10px 20px;
    font-size: 1.5em;
    font-weight: 300;
    letter-spacing: 2px;
    text-align: center;
    font-family: 'Montserrat', sans-serif;
    z-index: 2;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.8);
    bottom: 0;
    border-bottom: 1px solid white;
    width: 100%;
}

#id_slogan_title {
    margin-bottom: 4px;
}

#about {
    margin-top: 16px !important;
}

.about-container {
    max-width: 800px;
    margin: 0 auto;
    padding: 20px;
    line-height: 1.6;
    position: relative;
}

.fade-out {
    position: relative;
    max-height: 200px; 
    overflow: hidden;
    transition: max-height 0.5s ease;
    border-radius: 4px;
}

.fade-out::after {
    content: "";
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 80px;
    
    background: linear-gradient(to bottom, rgba(255,255,255,0), rgb(30, 30, 30));
    pointer-events: none;
}
.expand-btn {
    display: inline-block;
    margin: 15px auto;
    background: #333;
    color: white;
    font-size: 1.2em;
    padding: 8px 16px;
    border: none;
    border-radius: 30px;
    cursor: pointer;
    transition: background 0.3s;
}

.expand-btn:hover {
    background: #555;
}

.expanded {
    max-height: 3000px;
}

.hide-gradient::after {
    display: none;
}

.text-center {
    text-align: center;
}

#gallery {
    margin-top: 24px !important;
}

/* Navbar */
.navbar {
    background-color: #000 !important;
}

.navbar-light .navbar-toggler-icon {
    background-color: #fff;
}

.navbar-light .navbar-brand {
    color: #fff;
    font-size: 2em;
}

.navbar-light .navbar-nav .nav-link {
    color: #fff;
}

.navbar-light .navbar-nav .nav-link:hover {
    color: #b42727;
}

.navbar-logo img {
    max-height: 50px;
}

.navbar-light .navbar-brand:hover,
.navbar-light .navbar-brand:focus {
    color: #ffffff;
}

/* Gallery */
#gallery {
    max-width: 1200px;
    margin: 0 auto;
    padding: 40px 20px;
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    grid-auto-rows: 360px; 
    gap: 15px;
    justify-content: center;
}

.gallery-grid .filter-item {
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    border-radius: 12px;
    box-shadow: 0px 4px 10px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.gallery-grid img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 12px;
    transition: transform 0.3s ease-in-out, opacity 0.3s;
}

/* Hover Effects */
.gallery-grid .filter-item:hover {
    transform: translateY(-5px);
    box-shadow: 0px 10px 20px rgba(0, 0, 0, 0.15);
}

.gallery-grid img:hover {
    transform: scale(1.05);
    opacity: 0.9;
}

/* Filter Menu */
.filter-menu {
    text-align: center;
    margin-bottom: 30px;
}

.filter-menu button {
    margin: 5px;
    padding: 10px 20px;
    font-size: 16px;
    font-weight: 600;
    background-color: transparent;
    border: 2px solid transparent;
    cursor: pointer;
    color: #727272;
    transition: all 0.3s ease-in-out;
    border-radius: 20px;
}

.filter-menu button:hover,
.filter-menu button.active {
    color: #b42727;
    border-color: #b42727;
    background-color: rgba(180, 39, 39, 0.1);
    text-decoration: none;
}

/* Lightbox Background */
.lightbox {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
    z-index: 1000;
}

/* Lightbox Active State */
.lightbox.active {
    opacity: 1;
    visibility: visible;
}

/* Large Image */
.lightbox img {
    max-width: 90%;
    max-height: 90%;
    border-radius: 10px;
    box-shadow: 0 10px 30px rgba(255, 255, 255, 0.2);
}

/* Close Button */
.lightbox::after {
    content: "✖";
    position: absolute;
    top: 20px;
    right: 30px;
    font-size: 30px;
    color: white;
    cursor: pointer;
    transition: opacity 0.3s ease;
}

.lightbox::after:hover {
    opacity: 0.7;
}

/* Members */
#members {
    margin-top: 24px !important;
}

#members .card {
    background-color: #222;
    color: #fff;
    margin-bottom: 20px;
    transition: transform 0.3s ease-in-out;
}

#members .card img {
    height: 400px;
    object-fit: cover;
}

#members .card-title {
    color: #b42727;
}

#members .card:hover {
    transform: scale(1.1);
}

/* Social Media & Contact */
#social-media {
    background-color: #b42727;
    padding: 20px 0;
    text-align: center;
    color: #fffefe;
}

.social-icon {
    max-width: 70px;
    filter: brightness(0%) invert(100%);
    margin: 1rem;
}

#social-media img:hover {
    transform: scale(1.1);
    filter: brightness(100%) invert(0%);
}

#contact-phones {
    background-color: #b42727;
    padding: 20px 0;
    text-align: center;
}

#contact-phones p {
    margin: 0;
    font-size: larger;
}

.custom-send-button {
    background-color: #b42727;
    color: #ffffff;
}

#top_contact {
    margin-top: 16px !important;
}

#contact-phones-title {
    margin-bottom: 4px !important;
}

#mail_address {
    color: white;
}

/* Video */
#videos {
    margin-top: 24px;
    background-color: #000;
    padding: 16px 0;
}

.section-heading {
    font-size: 2.5rem;
    font-weight: 600;
    color: #fff;
    margin-bottom: 40px;
    text-transform: uppercase;
    letter-spacing: 2px;
}

.video-wrapper {
    position: relative;
    border-radius: 8px;
    box-shadow: 0 15px 30px rgba(124, 11, 11, 0.1);
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    background-color: #000000;
}

.video-wrapper:hover {
    transform: translateY(-10px);
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.2);
}

.video-wrapper iframe {
    width: 100%;
    height: 300px;
    display: block;
    border-radius: 8px;
    margin: 0 auto;
}

#counters {
    margin-top: 20px;
    background-color: #b42727;
    padding: 50px 0;
    text-align: center;
    color: #fff;
}

#counters .container {
    max-width: 800px;
    margin: 0 auto;
}

.counter {
    font-size: 2.5em;
    font-weight: bold;
    margin-bottom: 10px;
}

/* Language Switcher */
#language-switcher {
    margin-top: 10px;
    display: flex;
    align-items: center;
}

#toggle-language {
    background-color: #b42727;
    color: #fff;
    padding: 8px 16px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 14px;
    transition: background-color 0.3s ease;
}

#toggle-language:hover {
    background-color: #9c8685;
}

.references-wrapper {
    overflow: hidden;
    white-space: nowrap;
    position: relative;
    width: 100%;
    background-color: #000000;
    padding: 20px 0;
}

#references {
    margin-top: 16px !important;
}

.references-marquee {
    display: flex;
    gap: 50px;
    animation: marquee 15s linear infinite;
    width: max-content;
}

.reference-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    min-width: 200px; 
    text-align: center;
}

.reference-item img {
    max-height: 80px;
    width: auto;
}

@keyframes marquee {
    from {
        transform: translateX(0);
    }
    to {
        transform: translateX(-50%);
    }
}

@media only screen and (min-width: 768px) and (max-width: 1366px) {
    .slideshow {
        height: 40vh;
        width: 100%;
    }

    .slideshow img {
        object-fit: cover;
    }

    .slideshow-text {
        font-size: 1.2em;
        padding: 8px 16px;
    }
}

@media only screen and (max-width:766px) {
    .slideshow {
        height: 30vh;
        transform: scale(1.05);
    }

    .slideshow img {
        object-fit: cover;
    }

    .slideshow img.center {
        object-position: top;
        transform: scale(1.25);
    }

    .slideshow img.bottom {
        transform: scale(1.3);
        object-position: center;
    }

    .slideshow img.top {
        object-position: top;
    }

    .navbar-toggler-icon {
        background-color: #fff;
        border: 2px solid #fff;
        border-radius: 4px;
    }

    .slideshow-text {
        position: absolute;
        width: 100%;
        bottom: 0;
        border-bottom: 1px solid white;
        left: 50%;
        transform: translateX(-50%);
        background-color: rgba(0, 0, 0, 0.5);
        color: white;
        padding: 10px 20px;
        padding-bottom: 8px;
        font-size: 12px !important;
        letter-spacing: 2px;
        text-align: center;
        border-radius: 0px;
        z-index: 2;
        text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.8);
    }

    #references {
        margin-top: 8px !important;
    }
    
    .reference-item {
        display: flex;
        flex-direction: column;
        align-items: center;
        min-width: 100px;
        text-align: center;
    }

    .gallery-grid {
        display: grid;
        grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
        grid-auto-rows: auto;
        gap: 15px;
        justify-content: center;
    }

    .gallery-grid img {
        width: 100%;
        height: auto;
        object-fit: cover;
        border-radius: 12px;
        transition: transform 0.3s ease-in-out, opacity 0.3s;
    }

    .fade-out {
        position: relative;
        max-height: 130px; 
        overflow: hidden;
        transition: max-height 0.5s ease;
        border-radius: 4px;
    }

    .expanded {
        max-height: 3000px;
    }
}
