/* ==========================================================================
   TUSI.com.pl - Stylesheet
   ========================================================================== */

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

html {
  font-size: 16px;
  scroll-behavior: smooth;
}

body {
  font-family: 'Open Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-size: 1rem;
  line-height: 1.6;
  color: var(--text-dark);
  background-color: var(--bg-light);
}

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

a {
  color: var(--teal);
  text-decoration: none;
  transition: color 0.2s ease;
}

a:hover {
  color: var(--teal-dark);
}

ul, ol {
  list-style: none;
}

/* --------------------------------------------------------------------------
   2. CSS Variables (Palette from FB graphics & logo)
   -------------------------------------------------------------------------- */
:root {
  /* Primary colors */
  --teal: #2A9D8F;
  --teal-dark: #21867A;
  --dusty-pink: #C9A9A6;
  --dusty-pink-dark: #B89996;
  --mauve: #6B4E6B;

  /* Backgrounds */
  --bg-light: #F5F9FA;
  --bg-mint: #E8F4F2;
  --bg-white: #FFFFFF;

  /* Text */
  --text-dark: #2D3436;
  --text-muted: #636E72;
  --text-light: #FFFFFF;

  /* Accents */
  --accent-yellow: #F4D35E;
  --accent-green: #52B788;

  /* Spacing */
  --space-xs: 0.5rem;
  --space-sm: 1rem;
  --space-md: 1.5rem;
  --space-lg: 2rem;
  --space-xl: 3rem;
  --space-2xl: 4rem;

  /* Border radius */
  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 16px;
  --radius-full: 9999px;

  /* Shadows */
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.1);
  --shadow-md: 0 4px 6px rgba(0,0,0,0.1);
  --shadow-lg: 0 10px 25px rgba(0,0,0,0.1);

  /* Container */
  --container-max: 1200px;
  --container-padding: 1rem;
}

/* --------------------------------------------------------------------------
   3. Typography
   -------------------------------------------------------------------------- */
h1, h2, h3, h4, h5, h6 {
  font-family: 'Poppins', sans-serif;
  font-weight: 600;
  line-height: 1.3;
  color: var(--text-dark);
  margin-bottom: var(--space-sm);
}

h1 { font-size: 2.5rem; }
h2 { font-size: 2rem; }
h3 { font-size: 1.5rem; }
h4 { font-size: 1.25rem; }
h5 { font-size: 1.1rem; }
h6 { font-size: 1rem; }

p {
  margin-bottom: var(--space-sm);
}

.text-center { text-align: center; }
.text-muted { color: var(--text-muted); }

/* --------------------------------------------------------------------------
   4. Layout
   -------------------------------------------------------------------------- */
.container {
  width: 100%;
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 var(--container-padding);
}

.section {
  padding: var(--space-2xl) 0;
}

.section--mint {
  background-color: var(--bg-mint);
}

.section--teal {
  background-color: var(--teal);
  color: var(--text-light);
}

.section--mauve {
  background-color: var(--mauve);
  color: var(--text-light);
}

/* Grid */
.grid {
  display: grid;
  gap: var(--space-md);
}

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

@media (max-width: 768px) {
  .grid--2, .grid--3, .grid--4 {
    grid-template-columns: 1fr;
  }
}

/* Flex */
.flex {
  display: flex;
  gap: var(--space-md);
}

.flex--center {
  align-items: center;
  justify-content: center;
}

.flex--between {
  justify-content: space-between;
}

.flex--wrap {
  flex-wrap: wrap;
}

/* --------------------------------------------------------------------------
   5. Header & Navigation
   -------------------------------------------------------------------------- */
.header {
  background: var(--bg-white);
  box-shadow: var(--shadow-sm);
  position: sticky;
  top: 0;
  z-index: 100;
}

.header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--space-sm) var(--container-padding);
  max-width: var(--container-max);
  margin: 0 auto;
}

.logo {
  display: flex;
  align-items: center;
  gap: var(--space-xs);
}

.logo img {
  height: 50px;
  width: auto;
}

.logo__text {
  font-family: 'Poppins', sans-serif;
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--dusty-pink);
}

/* Navigation */
.nav__list {
  display: flex;
  align-items: center;
  gap: var(--space-md);
}

.nav__link {
  font-weight: 500;
  color: var(--text-dark);
  padding: var(--space-xs) 0;
  position: relative;
}

.nav__link:hover,
.nav__link--active {
  color: var(--teal);
}

.nav__link::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--teal);
  transition: width 0.2s ease;
}

.nav__link:hover::after,
.nav__link--active::after {
  width: 100%;
}

/* Dropdown Menu */
.nav__item--has-dropdown {
  position: relative;
}

.nav__dropdown {
  display: none;
  background: var(--bg-white);
  min-width: 200px;
  box-shadow: var(--shadow-md);
  padding: var(--space-sm) 0;
  border-radius: var(--radius-sm);
  z-index: 101;
}

.dropdown__link {
  display: block;
  padding: var(--space-xs) var(--space-md);
  color: var(--text-dark);
  font-size: 0.95rem;
  transition: background 0.2s ease, color 0.2s ease;
}

.dropdown__link:hover {
  background: var(--bg-mint);
  color: var(--teal);
}

.dropdown__divider {
  border-top: 1px solid var(--bg-light);
  margin: var(--space-xs) 0;
}

.dropdown__link--all {
  color: var(--teal);
  font-weight: 500;
}

.nav__link-wrapper {
  display: inline-flex;
  align-items: center;
  vertical-align: middle;
}

.dropdown-toggle {
  display: none; /* Hidden on desktop by default */
  background: none;
  border: none;
  cursor: pointer;
  padding: 0 var(--space-xs);
  color: var(--text-dark);
  margin-left: 4px;
}

/* Desktop Hover Behavior */
@media (min-width: 769px) {
  .nav__item--has-dropdown:hover .nav__dropdown,
  .nav__item--has-dropdown:focus-within .nav__dropdown {
    display: block;
    position: absolute;
    top: 100%;
    left: 0;
    margin-top: 5px; /* Spacing for hover intent */
  }

  /* Triangle connector for desktop */
  .nav__item--has-dropdown:hover .nav__dropdown::before {
    content: '';
    position: absolute;
    top: -6px;
    left: 20px;
    width: 0;
    height: 0;
    border-left: 6px solid transparent;
    border-right: 6px solid transparent;
    border-bottom: 6px solid var(--bg-white);
  }
}

/* Mobile menu button */
.nav__toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: var(--space-xs);
}

.nav__toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--text-dark);
  margin: 5px 0;
  transition: all 0.3s ease;
}

@media (max-width: 768px) {
  .nav__toggle {
    display: block;
  }

  /* Mobile Dropdown styles */
  .dropdown-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 44px; /* Larger touch target */
    width: 44px;
  }
  
  .dropdown-toggle svg {
    transition: transform 0.3s ease;
  }
  
  .dropdown-toggle[aria-expanded="true"] svg {
    transform: rotate(180deg);
  }

  .nav__dropdown {
    box-shadow: none;
    background: var(--bg-light); /* Slightly darker to distinguish nested level */
    border-radius: var(--radius-sm);
    margin-top: var(--space-xs);
    width: 100%; /* Full width in mobile menu */
    padding-left: var(--space-sm);
  }

  .nav__dropdown--open {
    display: block;
    position: static;
  }

  .nav__list {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--bg-white);
    flex-direction: column;
    padding: var(--space-md);
    box-shadow: var(--shadow-md);
  }

  .nav__list--open {
    display: flex;
  }
}

/* --------------------------------------------------------------------------
   6. Hero Section
   -------------------------------------------------------------------------- */
.hero {
  background: linear-gradient(135deg, var(--teal) 0%, var(--mauve) 100%);
  color: var(--text-light);
  padding: var(--space-2xl) 0;
  text-align: center;
}

.hero__content {
  max-width: 700px;
  margin: 0 auto;
}

.hero h1 {
  color: var(--text-light);
  font-size: 2.5rem;
  margin-bottom: var(--space-md);
}

.hero p {
  font-size: 1.2rem;
  margin-bottom: var(--space-lg);
  opacity: 0.95;
}

@media (min-width: 768px) {
  .hero {
    padding: var(--space-2xl) 0 calc(var(--space-2xl) * 1.5);
  }

  .hero h1 {
    font-size: 3rem;
  }
}

/* --------------------------------------------------------------------------
   7. Buttons
   -------------------------------------------------------------------------- */
.btn {
  display: inline-block;
  padding: var(--space-sm) var(--space-lg);
  font-family: 'Poppins', sans-serif;
  font-weight: 600;
  font-size: 1rem;
  text-align: center;
  border: none;
  border-radius: var(--radius-full);
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn--primary {
  background: var(--dusty-pink);
  color: var(--text-light);
}

.btn--primary:hover {
  background: var(--dusty-pink-dark);
  color: var(--text-light);
}

.btn--secondary {
  background: var(--bg-white);
  color: var(--teal);
}

.btn--secondary:hover {
  background: var(--bg-mint);
  color: var(--teal);
}

.btn--outline {
  background: transparent;
  border: 2px solid var(--text-light);
  color: var(--text-light);
}

.btn--outline:hover {
  background: var(--text-light);
  color: var(--teal);
}

.btn--teal {
  background: var(--teal);
  color: var(--text-light);
}

.btn--teal:hover {
  background: var(--teal-dark);
  color: var(--text-light);
}

/* --------------------------------------------------------------------------
   8. Cards
   -------------------------------------------------------------------------- */
.card {
  background: var(--bg-white);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  padding: var(--space-lg);
  transition: box-shadow 0.2s ease, transform 0.2s ease;
}

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

.card__icon {
  font-size: 2.5rem;
  margin-bottom: var(--space-sm);
}

.card__title {
  margin-bottom: var(--space-xs);
}

.card__text {
  color: var(--text-muted);
  margin-bottom: var(--space-sm);
}

.card--service {
  text-align: center;
  padding: var(--space-xl) var(--space-lg);
}

.card--service .card__icon {
  color: var(--teal);
}

/* --------------------------------------------------------------------------
   9. Footer
   -------------------------------------------------------------------------- */
.footer {
  background: var(--text-dark);
  color: var(--text-light);
  padding: var(--space-xl) 0 var(--space-lg);
}

.footer__inner {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: var(--space-lg);
}

.footer__section h4 {
  color: var(--dusty-pink);
  margin-bottom: var(--space-md);
}

.footer__section a {
  color: var(--text-light);
  opacity: 0.8;
}

.footer__section a:hover {
  opacity: 1;
  color: var(--dusty-pink);
}

.footer__section ul li {
  margin-bottom: var(--space-xs);
}

.footer__bottom {
  margin-top: var(--space-lg);
  padding-top: var(--space-md);
  border-top: 1px solid rgba(255,255,255,0.1);
  text-align: center;
  font-size: 0.9rem;
  opacity: 0.7;
}

.footer__social {
  display: flex;
  gap: var(--space-sm);
}

.footer__social a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  background: rgba(255,255,255,0.1);
  border-radius: var(--radius-full);
  transition: background 0.2s ease;
}

.footer__social a:hover {
  background: var(--teal);
}

/* --------------------------------------------------------------------------
   10. Tables (Cennik)
   -------------------------------------------------------------------------- */
.table-wrapper {
  overflow-x: auto;
}

.table {
  width: 100%;
  border-collapse: collapse;
  background: var(--bg-white);
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}

.table th,
.table td {
  padding: var(--space-sm) var(--space-md);
  text-align: left;
  border-bottom: 1px solid var(--bg-mint);
}

.table th {
  background: var(--teal);
  color: var(--text-light);
  font-family: 'Poppins', sans-serif;
  font-weight: 600;
}

.table tr:last-child td {
  border-bottom: none;
}

.table tr:hover {
  background: var(--bg-mint);
}

.table td:last-child {
  font-weight: 600;
  color: var(--teal);
  text-align: right;
}

.table a {
  color: var(--text-dark);
  text-decoration: none;
  transition: color 0.2s ease;
}

.table a:hover {
  color: var(--teal);
  text-decoration: underline;
}

/* --------------------------------------------------------------------------
   11. Blog / Article
   -------------------------------------------------------------------------- */
.article {
  max-width: 800px;
  margin: 0 auto;
  padding: var(--space-xl) var(--container-padding);
}

.article__header {
  margin-bottom: var(--space-lg);
}

.article__title {
  font-size: 2rem;
  margin-bottom: var(--space-sm);
}

.article__meta {
  color: var(--text-muted);
  font-size: 0.9rem;
}

.article__image {
  width: 100%;
  border-radius: var(--radius-md);
  margin-bottom: var(--space-lg);
}

.article__content h2,
.article__content h3 {
  margin-top: var(--space-lg);
  margin-bottom: var(--space-sm);
}

.article__content p {
  margin-bottom: var(--space-md);
}

.article__content ul,
.article__content ol {
  margin-bottom: var(--space-md);
  padding-left: var(--space-lg);
}

.article__content ul {
  list-style: disc;
}

.article__content ol {
  list-style: decimal;
}

.article__content li {
  margin-bottom: var(--space-xs);
}

/* Blog list */
.blog-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: var(--space-lg);
}

.blog-card {
  background: var(--bg-white);
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: box-shadow 0.2s ease;
}

.blog-card:hover {
  box-shadow: var(--shadow-md);
}

.blog-card__image {
  width: 100%;
  height: 200px;
  object-fit: cover;
}

.blog-card__content {
  padding: var(--space-md);
}

.blog-card__title {
  font-size: 1.1rem;
  margin-bottom: var(--space-xs);
}

.blog-card__excerpt {
  color: var(--text-muted);
  font-size: 0.9rem;
  margin-bottom: var(--space-sm);
}

/* --------------------------------------------------------------------------
   12. Contact
   -------------------------------------------------------------------------- */
.contact-info {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: var(--space-lg);
}

.contact-item {
  display: flex;
  gap: var(--space-sm);
}

.contact-item__icon {
  flex-shrink: 0;
  width: 50px;
  height: 50px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-mint);
  border-radius: var(--radius-full);
  color: var(--teal);
  font-size: 1.5rem;
}

.contact-item__text h4 {
  margin-bottom: var(--space-xs);
}

.contact-item__text p {
  color: var(--text-muted);
  margin: 0;
}

.map-placeholder {
  width: 100%;
  height: 300px;
  background: var(--bg-mint);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
}

/* --------------------------------------------------------------------------
   13. Gallery
   -------------------------------------------------------------------------- */
.gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: var(--space-md);
}

.gallery__item {
  border-radius: var(--radius-md);
  overflow: hidden;
}

.gallery__item img {
  width: 100%;
  height: 200px;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.gallery__item:hover img {
  transform: scale(1.05);
}

/* About page logo */
.about-logo {
  display: flex;
  justify-content: center;
}

.about-logo__image {
  width: 100%;
  max-width: 560px;
  height: auto;
}

/* --------------------------------------------------------------------------
   14. Utilities
   -------------------------------------------------------------------------- */
.mt-sm { margin-top: var(--space-sm); }
.mt-md { margin-top: var(--space-md); }
.mt-lg { margin-top: var(--space-lg); }
.mt-xl { margin-top: var(--space-xl); }

.mb-sm { margin-bottom: var(--space-sm); }
.mb-md { margin-bottom: var(--space-md); }
.mb-lg { margin-bottom: var(--space-lg); }
.mb-xl { margin-bottom: var(--space-xl); }

.py-sm { padding-top: var(--space-sm); padding-bottom: var(--space-sm); }
.py-md { padding-top: var(--space-md); padding-bottom: var(--space-md); }
.py-lg { padding-top: var(--space-lg); padding-bottom: var(--space-lg); }
.py-xl { padding-top: var(--space-xl); padding-bottom: var(--space-xl); }

.hidden { display: none; }

@media (max-width: 768px) {
  .hide-mobile { display: none; }
}

@media (min-width: 769px) {
  .hide-desktop { display: none; }
}

/* --------------------------------------------------------------------------
   15. Checklist Section (Czy Twoje dziecko...)
   -------------------------------------------------------------------------- */
.checklist-section {
  background: var(--bg-white);
}

.checklist-wrapper {
  max-width: 700px;
  margin: 0 auto;
}

.checklist {
  display: grid;
  gap: var(--space-sm);
  margin-bottom: var(--space-xl);
}

.checklist__item {
  display: flex;
  align-items: flex-start;
  gap: var(--space-sm);
  padding: var(--space-md);
  background: var(--bg-light);
  border-radius: var(--radius-md);
  border-left: 4px solid var(--teal);
  font-size: 1.05rem;
  transition: background 0.2s ease, transform 0.2s ease;
}

.checklist__item:hover {
  background: var(--bg-mint);
  transform: translateX(4px);
}

.checklist__icon {
  color: var(--teal);
  font-size: 1.3rem;
  line-height: 1;
}

.checklist-cta {
  text-align: center;
  padding: var(--space-lg);
  background: linear-gradient(135deg, var(--teal) 0%, var(--mauve) 100%);
  border-radius: var(--radius-lg);
  color: var(--text-light);
}

.checklist-cta__text {
  font-size: 1.2rem;
  margin-bottom: var(--space-md);
}

.checklist-cta__subtext {
  margin-top: var(--space-sm);
  opacity: 0.9;
  font-size: 0.95rem;
}

/* --------------------------------------------------------------------------
   16. Sticky Phone Button (Mobile)
   -------------------------------------------------------------------------- */
.sticky-phone {
  display: none;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  padding: var(--space-sm);
  background: var(--teal);
  z-index: 1000;
  box-shadow: 0 -2px 10px rgba(0,0,0,0.15);
}

.sticky-phone__link {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-sm);
  color: var(--text-light);
  font-family: 'Poppins', sans-serif;
  font-weight: 600;
  font-size: 1.1rem;
  padding: var(--space-sm) var(--space-md);
}

.sticky-phone__link:hover {
  color: var(--text-light);
}

.sticky-phone__icon {
  font-size: 1.3rem;
}

@media (max-width: 768px) {
  .sticky-phone {
    display: block;
  }

  /* Add padding to body to prevent content from being hidden behind sticky button */
  body {
    padding-bottom: 60px;
  }
}

/* --------------------------------------------------------------------------
   17. Google Map
   -------------------------------------------------------------------------- */
.map-container {
  width: 100%;
  height: 350px;
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}

.map-container iframe {
  width: 100%;
  height: 100%;
  border: 0;
}

/* --------------------------------------------------------------------------
   18. Info Boxes (for draft content)
   -------------------------------------------------------------------------- */
.info-box {
  padding: 1rem 1.25rem;
  margin: 1.5rem 0;
  border-radius: var(--radius-md);
}

.info-box--confirm {
  background: #fff3cd;
  border-left: 4px solid #ffc107;
}

.info-box--confirm p {
  margin: 0;
  color: #856404;
}

.info-box--confirm strong {
  display: block;
  margin-bottom: 0.5rem;
}

/* --------------------------------------------------------------------------
   19. Symptom Checklist (inline in articles)
   -------------------------------------------------------------------------- */
.symptom-checklist {
  list-style: none;
  padding: 0;
  margin: var(--space-md) 0 var(--space-lg);
}

.symptom-checklist li {
  position: relative;
  padding: var(--space-sm) var(--space-sm) var(--space-sm) 2.5rem;
  margin-bottom: var(--space-xs);
  background: var(--bg-light);
  border-radius: var(--radius-md);
  border-left: 3px solid var(--teal);
}

.symptom-checklist li::before {
  content: "?";
  position: absolute;
  left: 0.75rem;
  top: 50%;
  transform: translateY(-50%);
  width: 1.25rem;
  height: 1.25rem;
  background: var(--teal);
  color: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.8rem;
  font-weight: 600;
}
