/**
 * Mobile Responsive Styles
 * Additional mobile-specific optimizations
 */

/* ============================================
   MOBILE BASE STYLES
   ============================================ */

@media (max-width: 768px) {
    
    /* Typography adjustments */
    html {
        font-size: 16px;
    }
    
    body {
        font-size: 1rem;
    }
    
    /* Remove sidebar margin on mobile */
    .site-content {
        margin-left: 0 !important;
        padding-top: 60px !important;
        width: 100% !important;
    }
    
    .site-footer {
        margin-left: 0 !important;
        width: 100% !important;
    }
    
    .blog-archive,
    .blog-single {
        padding: 2rem 1.5rem !important;
    }
    
    .site-info {
        padding: 2rem 1.5rem !important;
    }
    
    /* Page containers */
    .page-container {
        padding: 2rem 1rem;
    }
    
    /* 404 Page */
    .error-404-container {
        padding: 3rem 1rem;
        min-height: calc(100vh - 60px);
        display: flex;
        align-items: center;
        justify-content: center;
    }
    
    .error-404-content {
        text-align: center;
        max-width: 500px;
    }
    
    .error-404-title {
        font-size: 6rem;
        color: var(--color-primary, #C19A6B);
        margin: 0;
        line-height: 1;
    }
    
    .error-404-subtitle {
        color: #FFFFFF;
        font-size: 1.5rem;
        margin: 1rem 0;
    }
    
    .error-404-text {
        color: #CCCCCC;
        margin-bottom: 2rem;
        line-height: 1.6;
    }
    
    .error-404-actions {
        display: flex;
        flex-direction: column;
        gap: 1rem;
        margin-top: 2rem;
    }
    
    /* Touch targets */
    a, button, input[type="submit"] {
        min-height: 44px;
        min-width: 44px;
    }
    
    /* Forms */
    input[type="text"],
    input[type="email"],
    input[type="search"],
    textarea {
        font-size: 16px; /* Prevents zoom on iOS */
    }
    
    /* Images */
    img {
        max-width: 100%;
        height: auto;
    }
    
    /* Tables */
    table {
        display: block;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
}

/* ============================================
   ELEMENTOR MOBILE OPTIMIZATION
   ============================================ */

@media (max-width: 768px) {
    
    /* Elementor sections */
    .elementor-section {
        padding: 2rem 1rem !important;
    }
    
    .elementor-column-gap-default > .elementor-column > .elementor-element-populated {
        padding: 1rem !important;
    }
    
    /* Elementor headings */
    .elementor-heading-title {
        font-size: 1.75rem !important;
    }
}

/* ============================================
   LANDSCAPE MOBILE
   ============================================ */

@media (max-width: 768px) and (orientation: landscape) {
    
    .mobile-header {
        height: 50px;
    }
    
    .site-content {
        padding-top: 50px;
    }
    
    .mobile-nav-overlay {
        top: 50px;
    }
}

/* ============================================
   TABLET SPECIFIC (768px - 1024px)
   ============================================ */

@media (min-width: 769px) and (max-width: 1024px) {
    
    /* Sidebar bleibt bei 280px! NICHT ändern! */
    /* Content margin wird in reset-base.css definiert! */
    
    /* Blog grid 2 columns on tablet */
    .blog-posts-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    /* Related posts 2 columns */
    .related-posts-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* ============================================
   SMALL MOBILE (< 480px)
   ============================================ */

@media (max-width: 480px) {
    
    /* Smaller padding */
    .blog-archive,
    .blog-single {
        padding: 1.5rem 0.75rem;
    }
    
    .single-post-content {
        padding: 1.5rem 1rem;
    }
    
    /* Smaller headings */
    .blog-header .page-title {
        font-size: 1.75rem;
    }
    
    .entry-title {
        font-size: 1.75rem;
    }
    
    .entry-content h2 {
        font-size: 1.5rem;
    }
    
    /* Compact navigation controls */
    .blog-nav-controls {
        gap: 0.75rem;
    }
    
    .cat-filter-btn {
        padding: 0.375rem 0.75rem;
        font-size: 0.85rem;
    }
    
    /* Smaller floating buttons text */
    .floating-btn {
        font-size: 0.85rem;
        padding: 0.75rem 0.75rem;
    }
    
    .floating-btn span {
        display: none;
    }
    
    .floating-btn {
        justify-content: center;
    }
    
    /* Stack post navigation */
    .post-navigation-wrap {
        gap: 1rem;
    }
    
    .nav-previous a,
    .nav-next a {
        padding: 1rem;
    }
    
    .nav-title {
        font-size: 0.95rem;
    }
}

/* ============================================
   PRINT STYLES
   ============================================ */

@media print {
    
    /* Hide navigation and buttons */
    .sidebar-nav,
    .mobile-header,
    .floating-cta-bar,
    .blog-nav-controls,
    .blog-sidebar,
    .post-navigation-wrap,
    .related-posts {
        display: none !important;
    }
    
    /* Reset content margin */
    .site-content {
        margin-left: 0 !important;
        padding: 0 !important;
    }
    
    /* Black text on white background */
    body {
        background: white !important;
        color: black !important;
    }
    
    .single-post-content {
        background: white !important;
        padding: 0 !important;
    }
    
    .entry-content,
    .entry-title,
    h1, h2, h3, h4, h5, h6, p {
        color: black !important;
    }
    
    /* Show URLs for links */
    a[href]:after {
        content: " (" attr(href) ")";
        font-size: 0.8em;
    }
}

/* ============================================
   HIGH CONTRAST MODE
   ============================================ */

@media (prefers-contrast: high) {
    
    .blog-card,
    .widget,
    .single-post-content {
        border: 2px solid var(--color-primary, #C19A6B);
    }
    
    a {
        text-decoration: underline;
    }
}

/* ============================================
   REDUCED MOTION
   ============================================ */

@media (prefers-reduced-motion: reduce) {
    
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
    
    .floating-cta-bar {
        animation: none;
    }
}

/* ============================================
   DARK MODE SUPPORT (if system prefers)
   ============================================ */

@media (prefers-color-scheme: dark) {
    /* Theme is already dark, but we can enhance it */
    
    :root {
        --color-primary: #D4AF78; /* Lighter gold for better contrast */
    }
}

