header {
    text-align: center; 
    padding: 20px 0; 
}

body {
  margin: 0;
  padding-top: 40px;
  font-family: 'Inter', sans-serif;
  -webkit-font-smoothing: antialiased;
}

.top-bar {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 40px;
  background-color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: left;
  padding: 20px;
  padding-left: 75px;
  z-index: 1000;
  box-shadow: 0px 10px 8px rgba(0, 0, 0, 0.203);
  font-size: 30px;
  font-weight: 500;
  color: #333333; 
}

/* Clickable Portfolio text link */
.top-bar span {
  cursor: pointer;
  transition: color 0.2s ease;
}

/* Base button layouts */
.about-link, .places-link, .contact-link {
  position: fixed;       
  z-index: 1001;         
  top: 30px; 
  background: none; 
  border: none;              
  padding: 0;        
  font-family: 'Inter', sans-serif;
  font-size: 16px;           
  font-weight: 500;
  color: #333333;            
}

.about-link, .contact-link {
  cursor: pointer;
}

.places-link {
  cursor: default; /* Places is unclickable and keeps a default arrow cursor */
}

.about-link { left: 43%; }
.places-link { left: 49%; }
.contact-link { left: 55%; }

/* 4. UNDERLINE EXPAND ANIMATIONS */
.top-bar span::after, 
.about-link::after, 
.places-link::after, 
.contact-link::after {
  content: '';
  position: absolute;
  width: 100%;
  transform: scaleX(0);      
  height: 2px;               
  bottom: -4px;              
  left: 0;
  background-color: #000000; 
  transform-origin: bottom center;
  transition: transform 0.25s ease-out; 
}

/* Activates the underline on text hover */
.top-bar span:hover::after, 
.about-link:hover::after, 
.places-link:hover::after, 
.contact-link:hover::after {
  transform: scaleX(1);      
}

/* 1. MAIN CONTAINER: Enforces vertical flow and centers content */
.content-container {
    max-width: 1400px;         
    margin: 0 auto;            
    padding-top: 140px;        
    padding-left: 20px;   
    padding-right: 20px;
    box-sizing: border-box;
    display: block !important; /* CRITICAL FIX: Forces sequential top-to-bottom layout flow */
}

/* 2. The Clean 200px Page Title */
.content-container h1 {
  font-size: 100px;
  font-weight: 100;
  line-height: 0.75;    
  letter-spacing: -8px;
  color: #111111;
  margin: 0;            
  padding: 0;
  width: 100%;               
  text-align: left;
}

/* 3. The Paragraph Below Title */
.content-container p {
  margin-top: 0px;     
  font-size: 16px;
  color: #555555;
  width: 100%;
  text-align: left;
}

/* 1. RESET MAIN CONTAINER: Drops any conflicting flex rules to restore natural layout order */
.content-container {
    max-width: 1400px;         
    margin: 0 auto;            
    padding-top: 140px;        
    padding-left: 20px;   
    padding-right: 20px;
    box-sizing: border-box;
    display: block !important; /* CRITICAL FIX: Forces sequential top-to-bottom layout flow */
}

.image-gallery {
  position: relative;
  width: 100%;
  max-width: 1400px;
  margin: 0 auto 80px auto;
}

.portfolio-image {
  position: absolute;
  display: block;
  border-radius: 0px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
  transition: top 0.25s ease, left 0.25s ease, transform 0.2s ease;
  object-fit: cover;
  box-sizing: border-box;
}

.portfolio-image:hover {
  transform: translateY(-5px);
}

.dynamic-photo-card {
  position: absolute;
  display: block;
  box-sizing: border-box;
}

.dynamic-photo-card .portfolio-image {
  position: static;
  width: 100%;
  aspect-ratio: 3 / 2;
}

.image-gallery.filtered .portfolio-image {
  border-radius: 4px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

.dropdown-menu {
  position: fixed;
  z-index: 1001;
  top: 55px;                  
  /* left coordinate will be assigned dynamically by your Javascript now! */
  transform: translateX(-50%) translateY(10px); /* Keeps it completely centered under its pixel anchor */
  background-color: #ffffff;
  min-width: 140px;
  box-shadow: 0px 8px 16px rgba(0, 0, 0, 0.1); 
  border-radius: 6px;
  padding: 10px 0;
  display: flex;
  flex-direction: column;
  opacity: 0;                 
  visibility: hidden;         
  transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s;
}

/* Maintain your hover rules as they are */
.places-link:hover + .dropdown-menu,
.dropdown-menu:hover {
  opacity: 1;
  visibility: visible;
  transform: translateX(-50%) translateY(0px); 
}


/* Individual dropdown list items */
.dropdown-item {
  font-family: 'Inter', sans-serif;
  font-size: 14px;
  font-weight: 500;
  color: #333333;
  background: none;
  border: none;
  padding: 10px 20px;
  text-align: center;
  cursor: pointer;
  transition: background-color 0.2s ease;
}

.dropdown-item:hover {
  background-color: #f5f5f5;
  color: #000000;
}

/* ─── DYNAMIC 3-COLUMN DROPDOWN FILTER OVERRIDES ─── */

/* Shifts the gallery container layout into 3 columns upon dropdown country filter selection */
.image-gallery.filtered {
  display: grid;
  grid-template-columns: repeat(3, 1fr) !important; 
  gap: 40px 30px !important;                        
  box-sizing: border-box;
}

.dynamic-photo-card {
  display: flex;
  flex-direction: column;
  width: 100%;
}

/* Switches filtered images to horizontal landscape (3:2 format ratio) with small smooth border corners */
.image-gallery.filtered .portfolio-image {
  width: 100% !important;
  aspect-ratio: 3 / 2 !important;                   
  border-radius: 4px !important;                    
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05) !important;
}

/* Layout specs for the dynamically injected title headings underneath the filtered items */
.card-title {
  display: block;
  font-family: 'Inter', sans-serif;
  font-size: 16px;
  font-weight: 600;
  color: #111111;
  margin: 12px 0 2px 0;
  text-align: left;
}

.card-subtitle {
  display: block;
  font-family: 'Inter', sans-serif;
  font-size: 13px;
  font-weight: 400;
  color: #777777;
  margin: 0;
  text-align: left;
}

/* ─── SINGLE-FILE ARTICLE MODAL SYSTEM ─── */

/* Full-screen dark blurry backdrop */
.article-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(255, 255, 255, 0.98); /* Clean, high-end white backdrop */
  z-index: 10000; /* Higher than top-bar and dropdowns */
  display: none;  /* Hidden by default */
  justify-content: center;
  align-items: center;
  overflow-y: auto;
  padding: 40px 20px;
  box-sizing: border-box;
}

/* The actual article box reading the text */
.modal-content {
  max-width: 700px;
  width: 100%;
  text-align: left;
  font-family: 'Inter', sans-serif;
  margin: auto;
}

/* Modal Title layout matching your huge aesthetic */
.modal-title {
  font-size: 64px;
  font-weight: 100;
  letter-spacing: -2px;
  margin: 0 0 10px 0;
  color: #111111;
  line-height: 1;
}

.modal-subtitle {
  font-size: 16px;
  font-weight: 500;
  color: #777777;
  margin: 0 0 40px 0;
  text-transform: uppercase;
  letter-spacing: 1px;
}

/* Large image inside the article pop-up */
.modal-image {
  width: 100%;
  max-height: 450px;
  object-fit: cover;
  margin-bottom: 40px;
}

/* The article long-form body paragraph text */
.modal-body {
  font-size: 18px;
  line-height: 1.8;
  color: #333333;
  font-weight: 400;
}

/* Minimalist close cross button link */
.modal-close {
  position: fixed;
  top: 30px;
  right: 40px;
  background: none;
  border: none;
  font-size: 32px;
  font-weight: 200;
  cursor: pointer;
  color: #333333;
  transition: transform 0.2s ease;
}

.modal-close:hover {
  transform: scale(1.1);
}

.contact-photo {
  width: 500px;
  height: 750px;
  position: relative;
  left: 60%;
  bottom: 120px;
}