/* --- WORKING DESKTOP LAYOUT (UNCHANGED) --- */

/* Layout container */
.cogoves-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 0;
  margin: 0;
  padding: 0;
}

/* TEXT COLUMN */
.cogoves-text {
  flex: 2 1 0;                 /* wider column */
  display: flex;
  align-items: center;
  text-align: left;
  min-width: 0;
  margin: 0;
  padding: 0;
  font-size: 1.4em !important; /* keep text size */
}

.cogoves-text > p {
  margin: 0;
}

/* IMAGE COLUMN */
.cogoves-image-container {
  flex: 1 1 0;                 /* narrower column */
  display: flex;
  justify-content: center;
  align-items: center;
  min-width: 0;
  margin: 0;
  padding: 10px;               /* gutter ONLY around image */
}

.cogoves-image-container > p {
  margin: 0;
}

/* REMOVE ANCHOR DECORATION */
.cogoves-image-container a {
  display: block;
  text-decoration: none !important;
  color: inherit !important;
  outline: none !important;
  border: none !important;
  box-shadow: none !important;
}

.cogoves-image-container a:link,
.cogoves-image-container a:visited,
.cogoves-image-container a:hover,
.cogoves-image-container a:active,
.cogoves-image-container a:focus {
  text-decoration: none !important;
  color: inherit !important;
  outline: none !important;
  border: none !important;
  box-shadow: none !important;
}

/* IMAGE: DO NOT TRUNCATE */
.cogoves-image-container img {
  width: 100% !important;
  height: auto !important;
  object-fit: contain !important; 
  display: block;
  max-width: 100%;
}

/* --- MOBILE STACKED LAYOUT (ONLY APPLIES ≤640px) --- */
@media (max-width: 640px) {
  .cogoves-grid {
    flex-direction: column;       /* stack columns */
    gap: 0;
  }

  .cogoves-text,
  .cogoves-image-container {
    flex: none;
    width: 100%;
    min-width: 0;
  }

  /* Tighten vertical whitespace without changing font-size */
  .cogoves-text > p {
    margin: 0;
    line-height: 1.15;            /* tighter lines on mobile only */
  }

  /* Smaller vertical gutter; keep a little side gutter */
  .cogoves-image-container {
    padding: 4px 6px;             /* minimal top/bottom, small left/right */
  }

  .cogoves-image-container > p { margin: 0; }

  /* Remove inline line-height around the image link to kill extra vertical space */
  .cogoves-image-container a { 
    line-height: 0;               /* prevents extra whitespace around image */
  }

  /* Image fits width, never crops, no extra gaps */
  .cogoves-image-container img {
    width: 100% !important;
    height: auto !important;
    object-fit: contain !important;
    display: block;
    margin: 0;
  }
}
