/* =============================================
   EULOGIA INN — RESPONSIVE FIX CSS v3
   Works WITH the existing style.css + custom.js
   (clone-header + slide-in nav architecture)
   ============================================= */

/* ─── GLOBAL BASE ─── */
*, *::before, *::after { box-sizing: border-box; }
img { max-width: 100%; height: auto; }
iframe { max-width: 100%; }
body { overflow-x: hidden; }

/* =============================================
   TABLET LANDSCAPE  769px – 1024px
   ============================================= */
@media (min-width: 769px) and (max-width: 1024px) {

  /* Nav items compact */
  #mainmenu > li > a {
    padding: 6px 7px !important;
    font-size: 11px !important;
    letter-spacing: 0.4px !important;
  }

  /* Reservation button */
  #hea_reservation { right: 8px !important; top: 8px !important; }
  #hea_reservation h1 { font-size: 10px !important; letter-spacing: 1px !important; }

  /* Room carousel 3 cols */
  .room-item { width: 33.33% !important; }

  /* Gallery 3 cols */
  #gallery .item { width: 33.33% !important; }

  /* Sub-header font scale */
  #subheader h1, #subheader1 h1, #subheader2 h1,
  #subheader-room h1, #subheader-BANQUET h1, #subheader-con h1,
  #subheader-corpo h1, #subheader-family h1, #subheader-pri h1,
  #subheader-presi h1, #subheader-honeymoon h1, #subheader-rest h1 {
    font-size: 40px !important;
    letter-spacing: 6px !important;
  }

  /* Privilege circles */
  #privilage_p .circle { width: 260px !important; height: 260px !important; }
  #privilage_p .circle1 { width: 252px !important; height: 252px !important; }

  /* Footer cols */
  footer .col-md-4 { margin-bottom: 20px; }
  footer iframe { height: 280px !important; }
}

/* =============================================
   MOBILE  ≤ 992px  (matches style.css breakpoint)
   The original JS: menu slides in from right,
   original header is hidden, .clone is shown.
   We just need to FIX the layout, not redo the nav.
   ============================================= */
@media (max-width: 992px) {

  /* ── Ensure body doesn't scroll horizontally ── */
  body, html { overflow-x: hidden !important; max-width: 100%; }

  /* ── Clone header — keep it clean ── */
  header.clone {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    z-index: 9999 !important;
    background: #fff !important;
    box-shadow: 0 2px 8px rgba(0,0,0,0.12);
    padding: 8px 15px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    width: 100% !important;
    height: auto !important;
  }
  header.clone #logo {
    display: block !important;
    padding: 0 !important;
    text-align: left !important;
    width: auto !important;
  }
  header.clone #logo img { max-height: 50px; width: auto; }
  header.clone #logo .inner { margin: 0 !important; display: block !important; width: auto !important; height: auto !important; }

  /* ── Menu button — position inside clone header ── */
  #menu-btn {
    position: fixed !important;
    top: 14px !important;
    right: 15px !important;
    z-index: 10002 !important;
    width: 42px !important;
    height: 42px !important;
    background: #edb83a !important;
    border-radius: 3px !important;
  }

  /* ── Slide-in nav panel — make it usable ── */
  #mainmenu-container {
    width: 280px !important;
    max-width: 85vw !important;
    overflow-y: auto !important;
    -webkit-overflow-scrolling: touch;
    padding-top: 60px !important;
  }
  #mainmenu { width: 100% !important; }
  #mainmenu li { width: 100% !important; }
  #mainmenu li a { word-break: break-word; }

  /* ── Push content down so it clears the fixed clone header ── */
  body > header + * { margin-top: 70px !important; }
  #slider { margin-top: 70px !important; }

  /* ── Reservation button hide on very small screens ── */
  #hea_reservation { display: none !important; }

  /* ── Slider ── */
  #slider img { width: 100% !important; height: auto !important; min-height: 180px; object-fit: cover; }

  /* ── Room carousel — stack vertically ── */
  .custom-carousel-1 .item,
  .custom-carousel-1 .room-item {
    width: 100% !important;
    height: 240px !important;
    display: block !important;
    float: none !important;
    margin-bottom: 6px !important;
  }
  .room-item img { height: 240px !important; object-fit: cover !important; width: 100% !important; }

  /* Room overlay visible (touch devices can't hover) */
  .room-item .overlay {
    height: auto !important;
    overflow: visible !important;
    padding: 14px 18px !important;
    position: relative !important;
  }
  .room-item .desc {
    height: auto !important;
    opacity: 1 !important;
    overflow: visible !important;
    padding: 8px 0 0 !important;
  }

  /* ── All Bootstrap grid columns full-width ── */
  .col-md-1, .col-md-2, .col-md-3, .col-md-4,
  .col-md-5, .col-md-6, .col-md-7, .col-md-8,
  .col-md-9, .col-md-10, .col-md-11 {
    width: 100% !important;
    float: none !important;
    margin-left: 0 !important;
  }
  [class*="col-md-offset-"] { margin-left: 0 !important; }
  .pull-right, .pull-left { float: none !important; }

  /* ── Side-bg sections (About, Rooms, Banquet etc.) ── */
  section.side-bg { position: relative !important; overflow: hidden; }
  .side-bg .image-container {
    position: relative !important;
    width: 100% !important;
    height: 220px !important;
    margin: 0 !important;
    padding: 0 !important;
    float: none !important;
    left: auto !important;
    right: auto !important;
  }
  .side-bg .background-image {
    position: absolute !important;
    top: 0 !important; left: 0 !important;
    width: 100% !important;
    height: 220px !important;
    background-size: cover !important;
    background-position: center !important;
  }
  .side-bg .container { position: relative !important; z-index: 2; }
  .side-bg .col-md-5,
  .side-bg .col-md-5.col-md-offset-7 {
    width: 100% !important;
    float: none !important;
    margin-left: 0 !important;
  }
  .inner-padding { padding: 20px 15px !important; }

  /* ── Sub-headers ── */
  #subheader, #subheader1, #subheader2,
  #subheader-room, #subheader-BANQUET, #subheader-con,
  #subheader-corpo, #subheader-family, #subheader-pri,
  #subheader-presi, #subheader-honeymoon, #subheader-rest {
    padding-top: 100px !important;
    padding-bottom: 100px !important;
  }
  #subheader h1, #subheader1 h1, #subheader2 h1,
  #subheader-room h1, #subheader-BANQUET h1, #subheader-con h1,
  #subheader-corpo h1, #subheader-family h1, #subheader-pri h1,
  #subheader-presi h1, #subheader-honeymoon h1, #subheader-rest h1 {
    font-size: 28px !important;
    letter-spacing: 4px !important;
    line-height: 1.3 !important;
  }
  #subheader h3, #subheader1 h3, #subheader2 h3,
  #subheader-room h3, #subheader-BANQUET h3, #subheader-con h3,
  #subheader-corpo h3, #subheader-family h3, #subheader-pri h3,
  #subheader-presi h3, #subheader-honeymoon h3, #subheader-rest h3 {
    font-size: 11px !important;
    letter-spacing: 3px !important;
  }

  /* ── Room single pages ── */
  .room-single .col-md-8,
  .room-single .col-md-4 { width: 100% !important; float: none !important; }
  .room-single .col-md-8 { margin-bottom: 20px; }
  .room-single .inner { padding: 20px 15px !important; }

  /* ── Gallery ── */
  #filters {
    display: flex !important;
    flex-wrap: wrap !important;
    gap: 6px !important;
    padding: 0 0 10px !important;
    overflow-x: auto !important;
    -webkit-overflow-scrolling: touch !important;
  }
  #filters li { flex-shrink: 0; display: inline-block !important; }
  #gallery .item { width: 100% !important; }

  /* ── Contact map ── */
  #map-container iframe { height: 220px !important; width: 100% !important; }

  /* ── Services ── */
  #sr { width: 100% !important; }
  #sr .col-md-6 { width: 100% !important; float: none !important; margin-bottom: 16px !important; }

  /* ── Parallax fix for mobile ── */
  .parallax { background-attachment: scroll !important; }

  /* ── Footer ── */
  footer .col-md-4,
  footer .col-md-10 { width: 100% !important; float: none !important; margin-bottom: 24px !important; }
  footer iframe { width: 100% !important; height: 260px !important; }
  .subfooter .col-md-4,
  .subfooter .col-md-8 { width: 100% !important; float: none !important; text-align: center; margin-bottom: 8px; }
  .subfooter nav ul {
    display: flex !important;
    flex-wrap: wrap !important;
    justify-content: center !important;
    gap: 4px 14px !important;
    padding: 0 !important;
    margin: 6px 0 0 !important;
  }

  /* ── Privilege page ── */
  #privilage_p { padding: 20px 15px !important; }
  #privilage_p .col-md-2,
  #privilage_p .col-md-5 { width: 100% !important; float: none !important; margin-left: 0 !important; }
  .circle {
    width: 270px !important; height: 270px !important;
    margin: 0 auto 24px !important;
    display: block !important;
  }
  .circle1 { width: 262px !important; height: 262px !important; }

  /* ── Feedback ── */
  #feedback { text-align: center; padding: 15px 0; }
  .form-control1 { width: 100% !important; }

  /* ── Owl carousel responsive ── */
  .owl-carousel { width: 100% !important; }
}

/* =============================================
   SMALL PHONES  ≤ 480px
   ============================================= */
@media (max-width: 480px) {

  header.clone #logo img { max-height: 42px; }

  /* Slider */
  #slider img { min-height: 150px; }

  /* Room items */
  .custom-carousel-1 .item,
  .custom-carousel-1 .room-item { height: 200px !important; }
  .room-item img { height: 200px !important; }

  /* Sub-headers compact */
  #subheader, #subheader1, #subheader2,
  #subheader-room, #subheader-BANQUET, #subheader-con,
  #subheader-corpo, #subheader-family, #subheader-pri,
  #subheader-presi, #subheader-honeymoon, #subheader-rest {
    padding-top: 70px !important;
    padding-bottom: 70px !important;
  }
  #subheader h1, #subheader1 h1, #subheader2 h1,
  #subheader-room h1, #subheader-BANQUET h1, #subheader-con h1,
  #subheader-corpo h1, #subheader-family h1, #subheader-pri h1,
  #subheader-presi h1, #subheader-honeymoon h1, #subheader-rest h1 {
    font-size: 20px !important;
    letter-spacing: 2px !important;
  }

  /* Privilege circles smaller */
  .circle  { width: 240px !important; height: 240px !important; }
  .circle1 { width: 232px !important; height: 232px !important; }

  /* Buttons */
  .btn-big-border { display: block !important; font-size: 14px !important; padding: 13px !important; }
  .btn-border { font-size: 12px !important; padding: 7px 12px !important; }

  /* Footer */
  footer iframe { height: 200px !important; }

  /* Typography */
  section h1 { font-size: 1.3rem !important; }
  section h2 { font-size: 1.05rem !important; }
}

/* ─── PRINT ─── */
@media print {
  #mainmenu-container, #menu-btn, #hea_reservation,
  footer iframe, #map-container { display: none !important; }
}
