@font-face {
  font-family: 'Nostra-Stream';
  src: url('Ressources/NOSTRA/Nostra-Stream.woff2') format('woff2');
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: "Nostra-Stream";
  background-color: #fff;
}

.container {
  display: flex;
  flex-direction: column;
  height: 100vh;
  width: 100%;
}

/* Top info section */
.info-section {
  padding: 0;
  border-bottom: none;
  min-height: 100px;
  overflow-y: auto;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: display 0.3s ease-out;
}

.info-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 60px;
  width: 100%;
  position: relative;
  height: 100%;
  padding: 0;
  margin: 0;
  flex-direction: row-reverse;
}

.info-links {
  display: flex;
  flex-direction: column;
  gap: 10px;
  position: relative;
  left: auto;
  top: auto;
  transform: none;
  align-items: flex-end;
  padding-right: 1.2%;
}

.info-links a {
  color: #333;
  text-decoration: none;
  font-size: clamp(14px, 3vw, 16px);
  font-weight: 500;
  transition: color 0.3s ease;
}

.info-links a:hover {
  color: #666;
  text-decoration: underline;
}

.info-section h1 {
  margin: 0;
  padding: 0;
  font-size: clamp(24px, 8vw, 56px);
  text-align: left;
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  height: 100%;
  line-height: 1.2;
  padding-left: 1.2%;
}

.info-section p {
  color: #666;
  font-size: clamp(14px, 3vw, 16px);
}

/* Hide info section when column is expanded */
.info-section.hidden {
  display: none;
}

/* Carousel section */
.carousel-wrapper {
  flex: 1;
  display: flex;
  position: relative;
  overflow: hidden;
  padding: 0;
  margin: 0;
}

.carousel-container {
  width: 100%;
  overflow-x: scroll;
  scroll-behavior: smooth;
  display: flex;
  gap: 0px;
  padding: 0;
  margin: 0;
}

.carousel-container::-webkit-scrollbar {
  display: none;
}

.carousel-container {
  -ms-overflow-style: none;
  scrollbar-width: none;
}

/* Column styling */
.column {
  flex-shrink: 0;
  width: 37.33%;
  border: none;
  padding: 0px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  overflow: hidden;
  border-radius: 30px;
  position: relative;
  box-shadow: none;
  transition: all 0.3s ease;
  margin-bottom: 1%;
}

.column:hover {
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.35);
}

/* Add margin on right side except for last column */
.column:not(:last-child) {
  margin-right: 1%;
}

/* Add margin to first column on left */
.column:first-child {
  margin-left: 1%;
}

/* Add margin to last column on right */
.column:last-child {
  margin-right: 1%;
}

/* Content area - now takes full height since title is overlaid */
.column-content {
  width: 100%;
  height: 100%;
  overflow-y: auto;
  overflow-x: hidden;
}

.column-content img {
  width: 100%;
  height: auto;
  display: block;
  background-color: #e0e0e0;
  object-fit: cover;
}

.column-content video {
  width: 100%;
  height: auto;
  display: block;
  background-color: #2a2a2a;
  object-fit: cover;
}

/* Title area - overlay at bottom left */
.column-title {
  position: absolute;
  bottom: 0;
  left: 0;
  padding: 20px;
  z-index: 10;
}

.column-title h2 {
  font-size: clamp(14px, 3vw, 18px);
  color: white;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.7);
  margin: 0;
}

/* Navigation buttons */
.carousel-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 20;
  background: none;
  border: none;
  font-size: clamp(20px, 5vw, 24px);
  cursor: pointer;
  padding: 10px;
  text-shadow: 2px 2px 2px white;
}

.left-btn {
  left: 10px;
  font-size: 48px;
  font-family: "Nostra-Stream";
}

.right-btn {
  right: 10px;
  font-size: 48px;
  font-family: "Nostra-Stream";
}

.carousel-btn:disabled {
  opacity: 0.2;
  cursor: not-allowed;
}

.carousel-btn:not(:disabled) {
  opacity: 1;
}

/* Expanded column styles */
.column.expanded {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  z-index: 1000;
  border-radius: 0;
  box-shadow: none;
  margin: 0 !important;
  display: flex;
  flex-direction: column;
  background-color: #ffffff;
}

/* Grid container for expanded content */
.column.expanded .column-content {
  display: grid !important;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  padding: 0;
  margin: 0;
  overflow-y: auto;
  height: 100vh;
  width: 100%;
  align-content: start;
  padding-top: 15%;
  padding-left: 1%;
  padding-right: 1%;
  padding-bottom: 1%;
  box-sizing: border-box;
}

.column.expanded .column-content video,
.column.expanded .column-content img {
  width: 100%;
  height: auto;
  object-fit: contain;
  border-radius: 12px;
  cursor: pointer;
}

.column.expanded .column-content video:hover,
.column.expanded .column-content img:hover {
  transform: none;
}

/* Hide column info when expanded */
.column.expanded .column-info {
  display: none !important;
}

/* Show and style title container at top right */
.column.expanded .column-title {
  display: flex !important;
  position: absolute;
  top: 20px;
  right: 20px;
  left: auto !important;
  padding: 0 !important;
  z-index: 3;
  flex-direction: column;
  align-items: flex-end;
  width: auto;
  height: auto;
}

.column.expanded .column-title h2 {
  font-size: clamp(32px, 10vw, 72px);
  color: #333;
  text-shadow: none;
  margin: 0;
  font-weight: 700;
  white-space: nowrap;
}

/* Description under title - only in expanded view */
.column.expanded .column-title .text-info {
  display: block !important;
  margin-top: 15px;
  font-size: clamp(12px, 2vw, 16px);
  color: #666;
  padding-right:20px;
  max-width: 515px;
  text-align: right;
  line-height: 1.2;
  font-family: Arial, sans-serif;
  font-weight: normal;
}

/* Hide description on landing page */
.column-title .text-info {
  display: none !important;
}

/* Videos z-index in expanded view */
.column.expanded .column-content {
  z-index: 4;
}

.column.expanded .column-content video,
.column.expanded .column-content img {
  width: 100%;
  height: auto;
  object-fit: contain;
  border-radius: 12px;
  cursor: pointer;
  z-index: 2;
}

/* Hide grid info from bottom */
.grid-info {
  display: none !important;
}

/* Back arrow button */
.column.expanded::before {
  content: '←';
  position: absolute;
  top: 20px;
  left: 20px;
  font-size: 48px;
  cursor: pointer;
  color: #333;
  line-height: 1;
  z-index: 3;
}

.column.expanded::before:hover {
  color: #666;
}

/* Hide other columns with opacity animation */
.carousel-container.has-expanded .column:not(.expanded) {
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease-out;
}

.column-info h2 {
  font-size: clamp(22px, 6vw, 32px);
  margin-bottom: 20px;
  color: #333;
}

.column-info p {
  color: #666;
  line-height: 1.6;
  margin-bottom: 15px;
  font-size: clamp(14px, 3vw, 16px);
}

/* Tablet and smaller devices */
@media (max-width: 1024px) {
  .column {
    width: 50%;
  }

  .info-section {
    padding: 15px;
    min-height: 80px;
  }

  .column-title {
    padding: 15px;
  }

  .carousel-btn {
    padding: 8px;
  }
}

/* Mobile devices */
@media (max-width: 768px) {
  .column {
    width: 100%;
    border-radius: 20px;
    margin: 10px;
    margin-bottom: 1%;
  }

  .column:not(:last-child) {
    margin-right: 10px;
  }

  .carousel-wrapper {
    padding: 0;
  }

  .carousel-container {
    gap: 0px;
    padding: 10px;
  }

  .info-section {
    padding: 15px;
    min-height: 70px;
  }

  .info-section h1 {
    font-size: 18px;
  }

  .info-links a{
    font-size:10px;
  }

  .info-section p {
    font-size: 14px;
  }

  .carousel-btn {
    font-size: 18px;
    padding: 8px;
  }

  .left-btn {
    left: 5px;
  }

  .right-btn {
    right: 5px;
  }

  .column-title h2 {
    font-size: 14px;
    padding: 15px;
  }

  .column-title {
    padding: 15px;
  }

  /* Expanded view adjustments */
  .column.expanded {
    grid-template-columns: 1fr;
  }

  .column.expanded .column-info {
    grid-column: 1;
    grid-row: 1;
    max-height: 40vh;
    border-bottom: 1px solid #f0f0f0;
  }

  .column.expanded .column-content {
    grid-column: 1;
    grid-row: 2;
    max-height: 60vh;
  }
}

/* Ultra-wide screens (21:9 aspect ratio) */
@media (min-aspect-ratio: 21/9) {
  .column {
    width: 25%;
  }

  .info-section {
    padding: 25px;
    min-height: 80px;
  }

  .info-section h1 {
    font-size: 22px;
  }

  .info-section p {
    font-size: 15px;
  }

  .carousel-btn {
    font-size: 20px;
    padding: 12px;
  }

  .column-title h2 {
    font-size: 16px;
    padding: 18px;
  }

  .column {
    border-radius: 25px;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.2);
  }

  .column:hover {
    box-shadow: 0 10px 35px rgba(0, 0, 0, 0.3);
  }
}

/* Very large ultra-wide screens (4K + 21:9) */
@media (min-aspect-ratio: 21/9) and (min-width: 2560px) {
  .column {
    width: 20%;
  }

  .info-section {
    padding: 30px;
    min-height: 100px;
  }

  .info-section h1 {
    font-size: 50px;
  }

  .info-section p {
    font-size: 18px;
  }

  .carousel-btn {
    font-size: 50px;
    padding: 15px;
  }

  .column-title h2 {
    font-size: 18px;
    padding: 0px;
  }

  .column.expanded .column-info h1 {
    font-size: 28px;
    padding: 30px 50px;
  }

  .column.expanded .column-info p {
    font-size: 18px;
    padding: 0 50px;
  }

  .column.expanded .column-info h2 {
    font-size: 22px;
    padding: 30px 50px 15px 50px;
  }

  .column-info h2 {
    font-size: 36px;
  }
}
