/* ============================================
   MEDICEL HOMEPAGE - Main Stylesheet
   ============================================ */

/* --- CSS Custom Properties --- */
:root {
  --color-primary: #2B7CB9;
  --color-primary-dark: #1A4B7A;
  --color-primary-darker: #0e3a5e;
  --color-white: #FFFFFF;
  --color-light-gray: #F5F5F5;
  --color-text-gray: #555555;
  --color-text-dark: #333333;
  --color-border-light: rgba(255, 255, 255, 0.5);
  --color-tile-bg: rgba(200, 210, 220, 0.45);
  --color-tile-bg-hover: rgba(180, 200, 215, 0.65);
  --color-nav-overlay: rgba(42, 82, 120, 0.82);

  --font-serif: 'Playfair Display', Georgia, 'Times New Roman', serif;
  --font-sans: 'Inter', 'Helvetica Neue', Arial, sans-serif;

  --header-height: 140px;
  --footer-height: 46px;
  --transition-speed: 0.4s;
  --transition-ease: cubic-bezier(0.4, 0, 0.2, 1);
}

/* --- Reset & Base --- */
*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: var(--font-sans);
  color: var(--color-text-dark);
  background: var(--color-white);
  overflow-x: hidden;
  min-height: 100vh;
}

a {
  text-decoration: none;
  color: inherit;
  transition: color var(--transition-speed) var(--transition-ease),
              opacity var(--transition-speed) var(--transition-ease);
}

ul, ol {
  list-style: none;
}

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

button {
  border: none;
  background: none;
  cursor: pointer;
  font-family: inherit;
}

/* ============================================
   HEADER
   ============================================ */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: var(--header-height);
  background: var(--color-white);
  z-index: 100;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  padding: 30px 40px 0;
}

.logo {
  display: block;
  width: 160px;
  z-index: 101;
  transition: opacity var(--transition-speed);
}

.logo:hover {
  opacity: 0.8;
}

.logo img {
  width: 100%;
  height: auto;
}

/* Wave decoration - top right */
.wave-decoration {
  position: absolute;
  top: -40px;
  right: -80px;
  width: 500px;
  height: 350px;
  pointer-events: none;
  z-index: 1;
  overflow: hidden;
}

.wave-decoration::before,
.wave-decoration::after {
  content: '';
  position: absolute;
  border-radius: 50%;
}

.wave-decoration::before {
  width: 450px;
  height: 450px;
  top: -80px;
  right: -60px;
  background: rgba(200, 215, 235, 0.25);
}

.wave-decoration::after {
  width: 350px;
  height: 350px;
  top: -20px;
  right: -100px;
  background: rgba(180, 200, 225, 0.18);
}

/* Nav Toggle Button */
.nav-toggle {
  display: flex;
  align-items: center;
  gap: 12px;
  font-family: var(--font-sans);
  font-size: 15px;
  font-weight: 400;
  color: var(--color-text-dark);
  z-index: 200;
  padding: 8px 0;
  cursor: pointer;
  letter-spacing: 0.5px;
}

.nav-toggle .nav-text {
  transition: opacity var(--transition-speed);
}

.nav-toggle:hover .nav-text {
  opacity: 0.6;
}

/* Hamburger Icon */
.hamburger {
  width: 30px;
  height: 22px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  position: relative;
}

.hamburger span {
  display: block;
  width: 100%;
  height: 2px;
  background: var(--color-text-dark);
  transition: all 0.35s var(--transition-ease);
  transform-origin: center;
}

/* Hamburger to X animation */
.nav-open .hamburger span:nth-child(1) {
  transform: translateY(10px) rotate(45deg);
  background: var(--color-white);
}

.nav-open .hamburger span:nth-child(2) {
  opacity: 0;
  transform: scaleX(0);
}

.nav-open .hamburger span:nth-child(3) {
  transform: translateY(-10px) rotate(-45deg);
  background: var(--color-white);
}

.nav-open .nav-toggle .nav-text {
  color: var(--color-white);
}

/* ============================================
   HERO SECTION
   ============================================ */
.hero-section {
  position: relative;
  width: 100%;
  height: 100vh;
  overflow: hidden;
}

/* Background Slider */
.background-slider {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
}

.background-slider .slide {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-size: cover;
  background-position: center center;
  background-repeat: no-repeat;
  opacity: 0;
  transition: opacity 1.5s ease-in-out;
  will-change: opacity;
}

.background-slider .slide.active {
  opacity: 1;
}

/* Subtle Ken Burns effect */
.background-slider .slide::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(255, 255, 255, 0.05);
}

/* ============================================
   TILE GRID
   ============================================ */
.tile-grid {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 10;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  grid-template-rows: repeat(2, 1fr);
  gap: 18px;
  width: 60%;
  max-width: 900px;
  padding-top: 40px;
}

.tile {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 40px 24px;
  min-height: 140px;
  border: 1px solid var(--color-border-light);
  background: var(--color-tile-bg);
  backdrop-filter: blur(2px);
  -webkit-backdrop-filter: blur(2px);
  color: var(--color-white);
  font-family: var(--font-serif);
  font-size: 22px;
  font-weight: 400;
  font-style: italic;
  letter-spacing: 0.5px;
  line-height: 1.3;
  cursor: pointer;
  transition: all var(--transition-speed) var(--transition-ease);
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.2);
  overflow: hidden;
}

.tile::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(255, 255, 255, 0);
  transition: background var(--transition-speed) var(--transition-ease);
  z-index: -1;
}

.tile:hover {
  background: var(--color-tile-bg-hover);
  border-color: rgba(255, 255, 255, 0.75);
  transform: scale(1.02);
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.tile:hover::before {
  background: rgba(255, 255, 255, 0.08);
}

/* ============================================
   FULLSCREEN NAVIGATION
   ============================================ */
.fullscreen-nav {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 150;
  display: flex;
  flex-direction: column;
  visibility: hidden;
  opacity: 0;
  transition: visibility 0s linear 0.5s, opacity 0.5s var(--transition-ease);
}

.fullscreen-nav.is-open {
  visibility: visible;
  opacity: 1;
  transition-delay: 0s;
}

/* Close Button */
.nav-close {
  position: absolute;
  top: 30px;
  right: 40px;
  z-index: 160;
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--color-white);
  font-size: 15px;
  font-weight: 400;
  letter-spacing: 0.5px;
  cursor: pointer;
  transition: opacity var(--transition-speed);
}

.nav-close:hover {
  opacity: 0.7;
}

.nav-close-icon {
  font-size: 28px;
  font-weight: 300;
  line-height: 1;
}

/* Nav Columns Container */
.nav-columns {
  display: flex;
  width: 100%;
  height: 100%;
}

/* Individual Nav Column */
.nav-column {
  flex: 1;
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 80px 20px 40px;
  background-size: cover;
  background-position: center;
  overflow-y: auto;
  overflow-x: hidden;
  transition: flex 0.5s var(--transition-ease);
}

.nav-column::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: var(--color-nav-overlay);
  transition: background var(--transition-speed) var(--transition-ease);
  z-index: 0;
}

.nav-column:hover::before {
  background: rgba(42, 82, 120, 0.7);
}

.nav-column > * {
  position: relative;
  z-index: 1;
}

/* Nav Column Title */
.nav-column-title {
  display: inline-block;
  border: 1px solid var(--color-border-light);
  padding: 12px 30px;
  color: var(--color-white);
  font-family: var(--font-serif);
  font-size: 22px;
  font-weight: 400;
  font-style: italic;
  text-align: center;
  margin-bottom: 30px;
  letter-spacing: 0.5px;
  transition: all var(--transition-speed);
  white-space: nowrap;
}

.nav-column:hover .nav-column-title {
  border-color: rgba(255, 255, 255, 0.8);
  text-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
}

/* Nav Sub Items */
.nav-subitems {
  width: 100%;
  text-align: center;
}

.nav-category-title {
  color: var(--color-white);
  font-family: var(--font-serif);
  font-size: 16px;
  font-weight: 700;
  font-style: italic;
  margin-top: 15px;
  margin-bottom: 8px;
}

.nav-subitems ul {
  margin-bottom: 10px;
}

.nav-subitems li {
  margin: 4px 0;
}

.nav-subitems a {
  color: var(--color-white);
  font-family: var(--font-sans);
  font-size: 13px;
  font-weight: 300;
  letter-spacing: 0.3px;
  transition: opacity var(--transition-speed);
  display: inline-block;
  padding: 3px 0;
}

.nav-subitems a:hover {
  opacity: 0.7;
}

/* Product filter button */
.btn-product-filter {
  display: inline-block;
  border: 1px solid var(--color-white);
  color: var(--color-white);
  padding: 8px 20px;
  font-size: 13px;
  font-weight: 400;
  letter-spacing: 0.5px;
  margin-top: 15px;
  transition: all var(--transition-speed);
  background: transparent;
}

.btn-product-filter:hover {
  background: rgba(255, 255, 255, 0.15);
}

/* Distribution button in nav */
.nav-column .btn-distribution {
  display: inline-block;
  border: 1px solid var(--color-white);
  color: var(--color-white);
  padding: 8px 20px;
  font-size: 13px;
  font-weight: 400;
  letter-spacing: 0.5px;
  margin-top: 15px;
  transition: all var(--transition-speed);
  background: transparent;
}

.nav-column .btn-distribution:hover {
  background: rgba(255, 255, 255, 0.15);
}

/* ============================================
   SEARCH OVERLAY
   ============================================ */
.search-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(255, 255, 255, 0.97);
  z-index: 300;
  display: flex;
  align-items: center;
  justify-content: center;
  visibility: hidden;
  opacity: 0;
  transition: visibility 0s linear 0.4s, opacity 0.4s var(--transition-ease);
}

.search-overlay.is-open {
  visibility: visible;
  opacity: 1;
  transition-delay: 0s;
}

.search-container {
  width: 60%;
  max-width: 700px;
}

.search-container input {
  width: 100%;
  border: none;
  border-bottom: 2px solid var(--color-primary);
  font-size: 28px;
  font-family: var(--font-sans);
  font-weight: 300;
  padding: 15px 0;
  outline: none;
  color: var(--color-text-dark);
  background: transparent;
}

.search-container input::placeholder {
  color: #aaa;
}

.search-close {
  position: absolute;
  top: 30px;
  right: 40px;
  font-size: 32px;
  color: var(--color-text-dark);
  cursor: pointer;
  transition: opacity var(--transition-speed);
}

.search-close:hover {
  opacity: 0.5;
}

/* ============================================
   FOOTER BAR
   ============================================ */
.site-footer {
  position: fixed;
  bottom: 0;
  left: 0;
  width: 100%;
  height: var(--footer-height);
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  display: flex;
  align-items: center;
  justify-content: flex-end;
  padding: 0 30px;
  z-index: 90;
  border-top: 1px solid rgba(0, 0, 0, 0.06);
  gap: 0;
}

.footer-left {
  margin-right: auto;
  display: flex;
  align-items: center;
}

.footer-linkedin {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--color-primary);
  margin-right: 10px;
  transition: background var(--transition-speed);
}

.footer-linkedin:hover {
  background: var(--color-primary-dark);
}

.footer-linkedin img,
.footer-linkedin svg {
  width: 16px;
  height: 16px;
}

.footer-links {
  display: flex;
  align-items: center;
  gap: 25px;
}

.footer-links a {
  font-size: 11.5px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 1.2px;
  color: var(--color-text-gray);
  transition: color var(--transition-speed);
  white-space: nowrap;
}

.footer-links a:hover {
  color: var(--color-primary);
}

.footer-halma {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-left: 25px;
  font-size: 12px;
  color: var(--color-text-gray);
  white-space: nowrap;
}

.footer-halma strong {
  font-weight: 700;
}

.footer-halma .halma-logo {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: #5CC3AF;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-white);
  font-weight: 700;
  font-size: 10px;
}

/* ============================================
   COOKIE CONSENT (basic placeholder)
   ============================================ */
.cookie-consent {
  display: none; /* hidden by default, shown via JS if needed */
}

/* ============================================
   MOBILE NAVIGATION (Slide-in Sidebar)
   ============================================ */
.mobile-nav {
  position: fixed;
  top: 0;
  right: -100%;
  width: 320px;
  max-width: 85vw;
  height: 100%;
  background: var(--color-white);
  z-index: 160;
  padding: 80px 0 40px;
  overflow-y: auto;
  transition: right 0.4s var(--transition-ease);
  box-shadow: -5px 0 30px rgba(0,0,0,0.15);
  display: none;
}

.mobile-nav.is-open {
  right: 0;
}

.mobile-nav-header {
  text-align: center;
  padding: 0 20px 20px;
  border-bottom: 1px solid #eee;
  color: #999;
  font-size: 13px;
  letter-spacing: 1px;
  text-transform: uppercase;
}

.mobile-nav-list {
  padding: 10px 0;
}

.mobile-nav-item {
  border-bottom: 1px solid #f0f0f0;
}

.mobile-nav-item > a,
.mobile-nav-item > .mobile-nav-toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 25px;
  font-size: 15px;
  color: var(--color-primary);
  font-weight: 400;
  cursor: pointer;
  transition: background var(--transition-speed);
}

.mobile-nav-item > a:hover,
.mobile-nav-item > .mobile-nav-toggle:hover {
  background: #f8f9fb;
}

.mobile-nav-arrow {
  font-size: 18px;
  color: #ccc;
  transition: transform 0.3s;
}

.mobile-nav-item.is-expanded .mobile-nav-arrow {
  transform: rotate(90deg);
}

/* Mobile Sub-menu */
.mobile-nav-sub {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.4s var(--transition-ease);
  background: #f8f9fb;
}

.mobile-nav-item.is-expanded .mobile-nav-sub {
  max-height: 600px;
}

.mobile-nav-sub a {
  display: block;
  padding: 10px 25px 10px 40px;
  font-size: 13.5px;
  color: var(--color-text-gray);
  transition: color var(--transition-speed);
}

.mobile-nav-sub a:hover {
  color: var(--color-primary);
}

.mobile-nav-sub .sub-title {
  padding: 12px 25px 4px 35px;
  font-size: 13px;
  font-weight: 600;
  color: var(--color-text-dark);
}

/* Product filter button in mobile */
.mobile-btn-filter {
  display: block;
  margin: 15px 25px;
  padding: 10px 20px;
  border: 2px solid var(--color-primary);
  background: var(--color-primary);
  color: var(--color-white);
  text-align: center;
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 0.5px;
  transition: all var(--transition-speed);
}

.mobile-btn-filter:hover {
  background: var(--color-primary-dark);
  border-color: var(--color-primary-dark);
}

/* Mobile overlay */
.mobile-nav-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.35);
  z-index: 155;
  visibility: hidden;
  opacity: 0;
  transition: all 0.4s;
}

.mobile-nav-overlay.is-visible {
  visibility: visible;
  opacity: 1;
}

/* ============================================
   SCROLL INDICATOR (optional)
   ============================================ */
.scroll-indicator {
  position: absolute;
  bottom: 60px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 10;
  display: none; /* only show if page is scrollable */
}

/* ============================================
   UTILITY CLASSES
   ============================================ */
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
