/*
Theme Name: WPP LLC Theme
Author: You
Version: 1.0
Text Domain: wpp-llc
*/

/* ================================
   COLOR SYSTEM (more blue/teal)
   ================================ */
:root{
  /* Backgrounds */
  --bg: #060B16;          /* deep navy */
  --bg2: #071A2B;         /* blue-teal */
  --panel: rgba(9, 28, 45, .78);
  --panel2: rgba(7, 18, 32, .70);

  /* Text */
  --text: #EAF2FF;
  --muted: #A9C0D6;

  /* Accents */
  --primary: #114A93;     /* brighter deep blue */
  --accent:  #11C5C7;     /* teal */
  --accent2: #0B6B8A;     /* blue-teal */
  --focus:   #7DEBFF;     /* light cyan */

  /* Borders & depth */
  --border: rgba(140, 200, 255, .14);
  --border2: rgba(17, 197, 199, .28); /* slightly stronger so teal shows */
  --radius: 14px;
  --shadow: 0 18px 45px rgba(0,0,0,.45);
}

*{ box-sizing:border-box; }
html, body{ padding:0; margin:0; height:100%; }

/* ================================
   BIG OBVIOUS BACKGROUND
   ================================ */
html{
  background:
    radial-gradient(1200px 700px at 10% 8%, rgba(17,197,199,.22), transparent 62%),
    radial-gradient(1100px 680px at 90% 12%, rgba(17,74,147,.30), transparent 60%),
    radial-gradient(900px 520px at 50% 120%, rgba(125,235,255,.10), transparent 60%),
    linear-gradient(180deg, var(--bg) 0%, #050915 55%, #040713 100%);
  background-attachment: fixed;
}

body{
  background: transparent;
  color: var(--text);
  font-family: system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  line-height: 1.55;
}

/* subtle side glow (behind everything) */
body::before{
  content:"";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background:
    radial-gradient(520px 800px at 0% 35%, rgba(17,197,199,.16), transparent 70%),
    radial-gradient(520px 800px at 100% 25%, rgba(17,74,147,.18), transparent 70%);
  opacity: .9;
}

/* keep all site sections above glow */
.site-header, .banner, .main, .site-footer{ position: relative; z-index: 1; }

a{ color: var(--focus); text-decoration: none; }
a:hover{ text-decoration: underline; }

.container{
  width: min(1100px, calc(100% - 40px));
  margin: 0 auto;
}

/* ================================
   HEADER (blue glass)
   ================================ */
.site-header{
  position: sticky;
  top: 0;
  z-index: 99;
  background: rgba(6, 16, 32, .78);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  box-shadow: 0 10px 30px rgba(0,0,0,.35);
}

.header-inner{
  display:flex;
  align-items:center;
  justify-content: space-between;
  padding: 14px 0;
  gap: 18px;
}

.brand{
  display:flex;
  align-items:center;
  gap:12px;
  min-width: 200px;
}
.brand .site-title{
  font-weight: 800;
  letter-spacing: .2px;
  color: var(--text);
}
.brand .site-title:hover{ text-decoration:none; }

.nav ul{
  list-style:none;
  display:flex;
  gap: 10px;
  padding:0;
  margin:0;
  align-items:center;
}
.nav a{
  color: var(--text);
  opacity: .92;
  padding: 8px 10px;
  border-radius: 10px;
  border: 1px solid transparent;
}
.nav a:hover{
  background: rgba(17,197,199,.10);
  border: 1px solid rgba(17,197,199,.22);
  text-decoration:none;
}

/* ================================
   BUTTONS (blue/teal)
   ================================ */
.btn{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  padding: 12px 16px;
  border-radius: 12px;
  border: 1px solid rgba(125,235,255,.22);
  background: linear-gradient(135deg, rgba(17,197,199,.40), rgba(17,74,147,.55));
  color: var(--text);
  box-shadow: 0 16px 38px rgba(0,0,0,.40);
  font-weight: 750;
}
.btn:hover{
  filter: brightness(1.08);
  transform: translateY(-1px);
  text-decoration:none;
}
.btn:focus{
  outline: 2px solid var(--focus);
  outline-offset: 3px;
}

/* ================================
   BANNER (single source of truth)
   - Keeps banner SMALL (190/240)
   - Prevents "blown up" media
   - Keeps LEFT image
   - Ensures middle/main banner shows on mobile
   ================================ */
.banner{
  border-bottom: 1px solid var(--border);
  background:
    radial-gradient(1100px 420px at 10% 0%, rgba(17,197,199,.22), transparent 65%),
    radial-gradient(1100px 420px at 90% 0%, rgba(17,74,147,.30), transparent 65%),
    linear-gradient(180deg, rgba(6,16,32,.35) 0%, rgba(6,16,32,0) 70%);
}

.banner-inner{ padding: 26px 0 22px; }
@media (min-width: 900px){
  .banner-inner{ padding: 34px 0 28px; }
}

.banner-title{
  font-size: clamp(28px, 4vw, 44px);
  margin: 0;
}

/* If there is a header image/video/background, keep the banner small */
.banner.has-banner-img{
  position: relative;
  min-height: 190px;
  display: flex;
  align-items: flex-end;
  overflow: hidden; /* keeps any injected media from affecting layout */

  /* Background image banner var logic */
  background-image:
    linear-gradient(180deg, rgba(4,8,16,.32) 0%, rgba(4,8,16,.88) 100%),
    var(--banner-img);
  background-size: contain;      /* key: no zoom/crop */
  background-position: center;   /* centered like it used to be */
  background-repeat: no-repeat;
  background-color: #050A14;
}

@media (min-width: 900px){
  .banner.has-banner-img{ min-height: 240px; }
}

/* Banner content stays above any injected media */
.banner.has-banner-img .banner-inner{
  position: relative;
  z-index: 2;
  padding: 18px 0 18px;
  width: 100%;
  display: flex;
  align-items: flex-end;
  gap: 18px;
  min-width: 0;
}

/* If WordPress injects a real header media element, force it to NOT control height */
.banner.has-banner-img .custom-header,
.banner.has-banner-img .custom-header-media,
.banner.has-banner-img .wp-custom-header,
.banner.has-banner-img #wp-custom-header{
  position: absolute;
  inset: 0;
  z-index: 0;
  overflow: hidden;
}

.banner.has-banner-img .custom-header img,
.banner.has-banner-img .custom-header video,
.banner.has-banner-img .custom-header-media img,
.banner.has-banner-img .custom-header-media video,
.banner.has-banner-img .wp-custom-header img,
.banner.has-banner-img .wp-custom-header video,
.banner.has-banner-img #wp-custom-header img,
.banner.has-banner-img #wp-custom-header video{
  width: 100%;
  height: 100%;
  display: block;
  object-fit: contain;   /* key: contain so it never "blows up" */
  object-position: center;
}

/* LEFT image (first image inside banner-inner) */
.banner.has-banner-img .banner-inner > img:first-child{
  flex: 0 0 auto;
  height: clamp(96px, 10vw, 150px);
  width: auto;
  display: block;
  object-fit: contain;
  object-position: center;
  align-self: flex-end;
}

/* Middle/main banner image (if you have an actual <img> after the left one) */
.banner.has-banner-img .banner-inner > img:not(:first-child){
  flex: 1 1 320px;
  width: 100%;
  max-width: 720px;
  height: auto;
  max-height: 240px;
  display: block;
  object-fit: contain;
  object-position: center;
}

/* Any non-image content block next to the left image */
.banner.has-banner-img .banner-inner > :not(img:first-child){
  flex: 1 1 280px;
  min-width: 0;
}

/* Mobile: stack so nothing disappears */
@media (max-width: 640px){
  .banner.has-banner-img{
    overflow: visible; /* avoid “it’s there but clipped” on some browsers */
    align-items: flex-start;
  }

  .banner.has-banner-img .banner-inner{
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
    padding: 14px 0 14px;
  }

  .banner.has-banner-img .banner-inner > img:first-child{
    height: clamp(80px, 22vw, 120px);
    align-self: flex-start;
  }

  .banner.has-banner-img .banner-inner > img:not(:first-child){
    width: 100%;
    max-width: none;
    max-height: 220px;
  }

  /* Make absolutely sure nothing is hidden */
  .banner.has-banner-img img{
    visibility: visible;
    opacity: 1;
  }
}

.main{ padding: 28px 0 70px; }

/* ================================
   CARDS (blue glass)
   ================================ */
.card{
  background: linear-gradient(180deg, rgba(9, 28, 45, .78), rgba(7, 18, 32, .72));
  border: 1px solid var(--border2);
  border-radius: var(--radius);
  padding: 18px;
  box-shadow: var(--shadow);
}

.card::before{
  content:"";
  display:block;
  height: 2px;
  margin: -18px -18px 14px -18px;
  background: linear-gradient(90deg, rgba(17,197,199,.80), rgba(125,235,255,.30), rgba(17,74,147,.75));
  opacity: .85;
}

/* ================================
   FORMS
   ================================ */
.form-grid{
  display:grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}
@media (max-width: 640px){
  .form-grid{ grid-template-columns: 1fr; }
}

label{
  display:block;
  font-size: 14px;
  color: var(--muted);
  margin-bottom: 6px;
}

input[type="text"],
input[type="tel"],
input[type="date"],
input[type="email"],
textarea,
select{
  width:100%;
  padding: 12px 12px;
  border-radius: 12px;
  border: 1px solid rgba(125,235,255,.18);
  background: rgba(3, 8, 16, .55);
  color: var(--text);
}

input:focus,
textarea:focus,
select:focus{
  outline: none;
  border-color: rgba(125,235,255,.45);
  box-shadow: 0 0 0 3px rgba(125,235,255,.12);
}

textarea{ min-height: 120px; resize: vertical; }

fieldset{
  border: 1px solid rgba(125,235,255,.16);
  border-radius: var(--radius);
  padding: 14px;
}
legend{
  padding: 0 8px;
  color: var(--text);
  font-weight: 750;
}

.checkline{
  display:flex;
  gap: 10px;
  align-items:flex-start;
  color: var(--text);
  margin: 8px 0;
}

.notice{
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid rgba(17,197,199,.30);
  background: rgba(17,197,199,.10);
  color: var(--text);
}

/* ================================
   FOOTER
   ================================ */
.site-footer{
  border-top: 1px solid var(--border);
  padding: 22px 0;
  color: var(--muted);
  font-size: 14px;
}

/* ================================
   HOME IMAGE GRID
   ================================ */
.home-intro{ margin-top: 0; }

.image-grid-wrap{
  width: min(1400px, calc(100% - 40px));
  margin: 0 auto;
}

.image-grid{
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
  align-items: stretch;
}

.grid-tile{
  display: grid;
  grid-template-rows: 260px auto;
  width: 100%;
  min-width: 0;
  background: linear-gradient(180deg, rgba(9,28,45,.74), rgba(7,18,32,.70));
  border: 1px solid var(--border2);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
}

.grid-media{
  background:
    radial-gradient(800px 300px at 50% 0%, rgba(17,197,199,.16), transparent 55%),
    rgba(0,0,0,.18);
}

.grid-media img{
  width: 100%;
  height: 100%;
  display: block;
  object-fit: contain;
  object-position: center;
  background: rgba(3, 8, 16, .55);
}

.img-placeholder{
  height: 100%;
  display:flex;
  align-items:center;
  justify-content:center;
  text-align:center;
  padding: 18px;
  color: var(--muted);
}

.grid-caption{
  padding: 14px 14px;
  border-top: 1px solid rgba(125,235,255,.12);
  min-width: 0;
  color: var(--text);
}

.grid-caption h3{
  margin: 0 0 8px;
  font-size: 18px;
}

.grid-caption p{
  margin: 0;
  line-height: 1.45;
  white-space: normal;
  overflow-wrap: anywhere;
  word-break: normal;
  max-width: 70ch;
}

@media (max-width: 900px){
  .image-grid{ grid-template-columns: 1fr; }
  .grid-tile{ grid-template-rows: 220px auto; }
}

/* ================================
   PRINCIPLES GRID
   ================================ */
.principles-title{
  margin: 0 0 12px;
  font-size: 22px;
}

.principles-grid{
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  align-items: stretch;
}

.principle-card h3{
  margin: 0 0 10px;
  font-size: 18px;
}

.principle-card ul{
  margin: 0;
  padding-left: 18px;
  color: var(--text);
  opacity: .92;
}

.principle-card li{ margin: 8px 0; }

@media (max-width: 980px){
  .principles-grid{ grid-template-columns: 1fr 1fr; }
}
@media (max-width: 640px){
  .principles-grid{ grid-template-columns: 1fr; }
}

/* ================================
   RESPONSIVE FIXES (menu + WP columns)
   ================================ */
.header-inner{ flex-wrap: wrap; }
.brand{ flex: 1 1 auto; }
.nav{ flex: 0 1 auto; }
.nav ul{ flex-wrap: wrap; justify-content: flex-end; }
.nav a{ white-space: nowrap; }

@media (max-width: 900px){
  .header-inner{ gap: 10px; padding: 10px 0; }
  .nav{ flex: 1 1 100%; min-width: 0; }
  .nav ul{ justify-content: flex-start; gap: 8px; }
}

@media (max-width: 640px){
  .container{ width: calc(100% - 28px); }
  .nav ul{
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 2px;
  }
}

/* Gutenberg columns often cause "cards don't line up" */
.wp-block-columns{ gap: 14px; }
.wp-block-column{ min-width: 0; }

@media (max-width: 900px){
  .wp-block-columns{ flex-wrap: wrap !important; }
  .wp-block-column{ flex-basis: 100% !important; }
}

/* =========================================================
   HOME BANNER SIDE IMAGE (TRUDGE) — stable sizing + mobile pin
   - Desktop stays the same size as before
   - Mobile pins top-left without shrinking to “tiny”
   ========================================================= */

/* Make front-page banner inner layout consistent */
.home-banner-inner{
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

/* Desktop/default look (matches your old inline width behavior) */
.home-banner-side{
  flex: 0 0 auto;
}

.home-banner-side-img{
  width: min(220px, 34vw);
  height: auto;
  display: block;

  border-radius: 14px;
  border: 1px solid rgba(255,255,255,.10);
  background: rgba(0,0,0,.20);
  padding: 6px;
}

/* Spacer so banner background is the “main” area */
.home-banner-spacer{
  flex: 1 1 auto;
  min-width: 0;
}

/* Mobile/tablet: pin it to top-left and keep it out of the lower banner text */
@media (max-width: 780px){
  .banner.has-banner-img .home-banner-inner{
    position: relative;
    /* creates room so the pinned logo doesn’t cover the banner content area */
    padding-top: clamp(56px, 12vw, 84px);
  }

  .banner.has-banner-img .home-banner-side{
    position: absolute;
    top: 8px;
    left: 8px;
    z-index: 3;
    margin: 0;
    max-width: 60vw;
  }

  /* NOT tiny: scales based on viewport width */
  .home-banner-side-img{
    width: clamp(140px, 42vw, 200px);
    height: auto;
    padding: 5px;
  }
}

/* Extra-small phones (older/smaller iPhones): slightly smaller but still visible */
@media (max-width: 380px){
  .home-banner-side-img{
    width: clamp(130px, 48vw, 180px);
  }
}
