/* ============================================
   REBIS – hlavní stylesheet
   Jednotné zelené téma skupiny Rebis
   ============================================ */

:root {
  --rebis-primary: #2d5a27;
  --rebis-primary-dark: #1e3d1a;
  --rebis-primary-light: #4a8c42;
  --rebis-accent: #f0c040;
  --rebis-dark: #142b11;
  --rebis-gradient: linear-gradient(135deg, var(--rebis-primary) 0%, var(--rebis-primary-light) 100%);
  --rebis-gradient-dark: linear-gradient(135deg, var(--rebis-dark) 0%, var(--rebis-primary-dark) 100%);
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.08);
  --shadow-md: 0 4px 20px rgba(0, 0, 0, 0.12);
  --shadow-lg: 0 8px 40px rgba(0, 0, 0, 0.16);
  --shadow-glow: 0 0 30px rgba(45, 90, 39, 0.3);
  --transition-fast: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-smooth: 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

/* TYPOGRAPHY */
@font-face {
  font-family: 'Inter';
  src: url('/fonts/InterVariable.woff2') format('woff2');
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

/* GLOBAL */
html {
  scroll-behavior: smooth;
}

body {
  color: #333;
  font-family: 'Inter', 'Segoe UI', system-ui, -apple-system, sans-serif;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, h5, h6, .display-1, .display-2, .display-3, .display-4, .display-5, .display-6 {
  font-family: 'Inter', 'Segoe UI', system-ui, sans-serif;
  letter-spacing: -0.01em;
}

::selection {
  background: var(--rebis-primary-light);
  color: white;
}

/* NAVBAR */
.navbar-rebis {
  background: rgba(20, 43, 17, 0.92);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  box-shadow: 0 2px 20px rgba(0, 0, 0, 0.15);
}

.navbar-rebis .nav-link {
  color: rgba(255, 255, 255, 0.75);
  transition: color var(--transition-fast);
}

.navbar-rebis .nav-link:hover,
.navbar-rebis .nav-link:focus,
.navbar-rebis .nav-link.active {
  color: #fff;
}

.navbar-rebis .dropdown-menu {
  border: none;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.98);
  box-shadow: var(--shadow-md);
  padding: 0.5rem;
}

.navbar-rebis .dropdown-item {
  border-radius: 8px;
  padding: 0.5rem 1rem;
  color: #333;
  transition: background var(--transition-fast), color var(--transition-fast);
}

.navbar-rebis .dropdown-item:hover,
.navbar-rebis .dropdown-item:focus {
  background: rgba(45, 90, 39, 0.1);
  color: var(--rebis-primary-dark);
}

.navbar-rebis .nav-lang {
  font-size: 0.9rem;
}

.brand-logo {
  filter: brightness(2);
}

/* HERO */
.hero {
  position: relative;
  min-height: min(82vh, 720px);
  display: flex;
  align-items: flex-end;
  overflow: hidden;
  background: var(--rebis-gradient-dark);
}

.hero-media {
  position: absolute;
  inset: 0;
}

.hero-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 35%;
}

.hero-media::after {
  content: '';
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(20, 43, 17, 0.35) 0%, rgba(20, 43, 17, 0.15) 40%, rgba(20, 43, 17, 0.75) 100%);
}

.hero-content {
  position: relative;
  z-index: 1;
  padding: 7rem 0 4rem;
  color: #fff;
}

.hero-eyebrow {
  display: inline-block;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  font-size: 0.85rem;
  color: var(--rebis-accent);
  margin-bottom: 0.75rem;
}

.hero h1 {
  font-size: clamp(2rem, 4.5vw, 3.5rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  max-width: 18ch;
  text-shadow: 0 2px 20px rgba(0, 0, 0, 0.4);
  animation: slideUp 0.8s ease-out;
}

.hero .lead {
  max-width: 560px;
  font-size: 1.15rem;
  color: rgba(255, 255, 255, 0.9);
  text-shadow: 0 1px 10px rgba(0, 0, 0, 0.4);
  animation: slideUp 0.8s ease-out 0.15s both;
}

.hero-cta {
  animation: slideUp 0.8s ease-out 0.3s both;
}

.hero-caption {
  position: absolute;
  right: 1rem;
  bottom: 1rem;
  z-index: 1;
  font-size: 0.8rem;
  color: rgba(255, 255, 255, 0.85);
  background: rgba(20, 43, 17, 0.55);
  border-radius: 999px;
  padding: 0.3rem 0.9rem;
  text-decoration: none;
  transition: background var(--transition-fast), color var(--transition-fast);
}

.hero-caption:hover {
  background: var(--rebis-primary);
  color: #fff;
}

@keyframes slideUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.lead {
  line-height: 1.75;
}

.display-4 {
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--rebis-primary-dark);
}

/* PAGE HERO (hlavička podstránek) */
.page-hero {
  margin-top: 70px;
  background: linear-gradient(135deg, #f4f8f3 0%, #e8f0e6 100%);
}

.page-hero h1 {
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--rebis-primary-dark);
}

.page-hero .lead {
  font-size: 1.25rem;
  line-height: 1.8;
  color: #555;
}

.page-hero-icon {
  max-width: 200px;
  filter: drop-shadow(0 10px 30px rgba(45, 90, 39, 0.2));
}

/* ICONS */
.icon-lg {
  font-size: 2.5rem;
  color: var(--rebis-primary);
}

.icon-circle {
  width: 60px;
  height: 60px;
}

/* SECTIONS */
.section-underline {
  width: 60px;
  height: 4px;
  background: var(--rebis-gradient);
  border-radius: 2px;
}

.section-tint {
  background: linear-gradient(135deg, #f4f8f3 0%, #e8f0e6 100%);
}

.cta-band {
  background: var(--rebis-gradient);
}

.cta-band .btn-light {
  border-radius: 12px;
  font-weight: 600;
  color: var(--rebis-primary);
}

/* PRODUCT CARDS (services) – akcentové barvy přes CSS proměnné */
.accent-cis {
  --accent-grad: var(--rebis-gradient);
  --accent: var(--rebis-primary);
}

.accent-plan {
  --accent-grad: linear-gradient(135deg, #6f42c1, #9f7aea);
  --accent: #6f42c1;
}

.accent-app {
  --accent-grad: linear-gradient(135deg, #28a745, #5cb85c);
  --accent: #28a745;
}

.accent-email {
  --accent-grad: linear-gradient(135deg, #17a2b8, #5bc0de);
  --accent: #17a2b8;
}

.accent-doc {
  --accent-grad: linear-gradient(135deg, #ffc107, #ffcd39);
  --accent: #ffc107;
}

.accent-cad {
  --accent-grad: linear-gradient(135deg, #0dcaf0, #6dd5ed);
  --accent: #0dcaf0;
}

.accent-header {
  background: var(--accent-grad);
  border: none;
}

.btn-accent {
  background: var(--accent-grad);
  color: #fff;
  border-radius: 12px;
  font-weight: 600;
}

.btn-accent:hover {
  filter: brightness(0.92);
  color: #fff;
}

.text-accent {
  color: var(--accent);
}

/* MISC */
.img-zoom {
  transition: transform var(--transition-fast);
}

.img-zoom:hover {
  transform: scale(1.02);
}

.profile-photo {
  max-width: 90%;
  border: 7px solid #f1f1f1;
}

.logo-partner {
  max-width: 200px;
}

/* SERVICE TILES (pod hero) */
.service-tile {
  display: block;
  height: 100%;
  padding: 2rem 1.75rem;
  border-radius: 16px;
  background: #fff;
  box-shadow: var(--shadow-sm);
  text-decoration: none;
  color: #333;
  transition: transform var(--transition-smooth), box-shadow var(--transition-smooth);
  position: relative;
  overflow: hidden;
}

.service-tile::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: var(--rebis-gradient);
  transform: scaleX(0);
  transition: transform var(--transition-smooth);
}

.service-tile:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-lg);
  color: #333;
}

.service-tile:hover::before {
  transform: scaleX(1);
}

.service-tile .bi {
  font-size: 2.25rem;
  color: var(--rebis-primary);
}

.service-tile h2 {
  font-size: 1.25rem;
  font-weight: 700;
  margin: 0.75rem 0 0.5rem;
}

.service-tile p {
  color: #666;
  margin-bottom: 0.75rem;
}

/* BUTTONS */
.btn {
  border-radius: 12px;
  padding: 0.75rem 1.5rem;
  font-weight: 600;
  transition: all var(--transition-fast);
  border: none;
}

.btn-primary,
.btn-success,
.btn-brand {
  background: var(--rebis-gradient);
  color: #fff;
  box-shadow: 0 4px 15px rgba(45, 90, 39, 0.3);
}

.btn-primary:hover,
.btn-success:hover,
.btn-brand:hover {
  background: var(--rebis-primary-dark);
  color: #fff;
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(45, 90, 39, 0.4);
}

.btn-outline-light-brand {
  background: transparent;
  color: #fff;
  border: 2px solid rgba(255, 255, 255, 0.7);
}

.btn-outline-light-brand:hover {
  background: rgba(255, 255, 255, 0.15);
  color: #fff;
  border-color: #fff;
}

.btn-lg {
  padding: 1rem 2.5rem;
  border-radius: 14px;
  font-size: 1.1rem;
}

/* LINKS */
.link-success {
  color: var(--rebis-primary) !important;
  transition: color var(--transition-fast);
}

.link-success:hover {
  color: var(--rebis-primary-dark) !important;
}

/* SECTION DIVIDERS */
.b-example-divider {
  width: 100%;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--rebis-primary), transparent);
  border: none;
  box-shadow: none;
  opacity: 0.4;
}

/* PAGE HEADERS */
.display-5 {
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--rebis-primary-dark);
}

/* MARKETING CONTENT */
.marketing {
  padding: 5rem 0;
}

.marketing .col-lg-4 {
  margin-bottom: 2rem;
  text-align: center;
}

.marketing .col-lg-4 p {
  margin-right: 1rem;
  margin-left: 1rem;
  color: #666;
  line-height: 1.7;
}

/* CARDS */
.card {
  border: none;
  border-radius: 16px;
  transition: transform var(--transition-smooth), box-shadow var(--transition-smooth);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}

.card:hover {
  transform: translateY(-8px);
  box-shadow: var(--shadow-lg);
}

.card-header {
  border-bottom: none;
  padding: 1.5rem;
}

.card-body {
  padding: 1.5rem;
}

.card-footer {
  border-top: none;
  padding: 1rem 1.5rem;
}

/* COMPANY BOXES – homepage */
.company-box {
  padding: 3rem 2rem;
  border-radius: 20px;
  background: white;
  box-shadow: var(--shadow-sm);
  transition: transform var(--transition-smooth), box-shadow var(--transition-smooth);
  position: relative;
  overflow: hidden;
}

.company-box::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: var(--rebis-gradient);
  transform: scaleX(0);
  transition: transform var(--transition-smooth);
}

.company-box:hover {
  transform: translateY(-10px);
  box-shadow: var(--shadow-lg);
}

.company-box:hover::before {
  transform: scaleX(1);
}

.company-box img {
  width: 80px;
  height: 80px;
  margin-bottom: 1.5rem;
  transition: transform var(--transition-smooth);
}

.company-box:hover img {
  transform: scale(1.1) rotate(5deg);
}

.company-box h2 {
  font-size: 1.5rem;
  font-weight: 600;
  color: #333;
  margin-bottom: 1rem;
}

/* FEATURETTES */
.featurette-divider {
  margin: 4rem 0;
  border: none;
  height: 1px;
  background: linear-gradient(90deg, transparent, #ddd, transparent);
}

.featurette-heading {
  letter-spacing: -0.02em;
  font-weight: 700;
  color: #333;
}

.featurette {
  padding: 2rem 0;
}

.featurette img {
  border-radius: 16px;
  box-shadow: var(--shadow-md);
  transition: transform var(--transition-smooth), box-shadow var(--transition-smooth);
}

.featurette:hover img {
  transform: scale(1.02);
  box-shadow: var(--shadow-lg);
}

/* TIMELINE */
.timeline-panel,
.timeline-image {
  padding: 2rem;
  margin-bottom: 2rem;
  border-radius: 16px;
  background: white;
  box-shadow: var(--shadow-sm);
  position: relative;
  transition: box-shadow var(--transition-smooth);
}

.timeline-panel:hover,
.timeline-image:hover {
  box-shadow: var(--shadow-md);
}

.timeline-heading h4:first-child {
  color: var(--rebis-primary);
  font-weight: 700;
  font-size: 1.5rem;
}

.subheading {
  color: #666;
  font-weight: 500;
}

/* CONTACT CARDS */
.contact-card {
  padding: 2rem;
  background: white;
  border-radius: 16px;
  box-shadow: var(--shadow-sm);
  transition: transform var(--transition-smooth), box-shadow var(--transition-smooth);
  height: 100%;
}

.contact-card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-5px);
}

/* FOOTER */
.footer-rebis {
  margin-top: auto;
  background: var(--rebis-gradient-dark);
}

.footer-rebis .hover-link {
  transition: color var(--transition-fast);
}

.footer-rebis .hover-link:hover {
  color: white !important;
  text-decoration: underline !important;
}

/* ANIMATE ON SCROLL */
.fade-in-up {
  opacity: 0;
  transform: translateY(30px);
  animation: fadeInUp 0.6s ease-out forwards;
}

@keyframes fadeInUp {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ICONS */
.bi {
  vertical-align: -0.125em;
  fill: currentColor;
}

/* RESPONSIVE */
@media (min-width: 40em) {
  .featurette-heading {
    font-size: 2.8rem;
  }
}

@media (min-width: 62em) {
  .featurette-heading {
    margin-top: 5rem;
  }
}

@media (max-width: 768px) {
  .hero {
    min-height: 70vh;
  }

  .hero-content {
    padding: 5rem 0 3.5rem;
  }

  .company-box {
    padding: 2rem 1.5rem;
    margin-bottom: 1.5rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .hero h1,
  .hero .lead,
  .hero-cta,
  .fade-in-up {
    animation: none;
    opacity: 1;
    transform: none;
  }
}
