﻿/* Responsive Design Utilities */

/* Desktop First Approach */
@media (max-width: 1024px) {
    .container-main {
        padding: 0 30px;
    }
}

@media (max-width: 768px) {
    .container-main {
        padding: 0 20px;
    }
    
    .section-title {
        font-size: 2rem;
    }
    
    .section-subtitle {
        font-size: 1rem;
    }
    
    .btn-search {
        padding: 0.875rem 1.5rem;
        font-size: 1rem;
    }
    
    .form-input {
        padding: 0.875rem;
    }
}

@media (max-width: 480px) {
    .container-main {
        padding: 0 15px;
    }
    
    .section-title {
        font-size: 1.75rem;
    }
    
    .specialization-link {
        padding: 1.5rem 1rem;
    }
    
    .specialization-icon {
        width: 60px;
        height: 60px;
    }
}

/* Grid Utilities */
.grid-auto-fit {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.grid-two-cols {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

@media (max-width: 768px) {
    .grid-two-cols {
        grid-template-columns: 1fr;
    }
    
    .grid-auto-fit {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
}

/* === MOBILE HERO FIX === */
@media (max-width: 768px) {
    .hero-section {
        min-height: 100svh;
        align-items: flex-start;
        padding-top: 2rem;
    }

    .hero-content {
        padding: 2rem 0 3rem;
        max-width: 100%;
    }

    .hero-title {
        font-size: 1.75rem !important;
        line-height: 1.25;
        margin-bottom: 1rem;
    }

    .hero-subtitle {
        font-size: 0.95rem !important;
        margin-bottom: 1.5rem;
    }

    .search-form-container {
        width: 100% !important;
        max-width: 100% !important;
        margin: 0 !important;
        padding: 0 !important;
    }

    .search-form {
        gap: 0.75rem;
    }

    .form-input {
        font-size: 1rem;
        padding: 0.9rem 1rem;
        width: 100%;
    }

    .btn-search {
        width: 100%;
        justify-content: center;
        padding: 1rem;
        font-size: 1rem;
    }
}

/* === NAVBAR MOBILE FIX === */
@media (max-width: 991.98px) {
    .header-nav {
        display: flex !important;
        flex-direction: row !important;
        align-items: center !important;
        justify-content: space-between !important;
        flex-wrap: nowrap !important;
        padding: 0.5rem 1rem !important;
        min-height: 60px !important;
    }

    .navbar-header {
        display: flex !important;
        align-items: center !important;
        min-height: unset !important;
        padding-bottom: 0 !important;
        flex: 1;
    }

    .header-navbar-rht {
        display: flex !important;
        align-items: center !important;
        margin: 0 !important;
        padding: 0 !important;
        flex-shrink: 0;
    }

    .header-login {
        white-space: nowrap;
        padding: 0.4rem 0.75rem !important;
        font-size: 0.8rem !important;
    }
}

/* === NAVBAR DUAL BUTTON FIX === */
/* Hide injected mobile button on desktop */
.navbar-header .header-login {
    display: none;
}

/* Show it only on mobile, hide the original */
@media (max-width: 991.98px) {
    .navbar-header .header-login {
        display: inline-block !important;
    }
    .header-navbar-rht {
        display: none !important;
    }
}

/* === HIDE ORIGINAL RHT ON MOBILE === */
@media (max-width: 991.98px) {
    ul.header-navbar-rht {
        display: none !important;
    }
    .navbar-header {
        width: 100% !important;
        overflow: hidden !important;
    }
    .navbar-header .header-login {
        max-width: 45% !important;
        overflow: hidden !important;
        text-overflow: ellipsis !important;
        font-size: 0.75rem !important;
        padding: 0.4rem 0.6rem !important;
        margin-left: auto !important;
    }
}

/* === HIDE INJECTED BUTTON ON DESKTOP === */
@media (min-width: 992px) {
    .navbar-header .header-login {
        display: none !important;
    }
}

/* === NAVBAR SPACING POLISH === */
@media (max-width: 991.98px) {
    .navbar-header {
        padding: 0 1rem !important;
        gap: 0 !important;
    }

    .navbar-brand.logo img {
        height: 28px !important;
    }

    .navbar-header .header-login {
        font-size: 0.8rem !important;
        padding: 0.45rem 0.85rem !important;
        border-radius: 20px !important;
        white-space: nowrap !important;
        flex-shrink: 0 !important;
        margin-left: auto !important;
    }

    #mobile_btn {
        margin-right: 0.6rem !important;
        flex-shrink: 0 !important;
    }
}
