/* overrides.css
 * Loaded last to keep legacy CSS intact while making typography/layout consistent.
 */

:root {
  --text-size: 16px;
  --text-line: 1.8;
  --heading-line: 1.25;
  --brand-dark: #304880;
  --brand-accent: #48A0A8;
  --facebook: #1877F2;
}

html {
  font-size: var(--text-size);
}

body {
  line-height: var(--text-line);
}

/* Text alignment: avoid justify (looks bad on narrow screens) */
.content p,
.content li,
.portfolio_main p,
.portfolio_main li,
.service p,
.service li {
  text-align: left;
}

/* Override legacy "justify" rules in general.css (uses .content p) */
.content p { text-align: left !important; }

/* Consistent paragraph spacing in content areas */
.content p,
.portfolio_main p,
.service p,
.contact p {
  margin: 0 0 1em 0;
}

/* Headings: consistent rhythm */
h1, h2, h3, h4 {
  line-height: var(--heading-line);
  margin-top: 1.5em; /* Increased top margin */
  margin-bottom: 0.7em;
}

.content h2 {
  color: var(--brand-dark);
  font-size: 1.45em; /* Slightly adjusted scale */
  border-left: 4px solid var(--brand-accent);
  padding-left: 15px;
  margin-top: 2.2em; /* More breathing room */
}

.content p:first-of-type {
  font-size: 1.1em;
  color: #444;
  line-height: 1.6;
}

/* Horizontal rule in content */
.content hr {
  border: 0;
  border-top: 1px solid rgba(0,0,0,0.12); /* Slightly more prominent */
  margin: 2.5em 0;
}

/* Bold text in content should be prominent */
.content b, .content strong {
  color: var(--brand-dark);
}

/* Links: UI vs content */
/* general.css forces underline on all anchors via !important; override globally, then re-enable for content only */
a {
  text-decoration: none !important;
  color: inherit;
}
.content a {
  text-decoration: underline !important;
  color: var(--brand-dark);
}

/* Ensure menu links are not underlined by legacy general.css */
#topnav nav a,
.button a,
.send_button a {
  text-decoration: none !important;
}

/* Brand colors: buttons + links */
.images_1_of_4 .button a,
.button input[type="submit"],
.send_button input[type="submit"] {
  background: var(--brand-dark) !important;
}
.images_1_of_4 .button a {
  color: #fff !important;
}
.images_1_of_4 .button a:hover,
.button input[type="submit"]:hover,
.send_button input[type="submit"]:hover {
  background: var(--brand-accent) !important;
}

/* Mobile menu button ("hamburger"): match brand accent */
#topnav #navbtn {
  background-image: none !important;
  position: relative;
  width: 26px !important;
  white-space: nowrap;
  text-indent: -9999px;
  overflow: hidden;
  font-size: 0;
  line-height: 0;
}
#topnav #navbtn::before {
  content: '';
  display: block;
  width: 26px;
  height: 18px;
  margin: 0 auto;
  background:
    linear-gradient(to bottom,
      var(--brand-dark) 0 3px,
      transparent 3px 7px,
      var(--brand-dark) 7px 10px,
      transparent 10px 14px,
      var(--brand-dark) 14px 17px,
      transparent 17px 18px
    );
}

/* Mobile: align hamburger vertically with the logo */
@media screen and (max-width: 800px) {
  #topnav {
    position: relative;
  }
  #topnav #navbtn {
    position: absolute !important;
    right: 0.3em;
    top: 50%;
    transform: translateY(-50%);
    padding: 0 !important;
    margin: 0 !important;
    height: 26px;
  }
  #topnav #navbtn::before {
    margin: 0;
  }
}

/* Header spacing: prevent nav area overlapping the hero image */
#topnav {
  padding-bottom: 0.8em;
}

/* Homepage hero: keep the original light gray fill, center the image, and add 1px gray borders top/bottom */
.slider {
  position: relative;
  background-color: rgb(241,236,233) !important;
  background-position: center center !important;
  background-size: 100% auto !important;
}
.slider::after {
  content: '';
  position: absolute;
  inset: 0;
  border-top: 1px solid #3b3b3b;
  border-bottom: 1px solid #3b3b3b;
  pointer-events: none;
}
/* slider.css also sets a background on .da-slider; disable it to avoid gray artifacts */
.da-slider {
  background: transparent !important;
  background-image: none !important;
}

/* Hero height: JS sets --hero-height to match the background image ratio; falls back to legacy height */
#da-slider.da-slider {
  height: var(--hero-height, 42em) !important;
}

/* Menu colors (desktop + mobile) */
#topnav nav ul li a:hover {
  border-bottom-color: var(--brand-dark) !important;
  background: var(--brand-accent) !important;
  color: #fff !important;
}
#topnav nav ul li.active > a {
  border-bottom-color: var(--brand-dark) !important;
  background: var(--brand-accent) !important;
  color: #fff !important;
}

@media screen and (max-width: 800px) {
  #topnav nav ul li a:hover {
    background: var(--brand-dark) !important;
    color: #fff !important;
  }
  #topnav nav ul li.active > a {
    background: var(--brand-accent) !important;
    color: #fff !important;
  }
}

/* Subpages: top title strip (blue banner) */
.blog .banner {
  background: var(--brand-dark) !important;
  padding: 1.5em 0 !important; /* Added more padding */
}
.blog .banner h1 {
  font-size: 1.4em !important;
  font-weight: 400 !important;
  color: #fff !important;
  text-align: center;
}
.blog .banner h1 a {
  color: rgba(255,255,255,0.7) !important;
  text-decoration: none !important;
}
.blog .banner h1 a:hover {
  color: #fff !important;
}

/* Subpages: "Nabídka masáží" directory bullets (sidebar) */
.Categories ul.sidebar {
  list-style: none !important;
  padding-left: 0 !important;
  margin-left: 0 !important;
}
.Categories ul.sidebar li {
  list-style: none !important;
  position: relative;
  padding-left: 1.2em;
  margin: 0.35em 0;
}
.Categories ul.sidebar li::before {
  content: '•';
  position: absolute;
  left: 0;
  top: 0;
  color: var(--brand-accent);
  font-weight: 700;
}
.Categories ul.sidebar li a {
  color: var(--brand-dark) !important;
}
.Categories ul.sidebar li a:hover {
  color: #fff !important;
}

/* Sidebar hover row (legacy uses .hover wrapper around <li>) */
.Categories .hover:hover {
  background: var(--brand-dark) !important;
  color: #fff !important;
}
.Categories .hover:hover a {
  color: #fff !important;
}

/* Subpages layout: remove the "phantom" left column spacing and rebalance widths */
.blog .span_2_of_single {
  width: 100% !important;
  float: none !important;
}
.blog .wrapper_single {
  width: 64% !important;
  box-sizing: border-box;
}
.blog .rsidebar {
  margin-left: 3% !important;
}
.blog .span_1_of_3 {
  width: 32% !important;
  box-sizing: border-box;
}

/* Sidebar typography: bigger + tighter wrapping */
.blog .Categories h3 {
  font-size: 1.4em;
}
.blog .Categories ul.sidebar li {
  font-size: 1.05em;
  line-height: 1.5;
}

/* Subpages responsive: when sidebar drops below, main content should take full width */
@media screen and (max-width: 980px) {
  .blog .wrapper_single,
  .blog .span_1_of_3,
  .blog .rsidebar {
    width: 100% !important;
    float: none !important;
    margin-left: 0 !important;
  }
  .blog .rsidebar {
    margin-top: 2em;
  }
}

/* Subpages: "Ceník a objednání" button should match primary button style */
.cart {
  margin: 2.5em 0 1.5em 0 !important;
}
.cart a {
  background: var(--brand-dark) !important;
  color: #fff !important;
  padding: 0.9em 2em !important;
  display: inline-block !important;
  border-radius: 8px !important;
  font-weight: 700 !important;
  box-shadow: 0px 3px 10px rgba(0,0,0,0.1);
  transition: all 0.2s ease;
  text-decoration: none !important;
}
.cart a:hover {
  background: var(--brand-accent) !important;
  color: #fff !important;
  transform: translateY(-2px);
  box-shadow: 0px 5px 15px rgba(0,0,0,0.15);
}

/* Lists in content areas: use checkmarks for all unordered lists */
.content ul {
  list-style: none;
  padding-left: 0;
  margin: 0 0 1.25em 0;
}
.content ul li {
  position: relative;
  padding-left: 1.6em;
  margin: 0.35em 0;
  line-height: var(--text-line);
}
.content ul li::before {
  content: '✓';
  position: absolute;
  left: 0;
  top: 0;
  color: var(--brand-accent);
  font-weight: 700;
}

/* Homepage: "Jak pracuji" section - match spacing/line-height */
#jak-pracuji .content {
  line-height: var(--text-line);
}
/* No need for specific #jak-pracuji .content ul li rules now as .content ul li handles it */

/* Ceník: make table + notes look like one block */
.ceniq table {
  border-collapse: separate;
  border-spacing: 0;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0px 2px 14px rgba(0,0,0,0.10);
}
.ceniq th,
.ceniq td {
  padding: 0.9em 1.1em !important;
}
.ceniq table th {
  background: rgba(72, 160, 168, 0.18) !important;
  font-weight: 700;
}
.ceniq table td {
  background: #ffffff !important;
}
.ceniq table td:nth-child(2) {
  font-weight: 700;
}

.ceniq .cenik-notes {
  margin-top: 1.25em;
  text-align: center;
}
.ceniq .cenik-voucher {
  font-weight: 600;
  margin: 0 0 0.6em 0;
}
.ceniq .cenik-warning {
  margin: 0;
  font-style: italic;
  opacity: 0.9;
}

/* Spacing: give "O mně" the same breathing room as other sections */
.portfolio_main.o-mne {
  margin-top: 5em !important;
}

/* Footer typography */
.footer .copy p {
  font-size: 0.98em !important;
  text-align: center;
}
.footer .copy p a {
  color: var(--brand-dark) !important;
}
.footer .copy p a:hover {
  color: var(--brand-accent) !important;
}

/* Contact section: prominent social CTAs */
.para-contact {
  float: left !important;
  width: 48% !important;
  margin-right: 2% !important;
}

.map-container {
  float: right !important;
  width: 50% !important;
  margin-top: 2em;
}

.map-container iframe {
  width: 100% !important;
  height: 450px;
  border-radius: 12px;
  box-shadow: 0px 2px 14px rgba(0,0,0,0.1);
}

@media (max-width: 980px) {
  .para-contact,
  .map-container {
    float: none !important;
    width: 100% !important;
    margin-right: 0 !important;
  }
}

.social-cta {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.75em;
  margin-top: 1.5em; /* Increased margin */
}

@media (min-width: 1200px) {
  .social-cta {
    grid-template-columns: 1fr 1fr;
  }
}

/* Ensure no squeezing at medium widths (768px - 1200px) */
@media (min-width: 768px) and (max-width: 1199px) {
  .social-cta {
    grid-template-columns: 1fr;
  }
}

.social-cta-link {
  display: flex;
  align-items: center;
  gap: 1em; /* Increased gap */
  padding: 1.1em 1.4em; /* Increased padding */
  border-radius: 12px;
  color: #fff !important;
  text-decoration: none !important;
  font-weight: 700;
  font-size: 1.1em; /* Slightly bigger font */
  box-shadow: 0px 4px 15px rgba(0,0,0,0.2); /* Stronger shadow */
  min-width: 0;
  transition: transform 0.2s ease, opacity 0.2s ease;
}
.social-cta-link:hover {
  opacity: 0.95;
  transform: translateY(-2px);
}

.social-cta-link .social-cta-icon {
  width: 32px;
  height: 32px;
  background-repeat: no-repeat;
  background-position: center;
  background-size: contain;
  flex: 0 0 32px;
}

.social-cta-link.facebook {
  background: var(--facebook);
}
.social-cta-link.facebook .social-cta-icon {
  background-image: url(/images/social/facebook.svg);
}

.social-cta-link.instagram {
  background: linear-gradient(45deg, #F58529, #DD2A7B, #8134AF, #515BD4);
}
.social-cta-link.instagram .social-cta-icon {
  background-image: url(/images/social/instagram.svg);
}

/* Subpage helper text color (legacy uses #22679a) */
.para p,
.text a,
.heading_1 {
  color: var(--brand-dark) !important;
}

/* Unify line-height where legacy CSS sets its own */
#strucne-o-sobe p {
  line-height: var(--text-line) !important;
}

/* Homepage featured services: stable columns + consistent spacing */
.service-grids.featured-services {
  display: grid !important;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 2em 3%;
  margin-top: 1.25em;
}

@media (max-width: 980px) {
  .service-grids.featured-services {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 640px) {
  .service-grids.featured-services {
    grid-template-columns: 1fr;
  }
}

.service-grids.featured-services .images_1_of_4 {
  float: none !important;
  width: auto !important;
  margin-left: 0 !important;
  margin-top: 0 !important;
  min-height: 0 !important;
  position: static !important;
  text-align: center;
}

/* Fix excessive gap between service title and description (legacy CSS adds padding to both) */
.service-grids.featured-services .images_1_of_4 h3,
.service-grids.featured-services .images_1_of_4 p {
  padding: 0.35em 0 0 0 !important;
}

.service-grids.featured-services .images_1_of_4 h3 {
  margin: 0;
  font-size: 1.2em; /* aligns with "O mně" title scale */
}

.service-grids.featured-services .images_1_of_4 p {
  margin: 0.6em 0 0.9em 0;
  font-size: 1em; /* match body size used in "O mně" */
  min-height: 0 !important;
}

.service-grids.featured-services .images_1_of_4 .button {
  position: static !important;
  margin-top: 0;
}


