/* ==========================================================
   AEGEO.GR – ΚΟΣΜΟΣ
   1 μεγάλη είδηση αριστερά + 4 δεξιά σε 2x2
   ΧΩΡΙΣ CROP
   ========================================================== */

.aegeo-kosmos-grid {
  width: 100%;
}


/* ==========================================================
   ΚΥΡΙΟ GRID
   50% | 25% | 25%
   ========================================================== */

.aegeo-kosmos-grid .view-content {
  display: grid !important;

  grid-template-columns:
    minmax(0, 2fr)
    minmax(0, 1fr)
    minmax(0, 1fr);

  column-gap: 28px;
  row-gap: 22px;

  width: 100%;
  margin: 0 !important;
}


/* ==========================================================
   1η ΕΙΔΗΣΗ – ΜΕΓΑΛΗ ΑΡΙΣΤΕΡΑ
   ========================================================== */

.aegeo-kosmos-grid
.view-content
> .views-row:first-child {
  grid-column: 1;
  grid-row: 1 / span 2;
}


/* Μεγάλη εικόνα */

.aegeo-kosmos-grid
.view-content
> .views-row:first-child
.views-field-field-image {
  margin: 0 0 10px;
}

.aegeo-kosmos-grid
.view-content
> .views-row:first-child
.views-field-field-image img {
  display: block;

  width: auto !important;
  max-width: 100% !important;
  height: auto !important;

  margin: 0;

  border-radius: 8px;
}


/* Μεγάλος τίτλος */

.aegeo-kosmos-grid
.view-content
> .views-row:first-child
.views-field-title {
  margin: 0 0 8px;
}

.aegeo-kosmos-grid
.view-content
> .views-row:first-child
.views-field-title a {
  display: block;

  color: #181818;

  font-size: 1.18rem;
  font-weight: 800;
  line-height: 1.28;

  text-decoration: none;
}

.aegeo-kosmos-grid
.view-content
> .views-row:first-child
.views-field-title a:hover {
  color: #b30000;
}


/* Intro */

.aegeo-kosmos-grid
.view-content
> .views-row:first-child
.views-field-body {
  margin: 0;

  color: #555;

  font-size: 0.92rem;
  font-weight: 400;
  line-height: 1.5;
}

.aegeo-kosmos-grid
.view-content
> .views-row:first-child
.views-field-body p {
  margin: 0;
}


/* ==========================================================
   2η – 5η ΕΙΔΗΣΗ
   ========================================================== */

.aegeo-kosmos-grid
.view-content
> .views-row:not(:first-child) {
  min-width: 0;
}


/* Εικόνες μικρών */

.aegeo-kosmos-grid
.view-content
> .views-row:not(:first-child)
.views-field-field-image {
  margin: 0 0 7px;
}

.aegeo-kosmos-grid
.view-content
> .views-row:not(:first-child)
.views-field-field-image img {
  display: block;

  width: 100% !important;
  max-width: 100% !important;
  height: auto !important;

  margin: 0;

  border-radius: 7px;
}


/* Τίτλοι μικρών */

.aegeo-kosmos-grid
.view-content
> .views-row:not(:first-child)
.views-field-title a {
  display: block;

  color: #222;

  font-size: 0.91rem;
  font-weight: 700;
  line-height: 1.3;

  text-decoration: none;
}

.aegeo-kosmos-grid
.view-content
> .views-row:not(:first-child)
.views-field-title a:hover {
  color: #b30000;
}


/* Body μόνο στην πρώτη είδηση */

.aegeo-kosmos-grid
.view-content
> .views-row:not(:first-child)
.views-field-body {
  display: none !important;
}


/* ==========================================================
   TABLET
   ========================================================== */

@media (max-width: 991px) {

  .aegeo-kosmos-grid .view-content {
    grid-template-columns:
      minmax(0, 1.4fr)
      minmax(0, 1fr);

    gap: 18px;
  }

  .aegeo-kosmos-grid
  .view-content
  > .views-row:first-child {
    grid-column: 1;
    grid-row: 1 / span 4;
  }
}


/* ==========================================================
   MOBILE
   ========================================================== */

@media (max-width: 768px) {

  .aegeo-kosmos-grid .view-content {
    display: block !important;
  }

  .aegeo-kosmos-grid
  .view-content
  > .views-row {
    width: 100% !important;

    padding: 14px 0 !important;

    border-bottom: 1px solid #e5e5e5;
  }

  .aegeo-kosmos-grid
  .view-content
  > .views-row:first-child {
    padding-top: 0 !important;
  }

  .aegeo-kosmos-grid
  .view-content
  > .views-row:first-child
  .views-field-title a {
    font-size: 1.05rem;
  }
}

/* */ 
.block:has(.aegeo-kosmos-grid) > h2,
.block:has(.aegeo-kosmos-grid) .block-title {
  margin: 0 0 14px 0 !important;
  padding: 2px 0 2px 10px !important;

  border-left: 4px solid #c40000 !important;

  color: #111 !important;
  font-size: 1rem !important;
  font-weight: 800 !important;
  line-height: 1.15 !important;

  text-transform: uppercase !important;
}

/* */
/* ΤΙΤΛΟΣ SECTION – ΚΟΣΜΟΣ */

h2:has(~ .content .aegeo-kosmos-grid) {
  margin: 0 0 14px 0 !important;
  padding: 2px 0 2px 10px !important;

  border-left: 4px solid #c40000 !important;

  color: #111 !important;
  font-size: 1rem !important;
  font-weight: 800 !important;
  line-height: 1.15 !important;

  text-transform: uppercase !important;
  
  
  
  /*  */
  /* Πρώτη είδηση: μόνο μεγάλη εικόνα */
.aegeo-kosmos-grid .views-row:first-child .kosmos-image-card {
  display: none;
}

/* 2η–5η: μόνο card image */
.aegeo-kosmos-grid .views-row:not(:first-child) .kosmos-image-large {
  display: none;
}

/* Card images */
.aegeo-kosmos-grid .kosmos-image-card img {
  display: block;
  width: 100%;
  max-width: 100%;
  height: auto;
  border-radius: 7px;
}
}

/** **/
/* ==========================================================
   ΚΟΣΜΟΣ – σωστή εικόνα ανά είδηση
   ========================================================== */

/* 1η είδηση:
   δείχνουμε μεγάλη, κρύβουμε card */
.aegeo-kosmos-grid
.views-row:first-child
.views-field-field-image-1 {
  display: block !important;
}

.aegeo-kosmos-grid
.views-row:first-child
.kosmos-image-card {
  display: none !important;
}


/* 2η–5η είδηση:
   κρύβουμε μεγάλη, δείχνουμε card */
.aegeo-kosmos-grid
.views-row:not(:first-child)
.views-field-field-image-1 {
  display: none !important;
}

.aegeo-kosmos-grid
.views-row:not(:first-child)
.kosmos-image-card {
  display: block !important;
}



/* ==========================================================
   ΚΟΣΜΟΣ – FIX μεγάλης εικόνας που μπαίνει στη δεξιά στήλη
   ========================================================== */

.aegeo-kosmos-grid .view-content {
  display: grid !important;

  grid-template-columns:
    minmax(0, 2fr)
    minmax(0, 1fr)
    minmax(0, 1fr);

  column-gap: 24px !important;
  row-gap: 22px !important;

  width: 100% !important;
  max-width: 100% !important;

  margin-left: 0 !important;
  margin-right: 0 !important;

  /* ακυρώνει Bootstrap gutter του .row */
  --bs-gutter-x: 0;
}


/* Η πρώτη είδηση ΔΕΝ επιτρέπεται να ξεφύγει από τη στήλη της */

.aegeo-kosmos-grid
.view-content
> .views-row:first-child {
  grid-column: 1;
  grid-row: 1 / span 2;

  width: 100% !important;
  max-width: 100% !important;
  min-width: 0 !important;

  overflow: hidden;
  box-sizing: border-box;
}


/* Όλοι οι wrappers της μεγάλης εικόνας */

.aegeo-kosmos-grid
.view-content
> .views-row:first-child
.views-field-field-image,

.aegeo-kosmos-grid
.view-content
> .views-row:first-child
.views-field-field-image .field-content,

.aegeo-kosmos-grid
.view-content
> .views-row:first-child
.views-field-field-image a {
  display: block;

  width: 100% !important;
  max-width: 100% !important;
  min-width: 0 !important;

  box-sizing: border-box;
}


/* Η ίδια η εικόνα */

.aegeo-kosmos-grid
.view-content
> .views-row:first-child
.views-field-field-image img {
  display: block;

  width: 100% !important;
  max-width: 100% !important;
  height: auto !important;

  margin: 0 !important;
  padding: 0 !important;

  box-sizing: border-box;

  border-radius: 8px;
}

/**διόρθωση κινητό **/
/* ==========================================================
   ΚΟΣΜΟΣ – MOBILE FINAL
   1 μεγάλη είδηση + 4 compact
   ========================================================== */

@media (max-width: 768px) {

  /* ------------------------------------------
     Καταργούμε εντελώς το desktop grid
     ------------------------------------------ */

  .aegeo-kosmos-grid .view-content {
    display: block !important;

    width: 100% !important;
    max-width: 100% !important;

    margin: 0 !important;
    padding: 0 !important;

    --bs-gutter-x: 0;
  }


  /* Όλες οι ειδήσεις */
  .aegeo-kosmos-grid
  .view-content
  > .views-row {
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;

    margin: 0 !important;
    box-sizing: border-box;
  }


  /* ========================================================
     1η ΕΙΔΗΣΗ – ΜΕΓΑΛΗ
     ======================================================== */

  .aegeo-kosmos-grid
  .view-content
  > .views-row:first-child {
    display: block !important;

    width: 100% !important;

    padding: 0 0 18px 0 !important;
    margin: 0 0 10px 0 !important;

    border-bottom: 1px solid #e1e1e1;

    overflow: visible !important;
  }


  /* Μεγάλη εικόνα – μόνο η large */
  .aegeo-kosmos-grid
  .views-row:first-child
  .views-field-field-image-1 {
    display: block !important;

    width: 100% !important;
    max-width: 100% !important;

    margin: 0 0 9px 0 !important;
  }


  .aegeo-kosmos-grid
  .views-row:first-child
  .views-field-field-image-1
  .field-content,

  .aegeo-kosmos-grid
  .views-row:first-child
  .views-field-field-image-1 a {
    display: block !important;

    width: 100% !important;
    max-width: 100% !important;
  }


  .aegeo-kosmos-grid
  .views-row:first-child
  .views-field-field-image-1 img {
    display: block !important;

    width: 100% !important;
    max-width: 100% !important;
    height: auto !important;

    margin: 0 !important;

    border-radius: 7px;
  }


  /* Δεν θέλουμε card εικόνα στην πρώτη */
  .aegeo-kosmos-grid
  .views-row:first-child
  .kosmos-image-card {
    display: none !important;
  }


  /* Τίτλος πρώτης */
  .aegeo-kosmos-grid
  .views-row:first-child
  .views-field-title {
    margin: 0 0 6px 0 !important;
    padding: 0 !important;
  }


  .aegeo-kosmos-grid
  .views-row:first-child
  .views-field-title a {
    display: block;

    color: #1c1c1c;

    font-size: 1rem !important;
    font-weight: 800;
    line-height: 1.28;

    text-decoration: none;
  }


  /* Intro πρώτης */
  .aegeo-kosmos-grid
  .views-row:first-child
  .views-field-body {
    display: block !important;

    margin: 0 !important;
    padding: 0 !important;

    color: #666;

    font-size: .86rem;
    line-height: 1.4;
  }


  .aegeo-kosmos-grid
  .views-row:first-child
  .views-field-body p {
    margin: 0;
  }


  /* ========================================================
     2η – 5η ΕΙΔΗΣΗ
     compact horizontal
     ======================================================== */

  .aegeo-kosmos-grid
  .view-content
  > .views-row:not(:first-child) {
    display: grid !important;

    grid-template-columns: 100px minmax(0, 1fr) !important;

    gap: 11px;

    align-items: start;

    padding: 12px 0 !important;
    margin: 0 !important;

    border-bottom: 1px solid #e1e1e1;
  }


  /* Κρύβουμε large image στις μικρές */
  .aegeo-kosmos-grid
  .views-row:not(:first-child)
  .views-field-field-image-1 {
    display: none !important;
  }


  /* Εμφανίζουμε card image */
  .aegeo-kosmos-grid
  .views-row:not(:first-child)
  .kosmos-image-card {
    display: block !important;

    width: 100px !important;

    margin: 0 !important;
    padding: 0 !important;
  }


  .aegeo-kosmos-grid
  .views-row:not(:first-child)
  .kosmos-image-card
  .field-content,

  .aegeo-kosmos-grid
  .views-row:not(:first-child)
  .kosmos-image-card a {
    display: block;

    width: 100%;
  }


  .aegeo-kosmos-grid
  .views-row:not(:first-child)
  .kosmos-image-card img {
    display: block !important;

    width: 100px !important;
    max-width: 100% !important;
    height: auto !important;

    margin: 0 !important;

    border-radius: 6px;
  }


  /* Compact τίτλοι */
  .aegeo-kosmos-grid
  .views-row:not(:first-child)
  .views-field-title {
    min-width: 0;

    margin: 0 !important;
    padding: 0 !important;
  }


  .aegeo-kosmos-grid
  .views-row:not(:first-child)
  .views-field-title a {
    display: block;

    color: #222;

    font-size: .9rem !important;
    font-weight: 700;
    line-height: 1.28;

    text-decoration: none;
  }


  /* Body μόνο στην πρώτη */
  .aegeo-kosmos-grid
  .views-row:not(:first-child)
  .views-field-body {
    display: none !important;
  }


  /* Τελευταία χωρίς γραμμή */
  .aegeo-kosmos-grid
  .view-content
  > .views-row:last-child {
    border-bottom: 0;
  }
}
