/* Modern UI overrides - loaded after style.css */
:root {
  --bg: #f8fafc;            /* very light blue background */
  --surface: #ffffff;       /* white cards */
  --text: #1e293b;          /* dark blue text */
  --muted: #64748b;         /* slate muted */
  --primary: #7c3aed;       /* violet primary */
  --primary-600: #6d28d9;   /* darker violet */
  --primary-700: #5b21b6;   /* even darker violet */
  --accent: #f472b6;        /* rose accent */
  --ring: rgba(124, 58, 237, 0.15);
  --radius: 16px;
  --shadow-sm: 0 1px 2px rgba(0,0,0,.05);
  --shadow-md: 0 6px 18px rgba(0,0,0,.08);
  --shadow-lg: 0 18px 40px rgba(0,0,0,.10);
}

/* Typography */
html, body {
  font-family: 'Inter', system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, "Apple Color Emoji", "Segoe UI Emoji" !important;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  font-weight: 400;
  line-height: 1.6;
}

h1, h2, h3 { 
  color: var(--text); 
  letter-spacing: -0.02em; 
  font-weight: 600;
  line-height: 1.2;
}
.insurance-section-title { 
  letter-spacing: -.02em; 
  font-weight: 600;
}

p { line-height: 1.6; }

/* Containers */
.container { max-width: 1200px; }

/* Header - violet gradient with white text */
header {
  background: linear-gradient(135deg, #7c3aed 0%, #5b21b6 100%) !important;
  border-radius: 0 0 var(--radius) var(--radius) !important;
  box-shadow: var(--shadow-md) !important;
  color: white !important;
}
header * {
  color: white !important;
}
.logo img { max-height: 64px; }
nav .menu li a {
  background: transparent !important;
  color: white !important;
  padding: 10px 18px !important;
  border-radius: 10px !important;
}
nav .menu li a:hover, nav .menu li a.active {
  color: white !important;
  background: rgba(255, 255, 255, 0.1) !important;
}
nav .menu li:last-child a,
nav .menu li a.kup-teraz-link {
  background: linear-gradient(135deg, #7c3aed 0%, #f472b6 100%) !important;
  color: #fff !important;
  box-shadow: 0 8px 24px rgba(124, 58, 237, 0.3) !important;
}
nav .menu li:last-child a:hover,
nav .menu li a.kup-teraz-link:hover { background: linear-gradient(135deg, #f472b6 0%, #7c3aed 100%) !important; }

/* Sections */
.hero, .welcome-section, .main-hero, .insurance-types, .form-section, .contact {
  background: var(--surface) !important;
  border-radius: var(--radius) !important;
  box-shadow: var(--shadow-md) !important;
}
.hero-content h1, .hero-content h2 { color: var(--text) !important; }
.hero-image img { border-radius: calc(var(--radius) - 6px) !important; box-shadow: none !important; }
/* Hero single-column layout */
.hero .container { max-width: 1000px; }
.hero-image {
  margin-bottom: 20px;
  padding: 12px;
  border-radius: calc(var(--radius) - 2px);
  background: linear-gradient(180deg, #f8fafc 0%, #ffffff 100%);
  border: 1px solid rgba(17,24,39,.06);
  box-shadow: var(--shadow-sm);
}
.hero-image img { width: 100%; height: auto; object-fit: contain; max-height: 520px; }
.hero-content { max-width: 820px; margin: 0 auto; }
.hero-cta { margin-top: 20px; }

/* Subtle entrance animations */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}
.hero, .insurance-types, .blog-index-section, .contact, .form-section { animation: fadeUp .6s ease both; }
.insurance-grid .insurance-item { animation: fadeUp .6s ease both; }
.insurance-grid .insurance-item:nth-child(1) { animation-delay: .02s; }
.insurance-grid .insurance-item:nth-child(2) { animation-delay: .06s; }
.insurance-grid .insurance-item:nth-child(3) { animation-delay: .1s; }

@media (prefers-reduced-motion: reduce) {
  .hero, .insurance-types, .blog-index-section, .contact, .form-section,
  .insurance-grid .insurance-item { animation: none !important; }
  *, *::before, *::after { transition: none !important; }
}

/* Cards and grids */
.insurance-grid { gap: 24px !important; }
.insurance-item {
  border-radius: var(--radius) !important;
  box-shadow: var(--shadow-sm) !important;
  transition: transform .2s ease, box-shadow .2s ease;
  display: flex;
  flex-direction: column;
  padding-bottom: 10px;
}
.insurance-item:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg) !important; }
/* Center insurance tiles/grid */
.insurance-types { text-align: center; }
.insurance-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  justify-items: center;
  align-items: stretch;
  gap: 24px !important;
}
.insurance-item { width: 100%; max-width: 320px; text-align: center; }
.insurance-icon { display: flex; align-items: center; justify-content: center; }
.insurance-item h3 { min-height: 2.6em; display: flex; align-items: center; justify-content: center; }
.insurance-item p { min-height: 3.6em; }
.insurance-item .btn { margin-top: auto; }

/* Blog list */
.blog-index-section { padding: 24px 0; }
.blog-index-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 20px;
}
.blog-index-card {
  background: var(--surface);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  padding: 14px;
  display: flex; flex-direction: column;
}
.blog-index-title a { color: var(--text) !important; }
.blog-index-meta { color: var(--muted) !important; }

/* Buttons */
.btn, .btn-primary, .btn-secondary {
  border-radius: 10px !important;
  font-weight: 600 !important;
  letter-spacing: .01em;
}
.btn-primary { background: var(--primary) !important; box-shadow: 0 8px 24px var(--ring) !important; }
.btn-primary:hover { background: var(--primary-600) !important; }
.btn-secondary { background: #eef2ff !important; color: #1e293b !important; }
.btn-secondary:hover { background: #e0e7ff !important; }
.btn:focus-visible, .btn-primary:focus-visible, .btn-secondary:focus-visible,
nav .menu a:focus-visible, a:focus-visible {
  outline: none !important;
  box-shadow: 0 0 0 4px var(--ring) !important;
}

/* Smooth hover transitions */
nav .menu li a, .btn, .btn-primary, .btn-secondary, .insurance-item {
  transition: background-color .18s ease, color .18s ease, box-shadow .2s ease, transform .2s ease;
}

/* Forms */
input[type="text"], input[type="email"], input[type="tel"], input[type="date"], input[type="number"], select, textarea {
  border-radius: 10px !important;
  border: 1px solid #e5e7eb !important;
  background: #fff !important;
  box-shadow: 0 1px 0 rgba(0,0,0,.02) inset;
}
input:focus, select:focus, textarea:focus {
  border-color: var(--primary) !important;
  outline: none !important;
  box-shadow: 0 0 0 4px var(--ring) !important;
}
.form-group label { color: #111827; font-weight: 600; }

/* Footer - dark gradient with white text */
footer {
  background: linear-gradient(135deg, #2c3e50 0%, #34495e 100%) !important;
  color: white !important;
  border-radius: var(--radius) var(--radius) 0 0 !important;
  box-shadow: var(--shadow-md) !important;
}
footer * {
  color: white !important;
}
.footer-links a { color: white !important; }
.footer-links a:hover { color: #667eea !important; }
.footer-bottom { border-top: 1px solid rgba(255, 255, 255, 0.1) !important; }

/* Footer layout (moved from inline styles) */
.footer-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
  padding: 18px 0;
}
.footer-logo { flex: 0 0 auto; text-align: center; width: 200px; }
.footer-logo img { display: block; margin: 0 auto; max-height: 56px; }
.footer-quick-links { list-style: none; padding: 0; margin: 0; }
.footer-quick-links li { margin-bottom: 8px; }
.footer-contact p { margin: 0 0 6px 0; }

/* Blog and content typography */
.blog-post-title { margin-top: 16px; margin-bottom: 8px; letter-spacing: -0.01em; }
.prose p { line-height: 1.75; margin-bottom: 1rem; }
.prose h2 { margin-top: 1.5rem; margin-bottom: .75rem; }
.prose h3 { margin-top: 1.25rem; margin-bottom: .5rem; }
.prose img { border-radius: 12px; box-shadow: var(--shadow-sm); }

/* Mobile menu visibility */
nav .menu.active { display: block !important; }

/* Utilities */
.hidden { display: none !important; }

/* Responsive tweaks */
@media (max-width: 900px) {
  header .container { padding: 14px 16px !important; }
  nav .menu { box-shadow: var(--shadow-lg) !important; }
}

/* Mobile hero image max height */
@media (max-width: 600px) {
  .hero-image img { max-height: 320px; }
}

/* --- Final override: center insurance tiles in each row --- */
.insurance-grid {
  display: flex !important;
  flex-wrap: wrap !important;
  justify-content: center !important;
  align-items: stretch !important;
  gap: 24px !important;
}
.insurance-item { flex: 0 1 300px; max-width: 320px; }

/* --- Modern Eye-Catching Updates --- */
.hero {
  background: linear-gradient(135deg, #7c3aed 0%, #f472b6 100%) !important;
  color: white !important;
}
.hero * {
  color: white !important;
}
.hero-content h2, .hero-content p {
  color: white !important;
}
.hero-content h2 {
  text-shadow: 0 2px 4px rgba(0,0,0,0.3);
}

.insurance-types {
  background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%) !important;
}
.insurance-item {
  background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%) !important;
  transition: all 0.3s ease !important;
}
.insurance-item:hover {
  background: linear-gradient(135deg, #e3f2fd 0%, #bbdefb 100%) !important;
  transform: translateY(-8px) scale(1.02) !important;
  box-shadow: 0 20px 40px rgba(0,0,0,0.15) !important;
}
.insurance-icon i {
  transition: transform 0.3s ease;
}
.insurance-item:hover .insurance-icon i {
  transform: scale(1.2);
}

/* Rounded cards for Buy Now section */
.card {
  border-radius: var(--radius) !important;
  border: none !important;
  box-shadow: var(--shadow-sm) !important;
}
.card:hover {
  box-shadow: var(--shadow-lg) !important;
}
.card-img-top {
  border-radius: calc(var(--radius) - 6px) calc(var(--radius) - 6px) 0 0 !important;
}

.btn-primary {
  background: linear-gradient(135deg, #7c3aed 0%, #f472b6 100%) !important;
  border: none !important;
  box-shadow: 0 8px 24px rgba(124, 58, 237, 0.3) !important;
}
.btn-primary:hover {
  background: linear-gradient(135deg, #f472b6 0%, #7c3aed 100%) !important;
  transform: translateY(-2px);
  box-shadow: 0 12px 32px rgba(124, 58, 237, 0.4) !important;
}
.btn-secondary {
  background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%) !important;
  color: #495057 !important;
}
.btn-secondary:hover {
  background: linear-gradient(135deg, #e9ecef 0%, #f8f9fa 100%) !important;
  transform: translateY(-2px);
}

.contact {
  background: linear-gradient(135deg, #7c3aed 0%, #f472b6 100%) !important;
}
.contact h2, .contact p, .contact-item i, .contact-item p {
  color: white !important;
}
.contact-item {
  transition: transform 0.3s ease;
}
.contact-item:hover {
  transform: translateX(10px);
}

footer {
  background: linear-gradient(135deg, #7c3aed 0%, #5b21b6 100%) !important;
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
.hero, .insurance-types, .contact {
  animation: fadeInUp 0.8s ease-out;
}

.insurance-item {
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.2);
}

@media (max-width: 768px) {
  .hero {
    background: linear-gradient(180deg, #7c3aed 0%, #f472b6 100%) !important;
  }
  .insurance-item:hover {
    transform: translateY(-4px) scale(1.01) !important;
  }
}
