/*
Theme Name:   Hello Elementor Child - CCS
Theme URI:    https://calcomsec.com
Description:  Child theme for California Commercial Security
Author:       Naper Solutions
Template:     hello-elementor
Version:      1.4.0
*/

/* =============================================
   CSS CUSTOM PROPERTIES (Brand Tokens)
   ============================================= */
:root {
  /* Core brand — charcoal + gold, no blue */
  --ccs-dark:      #2A2A2A;
  --ccs-gold:      #fdb812;
  --ccs-gold-readable: #b8860b;  /* darker gold for text on light backgrounds */
  --ccs-white:     #ffffff;
  --ccs-gray:      #3a3a3a;

  /* Secondary accents — use sparingly */
  --ccs-red:       #d1183f;
  --ccs-orange:    #e78a38;

  /* UI utility */
  --ccs-light-bg:  #f3f3f3;
  --ccs-border:    #dcdcdc;
  --ccs-navy-deep: #1a1a1a;

  /* Typography */
  --font-heading:  'Montserrat', sans-serif;
  --font-body:     'Open Sans', sans-serif;

  /* Spacing */
  --section-pad:    80px;
  --section-pad-sm: 50px;
}

/* =============================================
   BASE
   ============================================= */
body {
  font-family: var(--font-body);
  color: var(--ccs-gray);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

html, body {
  margin: 0;
  padding: 0;
  overflow-x: hidden;
}

#site-content {
  width: 100%;
  max-width: none;
  margin: 0;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  color: var(--ccs-dark);
  font-weight: 700;
  line-height: 1.2;
}

a {
  color: var(--ccs-dark);
  transition: color 0.2s ease;
}
a:hover { color: var(--ccs-gold); }

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

/* =============================================
   BUTTONS
   ============================================= */

/* Gold primary — use on dark backgrounds */
.ccs-btn-primary,
.elementor-button.ccs-btn-primary {
  display: inline-block;
  background: var(--ccs-gold);
  color: var(--ccs-dark) !important;
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 12px 28px;
  border: none;
  border-radius: 3px;
  cursor: pointer;
  transition: background 0.25s, color 0.25s;
}
.ccs-btn-primary:hover,
.elementor-button.ccs-btn-primary:hover {
  background: var(--ccs-white);
  color: var(--ccs-dark) !important;
}

/* White outline — use on colored backgrounds */
.ccs-btn-outline,
.elementor-button.ccs-btn-outline {
  display: inline-block;
  background: transparent;
  color: var(--ccs-white) !important;
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 12px 28px;
  border: 2px solid var(--ccs-white);
  border-radius: 3px;
  cursor: pointer;
  transition: background 0.25s, color 0.25s;
}
.ccs-btn-outline:hover,
.elementor-button.ccs-btn-outline:hover {
  background: var(--ccs-white);
  color: var(--ccs-dark) !important;
}

/* =============================================
   ELEMENTOR HEADER (Theme Builder)
   Transparent overlay until scroll
   ============================================= */
/* The outer Elementor wrapper — transparent so .ccs-hdr (position:fixed inside)
   handles all nav visuals. The body background color provides the visual fill
   for inner pages at 0-scroll. */
.elementor-location-header {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 100;
  background: transparent;
}

/* All inner pages: body bg = #312f2b so transparent .ccs-hdr shows warm dark,
   matching the scrolled-state color exactly — no jarring shift on scroll.
   Homepage excluded (0 padding, hero image provides the bg). */
body:not(.elementor-page-21) {
  background-color: #312f2b;
}

/* CSS-level nav color — beats Elementor's inline style injection without needing JS.
   Homepage is excluded; homepage JS controls transparency + scroll fade.
   !important is required because Elementor's frontend JS sets style="" inline. */
body:not(.elementor-page-21) #ccs-header {
  background-color: #312f2b !important;
}

/* Legacy scrolled rule — kept for safety (no longer used by the HTML nav widget) */
.elementor-location-header.is-scrolled {
  position: fixed;
  background: transparent;
}

/* Phone number: prevent line wrapping */
.ccs-phone-nowrap .elementor-icon-list-text,
.ccs-phone-nowrap .elementor-icon-list-item {
  white-space: nowrap;
}

/* =============================================
   SOLUTION CARDS — hover lift + gold accent
   ============================================= */
.ccs-solution-card {
  position: relative;
  overflow: hidden;
  transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1),
              box-shadow 0.4s cubic-bezier(0.4, 0, 0.2, 1),
              border-color 0.4s ease;
}
.ccs-solution-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.4);
  border-color: rgba(253, 184, 19, 0.25);
}

/* Gold accent bar - slides in from left on hover */
.ccs-solution-card::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 3px;
  background: linear-gradient(90deg, var(--ccs-gold), #e78a38);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  border-radius: 0 0 12px 12px;
  z-index: 1;
}
.ccs-solution-card:hover::after {
  transform: scaleX(1);
}

/* Card text colors on dark background */
.ccs-solution-card .elementor-icon-box-title,
.ccs-solution-card .elementor-icon-box-title a {
  color: #fff !important;
  font-family: 'Montserrat', sans-serif;
  font-weight: 700;
  font-size: 18px;
}
.ccs-solution-card .elementor-icon-box-description {
  color: rgba(255, 255, 255, 0.6) !important;
  font-family: 'Open Sans', sans-serif;
  font-size: 14px;
  line-height: 1.7;
}
.ccs-solution-card .elementor-icon-box-icon .elementor-icon {
  color: var(--ccs-gold) !important;
}

/* Subtle gold glow on icon when card hovered */
.ccs-solution-card:hover .elementor-icon {
  filter: drop-shadow(0 0 8px rgba(253, 184, 19, 0.4));
  transition: filter 0.4s ease;
}

/* Section header white text on dark sections */
.ccs-services-section .elementor-heading-title {
  color: #fff;
}
.ccs-services-section .elementor-text-editor {
  color: rgba(255, 255, 255, 0.65);
}

/* =============================================
   SOLUTION IMAGE CARDS (floor-fade overlay)
   ============================================= */
.ccs-solution-image-card {
  transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1),
              box-shadow 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  cursor: pointer;
}
.ccs-solution-image-card:hover {
  transform: scale(1.03);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.25);
}

/* =============================================
   CONTAINER
   ============================================= */
.ccs-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}

/* =============================================
   SCROLL ANIMATION CLASSES
   Used by ccs-scripts.js IntersectionObserver
   ============================================= */
.ccs-animate {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}
.ccs-animate.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* =============================================
   CHYRON / LOGO TICKER
   Usage: Paste the HTML from chyron-widget.html
   into an Elementor HTML widget.
   ============================================= */
.ccs-chyron-wrap {
  overflow: hidden;
  width: 100%;
  padding: 28px 0;
  background: var(--ccs-white);
}

.ccs-chyron-track {
  display: flex;
  align-items: center;
  width: max-content;
  animation: ccs-scroll 35s linear infinite;
  will-change: transform;
}

.ccs-chyron-wrap:hover .ccs-chyron-track {
  animation-play-state: paused;
}

@keyframes ccs-scroll {
  0%   { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

.ccs-chyron-track img {
  height: 52px;
  width: auto;
  object-fit: contain;
  margin: 0 44px;
  filter: grayscale(100%);
  opacity: 0.65;
  transition: filter 0.3s ease, opacity 0.3s ease;
}

.ccs-chyron-track img:hover {
  filter: grayscale(0%);
  opacity: 1;
}

/* Chyron label (optional section above ticker) */
.ccs-chyron-label {
  text-align: center;
  font-family: var(--font-heading);
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: #999;
  margin-bottom: 16px;
}

/* =============================================
   SERVICE CARDS
   ============================================= */
.ccs-service-card {
  background: var(--ccs-white);
  border: 1px solid var(--ccs-border);
  border-radius: 4px;
  padding: 38px 28px 32px;
  text-align: center;
  position: relative;
  overflow: hidden;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

/* Gold bottom bar slides in on hover */
.ccs-service-card::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 3px;
  background: var(--ccs-gold);
  transform: scaleX(0);
  transform-origin: left center;
  transition: transform 0.3s ease;
}
.ccs-service-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 14px 44px rgba(0, 0, 0, 0.14);
}
.ccs-service-card:hover::after { transform: scaleX(1); }

.ccs-service-card .card-icon {
  width: 64px;
  height: 64px;
  margin: 0 auto 22px;
}

.ccs-service-card h3 {
  font-size: 16px;
  margin-bottom: 10px;
}

.ccs-service-card p {
  font-size: 14px;
  color: #777;
  line-height: 1.65;
  margin: 0;
}

/* =============================================
   TRUST / STAT BAR
   ============================================= */
.ccs-trust-bar {
  background: var(--ccs-dark);
  padding: 56px 0;
}

.ccs-stat-item {
  text-align: center;
}

/* Elementor Counter widget number */
.ccs-trust-bar .elementor-counter-number-wrapper {
  font-family: var(--font-heading);
  font-size: 52px;
  font-weight: 800;
  color: var(--ccs-gold);
  line-height: 1;
}

/* Elementor Counter widget title */
.ccs-trust-bar .elementor-counter-title {
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: rgba(255, 255, 255, 0.65);
  margin-top: 10px;
}

/* =============================================
   SECTION UTILITY CLASSES
   ============================================= */

/* Dark section (charcoal bg) */
.section-dark {
  background: var(--ccs-dark);
  color: var(--ccs-white);
}
.section-dark h2, .section-dark h3, .section-dark h4 {
  color: var(--ccs-white);
}

/* Light grey section */
.section-light {
  background: var(--ccs-light-bg);
}

/* Section title block */
.ccs-section-header {
  text-align: center;
  margin-bottom: 50px;
}

.ccs-section-header h2 {
  font-size: 34px;
  margin-bottom: 0;
}

/* Gold accent rule under section titles */
.ccs-title-rule {
  display: block;
  width: 48px;
  height: 3px;
  background: var(--ccs-gold);
  margin: 14px auto 18px;
}

.ccs-section-header p {
  font-size: 16px;
  color: #777;
  max-width: 580px;
  margin: 0 auto;
  line-height: 1.7;
}
.section-dark .ccs-section-header p {
  color: rgba(255, 255, 255, 0.65);
}

/* =============================================
   CTA BAR
   ============================================= */
.ccs-cta-bar {
  background: var(--ccs-dark);
  padding: 72px 0;
  text-align: center;
}

.ccs-cta-bar h2 {
  color: var(--ccs-white);
  font-size: 34px;
  margin-bottom: 26px;
}

/* =============================================
   HERO OVERLAY
   (Add class to Elementor section for a dark
    overlay on background images)
   ============================================= */
.ccs-hero-overlay::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to right,
    rgba(42, 42, 42, 0.88) 0%,
    rgba(42, 42, 42, 0.55) 60%,
    rgba(42, 42, 42, 0.25) 100%
  );
  z-index: 1;
}
.ccs-hero-overlay .elementor-container {
  position: relative;
  z-index: 2;
}

/* =============================================
   TESTIMONIALS
   ============================================= */
.ccs-testimonial blockquote {
  font-size: 17px;
  font-style: italic;
  color: var(--ccs-gray);
  line-height: 1.75;
  border: none;
  padding: 0;
  margin: 0 0 18px;
}

.ccs-testimonial blockquote::before {
  content: '\201C';
  font-size: 48px;
  color: var(--ccs-gold);
  line-height: 0;
  vertical-align: -18px;
  margin-right: 4px;
  font-family: Georgia, serif;
}

.ccs-testimonial-author {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--ccs-dark);
}

.ccs-testimonial-company {
  font-size: 13px;
  color: #999;
}

/* =============================================
   CASE STUDY SPLIT
   (Full-width section, image on one side)
   ============================================= */
.ccs-case-split-image {
  background-size: cover;
  background-position: center;
  min-height: 400px;
}

.ccs-case-split-content {
  padding: 60px 50px;
  background: var(--ccs-dark);
  color: var(--ccs-white);
}

.ccs-case-split-content h2 {
  color: var(--ccs-white);
  font-size: 28px;
  margin-bottom: 16px;
}

.ccs-case-split-content p {
  color: rgba(255, 255, 255, 0.75);
  line-height: 1.7;
}

/* =============================================
   ELEMENTOR FOOTER
   ============================================= */
.elementor-location-footer {
  background: var(--ccs-dark);
  width: 100% !important;
  max-width: none !important;
  margin: 0 !important;
}

.elementor-location-footer a {
  color: rgba(255, 255, 255, 0.65);
  text-decoration: none;
}
.elementor-location-footer a:hover { color: var(--ccs-gold); }

.elementor-location-footer h4 {
  color: var(--ccs-white);
  font-family: var(--font-heading);
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  margin-bottom: 18px;
}

.elementor-location-footer ul {
  list-style: none;
  padding: 0;
  margin: 0;
}
.elementor-location-footer ul li {
  margin-bottom: 8px;
  font-size: 14px;
  color: rgba(255, 255, 255, 0.65);
}

/* =============================================
   GOLD TAGLINE — READABILITY ON LIGHT BGS
   Gold (#fdb812) as text on white/light grey is
   too faint. This class forces the darker variant.
   Applied via css_classes in the build system.
   ============================================= */
.ccs-gold-on-light .elementor-heading-title {
  color: var(--ccs-gold-readable) !important;
}

/* =============================================
   PARALLAX — MOBILE FIX
   background-attachment: fixed doesn't work on
   iOS. Elementor's parallax JS can also cause
   jank on mobile. Disabled below 1024px.
   ============================================= */
@media (max-width: 1024px) {
  [data-settings*="parallax"],
  .ccs-parallax-bg {
    background-attachment: scroll !important;
  }
}

/* =============================================
   RESPONSIVE
   ============================================= */
@media (max-width: 1024px) {
  .ccs-section-header h2 { font-size: 28px; }
  .ccs-cta-bar h2         { font-size: 26px; }
  .ccs-case-split-content { padding: 40px 30px; }
}

@media (max-width: 768px) {
  .ccs-chyron-track img   { height: 38px; margin: 0 24px; }
  .ccs-trust-bar .elementor-counter-number-wrapper { font-size: 38px; }
  .ccs-section-header h2  { font-size: 24px; }
  .ccs-service-card       { padding: 28px 20px 24px; }
}

@media (max-width: 480px) {
  .ccs-btn-primary,
  .ccs-btn-outline { width: 100%; text-align: center; }
}

/* =============================================
   CONTACT INFO CARDS — hover lift
   ============================================= */
.ccs-contact-card {
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.ccs-contact-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 36px rgba(0, 0, 0, 0.1);
}

/* =============================================
   CONTACT FORM
   ============================================= */
.ccs-contact-form {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.ccs-form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

.ccs-form-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.ccs-form-field--full {
  grid-column: 1 / -1;
}

.ccs-contact-form label {
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--ccs-dark);
}

.ccs-contact-form input[type="text"],
.ccs-contact-form input[type="email"],
.ccs-contact-form input[type="tel"],
.ccs-contact-form select,
.ccs-contact-form textarea {
  font-family: var(--font-body);
  font-size: 14px;
  padding: 12px 14px;
  border: 2px solid var(--ccs-border);
  border-radius: 7px;
  background: #fafafa;
  color: var(--ccs-gray);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
  outline: none;
  width: 100%;
  box-sizing: border-box;
}

.ccs-contact-form input:focus,
.ccs-contact-form select:focus,
.ccs-contact-form textarea:focus {
  border-color: var(--ccs-gold);
  box-shadow: 0 0 0 3px rgba(253, 184, 18, 0.15);
  background: var(--ccs-white);
}

.ccs-contact-form textarea {
  resize: vertical;
  min-height: 100px;
}

.ccs-contact-form select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%233a3a3a' stroke-width='2' fill='none'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  padding-right: 36px;
  cursor: pointer;
}

/* Checkbox / radio groups */
.ccs-form-group {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.ccs-form-group-label {
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--ccs-dark);
}

.ccs-form-checkboxes {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 8px 16px;
}

.ccs-form-checkboxes label,
.ccs-form-radios label {
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 400;
  text-transform: none;
  letter-spacing: 0;
  color: var(--ccs-gray);
  display: flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
}

.ccs-form-checkboxes input,
.ccs-form-radios input {
  accent-color: var(--ccs-gold);
  width: 16px;
  height: 16px;
  cursor: pointer;
}

.ccs-form-radios {
  display: flex;
  gap: 24px;
}

/* Required / optional field labels */
.ccs-contact-form .req { color: var(--ccs-red); font-weight: 400; }
.ccs-contact-form .opt { color: #666; font-weight: 400; text-transform: none; letter-spacing: 0; font-size: 11px; } /* #999 = 2.85:1, fails AA — #666 = 5.74:1 */

/* Submit button — specificity 0,2,1 beats reset.css [type="submit"] at 0,1,0 */
.ccs-contact-form button.ccs-form-submit {
  display: inline-block;
  background: var(--ccs-gold);
  color: var(--ccs-dark);
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 14px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 15px 40px;
  border: none;
  border-radius: 7px;
  cursor: pointer;
  transition: background 0.25s, transform 0.2s, box-shadow 0.2s;
  align-self: flex-start;
}
.ccs-contact-form button.ccs-form-submit:hover {
  background: var(--ccs-dark);
  color: var(--ccs-white);
  transform: translateY(-1px);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
}

/* Responsive form adjustments */
@media (max-width: 768px) {
  .ccs-form-row {
    grid-template-columns: 1fr;
  }
  .ccs-form-checkboxes {
    grid-template-columns: 1fr 1fr;
  }
  .ccs-form-submit {
    width: 100%;
    text-align: center;
  }
}

@media (max-width: 480px) {
  .ccs-form-checkboxes {
    grid-template-columns: 1fr;
  }
}

/* ─── Contact Trust Block ──────────────────────────────────────────────── */
.ccs-contact-trust {
  margin-top: 28px;
  padding-top: 24px;
  border-top: 1px solid #e0e0e0;
}

.ccs-contact-trust__phone {
  display: flex;
  flex-direction: column;
  margin-bottom: 20px;
}

.ccs-contact-trust__phone a {
  font-family: 'Norwester', sans-serif;
  font-size: 24px;
  color: #312f2b;
  text-decoration: none;
  line-height: 1.2;
}

.ccs-contact-trust__phone a:hover {
  color: #FDB813;
}

.ccs-contact-trust__phone span {
  font-family: 'Outfit', sans-serif;
  font-size: 13px;
  color: #666; /* #888 = 3.54:1 on white, fails WCAG AA — #666 = 5.74:1 */
  margin-top: 3px;
}

.ccs-contact-trust__list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.ccs-contact-trust__list li {
  font-family: 'Outfit', sans-serif;
  font-size: 15px;
  color: #3a3a3a;
  display: flex;
  align-items: center;
  gap: 10px;
}

.ccs-contact-trust__list li::before {
  content: '✓';
  font-family: 'Outfit', sans-serif;
  font-size: 14px;
  font-weight: 700;
  color: #FDB813;
  flex-shrink: 0;
}
