/* Tablet Optimizations - 769px to 1279px */
/* Carefully designed to not interfere with mobile (<=768px) or desktop (>=1280px) */

@media (min-width: 769px) and (max-width: 1279px) {
    /* TABLET HEADER - Use Mobile-Style Layout */
    
    /* Hide desktop header on tablet */
    .site-header,
    header.site-header {
        display: none !important;
    }
    
    /* Show mobile header on tablet - Force override Tailwind */
    .mobile-header-new,
    .mobile-header-new.xl\:hidden,
    header.mobile-header-new {
        display: flex !important;
        visibility: visible !important;
        opacity: 1 !important;
        position: fixed !important;
        top: 0 !important;
        left: 0 !important;
        right: 0 !important;
        z-index: 50 !important;
    }
    
    /* Tablet-specific mobile header adjustments */
    .mobile-header-new {
        height: 70px !important;
        padding: 0 24px !important;
    }
    
    .mobile-header-new .flex.items-center {
        height: 70px !important;
        padding: 12px 0 !important;
    }
    
    /* Larger hamburger menu for tablet */
    .mobile-header-new #mobile-menu-icon {
        width: 48px !important;
        height: 48px !important;
    }
    
    .mobile-header-new #mobile-menu-icon svg {
        width: 28px !important;
        height: 28px !important;
    }
    
    /* Larger logo for tablet */
    .mobile-header-new .mobile-logo-dynamic {
        height: 48px !important;
        max-height: 48px !important;
    }
    
    .mobile-header-new .mobile-logo-text-dynamic {
        font-size: 24px !important;
        line-height: 48px !important;
    }
    
    /* Tablet sidebar adjustments */
    #mobile-sidebar {
        width: 400px !important;
    }
    
    #mobile-sidebar .p-4 {
        padding: 24px !important;
    }
    
    #mobile-sidebar nav ul li a {
        padding: 16px 20px !important;
        font-size: 18px !important;
    }
    
    #mobile-sidebar nav ul li a svg {
        width: 24px !important;
        height: 24px !important;
    }
    
    /* Adjust body padding for tablet mobile header */
    body {
        padding-top: 70px !important;
    }
    
    /* Show tablet header elements only on tablets - will be overridden below */
    
    /* Tablet header elements styling - MAKE SURE BUTTONS WORK */
    .tablet-header-elements .relative {
        position: relative !important;
        display: flex !important;
    }
    
    .tablet-header-elements button,
    .tablet-header-elements a {
        font-size: 13px !important;
        padding: 6px 10px !important;
        white-space: nowrap !important;
        border-radius: 6px !important;
        display: flex !important;
        align-items: center !important;
        cursor: pointer !important;
        pointer-events: auto !important;
    }
    
    .tablet-header-elements button {
        background: transparent !important;
        border: none !important;
        outline: none !important;
    }
    
    .tablet-header-elements a {
        text-decoration: none !important;
    }
    
    .tablet-header-elements svg {
        width: 14px !important;
        height: 14px !important;
        flex-shrink: 0 !important;
    }
    
    /* Help dropdown button styling */
    .tablet-header-elements .relative button {
        display: flex !important;
        align-items: center !important;
        gap: 4px !important;
    }
    
    /* Login button styling */
    .tablet-header-elements button[onclick*="openLoginModal"] {
        display: flex !important;
        align-items: center !important;
        gap: 8px !important;
    }
    
    .tablet-header-elements button[onclick*="openLoginModal"] .w-8 {
        width: 32px !important;
        height: 32px !important;
        border-width: 2px !important;
        border-radius: 50% !important;
        border-color: #d1d5db !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        transition: border-color 0.2s ease !important;
    }
    
    .tablet-header-elements button[onclick*="openLoginModal"]:hover .w-8 {
        border-color: #2563eb !important;
    }
    
    .tablet-header-elements button[onclick*="openLoginModal"] svg {
        width: 16px !important;
        height: 16px !important;
    }
    
    /* Find Resume button styling */
    .tablet-header-elements a[href*="all-resumes"] {
        background-color: #2563eb !important;
        color: white !important;
        font-weight: 500 !important;
        display: flex !important;
        align-items: center !important;
        gap: 4px !important;
    }
    
    .tablet-header-elements a[href*="all-resumes"]:hover {
        background-color: #1d4ed8 !important;
    }
    
    /* Hide mobile balance space on tablet */
    .mobile-header-new .lg\:hidden {
        display: none !important;
    }
    
    /* Tablet help dropdown - EXACT web view styling with proper positioning */
    #tablet-help-dropdown-menu {
        position: absolute !important;
        right: 12px !important;
        top: calc(100% + 8px) !important;
        width: 320px !important;
        max-width: calc(100vw - 24px) !important;
        z-index: 1000 !important;
        background-color: white !important;
        border-radius: 12px !important;
        box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25) !important;
        border: 1px solid #f3f4f6 !important;
        transform: none !important;
    }
    
    /* Dropdown container */
    #tablet-help-dropdown-menu > div {
        padding: 12px 0 !important;
    }
    
    /* Phone and Email sections */
    #tablet-help-dropdown-menu .px-5.py-3 {
        padding: 12px 20px !important;
        border-bottom: 1px solid #f9fafb !important;
    }
    
    #tablet-help-dropdown-menu .flex.items-center.space-x-4 {
        display: flex !important;
        align-items: center !important;
        gap: 16px !important;
    }
    
    /* Icon containers */
    #tablet-help-dropdown-menu .w-10.h-10 {
        width: 40px !important;
        height: 40px !important;
        border-radius: 8px !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
    }
    
    /* Blue background for phone */
    #tablet-help-dropdown-menu .bg-blue-50 {
        background-color: #eff6ff !important;
    }
    
    /* Green background for email */
    #tablet-help-dropdown-menu .bg-green-50 {
        background-color: #f0fdf4 !important;
    }
    
    /* Text styling */
    #tablet-help-dropdown-menu .text-xs {
        font-size: 11px !important;
        font-weight: 500 !important;
        color: #6b7280 !important;
        text-transform: uppercase !important;
        letter-spacing: 0.05em !important;
    }
    
    #tablet-help-dropdown-menu .text-sm {
        font-size: 14px !important;
        font-weight: 600 !important;
        color: #111827 !important;
    }
    
    #tablet-help-dropdown-menu .text-sm:hover {
        color: #2563eb !important;
    }
    
    /* Action links section */
    #tablet-help-dropdown-menu .px-2.py-2 {
        padding: 8px !important;
    }
    
    #tablet-help-dropdown-menu .px-3.py-2\.5 {
        padding: 10px 12px !important;
        border-radius: 8px !important;
        display: flex !important;
        align-items: center !important;
        font-size: 14px !important;
        font-weight: 500 !important;
        color: #374151 !important;
        text-decoration: none !important;
        transition: all 0.2s ease !important;
    }
    
    #tablet-help-dropdown-menu .px-3.py-2\.5:hover {
        background-color: #f9fafb !important;
        color: #2563eb !important;
    }
    
    /* Icon spacing in action links */
    #tablet-help-dropdown-menu .w-4.h-4.mr-3 {
        width: 16px !important;
        height: 16px !important;
        margin-right: 12px !important;
    }
    
    /* Tablet header layout - proper spacing */
    .mobile-header-new .flex.items-center {
        justify-content: space-between !important;
        position: relative !important;
    }
    
    /* Logo stays centered */
    .mobile-header-new .flex-1 {
        display: flex !important;
        justify-content: center !important;
        align-items: center !important;
        flex: 1 !important;
    }
    
    /* Force tablet elements ALL THE WAY RIGHT - MAKE SURE THEY SHOW */
    .tablet-header-elements {
        display: flex !important;
        visibility: visible !important;
        opacity: 1 !important;
        align-items: center !important;
        gap: 8px !important;
        flex-shrink: 0 !important;
        position: absolute !important;
        right: 0px !important;
        top: 50% !important;
        transform: translateY(-50%) !important;
        padding-right: 12px !important;
        z-index: 100 !important;
    }
    
    /* Ensure proper flex layout for tablet header */
    .mobile-header-new .flex.items-center {
        display: flex !important;
        width: 100% !important;
    }
    
    /* Hamburger menu - order 1, NO ANIMATIONS */
    .mobile-header-new #mobile-menu-icon {
        order: 1 !important;
        flex-shrink: 0 !important;
        background: none !important;
        border: none !important;
        outline: none !important;
        box-shadow: none !important;
        border-radius: 0 !important;
    }
    
    /* Remove all button animations and effects */
    .mobile-header-new #mobile-menu-icon:hover,
    .mobile-header-new #mobile-menu-icon:focus,
    .mobile-header-new #mobile-menu-icon:active {
        background: none !important;
        background-color: transparent !important;
        border: none !important;
        outline: none !important;
        box-shadow: none !important;
        border-radius: 0 !important;
        transform: none !important;
        animation: none !important;
    }
    
    /* Remove ripple effect and any pseudo-elements */
    .mobile-header-new #mobile-menu-icon::before,
    .mobile-header-new #mobile-menu-icon::after {
        display: none !important;
        content: none !important;
    }
    
    /* Logo container - order 2, centered */
    .mobile-header-new .flex-1 {
        order: 2 !important;
        flex: 1 !important;
        display: flex !important;
        justify-content: center !important;
        align-items: center !important;
    }
    
    /* Hide the mobile balance space */
    .mobile-header-new .lg\:hidden {
        display: none !important;
    }
    /* Hero Section Tablet Optimizations */
    .hero-section {
        padding: 60px 0 !important;
    }
    
    .hero-section h1 {
        font-size: 2.5rem !important;
        line-height: 1.2 !important;
    }
    
    .hero-section p {
        font-size: 1.1rem !important;
        max-width: 600px !important;
        margin: 0 auto !important;
    }
    
    /* Resume Grid Tablet Layout */
    .resume-grid {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 1.5rem !important;
    }
    
    /* Featured Slider Tablet */
    .swiper-container {
        padding: 0 40px !important;
    }
    
    .swiper-slide {
        width: 45% !important;
        margin-right: 20px !important;
    }
    
    /* Navigation Tablet */
    .header-nav {
        gap: 1.5rem !important;
    }
    
    .header-nav a {
        font-size: 0.95rem !important;
        padding: 0.5rem 1rem !important;
    }
    
    /* Stats Section Tablet */
    .stats-grid {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 2rem !important;
    }
    
    /* Features Section Tablet */
    .features-grid {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 2rem !important;
    }
    
    /* Testimonials Tablet */
    .testimonials-grid {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 1.5rem !important;
    }
    
    /* Blog Section Tablet */
    .blog-grid {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 1.5rem !important;
    }
    
    /* ATS Section Tablet */
    .ats-features-grid {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 1.5rem !important;
    }
    
    /* Container Padding Tablet */
    .container {
        padding-left: 2rem !important;
        padding-right: 2rem !important;
    }
    
    /* Card Spacing Tablet */
    .card, .resume-card {
        margin-bottom: 1.5rem !important;
    }
    
    /* Button Sizing Tablet */
    .btn, .button {
        padding: 0.75rem 1.5rem !important;
        font-size: 1rem !important;
    }
    
    /* Form Elements Tablet */
    .form-input, .form-textarea, .form-select {
        padding: 0.75rem !important;
        font-size: 1rem !important;
    }
    
    /* Modal Sizing Tablet */
    .modal-content {
        max-width: 600px !important;
        margin: 2rem !important;
    }
    
    /* Footer Tablet */
    .footer-grid {
        grid-template-columns: repeat(3, 1fr) !important;
        gap: 2rem !important;
    }
    
    /* Typography Tablet */
    h2 {
        font-size: 2rem !important;
    }
    
    h3 {
        font-size: 1.5rem !important;
    }
    
    h4 {
        font-size: 1.25rem !important;
    }
    
    /* Spacing Tablet */
    .section-padding {
        padding: 4rem 0 !important;
    }
    
    .mb-large {
        margin-bottom: 3rem !important;
    }
    
    .mt-large {
        margin-top: 3rem !important;
    }
}

/* Tablet Portrait Specific (768px-834px) */
@media (min-width: 769px) and (max-width: 834px) and (orientation: portrait) {
    .hero-section h1 {
        font-size: 2.25rem !important;
    }
    
    .resume-grid {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 1rem !important;
    }
    
    .container {
        padding-left: 1.5rem !important;
        padding-right: 1.5rem !important;
    }
}

/* Tablet Landscape Specific (1024px width) */
@media (min-width: 1000px) and (max-width: 1024px) and (orientation: landscape) {
    .resume-grid {
        grid-template-columns: repeat(3, 1fr) !important;
        gap: 1.5rem !important;
    }
    
    .features-grid {
        grid-template-columns: repeat(3, 1fr) !important;
    }
    
    .stats-grid {
        grid-template-columns: repeat(4, 1fr) !important;
    }
}
