/* ============================
   GLOBAL LINK RESET
============================ */
a { text-decoration:none; }
a:hover { text-decoration:none; }

/* ============================
   UNIFIED NAVIGATION BASE
============================ */
header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--color-border-light);
}

.nav {
  max-width: var(--max-width-narrow);
  margin: 0 auto;
  padding: var(--space-sm) var(--space-md);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.nav-brand {
  font-weight: var(--font-weight-bold);
  font-size: var(--font-size-body-sm);
  color: var(--color-text-primary);
}

.nav-links {
  display: flex;
  gap: var(--space-md);
  align-items: center;
  font-size: 15px;
}

.nav-links a {
  color: var(--color-text-secondary);
  font-weight: var(--font-weight-medium);
  position: relative;
}

.nav-links a.active {
  color: var(--color-brand-indigo);
  font-weight: var(--font-weight-semibold);
}

/* underline animation */
.nav-links a::after {
  content:'';
  position:absolute;
  left:0;
  bottom:-4px;
  width:0;
  height:2px;
  background: var(--color-brand-blue);
  transition:width var(--transition-fast) ease;
}

/* no double underline */
.nav-links a:not(.active):hover::after {
  width:100%;
}
.nav-links a.active:hover::after {
  width:100%;
}

.lang-switch {
  margin-left: var(--space-xs);
  font-size: var(--font-size-meta);
}
.lang-switch a {
  color: var(--color-text-secondary);
  font-weight: var(--font-weight-semibold);
}
.lang-switch a.active {
  color: var(--color-brand-blue);
}

/* ============================
   HAMBURGER
============================ */
.hamburger {
  display: none;
  font-size: 28px;
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid var(--color-border-light);
  border-radius: var(--radius-md);
  padding: var(--space-xs) var(--space-sm);
  cursor: pointer;
  color: var(--color-text-primary);
  font-weight: var(--font-weight-semibold);
  transition: background var(--transition-fast) ease, box-shadow var(--transition-fast) ease;
  box-shadow: var(--shadow-sm);
}

.hamburger:hover {
  background: white;
  box-shadow: var(--shadow-md);
}

.hamburger:active {
  transform:scale(0.95);
}

/* ============================
   MOBILE DRAWER
============================ */
.mobile-nav {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.85);
  display: none;
  z-index: 9999;
  justify-content: flex-start;
  align-items: stretch;
}

.mobile-nav.open {
  display: flex !important;
}

.mobile-nav-inner {
  width: 80%;
  max-width: 320px;
  height: 100vh;
  padding: var(--space-2xl) var(--space-lg);
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
  box-shadow: var(--shadow-xl);
  position: relative;
  z-index: 10000;
  background: white !important;
  background-color: white !important;
  border-right: 1px solid var(--color-border-light);
}

.mobile-link {
  font-size: 20px;
  font-weight: var(--font-weight-semibold);
  color: var(--color-text-primary);
}
.mobile-link:hover {
  color: var(--color-brand-blue);
}

.mobile-lang {
  margin-top: auto;
  display: flex;
  gap: var(--space-xs);
  font-size: var(--font-size-body-sm);
}

.mobile-lang-link {
  color: var(--color-text-secondary);
  font-weight: var(--font-weight-semibold);
}

.mobile-lang-link.active {
  color: var(--color-brand-blue);
}

/* ============================
   RESPONSIVE BREAKPOINTS
============================ */
@media (min-width:821px) {
  .nav-links { display:flex; }
  .hamburger { display:none; }
}

@media (max-width:820px) {
  .nav-links { display:none; }
  .hamburger { display:block; }
}

/* ============================
   VIDEO 
============================ */

/* Responsive video wrapper */
.video-frame {
  position: relative;
  width: 100%;
  overflow: hidden;
  border-radius: 18px;
  box-shadow: 0 16px 40px rgba(0,0,0,0.18);
}

/* 16:9 default aspect ratio */
.video-frame::before {
  content: "";
  display: block;
  padding-top: 56.25%;
}

/* The actual video */
.video-frame video,
.video-frame iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
  border-radius: 18px;
  object-fit: cover;
}

/* ============================
   CARD IMAGES 
============================ */

.preview-img {
  width: 100%;
  border-radius: 12px;
  margin-top: 14px;
  box-shadow: 0 8px 16px rgba(0,0,0,0.10);
  display: block;
  object-fit: cover;
}

/* Fixed-size variants */
.preview-img.small {
  height: 160px;
}

.preview-img.tiny {
  height: 120px;
}

.preview-img.center {
  margin-left: auto;
  margin-right: auto;
}

/* ============================
   MODAL SYSTEM
============================ */

/* Make images and videos clickable */
.preview-img,
.video-frame {
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.preview-img:hover,
.video-frame:hover {
  transform: scale(1.02);
  box-shadow: 0 12px 24px rgba(0,0,0,0.15);
}

/* Modal overlay */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.95);
  backdrop-filter: blur(8px);
  z-index: 10000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 24px;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.modal-overlay.open {
  display: flex;
  opacity: 1;
}

.modal-content {
  position: relative;
  max-width: 90vw;
  max-height: 90vh;
  display: flex;
  align-items: center;
  justify-content: center;
}

.modal-content img,
.modal-content video {
  max-width: 100%;
  max-height: 90vh;
  border-radius: 12px;
  box-shadow: 0 24px 48px rgba(0,0,0,0.4);
  object-fit: contain;
}

.modal-content video {
  width: auto;
  height: auto;
}

/* Close button */
.modal-close {
  position: absolute;
  top: -48px;
  right: 0;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: #ffffff;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 24px;
  line-height: 1;
  transition: background 0.2s ease, transform 0.2s ease;
  backdrop-filter: blur(10px);
}

.modal-close:hover {
  background: rgba(255, 255, 255, 0.2);
  transform: scale(1.1);
}

.modal-close:active {
  transform: scale(0.95);
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .modal-content {
    max-width: 95vw;
    max-height: 85vh;
  }
  
  .modal-close {
    top: -40px;
    width: 36px;
    height: 36px;
    font-size: 20px;
  }
}