/*
=====================================================
  AGOID INTERIOR - Responsive Stylesheet
  
  File: responsive.css
  Description: This file contains all the @media queries for tablet and mobile devices.
  It should be linked after the main style.css file in the HTML.
=====================================================
*/

/*
--- BREAKPOINT KEY ---
- Large Devices (Desktops): > 1100px (Handled by style.css)
- Medium Devices (Tablets, iPads): <= 1100px
- Small Devices (Landscape Phones): <= 992px
- Extra Small Devices (Portrait Phones): <= 768px
- Tiny Devices: <= 576px / 480px
*/


/* ===================================================
   MEDIUM DEVICES (TABLETS, IPADS) - Max-width: 1100px
   =================================================== */
@media (max-width: 1100px) {
    /* --- Mobile Navigation Menu --- */
    .nav-menu {
        position: fixed;
        top: 0;
        right: -100%;
        width: 300px;
        max-width: 80%;
        height: 100vh;
        background: var(--dark-blue);
        flex-direction: column;
        justify-content: flex-start;
        align-items: flex-start;
        transition: right 0.4s ease-in-out;
        box-shadow: -5px 0 15px rgba(0,0,0,0.2);
        padding: 60px 0 20px;
        overflow-y: auto;
        margin-right: 0;
        z-index: 1002; /* Ensure it's above other content */
    }
    .nav-menu.active { 
        right: 0; 
    }
    
    .nav-item { 
        margin: 0; 
        width: 100%;
    }
    .nav-link { 
        font-size: 1.1rem; 
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding: 15px 25px;
        width: 100%;
    }
    .nav-link::after { 
        display: none; /* Remove underline animation on mobile */
    }

    .nav-toggle { 
        display: block; 
    }
    .nav-close { 
        display: block; 
        position: absolute;
        top: 15px; 
        right: 20px;
        font-size: 2rem;
        cursor: pointer;
    }

    /* Mobile Dropdown Styles */
    .dropdown-menu {
        position: static;
        opacity: 1;
        visibility: visible;
        transform: none;
        box-shadow: none;
        border: none;
        border-top: 1px solid var(--border-color);
        border-radius: 0;
        background: rgba(0,0,0,0.2);
        min-width: 100%;
        padding: 0;
        max-height: 0; /* Initially hidden */
        overflow: hidden;
        transition: max-height 0.4s ease-out;
    }
    
    .nav-item.has-dropdown.active > .dropdown-menu {
        max-height: 500px; /* Adjust as needed */
    }

    .nav-item.has-dropdown.active > .nav-link i {
        transform: rotate(180deg);
    }
    
    .dropdown-menu li a {
        padding-left: 40px;
        color: var(--secondary-text);
    }
    .dropdown-menu li a:hover {
        padding-left: 45px;
    }
    .mega-menu {
        flex-direction: column;
        min-width: 100%;
        padding: 10px 0;
    }
    .mega-menu-column {
        padding: 0 15px;
    }

    /* Hide desktop buttons and show mobile login/signup button */
    .nav-buttons {
        display: none;
    }
    
    .nav-item-mobile-buttons {
        display: block;
        width: 100%;
        padding: 20px 25px;
        margin-top: 20px;
        border-top: 1px solid var(--border-color);
    }
    .nav-item-mobile-buttons .btn {
        width: 100%;
        text-align: center;
    }
}


/* ===================================================
   SMALL DEVICES (LANDSCAPE PHONES) - Max-width: 992px
   =================================================== */
@media (max-width: 992px) {
    /* --- General Layout Adjustments --- */
    .about-grid, 
    .contact-grid {
        grid-template-columns: 1fr;
    }
    .about-image { 
        order: -1; /* Image comes first on mobile */
        margin-bottom: 30px; 
    }
    .contact-grid {
        gap: 60px;
    }

    /* --- Portfolio --- */
    .portfolio-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    /* --- Calculator Layout --- */
    .calculator-container {
        grid-template-columns: 1fr;
    }
    .calculator-form-section {
        padding-right: 0;
        border-right: none;
        padding-bottom: 40px;
        border-bottom: 1px solid var(--border-color);
    }

    /* --- Rate Chart Table --- */
    .rate-chart-content {
        padding: 15px;
    }
    #rate-table th, #rate-table td {
        padding: 12px 8px;
        font-size: 0.9rem;
    }
}


/* ===================================================
   EXTRA SMALL DEVICES (PORTRAIT PHONES) - Max-width: 768px
   =================================================== */
@media (max-width: 768px) {
    /* --- Typography and Sizing --- */
    .section-title h2 { 
        font-size: 2rem; 
    }
    .hero-content h1 { 
        font-size: 2.5rem; 
    }
    .hero-content p { 
        font-size: 0.95rem; 
    }
    
    /* --- Grids --- */
    .portfolio-grid,
    .packages-grid,
    .team-grid,
    .testimonial-grid { 
        grid-template-columns: 1fr; 
    }
    .testimonial-grid {
        grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    }
    .package-card.featured { 
        transform: scale(1); 
    }
    .package-card:hover, .package-card.featured:hover { 
        transform: scale(1.02); 
    }
    
    /* --- Forms --- */
    .form-group { 
        flex-direction: column; 
        gap: 20px; 
    }
    .form-group input { 
        width: 100%; 
    }

    /* --- Responsive Timeline --- */
    .process-timeline::after {
        left: 31px;
    }
    .process-step {
        width: 100%;
        padding-left: 70px;
        padding-right: 25px;
    }
    .process-step:nth-child(odd), .process-step:nth-child(even) {
        left: 0;
        text-align: left;
    }
    .process-step .step-number, 
    .process-step:nth-child(odd) .step-number, 
    .process-step:nth-child(even) .step-number {
        left: 6px;
    }

    /* --- Package Visualizer --- */
    .package-sliders {
        grid-template-columns: repeat(2, 1fr);
        gap: 25px;
    }
    .package-visualizer {
        padding: 20px;
    }

    /* --- Responsive Package Comparison Table --- */
    .comparison-table {
        min-width: 0;
    }
    .comparison-table thead {
        display: none;
    }
    .comparison-table,
    .comparison-table tbody,
    .comparison-table tr,
    .comparison-table td {
        display: block;
        width: 100%;
    }
    .comparison-table tr {
        margin-bottom: 20px;
        border: 1px solid var(--border-color);
        border-radius: 10px;
        overflow: hidden;
    }
    .comparison-table tr:last-child {
      margin-bottom: 0;
    }
    .comparison-table td {
        text-align: right;
        position: relative;
        padding-left: 50%;
        border-bottom: 1px solid var(--border-color);
    }
    .comparison-table td:last-child {
        border-bottom: none;
    }
    .comparison-table td:first-child {
        background-color: var(--card-bg);
        text-align: center;
        padding-left: 15px;
        font-size: 1.1rem;
    }
    .comparison-table td:first-child::before {
        content: "";
    }
    .comparison-table td::before {
        content: attr(data-label);
        position: absolute;
        left: 15px;
        width: calc(50% - 30px);
        padding-right: 10px;
        font-weight: 600;
        color: var(--primary-text);
        text-align: left;
    }
}


/* ===================================================
   TINY DEVICES - Max-width: 576px & 480px
   =================================================== */
@media (max-width: 576px) {
    /* --- Calculator Area Input --- */
    .area-input-wrapper {
        flex-direction: column;
    }
    .area-toggle {
        width: 100%;
    }
    .area-btn {
        flex: 1;
    }
    
    /* --- Proposal Modal --- */
    .proposal-actions {
        flex-direction: column;
    }
}

@media (max-width: 480px) {
    /* --- Video Testimonial Grid --- */
    .testimonial-grid {
        grid-template-columns: 1fr;
    }

    /* --- Package Visualizer --- */
    .package-controls {
        gap: 10px;
    }
    .package-btn {
        padding: 8px 20px;
        font-size: 0.9rem;
    }
    .package-sliders {
        grid-template-columns: 1fr;
    }
}

/*
=====================================================
  End of Responsive Stylesheet
=====================================================
*/


/* responsive.css (Append at the end for dashboard responsiveness) */

/* --- DASHBOARD RESPONSIVE FIXES --- */

/* For Tablets and below (e.g., iPad portrait) */
@media (max-width: 992px) {
    .dashboard-container {
        flex-direction: column; /* Stack sidebar and content vertically */
        gap: 25px;
    }

    .dashboard-sidebar {
        width: 100%;
        position: static; /* Remove sticky positioning on mobile */
        margin-bottom: 0;
    }

    .dashboard-content {
        width: 100%;
    }
}

/* For smaller mobile devices */
@media (max-width: 768px) {
    .dashboard-main {
        padding-top: 80px; /* Adjust for smaller header */
        padding-bottom: 30px;
    }

    .dashboard-container {
        padding: 0 15px;
    }

    .dashboard-content {
        padding: 20px; /* Reduce padding on smaller screens */
    }

    .content-section h2 {
        font-size: 1.6rem; /* Adjust heading size */
    }

    /* Improve chat experience on mobile */
    .chat-container {
        height: 70vh;
    }
}