/* ============================================
   ROBI-TECH | Główny arkusz stylów
   ============================================ */

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

:root {
  --primary: #1a1880;
  --primary-light: #3432b0;
  --primary-dark: #0f0e5c;
  --accent: #e63329;
  --accent-light: #ff4d43;
  --white: #ffffff;
  --gray-50: #f8f9fc;
  --gray-100: #eef0f7;
  --gray-200: #d8dce8;
  --gray-700: #3a3d52;
  --gray-900: #14162a;
  --text: #1e2030;
  --text-muted: #5a5f7a;
  --shadow-sm: 0 1px 4px rgba(26,24,128,0.08);
  --shadow-md: 0 4px 20px rgba(26,24,128,0.12);
  --shadow-lg: 0 8px 40px rgba(26,24,128,0.18);
  --radius-sm: 6px;
  --radius-md: 12px;
  --radius-lg: 20px;
  --transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --font-display: 'Sora', 'Segoe UI', sans-serif;
  --font-body: 'DM Sans', 'Segoe UI', sans-serif;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-body);
  background-color: var(--gray-50);
  color: var(--text);
  line-height: 1.65;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
}

a {
  color: inherit;
  text-decoration: none;
  transition: var(--transition);
}

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

.container {
  max-width: 1160px;
  margin: 0 auto;
  padding: 0 24px;
}

/* === Header === */
.header {
  background: var(--primary-dark);
  padding: 0;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 2px 16px rgba(10,10,60,0.25);
}

.header .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 72px;
}

.logo img {
  height: 46px;
  width: auto;
  display: block;
}

/* === Navigation === */
.nav {
  display: flex;
  gap: 4px;
  align-items: center;
}

.nav a {
  color: rgba(255,255,255,0.8);
  font-weight: 500;
  font-size: 0.95rem;
  padding: 8px 16px;
  border-radius: var(--radius-sm);
  letter-spacing: 0.01em;
  transition: var(--transition);
  position: relative;
}

.nav a:hover {
  color: var(--white);
  background: rgba(255,255,255,0.1);
}

.nav a.active {
  color: var(--white);
  background: rgba(255,255,255,0.15);
  font-weight: 600;
}

/* Hamburger menu */
.nav-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
  flex-direction: column;
  gap: 5px;
}

.nav-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: white;
  border-radius: 2px;
  transition: var(--transition);
}

/* === Hero === */
.hero {
  background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary) 50%, #2d2baa 100%);
  min-height: 520px;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  color: white;
  text-align: center;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse at 20% 50%, rgba(230,51,41,0.15) 0%, transparent 60%),
    radial-gradient(ellipse at 80% 20%, rgba(255,255,255,0.05) 0%, transparent 50%);
  pointer-events: none;
}

/* Siatka dekoracyjna w tle */
.hero::after {
  content: '';
  position: absolute;
  inset: 0;
  background-image: 
    linear-gradient(rgba(255,255,255,0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.03) 1px, transparent 1px);
  background-size: 60px 60px;
  pointer-events: none;
}

.hero-overlay {
  position: relative;
  z-index: 2;
  width: 100%;
  padding: 100px 24px;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(255,255,255,0.12);
  border: 1px solid rgba(255,255,255,0.2);
  color: rgba(255,255,255,0.9);
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 6px 16px;
  border-radius: 100px;
  margin-bottom: 28px;
}

.hero h1, .hero h2 {
  font-family: var(--font-display);
  font-size: clamp(2rem, 5vw, 3.2rem);
  font-weight: 700;
  line-height: 1.15;
  margin-bottom: 20px;
  letter-spacing: -0.02em;
}

.hero p {
  font-size: clamp(1rem, 2vw, 1.2rem);
  margin-bottom: 40px;
  color: rgba(255,255,255,0.8);
  max-width: 560px;
  margin-left: auto;
  margin-right: auto;
}

/* Hero przyciski */
.hero-actions {
  display: flex;
  gap: 16px;
  justify-content: center;
  flex-wrap: wrap;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 32px;
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: 0.95rem;
  letter-spacing: 0.01em;
  transition: var(--transition);
  cursor: pointer;
  border: 2px solid transparent;
}

.btn-primary {
  background: var(--white);
  color: var(--primary);
  border-color: var(--white);
}

.btn-primary:hover {
  background: var(--gray-100);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0,0,0,0.2);
}

.btn-outline {
  background: transparent;
  color: var(--white);
  border-color: rgba(255,255,255,0.5);
}

.btn-outline:hover {
  background: rgba(255,255,255,0.1);
  border-color: rgba(255,255,255,0.8);
  transform: translateY(-2px);
}

/* Legacy btn class */
.btn:not(.btn-primary):not(.btn-outline) {
  background-color: var(--white);
  color: var(--primary);
}

.btn:not(.btn-primary):not(.btn-outline):hover {
  background-color: var(--gray-100);
  transform: translateY(-2px);
}

/* === Kontakt skrót === */
.contact-shortcut {
  background: linear-gradient(to right, var(--accent), #c41c14);
  color: white;
  text-align: center;
  padding: 28px 20px;
}

.contact-shortcut h2,
.contact-shortcut h3 {
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 12px;
  opacity: 0.9;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.contact-shortcut .phone-links {
  display: flex;
  gap: 20px;
  justify-content: center;
  flex-wrap: wrap;
}

.contact-shortcut a {
  font-size: 1.4rem;
  font-weight: 700;
  color: white;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 20px;
  background: rgba(255,255,255,0.15);
  border-radius: var(--radius-sm);
  border: 1px solid rgba(255,255,255,0.25);
  transition: var(--transition);
}

.contact-shortcut a:hover {
  background: rgba(255,255,255,0.25);
  transform: translateY(-2px);
}

/* === Sekcja Features === */
.features {
  padding: 80px 0;
}

.section-header {
  text-align: center;
  margin-bottom: 56px;
}

.section-label {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 12px;
}

.section-header h2 {
  font-family: var(--font-display);
  font-size: clamp(1.8rem, 3.5vw, 2.6rem);
  font-weight: 700;
  color: var(--primary-dark);
  letter-spacing: -0.02em;
  line-height: 1.2;
}

.section-header p {
  margin-top: 12px;
  color: var(--text-muted);
  font-size: 1.05rem;
  max-width: 520px;
  margin-left: auto;
  margin-right: auto;
}

.grid-3 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 24px;
}

.feature-card {
  background: var(--white);
  padding: 32px 28px;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--gray-100);
  transition: var(--transition);
  position: relative;
  overflow: hidden;
}

.feature-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 4px;
  height: 100%;
  background: linear-gradient(to bottom, var(--accent), var(--primary-light));
}

.feature-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-lg);
  border-color: var(--gray-200);
}

.feature-icon {
  width: 52px;
  height: 52px;
  background: var(--gray-100);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.6rem;
  margin-bottom: 20px;
}

.feature-card h3 {
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--primary-dark);
  margin-bottom: 12px;
  line-height: 1.3;
}

.feature-card p {
  color: var(--text-muted);
  font-size: 0.92rem;
  line-height: 1.7;
}

/* === Services === */
.services-list {
  padding: 80px 0;
}

.service-tile {
  display: flex;
  flex-direction: column;
  border-radius: var(--radius-md);
  overflow: hidden;
  background: var(--white);
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--gray-100);
  transition: var(--transition);
  text-decoration: none;
  color: inherit;
}

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

.service-tile img {
  height: 200px;
  width: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.5s ease;
}

.service-tile:hover img {
  transform: scale(1.04);
}

.service-tile .tile-text {
  padding: 24px;
  flex: 1;
}

.service-tile h3 {
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--primary-dark);
  margin-bottom: 10px;
}

.service-tile p {
  color: var(--text-muted);
  font-size: 0.9rem;
  line-height: 1.65;
}

.tile-arrow {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 16px;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--primary);
  transition: var(--transition);
}

.service-tile:hover .tile-arrow {
  gap: 10px;
}

/* === Gallery === */
.gallery {
  padding: 80px 0;
}

.grid-gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 16px;
  margin-top: 32px;
}

.gallery-img {
  width: 100%;
  height: 200px;
  object-fit: cover;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.gallery-img:hover {
  transform: scale(1.03);
  box-shadow: var(--shadow-md);
}

/* === Lightbox === */
.lightbox {
  position: fixed;
  top: 0; left: 0;
  width: 100%; height: 100%;
  background: rgba(10, 10, 30, 0.95);
  display: none;
  justify-content: center;
  align-items: center;
  z-index: 9999;
  padding: 20px;
}

.lightbox.active {
  display: flex;
}

.lightbox-img {
  max-width: 92%;
  max-height: 85vh;
  border-radius: var(--radius-sm);
  box-shadow: 0 0 60px rgba(255,255,255,0.1);
  object-fit: contain;
}

.lightbox-close {
  position: absolute;
  top: 24px;
  right: 32px;
  color: rgba(255,255,255,0.7);
  font-size: 2rem;
  cursor: pointer;
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255,255,255,0.1);
  border-radius: 50%;
  transition: var(--transition);
  line-height: 1;
}

.lightbox-close:hover {
  background: rgba(255,255,255,0.2);
  color: white;
}

/* === Page Banner === */
.page-banner {
  background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary) 100%);
  padding: 64px 0;
  text-align: center;
  color: white;
  position: relative;
  overflow: hidden;
}

.page-banner::after {
  content: '';
  position: absolute;
  inset: 0;
  background-image: 
    linear-gradient(rgba(255,255,255,0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.03) 1px, transparent 1px);
  background-size: 60px 60px;
  pointer-events: none;
}

.page-banner h1,
.page-banner h2 {
  font-family: var(--font-display);
  font-size: clamp(1.8rem, 4vw, 2.8rem);
  font-weight: 700;
  color: var(--white);
  letter-spacing: -0.02em;
  position: relative;
  z-index: 1;
  margin-bottom: 12px;
}

.page-banner p {
  color: rgba(255,255,255,0.75);
  font-size: 1.05rem;
  position: relative;
  z-index: 1;
}

/* === Contact Section === */
.contact-info {
  padding: 80px 0;
}

.contact-info .container {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 24px;
}

.contact-box {
  background: var(--white);
  padding: 36px 28px;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--gray-100);
  transition: var(--transition);
  text-align: center;
}

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

.contact-box h2,
.contact-box h3 {
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 600;
  color: var(--primary);
  margin-bottom: 12px;
  letter-spacing: 0.01em;
}

.contact-box a {
  color: var(--primary-light);
  font-weight: 600;
  font-size: 1.1rem;
  display: block;
  margin: 4px 0;
}

.contact-box a:hover {
  color: var(--accent);
}

/* === SEO Content Blocks === */
.content-section {
  padding: 0 0 80px;
}

.content-section.compact {
  padding-top: 0;
}

.content-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(280px, 1fr);
  gap: 28px;
  align-items: start;
}

.rich-text {
  background: var(--white);
  border: 1px solid var(--gray-100);
  border-radius: var(--radius-md);
  padding: 32px 30px;
  box-shadow: var(--shadow-sm);
}

.rich-text h2 {
  font-family: var(--font-display);
  font-size: clamp(1.6rem, 3vw, 2.2rem);
  color: var(--primary-dark);
  line-height: 1.2;
  margin-bottom: 18px;
}

.rich-text p {
  color: var(--text-muted);
  margin-bottom: 14px;
}

.rich-text p:last-child {
  margin-bottom: 0;
}

.text-link {
  color: var(--primary-light);
  font-weight: 600;
  text-decoration: underline;
  text-decoration-thickness: 1.5px;
  text-underline-offset: 3px;
}

.note-box,
.resource-box {
  background: var(--white);
  border: 1px solid var(--gray-100);
  border-radius: var(--radius-md);
  padding: 28px 24px;
  box-shadow: var(--shadow-sm);
}

.note-box {
  background: linear-gradient(180deg, rgba(26, 24, 128, 0.06), rgba(255, 255, 255, 1));
}

.note-box h3,
.resource-box h3 {
  font-family: var(--font-display);
  font-size: 1.1rem;
  color: var(--primary-dark);
  margin-bottom: 14px;
}

.note-box p,
.resource-box p {
  color: var(--text-muted);
  margin-bottom: 14px;
}

.check-list,
.resource-list {
  list-style: none;
  display: grid;
  gap: 12px;
}

.check-list li,
.resource-list li {
  color: var(--text-muted);
  line-height: 1.6;
}

.check-list li {
  background: rgba(255, 255, 255, 0.8);
  border: 1px solid rgba(26, 24, 128, 0.08);
  border-radius: var(--radius-sm);
  padding: 12px 14px;
}

.resource-list a {
  color: var(--primary-light);
  font-weight: 600;
}

.resource-list a:hover {
  color: var(--accent);
}

.link-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 20px;
  margin-top: 28px;
}

.link-card {
  display: block;
  background: var(--white);
  border: 1px solid var(--gray-100);
  border-radius: var(--radius-md);
  padding: 24px 22px;
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
}

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

.link-card h3 {
  font-family: var(--font-display);
  font-size: 1rem;
  color: var(--primary-dark);
  margin-bottom: 8px;
}

.link-card p {
  color: var(--text-muted);
  font-size: 0.92rem;
  line-height: 1.65;
}

/* === Footer === */
.footer {
  background: var(--primary-dark);
  color: rgba(255,255,255,0.7);
  text-align: center;
  padding: 36px 0;
  font-size: 0.9rem;
  border-top: 1px solid rgba(255,255,255,0.08);
}

.footer p {
  margin: 6px 0;
}

.footer a {
  color: rgba(255,255,255,0.85);
}

.footer a:hover {
  color: white;
  text-decoration: underline;
}

/* === Animacje === */
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}

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

.fade-in {
  animation: fadeIn 0.8s ease-out forwards;
}

.fade-in-delay {
  opacity: 0;
  animation: fadeIn 0.8s ease-out 0.4s forwards;
}

.slide-up {
  opacity: 0;
  animation: slideUp 0.7s ease-out 0.2s forwards;
}

/* === Responsive === */
@media (max-width: 900px) {
  .grid-3 {
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  }
}

@media (max-width: 768px) {
  .header .container {
    height: 64px;
  }

  .nav-toggle {
    display: flex;
  }

  .nav {
    position: fixed;
    top: 64px;
    left: 0;
    right: 0;
    background: var(--primary-dark);
    flex-direction: column;
    align-items: stretch;
    padding: 16px;
    gap: 4px;
    transform: translateY(-120%);
    opacity: 0;
    transition: var(--transition);
    box-shadow: 0 8px 24px rgba(0,0,0,0.3);
  }

  .nav.open {
    transform: translateY(0);
    opacity: 1;
  }

  .nav a {
    padding: 14px 20px;
    border-radius: var(--radius-sm);
    font-size: 1rem;
  }

  .hero {
    min-height: 420px;
  }

  .hero-overlay {
    padding: 64px 20px;
  }

  .hero-actions {
    flex-direction: column;
    align-items: center;
  }

  .btn {
    width: 100%;
    max-width: 300px;
    justify-content: center;
  }

  .contact-shortcut .phone-links {
    flex-direction: column;
    align-items: center;
    gap: 12px;
  }

  .grid-3 {
    grid-template-columns: 1fr;
  }

  .grid-gallery {
    grid-template-columns: repeat(2, 1fr);
  }

  .gallery-img {
    height: 160px;
  }

  .features, .services-list, .gallery, .contact-info {
    padding: 56px 0;
  }

  .content-section {
    padding: 0 0 56px;
  }

  .content-grid {
    grid-template-columns: 1fr;
  }

  .rich-text,
  .note-box,
  .resource-box {
    padding: 24px 20px;
  }

  .contact-info .container {
    grid-template-columns: 1fr;
  }

  .lightbox-close {
    top: 16px;
    right: 16px;
  }
}

@media (max-width: 420px) {
  .grid-gallery {
    grid-template-columns: 1fr;
  }
}

/* === Accessibility === */
:focus-visible {
  outline: 3px solid var(--accent-light);
  outline-offset: 3px;
}

/* === Print === */
@media print {
  .header, .footer, .contact-shortcut {
    background: #fff !important;
    color: #000 !important;
  }
}
