@media screen and (min-width: 769px) {
    footer>div:not(:last-child):not(.copyright) {
        position: relative;
    }

    footer>div:not(:last-child):not(.copyright)::after {
        content: '';
        position: absolute;
        right: -25px;
        top: 0;
        bottom: 0;
        width: 1px;
        background: #333;
    }

    .hero {
        min-height: 100vh;
        padding-top: 80px;
    }
}

/* Ensure header doesn't cause horizontal overflow */
header {
    overflow-x: hidden;
    overflow-y: visible;
    /* Allow dropdown to show below */
}

nav {
    position: relative;
}

/* Tablets and smaller devices */
@media screen and (max-width: 1024px) {
    nav {
        padding: 0 30px;
    }

    .hero {
        min-height: 100vh;
        padding-top: 80px;
    }

    .hero-content {
        padding: 150px 50px;
    }

    .hero-content h1 {
        font-size: 40px;
    }

    .our_services,
    .why-choose-us,
    .reviews,
    .our-location {
        padding: 60px 40px;
    }

    footer {
        padding: 50px 40px 30px;
        grid-template-columns: 1fr 1fr;
        gap: 30px;
    }

    .google-map {
        grid-template-columns: 1fr;
    }

    .map {
        height: 400px;
    }
}

/* Mobile devices */
@media screen and (max-width: 768px) {

    /* Header Navigation */
    nav {
        padding: 0 20px;
        height: 70px;
        position: relative;
    }

    .logo1 img {
        height: 65px;
    }

    /* Hide logo2 on mobile */
    .logo2 {
        display: none;
    }

    /* Hide regular menu items on mobile */
    .pages {
        display: none;
    }

    /* Show menu icon */
    .menu-icon {
        display: block;
        margin-left: auto;
    }

    /* Dropdown Menu Container - sits below fixed header */
    .nav-bar.active::after {
        content: '';
        display: block;
        position: fixed;
        top: 70px;
        left: 0;
        width: 100%;
        height: auto;
        background-color: #1a1a1a;
        z-index: 999;
        box-shadow: 0px 8px 16px rgba(0, 0, 0, 0.3);
    }

    /* Show dropdown menu items when active */
    .nav-bar.active .pages {
        display: block !important;
        position: fixed;
        left: 0 !important;
        right: 0 !important;
        width: 100vw !important;
        margin: 0 !important;
        padding: 0 !important;
        background-color: #1a1a1a;
        text-align: center;
        z-index: 1000;
        animation: slideDown 0.3s ease;
    }

    /* Position each menu item below the header with better spacing */
    .nav-bar.active .pages:nth-of-type(3) {
        top: 70px;
        left: 0 !important;
    }

    .nav-bar.active .pages:nth-of-type(4) {
        top: calc(70px + 65px);
        left: 0 !important;
    }

    .nav-bar.active .pages:nth-of-type(5) {
        top: calc(70px + 130px);
        left: 0 !important;
    }

    .nav-bar.active .pages:nth-of-type(6) {
        top: calc(70px + 195px);
        left: 0 !important;
    }

    /* Style the links inside menu items - more spacious */
    .nav-bar.active .pages a {
        display: block;
        padding: 22px 20px;
        font-size: 17px;
        font-weight: 500;
        letter-spacing: 1px;
        transition: all 0.3s ease;
        width: 100%;
        border-bottom: 1px solid #2a2a2a;
    }

    .nav-bar.active .pages:last-of-type:not(.menu-icon) a {
        border-bottom: none;
    }

    .nav-bar.active .pages a:hover {
        background-color: #2a2a2a;
        color: #ff6347;
        padding-left: 25px;
    }

    /* Hero Section */
    .hero {
        display: flex;
        align-items: center;
        justify-content: center;
        min-height: 100vh;
        padding-top: 70px;
        /* Account for fixed header */
        background-image: linear-gradient(rgba(190, 192, 212, 0.5), rgba(214, 212, 224, 0.5)), url(images/background.jpg);
        background-position: center;
        background-repeat: no-repeat;
        background-size: cover;
        position: relative;
    }

    .hero-content {
        padding: 120px 20px;
    }

    .hero-content h1 {
        font-size: 32px;
        margin-bottom: 15px;
    }

    .hero-content p {
        font-size: 16px;
        margin-bottom: 20px;
    }

    .hero-content a {
        display: block;
        margin: 10px auto;
        max-width: 200px;
    }

    /* Services Section */
    .our_services {
        padding: 50px 20px;
    }

    .our_services h1 {
        font-size: 28px;
        margin-bottom: 30px;
    }

    .services {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .service-item img {
        width: 100%;
        max-width: 270px;
        height: auto;
    }

    /* Why Choose Us Section */
    .why-choose-us {
        padding: 50px 20px;
    }

    .why-choose-us h1 {
        font-size: 28px;
        margin-bottom: 30px;
    }

    .choose-us {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    /* Reviews Section */
    .reviews {
        padding: 80px 20px 50px;
    }

    .reviews h1 {
        font-size: 28px;
        margin-bottom: 80px;
    }

    .review-list {
        grid-template-columns: 1fr;
        gap: 60px;
    }

    /* Location Section */
    .our-location {
        padding: 50px 20px;
    }

    .our-location h1 {
        font-size: 28px;
        margin-bottom: 30px;
    }

    .map {
        height: 300px;
    }

    .address {
        padding: 30px 20px;
    }

    .address h2 {
        font-size: 22px;
    }

    /* Footer */
    footer {
        padding: 40px 20px 20px;
        grid-template-columns: 1fr;
        gap: 25px;
        text-align: center;
    }

    footer>div {
        align-items: center;
        padding-bottom: 25px;
        border-bottom: 1px solid #333;
    }

    footer>div:last-of-type:not(.footer-bottom) {
        border-bottom: none;
    }

    footer>div:nth-last-of-type(2) {
        border-bottom: none;
    }

    .footer-bottom {
        border-bottom: none !important;
        padding-bottom: 0 !important;
    }

    .shop-details {
        align-items: center;
    }

    .Quick-Links {
        align-items: center;
    }

    .Quick-Links ul {
        text-align: center;
    }
}

/* Small mobile devices */
@media screen and (max-width: 480px) {
    nav {
        padding: 0 15px;
        height: 65px;
    }

    .logo1 img {
        height: 55px;
    }

    /* Ensure logo2 stays hidden */
    .logo2 {
        display: none;
    }

    .logo1 {
        margin-right: 10px;
    }

    .menu-icon {
        font-size: 20px;
    }

    /* Make dropdown even more full-width */
    .nav-bar.active .pages {
        margin-left: -15px;
        /* Counteract smaller nav padding */
    }

    .hero-content {
        padding: 100px 15px;
    }

    .hero-content h1 {
        font-size: 26px;
    }

    .hero-content p {
        font-size: 14px;
    }

    .our_services h1,
    .why-choose-us h1,
    .reviews h1,
    .our-location h1 {
        font-size: 24px;
    }

    .service-item,
    .reason {
        padding: 20px 15px;
    }

    .review-item {
        padding: 50px 20px 20px;
    }
}

/* Animation for dropdown */
@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Landscape orientation for mobile */
@media screen and (max-width: 768px) and (orientation: landscape) {
    .hero-content {
        padding: 80px 20px;
    }

    .hero-content h1 {
        font-size: 28px;
    }
}

/* contact page */

@media (max-width: 900px) {
    .contact-hero-content {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .contact-image img {
        height: 300px;
    }

    .contact-info a {
        display: block;
        width: 80%;
        margin: 10px auto;
    }
}

/* Services page */

@media (max-width: 1000px) {
    .services-section {
        grid-template-columns: 1fr;
        /* stack 1 column on smaller screens */
    }
}

@media (max-width: 700px) {
    .services-page>h1 {
        font-size: 36px;
        margin-bottom: 40px;
    }

    .service h2 {
        font-size: 22px;
    }

    .service h3 {
        font-size: 16px;
    }

    .service p {
        font-size: 14px;
    }

    .brands h2 {
        font-size: 24px;
        margin-bottom: 20px;
    }

    .brands h3 {
        font-size: 20px;
        margin-bottom: 20px;
    }

    .brand-logos {
        grid-template-columns: repeat(auto-fit, minmax(80px, 1fr));
        gap: 20px;
    }

    .brand-logos img {
        max-width: 80px;
        max-height: 50px;
    }
}