@media (max-width: 1580px) {
    .carousel-caption-second {
        left: 22.5%;
        top: 66%;
    }
}
.navbar.scrolled .navbar-nav .nav-link {
    color: rgb(13, 110, 253);
}

@media (max-width: 1480px) {
    .about-content-image img {
        height: 50vh;
    }
    .zug-inner .col-lg-11 {
        margin-top: 20vh;
    }
}
@media (min-width: 1400px) {
    .zug-inner .col-lg-11 {
        margin-top: 17vh;
    }
}
@media (max-width: 1400px) {
    .carousel-caption-second {
        left: 24.5%;
        width: 715px;
    }  
    
}
@media (max-width: 1400px) and (max-height: 700px) {
    .carousel-caption {
        top: 57.5%;
        /* left: 68.5%; */
        height: 42%;
        width: 420px;
        min-width: 30vw;
        min-height: 250px;
    }
    .carousel-caption-second {
        top: 69.5%;
        left: 22.5%;
    }
    #index-page .carousel-inner .item-second {
        height: 95vh;
        object-fit: cover;
        object-position: 91% 43%;
        transition: all 0.15s ease-in-out;
    }
    .carousel-inner img {
        height: 95vh;

        
        object-fit: cover;
        object-position: 94% 10%;
        transition: all 0.15s ease-in-out;
    }
    
    .text-line {
        font-size: 2.85rem;
        line-height: 3rem;
    }
    .small-text-second {
        font-size: 1.7rem;
        font-weight: 300;
        line-height: 1.87rem;
        color: #f0f0f0;
        letter-spacing: -0.5px;
        word-spacing: 3px;
        text-align: left;
        margin-left: 0.1rem;
        width: 450px;
    }
    .small-text {
        font-size: 1.2rem;
        line-height: 1.25rem;
        margin-left: 0.25rem;
    }
     
}
@media (max-width: 1400px) and (max-height: 600px) {
    .carousel-caption {
        height: 55%;
    }
}
@media (max-width: 1400px) {
    .about-content-image img {
        height: 80vh;
    }
}


/* General Responsive Navbar and Carousel Adjustments */
@media (max-width: 1300px) {
    .asphalt-inner img {
        object-position: 27% 20%;
    }
    .carousel-caption {
        top: 53.5%;
        margin-right: 1rem;
        height: 32%;
        min-height: 250px;
        min-width: 22vw;
        width: 400px;
    }
    .button-div {
        justify-content: center!important;
    }
    .carousel-caption-second {
        top: 60.5%;
        margin-right: 1rem;
        left: 16.5%;
    }
    .text-line {
        font-size: 2.56rem;
        line-height: 2.75rem;

    }
    .text-line-second {
        font-size: 3rem;
        line-height: 2.8rem;
    }
    
    .small-text-second {
        font-size: 1.75rem;
        width: 450px;
        line-height: 2rem;
    }
    
    .logo {
        width: 10rem;
    }
    
    .small-text {
        font-size: 1.4rem;
        line-height: 1.4rem;
    }
}
@media (max-width: 1150px) {
    .carousel-inner img {
        object-position: 60% 21%;
    }
    .carousel-caption {
        height: 32%;
        min-height: 230px;
    }
    .carousel-caption-second {
        margin-right: 1rem;
    }
    .text-line {
        font-size: 2.5rem;
        line-height: 2.65rem;
    }
    .small-text {
        font-size: 1.2rem;
        line-height: 1.31rem;
    }
    .text-line-alternate {
        font-size: 1.65rem;
        line-height: 1.75rem;
    }
}


@media (max-width: 1200px) and (max-height: 541px) {
    .logo {
        height: 16vh;
        width: auto;
        padding: 0.5vw;
    }
    .navbar-brand {
        height: 16vh;
    }
}

@media (max-width: 992px) {
    /* Navbar Adjustments */
    .navbar-collapse {
        position: absolute;
        top: 100%;
        right: 0;
        width: 40%;
        background-color: rgb(237, 244, 252);
        padding: 0.5rem;
        z-index: 0;
        box-shadow: 0vw 0.37vh 0.52vw rgba(0, 0, 0, 0.4);
    }
    #services .col-lg-5 {
        padding-left: 0vw;
        padding-right: 0vw;
    }
    .navbar-toggler {
        margin-left: auto;
        position: absolute;
        right: 20px;
        top: 50%;
        transform: translateY(-50%);
    }
    .navbar-nav {
        margin-left: auto;
        padding: 0;
    }
    .navbar-nav .nav-item {
        margin-top: 1.5vh;
        margin-bottom: 1.5vh;
        padding: 0;
    }
    .text-line {
        font-size: 2.45rem;
        line-height: 2.48rem;
    }
    .small-text {
        font-size: 1.4rem;
        font-weight: 300;
        line-height: 1.8rem;
        /* width: 500px; */
    }
    .small-text-second {
        font-size: 1.4rem;
        font-weight: 300;
        line-height: 1.8rem;
        width: 290px;
    }
    .img-shadow {
        box-shadow: 0 0.1vh 0.1vw rgba(0, 0, 0, 0.3); 
    }
    #services .img {
        width: 60vw;
        height: 60vh;
    }
    #about .embed-responsive-item {
        width: 75%;

    }
    .video-thumbnail {
        width: 60%; 
    }
    
    #about h3 {
        margin-top: 1vh;
        font-size: 1.75rem;
        font-weight: 550;
    }
    .about-content-image {
        max-width: 500px;

    }
    .shadow-container {
        box-shadow: 
        0 0.25vh 0.25vw rgba(0, 0, 0, 0.1), /* Bottom shadow */
        0 -0.25vh 0.25vw rgba(0, 0, 0, 0.1); /* Top shadow */
    }

    #services .services-content img {
        width: 95%;
        margin-bottom: 1rem;
    }

    #services .services-image {
        display: flex;
        justify-content: center;
        align-items: center;
    }

    .map-container img {
        width: 115%!important;
        max-width: 125%;
    }

    #railcar-info .row {
        padding: 1.5rem;
    }
    #biodiesel-info .row {
        padding: 1.5rem;
    }
    #biodiesel-info img {
        width: 50%;
        margin-bottom: 1vh;
    }
    .zug-inner .col-lg-11 {
        margin-top: 16vh;
    }
    #asphalt-info .img {
        max-width: 100%;
    }

    .carousel-inner img {
        object-position: 67% 21%;
    }

    .navbar {
        background-color: rgba(255, 255, 255, 1);
    }
    

    
}

@media (max-width: 992px) {
    .about-section .row {
        grid-template-columns: 1fr; /* Stacks into a single column */
        grid-template-rows: auto; /* Allows natural height */
        text-align: center; /* Centers text */
    }

    .about-content-image img {
        width: 85vw;
        max-height: 350px; /* Optional: limit excessive height */
    }
    .about-content-image {
        display: flex;
        align-items: center;
    }
    .navbar-collapse {
        padding: 10px;
        box-shadow: 0px 4px 6px rgba(0, 0, 0, 0.1);
        width: 55%;
    }
    .nav-item.dropdown {
        margin-right: 0.5rem;
    }
    .dropdown-menu {
        left: 0;
        text-align: left;
        opacity: 0;
        visibility: hidden;
        pointer-events: none; /* Prevent interaction when invisible */
    }
    
    .dropdown:hover .dropdown-menu {
        opacity: 1;
        visibility: visible;
    }
    
    .nav-item.dropdown {
        width: 51vw;
        margin-right: 1rem;
    }
    .navbar-nav {
        display: flex;
        align-items: left;
        justify-content: left;
        left: 0;
        text-align: left; 
    }

    .dropdown-item {
        width: 100%;
    }
    .nav-item.dropdown:hover .nav-link,
    .nav-item.dropdown:focus-within .nav-link,
    .nav-item.dropdown .nav-link.show {
        /* background-color: white; */
        color: #007bff;

    }
    .navbar-collapse {
        display: flex;
        align-items: left;
        justify-content: left;
        text-align: left;
    }
    /* CAnnot hover on phone 2nd dropdown without */
    .navbar-collapse .nav-item.dropdown:hover .dropdown-menu {
        opacity: 1;
        visibility: visible;
        pointer-events: all; /* Enable interaction when visible */
    }
    .facility-separator {
        width: 94.4% ;
    }
    .small-text {
        text-align: left;
        font-size: 1.2rem;
        line-height: 1.3rem;
        margin-left: 0;
    }
    .carousel-caption {
        width: 300px;
    }

    .carousel-caption .btn-5 {
        font-size: 12px;
    }
   
    .carousel-caption-second {
        top: 61.5%;
        margin-right: 1rem;
        left: 15.5%;
    }
    .carousel-inner img {
        object-position: 88% 0%;
    }
    .carousel-inner .item-second {
        object-position: 40% 100%;
    }
    
    .flip-row {
        flex-direction: column-reverse;
    }
    .flip-image {
        margin-bottom: 0.5rem;
        margin-top: 0.5rem;
    }
    .navbar .nav-link {
        color: #007bff;
    }
    .button-div {
        align-items: center!important;
        justify-content: center!important;
        margin: 0!important;
}
}
    
@media (max-width: 845px) {
    .carousel-caption-second {
        top: 64.5%;
        /* margin-right: 1rem; */
        left: 15.5%;
    }

}


@media (max-height: 732px) {
    .carousel-caption p {
        display: none;
    }
}

/* Smaller Screens (max-width: 768px) */
@media (max-width: 768px) {
    #about h3, #about p {
        text-align: left;
    }
    #services h4, #services p {
        text-align: left;
    }
    
    #contactForm {
        padding: 1.5rem;
        padding-top: 0;
    }
    #contactForm h2 {
        font-size: 1.5rem;
    }
    #biodiesel h3, #biodiesel p {
        text-align: center;
    }
    #biodiesel-info .image-fluid {
        width: 85%;
    }
    .club-image-width {
        width: 10vw;
    }
    .services-content {
        margin-left: 3.5vw;
        margin-right: 3.5vw;
    }
    #links .row {
        display: flex;
        align-items: center;
        justify-content: center;
    }

    .link-container {
        width: 95%;
        display: flex;
        align-items: center;
    }
    .navbar {
        height: 80px;
        min-height: 10vh;
    }
    .navbar-hero {
        min-height: 107px;
    }
}
@media (max-width: 768px) and (orientation: portrait) {
    .carousel-item {
        height: 65vh;
    }
    .carousel-inner img {
        height: 65vh;
    }
}

@media (max-width: 992px) {
    .navbar-hero {
        height: 90px;
    }
    .navbar-hero + .carousel {
        margin-top: 90px;
    }
    .cc-container-box {
        display: none; /* Ensures it aligns properly */
        justify-content: center; /* Centers horizontally */
        width: 100%; /* Ensures full width */
        flex-direction: column;
    }
    .service-sep {
        display: none;
    }
}



@media (max-width: 576px) {
    .navbar-hero {
        height: 70px;
    }
    .navbar-hero + .carousel {
        margin-top: 70px;
    }
}

/* Responsive adjustments for contact section */
@media (max-width: 768px) {
    #contact {
        top: 45%;  /* Adjusted for better position on smaller screens */
        transform: translate(-50%, -45%);
    }

    #contact .container {
        max-width: 85%;  /* Reduced max-width for smaller screens */
        padding: 15px;
        max-height: 85vh;  /* Ensure the container is not too tall */
    }

    #contact h2 {
        font-size: 1.5rem;
    }

    #contact p {
        font-size: 1rem;
    }

    #contactForm .form-label {
        font-size: 0.9rem;
    }

    .page-headline {
        font-size: 2.5rem;
    }
    
    .link-container {  
        margin: 0 auto;  /* Center the container horizontally */
        margin-top: 0.25rem;
        margin-bottom: 0.25rem;
    }
    .carousel-caption {
        left: 44%;
        top: 52.5%;
    }
    .item-second {
        transform: translateY(12.5%);
    }
    .carousel-inner img {
        object-position: 1% 0%;
        transform: translateY(45px);
    }
    .cc-container-box {
        display: flex; /* Ensures it aligns properly */
        justify-content: end; /* Centers horizontally */
        flex-direction: row;
        align-items: center;
    }
    .cc-box-caption {
        font-size: 0.9rem;
        color: white;
        margin: 0;
        text-align: left;
        margin-left: 0.75rem;
        letter-spacing: 0.15px;
        font-weight: 550;
        
        
    }
    .btn-5 {
        text-decoration: none;
    }
    .wide-screen {
        display: block;
    }
    .zoom-effect {
        animation: none;
    }

}

@media (max-width: 576px) {
    #contact {
        top: 40%;  /* Adjusted for even smaller screens */
        transform: translate(-50%, -40%);
    }

    #contact .container {
        max-width: 90%;
        padding: 10px;
        max-height: 80vh;  /* Ensuring form doesn't overflow */
    }

    #contact h2 {
        font-size: 1.25rem;
    }

    #contact p {
        font-size: 0.9rem;
    }

    #contactForm .form-label {
        font-size: 0.85rem;
    }

    #contactForm textarea {
        font-size: 0.9rem;
    }
    .zug-inner .col-lg-11 {
        margin-left: 4.167%;
    }
}

/* Specific adjustments for landscape orientation */
@media (orientation: landscape) {
    #contact h2 {
        font-size: 1.6rem;  /* Adjust heading size for better visibility */
    }

    #contact p {
        font-size: 1.1rem;
    }

    #contactForm .form-label {
        font-size: 1rem;
    }
    
}

@media (orientation: landscape) and (max-height: 500px) {
    .carousel-contact {
        height: 175vh;
    }
    .contact-container {
        max-height: 150vh;
        margin-top: 20vh;
    }
    #contact {
        top: 50%;  /* Ensure it remains centered in landscape mode */
        transform: translate(-50%, -50%);
    }
     
    #contact .container {
        max-width: 70%;  /* Keep it narrower in landscape */
        padding: 20px;
    }

}
@media (max-width: 700px) {
    #biodiesel-info img {
        width: 75%;
        margin-bottom: 1rem;
    }
}

/* Extra Small Screens (max-width: 576px) */
@media (max-width: 576px) {
    #services .image-border {
        height: auto;
    }
    #services p, #services h4 {
        margin-right: 1vw;
        margin-left: 1vw;
        margin-top: 3vw;
    }
    #about .row {
        width: 100%; /* Ensures the row takes full width */
        margin-left: 0;
    }
    #biodiesel h3, #biodiesel p {
        text-align: left;
        
    }
    #biodiesel-info h4, #biodiesel-info p {
        text-align: left;
    }
    #biodiesel .img {
        width: 74%;
    }
    .club-image-width {
        width: 15vw;
    }
    .btn-5 {
        text-decoration: none!important;
        font-size: 85%;
    }
    
}

/* Small Height Screens (max-height: 584px) */
@media (max-width: 584px) {
    .navbar-brand {
        height: 8vh;
    }
    .smaller-image {
        width: 100%;
    }
    
}

@media (max-width: 992px) and (orientation: landscape) {
    .flex-column-md {
        flex-direction: column; /* Stack items vertically for smaller screens */
    }
    #biodiesel-info .col-md-5 {
        width: 74%;
    }
    #biodiesel-info .col-md-7 {
        width: 100%;
    }
}


@media (max-width: 992px) {
    #biodiesel-info .col-md-6 {
        width: 100%;
    }
    .right-side-image {
        flex-direction: column-reverse;
    }
}
@media (max-width: 570px) {
    .page-headline {
        font-size: 2.5rem;
        line-height: 2.4rem;
    }
}

@media (max-height: 850px) and (min-height: 541px) and (max-width: 991px) and (min-width: 585px) {
    .logo {
        width: 8.5rem;
    }
}


/* Mobile Navbar Dropdown Styling */
@media (max-width: 575px) and (orientation: portrait) {
    .page-headline {
        font-size: 2.1rem;
    }
    .biodiesel-inner .col-lg-11 {
        margin-top: 13vh;
        height: 10vh;
        min-height: 80px;
    }
    .asphalt-inner .col-lg-11 {
        margin-top: 14vh;
        height: 10vh;
        min-height: 85px;
    }
    body {
        background-color: rgb(254, 254, 254);
    }
    .navbar {
        background-color: rgba(255, 255, 255, 1);
    }
    #index-page {
        .col-md-11 {
            width: 95.84%;
        }
    }
    .btn-5 {
        font-size: 67%;
    }
    #video .container {
        padding-top: 7vh;
    }
    #services .facility-separator {
        height: 0;
    }
    #services .row {
        margin-bottom: 0.5rem!important;
    }
     #asphalt-info .col-lg-4 {
        margin-bottom: 0.75rem;
    }
    
}
@media (max-width: 585px) {
    .logo {
        width: 8.5rem;
    }
}
@media (max-width: 480px) {
    .video-thumbnail {
        width: 80%; 
    }
    .about-content-image img {
        width: 82vw;
    }
    .logo {
        width: 8.5rem;
    }
    .navbar {
        height: 80px;
        min-height: 10vh;
    }
    .asphalt-inner .col-lg-11 {
        margin-top: 12vh;
    }
    .zug-inner .col-lg-11 {
        margin-top: 12vh;
    }
    .navbar-toggler {
        padding: 0.5rem;
    }
    .navbar-toggler-icon {
        padding: 0.5rem;
    }
    
    .carousel-item .img {
        object-fit: cover;
        object-position: 39% 0%;
        transform: scale(1.25) translateY(12%);
        height: 114%;
    }
}

/* PHONE NORMAL SIZE*/
@media (max-width: 450px) and (orientation: portrait) {
    .shadow-container {
        box-shadow: 0 0.25vh 0.25vw rgba(0, 0, 0, 0.1), 0 -0.25vh 0.25vw rgba(0, 0, 0, 0.1);
    }
    .image-translate {
        object-position: 27% 20% !important; /* Positions the image to the middle-left */
    }
    .service-list {
        margin-left: 0rem;
    }
    .phone-space {
        margin-bottom: 0.5rem;
    }
    
    .btn-custom {
        font-size: 15px;
        transform: translateY(-10px);
    }
    .cc-button-container {
        padding-bottom: 0.25rem;
    }
    
    #asphalt-info-more {
        padding: 0.5rem;
    }

    .footer-separator {
        display: block!important;
    }

    #biodiesel-info .row {
        padding: 0.25rem!important;
    }

    #biodiesel-info h1 {
        font-size: 1.75rem;
    }

    #railcar-info-more {
        padding-bottom: 0.25rem!important;
    }

    #video .container {
        padding-top: 5vh;
    }

    .page-headline {
        font-size: 2.25rem;
    }

    #biodiesel-info .col-lg-11 {
        padding-left: 1rem!important;
        padding-right: 0.75rem!important;
    }
    
    #biodiesel-info img {
        width: 100%;
        margin-bottom: 1vh;
    }
    .zug-inner .col-lg-11 {
        margin-top: 11vh;
    }
    .asphalt-inner .col-lg-11 {
        margin-top: 12vh;
    }
    #asphalt-info img {
        margin-bottom: 0.5rem;
        margin-top: 0.25rem;
        max-width:100%;
    }
    .carousel-item {
        height: 65vh;
    }
    .carousel-contact {
        height: 125vh;
    }
    
    .navbar {
        height: 80px;
        min-height: 10vh;
    }
    .logo {
        width: 7rem;
    }
    .text-line {
        font-weight: 600;
        letter-spacing: -1.25px;
    }
    .navbar {
        box-shadow: 0px 0.15px 0.15px rgb(64 79 196 / 40%);
    
    }
    .navbar.scrolled {
        box-shadow: 1px 1px 1px rgba(0, 173, 253, 0.4); /* Glow at bottom */
    }
    .navbar-hero {
        box-shadow: 0px 0.37px 0.5px rgba(0, 0, 0, 0.2); /* Glow at bottom */
    }
    #about .row {
        padding: 0.5rem!important;
    }
    .page-headline {
        font-size: 1.96rem;
    }
    .biodiesel-inner .col-lg-11 {
        margin-top: 12vh;
        height: 14vh;
        min-height: 80px;
    }
    .biodiesel-overview {
        padding: 0.5rem!important;
    }
    #biodiesel-info h3, #biodiesel-info h2 {
        font-size: 1.75rem;
    }
    
    /* #index-page .carousel-inner img {
        object-fit: cover;
        object-position: 36% 0%;
        transform: scale(1.30) translateY(-4%);
        
    } */
    #index-page .carousel-item-second img.item-second {
        object-position: 22% 0% ;
        transform: scale(1.25) translateY(2%);
        height: 100%;
    }
    .link-container {
        border: 1vw solid rgba(155, 195, 241, 0.95);
        width: 102%;
    }
   
    
}

@media (max-height: 592px) and (max-width: 900px) {
    .navbar-brand {
        height: 12vh;
        width: auto;
    }
}


/* SIDEWAYS PHONE NORMAL SIZE*/
@media (max-height: 450px) and (orientation: landscape) {
    .biodiesel-inner img {
        object-position: 50% 50% !important;
    }
    .navbar-nav .nav-item {
        height: 8vh;
    }
    .breadcrumb {
        margin-bottom: 0;
    }
    .navbar-nav .nav-link, .navbar-nav .nav-link.active {
        font-size: 1.25rem;
        text-align: left;
    }
    .about-content-image {
        max-width: none;
        width: 96%;
    }
    #services .services-content img {
        width: 95%;
        margin-bottom: 1vh;
    }
    .navbar {
        height: 17vh;
    }
    #biodiesel-info .row {
        padding: 1.5rem!important;
    }

    .asphalt-item {
        height: 43vh;
        max-height: 175px;
    }
    .zug-inner .col-lg-11 {
        margin-top:12vh;
        min-height: 96px;
    }
    #biodiesel-info img {
        width: 65%;
        margin-bottom: 5vh;
    }
    .club-footer-image {
        width: 12vw;
        height: 16vh;
        object-fit: contain;
        display: block;
    }
    #asphalt-info img {
        max-width:100%;
        border-radius: none;
    }
    
    #asphalt-info .pic {
        width: 50%;
    }
    .btn-primary {
        margin-bottom: 1vh;
    }
    .carousel-caption {
        top: 75.5%;
    }
    
    .logo {
        height: 4rem;
        min-width: 105px;
    }
    .navbar-hero {
        height: 15vh;
        min-height: 15vh;
    }
    .logo {
        margin-bottom: 0.35rem;
    }
   
    .navbar-nav .dropdown-menu {
        position: relative;  /* Ensures dropdown stays within the normal flow */
        width: 100%;         /* Makes dropdowns full width */
    }
    
    .navbar-nav .dropdown-menu .dropdown-item {
        white-space: normal; /* Allows text to wrap properly */
    }
    .page-headline {
        font-size: 3rem;
    }
    .text-line {
        font-size: 2.25rem;
        line-height: 2.3rem;
    }
    .small-text, .small-text-second {
        font-size: 1.25rem;
        line-height: 1.3rem;
    }
    .carousel-caption {
        top: 61.5%;
        left: 20.5%;
    }
    #services h4 {
        margin-top: 0.75rem;
    }
}
@media (max-width: 450px) and (orientation: portrait) and (max-height: 750px) {
    .biodiesel-inner .col-lg-11 {
        margin-top: 13vh;
        height: 10vh;
        min-height: 83px;
    }
}
@media (max-width: 450px) and (orientation: portrait) and (max-height: 660px) {
    .biodiesel-inner .col-lg-11 {
        margin-top: 15vh;
        height: 10vh;
        min-height: 83px;
    }
}

@media (max-height: 400px) and (orientation: landscape) {
    .carousel-caption {
        top: 63.5%;
        left: 15.5%;
    }
}



@media (max-width: 400px) and (orientation: portrait) {
    .page-headline {
        font-size: 1.75rem;
    }
    .page-headline {
        font-size: 2.2rem;
    }
    .carousel-caption {
        left: 2%;
        top: 51%;
    }

}
@media (max-height: 590px) {
    .zug-inner {
        margin-top: 25px;
    }
}

@media (min-width: 1921px) {
   body {
    background-color: white;
   }
}

@media (max-width: 450px) and (max-height: 950px) and (orientation: portrait) {
    #links .row {
        width: 100%;
    }
    .small-screen-flex {
        display: flex;
        justify-content: center;
        align-items: center;
    }

}
