/* ==========================================================================
   UNIFIED MARKET RESEARCH - RESPONSIVE STYLESHEET
   Supports Desktop (> 1200px), Tablet (768px - 1199px), Mobile (< 768px)
   ========================================================================== */

/* ==========================================================================
   1. GLOBAL CONTAINER & BASE RESPONSIVE RULES
   ========================================================================== */
@media (max-width: 1200px) {
    .container {
        width: 94%;
    }

    .umr-header nav ul {
        gap: 35px;
    }

    .mega-menu {
        width: 900px;
    }
}

/* ==========================================================================
   2. MOBILE TOGGLE BUTTON & NAVIGATION DRAWER (Screen width <= 991px)
   ========================================================================== */
.mobile-toggle {
    display: none;
    flex-direction: column;
    justify-content: space-between;
    width: 30px;
    height: 22px;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0;
    z-index: 10000;
}

.mobile-toggle span {
    width: 100%;
    height: 3px;
    background-color: #111827;
    border-radius: 3px;
    transition: all 0.3s ease-in-out;
}

.mobile-toggle.active span:nth-child(1) {
    transform: translateY(9px) rotate(45deg);
}

.mobile-toggle.active span:nth-child(2) {
    opacity: 0;
}

.mobile-toggle.active span:nth-child(3) {
    transform: translateY(-10px) rotate(-45deg);
}

body.mobile-menu-open {
    overflow: hidden;
}

@media (max-width: 991px) {
    /* Header layout adjustments */
    .mobile-toggle {
        display: flex;
    }

    .nav-inner {
        display: flex;
        justify-content: space-between;
        align-items: center;
        height: 100%;
    }

    .main-nav {
        height: 80px;
    }

    /* Mobile Nav Drawer */
    .umr-header nav {
        position: fixed;
        top: 80px;
        left: 0;
        right: 0;
        bottom: 0;
        width: 100%;
        height: calc(100vh - 80px);
        background: #ffffff;
        z-index: 9998;
        display: none;
        flex-direction: column;
        justify-content: flex-start;
        overflow-y: auto;
        padding: 20px 0 40px;
        box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
    }

    .umr-header nav.active {
        display: flex;
    }

    .umr-header nav ul {
        flex-direction: column;
        gap: 0;
        width: 100%;
    }

    .umr-header nav li {
        width: 100%;
        border-bottom: 1px solid #f1f5f9;
    }

    .umr-header nav a {
        padding: 16px 24px;
        font-size: 18px;
        font-weight: 600;
        display: flex;
        justify-content: space-between;
        align-items: center;
        border-radius: 0;
    }

    .umr-header nav a::after {
        display: none;
    }

    /* Add dropdown indicator arrows on mobile */
    .mega-parent > a::after,
    .resources-parent > a::after {
        content: "›";
        display: inline-block !important;
        position: static !important;
        transform: rotate(90deg) !important;
        width: auto !important;
        height: auto !important;
        background: none !important;
        font-size: 20px !important;
        line-height: 1 !important;
        color: #64748b;
        transition: transform 0.3s ease;
    }

    .mega-parent.mobile-active > a::after,
    .resources-parent.mobile-active > a::after {
        transform: rotate(-90deg) !important;
        color: #2563eb;
    }

    /* Mobile Mega Menu */
    .mega-parent {
        padding-bottom: 0;
    }

    .mega-menu {
        position: static;
        width: 100%;
        transform: none;
        box-shadow: none;
        border-radius: 0;
        display: none;
        grid-template-columns: 1fr;
        background: #f8fafc;
        border-top: 1px solid #e2e8f0;
        max-height: none;
    }

    .mega-parent:hover .mega-menu {
        display: none; /* Controlled by mobile-active on mobile */
    }

    .mega-parent.mobile-active .mega-menu {
        display: grid;
    }

    .mega-left {
        max-height: 250px;
        border-right: none;
        border-bottom: 1px solid #e2e8f0;
    }

    .mega-right {
        padding: 20px;
    }

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

    /* Mobile Resources Dropdown */
    .resources-parent {
        padding-bottom: 0;
    }

    .resources-menu {
        position: static;
        width: 100%;
        transform: none;
        box-shadow: none;
        border-radius: 0;
        display: none;
        background: #f8fafc;
        border-top: 1px solid #e2e8f0;
        padding: 10px 15px;
    }

    .resources-parent:hover .resources-menu {
        display: none;
    }

    .resources-parent.mobile-active .resources-menu {
        display: block;
    }

    .resources-menu a {
        padding: 12px 15px;
    }
}

/* Top bar mobile responsiveness */
@media (max-width: 768px) {
    .top-bar {
        height: auto;
        padding: 10px 0;
    }

    .top-links {
        gap: 20px;
    }

    .top-links a {
        font-size: 13px;
        padding: 4px 0;
    }

    .logo-name span:first-child,
    .logo-name span:last-child {
        font-size: 22px;
    }

    .logo-icon {
        width: 38px;
        height: 38px;
        margin-right: 12px;
    }

    .logo-square {
        width: 26px;
        height: 26px;
    }

    .logo-square.small {
        width: 13px;
        height: 13px;
    }
}

@media (max-width: 480px) {
    .logo-name span:first-child,
    .logo-name span:last-child {
        font-size: 18px;
    }

    .logo-icon {
        width: 32px;
        height: 32px;
        margin-right: 8px;
    }

    .logo-square {
        width: 22px;
        height: 22px;
    }

    .logo-square.small {
        width: 11px;
        height: 11px;
    }

    .top-links {
        gap: 14px;
    }

    .top-links a {
        font-size: 12px;
    }
}


/* ==========================================================================
   3. HERO SECTION RESPONSIVE
   ========================================================================== */
@media (max-width: 991px) {
    .hero-section {
        min-height: auto;
        padding: 80px 0;
    }

    .hero-content {
        max-width: 100%;
    }

    .hero-content h1 {
        font-size: 46px;
        margin-bottom: 20px;
    }

    .hero-content p {
        font-size: 18px;
        line-height: 1.6;
        margin-bottom: 25px;
    }

    .hero-stats {
        gap: 35px;
    }

    .hero-stat h3 {
        font-size: 34px;
    }
}

@media (max-width: 576px) {
    .hero-section {
        padding: 50px 0 60px;
    }

    .hero-content h1 {
        font-size: 30px;
        line-height: 1.2;
    }

    .hero-content p {
        font-size: 15px;
    }

    .hero-btn {
        width: 100%;
        justify-content: center;
        padding: 14px 24px;
        box-sizing: border-box;
    }

    .hero-stats {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
        margin-top: 35px;
    }

    .hero-stat h3 {
        font-size: 28px;
        margin-bottom: 4px;
    }

    .hero-stat span {
        font-size: 12px;
    }
}


/* ==========================================================================
   4. SEARCH SECTION RESPONSIVE
   ========================================================================== */
@media (max-width: 768px) {
    .search-section {
        padding: 40px 0;
    }

    .search-title,
    .search-box h2,
    .search-container h2 {
        font-size: 24px;
    }
}

@media (max-width: 576px) {
    .search-input-wrapper,
    .search-form {
        flex-direction: column;
        gap: 12px;
    }

    .search-input-wrapper input,
    .search-form input[type="text"] {
        width: 100%;
        box-sizing: border-box;
    }

    .search-input-wrapper button,
    .search-form button {
        width: 100%;
        justify-content: center;
    }
}


/* ==========================================================================
   5. CORE HOMEPAGE SECTIONS RESPONSIVE (Industries, Featured, Why Us, CTA)
   ========================================================================== */
@media (max-width: 991px) {
    .industries-grid,
    .featured-grid,
    .why-us-grid,
    .insights-grid {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 24px !important;
    }

    .section-title,
    .section-header h2 {
        font-size: 32px !important;
    }
}

@media (max-width: 576px) {
    .industries-grid,
    .featured-grid,
    .why-us-grid,
    .insights-grid {
        grid-template-columns: 1fr !important;
        gap: 18px !important;
    }

    .section-title,
    .section-header h2 {
        font-size: 24px !important;
    }

    .cta-content h2,
    .cta-section h2 {
        font-size: 26px !important;
    }

    .cta-btn,
    .cta-actions a {
        width: 100%;
        text-align: center;
        justify-content: center;
        box-sizing: border-box;
    }
}


/* ==========================================================================
   6. COMPANY VIDEO SECTION RESPONSIVE
   ========================================================================== */
@media (max-width: 991px) {
    .company-video-wrapper,
    .company-video-container {
        padding: 40px 0;
    }
}

@media (max-width: 576px) {
    .video-modal-content {
        width: 94%;
        padding: 10px;
    }
}


/* ==========================================================================
   7. SINGLE REPORT PAGE RESPONSIVE
   ========================================================================== */
@media (max-width: 991px) {
    .single-report-page {
        padding: 20px 0 60px;
    }

    .report-hero {
        padding: 25px 20px 40px;
        margin-bottom: 40px;
    }

    .report-hero-grid {
        grid-template-columns: 1fr;
        gap: 30px;
    }

    .report-cover {
        margin: 0 auto;
        max-width: 280px;
    }

    .report-info h1 {
        font-size: 32px;
        line-height: 1.2;
    }

    .report-short-description {
        font-size: 16px;
        line-height: 1.6;
    }

    .report-details-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }

    .report-tabs {
        justify-content: flex-start;
        overflow-x: auto;
        white-space: nowrap;
        gap: 25px;
        padding-bottom: 12px;
        -webkit-overflow-scrolling: touch;
    }

    .report-tabs::-webkit-scrollbar {
        height: 3px;
    }

    .report-tabs::-webkit-scrollbar-thumb {
        background: #cbd5e1;
        border-radius: 10px;
    }

    .report-content {
        font-size: 16px;
        line-height: 1.7;
    }
}

@media (max-width: 576px) {
    .report-breadcrumb {
        font-size: 13px;
        margin-left: 0;
    }

    .report-cover {
        margin-left: auto;
    }

    .report-info h1 {
        font-size: 24px;
    }

    .report-details-grid {
        grid-template-columns: 1fr;
    }

    .report-actions {
        flex-direction: column;
        width: 100%;
    }

    .sample-btn,
    .custom-btn,
    .buy-report-btn {
        width: 100%;
        min-width: auto;
    }

    .preview-lock {
        padding: 30px 15px;
        margin: 40px auto;
    }
}


/* ==========================================================================
   8. ABOUT, CONSULTING, CONTACT & INNER PAGES RESPONSIVE
   ========================================================================== */
@media (max-width: 991px) {
    /* About page */
    .about-hero,
    .about-section,
    .about-grid {
        grid-template-columns: 1fr !important;
        gap: 30px !important;
    }

    .about-hero h1 {
        font-size: 36px !important;
    }

    /* Contact page */
    .contact-hero,
    .contact-grid {
        grid-template-columns: 1fr !important;
        gap: 40px !important;
    }

    /* Consulting page */
    .consulting-hero h1 {
        font-size: 36px !important;
    }

    .consulting-grid,
    .services-grid {
        grid-template-columns: 1fr !important;
    }
}

@media (max-width: 576px) {
    .about-hero h1,
    .consulting-hero h1,
    .page-title {
        font-size: 28px !important;
    }

    .contact-form input,
    .contact-form textarea,
    .contact-form select {
        width: 100% !important;
        box-sizing: border-box;
    }

    .contact-form button,
    .contact-submit {
        width: 100% !important;
    }
}


/* ==========================================================================
   9. ARCHIVE & DIRECTORY PAGES RESPONSIVE
   ========================================================================== */
@media (max-width: 991px) {
    .reports-archive-layout,
    .archive-layout,
    .industry-archive-grid {
        grid-template-columns: 1fr !important;
        gap: 30px !important;
    }

    .filter-sidebar {
        width: 100% !important;
    }
}

@media (max-width: 576px) {
    .reports-grid,
    .blogs-grid,
    .insights-archive-grid {
        grid-template-columns: 1fr !important;
    }
}


/* ==========================================================================
   10. LICENSE POPUP MODAL RESPONSIVE
   ========================================================================== */
@media (max-width: 768px) {
    .license-modal-content,
    .license-popup-inner {
        width: 92% !important;
        max-width: 500px !important;
        max-height: 90vh !important;
        overflow-y: auto !important;
        padding: 25px 20px !important;
    }

    .license-options {
        grid-template-columns: 1fr !important;
        gap: 15px !important;
    }

    .license-popup-actions button,
    .license-popup-actions a {
        width: 100% !important;
        box-sizing: border-box;
    }
}
