/* ============================================================
   FEED-NASLOVNA.CSS
   Fix für feed4.php included in naslovna3.php
   Behebt Konflikte zwischen starting.css + feed7.css
   und sorgt für korrektes Mobile-Layout aller Feed-Sections
   ============================================================ */


/* ── 1. CONTAINER-PADDING AUFHEBEN ─────────────────────────
   starting.css: .tab-content { padding: 0 20px }
   main.container { padding: 0 20px }
   = 40px Verlust pro Seite → Feed zu schmal auf Mobile
   Lösung: negative Margins ziehen #feed aus dem Padding heraus
   ohne andere Tabs (Restorani, Kafići...) zu beeinflussen
   ──────────────────────────────────────────────────────────── */

@media (max-width: 900px) {
    #feed.tab-content {
        margin-left: -20px;
        margin-right: -20px;
        width: calc(100% + 40px);
        padding: 0;
        overflow-x: hidden;
    }
}

#feed.tab-content {
    padding: 0;
}


/* ── 2. IMG HEIGHT FIX ──────────────────────────────────────
   starting.css: img { height: auto }
   → zerstört Logo-Kreis und Story-Ring-Bilder
   ──────────────────────────────────────────────────────────── */

#feed .op-story-inner img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
    display: block;
}

#feed .op-card-img > img:first-child {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

#feed .op-logo-wrap {
    position: absolute;
    bottom: 8px;
    left: 10px;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    overflow: hidden;
    display: block;
    z-index: 5;
    background: #fff;
    border: 2.5px solid white;
    box-shadow: 0 2px 6px rgba(0,0,0,.2);
}

#feed .op-logo-wrap img {
    width: 36px;
    height: 36px;
    object-fit: cover;
    border-radius: 50%;
    display: block;
}


/* ── 3. OP-SECTION RESET ────────────────────────────────────
   feed7.css: div[style*="border-left:4px solid #f39c12"] {
       padding: 16px 0 12px }
   → trifft op-section inline-style, kollabiert Grid
   ──────────────────────────────────────────────────────────── */

#feed .op-section {
    padding: 0;
    width: 100%;
    box-sizing: border-box;
    margin: 16px 0 14px;
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 12px rgba(0,0,0,0.07);
    border-left: 4px solid #E7A800;
    border-top: 1px solid rgba(232,217,190,.5);
    border-right: 1px solid rgba(232,217,190,.5);
    border-bottom: 1px solid rgba(232,217,190,.5);
    display: block;
}

#feed .op-section-head {
    padding: 13px 16px 10px;
    border-bottom: 1px solid #F5EDD8;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

#feed .op-section-title {
    font-size: 14px;
    font-weight: 800;
    color: #1E1A14;
    margin: 0;
}

#feed .op-section-count {
    font-size: 11px;
    background: #F5EDD8;
    color: #7A6E62;
    padding: 3px 10px;
    border-radius: 100px;
    font-weight: 700;
}


/* ── 4. STORY BUBBLES ROW ───────────────────────────────────
   ──────────────────────────────────────────────────────────── */

#feed .op-stories-row {
    display: flex;
    flex-direction: row;
    gap: 12px;
    overflow-x: auto;
    padding: 14px 16px 10px;
    scrollbar-width: none;
    width: 100%;
    box-sizing: border-box;
    align-items: flex-start;
}

#feed .op-stories-row::-webkit-scrollbar {
    display: none;
}

#feed .op-story-bubble,
#feed .op-story-add {
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
    cursor: pointer;
}

#feed .op-story-ring {
    width: 64px;
    height: 64px;
    min-width: 64px;
    min-height: 64px;
    border-radius: 50%;
    padding: 3px;
    background: linear-gradient(135deg, #C5603A, #E7A800, #FF6B35);
    box-shadow: 0 3px 12px rgba(197,96,58,.35);
    flex-shrink: 0;
    box-sizing: border-box;
}

#feed .op-story-inner {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    border: 3px solid white;
    overflow: hidden;
    background: #F5EDD8;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
}

#feed .op-story-name,
#feed .op-story-add-label {
    font-size: 10px;
    font-weight: 600;
    color: #3A3026;
    text-align: center;
    max-width: 70px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

#feed .op-story-add-btn {
    width: 64px;
    height: 64px;
    min-width: 64px;
    border-radius: 50%;
    border: 2.5px dashed #E8D9BE;
    background: #F5EDD8;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    flex-shrink: 0;
}


/* ── 5. OWNER CARDS GRID ────────────────────────────────────
   ──────────────────────────────────────────────────────────── */

#feed .op-cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 14px;
    padding: 14px 16px 18px;
    width: 100%;
    box-sizing: border-box;
}

#feed .op-card {
    background: #FDFAF4;
    border-radius: 12px;
    overflow: hidden;
    border: 1.5px solid #fde8b0;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
    display: flex;
    flex-direction: column;
    width: 100%;
    box-sizing: border-box;
    padding: 0;
    transition: transform .2s, box-shadow .2s;
}

#feed .op-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 24px rgba(243,156,18,.18);
}

#feed .op-card-img {
    width: 100%;
    height: 160px;
    min-height: 160px;
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #ffeaa7, #fdcb6e);
    padding: 0;
    flex-shrink: 0;
    cursor: pointer;
}

#feed .op-card-img-placeholder {
    width: 100%;
    height: 160px;
    min-height: 160px;
    background: linear-gradient(135deg, #ffeaa7, #fdcb6e);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 48px;
    position: relative;
    padding: 0;
    flex-shrink: 0;
}

#feed .op-story-tag {
    position: absolute;
    top: 8px;
    right: 8px;
    background: rgba(0,0,0,.5);
    color: white;
    font-size: 9px;
    font-weight: 800;
    padding: 3px 8px;
    border-radius: 12px;
}

#feed .op-avail-badge {
    position: absolute;
    top: 8px;
    left: 8px;
    background: rgba(40,167,69,.88);
    color: white;
    font-size: 9px;
    font-weight: 800;
    padding: 3px 8px;
    border-radius: 12px;
}

#feed .op-card-body {
    padding: 12px 14px;
    display: flex;
    flex-direction: column;
    gap: 5px;
    flex: 1;
}

#feed .op-card-resto {
    font-size: 11px;
    font-weight: 800;
    color: #E7A800;
    display: flex;
    align-items: center;
    gap: 4px;
}

#feed .op-card-city {
    color: #bbb;
    font-weight: 400;
}

#feed .op-card-title {
    font-size: 14px;
    font-weight: 900;
    color: #1E1A14;
    line-height: 1.3;
}

#feed .op-card-price {
    font-size: 15px;
    font-weight: 900;
    color: #C5603A;
}

#feed .op-card-avail {
    font-size: 10px;
    background: #eaffea;
    color: #27ae60;
    padding: 3px 8px;
    border-radius: 20px;
    font-weight: 700;
    display: inline-block;
}

#feed .op-card-desc {
    font-size: 12px;
    color: #7A6E62;
    line-height: 1.4;
}

#feed .op-card-actions {
    display: flex;
    gap: 7px;
    margin-top: 4px;
}

#feed .op-btn-like {
    flex: 1;
    padding: 8px 6px;
    border-radius: 8px;
    background: #F5D8CC;
    border: 1.5px solid #fce4ec;
    color: #C5603A;
    font-size: 11px;
    font-weight: 700;
    cursor: pointer;
    font-family: inherit;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    transition: background .15s;
}

#feed .op-btn-like:hover {
    background: #C5603A;
    color: white;
}

#feed .op-btn-compare {
    flex: 1;
    padding: 8px 6px;
    border-radius: 8px;
    background: #EEF4FF;
    border: 1.5px solid #d6eaf8;
    color: #2C6E82;
    font-size: 11px;
    font-weight: 700;
    text-decoration: none;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    transition: background .15s;
}

#feed .op-btn-compare:hover {
    background: #2C6E82;
    color: white;
}

#feed .op-card-share {
    display: flex;
    gap: 6px;
    margin-top: 6px;
}

#feed .op-share-wa {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    padding: 5px 10px;
    border-radius: 20px;
    background: #25D366;
    color: white;
    font-size: 10px;
    font-weight: 700;
    text-decoration: none;
}

#feed .op-share-fb {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    padding: 5px 10px;
    border-radius: 20px;
    background: #1877F2;
    color: white;
    font-size: 10px;
    font-weight: 700;
    text-decoration: none;
}


/* ── 6. MOBILE ──────────────────────────────────────────────
   ──────────────────────────────────────────────────────────── */

@media (max-width: 767px) {

    /* Owner Cards: 1 Spalte, volle Breite */
    #feed .op-cards-grid {
        grid-template-columns: 1fr;
        padding: 10px 12px 14px;
        gap: 10px;
    }

    #feed .op-card-img,
    #feed .op-card-img-placeholder {
        height: 200px;
        min-height: 200px;
    }

    #feed .op-btn-like,
    #feed .op-btn-compare {
        min-height: 44px;
        font-size: 12px;
        padding: 10px 6px;
    }

    #feed .op-share-wa,
    #feed .op-share-fb {
        padding: 8px 14px;
        font-size: 11px;
        min-height: 36px;
    }

    #feed .op-story-ring,
    #feed .op-story-add-btn {
        width: 56px;
        height: 56px;
        min-width: 56px;
        min-height: 56px;
    }

    #feed .op-stories-row {
        padding: 12px 12px 8px;
        gap: 10px;
    }
}