img, video {
    max-width: 100%;
    height: auto;
}

.container {
    padding-left: 20px;
    padding-right: 20px;
}
/*------------------------------------------------------------------------*/
@media (max-width: 991px) {
    .menu-toggle {
        display: block;
        font-size: 26px;
        cursor: pointer;
        color: #000;
    }

    .nav-menu {
        position: absolute;
        top: 80px;
        left: 0;
        width: 100%;
        background: #fff;
        display: none;
        flex-direction: column;
        padding: 20px 0;
    }

    .nav-menu.active {
        display: flex;
    }

    .nav-menu ul {
        flex-direction: column;
        gap: 20px;
    }

    .nav-menu ul li {
        margin: 0;
        text-align: center;
    }

    .dropdown-menu {
        position: static;
        box-shadow: none;
        background: #111827;
    }

    .dropdown-menu li a {
        color: #fff;
    }
}
/*----------------------------------------navbar section---------------------------------*/
/* Mobile View (Screens smaller than 768px) */
@media (max-width: 767px) {
    .desktop-video {
        display: none;
    }
    
    .mobile-video {
        display: block;
    }
}

@media (max-width: 991px) {
    .hero-content{
        max-width: 90%;
    }
    .hero-content h1 {
        font-size: 36px;
    }

    .hero-content p {
        font-size: 18px;
        font-weight: 900;
    }

    .hero-buttons {
        flex-direction: column;
        gap: 15px;
    }

    .hero-buttons a{
        margin-bottom: 10px;
    }
}

@media (max-width: 576px) {
    .hero {
        height: 73vh;
    }

    .hero-content h1 {
        font-size: 28px;
        line-height: 1.3;
    }
}
/*-------------------------------------banner section-----------------------------------*/

/* ================= WHY THE ROOF SECTION RESPONSIVE ================= */
@media (max-width: 991px) {
    .why-roof{
        padding-top: 50px;
        padding-bottom: 50px;
        padding-left: 0px;
        padding-right: 0px;
    }

    .why-roof p{
        font-size: 0.8rem;
    }

    .why-points div{
        font-size: 0.8rem;
    }

    .why-points div::before{
        display: none;
    }

    .why-points div span strong{
        display: inline-block;
        color: #da1a1f;
        margin-right: 10px;
    }

    /* Make the grid stack vertically */
    .why-grid {
        display: flex;
        flex-direction: column;
        gap: 40px; /* space between content and form */
    }

    /* Slide animations stay functional but content adjusts */
    .why-content, .why-form {
        width: 100%;
        text-align: center; /* center text on mobile */
    } 
    .why-form {
        padding: 0 15px;    /* small side padding */
    }

    /* Counters adjust for mobile */
    .counters {
        display: flex;
        flex-wrap: wrap;
        justify-content: center;
        gap: 20px;
        margin-top: 20px;
    }

    .counter-box {
        flex: 1 1 45%; /* two per row on mobile */
        min-width: 120px; /* prevent too small boxes */
        text-align: center;
    }

    .counter-box h3 {
        font-size: 20px; /* slightly smaller on mobile */
    }

    .counter-box span {
        font-size: 8px;
    }

    /* Form adjustments */
    .why-form form {
        display: flex;
        flex-direction: column;
        gap: 15px;
        width: 100%;
        padding: 20px 15px;
    }

    .why-form h3{
        font-size: 1.2rem;
        margin-bottom: 2%;
    }

    .why-form input,
    .why-form select,
    .why-form textarea,
    .why-form button {
        width: 100%; /* full width fields */
        font-size: 14px;
        padding: 10px;
    }

    /* Buttons smaller on mobile */
    .why-form .btn-primary {
        padding: 10px 0;
    }
}
@media (max-width: 768px) {
    .why-content h2{
        text-align: center;
    }
    .why-content p{
        text-align: center;
    }
}
/*---------------------------------why the roof section---------------------------------*/

@media (max-width: 991px) {
    .services{
        padding: 50px 0px;
    }

    .services-wrap {
        grid-template-columns: 1fr;
        gap: 40px;
    }

    .services-visual {
        order: 1;
    }

    .services-content {
        order: 2;
    }

    .services-list li {
        font-size: 16px;
    }
}
/* ----------------------------------services section------------------------------------ */

@media (max-width: 576px) {
    .clients {
        padding: 50px 0px;
    }
    .clients .container{
        padding: 0px;
    }
    .clients h2{
        font-size: 1.6rem;
    }
    .marquee-track img {
        width: 100%;
        height: 80px;
    }
}
/*-----------------------------------client section---------------------------------*/

@media (max-width: 991px) {
    .case-studies{
        padding: 50px 0px;
    }
    .case-studies h2{
        font-size: 2rem;
    }
    .slide-btn{
        font-size: 15px;
        padding: 5px 12px;
    }
    .slide-btn.prev{
        left: -30px;
    }
    .slide-btn.next{
        right: -30px;
    }
    .case-card {
        min-width: 280px;
    }
}

@media (max-width: 576px) {
    .case-slider {
        gap: 20px;
    }
}
/*--------------------------------------case studies section------------------------------------*/

/* ================= FOOTER RESPONSIVE ================= */
@media (max-width: 991px) {
    .footer-wrap {
        display: flex;
        flex-direction: column;
        gap: 30px; /* space between left and right parts */
        padding: 30px 15px;
    }

    /* Left part */
    .footer-left,
    .footer-right {
        width: 100%;
        text-align: center; /* center content on mobile */
    }

    .footer-left .footer-logo {
        width: 150px; /* adjust logo size for mobile */
        margin: 0 auto 15px auto;
        display: block;
    }

    .footer-left .footer-desc {
        font-size: 14px;
        line-height: 1.5;
        margin-bottom: 15px;
    }
    .footer-left .footer-socials {
        display: flex;          /* use flex layout */
        justify-content: center; /* center horizontally */
        gap: 15px;              /* spacing between icons */
        margin-top: 15px;
    }

    .footer-left .footer-socials a {
        margin: 0 8px;
        font-size: 18px;
    }

    /* Right part */
    .footer-right h4 {
        margin-bottom: 15px;
    }

    .footer-contact {
        list-style: none;
        padding: 0;
        margin: 0;
    }

    .footer-contact li {
        display: flex;
        align-items: center;
        justify-content: center; /* center on mobile */
        margin-bottom: 10px;
        font-size: 14px;
        line-height: 1.4;
    }

    .footer-contact li i {
        margin-right: 10px;
        font-size: 18px;
    }
}

/* ================= SMALL MOBILE DEVICES ================= */
@media (max-width: 575px) {
    .footer-left .footer-logo {
        width: 120px;
    }

    .footer-left .footer-desc {
        font-size: 13px;
    }

    .footer-contact li {
        flex-direction: column;
        gap: 3px;
        text-align: center;
    }

    .footer-contact li i {
        margin-right: 0;
    }

    .footer-bottom {
        font-size: 12px;
        padding: 15px 10px;
    }
}
/*--------------------------------------footer section---------------------------------------*/

/* ===== TABLET (<= 992px) ===== */
@media (max-width: 992px) {
    .about-grid {
        flex-direction: column;
        gap: 40px;
    }

    .about-content,
    .about-video {
        flex: 1 1 100%;
    }

    .about-content h2 {
        font-size: 32px;
    }

    .about-content p {
        font-size: 15px;
    }

    .testimonial-video {
        max-width: 100%;
    }
}

/* ===== MOBILE (<= 768px) ===== */
@media (max-width: 768px) {
    .about-roof {
        padding: 60px 20px;
    }

    .about-roof .container{
        padding-left: 0px;\
        padding-right: 0px;
    }

    .about-content h2 {
        font-size: 30px;
    }

    .about-content p {
        font-size: 14px;
        line-height: 1.6;
    }

    .testimonial-video {
        width: 100%;
        border-radius: 8px;
    }
}

/* ===== SMALL MOBILE (<= 480px) ===== */
@media (max-width: 480px) {
    .about-content h2 {
        font-size: 30px;
        text-align: center;
    }

    .about-content p {
        font-size: 13px;
    }

    .testimonial-video {
        width: 100%;
        max-width: 100%;
    }
}

@media (max-width: 992px) {
    .why-choose-us{
        padding: 50px 0px;
    }
}

@media screen and (max-width: 1024px) {
    .service-content {
        flex-direction: column;
        text-align: center;
    }

    .service-content .image-content img {
        margin-top: 20px;
    }
}
@media screen and (max-width: 768px) {
    .services-grid-section{
        padding: 50px 0px;
    }
    .services-grid-section h2 {
        font-size: 24px;
    }
    .services-hero {
        /* Reset aspect ratio so the box can grow taller for the text */
        aspect-ratio: auto; 
        
        /* 'cover' ensures the background fills the taller box */
        background-size: cover; 
        
        /* Add more vertical padding so the text doesn't hit the edges */
        padding: 80px 20px;
        
        /* Center the most important part of the image */
        background-position: center center;
    }

    .services-hero h1 {
        font-size: 28px; /* Shrink the font so it doesn't break into 5 lines */
        letter-spacing: 2px;
    }

    .services-hero p {
        font-size: 16px;
    }
    .services-hero h1 {
        font-size: 28px;
    }

    .service-section h2 {
        font-size: 24px;
    }

    .contact-form-section h2 {
        font-size: 24px;
    }
}
@media (max-width: 1024px) {
    .why-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .careers-why h2 {
        font-size: 28px;
        margin-bottom: 40px;
    }
}

/* Mobile */
@media (max-width: 768px) {
    .careers-why{
        padding: 50px 20px;
    }
    .why-grid {
        grid-template-columns: 1fr;
    }

    .why-item {
        font-size: 16px;
        padding: 25px 20px;
    }

    .careers-why h2 {
        font-size: 24px;
    }
}
@media (max-width: 1024px) {
    .careers-openings h2 {
        font-size: 28px;
        text-align: center;
    }

    .job-card {
        padding: 28px;
    }
}

/* Mobile */
@media (max-width: 768px) {
    .careers-openings {
        padding: 60px 15px;
    }

    .careers-openings h2 {
        font-size: 24px;
        margin-bottom: 40px;
        text-align: center;
    }

    .job-card {
        padding: 25px 20px;
    }

    .job-card h3 {
        font-size: 20px;
    }

    .job-card p {
        font-size: 15px;
    }
}
@media (max-width: 1024px) {
    .career-form h2 {
        font-size: 28px;
    }

    .career-form .container {
        padding: 35px;
    }
}

/* Mobile */
@media (max-width: 768px) {
    .career-form {
        padding: 50px 15px;
    }

    .career-form h2 {
        font-size: 24px;
        margin-bottom: 30px;
    }

    .career-form .container {
        padding: 30px 0px;
        border-radius: 12px;
    }

    .career-form input,
    .career-form select,
    .career-form textarea {
        font-size: 14px;
        padding: 12px;
    }
}
/*------------------------------------------------------career page responsive css------------------------------------------------*/

@media (max-width: 1024px) {
    .blog-hero h2 {
        font-size: 36px;
    }

    .blog-hero p {
        font-size: 16px;
    }
}

/* Mobile */
@media (max-width: 768px) {
    .blog-hero {
        background: url('../images/banners/About-Roof-mobile.jpg') no-repeat center center;
        background-size: cover;
        background-attachment: scroll;
        color: #ffffff;
        padding: 60px 20px;
    }

    .blog-hero h1 {
        font-size: 28px;
    }

    .blog-hero p {
        font-size: 15px;
    }
}

/* Small Mobile */
@media (max-width: 480px) {
    .blog-hero h1 {
        font-size: 24px;
    }

    .blog-hero p {
        font-size: 14px;
    }
}
/* Tablets */
@media (max-width: 1024px) {
    .blog-card {
        flex-direction: column;
    }

    .blog-card img {
        width: 100%;
        height: 250px;
    }

    .blog-content h2 {
        font-size: 22px;
    }

    .blog-content p {
        font-size: 15px;
    }
}

/* Mobile */
@media (max-width: 768px) {
    .blog-section {
        padding: 50px 20px;
    }

    .blog-section .container{
        padding: 0px;
    }

    .blog-card {
        margin-bottom: 40px;
        border-radius: 14px;
    }

    .blog-card img {
        height: 220px;
    }

    .blog-content {
        padding: 20px;
    }

    .blog-content h2 {
        font-size: 20px;
    }

    .blog-content p {
        font-size: 14px;
    }
}

/* Small Mobile */
@media (max-width: 480px) {
    .blog-card img {
        height: 180px;
    }

    .blog-content h2 {
        font-size: 18px;
    }

    .blog-content p {
        font-size: 13px;
    }
}
/* Tablets */
@media (max-width: 1024px) {
    .blog-modal-content {
        width: 80%;
        padding: 35px;
    }

    .blog-modal-content h2 {
        font-size: 28px;
    }

    .blog-modal-content p {
        font-size: 15px;
    }

    .blog-modal-content img {
        max-height: 280px;
    }
}

/* Mobile */
@media (max-width: 768px) {
    .blog-modal-content {
        width: 90%;
        padding: 30px;
        max-height: 90vh;
    }

    .blog-modal-content h2 {
        font-size: 24px;
    }

    .blog-modal-content p {
        font-size: 14px;
    }

    .blog-modal-content img {
        max-height: 220px;
    }
}

/* Small Mobile */
@media (max-width: 480px) {
    .blog-modal-content {
        padding: 20px;
        border-radius: 14px;
    }

    .blog-modal-content h2 {
        font-size: 20px;
    }

    .blog-modal-content p {
        font-size: 13px;
    }

    .blog-modal-content img {
        max-height: 180px;
    }

    .close-modal {
        top: 12px;
        right: 15px;
        font-size: 28px;
    }
}
/* Large Tablets */
@media (max-width: 1024px) {
    .contact-hero h2 {
        font-size: 36px;
    }

    .contact-hero p {
        font-size: 16px;
    }
}

/* Mobile */
@media (max-width: 768px) {
    .contact-hero {
        padding: 120px 20px;
    }

    .contact-hero h2 {
        font-size: 28px;
    }

    .contact-hero p {
        font-size: 15px;
    }
}

/* Small Mobile */
@media (max-width: 480px) {
    .contact-hero h2 {
        font-size: 24px;
    }

    .contact-hero p {
        font-size: 14px;
        color: #000;
    }
}
@media (max-width: 768px) {
    .review-card{
        height: 360px;
    }
    .reviews-section {
        padding: 50px 0px;
    }
    .reviews-section h2 {
        font-size: 28px;
    }
    .reviews-section p {
        font-size: 15px;
    }
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .service-content {
        flex-direction: column;
        text-align: center;
    }
    .client-logo-grid {
        justify-content: center;
    }
}