/* Custom responsive fixes for RTHS site
   - Focused on sections (not navbar)
   - Ensures proper layout on mobile, tablet, and small desktops */

/* ===== NAVBAR: Menu link font size (all pages, all viewports) ===== */
.main-menu .navigation li a {
  font-size: 22px;
}

/* ===== WELCOME AREA V2: Gaps between feature cards ===== */
.welcome-area-v2 .row {
  margin-left: -15px;
  margin-right: -15px;
}

.welcome-area-v2 .row > [class*="col-"] {
  padding-left: 15px;
  padding-right: 15px;
}

/* ===== WELCOME AREA: Image carousel – 20px margin, no slogan ===== */
.welcome-area .welcome-image-col {
  padding: 20px;
  box-sizing: border-box;
}

.welcome-image-wrap {
  position: relative;
  width: 100%;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.25);
  display: flex;
  flex-direction: column;
}

.welcome-slogan-banner {
  display: none !important;
}

.welcome-image-wrap .welcome-carousel,
.welcome-image-wrap .carousel {
  width: 100%;
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
}

.welcome-image-wrap .carousel-inner {
  border-radius: 12px;
  overflow: hidden;
  flex: 1;
  width: 100%;
  height: 100%;
}

.welcome-image-wrap .carousel-inner .item {
  height: 100%;
  min-height: 280px;
}

.welcome-image-wrap .carousel-inner .item img,
.welcome-image-wrap .carousel-inner img {
  width: 100%;
  height: 100%;
  min-height: 280px;
  display: block;
  object-fit: cover;
  object-position: center;
}

/* Override fixed sizes so carousel fills full card on desktop/tablet */
.welcome-image-wrap #homeWelcomeCarousel img,
.welcome-image-wrap #aboutCarousel img {
  max-width: none !important;
  height: 100% !important;
  min-height: 400px !important;
}


/* Left column: solid dark background to match reference */
.welcome-area .col-md-6:first-child {
  background: #0b0f1a;
}

.welcome-area .col-md-6:first-child .text-holder {
  padding: 0 0 0 10px;
  margin: 0;
}

@media (min-width: 768px) {
  .welcome-area .col-md-6:first-child .text-holder {
    padding: 0 0 0 10px;
    margin: 0;
  }
}

/* ===== DESKTOP & TABLET: Welcome area full width, 10px margin, text aligned ===== */
@media (min-width: 768px) {
  .welcome-area.sec-padding {
    padding: 24px 10px;
    box-sizing: border-box;
  }

  .welcome-area .container-fluid {
    max-width: 100%;
    padding-left: 0;
    padding-right: 0;
  }

  .welcome-area .row {
    display: flex;
    margin-left: 0;
    margin-right: 0;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    align-items: stretch;
  }

  .welcome-area .col-md-6 {
    display: flex;
    flex-direction: column;
  }

  .welcome-area .col-md-6 .text-holder {
    flex: 0 0 auto;
  }

  .welcome-area .welcome-image-col {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    min-height: 0;
  }

  .welcome-area .welcome-image-wrap {
    width: 100%;
    flex: 1;
    min-height: 0;
    display: flex;
    flex-direction: column;
  }

  .welcome-area .welcome-image-wrap .carousel,
  .welcome-area .welcome-image-wrap .carousel-inner {
    flex: 1;
    height: 100%;
    min-height: 0;
  }

  .welcome-area .welcome-image-wrap .carousel-inner .item {
    height: 100%;
    min-height: 0;
  }

  .welcome-area .welcome-image-wrap .carousel-inner .item img,
  .welcome-area .welcome-image-wrap #homeWelcomeCarousel img,
  .welcome-area .welcome-image-wrap #aboutCarousel img {
    min-height: 0;
    height: 100% !important;
    max-width: none !important;
    object-fit: cover;
  }

  .welcome-area .col-md-6 {
    padding-left: 12px;
    padding-right: 12px;
    box-sizing: border-box;
  }

  /* Home & About: cap carousel height so it matches text proportion on desktop */
  .welcome-area .row {
    align-items: flex-start;
  }

  .welcome-area .welcome-image-col {
    align-items: flex-start;
  }

  .welcome-area .welcome-image-wrap {
    flex: none;
    max-height: 400px;
  }

  .welcome-area .welcome-image-wrap .carousel,
  .welcome-area .welcome-image-wrap .carousel-inner,
  .welcome-area .welcome-image-wrap .carousel-inner .item {
    max-height: 400px;
  }

  .welcome-area .welcome-image-wrap .carousel-inner .item img,
  .welcome-area .welcome-image-wrap #homeWelcomeCarousel img,
  .welcome-area .welcome-image-wrap #aboutCarousel img {
    max-height: 400px;
    object-fit: cover;
  }

  /* Text uses full column width, left-aligned */
  .welcome-area .text-holder {
    max-width: none;
    width: 100%;
    text-align: left;
  }

  .welcome-area .sec-title {
    text-align: left;
  }

  .welcome-area .text-box {
    max-width: none;
    margin: 0;
    text-align: left;
  }

  .welcome-area .text-box p {
    text-align: left;
  }

  .welcome-area .sec-title h1 {
    text-align: left;
  }
}

/* Phones & small tablets */
@media (max-width: 767px) {

  /* Prevent horizontal scroll */
  html,
  body {
    overflow-x: hidden;
  }

  /* Generic image rule */
  img {
    max-width: 100%;
    height: auto;
  }

  /* ===== Home: Feature cards under hero ===== */
  .welcome-area-v2 .row {
    margin-left: 0;
    margin-right: 0;
  }

  .welcome-area-v2 .col-md-3 {
    float: none;
    width: 100%;
    max-width: 420px;
    margin: 0 auto 16px;
  }

  .welcome-area-v2 .single-item {
    padding: 22px 22px;
  }

  .welcome-area-v2 .single-item .text-holder h3 {
    font-size: 18px;
    line-height: 1.3;
  }

  /* ===== Home & About: Hero text + image ===== */
  .welcome-area.sec-padding {
    padding: 20px 0 24px;
  }

  .welcome-area .row {
    margin-left: 0;
    margin-right: 0;
  }

  .welcome-area .col-md-6 {
    float: none;
    width: 100%;
  }

  .welcome-area .col-md-6:first-child {
    padding-left: 16px;
    padding-right: 16px;
    box-sizing: border-box;
  }

  .welcome-area .welcome-image-col {
    padding: 0;
    margin: 0;
  }

  .welcome-area .welcome-image-wrap {
    width: 100% !important;
    max-width: none !important;
    margin: 0 !important;
    border-radius: 0;
  }

  /* put some space between text and image on phones */
  .welcome-area .col-md-6:first-child {
   
  }

  .welcome-area .text-holder {
    padding: 8px 16px 0;
    text-align: left;
  }

  .welcome-area .sec-title {
    text-align: left;
  }

  .welcome-area .text-box {
    max-width: none;
    margin: 0;
    text-align: left;
  }

  .welcome-area .text-holder .sec-title h1 {
    font-size: 26px;
    line-height: 1.25;
    text-align: left;
  }

  /* Justify paragraph text so both left and right edges align on mobile */
  .welcome-area .text-box p,
  .welcome-area .text-holder .text-box p {
    font-size: 15px;
    line-height: 1.6;
    text-align: justify !important;
  }

  .welcome-area .welcome-image-wrap .carousel-inner .item {
    min-height: 260px;
  }

  .welcome-area .welcome-image-wrap .carousel-inner .item img,
  .welcome-area .welcome-image-wrap #homeWelcomeCarousel img,
  .welcome-area .welcome-image-wrap #aboutCarousel img {
    width: 100% !important;
    max-width: none !important;
    height: auto !important;
    min-height: 260px !important;
    max-height: 320px !important;
    object-fit: cover;
  }

  .welcome-area #aboutCarousel,
  .welcome-area #homeWelcomeCarousel {
    width: 100% !important;
    max-width: none !important;
    margin-top: 24px !important;
  }

  /* ===== Contact: cards row ===== */
  .contact-info-area .row {
    display: block;
  }

  .contact-info-area .col-md-4 {
    display: block;
    width: 100%;
    max-width: 420px;
    margin: 0 auto 18px;
  }

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

  .contact-card h4 {
    font-size: 17px;
  }

  .contact-card .main-text {
    font-size: 15px;
  }

  /* ===== Contact: enquiry form ===== */
  .enquiry-form-section .row .col-md-4,
  .enquiry-form-section .row .col-md-12 {
    float: none;
    width: 100%;
  }

  .enquiry-form-section .form-group {
    margin-bottom: 14px;
  }

  .enquiry-form-section input,
  .enquiry-form-section select,
  .enquiry-form-section textarea {
    width: 100%;
  }

  .enquire-btn {
    width: 100%;
    max-width: 360px;
    display: block;
    margin: 10px auto 0;
  }

  /* ===== Contact: FAQ ===== */
  .faq-area .faq-wrapper {
    padding: 0 10px;
  }

  .faq-area .faq-item h3 {
    font-size: 18px;
  }

  .faq-area .faq-item p {
    font-size: 15px;
    line-height: 1.6;
  }

  /* ===== Contact: Map ===== */
  .contact-map-area iframe {
    width: 100%;
    height: 320px;
    display: block;
    border: 0;
  }

  /* ===== Footer: stack columns ===== */
  .footer-area .col-lg-3,
  .footer-area .col-md-6,
  .footer-area .col-sm-6 {
    float: none;
    width: 100%;
    max-width: 480px;
    margin: 0 auto 8px;
  }

  /* Tighten footer spacing on mobile */
  .footer-area {
    padding-top: 20px;
    padding-bottom: 10px;
  }

  .footer-bottom-area {
    padding-top: 8px;
    padding-bottom: 8px;
  }
}

/* Medium devices (tablets & small desktops) */
@media (min-width: 768px) and (max-width: 1199px) {

  /* Feature cards: 2 per row on tablets */
  .welcome-area-v2 .col-md-3 {
    width: 50%;
    float: left;
    margin-bottom: 18px;
  }

  /* Hero split: keep 2 columns but tighten text */
  .welcome-area .col-md-6 {
    width: 50%;
  }

  /* cleaner layout & spacing in welcome section */
  .welcome-area.sec-padding {
    padding: 24px 10px;
  }

  .welcome-area .row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
  }

  .welcome-area .col-md-6:first-child {
    padding-right: 16px;
  }

  .welcome-area .col-md-6:last-child {
    padding-left: 16px;
  }

  /* Smaller text on tablet so it balances with image/carousel */
  .welcome-area .text-holder .sec-title h1 {
    font-size: 24px;
    line-height: 1.25;
  }

  .welcome-area .text-box p {
    font-size: 14px;
    line-height: 1.55;
  }

  /* Contact cards: 2 per row on tablets */
  .contact-info-area .row {
    display: flex;
    flex-wrap: wrap;
  }

  .contact-info-area .col-md-4 {
    flex: 0 0 50%;
    max-width: 50%;
    margin-bottom: 18px;
  }

  /* Map height on tablets */
  .contact-map-area iframe {
    width: 100%;
    height: 380px;
    border: 0;
  }
}

/* Tablets only: footer 2 columns x 2 rows with ~25px gaps */
@media (min-width: 768px) and (max-width: 991px) {
  .footer-area .row {
    display: flex;
    flex-wrap: wrap;
    column-gap: 25px;
    row-gap: 25px;
  }

  .footer-area .col-lg-3,
  .footer-area .col-md-6,
  .footer-area .col-sm-6 {
    float: none;
    flex: 0 0 calc(50% - 12.5px);
    max-width: calc(50% - 12.5px);
    margin: 0;
  }

  .single-footer-widget.pd-bottom50,
  .single-footer-widget.mar-bottom {
    padding-bottom: 16px;
    margin-bottom: 0;
    min-height: auto;
  }
}

/* Why Choose Us: space between the two columns in table view only (2-col layout) */
@media (min-width: 768px) and (max-width: 991px) {
  .choosing-area .row {
    column-gap: 24px;
  }
}

/* Why Choose Us: add 3px gaps between cards on desktop only */
@media (min-width: 992px) {
  .choosing-area .row {
    gap: 3px;
  }
}

/* Why Choose Us: slightly narrower cards so 3 fit per row on large desktop only */
@media (min-width: 1200px) {
  .choosing-area .row > .col-lg-4 {
    flex: 0 0 calc(33.333% - 4px);
    max-width: calc(33.333% - 4px);
  }
}
