@media (max-width: 1580px) {
    
}

@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) {
    .about-content-image img {
        height: 80vh;
    }
    .text-line {
        font-size: 3rem;
        line-height: 3.25rem;
    }
    .small-text {
        font-size: 1.5rem;
        font-size: 1.75rem;
    }
    .logo {
        width: 10rem;
    }
    .navbar-nav .nav-link {
        font-size: 1.2rem;
    }
    .carousel-caption {
        top: 70.5%;
        left: 21.5%;
    }

}


/* General Responsive Navbar and Carousel Adjustments */
@media (max-width: 1300px) {
    .asphalt-inner img {
        object-position: 27% 20%;
    }
}
@media (max-width: 1150px) {
    .carousel-inner img {
        height: 107%;
        object-position: 60% 90%;
    }
    
}

@media (max-width: 992px) {
    /* Navbar Adjustments */
    .navbar-collapse {
        position: absolute;
        top: 100%;
        right: 0;
        width: 40%;
        background-color: rgb(74, 144, 214);
        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;
    }
    .navbar {
        background-color: rgb(120, 185, 250);
    }
    .text-line {
        font-size: 2.4rem;
        line-height: 2.45rem;
    }
    .small-text {
        font-size: 1.25rem;
        font-weight: 300;
        line-height: 1.4rem;
        width: 350px;
    }
    .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 img {
        width: 50%;
        margin-bottom: 1vh;
    }
    .zug-inner .col-lg-11 {
        margin-top: 16vh;
    }
    #asphalt-info .img {
        max-width: 100%;
    }

    .carousel-inner img {
        height: 113%;
        object-position: 67% 21%;
    }
}

@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: #007bff;
        color: white;
    }
    .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% ;
    }
    
    .carousel-inner img {
        height: 103%;
        object-position: 62% 21%;
    }
}
    

@media (max-width: 992px) and (max-height: 540px) {
    .text-line {
        font-size: 5vw;
        text-align: left;
        line-height: 4.8vw;
    }
}
@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;
    }
    
}
@media (max-width: 992px) {
    .carousel-item {
        height: 65vh;
    }

}
@media (max-width: 992px) and (max-height: 600px) {
    .carousel-item {
        height: 80vh;
    }
    .logo {
        transform: translateY(-1.25rem);
    }
    .carousel-inner img {
        height: 103%;
        object-position: 62% 74%;
    }
}
@media (min-width: 992px) {
    #caption-section {
        display: none;
    }
    
}
@media (max-width: 992px) {
    .navbar-hero {
        height: 90px;
    }
    .navbar-hero + .carousel {
        margin-top: 90px;
    }
    .service-sep {
        display: none;
    }
    .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;
    }
    .logo {
        width: 10rem;
    }

}



@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%;
    }
    .carousel-inner img {
        object-position: 1% 98%;
        height: 104%;
    }
    
    .cc-container-box {
        display: flex; /* Ensures it aligns properly */
        justify-content: end; /* Centers horizontally */
        flex-direction: row;
        align-items: center;
        width: 100%;
    }
    .cc-box-caption {
        font-size: 1rem;
        color: white;
        margin: 0;
        text-align: left;
        margin-left: 0.75rem;
        letter-spacing: -0.5px;
        font-weight: 550;
        
    }
    .btn-5 {
        text-decoration: none;
    }
    .wide-screen {
        display: block;
    }

}

@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;
    }
}



/* 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(120, 185, 250);
    }
    #index-page {
        .col-md-11 {
            width: 95.84%;
        }
    }
    .btn-5 {
        font-size: 77%;
    }
    #video .container {
        padding-top: 7vh;
    }
    #services .facility-separator {
        height: 0;
    }
    #services .row {
        margin-bottom: 0.5rem!important;
    }
    .phone-background-dark {
        background-color: rgb(8, 57, 78);
    }
    .phone-background-light {
        background-color: rgb(10, 62, 81);
        padding-top: 1.5rem!important;
    }
    .logo {
        width: 10rem;
    }
}
@media (max-width: 480px) {
    .video-thumbnail {
        width: 80%; 
    }
    .about-content-image img {
        width: 82vw;
    }
    .logo {
        width: 10rem;
    }
    
    .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%;
    }
    #about h3 {
        font-size: 1.375rem;
    }
    #about p {
        font-size: 1.1rem;
    }
}

/* 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: 0.5rem!important;
        padding-right: 0.5rem!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: 6rem;
        transform: translateY(-0.25rem);
    }
    .text-line {
        font-weight: 675;
        letter-spacing: -1.25px;
    }
    .small-text {
        font-weight: 300;
    }
    .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: 35% 0%;
        transform: scale(1.05) translateY(0%);
    }
    .carousel-item.active img {
        animation: none;
    }
    .link-container {
        border: 1vw solid rgba(155, 195, 241, 0.95);
        width: 102%;
    }
    
}


/* 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%;
    }
    .text-line {
        text-shadow: 1px 1px 1px rgba(0, 0, 0, 0.8);
    }
    .logo {
        height: 18vh;
    }
    .navbar-hero {
        height: 15vh;
        min-height: 15vh;
    }
    .logo {
        height: 15vh;
        margin-bottom: 0.45rem;
    }
   
    .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: 48.5%;
    }
    
    
}
@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: 600px) {
    .navbar {
        height: 74px;
        min-height: 10vh;
    }
    .logo {
        width: 10rem;
    }
    .navbar-nav .nav-link {
        font-size: 1.15rem;
    }
    .text-line {
        font-size: 2.5rem;
        line-height: 2.6rem;
    }
    .small-text {
        font-size: 1.3rem;
        line-height: 1.4rem;
    }
}


@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;
    }

}