/* ===== Google Fonts Import ===== */
@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:ital,wght@0,100..800;1,100..800&family=Montserrat:ital,wght@0,100..900;1,100..900&family=Damion&display=swap');

/* ===== Font Variables for Consistency ===== */
:root {
--font-damion: "Damion", cursive, "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
--font-montserrat: "Montserrat", "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
--font-jakarta: "Plus Jakarta Sans", "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
--font-fallback: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
}

/* ===== Header in Popup ===== */
.mtc-header {
width: 100%;
background-color: transparent;
padding: 0;
margin: 20px 0 30px 0;
z-index: 100;
box-sizing: border-box;
position: relative;
}

/* ===== Header Container in Popup ===== */
.header-container {
width: 100%;
max-width: 1200px;
margin: 0 auto;
padding: 0 40px;
display: flex;
justify-content: space-between;
align-items: center;
flex-wrap: nowrap;
box-sizing: border-box;
}

/* ===== Logo Section ===== */
.logo-section {
display: flex;
align-items: center;
gap: 15px;
flex-shrink: 1;
min-width: 0;
}

.logo-link {
display: flex;
align-items: center;
text-decoration: none;
color: inherit;
gap: 15px;
cursor: pointer;
}

.logo {
height: 50px;
width: auto;
flex-shrink: 0;
max-width: 200px;
image-rendering: auto; 
-ms-interpolation-mode: bicubic; 
object-fit: contain;
font-family: var(--font-montserrat);
font-size: 14px;
color: #355358;
}

.brand-text {
font-family: var(--font-damion);
font-size: 28px;
color: #355358;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
flex: 1 1 auto;
min-width: 0;
font-weight: 400;
line-height: 1.2;
margin: 0;
}

/* ===== Close Button in Header ===== */
.close-btn {
background: #dbaf3b;
border: 1px solid #dbaf3b;
color: #ffffff;
font-family: var(--font-montserrat);
font-weight: 450;
font-size: 14px;
padding: 12px 33px;
border-radius: 10px;
cursor: pointer;
white-space: nowrap;
flex: 0 0 auto;
line-height: 1.2;
min-width: max-content;
height: 44px; /* Standardized height */
display: flex;
align-items: center;
justify-content: center;

/* Transition only the properties that change */
transition: background 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94),
            border-color 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94),
            color 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94),
            transform 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.close-btn:hover {
    background: #042b2f;
    border-color: #042b2f;
}

.close-btn:focus {
outline-offset: 2px;
}

/* ===== Responsive Design ===== */
@media (max-width: 768px) {
.header-container {
flex-direction: row;
justify-content: space-between;
padding: 0 20px;
align-items: center;
}

.logo {
height: 40px;
max-width: 160px; 
}

.brand-text {
font-family: var(--font-damion);
font-size: 22px;
}

.close-btn {
font-family: var(--font-montserrat);
font-size: 12px;
padding: 8px 16px;
height: 38px; /* Standardized height */
}

.mtc-header {
margin-bottom: 20px;
}

.header-container {
width: 100%;
max-width: 400px;
}
}

/* Adaptation for extra small screens */
@media (max-width: 480px) {
.header-container {
padding: 0 15px;
max-width: 350px;
}

.logo {
height: 35px;
max-width: 140px;
}

.brand-text {
font-family: var(--font-damion);
font-size: 18px;
}

.close-btn {
font-family: var(--font-montserrat);
font-size: 11px;
padding: 6px 12px;
height: 34px; /* Standardized height */
}

.logo-section {
gap: 8px;
}

.logo-link {
gap: 8px;
}

.mtc-header {
margin-bottom: 15px;
}
}

/* Additional safeguards for ultra-narrow screens */
@media (max-width: 360px) {
.header-container {
padding: 0 10px;
max-width: 300px;
}

.brand-text {
font-family: var(--font-damion);
font-size: 16px;
}

.close-btn {
font-family: var(--font-montserrat);
font-size: 10px;
padding: 5px 10px;
height: 32px; /* Standardized height */
}

.logo {
height: 30px;
max-width: 120px;
}
}

/* ===== Landscape version optimization ===== */
@media (max-width: 768px) and (orientation: landscape) {
  .mtc-header {
    margin: 15px 0 20px 0;
  }
  
  .header-container {
    padding: 0 25px;
    max-width: none;
  }
  
  .logo {
    height: 35px;
  }
  
  .brand-text {
    font-size: 20px;
  }
  
  .close-btn {
    padding: 8px 20px;
    height: 36px;
    font-size: 12px;
  }
}

@media (max-width: 480px) and (orientation: landscape) {
  .mtc-header {
    margin: 12px 0 15px 0;
  }
  
  .header-container {
    padding: 0 15px;
  }
  
  .logo {
    height: 30px;
  }
  
  .brand-text {
    font-size: 18px;
  }
  
  .close-btn {
    padding: 6px 15px;
    height: 32px;
    font-size: 11px;
  }
  
  .logo-section {
    gap: 10px;
  }
  
  .logo-link {
    gap: 10px;
  }
}

@media (max-width: 360px) and (orientation: landscape) {
  .header-container {
    padding: 0 12px;
  }
  
  .brand-text {
    font-size: 16px;
  }
  
  .close-btn {
    padding: 5px 12px;
    height: 30px;
    font-size: 10px;
  }
  
  .logo {
    height: 28px;
  }
}

/* High-DPI screen optimization */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
.logo {
image-rendering: -webkit-optimize-contrast;
}
}

/* Popup specific header styles */
.popup-booking-wrapper .mtc-header,
.popup-privacy-wrapper .mtc-header {
  margin: 0 0 20px 0;
}

.popup-booking-wrapper .header-container,
.popup-privacy-wrapper .header-container {
  padding: 0 20px;
}