/* 
 * RadientIQ - Minimalistic Design (Aesthetic Green Theme)
 * Responsive Stylesheet
 */

/* Tablet - Medium Devices */
@media screen and (max-width: 992px) {
    /* Typography */
    h1 { font-size: 2.4rem; } /* Adjusted for new base sizes */
    h2 { font-size: 2rem; }
    h3 { font-size: 1.5rem; }
    
    /* Header */
    .header-content {
        position: relative;
    }
    
    .nav-toggle {
        display: block;
        margin-left: auto;
        cursor: pointer;
    }
    
    .main-nav {
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background-color: white; 
        box-shadow: var(--shadow-md);
        padding: 1rem 0;
        display: none;
        flex-direction: column;
        align-items: flex-start;
        z-index: 1000;
        border-top: 1px solid var(--border-color); /* Add separator */
    }
    
    .main-nav.active {
        display: flex;
    }
    
    .nav-list {
        flex-direction: column;
        width: 100%;
    }
    
    .nav-item {
        margin: 0;
        width: 100%;
        border-bottom: 1px solid var(--border-color);
    }
     .nav-item:last-child {
        border-bottom: none;
    }
    
    .nav-item a {
        padding: 0.8rem 1.5rem; /* Adjusted padding */
        justify-content: space-between;
    }
    .nav-item a.active {
        border-bottom: none; /* Remove bottom border for active item in mobile nav */
        background-color: var(--light-bg-color); /* Highlight active item */
    }
    
    .dropdown-menu {
        position: static;
        transform: none;
        box-shadow: none;
        min-width: auto;
        display: none;
        flex-direction: column;
        padding: 0;
        opacity: 1;
        visibility: visible;
        border: none;
        background-color: #f0fdf4; /* Slightly different shade for mobile dropdown */
        margin-top: 0;
    }
    
    .dropdown-menu.active {
        display: flex;
    }
    
    .dropdown-column {
        padding: 0.8rem 1.5rem; /* Adjusted padding */
        border-bottom: 1px solid var(--border-color);
    }
     .dropdown-column h4 {
        padding-bottom: 0.5rem;
        margin-bottom: 0.8rem;
    }
    
    .dropdown-column:last-child {
        border-bottom: none;
    }
    
    .header-actions {
        margin-left: auto; /* Keep toggle and search aligned */
    }
    
    .header-actions .btn {
        display: none; /* Hide button in header on tablet */
    }
    
    /* Hero Section */
    .hero .container {
        flex-direction: column-reverse; /* Image first for visual appeal on mobile */
    }
    
    .hero-content, .hero-image {
        flex: none;
        width: 100%;
        padding-right: 0;
        text-align: center;
    }
    .hero-image {
        margin-bottom: var(--space-xl);
    }
    
    .hero-buttons {
        justify-content: center;
    }
    
    /* Grid Layouts */
    .slider-container, /* Featured reports */
    .testimonial-slider .slider-container, /* Testimonials */
    .industries-grid,
    .services-grid,
    .blog-grid,
    .features-grid {
        grid-template-columns: repeat(2, 1fr); /* Two columns for tablet */
    }
    
    /* Footer */
    .footer-top {
        grid-template-columns: repeat(2, 1fr); /* Two columns for footer links */
    }
    
    .footer-column:first-child { /* Logo and social */
        grid-column: span 2; /* Full width */
        text-align: center;
        margin-bottom: var(--space-lg);
    }
    .footer-column:first-child .social-icons {
        justify-content: center;
    }

    .footer-bottom {
        flex-direction: column;
        gap: var(--space-md); /* Reduced gap */
        padding-top: var(--space-md);
    }
    
    .footer-links {
        flex-wrap: wrap;
        justify-content: center;
        gap: var(--space-md);
    }
}

/* Mobile - Small Devices */
@media screen and (max-width: 768px) {
    /* Typography */
    h1 { font-size: 2rem; }
    h2 { font-size: 1.8rem; }
    h3 { font-size: 1.4rem; }
    
    .section-header p {
        font-size: 1.1rem;
    }
    
    /* Container */
    .container {
        padding: 0 var(--space-md);
    }
    
    /* Sections */
    section {
        padding: var(--space-xl) 0;
    }
    
    /* Search */
    .search-input {
        flex-direction: column;
    }
    
    .search-input input {
        border-radius: var(--border-radius-md);
        margin-bottom: var(--space-md); /* More space */
    }
    
    .search-input button {
        border-radius: var(--border-radius-md);
        width: 100%; /* Full width button */
    }
    .search-tags a {
        margin-bottom: var(--space-xs); /* Ensure tags wrap nicely */
    }
    
    /* All Grid Layouts to Single Column */
    .slider-container, 
    .testimonial-slider .slider-container,
    .industries-grid,
    .services-grid,
    .blog-grid,
    .features-grid,
    .reports-grid /* From reports.css */ {
        grid-template-columns: 1fr; /* Stack cards on mobile */
        gap: var(--space-lg); /* Consistent gap */
    }
    
    .report-card { 
        flex: 0 0 100%;
    }
    
    /* CTA Section */
    .cta-buttons {
        flex-direction: column;
        gap: var(--space-md);
    }
    .cta-buttons .btn {
        width: 100%;
        max-width: 300px; /* Max width for CTA buttons on mobile */
        margin-left: auto;
        margin-right: auto;
    }
    
    /* Footer */
    .footer-top {
        grid-template-columns: 1fr; /* Single column for all footer items */
        gap: var(--space-lg);
        text-align: center; /* Center align footer content */
    }
    .footer-column h4::after {
        margin-left: auto;
        margin-right: auto;
    }
    .footer-column:first-child {
        grid-column: span 1; /* Reset span */
    }
    
    .newsletter-form .form-group {
        flex-direction: column;
    }
    
    .newsletter-form input[type="email"] {
        border-radius: var(--border-radius-md);
        margin-bottom: var(--space-md); /* More space */
    }
    
    .newsletter-form button {
        border-radius: var(--border-radius-md);
        width: 100%;
    }
    .form-consent {
        justify-content: flex-start; /* Align left on mobile */
        text-align: left;
    }
    
    /* Back to top button */
    .back-to-top {
        right: 15px; /* Adjust position */
        bottom: 15px;
        width: 40px;
        height: 40px;
    }
    .back-to-top i {
        font-size: 1rem;
    }
}

/* Extra Small Devices */
@media screen and (max-width: 576px) {
    /* Typography */
    h1 { font-size: 1.8rem; }
    h2 { font-size: 1.6rem; }
    h3 { font-size: 1.3rem; }
    
    .section-header h2 { font-size: 2rem; }
    .section-header p { font-size: 1rem; }

    .hero h1 { font-size: 2.2rem; }
    .hero p { font-size: 1.1rem; }

    /* Header */
    .logo a {
        font-size: 1.4rem;
    }
    
    .search-icon {
        margin-right: var(--space-md);
    }
    
    /* Dropdown Menu */
    .dropdown-menu {
        left: 0;
        transform: none;
        min-width: 100%; /* Full width for dropdown on smallest screens */
    }
    
    /* Testimonial */
    .testimonial-content {
        padding: var(--space-lg);
    }
    
    .testimonial-content p {
        font-size: 1rem;
    }
    
    .author-image {
        width: 50px;
        height: 50px;
    }
    
    .author-details h4 {
        font-size: 1rem;
    }
    
    .author-details p {
        font-size: 0.85rem;
    }
    
    /* Footer */
    .footer-links {
        flex-direction: column;
        gap: var(--space-sm);
        text-align: center;
    }
    .footer-bottom {
        text-align: center;
    }
}

/* Landscape Orientation Fixes */
@media screen and (max-height: 500px) and (orientation: landscape) {
    .hero {
        padding: var(--space-lg) 0;
    }
    
    .hero-content h1 {
        font-size: 2rem; /* Adjust for landscape */
    }
    .hero p {
        font-size: 1.1rem;
        margin-bottom: var(--space-lg);
    }
    
    .dropdown-menu {
        max-height: 75vh; /* Slightly less for landscape */
        overflow-y: auto;
    }
}