/* Mobile-First Responsive Design */

/* Small devices (landscape phones, 576px and up) */
@media (max-width: 575px) {
    /* hero for homepage */
    .hero-section {
        padding: 1rem 1rem 4rem;
        min-height: 600px;
    }

    .navbar {
        margin: 0 !important;
        padding: 0.5rem 1rem !important;
    }

    .navbar-brand .logo {
        width: 80px;
    }

    .user-icon {
        width: 35px;
        height: 35px;
    }

    .hero-content {
        margin-top: 1.5rem;
        margin-bottom: 0;
        flex-direction: column;
        gap: 1rem;
        padding: 0 1rem;
    }

    .hero-decoration {
        width: 40px;
        height: 40px;
        order: -1;
    }

    .hero-text {
        order: 0;
    }

    .hero-text p {
        font-size: 0.9rem;
        margin-bottom: 1rem;
    }

    .hero-text h1 {
        font-size: 1.75rem !important;
        line-height: 1.9rem !important;
        margin-bottom: 0;
    }


    /* hero section for other pages */
    .product-label {
        letter-spacing: 5px;
    }
    .hero-overlay-others {
        padding: 20px 0px 40px 0px;
    }


    /* common styling */
    .content-section {
        padding: 2rem 0;
    }

    .content-section .container {
        padding: 1rem;
    }

    .content-section h2 {
        font-size: 2rem !important;
        line-height: 2.2rem !important;
        margin-bottom: 2rem !important;
    }

    .content-section p.fs-5 {
        font-size: 1rem !important;
        line-height: 1.6 !important;
    }

    .content-image {
        margin-top: 2rem;
    }


    /* footer */
    .footer-overlay {
        padding: 2rem 0 1rem;
    }

    .footer-overlay .container {
        padding: 0 1rem;
    }

    .footer-logo {
        width: 120px;
    }

    .footer-overlay p,
    .footer-overlay address {
        font-size: 0.85rem !important;
        line-height: 1.4 !important;
    }

    .newsletter-input {
        margin-top: 2rem;
        font-size: 0.9rem;
    }

    .newsletter-btn {
        padding: 1rem;
        font-size: 0.9rem;
    }

    .support-section,
    .newsletter-section {
        max-width: 100%;
        width: 100%;
    }

    .support-section h3,
    .newsletter-section h3 {
        font-size: 1.1rem !important;
    }

    .social-link {
        width: 35px;
        height: 35px;
    }


    /* subscription page */
    .pricing-title {
        font-size: 1.875rem;
    }

    .card-price {
        font-size: 2.25rem;
    }


    /* about us page */
    .contact-section h2,
    .form-section h2 {
        font-size: 1.75rem !important;
    }

    .social-icons {
        flex-wrap: wrap;
    }

    .map-section .ratio {
        min-height: 250px;
    }


    /* contact us page */
    .contact-title {
        font-size: 1.25rem;
    }

    .contact-text {
        font-size: 1.125rem;
    }

    /* welcome page */
    .mobile-image {
        max-width: 250px;
    }

    .mobile-container {
        margin-bottom: 95px;
    }

    .farmapp-video {
        bottom: -32%;
        left: -10%;
        width: 120%;
    }

}


@media (max-width: 768px) {
    /* home page */
    .hero-section {
        padding: 20px 0px 100px 0px;
        min-height: 400px;
    }

    /* hero section for other pages */
    .product-label {
        margin-left: 1.5rem;
        letter-spacing: 10px;
        text-align: left;
        align-self: flex-start;
    }

    .hero-title {
        margin-left: 1.5rem !important;
        font-size: 36px;
        letter-spacing: 10px;
    }

    .hero-text-content {
        margin-top: 40px;
    }

    .hero-overlay-others {
        padding: 20px 0px 100px 0px;
        min-height: 400px;
    }
    .hero-content-others {
        min-height: 400px;
    }


    /* product page */
    .product-grid-section {
        margin-top: 40px;
        padding: 0 20px;
    }

    .product-grid {
        flex-direction: column;
        gap: 20px;
    }

    .product-column {
        width: 100%;
    }

    .product-card {
        margin-top: 20px;
    }

    .add-to-cart-btn {
        padding: 6px 11px;
        min-height: 38px;
    }


    /* subscription page */
    .pricing-title {
        font-size: 2.25rem;
        line-height: 1.35;
        margin-bottom: 1.5rem;
    }

    .pricing-section {
        padding: 2.5rem 0 4.5rem 0;
    }

    .pricing-card {
        padding: 2rem;
        margin-top: 2rem;
    }


    /* About us page */
    .contact-section {
        padding: 1.25rem !important;
        padding-bottom: 6rem !important;
    }

    .form-section {
        padding: 6rem 1.25rem !important;
    }

    .images-section img {
        margin: 0 2.5rem !important;
    }

    .mt-32 {
        margin-top: 2.5rem;
    }

    .ml-80 {
        margin-left: 0.625rem;
    }

    .map-section .ratio {
        min-height: 300px;
    }


    /* contact us page */
    .contact-us-label {
        margin-left: 0.625rem;
        letter-spacing: 8px;
        font-size: 0.875rem;
    }

    .contact-info-section {
        margin-top: 2.5rem;
        margin-bottom: 2.5rem;
    }

    .contact-header,
    .support-header {
        width: 100%;
        max-width: 306px;
    }

}


/* Medium devices (tablets, 768px and up) */
@media (min-width: 576px) and (max-width: 767px) {
    .navbar-brand .logo {
        width: 100px;
    }

    .user-icon {
        width: 45px;
        height: 45px;
    }

    .hero-content {
        margin-top: 2rem;
        margin-bottom: 0.5rem;
        flex-direction: column;
        gap: 1.5rem;
        padding: 0 1rem;
    }

    .hero-decoration {
        width: 50px;
        height: 50px;
    }

    .hero-text h1 {
        font-size: 2.2rem;
        line-height: 2.4rem;
    }

    .content-section {
        padding: 3rem 0;
    }

    .content-section h2 {
        font-size: 2.8rem !important;
        line-height: 3rem !important;
    }

    .content-image {
        margin-top: 2rem;
    }

    .footer-overlay {
        padding: 2.5rem 0 1rem;
    }

    .newsletter-input {
        margin-top: 2.5rem;
    }

    .newsletter-btn {
        padding: 1.25rem;
    }

    /* Welcome page */
    .mobile-container {
        text-align: center;
        margin-bottom: 95px;
    }

    .farmapp-video {
        top: 71%;
        left: -25%;
        width: 150%;
    }

}

/* Large devices (desktops, 992px and up) */
@media (min-width: 768px) and (max-width: 991px) {
    .hero-content {
        margin-top: 3rem;
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
    }

    .hero-text h1 {
        font-size: 2.8rem;
        line-height: 3rem;
    }

    .content-section {
        padding: 4rem 0;
    }

    .footer-overlay {
        padding: 3rem 0 1rem;
    }

    /* Welcome page */
    .mobile-container {
        text-align: center;
        margin-bottom: 95px;
    }

    .farmapp-video {
        top: 72%;
        left: -25%;
        width: 150%;
    }

}

/* Extra large devices (large desktops, 1200px and up) */
@media (min-width: 992px) {
    .hero-content {
        margin-top: 8rem;
    }
}

/* Navbar Specific Styles */
.custom-navbar {
    transition: all 0.3s ease;
}

.navbar-toggler {
    padding: 0.25rem 0.5rem;
    font-size: 1rem;
    border: none !important;
    box-shadow: none !important;
}

.navbar-toggler:focus {
    box-shadow: none;
    outline: none;
}

.navbar-toggler-icon {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='rgba%2833, 37, 41, 0.75%29' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e");
    width: 1.5em;
    height: 1.5em;
}

/* Desktop navbar styles */
@media (min-width: 992px) {
    .navbar-nav {
        gap: 1rem;
    }

    .nav-link {
        font-size: 1.125rem;
        font-weight: 700;
        transition: color 0.2s ease;
    }

    .nav-link:hover {
        color: var(--amber-500) !important;
    }

    .navbar-login {
        align-items: center;
    }

    .login-btn {
        min-width: auto;
    }


    /* about us page */
    .contact-section {
        display: flex;
        justify-content: end;
    }

}

@media (min-width: 992px) and (max-width: 1250px) {
        .nav-link {
            font-size: 0.8rem !important;
        }
        .px-lg-3 {
            padding-right: 0.4rem !important;
            padding-left: 0.4rem !important;
        }
}

@media (min-width: 1251px) and (max-width: 1461px) {
    .nav-link {
        font-size: 1rem !important;
    }
    .px-lg-3 {
        padding-right: 0.4rem !important;
        padding-left: 0.4rem !important;
    }
}





/* Mobile navbar styles */
@media (max-width: 991px) {
    .custom-navbar {
        border-radius: 1rem !important;
        margin: 0 0.5rem;
    }

    .navbar-collapse {
        margin-top: 1rem;
        padding: 1.5rem 1rem 1rem;
        background: rgba(255, 255, 255, 0.98);
        border-radius: 1rem;
        box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.1);
        border-top: 1px solid rgba(0, 0, 0, 0.1);
    }

    .navbar-nav {
        width: 100%;
    }

    .navbar-nav .nav-item {
        width: 100%;
        border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    }

    .navbar-nav .nav-item:last-child {
        border-bottom: none;
    }

    .navbar-nav .nav-link {
        padding: 0.75rem 0 !important;
        font-size: 1.1rem;
        font-weight: 600;
        color: var(--neutral-900) !important;
        width: 100%;
        text-align: left;
        transition: all 0.2s ease;
    }

    .navbar-nav .nav-link:hover {
        color: var(--amber-500) !important;
        padding-left: 0.5rem !important;
    }

    .navbar-nav .nav-link.text-warning {
        color: var(--amber-500) !important;
    }

    .navbar-login {
        width: 100%;
        padding-top: 1rem;
        border-top: 1px solid rgba(0, 0, 0, 0.1);
        align-items: stretch !important;
    }

    .login-btn {
        width: 100%;
        padding: 0.75rem 1rem !important;
        font-size: 1rem;
        font-weight: 600;
        min-height: 48px;
        border-radius: 0.5rem !important;
    }

    .logo {
        width: 90px !important;
    }

    .user-icon {
        display: none !important;
    }

}

/* Tablet specific adjustments */
@media (min-width: 768px) and (max-width: 991px) {
    .custom-navbar {
        margin: 0 1rem;
    }

    .navbar-collapse {
        padding: 2rem 1.5rem 1.5rem;
    }

    .navbar-nav .nav-link {
        font-size: 1.2rem;
        padding: 1rem 0 !important;
    }

    .login-btn {
        font-size: 1.1rem;
        padding: 1rem !important;
    }

    .logo {
        width: 100px !important;
    }

}

/* Small mobile devices */
@media (max-width: 575.98px) {
    .custom-navbar {
        margin: 0 0.25rem;
        border-radius: 0.75rem !important;
    }

    .navbar-collapse {
        padding: 1rem 0.75rem 0.75rem;
        border-radius: 0.75rem;
    }

    .navbar-nav .nav-link {
        font-size: 1rem;
        padding: 0.6rem 0 !important;
    }

    .login-btn {
        font-size: 0.95rem;
        padding: 0.7rem 1rem !important;
        min-height: 44px;
    }

    .logo {
        width: 75px !important;
    }

    .navbar-toggler {
        padding: 0.2rem 0.4rem;
    }

    .navbar-toggler-icon {
        width: 1.2em;
        height: 1.2em;
    }
}

/* Very small devices */
@media (max-width: 320px) {
    .custom-navbar {
        margin: 0;
        border-radius: 0.5rem !important;
    }

    .navbar-collapse {
        padding: 0.75rem 0.5rem 0.5rem;
    }

    .navbar-nav .nav-link {
        font-size: 0.95rem;
        padding: 0.5rem 0 !important;
    }

    .login-btn {
        font-size: 0.9rem;
        padding: 0.6rem 0.8rem !important;
    }

    .logo {
        width: 65px !important;
    }
}

/* Animation for mobile menu */
@media (max-width: 991.98px) {
    .navbar-collapse.collapsing {
        transition: height 0.35s ease;
    }

    .navbar-collapse.show {
        animation: slideDown 0.35s ease;
    }

    @keyframes slideDown {
        from {
            opacity: 0;
            transform: translateY(-10px);
        }
        to {
            opacity: 1;
            transform: translateY(0);
        }
    }
}

/* Text readability improvements */
@media (max-width: 767.98px) {
    .tracking-wider {
        letter-spacing: 0.025em;
    }

    .text-uppercase {
        font-size: 0.85em;
    }

    /* Ensure minimum touch target size */
    .nav-link,
    .btn {
        min-height: 44px;
        min-width: 44px;
        display: flex;
        align-items: center;
        justify-content: center;
    }

    .social-link {
        min-height: 35px;
        min-width: 35px;
        display: flex;
        align-items: center;
        justify-content: center;
    }

    .nav-link {
        justify-content: flex-start;
        padding-left: 0;
    }
}

/* Fix for very small screens */
@media (max-width: 320px) {
    .hero-text h1 {
        font-size: 1.5rem !important;
        line-height: 1.7rem !important;
    }

    .content-section h2 {
        font-size: 1.75rem !important;
        line-height: 2rem !important;
    }

    .navbar-brand .logo {
        width: 70px;
    }

    .user-icon {
        width: 30px;
        height: 30px;
    }

    .btn-dark {
        padding: 0.4rem 0.8rem !important;
        font-size: 0.8rem !important;
    }
}


@media (min-width: 1441px) and (max-width: 1734px) {
    .haccp_solution_section {
        padding-bottom: 1rem !important;
    }
}

@media (min-width: 1735px) {
    .haccp_solution_section {
        padding-bottom: 9rem !important;
    }
}

