/*
 * VNKIC Responsive Design System
 * Comprehensive responsive styles for all screen sizes
 */

/* ============================================
   BREAKPOINTS:
   - xs: < 576px (Mobile Small)
   - sm: 576px-767px (Mobile Large)
   - md: 768px-991px (Tablet)
   - lg: 992px-1199px (Laptop)
   - xl: 1200px+ (Desktop)
   ============================================ */

/* ============================================
   1. NAVIGATION - Mobile Hamburger Menu
   ============================================ */
@media (max-width: 991.98px) {
    .site-nav .menu-bg-wrap {
        padding: 10px 15px;
    }

    .site-menu {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: white;
        box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
        flex-direction: column;
        padding: 20px;
        border-radius: 0 0 16px 16px;
    }

    .site-menu.active {
        display: flex;
    }

    .site-menu>li {
        margin: 0;
        padding: 12px 0;
        border-bottom: 1px solid #f0f0f0;
    }

    .site-menu>li:last-child {
        border-bottom: none;
    }

    .site-menu>li>a {
        font-size: 16px;
        padding: 8px 0;
    }

    .site-menu .dropdown {
        position: static;
        box-shadow: none;
        border: none;
        padding: 10px 0 0 20px;
        opacity: 1;
        visibility: visible;
        transform: none;
    }

    /* Hamburger button */
    .mobile-menu-toggle {
        display: flex !important;
        flex-direction: column;
        gap: 5px;
        background: none;
        border: none;
        padding: 10px;
        cursor: pointer;
    }

    .mobile-menu-toggle span {
        width: 25px;
        height: 3px;
        background: var(--vnk-primary, #1a365d);
        border-radius: 3px;
        transition: all 0.3s ease;
    }
}

@media (min-width: 992px) {
    .mobile-menu-toggle {
        display: none !important;
    }
}

/* ============================================
   2. HERO SECTION
   ============================================ */
@media (max-width: 991.98px) {
    .hero {
        min-height: 80vh;
        padding: 100px 0 60px;
    }

    .hero h1 {
        font-size: 2rem !important;
        line-height: 1.3;
    }

    .hero p {
        font-size: 1rem;
    }

    .hero .search-form {
        flex-direction: column;
    }

    .hero .search-form .form-control,
    .hero .search-form .form-select {
        width: 100% !important;
        margin-bottom: 10px;
    }

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

@media (max-width: 575.98px) {
    .hero {
        min-height: 70vh;
        padding: 80px 0 40px;
    }

    .hero h1 {
        font-size: 1.6rem !important;
    }

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

/* ============================================
   3. PROPERTY CARDS GRID
   ============================================ */
@media (max-width: 991.98px) {
    .property-item {
        margin-bottom: 20px;
    }

    .property-content {
        padding: 15px;
    }

    .property-content .price {
        font-size: 1.25rem;
    }
}

@media (max-width: 575.98px) {
    .property-content .specs {
        flex-wrap: wrap;
        gap: 10px;
    }
}

/* ============================================
   4. ESTATE DETAILS PAGE
   ============================================ */
@media (max-width: 991.98px) {
    .estate-details .row {
        flex-direction: column;
    }

    .estate-details .sidebar,
    .estate-details aside {
        width: 100%;
        margin-top: 30px;
    }

    .estate-gallery {
        height: 300px;
    }

    .estate-specs {
        flex-wrap: wrap;
    }

    .estate-specs>div {
        width: 50%;
        margin-bottom: 15px;
    }
}

@media (max-width: 575.98px) {
    .estate-gallery {
        height: 200px;
    }

    .estate-specs>div {
        width: 100%;
    }

    .estate-title {
        font-size: 1.4rem;
    }

    .estate-price {
        font-size: 1.5rem;
    }
}

/* ============================================
   5. CHAT / MESSAGES PAGES
   ============================================ */
@media (max-width: 991.98px) {

    .messages-page,
    .chat-container-admin {
        flex-direction: column;
        height: auto;
    }

    .conversations-panel,
    .conversations-sidebar {
        width: 100%;
        max-height: 250px;
        border-right: none;
        border-bottom: 1px solid #e9ecef;
    }

    .chat-panel,
    .chat-main {
        width: 100%;
        min-height: 400px;
    }

    .chat-active,
    .chat-active-panel {
        height: auto;
        min-height: 350px;
    }

    .chat-messages,
    .chat-messages-area {
        max-height: 250px;
    }
}

@media (max-width: 575.98px) {

    .conversations-panel,
    .conversations-sidebar {
        max-height: 200px;
    }

    .conversation-item {
        padding: 10px;
    }

    .conv-avatar {
        width: 40px !important;
        height: 40px !important;
    }

    .chat-input-area {
        padding: 10px;
    }

    .chat-input-area input {
        font-size: 14px;
        padding: 10px 15px;
    }

    .chat-input-area button {
        width: 40px !important;
        height: 40px !important;
    }
}

/* ============================================
   6. BLOG PAGES
   ============================================ */
@media (max-width: 991.98px) {
    .blog-list .row>div {
        margin-bottom: 20px;
    }

    .blog-details .sidebar,
    .blog-details aside {
        margin-top: 30px;
    }
}

@media (max-width: 575.98px) {
    .blog-card-title {
        font-size: 1.1rem;
    }

    .blog-content {
        font-size: 0.95rem;
    }
}

/* ============================================
   7. FORMS (Sign-in, Sign-up, Contact)
   ============================================ */
@media (max-width: 767.98px) {

    .auth-form,
    .login-form,
    .register-form {
        padding: 30px 20px;
        margin: 20px;
    }

    .form-row {
        flex-direction: column;
    }

    .form-row>.col,
    .form-row>[class*="col-"] {
        width: 100%;
        margin-bottom: 15px;
    }
}

@media (max-width: 575.98px) {

    .auth-form h2,
    .form-title {
        font-size: 1.5rem;
    }

    .form-control {
        padding: 12px 15px;
        font-size: 14px;
    }

    .btn-submit,
    .auth-form .btn-primary {
        padding: 12px 20px;
        font-size: 14px;
    }
}

/* ============================================
   8. DASHBOARD SIDEBAR (Admin/Employee)
   ============================================ */
@media (max-width: 991.98px) {
    .sidebar {
        position: fixed;
        left: -280px;
        top: 0;
        height: 100vh;
        z-index: 9999;
        transition: left 0.3s ease;
    }

    .sidebar.show {
        left: 0;
    }

    .sidebar-overlay {
        display: none;
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: rgba(0, 0, 0, 0.5);
        z-index: 9998;
    }

    .sidebar.show+.sidebar-overlay {
        display: block;
    }

    .content {
        margin-left: 0 !important;
        width: 100% !important;
    }

    .dashboard-header .navbar {
        padding-left: 15px;
    }
}

/* ============================================
   9. TABLES (Dashboard)
   ============================================ */
@media (max-width: 767.98px) {
    .table-responsive {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    .table {
        min-width: 600px;
    }

    .table th,
    .table td {
        padding: 10px 8px;
        font-size: 13px;
    }

    /* Card view for some tables */
    .table-card-mobile tbody tr {
        display: block;
        margin-bottom: 15px;
        background: white;
        border-radius: 10px;
        box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
        padding: 15px;
    }

    .table-card-mobile tbody td {
        display: flex;
        justify-content: space-between;
        padding: 8px 0;
        border: none;
        border-bottom: 1px solid #f0f0f0;
    }

    .table-card-mobile tbody td::before {
        content: attr(data-label);
        font-weight: 600;
        color: #666;
    }
}

/* ============================================
   10. FOOTER
   ============================================ */
@media (max-width: 991.98px) {
    .footer .row>div {
        margin-bottom: 30px;
    }

    .footer-links {
        columns: 2;
    }
}

@media (max-width: 575.98px) {
    .footer {
        padding: 40px 0 20px;
    }

    .footer-links {
        columns: 1;
    }

    .footer-social {
        justify-content: center;
        margin-top: 20px;
    }

    .footer-bottom {
        flex-direction: column;
        text-align: center;
        gap: 10px;
    }
}

/* ============================================
   11. GENERAL UTILITY RESPONSIVE
   ============================================ */
@media (max-width: 767.98px) {
    .section-padding {
        padding: 40px 0;
    }

    .section-title {
        font-size: 1.6rem;
    }

    h1 {
        font-size: 1.8rem;
    }

    h2 {
        font-size: 1.5rem;
    }

    h3 {
        font-size: 1.25rem;
    }

    h4 {
        font-size: 1.1rem;
    }

    .container {
        padding-left: 15px;
        padding-right: 15px;
    }

    /* Hide on mobile */
    .hide-mobile {
        display: none !important;
    }

    /* Show only on mobile */
    .show-mobile {
        display: block !important;
    }
}

@media (min-width: 768px) {
    .show-mobile {
        display: none !important;
    }
}

/* ============================================
   12. COUNTER / STATS SECTION
   ============================================ */
@media (max-width: 767.98px) {
    .counter-wrap {
        padding: 20px 10px;
    }

    .counter-wrap .countup {
        font-size: 2rem;
    }

    .counter-wrap .caption {
        font-size: 0.9rem;
    }
}

/* ============================================
   13. TEAM / AGENTS GRID
   ============================================ */
@media (max-width: 767.98px) {

    .team-grid .col-md-4,
    .team-grid .col-lg-3 {
        flex: 0 0 50%;
        max-width: 50%;
    }
}

@media (max-width: 575.98px) {

    .team-grid .col-md-4,
    .team-grid .col-lg-3 {
        flex: 0 0 100%;
        max-width: 100%;
    }
}

/* ============================================
   14. MODALS
   ============================================ */
@media (max-width: 575.98px) {
    .modal-dialog {
        margin: 10px;
        max-width: calc(100% - 20px);
    }

    .modal-content {
        border-radius: 12px;
    }

    .modal-header,
    .modal-body,
    .modal-footer {
        padding: 15px;
    }

    .user-search-modal-box,
    .delete-modal-box {
        width: 95%;
        max-width: 95vw;
        margin: 10px;
    }
}

/* ============================================
   15. BUTTONS
   ============================================ */
@media (max-width: 575.98px) {
    .btn {
        padding: 10px 20px;
        font-size: 14px;
    }

    .btn-lg {
        padding: 12px 25px;
        font-size: 15px;
    }

    .btn-group {
        flex-direction: column;
        gap: 10px;
    }

    .btn-group .btn {
        width: 100%;
    }
}

/* ============================================
   16. CUSTOMER PROFILE PAGE
   ============================================ */
@media (max-width: 767.98px) {
    .profile-card {
        padding: 20px;
    }

    .profile-avatar {
        width: 100px;
        height: 100px;
    }

    .profile-tabs {
        flex-direction: column;
    }

    .profile-tabs .nav-link {
        width: 100%;
        text-align: left;
    }
}

/* ============================================
   17. WISHLIST PAGE
   ============================================ */
@media (max-width: 767.98px) {
    .wishlist-item {
        flex-direction: column;
    }

    .wishlist-item .wishlist-image {
        width: 100%;
        height: 200px;
    }

    .wishlist-item .wishlist-info {
        padding: 15px;
    }
}

/* ============================================
   18. ABOUT US PAGE
   ============================================ */
@media (max-width: 991.98px) {
    .about-image {
        margin-bottom: 30px;
    }

    .about-content {
        text-align: center;
    }
}

/* ============================================
   19. CONTACT PAGE
   ============================================ */
@media (max-width: 991.98px) {
    .contact-info {
        margin-bottom: 30px;
    }

    .contact-map {
        height: 300px;
    }
}

@media (max-width: 575.98px) {
    .contact-map {
        height: 200px;
    }
}

/* ============================================
   20. LIST ESTATE / SEARCH RESULTS
   ============================================ */
@media (max-width: 991.98px) {
    .filter-sidebar {
        position: fixed;
        left: -100%;
        top: 0;
        height: 100vh;
        width: 300px;
        background: white;
        z-index: 9999;
        transition: left 0.3s ease;
        overflow-y: auto;
        padding: 20px;
    }

    .filter-sidebar.show {
        left: 0;
    }

    .filter-toggle-btn {
        display: flex !important;
    }

    .estate-list-main {
        width: 100%;
    }
}

@media (min-width: 992px) {
    .filter-toggle-btn {
        display: none !important;
    }
}

/* ============================================
   21. PAGINATION
   ============================================ */
@media (max-width: 575.98px) {
    .pagination {
        flex-wrap: wrap;
        justify-content: center;
        gap: 5px;
    }

    .pagination .page-link {
        padding: 8px 12px;
        font-size: 13px;
    }

    .pagination .page-item:first-child .page-link,
    .pagination .page-item:last-child .page-link {
        padding: 8px 10px;
    }
}

/* ============================================
   22. PROJECT ESTATE PAGE
   ============================================ */
@media (max-width: 767.98px) {
    .project-banner {
        height: 200px;
    }

    .project-info {
        padding: 20px;
    }

    .project-stats {
        flex-wrap: wrap;
    }

    .project-stat-item {
        width: 50%;
        margin-bottom: 15px;
    }
}

/* ============================================
   23. CHAT WIDGET (Floating)
   ============================================ */
@media (max-width: 575.98px) {
    .chat-container {
        width: 100% !important;
        height: 100vh !important;
        bottom: 0 !important;
        right: 0 !important;
        border-radius: 0 !important;
    }

    .chat-trigger {
        width: 50px !important;
        height: 50px !important;
        bottom: 15px !important;
        right: 15px !important;
    }
}