/* =========================================================
   KVR ENERGY — Responsive Styles
   ========================================================= */

/* Large desktops */
@media (min-width: 1400px) {
  .container {
    max-width: 1240px;
  }
}

/* Tablets & below */
@media (max-width: 1199.98px) {
  .top-bar .top-item.hours {
    display: none;
  }
}

@media (max-width: 991.98px) {
  :root {
    --header-offset: 112px;
    --page-gutter: 1.25rem;
  }

  .container,
  .container-fluid {
    padding-left: var(--page-gutter) !important;
    padding-right: var(--page-gutter) !important;
  }

  .top-bar a[href^="mailto"] {
    display: none;
  }

  .top-bar .top-item {
    margin-right: 0;
  }

  .service-card h3 {
    min-height: 0;
  }

  .navbar {
    padding: 0.5rem 0;
  }

  .navbar-brand {
    max-width: calc(100% - 3.75rem);
  }

  .navbar-brand img {
    height: 58px;
    width: auto;
    max-width: 100%;
  }

  .navbar-collapse {
    background: var(--white);
    padding: 1rem;
    margin-top: 0.5rem;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    width: 100%;
    flex-basis: 100%;
  }

  .navbar-nav .nav-link::after {
    display: none;
  }

  .nav-cta {
    margin: 0.75rem 0 0;
  }

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

  .hero-carousel .carousel-item {
    height: 70vh;
    min-height: 480px;
  }

  .hero-content {
    padding-inline: 0;
  }

  /* Hide arrows on tablet/mobile so text keeps equal left/right space */
  .carousel-control-prev,
  .carousel-control-next {
    display: none;
  }

  .split-media {
    overflow: hidden;
  }

  .split-media .img-accent {
    position: relative;
    width: 100%;
    height: 220px;
    right: auto;
    bottom: auto;
    margin-top: 1rem;
    border: none;
  }

  .split-media::before {
    display: none;
  }

  .process-timeline {
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem 1rem;
  }

  .process-timeline::before {
    display: none;
  }

  .sustainability-block {
    min-height: 460px;
  }

  .sustainability-block .content-panel {
    max-width: 100%;
    width: 100%;
    margin: 2rem auto;
    padding: 2rem 1.5rem;
  }

  .service-detail-img {
    height: 300px;
    margin-bottom: 1.5rem;
  }

  .service-detail-gallery .service-detail-img {
    height: 220px;
    margin-bottom: 0;
  }

  .service-detail-gallery {
    margin-bottom: 1.5rem;
  }

  .enquiry-panel {
    padding: 1.75rem;
    margin-top: 2rem;
  }

  .careers-media__main {
    height: 280px;
  }

  .careers-apply .btn {
    margin-top: 0.5rem;
  }

  .float-whatsapp {
    bottom: 100px;
    right: 16px;
  }

  .float-linkedin {
    bottom: 170px;
    right: 16px;
  }

  .back-to-top {
    right: 16px;
    bottom: 36px;
  }
}

/* Mobile landscape / small tablets */
@media (max-width: 767.98px) {
  :root {
    --header-offset: 96px;
    --page-gutter: 1rem;
  }

  body {
    padding-bottom: 72px;
  }

  .section {
    padding: 60px 0;
  }

  .container,
  .container-fluid {
    max-width: 100%;
    padding-left: var(--page-gutter) !important;
    padding-right: var(--page-gutter) !important;
  }

  .top-bar {
    font-size: 0.78rem;
    text-align: center;
  }

  .top-bar .container {
    justify-content: center !important;
  }

  .top-bar .top-item {
    margin-right: 0;
  }

  .navbar {
    padding: 0.45rem 0;
  }

  .navbar-brand {
    max-width: calc(100% - 3.5rem);
  }

  .navbar-brand img {
    height: 52px;
    max-width: 100%;
  }

  .hero-carousel .carousel-item {
    height: auto;
    min-height: 520px;
  }

  .hero-content {
    align-items: flex-end;
    padding-inline: 0;
    padding-bottom: 4.25rem;
    padding-top: 1rem;
  }

  .hero-content .container {
    padding-left: var(--page-gutter) !important;
    padding-right: var(--page-gutter) !important;
  }

  .hero-content h1 {
    font-size: 1.6rem;
    max-width: 100%;
    line-height: 1.25;
  }

  .hero-content p {
    font-size: 0.95rem;
    max-width: 100%;
  }

  .hero-content .d-flex {
    flex-direction: column;
    align-items: stretch;
    width: 100%;
  }

  .hero-content .btn {
    width: 100%;
    margin-bottom: 0;
  }

  .carousel-indicators {
    margin-bottom: 1.25rem;
  }

  .page-banner {
    min-height: 240px;
  }

  .page-banner .banner-content {
    padding-top: 2.5rem;
    padding-bottom: 2rem;
    padding-left: var(--page-gutter) !important;
    padding-right: var(--page-gutter) !important;
  }

  .page-banner h1 {
    font-size: 1.55rem;
  }

  .split-media .img-main {
    height: 280px;
  }

  .process-timeline {
    grid-template-columns: 1fr;
    gap: 0;
    overflow: hidden;
  }

  .process-step {
    text-align: left;
    display: grid;
    grid-template-columns: 48px 1fr;
    gap: 0 1rem;
    align-items: start;
    padding: 0 0 1.5rem 0;
    border-left: 2px solid var(--green);
    margin-left: 22px;
    padding-left: 1.25rem;
    max-width: calc(100% - 22px);
  }

  .process-step .num {
    width: 44px;
    height: 44px;
    margin: 0 0 0 -2.55rem;
    grid-row: 1 / span 2;
  }

  .process-step h3 {
    margin-top: 0.35rem;
  }

  .project-cat-card {
    height: 300px;
  }

  .industry-card {
    height: 200px;
  }

  .cta-section {
    padding: 70px 0;
  }

  .mobile-action-bar {
    display: flex;
  }

  .float-whatsapp,
  .float-linkedin {
    display: none;
  }

  .back-to-top {
    bottom: 80px;
    right: 12px;
    width: 40px;
    height: 40px;
  }

  .filter-bar {
    justify-content: flex-start;
    overflow-x: auto;
    flex-wrap: nowrap;
    padding-bottom: 0.5rem;
    -webkit-overflow-scrolling: touch;
    max-width: 100%;
  }

  .filter-btn {
    white-space: nowrap;
    flex-shrink: 0;
  }

  .map-embed {
    height: 300px;
  }

  .footer-brand img {
    height: 64px;
    max-width: 180px;
  }

  /* Prevent AOS translate from causing sideways shift if JS still runs */
  [data-aos] {
    transform: none !important;
  }
}

/* Small phones */
@media (max-width: 424.98px) {
  :root {
    --header-offset: 88px;
    --page-gutter: 0.875rem;
  }

  .hero-carousel .carousel-item {
    min-height: 540px;
  }

  .hero-content h1 {
    font-size: 1.45rem;
  }

  .hero-content p {
    font-size: 0.9rem;
  }

  .section-title {
    font-size: 1.55rem;
  }

  .page-banner h1 {
    font-size: 1.4rem;
  }

  .top-bar .d-flex {
    flex-direction: column;
    gap: 0.25rem;
  }

  .navbar-brand img {
    height: 46px;
  }

  .contact-info-card,
  .enquiry-panel {
    padding: 1.25rem;
  }

  .careers-media__main {
    height: 240px;
  }

  .careers-media__grid img {
    height: 88px;
  }

  .careers-apply .btn.ms-2 {
    margin-left: 0 !important;
  }

  .sustainability-block .content-panel {
    padding: 1.5rem 1.15rem;
  }

  .sustainability-block h2 {
    font-size: 1.55rem;
  }
}

/* Extra small 320px */
@media (max-width: 359.98px) {
  .hero-content .d-flex {
    flex-direction: column;
  }

  .mobile-action-bar a {
    font-size: 0.65rem;
    padding: 0.55rem 0.15rem;
  }
}

/* Print */
@media print {
  .top-bar,
  .main-header,
  .float-whatsapp,
  .float-linkedin,
  .back-to-top,
  .mobile-action-bar,
  .carousel-control-prev,
  .carousel-control-next {
    display: none !important;
  }

  body {
    padding-bottom: 0;
  }
}
