/*
Theme Name: Drublic Theme
Description: Responsive CSS styles
Version: 1.0.0
*/

/* ==========================================================================
   Tablet - 992px and below
   ========================================================================== */

@media (max-width: 992px) {
    
    /* Navigation */
    .main-navigation {
        position: fixed;
        top: 0;
        right: -100%;
        width: 300px;
        height: 100vh;
        background: #fff;
        box-shadow: -2px 0 10px rgba(0, 0, 0, 0.1);
        padding: 2rem;
        transition: right 0.3s ease;
        z-index: 9999;
        overflow-y: auto;
    }
    
    .main-navigation.active {
        right: 0;
    }
    
    .menu-toggle {
        display: block;
    }
    
    .primary-menu {
        flex-direction: column;
        gap: 0;
    }
    
    .primary-menu .sub-menu {
        position: static;
        opacity: 1;
        visibility: visible;
        transform: none;
        box-shadow: none;
        padding-left: 1rem;
        display: none;
    }
    
    .primary-menu li:hover > .sub-menu {
        display: block;
    }
    
    .primary-menu a {
        padding: 0.75rem 0;
        border-bottom: 1px solid #f0f0f0;
    }
    
    /* Content Area */
    .content-area {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    /* Footer */
    .footer-widgets-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .footer-bottom-inner {
        flex-direction: column;
        text-align: center;
    }
}

/* ==========================================================================
   Mobile - 768px and below
   ========================================================================== */

@media (max-width: 768px) {
    
    /* Header */
    .header-inner {
        gap: 1rem;
    }
    
    .custom-logo {
        max-height: 40px;
    }
    
    .site-title {
        font-size: 1.25rem;
    }
    
    .header-actions {
        gap: 1rem;
    }
    
    /* Hide search in mobile, show only icon */
    .search-form-wrapper {
        min-width: 250px;
    }
    
    /* Typography */
    h1 {
        font-size: 2rem;
    }
    
    h2 {
        font-size: 1.75rem;
    }
    
    h3 {
        font-size: 1.5rem;
    }
    
    h4 {
        font-size: 1.25rem;
    }
    
    /* Content */
    .site-content {
        padding: 2rem 0;
    }
    
    article {
        margin-bottom: 2rem;
    }
    
    .entry-header {
        margin-bottom: 1rem;
    }
    
    .entry-meta {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    /* Sidebar */
    .widget-area {
        position: static;
    }
    
    .widget {
        padding: 1rem;
    }
    
    /* Pagination */
    .pagination {
        margin-top: 2rem;
        flex-wrap: wrap;
    }
    
    .pagination .page-numbers {
        padding: 0.4rem 0.75rem;
        font-size: 0.875rem;
    }
    
    /* Footer */
    .footer-widgets {
        padding: 2rem 0;
    }
    
    .footer-widgets-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .footer-navigation .footer-menu {
        flex-direction: column;
        text-align: center;
        gap: 0.75rem;
    }
    
    /* Comments */
    .children {
        padding-left: 1rem;
    }
    
    .comment-body {
        padding: 1rem;
    }
}

/* ==========================================================================
   Small Mobile - 480px and below
   ========================================================================== */

@media (max-width: 480px) {
    
    /* Header */
    .site-branding {
        max-width: 150px;
    }
    
    .custom-logo {
        max-height: 35px;
    }
    
    /* Mobile Menu */
    .main-navigation {
        width: 100%;
        right: -100%;
    }
    
    /* Typography */
    h1 {
        font-size: 1.75rem;
    }
    
    h2 {
        font-size: 1.5rem;
    }
    
    h3 {
        font-size: 1.25rem;
    }
    
    /* Content */
    .site-content {
        padding: 1.5rem 0;
    }
    
    .container {
        padding: 0 1rem;
    }
    
    /* Buttons */
    .button,
    .btn,
    button[type="submit"],
    input[type="submit"] {
        padding: 0.6rem 1.25rem;
        font-size: 0.875rem;
    }
    
    /* Forms */
    input[type="text"],
    input[type="email"],
    input[type="url"],
    input[type="password"],
    input[type="search"],
    input[type="number"],
    input[type="tel"],
    input[type="date"],
    textarea,
    select {
        padding: 0.6rem;
        font-size: 0.9rem;
    }
    
    /* Search Form */
    .search-form-wrapper {
        min-width: calc(100vw - 2rem);
        left: -10rem;
        right: 1rem;
    }
    
    /* Footer */
    .footer-widgets {
        padding: 1.5rem 0;
    }
    
    .footer-bottom {
        padding: 1rem 0;
    }
    
    .site-info {
        font-size: 0.8rem;
    }
    
    /* Error 404 */
    .error-404 .page-title {
        font-size: 4rem;
    }
}

/* ==========================================================================
   Landscape Mode Fixes
   ========================================================================== */

@media (max-height: 600px) and (orientation: landscape) {
    
    .main-navigation {
        height: 100vh;
        overflow-y: auto;
    }
}

/* ==========================================================================
   Print Styles
   ========================================================================== */

@media print {
    
    .site-header,
    .main-navigation,
    .header-actions,
    .widget-area,
    .site-footer,
    .comments-area,
    .comment-respond,
    .post-navigation,
    .pagination {
        display: none !important;
    }
    
    .site-content {
        padding: 0;
    }
    
    .content-area {
        grid-template-columns: 1fr;
    }
    
    body {
        font-size: 12pt;
        line-height: 1.5;
        color: #000;
        background: #fff;
    }
    
    a {
        color: #000;
        text-decoration: underline;
    }
    
    img {
        max-width: 100%;
        page-break-inside: avoid;
    }
}

/* ==========================================================================
   Accessibility - Reduced Motion
   ========================================================================== */

@media (prefers-reduced-motion: reduce) {
    
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}
