/**
 * Mobile Responsive Styles
 * Comprehensive mobile support for BizPlan AI theme
 */

/* ============================================
   MOBILE HEADER & NAVIGATION
   ============================================ */

@media (max-width: 991.98px) {
    /* Mobile menu button */
    .mobile-menu-btn {
        display: block !important;
        position: relative;
        z-index: 1003;
    }
    
    /* Main navigation mobile styles */
    .main-navigation {
        display: none;
        position: fixed;
        top: 70px;
        left: 0;
        width: 100%;
        height: calc(100vh - 70px);
        background: white;
        z-index: 999;
        padding: 20px;
        box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
        overflow-y: auto;
        margin: 0;
    }
    
    .main-navigation.active {
        display: block !important;
    }
    
    .main-navigation .nav-menu {
        display: flex !important;
        flex-direction: column !important;
        align-items: stretch !important;
        margin: 0;
        padding: 0;
        list-style: none;
        justify-content: flex-start;
    }
    
    .main-navigation .nav-menu li {
        margin: 0 !important;
        border-bottom: 1px solid #e2e8f0;
        width: 100%;
    }
    
    .main-navigation .nav-menu li:last-child {
        border-bottom: none;
    }
    
    .main-navigation .nav-menu li a {
        display: block !important;
        padding: 20px 0 !important;
        font-size: 18px !important;
        font-weight: 500;
        color: #333;
        text-decoration: none;
        width: 100%;
        border: none;
        position: relative;
    }
    
    .main-navigation .nav-menu li a:hover {
        color: #667eea;
        background-color: rgba(49, 130, 206, 0.05);
    }
    
    .main-navigation .nav-menu li a::after {
        display: none !important;
    }
    
    /* Logo container mobile */
    .logo-container {
        max-width: 150px;
    }
    
    .header-container {
        padding: 10px 15px;
        min-height: 70px;
    }
    
    header {
        min-height: 70px;
    }
    
    /* Header actions mobile */
    .header-actions {
        gap: 10px;
    }
    
    .header-btn {
        padding: 6px 12px !important;
        font-size: 13px !important;
    }
}

@media (max-width: 768px) {
    .main-navigation {
        top: 60px;
        height: calc(100vh - 60px);
    }
    
    .header-container {
        min-height: 60px;
        padding: 10px 15px;
    }
    
    header {
        min-height: 60px;
    }
    
    .logo-container {
        max-width: 120px;
    }
    
    .logo-container .logo img {
        max-height: 40px;
    }
    
    .header-actions {
        gap: 8px;
    }
    
    .header-btn {
        padding: 5px 10px !important;
        font-size: 12px !important;
    }
}

/* ============================================
   MOBILE BLOG PAGE STYLES
   ============================================ */

@media (max-width: 991.98px) {
    /* Blog page container */
    .blog-section-page {
        margin-top: 0;
        padding: 2rem 0 4rem;
    }
    
    .page-container {
        padding: 0 1.5rem;
    }
    
    /* Blog hero section */
    .blog-section-hero {
        padding: 3rem 0 5rem;
    }
    
    .blog-section-hero-inner {
        padding: 0 1.5rem;
    }
    
    .blog-section-hero h1 {
        font-size: 2.2rem;
    }
    
    .blog-section-hero p {
        font-size: 1rem;
    }
    
    .hero-stats-strip {
        gap: 1.5rem;
        flex-wrap: wrap;
    }
    
    .hstat-num {
        font-size: 1.5rem;
    }
    
    .hstat-label {
        font-size: 0.7rem;
    }
    
    /* Section header */
    .section-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
        margin-bottom: 2rem;
    }
    
    .section-header h2 {
        font-size: 1.5rem;
    }
    
    .section-header p {
        font-size: 0.9rem;
    }
    
    /* Category tabs */
    .category-tabs {
        gap: 0.5rem;
    }
    
    .cat-tab {
        padding: 0.5rem 1rem;
        font-size: 0.85rem;
    }
    
    /* Featured post */
    .post-featured-big {
        grid-template-columns: 1fr;
        min-height: auto;
        margin-bottom: 1.5rem;
    }
    
    .pfb-content {
        padding: 1.5rem;
    }
    
    .pfb-content h2 {
        font-size: 1.4rem;
    }
    
    .pfb-excerpt {
        font-size: 0.95rem;
    }
    
    .pfb-meta {
        font-size: 0.8rem;
        gap: 1rem;
    }
    
    .pfb-read-btn {
        padding: 0.7rem 1.5rem;
        font-size: 0.9rem;
    }
    
    /* Posts row */
    .posts-row-2 {
        grid-template-columns: 1fr;
        gap: 1rem;
        margin-bottom: 1.5rem;
    }
    
    .post-card-h {
        flex-direction: column;
    }
    
    .pch-image {
        width: 100%;
        height: 180px;
    }
    
    .pch-body {
        padding: 1rem;
    }
    
    .pch-title {
        font-size: 1rem;
    }
    
    .pch-excerpt {
        font-size: 0.85rem;
    }
    
    /* Posts list strip */
    .posts-list-strip {
        border-radius: 20px;
    }
    
    .strip-header {
        padding: 1rem 1.5rem;
    }
    
    .strip-header h3 {
        font-size: 0.95rem;
    }
    
    .post-list-item {
        padding: 1rem 1.5rem;
        gap: 0.8rem;
    }
    
    .pli-num {
        width: 32px;
        height: 32px;
        font-size: 0.85rem;
    }
    
    .pli-thumb,
    .pli-thumb-placeholder {
        width: 52px;
        height: 46px;
    }
    
    .pli-title {
        font-size: 0.95rem;
    }
    
    .pli-meta {
        font-size: 0.75rem;
        gap: 0.8rem;
    }
    
    .read-time-pill {
        font-size: 0.7rem;
        padding: 0.2rem 0.6rem;
    }
    
    /* Newsletter banner */
    .newsletter-banner {
        padding: 2rem 1.5rem;
        flex-direction: column;
        text-align: center;
        gap: 1.5rem;
    }
    
    .nb-content h3 {
        font-size: 1.4rem;
    }
    
    .nb-content p {
        font-size: 0.95rem;
    }
    
    .nb-form .input-wrap {
        min-width: 100%;
    }
    
    .nb-form input {
        font-size: 0.95rem;
        padding: 0.7rem 1rem;
    }
    
    .nb-form button {
        padding: 0.7rem 1.5rem;
        font-size: 0.9rem;
    }
}

@media (max-width: 768px) {
    .blog-section-hero h1 {
        font-size: 1.8rem;
    }
    
    .blog-section-hero p {
        font-size: 0.95rem;
    }
    
    .pfb-content {
        padding: 1.2rem;
    }
    
    .pfb-content h2 {
        font-size: 1.2rem;
    }
    
    .pfb-excerpt {
        font-size: 0.9rem;
    }
    
    .pch-image {
        height: 160px;
    }
    
    .pch-body {
        padding: 0.9rem;
    }
    
    .pch-title {
        font-size: 0.95rem;
    }
    
    .post-list-item {
        padding: 0.9rem 1.2rem;
    }
    
    .pli-num {
        width: 30px;
        height: 30px;
        font-size: 0.8rem;
    }
    
    .pli-thumb,
    .pli-thumb-placeholder {
        width: 48px;
        height: 42px;
    }
    
    .newsletter-banner {
        padding: 1.5rem 1rem;
    }
    
    .nb-content h3 {
        font-size: 1.2rem;
    }
    
    .nb-form input {
        padding: 0.6rem 0.8rem;
    }
    
    .nb-form button {
        padding: 0.6rem 1.2rem;
        font-size: 0.85rem;
    }
}

@media (max-width: 480px) {
    .blog-section-hero h1 {
        font-size: 1.5rem;
    }
    
    .blog-section-hero p {
        font-size: 0.9rem;
    }
    
    .hero-stats-strip {
        gap: 1rem;
    }
    
    .hstat-num {
        font-size: 1.2rem;
    }
    
    .pfb-content {
        padding: 1rem;
    }
    
    .pfb-content h2 {
        font-size: 1.1rem;
    }
    
    .pfb-excerpt {
        font-size: 0.85rem;
    }
    
    .pfb-read-btn {
        padding: 0.6rem 1.2rem;
        font-size: 0.85rem;
    }
    
    .pch-image {
        height: 140px;
    }
    
    .pch-body {
        padding: 0.8rem;
    }
    
    .pch-title {
        font-size: 0.9rem;
    }
    
    .pch-excerpt {
        font-size: 0.8rem;
    }
    
    .post-list-item {
        padding: 0.8rem 1rem;
        gap: 0.6rem;
    }
    
    .pli-num {
        width: 28px;
        height: 28px;
        font-size: 0.75rem;
    }
    
    .pli-thumb,
    .pli-thumb-placeholder {
        width: 44px;
        height: 40px;
    }
    
    .pli-title {
        font-size: 0.85rem;
    }
    
    .newsletter-banner {
        padding: 1.2rem 0.8rem;
    }
    
    .nb-content h3 {
        font-size: 1.1rem;
    }
    
    .nb-content p {
        font-size: 0.85rem;
    }
}

/* ============================================
   MOBILE FOOTER STYLES
   ============================================ */

@media (max-width: 991.98px) {
    footer {
        padding: 50px 0 20px;
    }
    
    footer .footer-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 30px;
    }
    
    footer .footer-column h3 {
        font-size: 1.1rem;
    }
    
    footer .footer-links li {
        margin-bottom: 10px;
    }
    
    footer .copyright {
        font-size: 0.85rem;
        padding: 20px 15px;
    }
}

@media (max-width: 768px) {
    footer {
        padding: 40px 0 20px;
    }
    
    footer .footer-grid {
        grid-template-columns: 1fr;
        gap: 25px;
    }
    
    footer .footer-column {
        text-align: center;
    }
    
    footer .footer-column h3::after {
        left: 50%;
        transform: translateX(-50%);
    }
    
    footer .social-links {
        justify-content: center;
    }
    
    footer .footer-links {
        display: flex;
        flex-wrap: wrap;
        justify-content: center;
        gap: 10px;
    }
    
    footer .footer-links li {
        margin-bottom: 0;
    }
    
    footer .copyright {
        font-size: 0.8rem;
        padding: 15px 10px;
    }
}

@media (max-width: 480px) {
    footer {
        padding: 30px 0 15px;
    }
    
    footer .footer-grid {
        gap: 20px;
    }
    
    footer .footer-column h3 {
        font-size: 1rem;
    }
    
    footer .social-links a {
        width: 35px;
        height: 35px;
        font-size: 0.9rem;
    }
}

/* ============================================
   TOUCH-FRIENDLY IMPROVEMENTS
   ============================================ */

@media (max-width: 768px) {
    /* Increase touch targets */
    .nav-menu li a,
    .btn,
    .header-icon,
    .cat-tab,
    .view-all-btn,
    .pch-read,
    .pfb-read-btn {
        min-height: 44px;
        display: flex;
        align-items: center;
        justify-content: center;
    }
    
    .nav-menu li a {
        justify-content: flex-start;
    }
    
    /* Improve tap spacing */
    .post-list-item {
        min-height: 60px;
    }
    
    .category-tabs {
        gap: 0.4rem;
    }
    
    /* Better mobile form inputs */
    input,
    textarea,
    select {
        font-size: 16px !important; /* Prevent iOS zoom */
    }
}

/* ============================================
   PERFORMANCE OPTIMIZATIONS
   ============================================ */

@media (max-width: 768px) {
    /* Reduce animations on mobile for better performance */
    .fade-in-up {
        transition: none !important;
        opacity: 1 !important;
        transform: none !important;
    }
    
    /* Simplify hover effects */
    .post-card-h:hover,
    .post-featured-big:hover,
    .post-list-item:hover {
        transform: none !important;
    }
}

/* ============================================
   ACCESSIBILITY IMPROVEMENTS
   ============================================ */

@media (max-width: 768px) {
    /* Better focus states for touch */
    a:focus,
    button:focus,
    input:focus {
        outline: 2px solid #667eea;
        outline-offset: 2px;
    }
    
    /* Skip link for mobile */
    .skip-link:focus {
        left: 10px;
        top: 10px;
        padding: 12px 20px;
        font-size: 14px;
    }
}
