/**
 * Modern Digital Menu Styles - Sufi Restaurant Design
 * Inspired by elegant, card-based category layout
 */

/* ========================================
   Main Container & Background
   ======================================== */
.rmm-theme-modern,
.rmm-theme-new {
    background: transparent;
    min-height: 100vh;
    padding: 60px 0;
    font-family: 'Georgia', 'Palatino', serif;
    width: 100%;
    max-width: 100%;
}

/* Force 1440px width for all content */
.rmm-theme-modern,
.rmm-theme-new {
    max-width: 1440px !important;
    margin: 0 auto;
    padding: 60px 20px;
}

/* Elementor 1440px Container Uyumluluğu */
.rmm-theme-modern > *,
.rmm-theme-new > * {
    max-width: 100%;
    margin-left: auto;
    margin-right: auto;
}

/* ========================================
   Header Section
   ======================================== */
.rmm-welcome-section {
    text-align: center;
    margin-bottom: 40px;
    padding: 0 20px;
}

.rmm-welcome-title {
    font-size: 4rem;
    font-weight: 300;
    color: #ffffff;
    margin: 0 0 15px;
    font-style: italic;
    letter-spacing: 0.02em;
    font-family: 'Georgia', 'Garamond', serif;
    line-height: 1.2;
}

.rmm-welcome-subtitle {
    font-size: 1.1rem;
    color: rgba(255, 255, 255, 0.8);
    font-weight: 300;
    margin: 0;
    font-family: 'Trebuchet MS', sans-serif;
    letter-spacing: 0.03em;
}

/* ========================================
   Search Container
   ======================================== */
.rmm-search-container {
    position: relative;
    max-width: 500px;
    margin: 0 auto 40px;
}

.rmm-search-input {
    width: 100%;
    padding: 16px 50px 16px 20px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 50px;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    color: #ffffff;
    font-size: 1rem;
    transition: all 0.3s ease;
}

.rmm-search-input::placeholder {
    color: rgba(255, 255, 255, 0.6);
}

.rmm-search-input:focus {
    outline: none;
    border-color: rgba(255, 255, 255, 0.4);
    background: rgba(255, 255, 255, 0.15);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
}

.rmm-search-icon {
    position: absolute;
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
    color: rgba(255, 255, 255, 0.6);
    font-size: 1.2rem;
    pointer-events: none;
}

/* ========================================
   Filter Pills
   ======================================== */
.rmm-filter-pills {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 12px;
    margin-bottom: 50px;
    padding: 0;
}

.rmm-filter-pill {
    padding: 10px 24px;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 30px;
    color: #ffffff;
    font-size: 0.85rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-decoration: none;
    transition: all 0.3s ease;
    cursor: pointer;
    text-transform: uppercase;
}

.rmm-filter-pill:hover {
    background: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.4);
    transform: translateY(-2px);
}

.rmm-filter-pill.active {
    background: rgba(255, 255, 255, 0.25);
    border-color: rgba(255, 255, 255, 0.5);
    box-shadow: 0 4px 12px rgba(255, 255, 255, 0.1);
}

/* ========================================
   Categories Grid
   ======================================== */
.rmm-categories-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 15px;
    max-width: 100%;
    margin: 0 auto;
    padding: 0;
}

/* Dynamic columns based on data attribute */
.rmm-categories-grid[data-columns="2"] {
    grid-template-columns: repeat(2, 1fr);
}

.rmm-categories-grid[data-columns="3"] {
    grid-template-columns: repeat(3, 1fr);
}

.rmm-categories-grid[data-columns="4"] {
    grid-template-columns: repeat(4, 1fr);
}

.rmm-categories-grid[data-columns="5"] {
    grid-template-columns: repeat(5, 1fr);
}

@media (max-width: 1200px) {
    .rmm-categories-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 768px) {
    .rmm-categories-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
    }
}

@media (max-width: 480px) {

    .rmm-cat-card {
    height: 310px !important;
    min-height: 310px !important;
}
    .rmm-categories-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }

        .rmm-categories-grid[data-columns="4"] {
            grid-template-columns: repeat(2, 1fr);
        }

       
}

/* ========================================
   Category Card
   ======================================== */
.rmm-cat-card {
    position: relative;
    display: flex;
    flex-direction: column;
    background: #f5f5f5;
    border-radius: 16px;
    overflow: hidden;
    text-decoration: none;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
    cursor: pointer;
    height: 460px;
    min-height: 460px;
}

.rmm-cat-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.3);
}

/* Category Card Image - Background Style */
.rmm-cat-card-img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100% !important;
    object-fit: cover;
    display: block;
    transition: transform 0.4s ease;
    z-index: 1;
}

.rmm-cat-card:hover .rmm-cat-card-img {
    transform: scale(1.05);
}

.rmm-cat-card-img--placeholder {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 4rem;
    background: linear-gradient(135deg, #e8f5e9 0%, #c8e6c9 100%);
    z-index: 1;
}

/* Dark Overlay on Image */
.rmm-cat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 2;
    transition: background 0.4s ease;
}

.rmm-cat-card:hover::before {
    background: linear-gradient(to bottom, 
        rgba(0, 0, 0, 0.2) 0%, 
        rgba(0, 0, 0, 0.4) 50%, 
        rgba(46, 46, 46, 0.95) 100%);
}

/* Category Card Count Badge */
.rmm-cat-card-count {
    position: absolute;
    top: 16px;
    right: 16px;
    background: rgba(45, 90, 74, 0.95);
    backdrop-filter: blur(10px);
    color: #ffffff;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
    letter-spacing: 0.03em;
    z-index: 3;
}

/* Category Card Content - Over the image */
.rmm-cat-card-content {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 28px 24px;
    z-index: 3;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
}

.rmm-cat-card-title {
    font-size: 1.75rem;
    font-weight: 700;
    color: #ffffff;
    margin: 0 0 12px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-family: 'Trebuchet MS', 'Arial', sans-serif;
    line-height: 1.2;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.rmm-cat-card-desc {
    font-size: 0.95rem;
    color: rgba(255, 255, 255, 0.95);
    margin: 0;
    line-height: 1.6;
    font-family: 'Georgia', serif;
    text-shadow: 0 1px 4px rgba(0, 0, 0, 0.3);
}

/* ========================================
   Responsive Design
   ======================================== */
@media (max-width: 1024px) {
    .rmm-welcome-title {
        font-size: 3rem;
    }
    
    .rmm-categories-grid {
        grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
        gap: 24px;
    }
}

@media (max-width: 768px) {
    .rmm-theme-modern,
    .rmm-theme-new {
        padding: 40px 15px;
    }
    
    .rmm-welcome-title {
        font-size: 2.5rem;
    }
    
    .rmm-welcome-subtitle {
        font-size: 1rem;
    }
    
    .rmm-filter-pills {
        gap: 8px;
        margin-bottom: 30px;
    }
    
    .rmm-filter-pill {
        padding: 8px 16px;
        font-size: 0.75rem;
    }
    
    .rmm-cat-card-img {
        height: 180px;
    }
    
    .rmm-cat-card-content {
        padding: 20px;
    }
    
    .rmm-cat-card-title {
        font-size: 1.2rem;
    }
    
    .rmm-cat-card-desc {
        font-size: 0.9rem;
    }
}

@media (max-width: 480px) {
    .rmm-welcome-title {
        font-size: 2rem;
    }
    
    .rmm-search-input {
        padding: 14px 45px 14px 18px;
        font-size: 0.95rem;
    }
    
    .rmm-categories-grid {
        gap: 18px;
    }
    
    .rmm-cat-card-img {
        height: 160px;
    }
}

/* ========================================
   Animation & Effects
   ======================================== */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.rmm-cat-card {
    animation: fadeInUp 0.6s ease-out backwards;
}

.rmm-cat-card:nth-child(1) { animation-delay: 0.05s; }
.rmm-cat-card:nth-child(2) { animation-delay: 0.1s; }
.rmm-cat-card:nth-child(3) { animation-delay: 0.15s; }
.rmm-cat-card:nth-child(4) { animation-delay: 0.2s; }
.rmm-cat-card:nth-child(5) { animation-delay: 0.25s; }
.rmm-cat-card:nth-child(6) { animation-delay: 0.3s; }
.rmm-cat-card:nth-child(7) { animation-delay: 0.35s; }
.rmm-cat-card:nth-child(8) { animation-delay: 0.4s; }
.rmm-cat-card:nth-child(9) { animation-delay: 0.45s; }
.rmm-cat-card:nth-child(10) { animation-delay: 0.5s; }
.rmm-cat-card:nth-child(11) { animation-delay: 0.55s; }
.rmm-cat-card:nth-child(12) { animation-delay: 0.6s; }

/* ========================================
   Print Styles
   ======================================== */
@media print {
    .rmm-search-container,
    .rmm-filter-pills {
        display: none;
    }
    
    .rmm-theme-modern,
    .rmm-theme-new {
        background: white;
    }
    
    .rmm-cat-card {
        page-break-inside: avoid;
    }
}

/* ========================================
   Menu Item Click Improvements for Mobile
   ======================================== */
.rmm-menu-item-row {
    cursor: pointer;
    position: relative;
    transition: all 0.3s ease;
}

.rmm-menu-item-row:hover {
    transform: translateY(-2px);
}

.rmm-menu-item-row:active {
    transform: translateY(0);
}

/* Mobile touch feedback */
@media (max-width: 768px) {
    .rmm-menu-item-row {
        padding: 10px;
        margin: -10px;
        border-radius: 15px;
        transition: background-color 0.2s ease;
    }
    
    .rmm-menu-item-row:active {
        background-color: rgba(255, 255, 255, 0.1);
    }
    
    .rmm-menu-item-image-wrapper {
        border-radius: 15px;
        box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    }
}

/* ========================================
   Enhanced Category Page Styling
   ======================================== */
@media (max-width: 768px) {
    /* Make category page full width on mobile */
    .rmm-category-display {
        width: 100vw;
        margin-left: calc(-50vw + 50%);
        padding-left: 15px;
        padding-right: 15px;
    }
    
    /* Ensure proper spacing */
    .rmm-category-display > * {
        max-width: 100%;
        margin-left: 0;
        margin-right: 0;
    }
}

/* ========================================
   Accessibility
   ======================================== */
.rmm-cat-card:focus,
.rmm-filter-pill:focus {
    outline: 3px solid rgba(255, 255, 255, 0.5);
    outline-offset: 2px;
}

.rmm-search-input:focus {
    outline: 3px solid rgba(255, 255, 255, 0.3);
    outline-offset: 0;
}

.rmm-menu-item-row:focus {
    outline: 2px solid rgba(212, 175, 55, 0.8);
    outline-offset: 3px;
}

/* Reduce motion for users who prefer it */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}
