/*
 ASEMANEEHA - PHASE 312
 Desktop calendar alignment and responsive sizing.
 Mobile/tablet layout remains unchanged.
*/

@media screen and (min-width: 1025px) {

  /* Main shared frame */
  .asem-home-responsive-223
  .asem-home-calendar-222
  > div.bg-darkblue-100 {
    display: flex !important;
    flex-direction: row !important;
    align-items: flex-start !important;
    justify-content: space-between !important;
    gap: clamp(12px, 1.5vw, 24px) !important;
    min-height: 380px !important;
    max-height: none !important;
    height: auto !important;
    box-sizing: border-box !important;
  }

  /* Martyrs panel: occupy remaining available space */
  .asem-home-responsive-223
  .asem-home-calendar-222
  > div.bg-darkblue-100
  > div.left-16 {
    flex: 1 1 0 !important;
    width: auto !important;
    max-width: none !important;
    min-width: 0 !important;
    left: 0 !important;
    margin: 0 !important;
    align-self: flex-start !important;
  }

  /* Calendar: align with the top of the martyrs panel */
  .asem-home-responsive-223
  .asem-home-calendar-222
  div[class*="bg-[url(/images/home/calendar/bg.png)]"] {
    position: relative !important;
    top: 0 !important;
    bottom: auto !important;
    transform: none !important;
    align-self: flex-start !important;

    flex: 0 0 300px !important;
    width: 300px !important;
    min-width: 300px !important;
    max-width: 300px !important;

    height: auto !important;
    min-height: 0 !important;
    max-height: none !important;
    aspect-ratio: auto !important;
    box-sizing: border-box !important;
  }

  /* Keep calendar day grid inside its frame */
  .asem-home-responsive-223
  .asem-home-calendar-222
  div[class*="bg-[url(/images/home/calendar/bg.png)]"]
  > div.grid {
    min-width: 0 !important;
    box-sizing: border-box !important;
  }

  /* Prevent navigation controls from overflowing */
  .asem-home-responsive-223
  .asem-home-calendar-222
  div[class*="bg-[url(/images/home/calendar/bg.png)]"]
  > div:last-child {
    gap: 4px !important;
    box-sizing: border-box !important;
  }
}

/* Larger desktop: scale the calendar with available space */
@media screen and (min-width: 1500px) {

  .asem-home-responsive-223
  .asem-home-calendar-222
  div[class*="bg-[url(/images/home/calendar/bg.png)]"] {
    flex-basis: clamp(300px, 21vw, 370px) !important;
    width: clamp(300px, 21vw, 370px) !important;
    min-width: 300px !important;
    max-width: 370px !important;
  }

  .asem-home-responsive-223
  .asem-home-calendar-222
  div[class*="bg-[url(/images/home/calendar/bg.png)]"]
  > div.grid {
    gap: 4px !important;
    padding: 12px !important;
  }
}

/* Medium desktop: preserve space for martyr cards */
@media screen and (min-width: 1025px) and (max-width: 1199px) {

  .asem-home-responsive-223
  .asem-home-calendar-222 {
    padding-left: 16px !important;
    padding-right: 16px !important;
  }

  .asem-home-responsive-223
  .asem-home-calendar-222
  > div.bg-darkblue-100 {
    gap: 12px !important;
  }

  .asem-home-responsive-223
  .asem-home-calendar-222
  div[class*="bg-[url(/images/home/calendar/bg.png)]"] {
    flex-basis: 300px !important;
  }
}