/*
Theme Name: Cellnex Gateway
Theme URI: https://cellnex.eu/
Author: Instech.ee
Description: Editorial corporate gateway block theme for Cellnex Group companies. By Instech.ee
Version: 1.1.11
Requires at least: 6.5
Tested up to: 6.8
Requires PHP: 8.0
Text Domain: cellnex-gateway
*/

:root {
  --cellnex-blue: #61add6;
  --cellnex-blue-soft: #edf8fd;
  --cellnex-blue-line: #d7edf7;
  --cellnex-ink: #171717;
  --cellnex-muted: #5f6670;
  --cellnex-line: #e8e8e8;
  --cellnex-paper: #ffffff;
  --cellnex-paper-soft: #f7fbfd;
  --cellnex-max: 1180px;
}

html { scroll-behavior: smooth; }
body { margin: 0; background: var(--cellnex-paper); color: var(--cellnex-ink); }
a { transition: color .18s ease, border-color .18s ease, background .18s ease, transform .18s ease; }

.wp-site-blocks { overflow-x: hidden; }
.cellnex-shell {
  background: radial-gradient(circle at 88% 12%, rgba(97,173,214,.16), transparent 25%), linear-gradient(180deg,#fff 0%,#fff 58%,#f8fbfd 100%);
  min-height: 100vh;
}
.cellnex-wrap { max-width: var(--cellnex-max); margin-left: auto; margin-right: auto; padding-left: 24px; padding-right: 24px; }

.cellnex-header { border-bottom: 1px solid var(--cellnex-line); padding-top: 28px; padding-bottom: 24px; }
.cellnex-header-row { display: flex; align-items: flex-start; justify-content: space-between; gap: 28px; }
.cellnex-brand { display: flex; align-items: flex-start; gap: 13px; text-decoration: none; }
.cellnex-brand-symbol { font-family: Georgia, 'Times New Roman', serif; font-size: 43px; line-height: .9; color: var(--cellnex-blue); }
.cellnex-brand-title { font-family: Georgia, 'Times New Roman', serif; font-size: 29px; line-height: .9; letter-spacing: .08em; color: var(--cellnex-blue); text-transform: uppercase; margin: 0; }
.cellnex-brand-sub { margin-top: 7px; font-size: 11px; line-height: 1.2; letter-spacing: .24em; color: #575757; text-transform: uppercase; }
.cellnex-nav { display: flex; justify-content: flex-end; align-items: center; gap: 19px; flex-wrap: wrap; margin-top: 9px; }
.cellnex-nav a { text-decoration: none; color: #111; font-size: 12px; line-height: 1.2; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; border-bottom: 1px solid transparent; padding-bottom: 5px; }
.cellnex-nav a:hover { color: var(--cellnex-blue); border-bottom-color: var(--cellnex-blue); }
.cellnex-language { display: inline-flex; gap: 12px; white-space: nowrap; }

.cellnex-hero { position: relative; display: grid; grid-template-columns: 1.05fr .95fr; gap: 70px; align-items: center; min-height: 620px; padding-top: 86px; padding-bottom: 96px; }
.cellnex-hero:before { content: '§'; position: absolute; right: 4%; top: 48px; z-index: 0; font-family: Georgia, 'Times New Roman', serif; font-size: clamp(210px,28vw,450px); line-height: .8; color: rgba(97,173,214,.10); pointer-events: none; }
.cellnex-hero-main, .cellnex-hero-side { position: relative; z-index: 1; }
.cellnex-eyebrow { display: flex; align-items: center; gap: 12px; margin-bottom: 32px; color: var(--cellnex-muted); font-size: 13px; letter-spacing: .16em; text-transform: uppercase; }
.cellnex-eyebrow:before { content: ''; display: inline-block; width: 54px; height: 1px; background: var(--cellnex-blue); }
.cellnex-hero-title { margin: 0; font-family: Georgia, 'Times New Roman', serif; font-size: clamp(62px,8vw,124px); line-height: .87; font-weight: 400; letter-spacing: -.055em; text-transform: uppercase; }
.cellnex-hero-title .blue { color: var(--cellnex-blue); }
.cellnex-hero-tagline { margin: 34px 0 0; max-width: 620px; font-size: clamp(20px,2.1vw,27px); line-height: 1.38; color: #222; }
.cellnex-hero-meta { margin-top: 28px; max-width: 520px; font-size: 14px; line-height: 1.8; color: var(--cellnex-muted); }
.cellnex-buttons { display: flex; flex-wrap: wrap; gap: 16px; margin-top: 40px; }
.cellnex-button .wp-block-button__link, .cellnex-button-secondary .wp-block-button__link { display: inline-flex; align-items: center; justify-content: center; min-height: 52px; padding: 0 24px; border-radius: 0; font-size: 13px; font-weight: 800; letter-spacing: .09em; text-transform: uppercase; text-decoration: none; }
.cellnex-button .wp-block-button__link { background: var(--cellnex-ink); color: #fff; border: 1px solid var(--cellnex-ink); }
.cellnex-button-secondary .wp-block-button__link { background: transparent; color: var(--cellnex-ink); border: 1px solid var(--cellnex-line); }
.cellnex-button .wp-block-button__link:hover, .cellnex-button-secondary .wp-block-button__link:hover { transform: translateY(-2px); background: var(--cellnex-blue); border-color: var(--cellnex-blue); color: #fff; }
.cellnex-hero-side { padding: 44px 0 44px 44px; border-left: 1px solid var(--cellnex-line); }
.cellnex-side-label { margin: 0 0 22px; font-size: 12px; letter-spacing: .18em; text-transform: uppercase; color: var(--cellnex-blue); font-weight: 800; }
.cellnex-side-item { padding-bottom: 22px; margin-bottom: 24px; border-bottom: 1px solid var(--cellnex-line); }
.cellnex-side-item:last-child { margin-bottom: 0; padding-bottom: 0; border-bottom: 0; }
.cellnex-side-item h3 { margin: 0; font-family: Georgia, 'Times New Roman', serif; font-size: 26px; line-height: 1.15; font-weight: 400; }
.cellnex-side-item p { margin: 8px 0 0; color: var(--cellnex-muted); line-height: 1.6; font-size: 14px; }

.cellnex-section { padding-top: 86px; padding-bottom: 86px; border-top: 1px solid var(--cellnex-line); }
.cellnex-section-head { display: grid; grid-template-columns: .85fr 1.15fr; gap: 60px; align-items: start; margin-bottom: 46px; }
.cellnex-kicker { margin: 0; color: var(--cellnex-blue); font-size: 13px; letter-spacing: .16em; text-transform: uppercase; font-weight: 800; }
.cellnex-section-title { margin: 0; font-family: Georgia, 'Times New Roman', serif; font-size: clamp(42px,5vw,78px); line-height: .95; font-weight: 400; letter-spacing: -.045em; }
.cellnex-section-copy { margin: 18px 0 0; max-width: 620px; color: var(--cellnex-muted); font-size: 17px; line-height: 1.75; }
.cellnex-directory { border-top: 1px solid var(--cellnex-ink); }
.cellnex-directory-row { display: grid; grid-template-columns: 110px 1.05fr 1.15fr 56px; gap: 30px; align-items: start; padding: 36px 0; border-bottom: 1px solid var(--cellnex-line); text-decoration: none; color: inherit; }
.cellnex-directory-row:hover { background: linear-gradient(90deg, rgba(97,173,214,.075), transparent); padding-left: 18px; padding-right: 18px; }
.cellnex-number { margin: 0; color: var(--cellnex-blue); font-size: 13px; letter-spacing: .18em; font-weight: 800; }
.cellnex-company-name { margin: 0; font-family: Georgia, 'Times New Roman', serif; font-size: clamp(28px,3vw,45px); line-height: 1.02; font-weight: 400; letter-spacing: -.035em; text-decoration: none; }
.cellnex-company-desc { margin: 0; color: var(--cellnex-muted); font-size: 16px; line-height: 1.72; }
.cellnex-company-meta { margin: 14px 0 0; color: #333; font-size: 13px; letter-spacing: .08em; text-transform: uppercase; }
.cellnex-arrow { width: 52px; height: 52px; border: 1px solid var(--cellnex-line); display: grid; place-items: center; color: var(--cellnex-blue); font-size: 24px; line-height: 1; }
.cellnex-directory-row:hover .cellnex-arrow { background: var(--cellnex-blue); border-color: var(--cellnex-blue); color: #fff; }

.cellnex-info { display: grid; grid-template-columns: 1.25fr .75fr; gap: 70px; padding-top: 86px; padding-bottom: 86px; border-top: 1px solid var(--cellnex-line); }
.cellnex-info h2 { margin: 0; font-family: Georgia, 'Times New Roman', serif; font-size: clamp(42px,5vw,76px); line-height: .98; font-weight: 400; letter-spacing: -.045em; }
.cellnex-info p { max-width: 720px; margin: 28px 0 0; color: var(--cellnex-muted); font-size: 18px; line-height: 1.75; }
.cellnex-contact { background: var(--cellnex-paper-soft); border: 1px solid var(--cellnex-blue-line); padding: 34px; align-self: start; }
.cellnex-contact h3 { margin: 0 0 20px; font-size: 13px; letter-spacing: .16em; text-transform: uppercase; color: var(--cellnex-blue); }
.cellnex-contact p { margin: 0; font-size: 15px; line-height: 1.8; color: #333; }
.cellnex-footer { border-top: 1px solid var(--cellnex-line); padding-top: 30px; padding-bottom: 42px; color: var(--cellnex-muted); font-size: 13px; }
.cellnex-footer-row { display: flex; justify-content: space-between; gap: 24px; flex-wrap: wrap; }
.cellnex-footer-links { display: flex; gap: 18px; }
.cellnex-footer a:hover { color: var(--cellnex-blue); }

/* Editor compatibility */
.editor-styles-wrapper .cellnex-shell { padding: 0 !important; }
.editor-styles-wrapper .cellnex-wrap { max-width: var(--cellnex-max); margin-left: auto; margin-right: auto; }
.editor-styles-wrapper .cellnex-directory-row { color: inherit; }

@media (max-width: 900px) {
  .cellnex-wrap { padding-left: 15px; padding-right: 15px; }
  .cellnex-header-row, .cellnex-hero, .cellnex-section-head, .cellnex-info { display: grid; grid-template-columns: 1fr; }
  .cellnex-nav { justify-content: flex-start; gap: 14px; }
  .cellnex-hero { min-height: auto; gap: 42px; padding-top: 58px; padding-bottom: 68px; }
  .cellnex-hero:before { right: -20px; top: 20px; font-size: 240px; }
  .cellnex-hero-side { border-left: 0; border-top: 1px solid var(--cellnex-line); padding: 30px 0 0; }
  .cellnex-directory-row { grid-template-columns: 1fr; gap: 14px; }
  .cellnex-directory-row:hover { padding-left: 0; padding-right: 0; background: transparent; }
  .cellnex-arrow { justify-self: start; }
  .cellnex-info { gap: 34px; }
}

@media (max-width: 560px) {
  .cellnex-brand-title { font-size: 24px; }
  .cellnex-brand-symbol { font-size: 38px; }
  .cellnex-hero-title { font-size: 58px; }
  .cellnex-buttons { flex-direction: column; }
  .cellnex-button .wp-block-button__link, .cellnex-button-secondary .wp-block-button__link { width: 100%; }
  .cellnex-section { padding-top: 64px; padding-bottom: 64px; }
  .cellnex-directory-row { padding: 30px 0; }
  .cellnex-contact { padding: 26px; }
}


/* Cellnex Gateway V1.1.3 — logo/header refinement */
.cellnex-brand {
  gap: 0.78rem;
}

.cellnex-brand .wp-block-site-title,
.cellnex-brand-title,
.cellnex-logo-text {
  letter-spacing: 0.045em !important;
}

.cellnex-brand .wp-block-site-title {
  line-height: 0.95;
}

.cellnex-brand-sub,
.cellnex-brand .wp-block-site-tagline,
.cellnex-group-companies {
  position: relative;
  display: inline-block;
  letter-spacing: 0.18em !important;
  padding-bottom: 0.48rem;
}

.cellnex-brand-sub::after,
.cellnex-brand .wp-block-site-tagline::after,
.cellnex-group-companies::after {
  content: "";
  display: block;
  width: 100%;
  height: 1px;
  margin-top: 0.42rem;
  background: currentColor;
  opacity: 0.55;
}

.cellnex-header {
  padding-top: 22px !important;
  padding-bottom: 20px !important;
}

.cellnex-hero {
  padding-top: clamp(56px, 7vw, 92px) !important;
  padding-bottom: clamp(64px, 8vw, 104px) !important;
}

.cellnex-hero::after {
  opacity: 0.82;
}

@media (max-width: 760px) {
  .cellnex-header {
    padding-top: 18px !important;
    padding-bottom: 18px !important;
  }

  .cellnex-brand .wp-block-site-logo img {
    max-height: 38px;
  }
}


/* Cellnex Gateway V1.1.6 — minimal language/header patch */
.cellnex-lang-switcher {
  display: flex;
  align-items: center;
  gap: 0.72rem;
  flex-wrap: wrap;
  font-size: 12px;
  letter-spacing: 0.10em;
  text-transform: uppercase;
}

.cellnex-lang-switcher a {
  text-decoration: none;
  color: inherit;
  opacity: 0.86;
}

.cellnex-lang-switcher a:hover,
.cellnex-lang-switcher a:focus {
  color: var(--cellnex-blue, #6ab3e5);
  opacity: 1;
}

.cellnex-lang-switcher .separator {
  color: rgba(23, 23, 23, 0.28);
}

.cellnex-contact-note {
  max-width: 34rem;
}


/* Cellnex Gateway V1.1.7 — company logos from Media Library import */
.company-logo {
  margin: 0 !important;
  line-height: 1;
}

.company-logo a {
  display: inline-flex;
  align-items: center;
  text-decoration: none !important;
  border: 0 !important;
}

.company-logo img {
  display: block;
  width: auto;
  max-width: min(360px, 100%);
  max-height: 92px;
  object-fit: contain;
}

.company-logo--finance img {
  max-height: 78px;
}

.company-logo--instech img {
  max-height: 82px;
}

.company-logo--retrokas img {
  max-height: 105px;
}

@media (max-width: 900px) {
  .company-logo img {
    max-width: min(320px, 100%);
    max-height: 82px;
  }

  .company-logo--retrokas img {
    max-height: 95px;
  }
}


.cellnex-company-name.company-logo {
  margin: 0 !important;
}

.cellnex-company-name.company-logo img {
  display: block;
  width: auto;
  max-width: min(380px, 100%);
  max-height: 92px;
  object-fit: contain;
}

.cellnex-company-name.company-logo--finance img {
  max-height: 78px;
}

.cellnex-company-name.company-logo--instech img {
  max-height: 82px;
}

.cellnex-company-name.company-logo--retrokas img {
  max-height: 105px;
}


/* Cellnex Gateway V1.1.8 — header simplification */
.cellnex-brand-title a {
  color: inherit;
  text-decoration: none !important;
}

.cellnex-header .wp-block-navigation {
  display: none;
}


/* Cellnex Gateway V1.1.9 — corrected contact block and footer */
.cellnex-email-image {
  margin-top: 0.72rem !important;
  margin-bottom: 0.95rem !important;
  line-height: 1;
}

.cellnex-email-image img {
  display: block;
  width: auto;
  max-width: min(225px, 100%);
  height: auto;
}

.cellnex-footer .cellnex-footer-empty {
  display: none;
}


/* Cellnex Gateway V1.1.10 — language copy and contact email image refinement */
.cellnex-email-image {
  margin-top: 0.45rem !important;
  margin-bottom: 0.68rem !important;
  line-height: 1;
}

.cellnex-email-image img {
  display: block;
  width: auto;
  max-width: min(162px, 100%);
  height: auto;
  opacity: 0.92;
}


/* Cellnex Gateway V1.1.11 — email image corrected */
.cellnex-email-image { margin-top: 0.35rem !important; margin-bottom: 0.55rem !important; line-height: 1; }
.cellnex-email-image img { display:block; width:auto !important; max-width: 128px; height:auto !important; max-height: 18px; opacity:1; }
