/* ============================================================
   ANGEL TOUR AND TRAVELS – GOA
   RESPONSIVE STYLESHEET (css/responsive.css)
   Clean breakpoints for mobile, tablet, laptop & desktop
   ============================================================ */

/* ------------------------------------------------------------
   LAPTOPS & TABLETS (max-width: 1024px)
   ------------------------------------------------------------ */
@media screen and (max-width: 1024px) {
  .hero-grid {
    grid-template-columns: 1fr;
    gap: 2.5rem;
  }

  .service-strip-inner {
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
  }

  .featured-vehicle-card {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }

  .featured-vehicle-img {
    max-height: 440px;
  }

  .content-layout {
    grid-template-columns: 1fr;
  }

  .footer-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 2rem;
  }

  .grid-4 {
    grid-template-columns: repeat(2, 1fr);
  }

  .why-grid-5 {
    grid-template-columns: repeat(2, 1fr);
  }

  .steps-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* ------------------------------------------------------------
   TABLETS & MOBILE MENU TOGGLE (max-width: 900px)
   ------------------------------------------------------------ */
@media screen and (max-width: 900px) {
  .top-bar {
    display: none; /* Hide topbar on small screens for cleaner view */
  }

  .nav-toggle {
    display: block;
  }

  .main-nav {
    position: fixed;
    top: var(--mobile-header-height, 80px);
    left: 0;
    width: 100%;
    height: calc(100vh - var(--mobile-header-height, 80px));
    height: calc(100dvh - var(--mobile-header-height, 80px));
    background-color: #ffffff;
    flex-direction: column;
    align-items: stretch;
    padding: 1rem max(1rem, env(safe-area-inset-right)) calc(1rem + env(safe-area-inset-bottom)) max(1rem, env(safe-area-inset-left));
    overflow-y: auto;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
    transform: translateX(-100%);
    transition: transform 0.3s ease-in-out;
    z-index: 999;
  }

  .main-nav.active {
    transform: translateX(0);
  }

  .nav-list {
    flex-direction: column;
    align-items: stretch;
    gap: 0.35rem;
    width: 100%;
  }

  .nav-item {
    width: 100%;
  }

  .nav-link {
    padding: 0.8rem 0.9rem;
    font-size: 1rem;
    border-bottom: 1px solid var(--border-light);
    display: flex;
    justify-content: space-between;
    width: 100%;
  }

  .dropdown-menu {
    display: none;
    position: static;
    box-shadow: none;
    border: none;
    border-left: 2px solid var(--accent);
    margin-left: 1rem;
    padding: 0.25rem 0 0.5rem 0;
    max-height: 0;
    overflow: hidden;
    opacity: 1;
    visibility: visible;
    transform: none;
    transition: max-height 0.3s ease;
    min-width: unset;
  }

  .nav-item.dropdown-open .dropdown-menu {
    display: block;
    max-height: 70vh;
    overflow-y: auto;
  }

  .nav-item.dropdown-open .dropdown-icon {
    transform: rotate(180deg);
  }

  .header-cta {
    display: none; /* In mobile menu, we have floating actions */
  }

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

  body.nav-open {
    overflow: hidden;
  }
}

/* ------------------------------------------------------------
   MOBILE DEVICES (max-width: 640px)
   ------------------------------------------------------------ */
@media screen and (max-width: 640px) {
  html {
    font-size: 15px;
  }

  .container {
    padding-left: 1rem;
    padding-right: 1rem;
  }

  .header-inner {
    padding: 0.55rem 0;
  }

  .logo-img {
    height: 50px;
    max-width: 138px;
  }

  .nav-toggle {
    min-width: 44px;
    min-height: 44px;
    display: grid;
    place-items: center;
    border-radius: 8px;
  }

  .section {
    padding: 3rem 0;
  }

  .featured-vehicle-card {
    padding: 1.25rem;
    margin: 1.5rem 0;
  }

  .featured-vehicle-img {
    max-height: none;
  }

  .featured-vehicle-content h3 {
    font-size: 1.5rem;
  }

  h1 {
    font-size: 1.85rem;
  }

  h2 {
    font-size: 1.5rem;
  }

  .hero {
    padding: 2.75rem 0 14.5rem;
    background-color: var(--primary);
    background-position: center bottom;
    background-size: 100% auto;
    background-repeat: no-repeat;
  }

  .hero-content h1 {
    font-size: 1.85rem;
    line-height: 1.25;
  }

  .service-strip-inner {
    grid-template-columns: 1fr;
    gap: 0.75rem;
  }

  .service-strip-item {
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    padding-bottom: 0.5rem;
  }

  .service-strip-item:last-child {
    border-bottom: none;
  }

  .booking-form {
    grid-template-columns: 1fr;
  }

  .form-group.full-width {
    grid-column: span 1;
  }

  .form-submit-btn {
    grid-column: span 1;
  }

  .grid-2, .grid-3, .grid-4, .why-grid-5 {
    grid-template-columns: 1fr;
  }

  .fleet-tabs {
    width: 100%;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
  }

  .fleet-tab {
    flex: 1 1 0;
    min-height: 44px;
    padding: 0.7rem 0.65rem;
    white-space: nowrap;
  }

  .tempo-fleet-card .card-body {
    min-height: auto;
  }

  .steps-grid {
    grid-template-columns: 1fr;
  }

  .footer-grid {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .detail-hero-grid, .decision-grid, .testimonials-grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }

  .card-img-wrapper {
    height: 190px;
  }

  .card-actions, .card-footer-btns {
    grid-template-columns: 1fr 1fr;
    gap: 0.5rem;
    padding: 0 1rem 1rem;
  }

  .card-footer-btns.three-btns {
    grid-template-columns: 1fr 1fr;
  }


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

  .btn-group .btn {
    width: 100%;
  }

  .floating-actions {
    bottom: max(0.75rem, env(safe-area-inset-bottom));
    right: max(0.75rem, env(safe-area-inset-right));
  }

  .floating-btn {
    width: 48px;
    height: 48px;
  }

  .floating-btn svg {
    width: 24px;
    height: 24px;
  }

  .back-to-top {
    bottom: max(0.75rem, env(safe-area-inset-bottom));
    left: max(0.75rem, env(safe-area-inset-left));
    width: 40px;
    height: 40px;
  }

  .booking-filter-section {
    margin-top: -16px;
    padding: 0 0.75rem;
  }

  .booking-filter-bar,
  .booking-modal-panel {
    padding: 1rem;
    border-radius: 12px;
  }

  .booking-modal {
    padding: 0.5rem;
  }

  .booking-modal-panel {
    max-height: calc(100vh - 1rem);
    max-height: calc(100dvh - 1rem);
  }

  .booking-modal-heading h2 {
    font-size: 1.35rem;
  }

  .filter-input,
  .filter-select,
  .filter-textarea,
  input,
  select,
  textarea {
    min-width: 0;
    font-size: 16px;
  }

  .map-container {
    height: 250px;
  }

  .sidebar-widget {
    padding: 1.15rem;
  }

  .cta-strip {
    padding: 2.25rem 1rem;
  }

  .cta-strip h2 {
    font-size: 1.55rem;
  }

  .main-content article h2 {
    font-size: 1.4rem;
  }

  .main-content article ul,
  .main-content article ol {
    margin-left: 1.15rem;
  }

  img,
  iframe,
  table {
    max-width: 100%;
  }

  .main-body,
  .sidebar-widget,
  .card,
  .feature-card {
    overflow-wrap: anywhere;
  }
}

/* ------------------------------------------------------------
   EXTRA SMALL DEVICES (max-width: 360px)
   ------------------------------------------------------------ */
@media screen and (max-width: 360px) {
  .hero-content h1 {
    font-size: 1.65rem;
  }

  .booking-card {
    padding: 1.25rem 1rem;
  }

  .container {
    padding-left: 0.8rem;
    padding-right: 0.8rem;
  }

  .logo-img {
    height: 46px;
    max-width: 124px;
  }

  .card-actions,
  .card-footer-btns,
  .card-footer-btns.three-btns {
    grid-template-columns: 1fr;
  }

  .floating-btn {
    width: 44px;
    height: 44px;
  }

  .floating-btn svg {
    width: 22px;
    height: 22px;
  }

  .routes-grid {
    grid-template-columns: 1fr;
  }
}

/* ------------------------------------------------------------
   MOBILE-FIRST SAFETY LAYER
   Keeps long content, booking controls and reusable page sections
   usable on small screens (including 320px-wide devices).
   ------------------------------------------------------------ */
@media screen and (max-width: 640px) {
  :root {
    --container-gutter: 1rem;
  }

  html {
    scroll-padding-top: 76px;
  }

  .site-header {
    position: sticky;
  }

  .header-inner {
    min-height: 64px;
    gap: 0.5rem;
  }

  .main-nav {
    top: var(--mobile-header-height, 64px);
    height: calc(100vh - var(--mobile-header-height, 64px));
    height: calc(100dvh - var(--mobile-header-height, 64px));
  }

  .nav-link,
  .dropdown-link {
    min-height: 44px;
    align-items: center;
  }

  .dropdown-link {
    display: flex;
  }

  .section-header {
    margin-bottom: 2rem;
  }

  .section-header p,
  .page-hero p,
  .hero-content p {
    font-size: 1rem;
  }

  .hero-content,
  #hero-section .hero-content {
    margin-left: 0;
    max-width: 100%;
  }

  .hero-actions,
  .hero-slider-controls {
    align-items: stretch;
  }

  .hero-actions .btn,
  .hero-btn,
  .cta-strip .btn,
  .stay-banner .btn {
    width: 100%;
    min-height: 46px;
  }

  .booking-card,
  .booking-filter-bar,
  .main-body,
  .guide-box,
  .sidebar-widget,
  .feature-card,
  .step-card,
  .decision-card {
    padding: 1rem;
  }

  .booking-card-header {
    align-items: flex-start;
    gap: 0.75rem;
  }

  .booking-card-title {
    font-size: 1.25rem;
  }

  .booking-form,
  .booking-filter-form,
  .booking-modal .booking-filter-form {
    grid-template-columns: minmax(0, 1fr);
  }

  .booking-filter-form > *,
  .booking-modal .filter-field-wide,
  .filter-field-wide,
  .form-group.full-width,
  .form-submit-btn {
    grid-column: 1 / -1;
  }

  .form-submit-btn,
  .filter-action .btn,
  .booking-filter-form .btn {
    width: 100%;
    min-height: 48px;
  }

  .fleet-tabs,
  #vehicle-fleet .fleet-tabs {
    flex-wrap: nowrap;
    justify-content: flex-start;
    overflow-x: auto;
    overscroll-behavior-x: contain;
    padding-bottom: 0.35rem;
    scrollbar-width: thin;
  }

  .fleet-tab,
  #vehicle-fleet .fleet-tab {
    flex: 0 0 auto;
  }

  .card-actions,
  .card-footer-btns,
  .card-footer-btns.three-btns,
  .stay-card .stay-actions {
    grid-template-columns: minmax(0, 1fr);
  }

  .card-actions .btn,
  .card-footer-btns .btn,
  .stay-card .stay-actions .btn {
    min-height: 44px;
  }

  .detail-hero-img-wrap img {
    height: 240px;
  }

  .itinerary-item {
    gap: 0.85rem;
    padding: 1rem;
  }

  .faq-question {
    min-height: 54px;
    padding: 0.9rem 1rem;
    font-size: 1rem;
  }

  .faq-answer,
  .faq-item.active .faq-answer {
    padding-left: 1rem;
    padding-right: 1rem;
  }

  .spec-table-container {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  .spec-table {
    min-width: 480px;
  }

  .spec-table th,
  .spec-table td {
    padding: 0.75rem 0.9rem;
  }

  .page-layout,
  .content-layout {
    grid-template-columns: minmax(0, 1fr);
    gap: 1.25rem;
  }

  .page-layout > aside {
    position: static;
  }

  .cta-strip,
  .stay-banner {
    margin-left: 0;
    margin-right: 0;
    border-radius: 12px;
  }

  .site-footer {
    padding-top: 3rem;
    padding-bottom: calc(5rem + env(safe-area-inset-bottom));
  }

  .footer-grid {
    margin-bottom: 2rem;
  }

  .footer-location-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  iframe {
    width: 100%;
  }

  input,
  select,
  textarea,
  button {
    max-width: 100%;
  }
}

/* Small landscape screens have very little vertical room for the open menu. */
@media screen and (max-width: 900px) and (orientation: landscape) and (max-height: 520px) {
  .main-nav {
    padding-top: 0.5rem;
    padding-bottom: 0.5rem;
  }

  .nav-link {
    min-height: 38px;
    padding-top: 0.55rem;
    padding-bottom: 0.55rem;
  }
}

