/* =========================================================
   SKY MABATI & BUILDING MATERIALS
   RESPONSIVE STYLE SHEET
   Desktop → Tablet → Mobile
   ========================================================= */


/* =========================================================
   1. LARGE TABLETS / SMALL LAPTOPS
   ========================================================= */

@media (max-width: 1100px) {

    .container {
        width: min(
            calc(100% - 32px),
            var(--container-width)
        );
    }


    /* Navigation */

    .nav-link {
        padding: 0 12px;
        font-size: 0.74rem;
    }


    .nav-quote-button {
        padding: 0 15px;
        margin-left: 4px;
    }


    /* Hero */

    .hero-slider {
        height: 600px;
        min-height: 520px;
    }


    .hero-content h1,
    .hero-content h2 {
        font-size: clamp(2.5rem, 5vw, 4rem);
    }


    /* Products */

    .product-grid {
        grid-template-columns: repeat(2, 1fr);
    }


    /* Benefits */

    .benefits-grid {
        grid-template-columns: repeat(2, 1fr);
    }


    /* Footer */

    .footer-grid {
        grid-template-columns: 1.3fr 1fr 1fr 1fr;
        gap: 28px;
    }

}


/* =========================================================
   2. TABLETS
   ========================================================= */

@media (max-width: 900px) {

    /* General */

    .section-padding {
        padding-top: 70px;
        padding-bottom: 70px;
    }


    /* -----------------------------------------------------
       HEADER
       ----------------------------------------------------- */

    .site-header {
        position: relative;
        z-index: 1000;
    }


    .header-inner {
        position: relative;
    }


    .brand-logo {
        max-width: 220px;
    }


    .mobile-menu-toggle {
        display: flex;
        align-items: center;
        justify-content: center;

        flex-shrink: 0;

        cursor: pointer;

        position: relative;

        z-index: 1002;
    }


    /* -----------------------------------------------------
       MOBILE NAVIGATION
       ----------------------------------------------------- */

    .main-nav {
        position: absolute;

        top: 100%;
        left: 0;
        right: 0;

        display: flex;

        flex-direction: column;
        align-items: stretch;
        justify-content: flex-start;

        width: 100%;

        max-height: 0;

        overflow: hidden;

        background-color: var(--sky-blue-dark);

        box-shadow: var(--shadow-medium);

        opacity: 0;

        visibility: hidden;

        pointer-events: none;

        z-index: 1001;

        transition:
            max-height 0.35s ease,
            opacity 0.25s ease,
            visibility 0.25s ease;
    }


    /* -----------------------------------------------------
       OPEN MOBILE NAVIGATION
       ----------------------------------------------------- */

    .main-nav.mobile-open {

        max-height: 700px;

        opacity: 1;

        visibility: visible;

        pointer-events: auto;

    }


    /* -----------------------------------------------------
       MOBILE NAVIGATION LINKS
       ----------------------------------------------------- */

    .main-nav a {

        display: flex;

        align-items: center;

        justify-content: flex-start;

        width: 100%;

        min-height: 52px;

        padding: 0 22px;

        border-bottom:
            1px solid rgba(255, 255, 255, 0.08);

        text-decoration: none;
    }


    /* Remove desktop underline */

    .main-nav a::after {
        display: none;
    }


    /* Active page */

    .main-nav a.active {

        color: var(--white);

        background-color:
            rgba(215, 25, 32, 0.18);

        border-left:
            4px solid var(--sky-red);

    }


    /* -----------------------------------------------------
       GET A QUOTE BUTTON
       ----------------------------------------------------- */

    .main-nav .nav-cta,
    .main-nav .nav-quote-button {

        width: calc(100% - 40px);

        min-height: 48px;

        margin: 12px 20px 18px;

        justify-content: center;

        border-bottom: none;

    }


    /* -----------------------------------------------------
       HERO
       ----------------------------------------------------- */

    .hero-slider {
        height: 570px;
        min-height: 500px;
    }


    .hero-overlay {
        background:
            linear-gradient(
                90deg,
                rgba(5, 20, 52, 0.9) 0%,
                rgba(8, 38, 95, 0.68) 55%,
                rgba(8, 38, 95, 0.3) 100%
            );
    }


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


    .hero-content h1,
    .hero-content h2 {
        max-width: 620px;
        font-size: clamp(2.4rem, 6vw, 4rem);
    }


    .hero-content p {
        max-width: 560px;
        font-size: 0.98rem;
    }


    .hero-control {
        width: 43px;
        height: 43px;
        font-size: 1.7rem;
    }


    .hero-prev {
        left: 15px;
    }


    .hero-next {
        right: 15px;
    }


    /* -----------------------------------------------------
       CATEGORIES
       ----------------------------------------------------- */

    .category-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
    }


    .category-image {
        height: 230px;
    }


    /* -----------------------------------------------------
       REJECTED MABATI
       ----------------------------------------------------- */

    .rejected-content {
        grid-template-columns: 1fr;
        gap: 35px;
    }


    .rejected-text {
        max-width: 700px;
    }


    /* -----------------------------------------------------
       CALCULATOR
       ----------------------------------------------------- */

    .calculator-cta {
        padding: 45px;
    }


    /* -----------------------------------------------------
       PROJECTS
       ----------------------------------------------------- */

    .project-grid {
        grid-template-columns: repeat(2, 1fr);
    }


    .project-item {
        height: 250px;
    }


    /* -----------------------------------------------------
       FOOTER
       ----------------------------------------------------- */

    .footer-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 40px 30px;
    }


    .footer-bottom {
        flex-direction: column;
        align-items: flex-start;
    }

}


/* =========================================================
   3. LARGE PHONES
   ========================================================= */

@media (max-width: 650px) {

    /* -----------------------------------------------------
       GENERAL
       ----------------------------------------------------- */

    html {
        font-size: 15px;
    }


    .container {
        width: calc(100% - 28px);
    }


    .section-padding {
        padding-top: 58px;
        padding-bottom: 58px;
    }


    .section-heading {
        margin-bottom: 35px;
    }


    .section-heading h2 {
        font-size: 1.9rem;
    }


    .section-heading p {
        font-size: 0.88rem;
    }


    /* -----------------------------------------------------
       BRAND
       ----------------------------------------------------- */

    .brand-logo {
        max-width: 190px;
    }


    /* -----------------------------------------------------
       HERO
       ----------------------------------------------------- */

    .hero-slider {
        height: 620px;
        min-height: 560px;
    }


    .hero-slide-image img {
        object-position: center;
    }


    .hero-overlay {
        background:
            linear-gradient(
                180deg,
                rgba(5, 20, 52, 0.45) 0%,
                rgba(5, 20, 52, 0.78) 45%,
                rgba(5, 20, 52, 0.96) 100%
            );
    }


    .hero-content {

        display: flex;

        flex-direction: column;

        justify-content: flex-end;

        min-height: 100%;

        padding-top: 80px;

        padding-bottom: 80px;

    }


    .hero-label {

        align-self: flex-start;

        margin-bottom: 14px;

        font-size: 0.63rem;

        letter-spacing: 1px;

    }


    .hero-content h1,
    .hero-content h2 {

        margin-bottom: 15px;

        font-size:
            clamp(2rem, 10vw, 3rem);

        line-height: 1.08;

    }


    .hero-content p {

        margin-bottom: 22px;

        font-size: 0.9rem;

        line-height: 1.6;

    }


    .hero-buttons {

        align-items: stretch;

        flex-direction: column;

        width: 100%;

    }


    .hero-buttons .btn {
        width: 100%;
    }


    .hero-control {

        top: 48%;

        width: 38px;

        height: 38px;

        font-size: 1.5rem;

    }


    .hero-prev {
        left: 10px;
    }


    .hero-next {
        right: 10px;
    }


    .hero-indicators {
        bottom: 20px;
    }


    /* -----------------------------------------------------
       CATEGORIES
       ----------------------------------------------------- */

    .category-grid {
        grid-template-columns: 1fr;
        gap: 18px;
    }


    .category-image {
        height: 240px;
    }


    .category-content {
        padding: 20px;
    }


    .category-content p {
        min-height: auto;
    }


    /* -----------------------------------------------------
       REJECTED MABATI
       ----------------------------------------------------- */

    .rejected-section {
        padding-top: 60px;
        padding-bottom: 60px;
    }


    .rejected-content {
        gap: 28px;
    }


    .rejected-text h2 {
        font-size: 2rem;
    }


    .rejected-prices {
        grid-template-columns: 1fr;
        gap: 12px;
    }


    .rejected-price {
        min-height: 100px;
    }


    /* -----------------------------------------------------
       CALCULATOR
       ----------------------------------------------------- */

    .calculator-cta-section {
        padding: 55px 0;
    }


    .calculator-cta {

        flex-direction: column;

        align-items: flex-start;

        padding: 35px 24px;

        border-radius:
            var(--radius-medium);

    }


    .calculator-content h2 {
        font-size: 1.9rem;
    }


    .calculator-content p {
        font-size: 0.88rem;
    }


    .calculator-content .btn {
        width: 100%;
    }


    .calculator-icon {

        align-self: center;

        min-width: 105px;

        width: 105px;

        height: 105px;

        font-size: 2.8rem;

    }


    /* -----------------------------------------------------
       PRODUCTS
       ----------------------------------------------------- */

    .product-grid {
        grid-template-columns: 1fr;
        gap: 18px;
    }


    .product-image {
        height: 240px;
    }


    .product-content {
        padding: 20px;
    }


    .product-content p {
        min-height: auto;
    }


    .product-actions .btn {
        min-height: 44px;
    }


    /* -----------------------------------------------------
       BENEFITS
       ----------------------------------------------------- */

    .benefits-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }


    .benefit-card {
        padding: 27px 22px;
    }


    /* -----------------------------------------------------
       PROJECTS
       ----------------------------------------------------- */

    .project-grid {
        grid-template-columns: 1fr;
        gap: 14px;
    }


    .project-item {
        height: 250px;
    }


    /* -----------------------------------------------------
       FINAL CTA
       ----------------------------------------------------- */

    .final-cta-section {
        padding: 70px 0;
    }


    .final-cta-content h2 {
        font-size: 2rem;
    }


    .final-cta-content p {
        font-size: 0.9rem;
    }


    .cta-buttons {

        flex-direction: column;

        width: 100%;

    }


    .cta-buttons .btn {
        width: 100%;
    }


    /* -----------------------------------------------------
       FOOTER
       ----------------------------------------------------- */

    .site-footer {
        padding-top: 55px;
    }


    .footer-grid {

        grid-template-columns: 1fr;

        gap: 35px;

        padding-bottom: 40px;

    }


    .footer-brand img {
        width: 175px;
    }


    .footer-column h3 {
        margin-bottom: 14px;
    }


    .footer-bottom {

        gap: 6px;

        padding: 18px 0;

    }


    .footer-bottom p {
        font-size: 0.7rem;
    }


    /* -----------------------------------------------------
       WHATSAPP
       ----------------------------------------------------- */

    .floating-whatsapp {

        right: 15px;

        bottom: 15px;

        min-width: 52px;

        width: 52px;

        height: 52px;

        padding: 0;

        border-radius: 50%;

        font-size: 0;

        display: flex;

        align-items: center;

        justify-content: center;

    }


    /* IMPORTANT:
       Do NOT generate another icon here.
       The WhatsApp image itself is the icon.
    */

    .floating-whatsapp::before {
        content: none;
        display: none;
    }


    .floating-whatsapp img {

        width: 31px;

        height: 31px;

        object-fit: contain;

        display: block;

    }

}


/* =========================================================
   4. SMALL PHONES
   ========================================================= */

@media (max-width: 400px) {

    .container {
        width: calc(100% - 22px);
    }


    .brand-logo {
        max-width: 170px;
    }


    .mobile-menu-toggle {

        width: 42px;

        height: 42px;

        font-size: 1.5rem;

    }


    .hero-slider {

        height: 600px;

        min-height: 540px;

    }


    .hero-content {
        padding-bottom: 70px;
    }


    .hero-content h1,
    .hero-content h2 {
        font-size: 2rem;
    }


    .hero-content p {
        font-size: 0.84rem;
    }


    .hero-control {

        width: 34px;

        height: 34px;

        font-size: 1.3rem;

    }


    .hero-prev {
        left: 7px;
    }


    .hero-next {
        right: 7px;
    }


    .section-heading h2 {
        font-size: 1.7rem;
    }


    .category-image,
    .product-image {
        height: 215px;
    }


    .calculator-cta {
        padding: 28px 19px;
    }


    .calculator-content h2 {
        font-size: 1.7rem;
    }


    .rejected-text h2 {
        font-size: 1.8rem;
    }


    .final-cta-content h2 {
        font-size: 1.8rem;
    }


    /* WhatsApp on very small phones */

    .floating-whatsapp {

        width: 50px;

        height: 50px;

        min-width: 50px;

        right: 14px;

        bottom: 14px;

    }


    .floating-whatsapp img {

        width: 29px;

        height: 29px;

    }

}


/* =========================================================
   5. LANDSCAPE PHONES
   ========================================================= */

@media (max-height: 500px) and (orientation: landscape) {

    .hero-slider {

        height: 520px;

        min-height: 480px;

    }


    .hero-content {

        padding-top: 45px;

        padding-bottom: 55px;

    }


    .hero-content h1,
    .hero-content h2 {
        font-size: 2.2rem;
    }


    .hero-content p {
        margin-bottom: 15px;
    }


    .hero-buttons .btn {

        min-height: 42px;

        padding: 9px 18px;

    }

}