/*
Theme Name: Firma LTD UK – IPO Style (EN)
Theme URI: https://example.com/
Author: ChatGPT
Author URI: https://example.com/
Description: A WordPress theme that recreates the visual layout of firma-ltd.cz (two-row header, hero image with dark nav overlay, red CTA accents), prepared for an English UK Tax & Accounting + ACSP site.
Version: 1.3.7
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: firma-ltd-uk-ipo-style
Tags: custom-logo, blog, one-column, two-columns, translation-ready
*/

:root{
  --accent: #c21f2d;
  --accent-dark: #a51521;
  --ink: #0b1220;
  --muted: #5b677a;
  --line: rgba(12, 18, 32, .12);
  --overlay: rgba(2, 18, 30, .55);
  --container: 1180px;

  /* Logo badge (desktop/tablet): scales down slightly as the viewport narrows.
     Keep the vertical offset constant so the badge doesn't "jump" during resizing. */
  --logo-size: clamp(122px, 12.2vw, 164px);
  --logo-x: 0px;
  --logo-y: 18px;
  --logo-pad: 6px;

  /* IPO header "blob" that wraps the logo (tuned to match the original curvature) */
  --blob-w: clamp(400px, 34vw, 580px);
  --blob-h: clamp(150px, 16vw, 230px);
  --blob-left: clamp(-240px, -14vw, -150px);
  --blob-top: 0px;
}

/* Prevent horizontal scrolling caused by decorative negative offsets (Safari desktop can shift content on resize). */
html, body{ overflow-x: hidden; }

/* WordPress block editor wide/full alignment (classic theme) */
.alignwide{
  max-width: 1200px;
  margin-left: auto;
  margin-right: auto;
}

.alignfull{
  width: 100vw;
  margin-left: calc(50% - 50vw);
  margin-right: calc(50% - 50vw);
}

/* Full-width sections should still respect our site max width for inner content */
.alignfull .fl-container{
  max-width: 1200px;
  margin-left: auto;
  margin-right: auto;
  padding-left: 18px;
  padding-right: 18px;
}

/* Services (icon) section used on homepage via block pattern */
.fl-section--services{
  padding: 56px 0 40px;
  background: #fff;
}

.fl-services__grid{
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 44px;
}

/* Pattern uses the Columns block, but we render it as CSS grid */
.fl-services__grid.wp-block-columns{
  margin: 0;
}

.fl-services__grid .wp-block-column{
  margin: 0;
}

@media (max-width: 1200px){
  .fl-services__grid{
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 760px){
  .fl-services__grid{
    grid-template-columns: 1fr;
    gap: 28px;
  }
}

.fl-service{
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.fl-service__icon{
  width: 64px;
  height: 64px;
}

.fl-service__icon svg{
  width: 100%;
  height: 100%;
  stroke: var(--accent);
  fill: none;
  stroke-width: 2.2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.fl-service__title{
  font-size: 1.75rem;
  font-weight: 900;
  line-height: 1.15;
  margin: 0;
}

.fl-service__text{
  margin: 0;
  color: var(--muted);
  line-height: 1.65;
}

.fl-service__more{
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 900;
  color: var(--ink);
  text-decoration: none;
  margin-top: 8px;
}

.fl-service__more:hover{
  color: var(--accent);
}

.fl-service__more .fl-service__arrow{
  font-size: 22px;
  line-height: 1;
}

*{ box-sizing:border-box; }
html{ -webkit-text-size-adjust:100%; scroll-behavior:smooth; }
html.fl-no-scroll,
body.fl-no-scroll{ overflow:hidden; }
body{
  margin:0;
  font-family: Montserrat, system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, sans-serif;
  color: var(--ink);
  line-height:1.6;
  background:#fff;
}
img{ max-width:100%; height:auto; }
a{ color:inherit; }

.container{ width:min(var(--container), calc(100% - 2rem)); margin-inline:auto; }

/*
  The original firma-ltd.cz header/nav runs edge-to-edge.
  Keep the rest of the site constrained, but let the header/nav containers go full width.
*/
.topbar .container,
.masthead__nav .container{
  width: calc(100% - 2rem);
  max-width: none;
}

.section{ padding: 42px 0; }
.section--tight{ padding-top: 0; }
.muted{ color: var(--muted); }
.content-panel{ background:#fff; border:1px solid var(--line); border-radius:14px; padding:1.5rem; }
.card-link{ margin-top: .85rem; }

/* Top bar */
.topbar{
  background:#fff;
  border-bottom: 0;
  position: relative;
  z-index: 2100;
}

/* The curved white shape that visually "wraps" the logo and overlaps the hero */
.topbar::after{
  content:"";
  position:absolute;
  left: var(--blob-left);
  top: var(--blob-top);
  width: var(--blob-w);
  height: var(--blob-h);
  background:#fff;
  border-radius: 0 0 999px 999px;
  z-index: 0;
  pointer-events:none;
}

.topbar__inner{ position: relative; z-index: 2; }
.topbar__inner{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap: 1rem;
  padding: 14px 0;
}

.topbar__brand{ flex: 0 0 auto; }

/* Reserve space for the logo on tablet/desktop so the topbar stays slim */
@media (min-width: 761px){
  .topbar__brand{ width: calc(var(--logo-size) + 44px); }
}

.brand{
  display:flex;
  align-items:center;
  gap: .9rem;
  text-decoration:none;
}

.custom-logo-link{
  display:flex;
  align-items:center;
  justify-content:center;
  width: var(--logo-size);
  height: var(--logo-size);
  background:#fff;
  border-radius: 999px;
  padding: var(--logo-pad);
  /* IMPORTANT:
     - keep the badge background perfectly circular/white
     - DO NOT clip the image so the small "®" mark can remain visible (like the original)
     If your uploaded logo file has a non-transparent square background, use a transparent PNG for best results.
  */
  overflow: visible;
  box-shadow: 0 10px 30px rgba(0,0,0,.14);
  /* Keep the logo overlapping the hero/nav, but do NOT let it increase header height */
  position: absolute;
  left: var(--logo-x);
  top: 0;
  transform: translateY(var(--logo-y));
  z-index: 1010;
}
.custom-logo{
  max-height: 100%;
  width: 100%;
  height: 100%;
  object-fit: contain;
  display:block;
}

.brand__text{
  display:flex;
  flex-direction:column;
  line-height:1.1;
}
.brand__name{ font-weight: 800; letter-spacing: .02em; }
.brand__tagline{ font-size: .9rem; color: var(--muted); font-weight: 600; }

.topbar__search{
  flex: 1;
  max-width: 480px;
  display:flex;
  align-items:center;
  justify-content:center;
}
.search-form{
  width: 100%;
  display: flex;
  align-items: center;
  background: rgba(21, 86, 148, .07);
  border: 1.5px solid rgba(21, 86, 148, .22);
  border-radius: 100px;
  overflow: hidden;
  transition: border-color .2s, background .2s;
}
.search-form:focus-within{
  border-color: rgba(21, 86, 148, .5);
  background: rgba(21, 86, 148, .11);
}
.search-form label{ flex: 1; min-width: 0; }
.search-field{
  width: 100%;
  border: 0;
  outline: none;
  padding: 8px 4px 8px 16px;
  font-size: .875rem;
  font-family: inherit;
  background: transparent;
  color: var(--ink);
}
.search-field::placeholder{
  color: rgba(21, 86, 148, .45);
}
.search-submit{
  border: 0;
  background: transparent;
  padding: 8px 14px;
  cursor: pointer;
  color: #155694;
  opacity: .7;
  display: flex;
  align-items: center;
  transition: opacity .2s;
  flex-shrink: 0;
}
.search-submit:hover{ opacity: 1; }

/* Mobile search icon (matches the original red icon under the header) */
.topbar__search-toggle{
  display:none;
  border:0;
  background: transparent;
  color: var(--accent);
  font-size: 1.15rem;
  cursor:pointer;
  padding: 10px 6px;
}

.mobile-search{
  display:none;
  background:#fff;
  border-top: 1px solid rgba(0,0,0,.06);
}
.mobile-search.is-open{ display:block; }
.mobile-search .container{ padding: 10px 0; }

.topbar__cta{
  display:flex;
  align-items:center;
  gap: 0;
}
.topbar__cta a.cta-link{
  text-decoration:none;
  text-transform: uppercase;
  letter-spacing: .08em;
  font-weight: 900;
  font-size: .9rem;
  color: var(--accent);
  padding: 12px 16px;
  white-space: nowrap;
}
.topbar__cta a.cta-link:hover{ text-decoration: underline; }

.topbar__cta a.cta-btn{
  display:inline-flex;
  align-items:center;
  gap: .75rem;
  text-decoration:none;
  background: var(--accent);
  color:#fff;
  padding: 12px 18px;
  border-radius: 0;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: .08em;
  white-space: nowrap;
}
.topbar__cta a.cta-btn:hover{ background: var(--accent-dark); }

.cta-btn__arrow{ font-size: 1.4rem; line-height: 1; }

.topbar__menu-toggle{
  display:none;
  border:0;
  background: #142235;
  color:#fff;
  padding: 12px 14px;
  cursor:pointer;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .08em;
}
.topbar__menu-toggle .hamb{ margin-left: 8px; }

/* Masthead (hero + nav overlay) */
.masthead{
  position: relative;
  color:#fff;
  background: #1d2b3a;
  min-height: 540px;
}

.masthead__bg{
  position:absolute;
  inset:0;
  z-index: 0;
}
.masthead__bg img{
  width:100%;
  height:100%;
  object-fit: cover;
}


.masthead::before{
  content:"";
  position:absolute;
  inset:0;
  background: linear-gradient(180deg, rgba(0,0,0,.40) 0%, rgba(0,0,0,.28) 45%, rgba(0,0,0,.20) 100%);
  pointer-events:none;
  z-index: 1;
}

.masthead__nav{
  position: relative;
  z-index: 4;
  background: rgba(11, 45, 79, .55);
  backdrop-filter: blur(2px);
}

.navbar{
  display:flex;
  align-items:center;
  justify-content:center;
  gap: 1rem;
  padding: 18px 0;
}

/* Leave visual space for the overlapping logo (prevents menu items sitting under it) */
@media (min-width: 761px){
  .navbar{ padding-left: calc(var(--logo-size) + 60px); }
}

.nav-toggle{
  display:none;
  border: 1px solid rgba(255,255,255,.35);
  background: transparent;
  color:#fff;
  padding: 10px 12px;
  cursor:pointer;
  font-weight:700;
  text-transform: uppercase;
  letter-spacing:.06em;
}

.primary-nav ul{ list-style:none; margin:0; padding:0; display:flex; align-items:center; gap: 2.2rem; }
.primary-nav a{
  text-decoration:none;
  color:#fff;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .1em;
  font-size: .92rem;
  padding: 10px 0;
  display:inline-block;
  position:relative;
}

/* The original design uses a small red segment above + below the active item */
.primary-nav .current-menu-item > a::after,
.primary-nav .current_page_item > a::after{
  content:"";
  position:absolute;
  left:50%;
  transform: translateX(-50%);
  bottom:-12px;
  width: 54px;
  height: 2px;
  background: var(--accent);
}
.primary-nav .current-menu-item > a::before,
.primary-nav .current_page_item > a::before{
  content:"";
  position:absolute;
  left:50%;
  transform: translateX(-50%);
  top:-12px;
  width: 54px;
  height: 2px;
  background: var(--accent);
}

.primary-nav a:hover::after{
  content:"";
  position:absolute;
  left:50%;
  transform: translateX(-50%);
  bottom:-12px;
  width: 54px;
  height: 2px;
  background: var(--accent);
}

/* Dropdown */
.primary-nav li{ position:relative; }
.primary-nav .sub-menu{
  display:none;
  position:absolute;
  top: 100%;
  left: -10px;
  min-width: 260px;
  background: rgba(2, 18, 30, .92);
  border: 1px solid rgba(255,255,255,.14);
  padding: 12px 14px;
  z-index: 20;
}
.primary-nav li:hover > .sub-menu{ display:block; }
.primary-nav .sub-menu li{ width:100%; }
.primary-nav .sub-menu a{
  font-size: .85rem;
  letter-spacing: .06em;
  padding: 8px 0;
  width:100%;
}

/* Hero content */
.masthead__content{
  position: relative;
  z-index: 3;
  padding: 90px 0 70px 0;
}

.masthead__content--inner{ padding: 46px 0 34px 0; }

.hero-grid{
  display:grid;
  grid-template-columns: 1fr 420px;
  gap: 48px;
  align-items:end;
}

.hero-title{
  font-size: clamp(2.4rem, 4.6vw, 4.4rem);
  line-height: 1.05;
  font-weight: 900;
  margin:0 0 18px 0;
}
.hero-kicker{
  margin:0;
  text-transform: uppercase;
  letter-spacing: .08em;
  font-weight: 800;
  font-size: .95rem;
  opacity: .95;
}

.hero-callout{
  background:#fff;
  color: var(--ink);
  display:flex;
  align-items: stretch;
  box-shadow: 0 18px 55px rgba(0,0,0,.25);
}
.hero-callout__main{
  padding: 22px 22px;
}
.hero-callout__main h3{
  margin:0;
  font-size: 1.45rem;
  line-height:1.2;
  font-weight: 900;
}
.hero-callout__main p{
  margin: 10px 0 0 0;
  color: var(--muted);
  font-weight: 600;
}
.hero-callout__cta{
  background: var(--accent);
  color:#fff;
  display:flex;
  flex-direction:column;
  justify-content:center;
  align-items:center;
  gap: 10px;
  padding: 18px 18px;
  min-width: 150px;
  text-decoration:none;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: .08em;
}
.hero-callout__cta:hover{ background: var(--accent-dark); }
.hero-callout__arrow{
  display:inline-flex;
  width: 44px;
  height: 44px;
  border-radius: 999px;
  border: 2px solid rgba(255,255,255,.6);
  align-items:center;
  justify-content:center;
  font-size: 1.2rem;
}

/* Main content */
.site-main{
  padding: 46px 0 70px 0;
}
/* Na homepage poslední blok je alignfull – žádný spodní padding nepotřebujeme */
.home .site-main{
  padding-bottom: 10px;
}

.page-title{
  margin:0;
  font-size: clamp(1.8rem, 3vw, 2.6rem);
  font-weight: 900;
}

.content{
  width:min(920px, 100%);
}

/* Service cards */
.cards{
  display:grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 22px;
}
.card{
  border: 1px solid var(--line);
  padding: 18px 18px;
  background:#fff;
}
.card h3{ margin: 0 0 8px 0; font-weight: 900; }
.card p{ margin:0; color: var(--muted); font-weight: 600; }
.card a{ color: var(--accent); text-decoration:none; font-weight:800; }
.card a:hover{ text-decoration: underline; }

/* Footer */
.site-footer{
  background: #155694;
  padding: 42px 0 28px;
  color: #fff;
}
.site-footer h4{
  color: #fff;
  margin-top: 0;
  margin-bottom: 14px;
  font-size: 1rem;
  text-transform: uppercase;
  letter-spacing: .06em;
  opacity: .75;
}
.site-footer p,
.site-footer .muted{
  color: rgba(255,255,255,.82);
}
.footer-grid{
  display:grid;
  grid-template-columns: 1.2fr 1fr 1fr;
  gap: 22px;
  align-items:start;
}
.footer-nav ul{ list-style:none; margin:0; padding:0; display:flex; flex-wrap:wrap; gap: 14px; }
.footer-nav a{ text-decoration:none; font-weight: 700; color: rgba(255,255,255,.88); }
.footer-nav a:hover{ color:#fff; text-decoration: underline; }

.footer-list{ list-style:none; margin:0; padding:0; }
.footer-list li{ margin: 0 0 .55rem 0; }
.footer-list a{ text-decoration:none; font-weight: 700; color: rgba(255,255,255,.88); }
.footer-list a:hover{ color:#fff; text-decoration: underline; }

.footer-bottom{
  margin-top: 28px;
  padding-top: 18px;
  border-top: 1px solid rgba(255,255,255,.18);
  color: rgba(255,255,255,.65);
}
.footer-bottom a{ color: rgba(255,255,255,.82); text-decoration:none; }
.footer-bottom a:hover{ color:#fff; text-decoration: underline; }

/* Logo strip – zabít veškeré WP-generované padding/margin
   Outer wrapper má is-layout-flex (WP přidává padding-block aj.)
   Inner wrapper má is-layout-constrained (přidává padding přes --wp--style--block-gap) */
.fl-services-strip--img.is-layout-flex,
.fl-services-strip--img.wp-block-group-is-layout-flex {
  padding-top: 0 !important;
  padding-bottom: 0 !important;
}
.fl-services-strip--img .fl-services-strip__inner,
.fl-services-strip--img .wp-block-group__inner-container {
  padding-top: 0 !important;
  padding-bottom: 0 !important;
  margin-top: 0 !important;
  margin-bottom: 0 !important;
}
/* Zabít WP block-gap mezi kartami i dole pod nimi */
.fl-services-strip--img .fl-services-grid.wp-block-columns {
  margin-top: 0 !important;
  margin-bottom: 0 !important;
}
.fl-services-strip--img .fl-services-grid .wp-block-column,
.fl-services-strip--img .fl-service {
  margin-top: 0 !important;
  margin-bottom: 0 !important;
}

/* Bio block – plynný přechod fotky do modré */
.fl-bio-block .wp-block-media-text__media {
  position: relative;
  overflow: hidden;
}
.fl-bio-block .wp-block-media-text__media::after {
  content: '';
  position: absolute;
  top: 0;
  bottom: 0;
  right: 0;
  width: 35%;
  background: linear-gradient(to right,
    transparent 0%,
    rgba(2, 31, 157, .12) 40%,
    rgba(2, 31, 157, .55) 75%,
    #021f9d 100%
  );
  pointer-events: none;
}

/* Responsive */
@media (max-width: 980px){
  .topbar__search{ display:none; }
  .topbar__search-toggle{ display:inline-flex; }
  .hero-grid{ grid-template-columns: 1fr; }
  .hero-callout{ max-width: 520px; }
  .cards{ grid-template-columns: 1fr; }
  .primary-nav ul{ gap: 1.4rem; flex-wrap:wrap; justify-content:center; }
  .footer-grid{ grid-template-columns: 1fr; }

  /* On smaller viewports, reduce the blob so it doesn't dominate */
  :root{
    --blob-w: clamp(340px, 56vw, 520px);
    --blob-h: clamp(140px, 28vw, 220px);
    --blob-left: clamp(-220px, -22vw, -120px);
  }
}

@media (max-width: 760px){
  /* Mobile header follows the original: plain logo, centered CTA, menu button on the right */
  .topbar::after{ display:none; }

  .custom-logo-link{
    width:auto;
    height:auto;
    background: transparent;
    box-shadow:none;
    padding:0;
    position: static;
    left: auto;
    top: auto;
    transform:none;
  }
  .custom-logo{ max-height: 64px; }

  .topbar__inner{ justify-content: flex-start; }

  .topbar__brand{ flex: 0 0 auto; }

  .topbar__cta{
    flex: 0 1 auto;
    margin-left: auto;
    margin-right: 0;
    justify-content: flex-end;
    gap: 10px;
  }
  /* Hide the long text link on small screens to prevent header overflow (Safari desktop resize) */
  .topbar__cta a.cta-link{ display:none; }
  .topbar__cta a.cta-btn{ font-size: .82rem; padding: 10px 12px; }

  .topbar__menu-toggle{ display:inline-flex; margin-left: 10px; }

  /* The desktop nav strip is hidden on mobile. Menu appears as a full-screen overlay. */
  .masthead__nav{ display:none; }
  .masthead__nav.is-open{
    display:block;
    position: fixed;
    inset: 0;
    background: rgba(2, 18, 30, .95);
    backdrop-filter: blur(2px);
    z-index: 2000;
    padding: 110px 0 40px 0;
    overflow:auto;
  }
  .masthead__nav.is-open .navbar{ justify-content:flex-start; }
  .masthead__nav.is-open .primary-nav{ display:block; }
  .masthead__nav.is-open .primary-nav ul{
    flex-direction: column;
    align-items: flex-start;
    gap: 0;
    width:100%;
  }
  .masthead__nav.is-open .primary-nav a{
    width:100%;
    padding: 14px 0;
    border-bottom: 1px solid rgba(255,255,255,.12);
  }

  /* Mobile search icon is shown under the header, like the original */
  .topbar__search-toggle{
    display:inline-flex;
    position:absolute;
    right: 14px;
    bottom: -46px;
  }

  /* Callout becomes a simple white panel + red button */
  .hero-callout{ flex-direction:column; }
  .hero-callout__cta{ min-width: auto; flex-direction:row; justify-content:flex-start; padding: 14px 18px; }
  .hero-callout__arrow{ width: 34px; height: 34px; }
}

@media (max-width: 520px){
  .topbar__cta a.cta-link{ display:none; }
}

/* WordPress basics */
.wp-block-image{ margin: 0 0 1rem 0; }
.alignwide{ width: min(1100px, 100%); }



/* Inner pages: compact hero + alternate background (so the train is reserved for the homepage) */
body:not(.home) .masthead{
  min-height: 300px;
  background-image: url('assets/images/hero-inner.svg');
  background-size: cover;
  background-position: center;
}
/* Home (front page) must keep the custom hero image (e.g., train) */
body.home:not(.blog) .masthead__bg{ display:block; }
body.home:not(.blog) .masthead{ background-image: none; }

/* Blog posts index should behave like an inner page even though WP can add .home */
body.blog .masthead{
  min-height: 300px;
  background-image: url('assets/images/hero-inner.svg');
  background-size: cover;
  background-position: center;
}
/* Slightly tighter nav gap to avoid the last menu item dropping on a second line at some widths */
@media (max-width: 1100px) and (min-width: 981px){
  .primary-nav ul{ gap: 18px; }
}


