/* Reset */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

/* Import Custom Font */
@font-face {
  font-family: 'HSR';
  src: url('../fonts/DIN-Medium.ttf') format('truetype');
  font-weight: normal;
  font-style: normal;
}
* {
  font-family: 'HSR';
  font-weight: bold;
}

/* Keyframe Animations */
@keyframes slideDown {
  0% {
    transform: translateY(-100%);
    opacity: 0;
  }
  100% {
    transform: translateY(0);
    opacity: 1;
  }
}

@keyframes fadeInUp {
  0% {
    opacity: 0;
    transform: translateY(20px);
  }
  100% {
    opacity: 1;
    transform: translateY(0);
  }
}
.animate-in {
  animation: fadeInUp 0.8s ease forwards;
}

/* Header style when scrolled */
header.scrolled {
  background: #152f50; /* Slightly darker, for example */
  box-shadow: 0 2px 5px rgba(0,0,0,0.3);
  transition: background 0.5s ease, box-shadow 0.5s ease;
}

/* Example: Sophisticated rotation animation for a special element */
@keyframes rotate360 {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}
.rotate-360 {
  animation: rotate360 2s linear;
}

@keyframes revealDesc {
  0% {
    max-height: 0;
    padding: 0 10px;
    opacity: 0;
  }
  100% {
    max-height: 100px;
    padding: 10px;
    opacity: 1;
  }
}

@keyframes bgPulse {
  0%, 100% {
    background: #0a0f25;
  }
  50% {
    background: #08131a;
  }
}

/* Dashboard Header & Footer */
header {
  background: #1e3c72;
  padding: 10px 20px;
  animation: slideDown 1s ease-out;
}
.dashboard {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.logo a {
  color: #d4af37;
  font-size: 28px;
  text-decoration: none;
}
nav ul {
  list-style: none;
  display: flex;
}
nav ul li {
  margin: 0 10px;
}
nav ul li a {
  color: #fff;
  text-decoration: none;
  padding: 5px 10px;
  transition: background 0.3s, transform 0.3s;
}
nav ul li a.active,
nav ul li a:hover {
  background: rgba(212, 175, 55, 0.3);
  border-radius: 4px;
  transform: scale(1.05);
}
footer {
  background: #1e3c72;
  padding: 20px;
  text-align: center;
  color: #fff;
}

/* Gallery Sections */
.gallery-section {
  padding: 40px 20px;
  text-align: center;
  background: #0a0f25;
  color: #c0c0c0;
  margin-bottom: 40px;
  animation: bgPulse 5s ease-in-out infinite;
}
.gallery-section h1 {
  margin-bottom: 20px;
}

/* Responsive Grid for Cards */
.card-container,
.preview-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 20px;
  margin-top: 20px;
}

/* Card Styles */
.card {
  background: #fff;
  border: 2px solid transparent;
  border-radius: 8px;
  overflow: hidden;
  transition: transform 0.3s, border 0.3s;
  cursor: default;
  animation: fadeInUp 0.8s ease forwards;
}
.card:hover {
  transform: scale(1.05);
  border: 2px solid #1e3c72;
}

/* Card Image and Overlay */
.card-image {
  position: relative;
}
.card-image img {
  width: 100%;
  height: 200px;           /* Fixed height for uniformity */
  object-fit: cover;       /* Cover will fill the container */
  display: block;
}
.card-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(30, 60, 114, 0.7);
  color: #d4af37;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.3s;
}
.card:hover .card-overlay {
  opacity: 1;
}

/* Toggle Description Button */
.toggle-desc {
  background: #c0c0c0;
  color: #0a0f25;
  border: none;
  width: 100%;
  padding: 5px;
  margin-top: 10px;
  cursor: pointer;
  transition: background 0.3s;
}
.toggle-desc:hover {
  background: #a0a0b0;
}

/* Dropdown Description (semi-transparent) */
.desc {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.5s ease, padding 0.5s ease;
  background: rgba(0,0,0,0.5);
  padding: 0 10px;
  color: #fff;
}
.desc.open {
  animation: revealDesc 0.5s ease forwards;
}
