/* ========================================================================
   Mobile Responsive Improvements
   Optimized for devices ≤ 576px (iPhone SE / small Androids)
   ======================================================================== */

html,
body,
.page-wraper {
  overflow-x: hidden;
}

/* ===== CORE MOBILE RESET & BASE STYLES ===== */
@media (max-width: 576px) {
  html, body {
    overflow-x: hidden;
    font-size: 14px;           /* slightly larger base for readability */
    -webkit-tap-highlight-color: transparent;
  }

  h1 { font-size: 2.1rem; line-height: 1.25; }
  h2 { font-size: 1.7rem; line-height: 1.3;  }
  h3 { font-size: 1.45rem; }
  h4 { font-size: 1.25rem; }
  h5 { font-size: 1.1rem;  }

  .container,
  .container-fluid {
    padding-left: 12px;
    padding-right: 12px;
  }

  .section-full {
    padding-top: 50px !important;
    padding-bottom: 50px !important;
  }

  .p-t120 { padding-top: 50px !important; }
  .p-b90  { padding-bottom: 50px !important; }

  img {
    max-width: 100%;
    height: auto;
    display: block;
  }
}

/* ===== SWIPER CAROUSEL FIXES ===== */
@media (max-width: 576px) {
  .swiper {
    overflow: hidden;           /* prevents horizontal scroll glitches */
  }

  .swiper-wrapper {
    /* do NOT force display: flex here – Swiper manages it */
  }

  .swiper-slide {
    width: 100% !important;
    padding: 0 8px;
  }

  /* Make arrows bigger and easier to tap */
  .swiper-button-next,
  .swiper-button-prev {
    width: 48px !important;
    height: 48px !important;
    --swiper-navigation-size: 28px !important;
    background: rgba(0,0,0,0.4) !important;
    border-radius: 50%;
    color: white !important;
    opacity: 0.9 !important;
    transition: all 0.2s;
  }

  .swiper-button-next:after,
  .swiper-button-prev:after {
    font-size: 26px !important;           /* slightly larger for mobile tappability */
    line-height: 50px !important;         /* vertically center inside the 50x50 button */
    color: #fff !important;
    font-weight: bold;                    /* optional: make arrows bolder */
    /* Remove any unwanted offsets that push them out of place */
    margin: 0 !important;
    top: 0 !important;                    /* reset any top positioning */
    left: 0 !important;
    transform: translate(0, 0) !important; /* ensure no extra translate */
  }

  /* Optional: make arrows even more centered inside the circle */
  .swiper-button-prev:after {
    padding-left: 3px;                    /* tiny nudge if ← looks off-center */
  }

  .swiper-button-next:after {
    padding-right: 3px;                   /* tiny nudge if → looks off-center */
  }

  /* Better centering – prevents next arrow from being cut off */
  .swiper-nav-center-bottom .swiper-button-prev {
    left: calc(50% - 90px) !important;
  }

  .swiper-nav-center-bottom .swiper-button-next {
    right: calc(50% - 90px) !important;
  }

  .swiper-nav-center-bottom {
    padding-bottom: 70px !important;
  }
}

/* ===== HEADER & NAVIGATION ===== */
@media (max-width: 576px) {
  .navbar-toggler {
    min-width: 48px;
    min-height: 48px;
    padding: 8px;
    font-size: 1.6rem;
  }

  .nav-link {
    font-size: 1rem;
    padding: 12px 0 !important;
  }

  .sub-menu {
    padding-left: 20px;
    font-size: 0.95rem;
  }
}

/* ===== BANNER / HERO ===== */
@media (max-width: 576px) {
  .trv-banner-1-wrap {
    height: 380px !important;       /* better for small phones */
  }

  .trv-banner-1-wrap .trv-banner-1-overlay {
    height: 380px;
    padding: 20px 15px;
  }

  .trv-banner-1-text {
    padding-top: 60px !important;
  }

  .trv-banner-1-text-large {
    font-size: 2.6rem !important;
    line-height: 1.15;
  }

  .trv-banner-text-detail {
    font-size: 0.9rem;
    margin-bottom: 60px;
  }

  .trv-banner-btn .site-button {
    padding: 12px 28px !important;
    font-size: 0.95rem !important;
  }
}

/* ===== BUTTONS & TOUCH TARGETS ===== */
@media (max-width: 576px) {
  .site-button,
  a.btn,
  button,
  input[type="submit"],
  input[type="button"] {
    min-height: 48px;
    min-width: 48px;
    padding: 10px 20px;
    font-size: 0.95rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }

  .butn-bg-shape {
    padding: 12px 30px !important;
  }
}

/* ===== CARDS & SECTIONS ===== */
@media (max-width: 576px) {
  .trv-destination-bx1,
  .trv-popular-tour-st1,
  .trv-testimo-bx2 {
    margin-bottom: 20px;
  }

  .trv-media img {
    border-radius: 12px;
  }
}

/* ===== FOOTER ===== */
@media (max-width: 576px) {
  footer {
    padding: 40px 0 20px;
  }

  .footer-follow-instagram ul {
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
  }
  /* when swiper is active, hide default grid and size images smaller */
  .footer-instagram-mobile {
    display: none; /* initially hidden; controlled by primary stylesheet */
  }
}

/* additional mobile-specific rules (up to 767px) */
@media (max-width: 767px) {
  .footer-follow-instagram {
    text-align: center;
    padding: 30px 0 50px;
  }

  .site-footer .footer-destination-col {
    flex: 0 0 100%;
    max-width: 100%;
  }

  .site-footer .footer-destination-list {
    column-count: 2;
    column-gap: 14px;
    margin-top: 6px;
  }

  .site-footer .footer-destination-list li a {
    font-size: 13px;
    line-height: 1.4;
  }

  .header-style-1 .trv-r-section-block > a .trv-new-info-btn,
  .header-style-2 .trv-r-section-block > a .trv-new-info-btn,
  .header-style-3 .trv-r-section-block > a .trv-new-info-btn {
    display: none !important;
  }

  .footer-instagram-mobile {
    display: block;
    padding: 6px 0 12px;
  }
  .footer-instagram-mobile .swiper-slide a {
    max-width: 50%;
  }
  .footer-instagram-mobile .swiper-slide img {
    border-radius: 12px;
  }
  .footer-instagram-thumbs {
    margin-top: 6px;
  }
  .footer-instagram-thumbs .swiper-slide img {
    width: 32px;
    height: 32px;
    border-radius: 4px;
  }
}

@media (max-width: 360px) {
  .site-footer .footer-destination-list {
    column-count: 1;
  }
}

.widget-title {
  font-size: 1.3rem;
}


/* ===== REDUCED MOTION ===== */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* ===== UTILITY CLASSES ===== */
@media (max-width: 576px) {
  .text-center-mobile { text-align: center !important; }
  .flex-column-mobile  { flex-direction: column !important; }
  .justify-center-mobile { justify-content: center !important; }
  .mobile-hidden       { display: none !important; }
}

/* ===== PREVENT HORIZONTAL SCROLL ===== */
@media (max-width: 576px) {
  .page-wraper,
  .section-full,
  .row,
  .container,
  .container-fluid {
    overflow-x: hidden !important;
  }
}

/* Add space between search icon and menu/hamburger icon in header */
.extra-nav.header-1-nav .extra-cell.one {
    margin-right: 20px;          /* ← this is the main spacing control */
}

/* Optional: make it responsive — more space on larger screens */
@media (min-width: 577px) {
    .extra-nav.header-1-nav .extra-cell.one {
        margin-right: 28px;      /* a bit more breathing room on tablets/desktops */
    }
}

/* On very small phones — keep it reasonable */
@media (max-width: 360px) {
    .extra-nav.header-1-nav .extra-cell.one {
        margin-right: 12px;      /* don't let it squeeze too much */
    }
}


element.style {
}
.swiper-nav-center-bottom .swiper-button-prev {
    left: calc(50% - 70px);
}
.swiper-nav-center-bottom .swiper-button-next, .swiper-nav-center-bottom .swiper-button-prev {
    bottom: 0;
    top: auto;
}
.swiper-button-prev {
    left: 0px;
}
.swiper-button-next, .swiper-button-prev {
    width: 56px;
    height: 56px;
    margin: 0px 10px 14px;
    color: #fff;
    background-color: #D4AF37;
    transition: 0.5s all ease;
    border-radius: 50%;
}

@media (max-width: 576px) {
  /* Force email to wrap fully and show complete text */
  .trv-contact-list li .trv-contact-info .info .text {
    white-space: normal !important;           /* allow line breaks */
    word-break: break-all !important;         /* break long words/emails */
    overflow-wrap: break-word !important;     /* modern word wrap */
    hyphens: auto !important;                 /* optional: nice hyphens */
    font-size: 18px !important;               /* slightly smaller if needed */
    line-height: 1.4 !important;
    max-width: 100% !important;
  }

  /* Reduce padding inside contact circles/boxes on mobile */
  .trv-contact-list li .trv-contact-info {
    flex-direction: column !important;        /* stack icon + text vertically */
    align-items: center !important;
    text-align: center !important;
    padding: 15px 10px !important;            /* less side padding */
  }

  .trv-contact-list li .trv-contact-info .media {
    margin-bottom: 12px !important;           /* space between icon and text */
  }

  .trv-contact-list li .trv-contact-info .info {
    width: 100% !important;
    padding-left: 0 !important;
  }
}

/* ================================================
   Mobile-only: Center ALL content in Contact Us section
   ================================================ */

@media (max-width: 576px) {

  /* Main wrapper - center everything inside */
  .trv-contact-us-wrap,
  .trv-contact-us-wrap .trv-contact-us-mid,
  .trv-contact-us-wrap .row,
  .trv-contact-us-wrap .col-xxl-6,
  .trv-contact-us-wrap .col-xl-7,
  .trv-contact-us-wrap .col-lg-7,
  .trv-contact-us-wrap .trv-contact-us-detail-wrap {
    margin-left: auto !important;
    margin-right: auto !important;
    text-align: center !important;
  }

  /* Google Map - center & full width */
  .g-map-wrap,
  .google-map,
  .trv-google-map,
  .google-map iframe,
  .trv-google-map iframe {
    margin-left: auto !important;
    margin-right: auto !important;
    width: 100% !important;
    max-width: 100% !important;
    display: block !important;
  }

  /* Title & description - center text */
  .trv-contact-us-wrap .section-head,
  .trv-contact-us-wrap .trv-head-title-wrap,
  .trv-contact-us-wrap .trv-head-title,
  .trv-contact-us-wrap .trv-head-discription {
    text-align: center !important;
    margin-left: auto !important;
    margin-right: auto !important;
  }

  /* Contact list items - center icons + text */
  .trv-contact-list {
    padding-left: 0 !important;
    margin: 0 auto !important;
    max-width: 320px !important;      /* optional: limit width so it doesn't stretch full screen */
  }

  .trv-contact-list li {
    margin: 0 auto 30px auto !important;
    text-align: center !important;
  }

  .trv-contact-list li .trv-contact-info {
    flex-direction: column !important;   /* stack icon above text */
    align-items: center !important;
    justify-content: center !important;
  }

  .trv-contact-list li .trv-contact-info .media {
    margin: 0 auto 15px auto !important;
  }

  .trv-contact-list li .trv-contact-info .info {
    width: 100% !important;
    padding-left: 0 !important;
    text-align: center !important;
  }

  /* "Let's Talk About You !" heading - center */
  .trv-con-media,
  .trv-con-media .trv-con-title {
    text-align: center !important;
    margin: 30px auto 0 auto !important;
  }

  /* Remove any left/right padding that might misalign */
  .trv-contact-us-wrap .trv-contact-us-detail {
    padding: 30px 15px 0 15px !important;
    margin: 0 auto !important;
    max-width: 100% !important;
  }
}

/* Prevent "Sri Lanka" from breaking into two lines */
.sri-lanka-no-break,
.trv-head-title:contains("Sri Lanka"),
.trv-banner-1-text-large:contains("Sri Lanka"),
h1:contains("Sri Lanka"),
h2:contains("Sri Lanka"),
h3:contains("Sri Lanka") {
  white-space: nowrap !important;
}

/* More specific & safe targeting if you have classes/IDs */
.logo-header a,
.trv-banner-1-text-large {
  white-space: nowrap !important;
}

/* Optional: force it in navigation & footer too */
.nav.navbar-nav a,
footer a,
.trv-con-title {
  white-space: nowrap !important;
}


/*  */
@media (max-width: 767px) {
  .footer-follow-instagram {
    padding: 30px 0 50px;
    text-align: center;
  }

  .widget-title {
    margin-bottom: 20px;
    font-size: 1.4rem;
  }

  /* Swiper container – responsive padding based on screen size */
  .trv-mobile-pop-insta {
    width: 100%;
    padding: 0 18vw;                    /* scales padding with viewport width */
    max-width: 100%;
    overflow: hidden;
    box-sizing: border-box;
  }

  /* Main active image – pops in front, size responsive to display */
  .trv-mobile-pop-insta .swiper-slide-active {
    width: 70vw !important;             /* main image = 70% of viewport width */
    max-width: 280px !important;        /* cap on larger phones */
    min-width: 220px !important;        /* minimum on very small phones */
    transform: scale(1.15) translateZ(30px) !important;
    z-index: 20 !important;
    box-shadow: 0 20px 45px rgba(0,0,0,0.35) !important;
    border-radius: 20px !important;
    transition: all 0.65s cubic-bezier(0.34, 1.56, 0.64, 1) !important;
  }

  /* Side peek images – smaller & back */
  .trv-mobile-pop-insta .swiper-slide-prev,
  .trv-mobile-pop-insta .swiper-slide-next {
    width: 60vw !important;
    max-width: 220px !important;
    transform: scale(0.78) translateZ(-80px) !important;
    opacity: 0.6 !important;
    z-index: 5 !important;
    filter: brightness(0.85) !important;
    transition: all 0.65s cubic-bezier(0.34, 1.56, 0.64, 1) !important;
  }

  .trv-mobile-pop-insta .swiper-slide a {
    display: block;
    border-radius: 20px;
    overflow: hidden;
    position: relative;
    background: #004B49;
  }

  .trv-mobile-pop-insta .swiper-slide img {
    width: 100%;
    height: auto;
    display: block;
    object-fit: cover;
  }

  /* Instagram icon overlay – only on active image */
  .trv-mobile-pop-insta .swiper-slide span {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0,75,73,0.65);
    opacity: 0;
    transition: opacity 0.4s ease;
    border-radius: 20px;
  }

  .trv-mobile-pop-insta .swiper-slide-active span {
    opacity: 1;
  }

  .trv-mobile-pop-insta .swiper-slide span i {
    font-size: 2.4rem;
    color: white;
  }

  /* Pagination dots */
  .trv-mobile-pop-insta .swiper-pagination {
    bottom: 12px !important;
  }

  .swiper-pagination-bullet {
    background: #D4AF37;
    opacity: 0.4;
    width: 8px;
    height: 8px;
  }

  .swiper-pagination-bullet-active {
    opacity: 1;
    background: #004B49;
    width: 12px;
    height: 12px;
  }
}


.trv-mobile-insta-swiper {
  overflow: visible !important;       /* prevent clipping sides */
  padding: 0 20px;                    /* optional: give breathing room left/right */
}

.trv-mobile-insta-swiper .swiper-wrapper {
  transform-style: preserve-3d;
  perspective: 1200px;                /* key for depth to show – adjust 1000–1500 */
}

.trv-mobile-insta-swiper .swiper-slide {
  width: 80% !important;              /* force narrower slides → better peeking on ~1.5 view */
  height: auto;
  overflow: hidden;
  border-radius: 16px;
  box-shadow: 0 8px 25px rgba(0,0,0,0.3); /* adds nice lift/depth */
  transition: transform 0.8s ease, opacity 0.8s ease;
}

.trv-mobile-insta-swiper .swiper-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.trv-mobile-insta-swiper .swiper-slide-active {
  transform: scale(1.12) !important;  /* force center enlargement if coverflow doesn't */
  opacity: 1 !important;
  z-index: 10;
}


@media (max-width: 767px) {
  .trv-mobile-insta-swiper,
  .trv-mobile-pop-insta {
    position: relative;
    padding-bottom: 80px !important;      /* give more space below for arrows */
  }

  .swiper-button-prev,
  .swiper-button-next {
    top: auto !important;
    bottom: 0px !important;              /* distance from bottom edge */
    width: 52px !important;
    height: 52px !important;
    background: rgba(0, 75, 73, 0.85) !important; /* or your #D4AF37 gold */
    border-radius: 50% !important;
    opacity: 0.95 !important;
    --swiper-navigation-size: 0 !important; /* hide default size if conflicting */
  }

  .swiper-button-prev {
    left: calc(50% - 80px) !important;
  }

  .swiper-button-next {
    right: calc(50% - 80px) !important;
  }

  /* Arrow icons fix */
  .swiper-button-next:after,
  .swiper-button-prev:after {
    font-size: 26px !important;
    line-height: 52px !important;
    color: white !important;
    margin: 0 !important;
    top: 0 !important;
    left: 0 !important;
    transform: none !important;
  }

  .swiper-button-prev:after {
    padding-left: 2px;
  }

  .swiper-button-next:after {
    padding-right: 2px;
  }
}

/* ================================================
   FIX SCROLLING ISSUE - Popular Search Section (Mobile Only)
   ================================================ */
@media (max-width: 767px) {

  .tvr-pop-search-bot-section {
    overflow: hidden !important;           /* Prevents internal scrolling */
    padding: 40px 0;
  }

  .tvr-pop-search-bot-section .row {
    align-items: center;
  }

  /* Fix the image - make it responsive and smaller on mobile */
  .tvr-pop-search-bot-section .col-md-5 .media img {
    width: 100% !important;
    max-width: 300px !important;           /* Adjust this value if needed */
    height: auto !important;
    display: block;
    margin: 0 auto;
  }

  /* Make title area clean on mobile */
  .tvr-pop-search-bot-section .col-md-7 {
    text-align: center;
    margin-top: 30px;
  }

  .tvr-large-title-st1 .sm-title {
    font-size: 5.1rem;
  }

  .tvr-large-title-st1 .lg-title {
    font-size: 6.4rem;
    line-height: 1.2;
  }
}

/* ================================================
   DETAIL SLIDER - Middle Clear, Sides Blurred
   ================================================ */
@media (max-width: 767px) {

  .trv-detail-slider {
    overflow: hidden !important;
  }

  .trv-detail-slider .trv_d-slider {
    padding: 25px 0 45px !important;
    overflow: visible !important;
  }

  .trv-detail-slider .trv_d-slider .swiper-wrapper {
    align-items: center !important;
  }

  /* Fixed width so slidesPerView:'auto' knows how wide each slide is */
  .trv-detail-slider .trv_d-slider .swiper-slide {
    width: 220px !important;
    flex-shrink: 0 !important;
    transition: filter 0.3s ease, transform 0.3s ease, opacity 0.3s ease !important;
    filter: blur(3px) brightness(0.7) !important;
    transform: scale(0.85) !important;
    opacity: 0.65 !important;
  }

  /* Active middle slide = fully clear */
  .trv-detail-slider .trv_d-slider .swiper-slide.swiper-slide-active {
    filter: none !important;
    transform: scale(1.05) !important;
    opacity: 1 !important;
    z-index: 10 !important;
  }

  .trv-detail-slider .trv_d-slider .trv_d-slider-media {
    height: 280px !important;
    border-radius: 16px !important;
    overflow: hidden !important;
  }

  .trv-detail-slider .trv_d-slider img {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
  }
}
