/* RESPONSIVE */
@media (max-width: 480px) {
  :root {
    --fs-xs: 0.95rem;
		--fs-base: 1.2rem;
		--fs-lg: 1.4rem;
		--fs-xl: 1.6rem;
		--fs-hero: 2.3rem;
	}

  .container {
    padding: 0 18px;
  }

}

@media (max-width: 768px) {

	:root {
    --fs-xs: 0.85rem;
		--fs-base: 1.05rem;
		--fs-lg: 1.1rem;
		--fs-xl: 1.6rem;
		--fs-hero: 2.3rem;
	}

  /* Remove section spacing */
  #about.section {
    padding-left: 0;
    padding-right: 0;
  }

  /* Remove container width restriction */
  #about .container {
    width: 100%;
    padding: 0;
  }

  /* Force card full width */
  #about .card {
    max-width: 100%;
    margin: 0;
    border-radius: 0;
  }

/*-----------------------------------------------------------------------*/

/* CALENDAR MOBILE */
  /* Disable desktop hover */
  .calendar-item:hover .calendar-dropdown {
    transform: none;
  }

  .calendar-item {
    width: 100%;
  }

  .calendar-dropdown {
    position: static;
    width: 100%;
    max-width: 100%;

    transform: none;

    max-height: 0;
    overflow: hidden;

    opacity: 1;
    visibility: visible;

    box-shadow: none;
    border-radius: 0;

    padding: 0;

    transition: max-height 0.3s ease, padding 0.3s ease;
  }

  .calendar-item.open .calendar-dropdown {
    max-height: 800px;
    padding: 16px 16px 24px;
  }

  .mini-calendar {
    width: 100%;
  }

  .mini-calendar-header {
    justify-content: space-between;
  }

  .mini-calendar-grid {
    width: 100%;
  }

/*-----------------------------------------------------------------------*/

/* Text Scaling */

  h3 {
    font-size: var(--fs-lg);
  }

  p {
    font-size: var(--fs-base);
  }

  .hero h1 {
    font-size: var(--fs-hero);
  }

  .hero p {
    font-size: var(--fs-xs);
    padding: 0 10px;
  }

  .btn-primary {
    padding: 14px 28px;
    font-size: var(--fs-xxs);
  }

  a {
    font-size: var(--fs-base);
  }

/* HEADER */
   .hero {
    min-height: auto;
    padding: 120px 0 80px;
  }

  .header-inner {
    height: 70px;
  }

  .logo img {
    height: 60px;
  }

  /* News cards */
  .news-grid {
    grid-template-columns: 1fr;
  }

  .news-card {
    min-height: auto;
  }

  /* Text spacing */
	#about .card {
    text-align: left;   /* only about page */
		padding: 20px;
  }

	.team-inline {
			margin: 30px 0;
	}

  .news-article-content p {
    hyphens: auto;
  }

	/* contact cards */
	.contact-card {
    padding: 24px;   /* if your global .card padding feels too big on phone */
    gap: 6px;
  }

	.contact-card a {
		word-break: break-word;
		overflow-wrap: anywhere;
		font-size: var(--fs-xxs);
	}

  /* about us cards */
  .team-card img {
    aspect-ratio: 1 / 1;  /* square on mobile */
  }

  .team-grid {
    display: grid;
    grid-template-columns: 1fr;  /* one column */
    gap: var(--space-md);
  }

	/* Footer */
	.footer {
		padding: 50px 0 30px;
	}

	.partners {
		grid-template-columns: repeat(2, 1fr);
		gap: 24px;
	}

	.partners img {
		max-width: 110px;
	}

	.footer p {
		font-size: 0.85rem;
	}

}

/* ================================================================================================================================================================== */
/* -----------------------------------------------------------------------------------1024px------------------------------------------------------------------------- */

@media (max-width: 1024px) {
  /* Archive */
  .archive-layout {
    grid-template-columns: 1fr;
  }

  .archive-viewer{
    padding:25px;
  }

  .archive-image img{
    max-height:420px;
  }

  .archive-slider-nav button{
    padding:8px 12px;
  }

  #prevArticle{
    left:-10px;
  }

  #nextArticle{
    right:-10px;
  }

  /* ================= MOBILE MENU ================= */

  .burger {
    display: flex;
  }

  .nav {
    position: fixed;
    top: 0;
    left: 0;

    width: 100%;
    height: 100vh;

    background: #fff;

    display: flex;
    flex-direction: column;
    align-items: flex-start;

    padding: 120px 24px 40px;

    transform: translateX(-100%);
    transition: transform 0.35s ease;

    z-index: 2000;
    overflow-y: auto;
  }

  .nav.open {
    transform: translateX(0);
  }

  .nav a {
    margin: 12px 0;
    display: block;
    width: 100%;
    padding: 16px 0;
    border-bottom: 1px solid #e5e5e5;
    font-weight: 500;
    font-size: var(--fs-base);
  }

  .nav a:active,
  .nav a:hover {
    background: #f5f5f5;
    padding-left: 8px;
    transition: 0.2s ease;
  }

  /* ================= EU DROPDOWN ================= */

  .eu-dropdown {
  position: static;
  transform: none;
  box-shadow: none;

  max-height: 0;
  overflow: hidden;

  opacity: 0;
  visibility: hidden;

  transition: max-height 0.3s ease, opacity 0.3s ease;

  margin-top: 3px;

  padding-left: 0;
  border-left: none;
  border-bottom: none;

  font-size: var(--fs-xs);
}

.eu-dropdown.open {
  max-height: 300px;
  opacity: 1;
  visibility: visible;

  padding-left: 15px;
  border-left: 3px solid var(--red);
  border-bottom: 1px solid rgba(211,47,47,0.15);
}

  .eu-item:hover .eu-dropdown {
    transform: none;
  }

  /* ================================================= */
  /* ================= CALENDAR MOBILE =============== */
  /* ================================================= */

  /* Disable desktop hover */
  .calendar-item:hover .calendar-dropdown {
    transform: none;
  }

  .calendar-item {
    width: 100%;
  }

  .calendar-dropdown {
    position: static;

    width: 100%;
    max-width: 420px;      /* prevents billboard stretching */
    margin: 0 auto;        /* center inside nav */

    transform: none;

    max-height: 0;
    overflow: hidden;

    opacity: 1;
    visibility: visible;

    box-shadow: none;
    border-radius: 12px;

    padding: 0;

    transition: max-height 0.3s ease, padding 0.3s ease;
  }

  .calendar-item.open .calendar-dropdown {
    max-height: 800px;
    padding: 16px 16px 24px;
  }
  
}

@media (max-width: 1280px) {

  :root {
    --fs-xs: 0.85rem;
    --fs-md: 0.9rem;
		--fs-base: 1.05rem;
		--fs-lg: 1.1rem;
		--fs-xl: 1.6rem;
		--fs-hero: 2.3rem;
	}

  /* text scaling */
  .nav a {
    font-size: var(--fs-base);
  }

  .card{
    text-align: justify;
    hyphens: auto;
  }

  /* container padding */
  .container {
    padding: 0 40px;
  }

  /* about card padding */
  #about .card {
    padding: 60px;
  }

  /* eu section padding */
  .eu-section {
    padding: var(--space-xl) 0;
  }

  /* news page articles */
  .news-article,
  .news-article.reverse {
    flex-direction: column;
  }

  .news-article-image,
  .news-article-content {
    flex: 1 1 100%;
  }

  .news-list-section {
    padding: 60px 0;
  }

  /* eu pages */
  .eu-card {
    padding: 30px;
  }

  .twinnet-article {
    flex-direction: column;
  }
  
}
/* ARCHIVE */
/* ================= LARGE DESKTOP ================= */

@media (min-width: 1600px){
  .archive-layout{
    grid-template-columns: 1fr minmax(920px, 1120px) minmax(240px, 320px);
    gap: 40px;
  }

  .archive-viewer{
    padding: 50px;
  }

  .archive-image img{
    height: min(80vh, 940px);
  }
}

/* ================= TABLET ================= */

@media (max-width: 1280px){
  .archive-section{
    padding: 120px 0 90px;
    overflow-x: clip;
  }

  .archive-section .container{
    width: 100%;
    max-width: 1100px;
    padding-left: 24px;
    padding-right: 24px;
    margin: 0 auto;
  }

  .archive-layout{
    grid-template-columns: minmax(0, 1fr);
    gap: 24px;
    justify-items: center;
  }

  .archive-viewer{
    grid-column: auto;
    width: 100%;
    max-width: 960px;
    min-width: 0;
    padding: 34px;
    margin: 0 auto;
  }

  .archive-image{
    min-width: 0;
  }

  .archive-image img{
    width: 100%;
    height: min(68vh, 720px);
    max-width: 100%;
  }

  .archive-thumbnails{
    max-width: 100%;
  }

  .archive-sidebar-toggle{
    display: inline-flex;
    align-items: center;
    justify-content: center;

    top: 124px;
    right: 24px;
    transition:
      background 0.2s ease,
      transform 0.2s ease,
      box-shadow 0.2s ease,
      opacity 0.2s ease,
      visibility 0.2s ease;
    padding: 12px 18px;
    font-size: 0.95rem;
    line-height: 1.1;
    white-space: nowrap;
  }

  .archive-sidebar-overlay{
    display: block;
  }

  /* compact dropdown / drawer */
  .archive-sidebar{
    grid-column: auto;
    position: fixed;
    top: 118px;
    right: 24px;
    bottom: auto;
    width: auto;
    max-width: calc(100vw - 48px);
    padding: 0;
    z-index: 1400;

    transform: translateX(calc(100% + 18px));
    transition: transform 0.28s ease;
  }

  .archive-sidebar ul{
    width: fit-content;
    min-width: 240px;
    max-width: min(340px, calc(100vw - 48px));
    max-height: min(70vh, 420px);
    height: auto;
    overflow-y: auto;

    padding: 18px 18px 18px 32px;
    gap: 10px;
    border-radius: 20px;
  }

  body.archive-sidebar-open .archive-sidebar{
    transform: translateX(0);
  }

  body.archive-sidebar-open .archive-sidebar-overlay{
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
  }

  body.archive-sidebar-open .archive-sidebar-toggle{
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
  }
}


/* ================= MOBILE / SMALL TABLET ================= */

@media (max-width: 1024px){

  .archive-image button{
    display: none;
  }

  .archive-image img{
    touch-action: pan-y;
    user-select: none;
    -webkit-user-drag: none;
  }

  .archive-image button{
    display: none;
  }

  .archive-image img{
    touch-action: pan-y;
    user-select: none;
    -webkit-user-drag: none;
  }

  .archive-layout{
    gap: 22px;
  }

  .archive-section .container{
    max-width: 100%;
    padding-left: 18px;
    padding-right: 18px;
  }

  .archive-viewer{
    padding: 22px;
  }

  .archive-sidebar-toggle{
    top: 116px;
    right: 18px;
    padding: 11px 16px;
    font-size: 0.92rem;
  }

  .archive-sidebar{
    top: 110px;
    right: 18px;
    max-width: calc(100vw - 36px);
  }

  .archive-sidebar ul{
    min-width: 220px;
    max-width: min(300px, calc(100vw - 36px));
    max-height: min(65vh, 360px);
    padding: 16px 16px 16px 32px;
    gap: 10px;
  }

  .archive-image img{
    height: auto;
    max-height: 420px;
  }

  .archive-image button{
    width: 42px;
    height: 42px;
    font-size: 18px;
  }

  #prevArticle{
    left: 10px;
  }

  #nextArticle{
    right: 10px;
  }

  .archive-thumbnails img{
    width: 70px;
    height: 55px;
  }
}


/* ================= PHONE ================= */

@media (max-width: 768px){

  .archive-section{
    padding: 96px 0 72px;
    padding-left: 0;
    padding-right: 0;
  }

  .archive-section .container{
    width: 100%;
    max-width: 100%;
    padding: 0;
  }

  .archive-layout{
    gap: 22px;
  }

  .archive-viewer{
    width: 100%;
    max-width: 100%;
    margin: 0;
    padding: 16px;
    border-radius: 0;
  }

  .archive-sidebar-toggle{
    top: 104px;
    right: 12px;
    padding: 10px 14px;
    font-size: 0.88rem;
  }

  .archive-sidebar{
    top: 98px;
    right: 12px;
    max-width: calc(100vw - 24px);
  }

  .archive-sidebar ul{
    min-width: 0;
    width: max-content;
    max-width: min(260px, calc(100vw - 24px));
    max-height: min(60vh, 320px);
    padding: 14px 16px 14px 32px;
    border-radius: 16px;
  }

  #prevArticle{
    left: 8px;
  }

  #nextArticle{
    right: 8px;
  }

  .archive-sidebar li{
    font-size: 0.96rem;
  }

  .archive-thumbnails{
    gap: 8px;
  }

  .archive-thumbnails img{
    width: 62px;
    height: 48px;
    border-radius: 8px;
  }

  .archive-counter{
    font-size: 0.88rem;
  }

  #archiveTitle{
    font-size: 1.5rem;
  }

  #archiveText{
    font-size: 0.96rem;
    line-height: 1.7;
  }

  .archive-image img{
    max-height: 300px;
    border-radius: 0;
  }

  .archive-image button{
    width: 38px;
    height: 38px;
    font-size: 16px;
  }
}