/**
 * WooFood Modern CSS Framework
 * 
 * A lightweight CSS framework designed specifically for the modern WooFood theme
 * No Bootstrap dependency - completely custom grid and component system
 * 
 * @package WooFood Modern Theme
 */

/* ====================================
   CSS RESET & BASE
   ==================================== */

*,
*::before,
*::after {
    box-sizing: border-box;
}

body {
    margin: 0;
    padding: 0;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    line-height: 1.6;
    color: var(--foodmaster-modern-text, #333);
    background: var(--foodmaster-modern-bg, #fff);
}

/* ====================================
   MODERN GRID SYSTEM
   ==================================== */

.modern-container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: block;
}

.modern-container-fluid {
    width: 100%;
    padding: 0 20px;
}

.modern-row {
    display: flex;
    flex-wrap: wrap;
    margin: 0 -15px;
}

.modern-col {
    flex: 1;
    padding: 0 15px;
}

/* Modern Column System (12 columns) */
.modern-col-1 {
    flex: 0 0 8.333333%;
    max-width: 8.333333%;
}

.modern-col-2 {
    flex: 0 0 16.666667%;
    max-width: 16.666667%;
}

.modern-col-3 {
    flex: 0 0 25%;
    max-width: 25%;
}

.modern-col-4 {
    flex: 0 0 33.333333%;
    max-width: 33.333333%;
}

.modern-col-5 {
    flex: 0 0 41.666667%;
    max-width: 41.666667%;
}

.modern-col-6 {
    flex: 0 0 50%;
    max-width: 50%;
}

.modern-col-7 {
    flex: 0 0 58.333333%;
    max-width: 58.333333%;
}

.modern-col-8 {
    flex: 0 0 66.666667%;
    max-width: 66.666667%;
}

.modern-col-9 {
    flex: 0 0 75%;
    max-width: 75%;
}

.modern-col-10 {
    flex: 0 0 83.333333%;
    max-width: 83.333333%;
}

.modern-col-11 {
    flex: 0 0 91.666667%;
    max-width: 91.666667%;
}

.modern-col-12 {
    flex: 0 0 100%;
    max-width: 100%;
}

/* ====================================
   MODERN LAYOUT COMPONENTS
   ==================================== */

.modern-main-content {
    min-height: calc(100vh - 160px);
    padding: 40px 0;
    background: var(--foodmaster-modern-bg, #fff);
}

.modern-content-wrapper {
    display: flex;
    gap: 40px;
    align-items: flex-start;
}

.modern-content-area {
    flex: 1;
}

.modern-sidebar {
    flex: 0 0 300px;
}

/* ====================================
   MODERN CARDS & COMPONENTS
   ==================================== */

.modern-card {
    background: var(--foodmaster-modern-light, #fff);
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.modern-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
}

.modern-card-header {
    padding: 20px 24px;
    border-bottom: 1px solid #eef2f7;
}

.modern-card-body {
    padding: 24px;
}

.modern-card-footer {
    padding: 20px 24px;
    background: #f8fafc;
    border-top: 1px solid #eef2f7;
}

/* ====================================
   MODERN BUTTONS
   ==================================== */

.modern-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 24px;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    min-height: 44px;
}

.modern-btn-primary {
    background: var(--foodmaster-modern-primary, #FFD700);
    color: var(--foodmaster-modern-dark, #000);
}

.modern-btn-primary:hover {
    background: #f4c842;
    transform: translateY(-1px);
}

.modern-btn-secondary {
    background: var(--foodmaster-modern-light, #fff);
    color: var(--foodmaster-modern-text, #333);
    border: 2px solid #e2e8f0;
}

.modern-btn-secondary:hover {
    border-color: var(--foodmaster-modern-primary, #FFD700);
    background: #fefefe;
}

.modern-btn-outline {
    background: transparent;
    color: var(--foodmaster-modern-primary, #FFD700);
    border: 2px solid var(--foodmaster-modern-primary, #FFD700);
}

.modern-btn-outline:hover {
    background: var(--foodmaster-modern-primary, #FFD700);
    color: var(--foodmaster-modern-dark, #000);
}

/* Button sizes */
.modern-btn-sm {
    padding: 8px 16px;
    font-size: 12px;
    min-height: 36px;
}

.modern-btn-lg {
    padding: 16px 32px;
    font-size: 16px;
    min-height: 52px;
}

/* ====================================
   MODERN FORMS
   ==================================== */

.modern-form-group {
    margin-bottom: 24px;
}

.modern-form-label {
    display: block;
    font-weight: 600;
    margin-bottom: 8px;
    color: var(--foodmaster-modern-text, #333);
}

.modern-form-control {
    width: 100%;
    padding: 12px 16px;
    font-size: 14px;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    background: var(--foodmaster-modern-light, #fff);
    transition: all 0.3s ease;
}

.modern-form-control:focus {
    outline: none;
    border-color: var(--foodmaster-modern-primary, #FFD700);
    box-shadow: 0 0 0 3px rgba(255, 215, 0, 0.1);
}

.modern-select {
    appearance: none;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%236b7280' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='m6 8 4 4 4-4'/%3e%3c/svg%3e");
    background-position: right 12px center;
    background-repeat: no-repeat;
    background-size: 16px;
    padding-right: 40px;
}

/* ====================================
   MODERN TYPOGRAPHY
   ==================================== */

.modern-heading {
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 16px;
    color: var(--foodmaster-modern-text, #333);
}

.modern-h1 {
    font-size: 2.5rem;
    margin-bottom: 24px;
}

.modern-h2 {
    font-size: 2rem;
    margin-bottom: 20px;
}

.modern-h3 {
    font-size: 1.5rem;
    margin-bottom: 16px;
}

.modern-h4 {
    font-size: 1.25rem;
    margin-bottom: 16px;
}

.modern-text-primary {
    color: var(--foodmaster-modern-primary, #FFD700);
}

.modern-text-muted {
    color: #6b7280;
}

.modern-text-center {
    text-align: center;
}

.modern-text-left {
    text-align: left;
}

.modern-text-right {
    text-align: right;
}

/* ====================================
   MODERN SPACING UTILITIES
   ==================================== */

.modern-mt-0 {
    margin-top: 0;
}

.modern-mt-1 {
    margin-top: 8px;
}

.modern-mt-2 {
    margin-top: 16px;
}

.modern-mt-3 {
    margin-top: 24px;
}

.modern-mt-4 {
    margin-top: 32px;
}

.modern-mt-5 {
    margin-top: 48px;
}

.modern-mb-0 {
    margin-bottom: 0;
}

.modern-mb-1 {
    margin-bottom: 8px;
}

.modern-mb-2 {
    margin-bottom: 16px;
}

.modern-mb-3 {
    margin-bottom: 24px;
}

.modern-mb-4 {
    margin-bottom: 32px;
}

.modern-mb-5 {
    margin-bottom: 48px;
}

.modern-p-0 {
    padding: 0;
}

.modern-p-1 {
    padding: 8px;
}

.modern-p-2 {
    padding: 16px;
}

.modern-p-3 {
    padding: 24px;
}

.modern-p-4 {
    padding: 32px;
}

.modern-p-5 {
    padding: 48px;
}

/* ====================================
   MODERN FLEXBOX UTILITIES
   ==================================== */

.modern-flex {
    display: flex;
}

.modern-flex-column {
    flex-direction: column;
}

.modern-flex-wrap {
    flex-wrap: wrap;
}

.modern-justify-center {
    justify-content: center;
}

.modern-justify-between {
    justify-content: space-between;
}

.modern-justify-start {
    justify-content: flex-start;
}

.modern-justify-end {
    justify-content: flex-end;
}

.modern-items-center {
    align-items: center;
}

.modern-items-start {
    align-items: flex-start;
}

.modern-items-end {
    align-items: flex-end;
}

/* ====================================
   MODERN RESPONSIVE DESIGN
   ==================================== */

/* Tablet */
@media (max-width: 768px) {
    .modern-container {
        padding: 0 16px;
    }

    /* WooFood templates tablet fixes */
    .foodmaster-menu-container {
        width: 100% !important;
        max-width: 100% !important;
        margin: 0 !important;
        padding: 0 !important;
    }

    .foodmaster-tabs-nav-wrapper {
        position: sticky !important;
        top: 0 !important;
        z-index: 1001 !important;
    }

    .foodmaster-tabs-nav-inner {
        width: 100% !important;
        max-width: 100% !important;
        overflow-x: auto !important;
        -webkit-overflow-scrolling: touch !important;
    }

    .modern-content-wrapper {
        flex-direction: column;
        gap: 30px;
    }

    .modern-sidebar {
        flex: none;
        width: 100%;
    }

    .modern-col-md-12 {
        flex: 0 0 100%;
        max-width: 100%;
    }

    .modern-col-md-6 {
        flex: 0 0 50%;
        max-width: 50%;
    }

    .modern-col-md-4 {
        flex: 0 0 33.333333%;
        max-width: 33.333333%;
    }

    .modern-col-md-3 {
        flex: 0 0 25%;
        max-width: 25%;
    }
}

/* Mobile */
@media (max-width: 480px) {
    .modern-container {
        padding: 0 12px;
    }

    /* WooFood templates mobile fixes */
    .foodmaster-menu-container {
        width: 100% !important;
        max-width: 100% !important;
        margin: 0 !important;
        padding: 0 !important;
        overflow-x: hidden !important;
    }

    .foodmaster-tabs-nav-inner {
        padding: 12px !important;
        gap: 4px !important;
    }

    .foodmaster-tab-button {
        padding: 10px 12px !important;
        font-size: 12px !important;
        flex-shrink: 0 !important;
    }

    .modern-row {
        margin: 0 -8px;
    }

    .modern-col,
    [class*="modern-col-"] {
        padding: 0 8px;
    }

    .modern-col-sm-12 {
        flex: 0 0 100%;
        max-width: 100%;
    }

    .modern-h1 {
        font-size: 2rem;
    }

    .modern-h2 {
        font-size: 1.75rem;
    }

    .modern-h3 {
        font-size: 1.5rem;
    }

    .modern-btn {
        padding: 10px 20px;
        font-size: 14px;
    }
}

/* ====================================
   MODERN ANIMATIONS
   ==================================== */

.modern-fade-in {
    animation: modernFadeIn 0.6s ease-out;
}

.modern-slide-up {
    animation: modernSlideUp 0.6s ease-out;
}

@keyframes modernFadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

@keyframes modernSlideUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ====================================
   MODERN SPECIFIC COMPONENTS
   ==================================== */

/* Posts Grid */
.modern-posts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    margin-bottom: 40px;
}

.modern-post-card {
    background: var(--foodmaster-modern-light, #fff);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
}

.modern-post-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
}

.modern-post-image {
    overflow: hidden;
    height: 200px;
}

.modern-post-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.modern-post-card:hover .modern-post-image img {
    transform: scale(1.05);
}

.modern-post-content {
    padding: 24px;
}

.modern-post-title {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 12px;
    line-height: 1.4;
}

.modern-post-title a {
    color: var(--foodmaster-modern-text, #333);
    text-decoration: none;
    transition: color 0.3s ease;
}

.modern-post-title a:hover {
    color: var(--foodmaster-modern-primary, #FFD700);
}

.modern-post-meta {
    display: flex;
    gap: 16px;
    margin-bottom: 16px;
    font-size: 14px;
    color: #6b7280;
}

.modern-post-excerpt {
    color: #4b5563;
    line-height: 1.6;
    margin-bottom: 20px;
}

.modern-read-more {
    color: var(--foodmaster-modern-primary, #FFD700);
    font-weight: 600;
    text-decoration: none;
    font-size: 14px;
    transition: all 0.3s ease;
}

.modern-read-more:hover {
    color: #f4c842;
}

/* Pagination */
.modern-pagination {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-top: 40px;
}

.modern-pagination a,
.modern-pagination span {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 44px;
    height: 44px;
    padding: 0 16px;
    background: var(--foodmaster-modern-light, #fff);
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    color: var(--foodmaster-modern-text, #333);
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
}

.modern-pagination a:hover,
.modern-pagination .current {
    background: var(--foodmaster-modern-primary, #FFD700);
    border-color: var(--foodmaster-modern-primary, #FFD700);
    color: var(--foodmaster-modern-dark, #000);
}

/* No Content */
.modern-no-content {
    text-align: center;
    padding: 80px 20px;
    color: #6b7280;
}

.modern-no-content h2 {
    font-size: 1.5rem;
    margin-bottom: 16px;
    color: var(--foodmaster-modern-text, #333);
}