/* ==========================================================================
   THS — Technical Hydraulic Services & Industrial Equipment Co.
   Replica of ths-me.com (Joomla Helix3 / SP Page Builder, preset4 — RED)
   ========================================================================== */

@import url("../fonts/fonts.css");

:root {
  --primary: #ff0000;
  --primary-dark: #cc0000;
  --red: #b50000;
  --dark: #333333;
  --dark-2: #232323;
  --topbar: #b0b0b0;
  --menu-hover: #ffff00;
  --text: #333333;
  --muted: #777777;
  --light: #f5f5f5;
  --border: #e8e8e8;
  --radius: 4px;
  --shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { -webkit-text-size-adjust: 100%; }

body {
  font-family: Oxygen, "Segoe UI", Tahoma, Arial, sans-serif;
  font-weight: 300;
  font-size: 15px;
  line-height: 1.7;
  color: var(--text);
  background: #ffffff;
}

img { max-width: 100%; height: auto; border: 0; }
a { color: var(--primary); text-decoration: none; transition: color 0.2s ease; }
a:hover { color: var(--primary-dark); }
ul { list-style: none; }
h1, h2, h3, h4, h5, h6 { font-family: "Open Sans", Oxygen, Arial, sans-serif; line-height: 1.4; color: var(--dark); }
h1 { font-weight: 800; }
h2 { font-weight: 600; }
h3, h4 { font-weight: 400; }
h5, h6 { font-weight: 800; }

.container { max-width: 1200px; margin: 0 auto; padding: 0 15px; }

/* --------------------------------------------------------------------------
   Top bar  (#sp-top-bar — gray, contact info + translate + social + flags)
   -------------------------------------------------------------------------- */
#sp-top-bar {
  background: var(--topbar);
  color: #000000;
  padding: 8px 0;
  font-size: 13px;
}
#sp-top-bar .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 6px 18px;
  direction: ltr;
}
#sp-top-bar a { color: #000000; }
#sp-top-bar a:hover { color: var(--primary); }
.tb-flags { display: flex; align-items: center; gap: 6px; }
.tb-flags a.flag img { height: 16px; opacity: 0.85; vertical-align: middle; }
.tb-flags a.flag:hover img { opacity: 1; }
.tb-flags a.flag span { margin-inline-end: 5px; font-size: 15px; }
.tb-translate select {
  border: 0;
  background: #fff;
  color: #000;
  font-size: 12.5px;
  padding: 3px 6px;
  border-radius: 3px;
  max-width: 180px;
}
.tb-contact { display: flex; align-items: center; flex-wrap: wrap; gap: 4px 20px; }
.tb-contact span { white-space: nowrap; }
.tb-contact i { margin-inline-end: 5px; }
ul.social-icons { display: flex; align-items: center; gap: 2px 12px; }
ul.social-icons a { font-size: 14px; }
ul.social-icons a:hover { color: var(--primary); }

/* --------------------------------------------------------------------------
   Header / logo  (#sp-header — white, wide banner logo centered)
   -------------------------------------------------------------------------- */
#sp-header {
  background: #ffffff;
  box-shadow: 0 3px 3px rgba(0, 0, 0, 0.05);
}
#sp-header .header-inner {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 96px;
}
#sp-header .logo { display: block; }
#sp-header .logo .logo-desktop { display: block; max-height: 96px; width: auto; }
#sp-header .logo .logo-mobile { display: none; }

/* --------------------------------------------------------------------------
   Menu bar  (#sp-menu — dark gray, centered bold white links, yellow hover)
   -------------------------------------------------------------------------- */
#sp-menu {
  background-color: var(--dark);
  color: #ffffff;
  position: relative;
  z-index: 1000;
}
#sp-menu .menu-inner {
  display: flex;
  align-items: center;
  min-height: 64px;
  position: relative;
}
#sp-menu a { color: #ffffff; font-size: 18px; font-weight: bold; }
#sp-menu a:hover { color: var(--menu-hover); }

#offcanvas-toggler {
  display: none;
  padding: 0 14px;
  font-size: 22px;
  line-height: 64px;
  cursor: pointer;
  user-select: none;
}
#offcanvas-toggler i { color: #fff; }
#offcanvas-toggler:hover i { color: var(--primary); }

.main-nav { flex: 1; display: flex; justify-content: center; min-width: 0; }
.main-nav > ul { display: flex; align-items: center; justify-content: center; flex-wrap: wrap; }
.main-nav > ul > li { position: relative; }
.main-nav > ul > li > a {
  display: block;
  padding: 18px 14px;
  line-height: 28px;
  white-space: nowrap;
}
.main-nav > ul > li > a i.fa-angle-down { font-size: 12px; margin-inline-start: 5px; }
.main-nav > ul > li.active > a,
.main-nav > ul > li:hover > a { color: var(--menu-hover); }

/* dropdowns — dark red */
.main-nav .dropdown {
  position: absolute;
  top: 100%;
  inset-inline-start: 0;
  min-width: 260px;
  background: var(--red);
  box-shadow: 0 3px 5px 0 rgba(0, 0, 0, 0.2);
  padding: 20px;
  opacity: 0;
  visibility: hidden;
  transform: translateY(8px);
  transition: all 0.22s ease;
  z-index: 1100;
}
.main-nav > ul > li:hover > .dropdown { opacity: 1; visibility: visible; transform: translateY(0); }
.main-nav .dropdown li { position: relative; }
.main-nav .dropdown li a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px;
  color: #fff;
}
.main-nav .dropdown li a:hover { background: var(--primary); color: var(--menu-hover); }
.main-nav .dropdown li.active > a { color: var(--primary); }
.main-nav .dropdown li.active > a:hover { color: #fff; }
.main-nav .dropdown .dropdown {
  inset-inline-start: 100%;
  top: -20px;
}
.main-nav .dropdown li:hover > .dropdown { opacity: 1; visibility: visible; transform: translateY(0); }

/* --------------------------------------------------------------------------
   Hero slider  (red caption boxes top-right, full-height arrows, bottom dots)
   -------------------------------------------------------------------------- */
.hero {
  position: relative;
  overflow: hidden;
  background-image: url("../images/misc/feature-bg1.jpg");
  background-repeat: no-repeat;
  background-size: cover;
  background-position: 50% 50%;
  color: rgba(255, 204, 0, 1);
}
.hero .slides { position: relative; height: 520px; }
.hero .slide {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: 50% 50%;
  opacity: 0;
  transition: opacity 0.9s ease;
}
.hero .slide.active { opacity: 1; z-index: 2; }
.hero .slide-caption { position: absolute; top: 10%; right: 7%; z-index: 4; }
.hero .slide-caption h2 {
  margin: 0;
  padding: 9px;
  background-color: rgba(255, 0, 0, 0.67);
  color: #fff;
  font-size: 30px;
  font-weight: 700;
  line-height: 1.35;
}
.hero .arrow {
  position: absolute;
  top: 0;
  bottom: 0;
  z-index: 5;
  width: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  font-size: 24px;
  opacity: 0.8;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.6);
  cursor: pointer;
}
.hero .arrow:hover { opacity: 0.9; color: #fff; }
.hero .arrow.prev { left: 0; }
.hero .arrow.next { right: 0; }
.hero .dots {
  position: absolute;
  bottom: 10px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 5;
  display: flex;
  gap: 5px;
}
.hero .dots span {
  width: 10px;
  height: 10px;
  border: 1px solid #ffffff;
  border-radius: 10px;
  background-color: rgba(0, 0, 0, 0);
  cursor: pointer;
  transition: background 0.2s ease;
}
.hero .dots span.active { background-color: #ffffff; width: 12px; height: 12px; }

/* --------------------------------------------------------------------------
   Logo strip (partner logos)
   -------------------------------------------------------------------------- */
.logo-strip { margin: 100px 0; }
.logo-strip .container {
  display: flex;
  align-items: center;
  justify-content: space-around;
  flex-wrap: wrap;
  gap: 30px 20px;
}
.logo-strip a, .logo-strip span { display: flex; align-items: center; }
.logo-strip img { max-height: 100px; opacity: 1; }

/* --------------------------------------------------------------------------
   Parallax banner  (red-boxed title)
   -------------------------------------------------------------------------- */
.banner {
  padding: 50px 0;
  background-image: url("../images/misc/gates-hydraulic-hose.jpg");
  background-repeat: no-repeat;
  background-size: cover;
  background-attachment: fixed;
  background-position: 50% 50%;
  text-align: center;
}
.banner h2 {
  display: inline-block;
  background-color: rgba(255, 0, 0, 0.63);
  color: #ffffff;
  font-size: 60px;
  line-height: 60px;
  font-weight: 600;
  padding: 10px 22px;
  margin: 0;
}
.banner p { color: #fff; font-size: 20px; margin-top: 14px; }

/* --------------------------------------------------------------------------
   Page title (inner pages — red bar)
   -------------------------------------------------------------------------- */
.page-title {
  background: var(--primary);
  color: #fff;
  padding: 30px 0;
}
.page-title .container { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 6px; }
.page-title h1 { color: #fff; font-size: 24px; font-weight: 800; }
.breadcrumb { font-size: 13px; color: rgba(255, 255, 255, 0.85); }
.breadcrumb a { color: #fff; }
.breadcrumb a:hover { color: #fff; text-decoration: underline; }
.breadcrumb span { margin: 0 6px; }

/* --------------------------------------------------------------------------
   Generic content
   -------------------------------------------------------------------------- */
.content { padding: 60px 0; }
.content h2 { font-size: 26px; margin-bottom: 18px; color: var(--dark); }
.content h3 { font-size: 20px; margin: 22px 0 10px; color: var(--dark); }
.content p { margin-bottom: 14px; text-align: justify; }
.content .lead { font-size: 17px; color: #444; }
.section-title { text-align: center; margin-bottom: 40px; }
.section-title h2 { font-size: 30px; position: relative; display: inline-block; padding-bottom: 12px; }
.section-title h2::after {
  content: "";
  position: absolute;
  bottom: 0;
  inset-inline-start: 50%;
  transform: translateX(-50%);
  width: 60px;
  height: 3px;
  background: var(--primary);
}
.section-title p { color: var(--muted); margin-top: 8px; text-align: center; }

.btn {
  display: inline-block;
  padding: 10px 26px;
  background: var(--primary);
  border-color: #e00000;
  color: #fff !important;
  border-radius: 3px;
  font-weight: 600;
  font-size: 14px;
  transition: background 0.2s ease;
}
.btn:hover { background: var(--primary-dark); border-color: #b30000; }
.btn-outline { background: transparent; border: 2px solid var(--primary); color: var(--primary) !important; }
.btn-outline:hover { background: var(--primary); color: #fff !important; }

/* cards */
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(255px, 1fr)); gap: 28px; }
.card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}
.card:hover { transform: translateY(-5px); box-shadow: 0 12px 28px rgba(0, 0, 0, 0.12); }
.card .card-body { padding: 22px; }
.card .card-body h3 { font-size: 17px; margin: 0 0 8px; }
.card .card-body p { font-size: 13.5px; color: var(--muted); margin: 0; text-align: start; }

/* --------------------------------------------------------------------------
   Contact page
   -------------------------------------------------------------------------- */
.contact-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 30px; }
@media (max-width: 900px) { .contact-grid { grid-template-columns: 1fr; } }
.contact-card {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px;
  background: #fff;
  box-shadow: var(--shadow);
}
.contact-card h3 { display: flex; align-items: center; gap: 10px; font-size: 18px; margin-bottom: 16px; }
.contact-card h3 i { color: var(--primary); font-size: 20px; width: 24px; }
.contact-card p { margin-bottom: 8px; }
.contact-card .muted { color: var(--muted); font-size: 13px; }
.info-list { margin-top: 10px; }
.info-list li { display: flex; gap: 12px; padding: 9px 0; border-bottom: 1px dashed #eee; align-items: flex-start; }
.info-list li:last-child { border-bottom: 0; }
.info-list i { color: var(--primary); width: 20px; margin-top: 4px; }
.info-list .en { display: block; color: var(--muted); font-size: 12.5px; }

/* --------------------------------------------------------------------------
   Gallery
   -------------------------------------------------------------------------- */
.filters { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; margin-bottom: 36px; }
.filters button {
  border: 1px solid var(--border);
  background: #fff;
  color: var(--text);
  padding: 8px 20px;
  border-radius: 30px;
  font-size: 13.5px;
  cursor: pointer;
  transition: all 0.2s ease;
}
.filters button:hover { border-color: var(--primary); color: var(--primary); }
.filters button.active { background: var(--primary); border-color: var(--primary); color: #fff; }

.gallery-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
@media (max-width: 1000px) { .gallery-grid { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 700px) { .gallery-grid { grid-template-columns: repeat(2, 1fr); } }
.gallery-item {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius);
  cursor: pointer;
  aspect-ratio: 1 / 1;
}
.gallery-item img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform 0.35s ease; }
.gallery-item:hover img { transform: scale(1.08); }
.gallery-item .g-overlay {
  position: absolute;
  inset: 0;
  background: rgba(255, 0, 0, 0.82);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  opacity: 0;
  transition: opacity 0.3s ease;
}
.gallery-item:hover .g-overlay { opacity: 1; }
.gallery-item .g-overlay .g-title { color: #fff; font-weight: 600; font-size: 14px; padding: 0 10px; text-align: center; }
.gallery-item .g-overlay .g-btns { display: flex; gap: 8px; }
.gallery-item .g-overlay .g-btns a {
  background: #fff;
  color: var(--primary-dark) !important;
  padding: 6px 16px;
  border-radius: 3px;
  font-size: 12.5px;
  font-weight: 600;
}
.gallery-item .g-overlay .g-btns a:hover { background: var(--dark); color: #fff !important; }
.gallery-item.hidden { display: none; }

/* lightbox */
.lightbox {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.9);
  z-index: 2000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 30px;
}
.lightbox.open { display: flex; }
.lightbox img { max-width: 92vw; max-height: 86vh; border-radius: 4px; box-shadow: 0 10px 60px rgba(0, 0, 0, 0.6); }
.lightbox .lb-close {
  position: absolute;
  top: 18px;
  inset-inline-end: 22px;
  color: #fff;
  font-size: 30px;
  cursor: pointer;
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.12);
}
.lightbox .lb-close:hover { background: var(--primary); }
.lightbox .lb-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  color: #fff;
  font-size: 30px;
  cursor: pointer;
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.12);
  border-radius: 50%;
}
.lightbox .lb-nav:hover { background: var(--primary); }
.lightbox .lb-prev { inset-inline-start: 20px; }
.lightbox .lb-next { inset-inline-end: 20px; }

/* --------------------------------------------------------------------------
   Carousel (mobile workshops)
   -------------------------------------------------------------------------- */
.carousel { position: relative; max-width: 900px; margin: 0 auto; }
.carousel .c-viewport { overflow: hidden; border-radius: var(--radius); box-shadow: var(--shadow); }
.carousel .c-track { display: flex; transition: transform 0.45s ease; }
.carousel .c-track img { width: 100%; flex: 0 0 100%; aspect-ratio: 16 / 10; object-fit: cover; display: block; }
.carousel .c-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: rgba(51, 51, 51, 0.6);
  color: #fff;
  font-size: 17px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 3;
  transition: background 0.2s ease;
}
.carousel .c-arrow:hover { background: var(--primary); }
.carousel .c-prev { left: 12px; }
.carousel .c-next { right: 12px; }
.carousel .c-dots { display: flex; justify-content: center; gap: 7px; margin-top: 14px; }
.carousel .c-dots span { width: 10px; height: 10px; border-radius: 50%; background: #ccc; cursor: pointer; }
.carousel .c-dots span.active { background: var(--primary); }

/* --------------------------------------------------------------------------
   Footer bottom  (#sp-bottom — light gray, 80px top padding)
   -------------------------------------------------------------------------- */
#footer-bottom {
  background: var(--light);
  color: #000;
  padding: 80px 0 0;
}
.footer-cols { display: grid; grid-template-columns: repeat(4, 1fr); gap: 40px; padding-bottom: 60px; }
@media (max-width: 1000px) { .footer-cols { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 600px) { .footer-cols { grid-template-columns: 1fr; } }
.footer-cols h3 { font-size: 24px; font-weight: 400; margin-bottom: 18px; }
.footer-cols p { font-size: 13.5px; color: #555; text-align: justify; }
#footer-bottom a { color: #000; }
#footer-bottom a:hover { color: var(--primary); }
.footer-map { text-align: center; }
.footer-map img { max-width: 100%; border-radius: var(--radius); box-shadow: var(--shadow); }
.fb-box {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  text-align: center;
  box-shadow: var(--shadow);
}
.fb-box .fb-head { display: flex; align-items: center; justify-content: center; gap: 8px; margin-bottom: 12px; font-weight: 700; color: #3b5998; }
.fb-box .fb-head i { font-size: 24px; }
.fb-box .fb-like { display: inline-flex; align-items: center; gap: 8px; background: #4267b2; color: #fff; padding: 8px 18px; border-radius: 3px; font-size: 13px; }
.fb-box .fb-like:hover { background: #365899; color: #fff; }

/* --------------------------------------------------------------------------
   Copyright bar  (#sp-footer — RED, centered, white text)
   -------------------------------------------------------------------------- */
#copyright {
  background: var(--primary);
  color: #fff;
  text-align: center;
  padding: 20px 0;
  font-size: 14px;
}
#copyright .container { display: flex; align-items: center; justify-content: center; flex-wrap: wrap; gap: 8px; }
#copyright a { color: rgba(255, 255, 255, 0.9); }
#copyright a:hover { color: #fff; }

/* --------------------------------------------------------------------------
   Mobile responsiveness
   -------------------------------------------------------------------------- */
@media (max-width: 992px) {
  #offcanvas-toggler { display: block; }
  .main-nav {
    position: fixed;
    top: 0;
    right: 0;
    width: 300px;
    height: 100%;
    background: var(--dark);
    box-shadow: -4px 0 24px rgba(0, 0, 0, 0.25);
    transform: translateX(100%);
    visibility: hidden;
    transition: transform 0.3s ease, visibility 0.3s;
    z-index: 1200;
    overflow-y: auto;
    padding: 20px 0 40px;
    justify-content: flex-start;
  }
  .main-nav.open { transform: translateX(0); visibility: visible; }
  .main-nav > ul { flex-direction: column; align-items: stretch; justify-content: flex-start; }
  .main-nav > ul > li > a { color: #fff; border-bottom: 1px solid rgba(255, 255, 255, 0.08); padding: 13px 22px; }
  .main-nav > ul > li:hover > a, .main-nav > ul > li.active > a { color: var(--menu-hover); }
  .main-nav .dropdown { position: static; opacity: 1; visibility: visible; transform: none; box-shadow: none; border: 0; background: rgba(0, 0, 0, 0.18); max-height: 0; overflow: hidden; transition: max-height 0.3s ease; min-width: 0; padding: 0; }
  .main-nav .dropdown.open { max-height: 800px; }
  .main-nav .dropdown li a { color: #cfd3dd; border-bottom: 1px solid rgba(255, 255, 255, 0.05); }
  .main-nav .dropdown li a:hover { background: transparent; }
  .main-nav .dropdown .dropdown { position: static; max-height: 0; overflow: hidden; }
  .main-nav .dropdown li:hover > .dropdown, .main-nav .dropdown .dropdown.open { max-height: 800px; }
  .nav-close { display: block; text-align: end; padding: 4px 20px 14px; color: #fff; font-size: 22px; cursor: pointer; }
  #sp-header .header-inner { min-height: 72px; }
  #sp-header .logo .logo-desktop { display: none; }
  #sp-header .logo .logo-mobile { display: block; max-height: 64px; width: auto; }
  #sp-menu .menu-inner { min-height: 50px; }
  #offcanvas-toggler { line-height: 50px; }
  .hero .slides { height: 360px; }
  .hero .slide-caption { top: 8%; right: 5%; }
  .hero .slide-caption h2 { font-size: 20px; }
  .banner { background-attachment: scroll; }
  .banner h2 { font-size: 30px; line-height: 1.2; }
  .logo-strip { margin: 60px 0; }
  #sp-top-bar .container { justify-content: center; }
}
@media (max-width: 767px) {
  /* Original template.css: flags + translate stay on one row, then contact
     info and social icons become full-width centered rows below */
  #sp-top-bar .container {
    justify-content: space-between;
    row-gap: 4px;
  }
  .tb-contact {
    display: table;
    width: 100%;
    text-align: center;
    margin: 0;
  }
  .tb-contact span {
    display: inline-block;
    margin: 2px 5px;
    font-size: 89%;
  }
  ul.social-icons {
    width: 100%;
    text-align: center;
    justify-content: center;
  }
  ul.social-icons > li { margin: 5px; }
}
@media (min-width: 993px) { .nav-close { display: none; } }

.backdrop { position: fixed; inset: 0; background: rgba(0, 0, 0, 0.55); z-index: 900; display: none; }
.backdrop.show { display: block; }
