/*
 Theme Name:   Twenty Twenty-Five Child
 Theme URI:    https://ri-level.de/
 Description:  My custom child theme for Twenty Twenty-Five
 Author:       Your Name
 Author URI:   https://ri-level.de/
 Template:     twentytwentyfive
 Version:      1.0.0
*/

/* --- Your Custom CSS Goes Below This Line --- */

.card {
  transition: 0.3s;
  cursor: pointer;
}

.card:hover {
  transform: scale(1.06);
}

.button-with-icon .wp-block-button__link {
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 140px;
}

.button-with-icon .wp-block-button__link img {
  margin-right: 12px !important;
  flex-shrink: 0;
}



/* 
RESPONSIVE STACK LAYOUT - for lists
 */

.responsive-stack-layout {
  max-width: 1200px;
  display: flex;
  flex-direction: column;
  gap: 20px;
  padding: 20px;
  margin: 50px 0;
  background-color: #eaeeeb;
  border-radius: 50px;
}

/* DESKTOP STYLES */
.responsive-stack-layout > * {
  /* On desktop, use a flexbox layout */
  display: flex;
  align-items: center; /* Vertically align items in the center */
  gap: 20px;
  padding: 20px;
  margin: 0;
  background-color: white;
  border-radius: 40px;
}

.responsive-stack-layout > * > * {
  min-width: 0; /* Allow items to shrink below their content's size */
  margin: 0;
}

.responsive-stack-layout > * > *:has(img) {
  flex: 0 0 300px;
}

.responsive-stack-layout > * > *:not(:has(img)) {
  flex: 1 1 auto;
  padding: 10px;
}

/* Ensure the image fills its column. */
.responsive-stack-layout img {
  width: 100%;
  min-width: 0;
  height: auto;
  display: block; /* Removes any extra space below the image */
  border: 3px solid black;
  border-radius: 30px;
}

/* MOBILE STYLES */
@media (max-width: 782px) {
  .responsive-stack-layout > *{
    flex-direction: column;
  }

  .responsive-stack-layout img {
    max-width: 300px;
    width: 100%;
  }

  /* Control the stacking order to ensure image is always second */
  .responsive-stack-layout > * > *:has(img) {
    order: 2; /* The image block comes second */ 
    flex: none;
    justify-content: center;
  }

  .responsive-stack-layout > * > *:not(:has(img)) {
    order: 1; /* The text block comes first */
  }
}

