/*
Theme Name: INCA CGIL Slovenia
Theme URI: https://incakp92-rwidz.wpcomstaging.com/
Author: Replica build
Description: Functional recreation of the INCA CGIL Slovenia patronato website (About/Chi Siamo, Services, Contact, Locations) in Italian, Slovenian and English, with a built-in AJAX contact form (wp_mail / WP Mail SMTP), a Privacy & Cookie Policy page, and a cookie consent banner. Classic PHP theme, no page builder required.
Version: 2.0.0
Requires at least: 6.0
Tested up to: 6.7
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: inca-cgil-slovenia
*/

/* ==========================================================================
   INCA CGIL Slovenia — replica stylesheet
   Shared between the static preview and the WordPress theme.
   Palette taken from the live site: brand red + white + light grey, Inter font.
   ========================================================================== */

:root {
  --red: #cc0000;
  --red-bright: #e30613;
  --red-dark: #990000;
  --ink: #222222;
  --muted: #666666;
  --line: #e0e0e0;
  --bg: #ffffff;
  --bg-alt: #f5f5f5;
  --bg-dark: #1a1a1a;
  --max: 1120px;
  --radius: 12px;
  --shadow: 0 6px 24px rgba(0, 0, 0, 0.08);
  --shadow-lg: 0 12px 40px rgba(0, 0, 0, 0.12);
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
    Helvetica, Arial, sans-serif;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  color: var(--ink);
  background: var(--bg);
  font-family: inherit;
  font-size: 17px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

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

a { color: var(--red); text-decoration: none; }
a:hover { color: var(--red-dark); }

.container {
  width: 100%;
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 24px;
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--red);
  color: #fff;
  padding: 10px 16px;
  z-index: 1000;
}
.skip-link:focus { left: 8px; top: 8px; color: #fff; }

/* --------------------------------------------------------------- Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: saturate(180%) blur(8px);
  border-bottom: 1px solid var(--line);
}
.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  min-height: 84px;
}
.brand { display: flex; align-items: center; gap: 14px; }
.brand img { height: 56px; width: auto; }
.brand .brand-text { line-height: 1.15; }
.brand .brand-text strong { display: block; font-size: 15px; color: var(--ink); }
.brand .brand-text span { font-size: 12px; color: var(--muted); }

.main-nav > ul {
  list-style: none;
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  padding: 0;
}
.main-nav > ul > li > a {
  display: block;
  padding: 10px 14px;
  border-radius: 8px;
  font-size: 15px;
  font-weight: 600;
  color: var(--ink);
  letter-spacing: 0.02em;
  text-transform: uppercase;
  transition: background 0.15s, color 0.15s;
}
.main-nav > ul > li > a:hover { background: var(--bg-alt); color: var(--red); }

.nav-toggle {
  display: none;
  background: none;
  border: 0;
  cursor: pointer;
  padding: 8px;
}
.nav-toggle span {
  display: block;
  width: 26px;
  height: 3px;
  background: var(--ink);
  border-radius: 2px;
  margin: 5px 0;
  transition: transform 0.2s, opacity 0.2s;
}

/* ---------------------------------------------------------------- Hero */
.hero {
  position: relative;
  background: linear-gradient(180deg, #fafafa 0%, #ffffff 100%);
  padding: 72px 0 48px;
  overflow: hidden;
}
.hero .container {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 48px;
  align-items: center;
}
.hero .eyebrow {
  display: inline-block;
  color: var(--red);
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  font-size: 13px;
  margin-bottom: 14px;
}
.hero h1 {
  font-size: clamp(30px, 4vw, 44px);
  line-height: 1.12;
  margin: 0 0 20px;
  letter-spacing: -0.02em;
}
.hero p { font-size: 19px; color: #333; margin: 0 0 28px; }
.hero-media {
  display: grid;
  gap: 20px;
}
.hero-media img {
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  width: 100%;
}

.btn {
  display: inline-block;
  background: var(--red);
  color: #fff;
  font-weight: 700;
  padding: 14px 28px;
  border-radius: 10px;
  border: 0;
  cursor: pointer;
  font-size: 16px;
  transition: background 0.15s, transform 0.1s;
}
.btn:hover { background: var(--red-dark); color: #fff; transform: translateY(-1px); }
.btn-ghost {
  background: transparent;
  color: var(--red);
  border: 2px solid var(--red);
  margin-left: 12px;
}
.btn-ghost:hover { background: var(--red); color: #fff; }

/* ------------------------------------------------------------- Sections */
.section { padding: 76px 0; }
.section-alt { background: var(--bg-alt); }
/* Keep anchored sections clear of the sticky header when scrolled to */
section[id] { scroll-margin-top: 100px; }
.section-head { max-width: 760px; margin: 0 auto 48px; text-align: center; }
.section-head .kicker {
  color: var(--red);
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  font-size: 13px;
}
.section-head h2 {
  font-size: clamp(26px, 3.4vw, 36px);
  margin: 10px 0 0;
  letter-spacing: -0.02em;
}
.section-head p { color: var(--muted); font-size: 18px; margin-top: 14px; }

/* Chi siamo */
.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  align-items: center;
}
.about-grid .lead { font-size: 20px; line-height: 1.6; }
.about-grid img { border-radius: var(--radius); box-shadow: var(--shadow); }

/* Servizi */
.services {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}
.service-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 32px 28px;
  box-shadow: var(--shadow);
  transition: transform 0.15s, box-shadow 0.15s;
}
.service-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }
.service-card .icon {
  font-size: 40px;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 72px;
  height: 72px;
  border-radius: 16px;
  background: #fff0f0;
  margin-bottom: 20px;
}
.service-card h3 {
  font-size: 18px;
  text-transform: uppercase;
  letter-spacing: 0.02em;
  margin: 0 0 10px;
  color: var(--ink);
}
.service-card p { margin: 0; color: var(--muted); font-size: 15.5px; }

/* Contatti */
.contact-grid {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: 48px;
  align-items: start;
}
.contact-intro h2 { font-size: 30px; margin: 0 0 16px; }
.contact-intro p { color: var(--muted); }
.contact-intro .contact-line {
  display: flex;
  gap: 12px;
  align-items: center;
  margin: 14px 0;
  color: var(--ink);
  font-weight: 600;
}
.contact-intro .contact-line .dot {
  width: 40px; height: 40px; border-radius: 10px;
  background: #fff0f0; color: var(--red);
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 20px;
}

.contact-form {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 32px;
  box-shadow: var(--shadow);
}
.form-row { margin-bottom: 18px; }
.form-row label {
  display: block;
  font-weight: 600;
  font-size: 14px;
  margin-bottom: 7px;
}
.form-row label .req { color: var(--red); }
.form-row input,
.form-row textarea {
  width: 100%;
  padding: 13px 15px;
  border: 1.5px solid var(--line);
  border-radius: 9px;
  font-family: inherit;
  font-size: 16px;
  color: var(--ink);
  background: #fff;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.form-row input:focus,
.form-row textarea:focus {
  outline: none;
  border-color: var(--red);
  box-shadow: 0 0 0 3px rgba(204, 0, 0, 0.12);
}
.form-row textarea { min-height: 130px; resize: vertical; }
.form-note { font-size: 13px; color: var(--muted); margin-top: 6px; }

.form-message {
  display: none;
  padding: 14px 16px;
  border-radius: 9px;
  margin-bottom: 18px;
  font-weight: 600;
}
.form-message.success { display: block; background: #eaf7ee; color: #1a7f37; border: 1px solid #b7e0c3; }
.form-message.error { display: block; background: #fdeaea; color: #b42318; border: 1px solid #f3b7b7; }
.form-message.info { display: block; background: #eef4fd; color: #1d4ed8; border: 1px solid #c3d5f3; }

/* Dove siamo */
.locations {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}
.location-card {
  background: #fff;
  border: 1px solid var(--line);
  border-left: 4px solid var(--red);
  border-radius: var(--radius);
  padding: 28px;
  box-shadow: var(--shadow);
}
.location-card h3 { margin: 0 0 6px; font-size: 20px; }
.location-card .addr { color: var(--muted); margin: 0 0 14px; }
.location-card .tel { font-weight: 700; color: var(--ink); display: flex; gap: 8px; align-items: center; }
.location-card .tel a { color: var(--red); }

.appointments {
  margin-top: 32px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 28px 32px;
  box-shadow: var(--shadow);
}
.appointments h3 { margin: 0 0 16px; font-size: 18px; }
.appointments ul { margin: 0; padding: 0; list-style: none; display: grid; gap: 10px; }
.appointments li { display: flex; gap: 10px; align-items: baseline; }
.appointments li strong { color: var(--red); min-width: 150px; display: inline-block; }

/* --------------------------------------------------------------- Footer */
.site-footer {
  background: var(--bg-dark);
  color: #cfcfcf;
  padding: 56px 0 40px;
  font-size: 14px;
  line-height: 1.7;
}
.site-footer .container { display: grid; gap: 20px; }
.site-footer .foot-brand { display: flex; align-items: center; gap: 14px; }
.site-footer .foot-brand img {
  height: 52px; background: #fff; border-radius: 8px; padding: 6px;
}
.site-footer .foot-legal { color: #9a9a9a; max-width: 760px; }
.site-footer .foot-legal strong { color: #e0e0e0; }
.site-footer .foot-bottom {
  border-top: 1px solid #333;
  padding-top: 20px;
  color: #8a8a8a;
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
}

/* --------------------------------------------------------------- Utility */
.center { text-align: center; }
.mt-24 { margin-top: 24px; }

/* --------------------------------------------------------------- Responsive */
@media (max-width: 900px) {
  .hero .container,
  .about-grid,
  .contact-grid { grid-template-columns: 1fr; }
  .hero-media { order: -1; }
  .services { grid-template-columns: 1fr; }
  .locations { grid-template-columns: 1fr; }

  .nav-toggle { display: block; margin-left: auto; }
  .main-nav {
    position: absolute;
    top: 84px; left: 0; right: 0;
    background: #fff;
    border-bottom: 1px solid var(--line);
    box-shadow: var(--shadow);
    display: none;
  }
  .main-nav.open { display: block; }
  .main-nav > ul { flex-direction: column; padding: 12px; gap: 4px; align-items: stretch; }
  .main-nav a { padding: 14px; }
}

@media (max-width: 520px) {
  body { font-size: 16px; }
  .section { padding: 56px 0; }
  .brand .brand-text { display: none; }
  .hero-copy .btn,
  .prose .btn { display: block; width: 100%; text-align: center; }
  .btn-ghost { margin-left: 0; margin-top: 12px; display: block; text-align: center; }
}

/* ==========================================================================
   Additions: language switcher, cookie banner, subpage hero, prose pages
   ========================================================================== */

/* Language dropdown (inline with the nav items) */
.header-tools { display: flex; align-items: center; gap: 16px; }
.nav-lang { position: relative; }
.lang-toggle {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  border: 1.5px solid var(--line);
  background: #fff;
  border-radius: 8px;
  padding: 8px 12px;
  font: inherit;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.03em;
  color: var(--ink);
  cursor: pointer;
  text-transform: uppercase;
  transition: border-color 0.15s, color 0.15s;
}
.lang-toggle:hover { border-color: var(--red); color: var(--red); }
.lang-toggle .lang-flag { display: inline-flex; line-height: 1; }
.lang-toggle .lang-caret { font-size: 10px; transition: transform 0.15s; opacity: 0.7; }
.lang-menu .opt { display: inline-flex; align-items: center; gap: 9px; }
.lang-menu .flag { display: inline-flex; line-height: 1; }
.lang-flag svg,
.lang-menu .flag svg {
  display: block;
  width: 24px;
  height: 16px;
  border-radius: 3px;
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.18);
}
.nav-lang.open .lang-caret { transform: rotate(180deg); }
.lang-menu {
  position: absolute;
  right: 0;
  top: calc(100% + 8px);
  min-width: 180px;
  list-style: none;
  margin: 0;
  padding: 6px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 12px;
  box-shadow: var(--shadow-lg);
  display: none;
  z-index: 200;
}
.nav-lang.open .lang-menu { display: block; }
.lang-menu li { margin: 0; }
.lang-menu button,
.lang-menu a {
  display: flex;
  width: 100%;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  border: 0;
  background: transparent;
  padding: 10px 12px;
  border-radius: 8px;
  font: inherit;
  font-size: 14.5px;
  color: var(--ink);
  cursor: pointer;
  text-align: left;
  text-decoration: none;
  text-transform: none;
  letter-spacing: 0;
  transition: background 0.12s, color 0.12s;
}
.lang-menu button:hover,
.lang-menu a:hover { background: var(--bg-alt); color: var(--red); }
.lang-menu button.active,
.lang-menu a.active { color: var(--red); font-weight: 700; }
.lang-menu button.active::after,
.lang-menu a.active::after { content: "✓"; color: var(--red); }

/* Language content blocks: only the active language shows.
   JS sets [hidden] on the inactive ones; this is a fallback before JS runs. */
.lc[hidden] { display: none !important; }

/* Subpage hero (Chi Siamo / Privacy) */
.page-hero {
  background: linear-gradient(180deg, #fafafa 0%, #ffffff 100%);
  border-bottom: 1px solid var(--line);
  padding: 64px 0 40px;
}
.page-hero .kicker {
  color: var(--red);
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  font-size: 13px;
}
.page-hero h1 {
  font-size: clamp(28px, 4vw, 42px);
  margin: 10px 0 0;
  letter-spacing: -0.02em;
}
.page-hero .lead { font-size: 19px; color: #333; margin: 16px 0 0; max-width: 760px; }
.breadcrumb { font-size: 14px; color: var(--muted); margin-bottom: 14px; }
.breadcrumb a { color: var(--muted); }
.breadcrumb a:hover { color: var(--red); }

/* Long-form prose */
.prose { max-width: 820px; margin: 0 auto; }
.prose h2 {
  font-size: 24px;
  margin: 40px 0 12px;
  letter-spacing: -0.01em;
  padding-top: 8px;
}
.prose h3 { font-size: 18px; margin: 26px 0 8px; }
.prose p { margin: 0 0 16px; color: #333; }
.prose ul { margin: 0 0 18px; padding-left: 22px; }
.prose li { margin: 6px 0; color: #333; }
.prose a { color: var(--red); word-break: break-word; }
/* Buttons inside prose must keep their own text color (not the red link color) */
.prose .btn { color: #fff; }
.prose .btn.btn-ghost { color: var(--red); }
.prose .btn.btn-ghost:hover { color: #fff; }
.prose .updated { color: var(--muted); font-size: 14px; margin-top: 32px; font-style: italic; }
.prose .callout {
  background: var(--bg-alt);
  border-left: 4px solid var(--red);
  border-radius: 10px;
  padding: 16px 20px;
  margin: 20px 0;
}

/* Stats row (Chi Siamo) */
.stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  margin: 8px 0 8px;
}
.stat {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 24px 20px;
  text-align: center;
  box-shadow: var(--shadow);
}
.stat .num { font-size: 30px; font-weight: 800; color: var(--red); line-height: 1; }
.stat .lbl { color: var(--muted); font-size: 14px; margin-top: 8px; }

.country-tags { display: flex; flex-wrap: wrap; gap: 8px; margin: 6px 0 8px; }
.country-tags span {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 6px 13px;
  font-size: 13.5px;
  color: #333;
}

/* Cookie consent banner */
.cookie-banner {
  position: fixed;
  left: 16px;
  right: 16px;
  bottom: 16px;
  z-index: 900;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 14px;
  box-shadow: var(--shadow-lg);
  padding: 20px 22px;
  max-width: 560px;
  margin: 0 auto;
  display: none;
}
.cookie-banner.show { display: block; }
.cookie-banner p { margin: 0 0 14px; font-size: 14.5px; color: #333; }
.cookie-banner .cookie-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.cookie-banner .btn { padding: 10px 18px; font-size: 14px; }
.cookie-banner .btn-small-ghost {
  background: transparent;
  color: var(--ink);
  border: 1.5px solid var(--line);
}
.cookie-banner .btn-small-ghost:hover { border-color: var(--red); color: var(--red); background: #fff; }

/* Footer links */
.foot-links { display: flex; gap: 18px; flex-wrap: wrap; }
.foot-links a { color: #cfcfcf; font-size: 14px; }
.foot-links a:hover { color: #fff; }

@media (max-width: 900px) {
  .stats { grid-template-columns: repeat(2, 1fr); }
  /* In the mobile menu, expand the language options inline instead of a popover */
  .main-nav.open .nav-lang { width: 100%; }
  .main-nav.open .lang-toggle { display: none; }
  .main-nav.open .lang-menu {
    position: static;
    display: block;
    box-shadow: none;
    border: 0;
    border-top: 1px solid var(--line);
    border-radius: 0;
    margin-top: 6px;
    padding-top: 6px;
    min-width: 0;
  }
  .main-nav.open .lang-menu button,
  .main-nav.open .lang-menu a { padding: 12px 14px; }
}
@media (max-width: 520px) {
  .stats { grid-template-columns: 1fr 1fr; }
  .cookie-banner { left: 8px; right: 8px; bottom: 8px; padding: 16px; }
}
