/* ==========================================================================
   LA CASIO INN — RESPONSIVE STYLES
   Desktop, Tablet, and Mobile Layout Adjustments
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. LAPTOP & SMALL DESKTOP (max-width: 1024px)
   -------------------------------------------------------------------------- */
@media (max-width: 1024px) {
  :root {
    --container-padding: 1.25rem;
  }

  .nav-menu {
    gap: var(--space-2);
  }

  .hero-grid {
    grid-template-columns: 1fr 1fr;
    gap: var(--space-8);
  }

  /* Rooms Carousel (Tablet / Foldable Viewport) */
  .rooms-grid.rooms-carousel-track {
    display: flex;
    flex-wrap: nowrap;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scroll-behavior: smooth;
    gap: var(--space-6);
    padding: 8px 4px 16px;
    margin: -8px -4px 0;
    scrollbar-width: none;
    -ms-overflow-style: none;
    -webkit-overflow-scrolling: touch;
  }

  .rooms-grid.rooms-carousel-track::-webkit-scrollbar {
    display: none;
  }

  .rooms-grid.rooms-carousel-track .room-card {
    flex: 0 0 calc(50% - var(--space-6) / 2);
    width: calc(50% - var(--space-6) / 2);
    min-width: 0;
    scroll-snap-align: start;
    scroll-snap-stop: normal;
  }

  .rooms-carousel-controls {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1.25rem;
    margin-top: 1.75rem;
  }

  .rooms-carousel-nav-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background-color: var(--color-white);
    border: 1.5px solid #bd8c32;
    color: #0d2340;
    box-shadow: 0 4px 12px rgba(11, 31, 58, 0.08);
    cursor: pointer;
    transition: background-color var(--transition-fast), color var(--transition-fast), transform var(--transition-fast), box-shadow var(--transition-fast);
    padding: 0;
  }

  .rooms-carousel-nav-btn:hover {
    background-color: #bd8c32;
    color: var(--color-white);
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(189, 140, 50, 0.25);
  }

  .rooms-carousel-nav-btn:active {
    transform: translateY(0);
  }

  .rooms-carousel-dots {
    display: flex;
    align-items: center;
    gap: 0.6rem;
  }

  .rooms-carousel-dot {
    width: 10px;
    height: 10px;
    border-radius: 5px;
    border: 1.5px solid #bd8c32;
    background-color: transparent;
    cursor: pointer;
    padding: 0;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  }

  .rooms-carousel-dot.active {
    width: 28px;
    background-color: #bd8c32;
    box-shadow: 0 2px 8px rgba(189, 140, 50, 0.35);
  }

  .benefits-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: var(--space-4);
  }

  .about-grid {
    gap: var(--space-8);
  }

  .site-footer .footer-grid,
  .site-footer.footer-navy .footer-grid,
  .site-footer.footer-light .footer-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: var(--space-8);
  }

  .grid-3 {
    grid-template-columns: repeat(2, 1fr);
    gap: var(--space-6);
  }

  .gallery-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: var(--space-6);
  }

  .services-header-split {
    gap: var(--space-6);
  }

  .services-grid {
    gap: var(--space-6);
  }

  .services-grid .service-card {
    flex: 0 0 calc((100% - var(--space-6)) / 2);
    width: calc((100% - var(--space-6)) / 2);
    max-width: calc((100% - var(--space-6)) / 2);
  }

  /* Contact Layout on Small Tab & Tablet: Form First, Contact Details Below */
  .contact-layout {
    display: flex;
    flex-direction: column;
    gap: var(--space-8);
  }

  .contact-form-pane {
    order: 1;
    width: 100%;
  }

  .contact-info-pane {
    order: 2;
    width: 100%;
    margin-top: var(--space-2);
  }

  .form-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 14px 16px;
  }

  /* Reusable CTA Banner */
  .cta-banner-container {
    gap: var(--space-6);
  }

  .cta-title {
    font-size: 1.85rem;
  }
}

/* --------------------------------------------------------------------------
   2. TABLET (max-width: 768px)
   -------------------------------------------------------------------------- */
@media (max-width: 768px) {
  :root {
    --top-bar-height: 0px;
    --navbar-height: 70px;
    --space-16: 3.5rem;
  }

  /* Top Bar */
  .top-bar {
    display: none;
  }

  /* Compact Mobile Navigation Dropdown */
  .navbar {
    position: relative;
    height: 70px;
    max-height: 70px;
  }

  /* Hide navbar logo in mobile view and position call button on the left */
  .nav-brand {
    display: none !important;
  }

  .nav-actions {
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
  }

  .nav-toggle {
    display: flex;
  }

  .btn-nav-call {
    font-size: 0.8125rem;
    padding: 0.48rem 0.85rem;
    gap: 7px;
  }

  .btn-nav-enquire {
    display: none !important;
  }

  .nav-menu {
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    right: 0;
    width: auto;
    max-width: 440px;
    margin-left: auto;
    height: auto;
    max-height: calc(100vh - 90px);
    background-color: var(--color-white);
    flex-direction: column;
    align-items: stretch;
    padding: 10px;
    gap: 4px;
    border-radius: 16px;
    border: 1px solid rgba(11, 31, 58, 0.1);
    box-shadow: 0 16px 36px -4px rgba(11, 31, 58, 0.16), 0 4px 12px rgba(0, 0, 0, 0.06);
    z-index: 105;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-8px) scale(0.98);
    transform-origin: top right;
    transition: opacity 0.22s cubic-bezier(0.16, 1, 0.3, 1),
                transform 0.22s cubic-bezier(0.16, 1, 0.3, 1),
                visibility 0.22s cubic-bezier(0.16, 1, 0.3, 1);
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
  }

  .nav-menu.active {
    opacity: 1;
    visibility: visible;
    transform: translateY(0) scale(1);
    right: 0;
  }

  .nav-menu li {
    width: 100%;
    list-style: none;
  }

  .nav-link {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--color-navy-900);
    width: 100%;
    padding: 12px 16px;
    border-radius: 10px;
    border: none;
    border-bottom: none;
    display: flex;
    align-items: center;
    justify-content: space-between;
    transition: background-color 0.18s ease, color 0.18s ease;
  }

  .nav-link::after {
    content: '';
    width: 7px;
    height: 7px;
    border-top: 2px solid #cbd5e1;
    border-right: 2px solid #cbd5e1;
    transform: rotate(45deg);
    margin-left: 8px;
    flex-shrink: 0;
    transition: border-color 0.18s ease, transform 0.18s ease;
  }

  .nav-link:hover {
    background-color: var(--color-slate-100);
    color: var(--color-navy-900);
  }

  .nav-link:hover::after {
    border-color: var(--color-navy-900);
    transform: rotate(45deg) translate(1px, -1px);
  }

  .nav-link.active {
    background-color: #faf5ea;
    color: #b68a35;
    font-weight: 700;
    border: none;
    border-bottom: none;
    padding-left: 16px;
  }

  .nav-link.active::after {
    border-color: #b68a35;
  }

  .nav-overlay {
    background: rgba(7, 19, 38, 0.28);
    backdrop-filter: blur(2px);
  }

  /* Hero Section */
  .hero-grid {
    grid-template-columns: 1fr;
    gap: var(--space-10);
  }

  /* Mobile View Hero Logo (displayed above the hero text) */
  .hero-mobile-logo-wrap {
    display: flex !important;
    align-items: center;
    justify-content: center;
    width: 100%;
    margin-bottom: 1.5rem;
    padding: 0.25rem 0;
  }

  .hero-mobile-logo {
    width: 100%;
    max-width: 250px;
    height: auto;
    max-height: 175px;
    object-fit: contain;
    display: block;
    margin: 0 auto;
    filter: drop-shadow(0 6px 18px rgba(11, 31, 58, 0.1));
  }

  .hero-micro-features,
  .hero-reference .hero-micro-features {
    display: none !important;
  }

  .hero-main-photo-frame {
    height: 340px;
    border-top-left-radius: 80px;
  }

  .hero-floating-card {
    right: 12px;
    bottom: -16px;
    max-width: 290px;
    padding: 10px 14px;
  }



  .rooms-header-row {
    flex-direction: column;
    align-items: flex-start;
  }

  /* About Section */
  .about-grid {
    grid-template-columns: 1fr;
    gap: var(--space-8);
  }

  .about-photo-frame {
    height: 300px;
  }

  /* Benefits Grid */
  .benefits-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: var(--space-4);
  }

  /* CTA Strip */
  .cta-strip-inner {
    flex-direction: column;
    align-items: flex-start;
    gap: var(--space-6);
  }

  /* Footer */
  .site-footer .footer-grid,
  .site-footer.footer-navy .footer-grid,
  .site-footer.footer-light .footer-grid {
    grid-template-columns: 1fr;
    gap: var(--space-8);
  }

  .site-footer .footer-bottom-inner,
  .site-footer.footer-navy .footer-bottom-inner,
  .site-footer.footer-light .footer-bottom-inner {
    flex-direction: column;
    gap: var(--space-3);
    text-align: center;
  }

  .site-footer .footer-bottom-links,
  .site-footer.footer-navy .footer-bottom-links,
  .site-footer.footer-light .footer-bottom-links {
    justify-content: center;
    flex-wrap: wrap;
  }

  /* Facilities & Layout Grids */
  .grid-3 {
    grid-template-columns: 1fr;
    gap: var(--space-6);
  }

  .services-header-split {
    flex-direction: column;
    align-items: flex-start;
    gap: var(--space-3);
    margin-bottom: var(--space-8);
  }

  .services-header-right {
    text-align: left;
    max-width: 100%;
  }

  .services-grid {
    gap: var(--space-6);
  }

  .services-grid .service-card {
    flex: 0 0 100%;
    width: 100%;
    max-width: 520px;
  }

  .service-image-wrap {
    height: 220px;
  }

  .service-card-footer {
    padding: 12px var(--space-4);
    flex-wrap: wrap;
  }

  /* Contact Page Layout: Form First, Contact Details Below */
  .contact-layout {
    display: flex;
    flex-direction: column;
    gap: var(--space-8);
  }

  .contact-form-pane {
    order: 1;
    width: 100%;
    padding: var(--space-6);
  }

  .contact-info-pane {
    order: 2;
    width: 100%;
    height: auto;
    padding: var(--space-6);
  }

  .contact-details-clean {
    gap: var(--space-5);
  }

  .section-map-full iframe {
    height: 380px;
  }

  /* Page Banner & Gallery Layout */
  .page-banner {
    min-height: 160px;
  }

  /* Gallery Mobile Layout - 1 image in a row */
  .gallery-grid {
    grid-template-columns: 1fr;
    gap: var(--space-4);
  }

  .gallery-pagination {
    margin-top: var(--space-8);
  }

  /* Reusable CTA Banner */
  .site-cta-banner {
    padding: 36px 0;
  }

  .cta-banner-container {
    flex-direction: column;
    align-items: flex-start;
    gap: var(--space-6);
  }

  .cta-title {
    font-size: 1.6rem;
  }

  .cta-banner-action {
    width: 100%;
  }

  .btn-cta-gold {
    width: 100%;
  }
}

@media (max-width: 680px) {
  /* Contact Form Mobile: Single Column Inputs (Down by Down) */
  .form-grid {
    grid-template-columns: 1fr !important;
    gap: 14px;
  }

  .form-grid .form-group {
    grid-column: 1 / -1 !important;
    width: 100%;
  }

  .form-col-full,
  .form-col-left {
    grid-column: 1 / -1 !important;
  }
}

/* --------------------------------------------------------------------------
   3. MOBILE (max-width: 480px)
   -------------------------------------------------------------------------- */
@media (max-width: 480px) {
  :root {
    --container-padding: 1rem;
    --top-bar-height: 0px;
    --navbar-height: 64px;
  }

  .navbar {
    height: 64px;
    max-height: 64px;
  }

  .nav-brand-logo {
    height: 56px;
    max-width: 150px;
  }

  .nav-brand-title {
    font-size: 1.15rem;
  }

  .nav-brand-subtitle {
    font-size: 0.55rem;
  }

  .btn-nav-call {
    padding: 0.46rem 0.75rem;
    font-size: 0.8rem;
    gap: 6px;
  }

  .nav-actions .btn-navy-action span {
    display: none;
  }

  .nav-actions .btn-navy-action {
    padding: 0.55rem 0.75rem;
  }

  .hero-cta-group {
    flex-direction: column;
    align-items: stretch;
  }

  .hero-cta-group .btn {
    width: 100%;
    text-align: center;
  }

  .hero-micro-features {
    display: none !important;
  }

  .hero-main-photo-frame {
    height: 280px;
    border-top-left-radius: 50px;
  }

  .hero-floating-card {
    position: static;
    margin: var(--space-4) auto 0;
    max-width: 100%;
    width: 100%;
  }

  .benefits-grid {
    grid-template-columns: 1fr;
    gap: var(--space-4);
  }

  .benefit-card {
    padding: 20px 18px;
  }

  .cta-btn-row {
    flex-direction: column;
    width: 100%;
  }

  .cta-btn-row .btn {
    width: 100%;
  }

  /* Gallery Mobile Layout - 1 image in a row */
  .gallery-grid {
    grid-template-columns: 1fr;
    gap: var(--space-4);
  }

  .gallery-pagination {
    gap: 6px;
    margin-top: var(--space-6);
    justify-content: center;
  }

  .pagination-btn {
    min-width: 36px;
    height: 38px;
    padding: 0 8px;
    font-size: 0.8125rem;
    border-radius: var(--radius-sm, 6px);
  }

  .pagination-prev,
  .pagination-next {
    padding: 0 12px;
  }

  /* Contact & Form Mobile Layout */
  .form-row {
    grid-template-columns: 1fr;
    gap: var(--space-3);
  }

  .form-actions {
    flex-direction: column;
    width: 100%;
  }

  .form-actions .btn {
    width: 100%;
    min-width: 100%;
  }

  .contact-form-pane,
  .contact-info-pane {
    padding: 22px 18px;
  }

  .form-grid {
    grid-template-columns: 1fr !important;
    gap: 12px;
  }

  .form-grid .form-group,
  .form-col-full,
  .form-col-left {
    grid-column: 1 / -1 !important;
    width: 100%;
  }

  .section-map-full iframe {
    height: 320px;
  }

  .map-placeholder-box {
    padding: var(--space-8) var(--space-4);
  }

  .service-image-wrap {
    height: 190px;
  }

  .service-card-body {
    padding: var(--space-5) var(--space-4);
  }

  .service-card-desc {
    text-align: left;
  }

  /* Reusable CTA Banner */
  .site-cta-banner {
    padding: 32px 0;
  }

  .cta-title {
    font-size: 1.4rem;
  }

  .cta-description {
    font-size: 0.875rem;
  }

  .btn-cta-gold {
    padding: 13px 22px;
    font-size: 0.78125rem;
  }
}

@media (max-width: 340px) {
  .btn-nav-call {
    padding: 0.4rem 0.5rem;
    font-size: 0.75rem;
    gap: 4px;
  }
}

@media (max-width: 900px) {
  .hero-reference {
    height: auto;
    min-height: 0;
    overflow: hidden;
  }

  .hero-reference .hero-container,
  .hero-reference .hero-grid {
    height: auto;
  }

  .hero-reference .hero-grid {
    grid-template-columns: minmax(0, 1fr);
    gap: 2rem;
    padding-top: 2.5rem;
    padding-bottom: 5.5rem;
  }

  .hero-reference .hero-left {
    padding-top: 0;
    width: 100%;
    max-width: 100%;
  }

  .hero-reference .hero-heading {
    font-size: clamp(2.5rem, 5.8vw, 3.5rem);
    max-width: 100%;
    text-wrap: balance;
  }

  .hero-reference .hero-heading br {
    display: none;
  }

  .hero-reference .hero-lead {
    max-width: 100%;
    font-size: 1.05rem;
    line-height: 1.6;
  }

  .hero-reference .hero-right {
    height: 420px;
    width: 100%;
    max-width: none;
    justify-self: stretch;
    left: 0;
    margin-right: 0;
    padding: 0;
  }

  .hero-reference .hero-main-photo-frame {
    height: 100%;
    border-right: 3px solid var(--hero-gold);
    border-radius: 42% 12px 12px 42% / 54% 12px 12px 54%;
  }

  .hero-reference .hero-floating-card {
    position: absolute;
    right: 1rem;
    bottom: 1rem;
    width: auto;
    max-width: calc(100% - 2rem);
    margin: 0;
  }

  .hero-reference .hero-leaf-decoration {
    width: 100px;
    height: 200px;
  }
}

@media (max-width: 480px) {
  .hero-reference .hero-grid {
    gap: 1.5rem;
    padding-top: 1.5rem;
    padding-bottom: 4rem;
  }

  .hero-mobile-logo {
    max-width: 240px;
    max-height: 165px;
  }

  .hero-mobile-logo-wrap {
    margin-bottom: 1.25rem;
  }

  .hero-reference .hero-eyebrow {
    margin-bottom: 0.75rem;
    font-size: 0.7rem;
  }

  .hero-reference .hero-heading {
    font-size: clamp(2.25rem, 10vw, 3rem);
    letter-spacing: -0.04em;
  }

  .hero-reference .hero-lead {
    font-size: 0.95rem;
  }

  .hero-reference .hero-cta-group {
    flex-direction: column;
    align-items: stretch;
  }

  .hero-reference .hero-cta {
    width: 100%;
  }

  .hero-reference .hero-micro-features {
    display: none !important;
  }

  .hero-reference .hero-right {
    height: 300px;
  }

  .hero-reference .hero-floating-card {
    right: 0.6rem;
    bottom: 0.6rem;
    gap: 0.6rem;
    padding: 0.65rem 0.75rem;
  }

  .hero-reference .floating-address,
  .hero-reference .floating-location-note {
    font-size: 0.67rem;
  }

  .hero-reference .floating-location-icon {
    width: 20px;
    height: 26px;
  }

  .hero-reference .floating-divider {
    height: 32px;
  }

  .hero-reference .hero-leaf-decoration {
    width: 76px;
    height: 152px;
    opacity: 0.65;
  }
}

@media (max-width: 640px) {
  /* Rooms Section on Smartphones */
  .rooms-grid.rooms-carousel-track {
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--space-6);
    overflow-x: visible;
    padding: 0;
    margin: 0;
  }

  .rooms-grid.rooms-carousel-track .room-card {
    flex: unset;
    width: 100%;
  }

  .rooms-carousel-controls {
    display: none !important;
  }
}

@supports (height: 100svh) {
  @media (min-width: 901px) {
    .hero-reference {
      height: calc(100svh - var(--top-bar-height) - 79px);
    }
  }
}

@media (max-width: 1024px) {
  .section-about {
    padding: 3.5rem 0;
  }

  .section-about .about-grid {
    grid-template-columns: minmax(0, 1fr);
    gap: 2.5rem;
  }

  .section-about .about-left {
    width: 100%;
    max-width: 100%;
    margin: 0 auto;
  }

  .section-about .about-photo-frame {
    aspect-ratio: 1.4 / 1;
  }

  .section-about .about-floating-card {
    bottom: 1rem;
    left: 1rem;
  }

  .section-about .about-right {
    width: 100%;
    max-width: 100%;
    margin: 0;
  }

  .section-about .about-eyebrow-row {
    justify-content: center;
  }

  .section-about .about-eyebrow {
    text-align: center;
  }

  .section-about .about-title {
    font-size: clamp(2.1rem, 5vw, 2.75rem);
    text-align: center;
  }

  .section-about .about-paragraph {
    width: 100%;
    max-width: 100%;
    margin-left: 0;
    margin-right: 0;
  }
}

@media (max-width: 600px) {
  .section-about {
    padding: 2.75rem 0;
  }


  .section-about .about-grid {
    gap: 2rem;
  }

  .section-about .about-photo-frame {
    aspect-ratio: 1.12 / 1;
    border-radius: 17px;
  }

  .section-about .about-floating-card {
    right: 0.6rem;
    bottom: 0.6rem;
    left: 0.6rem;
    max-width: none;
    gap: 0.65rem;
    padding: 0.7rem 0.8rem;
  }

  .section-about .about-floating-icon {
    width: 36px;
    height: 36px;
  }

  .section-about .about-floating-title {
    font-size: 0.68rem;
  }

  .section-about .about-floating-sub {
    font-size: 0.72rem;
  }

  .section-about .about-title {
    font-size: clamp(1.9rem, 8vw, 2.45rem);
  }

  .section-about .about-paragraph {
    font-size: 0.88rem;
    text-align: left;
  }

  .about-highlights {
    grid-template-columns: minmax(0, 1fr);
    gap: 0.8rem;
  }

  .about-highlight,
  .about-highlight:first-child {
    align-items: center;
    padding: 0;
  }

  .about-highlight + .about-highlight {
    padding-top: 0.8rem;
    border-top: 1px solid rgba(189, 140, 50, 0.2);
    border-left: 0;
  }

  .about-highlight-copy {
    padding-top: 0;
  }

  .about-link {
    width: 100%;
  }
}

.cta-description {
  font-size: 0.875rem;
}

.btn-cta-gold {
  padding: 13px 22px;
  font-size: 0.78125rem;
}

/* --------------------------------------------------------------------------
   VERY LARGE SCREENS (Ultra-wide, 2K/4K, 1921px and above)
   Keep hero image proportionate, contained, and prevent over-stretching
   -------------------------------------------------------------------------- */
@media (min-width: 1921px) {
  .hero-reference .hero-right {
    width: 100%;
    max-width: 600px;
    height: 100%;
    max-height: 620px;
    left: 0;
    justify-self: end;
    padding: 0;
  }

  .hero-reference .hero-main-photo-frame {
    height: 100%;
    border: 3px solid var(--hero-gold);
    border-radius: 46% 24px 24px 46% / 60% 24px 24px 60%;
    box-shadow: 0 16px 40px rgba(11, 31, 58, 0.12);
  }

  .hero-reference .hero-main-photo {
    object-position: 65% center;
  }
}