/**
 * @file
 * The /offers listing and its teaser cards.
 *
 * Ported from D7's odigos.css: `.view-offers .views-row` (three-up grid on a
 * grey card, min-height 500px) plus the two small-icon rules the Display Suite
 * `offer_category` / `offer_region` fields carried. Icon files are already in
 * this theme (images/icons/category.png, images/icons/region.png -- the same
 * assets D7 kept in css/images/custom/small/).
 */

/*
 * Row 12 (theme register 2026-09-02, P6.19) -- the full-node offer page
 * (D7: `.node-offer.view-mode-full{background-color:#eee;padding:25px}`,
 * odigos.css:1976-1979) had no D11 counterpart; D11's class convention on
 * that view mode is `node--type-offer.node--view-mode-full` (BEM
 * double-dash), not D7's `.node-offer.view-mode-full`. D11 has no separate
 * "article" content type (D7's `.node-article.view-mode-full` half of the
 * same rule has nothing to match here), so only the offer half is ported.
 */.node--type-offer.node--view-mode-full,
.node--type-article.node--view-mode-full {
  background-color: var(--color-muted-bg);
  padding: 25px;
}

.node--type-offer.node--view-mode-full .field-name-field-offer-photo,
.node--type-article.node--view-mode-full .field-name-field-image {
  width: 50%;
  margin-bottom: 25px;
}

@media all and (max-width: 640px) {
  .node--type-offer.node--view-mode-full .field-name-field-offer-photo,
.node--type-article.node--view-mode-full .field-name-field-image {
    width: 100%;
  }
}

.node--type-offer.node--view-mode-full .field-name-all-offers,
.node--type-article.node--view-mode-full .field-name-all-articles {
  text-align: center;
}

/*
 * DG-310: the rest of D7's full offer/article layout, measured on live
 * /el/offers/chlorion-hlorini-ygri: photo at natural size in a `10px 0`
 * figure (fields.css:15, 34-44), inline "ΗΜΕΡΟΜΗΝΙΑ: 13/05/2019" labels,
 * 5px between fields, and the all-offers button (link.css).
 */
.node--type-offer.node--view-mode-full .field-name-field-offer-photo figure,
.node--type-article.node--view-mode-full .field-name-field-image figure {
  margin: 10px 0;
}

.node--type-offer.node--view-mode-full .field-name-field-offer-photo img,
.node--type-article.node--view-mode-full .field-name-field-image img {
  display: block;
}

.node--type-offer.node--view-mode-full .node__content > .field:not(.field-name-all-offers, .field-name-field-offer-photo),
.node--type-article.node--view-mode-full .node__content > .field:not(.field-name-all-articles, .field-name-field-image) {
  margin-bottom: 5px;
}

/* Floated, as D7's core field.css: on a phone a two-line business name
   drops below its label (measured live at 360px), on desktop both share
   the line. */
.node--type-offer.node--view-mode-full .field-label-inline .field-label,
.node--type-offer.node--view-mode-full .field-label-inline .field-items,
.node--type-article.node--view-mode-full .field-label-inline .field-label,
.node--type-article.node--view-mode-full .field-label-inline .field-items {
  float: left;
}

.node--type-offer.node--view-mode-full .field-label-inline .field-items > .field,
.node--type-article.node--view-mode-full .field-label-inline .field-items > .field {
  display: inline;
}

.node--type-offer.node--view-mode-full .field-label,
.node--type-article.node--view-mode-full .field-label {
  margin-right: 5px;
}

.view-offers .views-row,
.view-articles .views-row {
  display: inline-block;
  vertical-align: top;
  width: 31.5%;
  margin-right: 2%;
  margin-bottom: 25px;
  padding: 25px;
  /* DG-310: thebestguide frames the card (odigos_thebestguide.css:2325-2332). */
  border: 2px solid #ddd;
  background: var(--color-muted-bg);
  min-height: 500px;
}

/*
 * DG-310: the teaser photo is D7's generic `.field-type-image` crop
 * (fields.css:15-25): a 180px cover image, top-anchored, shown through a
 * 120px window with 10px above and below -- measured live on /el/offers.
 */
.view-offers .views-row .field--type-image,
.view-articles .views-row .field--type-image {
  height: 120px;
  /* 10px figure margin plus 4px from D7's inline `span.field-content`
     wrapper: the title starts at 171 on live, 14px under the window. */
  margin: 10px 0 14px;
  overflow: hidden;
}

.view-offers .views-row .field--type-image img,
.view-articles .views-row .field--type-image img {
  display: block;
  width: 100%;
  height: 180px;
  object-fit: cover;
  object-position: top center;
}

/*
 * D7 floats inline labels (core field.css), so "ΕΠΙΧΕΙΡΗΣΗ:" sits alone and
 * the business name wraps below it; D7's label is a 30px line (its text is a
 * 1rem ::after on a 0-size label, odigos_thebestguide.css:1840-1848).
 */
.view-offers .views-row .field-label-inline .field-label,
.view-offers .views-row .field-label-inline .field-items,
.view-articles .views-row .field-label-inline .field-label,
.view-articles .views-row .field-label-inline .field-items {
  float: left;
}

.view-offers .views-row .field-label-inline .field-label {
  padding-bottom: 5px;
}

/* Articles carry no ::after label trick (25px lines), and their business
   label is a full-width line above the name (measured live). */
.view-articles .views-row .field-name-field-article-ref-customer .field-label {
  float: none;
  display: block;
}

/* A card without a photo starts 14px down: D7's photo window margins
   (10px + 4px) stay in the inline wrapper (measured live, /el/articles). */
.view-offers .views-row .node:not(:has(.field--type-image)),
.view-articles .views-row .node:not(:has(.field--type-image)) {
  padding-top: 14px;
}

.view-offers .views-row:nth-child(3n),
.view-articles .views-row:nth-child(3n) {
  margin-right: 0;
}

.node-offer .field-name-title-field a,
.node-offer .field-name-field-offer-ref-customer a,
.node-article .field-name-title-field a,
.node-article .field-name-field-article-ref-customer a,
.node--type-offer .field-name-field-offer-ref-customer a,
.node--type-article .field-name-field-article-ref-customer a {
  color: #333;
}

.node-offer .field-name-title-field a:hover,
.node-offer .field-name-field-offer-ref-customer a:hover,
.node-article .field-name-title-field a:hover,
.node-article .field-name-field-article-ref-customer a:hover,
.node--type-offer .field-name-field-offer-ref-customer a:hover,
.node--type-article .field-name-field-article-ref-customer a:hover {
  color: #f9a715;
}

.node-offer .field-label,
.node-article .field-label {
  margin-right: 5px;
}

.node-offer .field-label-inline .field-label,
.node-offer .field-label-inline .field-items,
.node-article .field-label-inline .field-label,
.node-article .field-label-inline .field-items {
  display: inline;
}

.field-name-offer-category,
.field-name-offer-region,
.field-name-article-category {
  padding-left: 25px;
  background-position: left 5px;
  background-repeat: no-repeat;
  background-attachment: scroll;
}

.field-name-offer-category,
.field-name-article-category {
  background-image: url("../../images/icons/category.png");
}

.field-name-offer-region {
  background-image: url("../../images/icons/region.png");
}

@media all and (max-width: 640px) {.view-offers .views-row,
.view-offers .views-row:nth-child(3n),
.view-articles .views-row,
.view-articles .views-row:nth-child(3n) {
    width: 46.5%;
    margin-right: 5%;
  }
}

@media all and (max-width: 640px) {.view-offers .views-row:nth-child(2n),
.view-articles .views-row:nth-child(2n) {
    margin-right: 0;
  }
}

/* DG-310: odigos_thebestguide.css (max-width:480px) -- cards shrink to
   their content on phones. */
@media (max-width: 480px) {
  .view-offers .views-row,
  .view-articles .views-row {
    min-height: auto;
  }
}

@media all and (max-width: 480px) {.view-offers .views-row,
.view-offers .views-row:nth-child(3n),
.view-articles .views-row,
.view-articles .views-row:nth-child(3n) {
    width: 100%;
    margin-right: 0;
    float: none;
  }
}
