/*
Theme Name:   Codehelix Child
Theme URI:    https://codehelix.io
Author:       Codehelix
Author URI:   https://codehelix.io
Description:  Whitelabel child theme for Codehelix
Template:     hello-elementor
Version:      1.0.0
*/

/* ==========================================================================
   Table of Contents
   ==========================================================================
   0.  Design Tokens (Brand Colours)
   1.  Header & Navigation
   2.  Forms
   3.  Pages & Layouts
   4.  Blog/Posts
   5.  Search
   6.  Buttons & Icons
   7.  Typography
   8.  Animations
   9.  WooCommerce
   10. 404/Error Pages
   11. Footer
   ========================================================================== */

/* ==========================================================================
   0. Design Tokens (Brand Colours)
   ========================================================================== */
:root {
  --color-light-blue:       #6DC2FF;
  --color-blue:             #0068B1;
  --color-darker-blue:      #0A4F80;
  --color-light-grey:       #D9D9D9;
  --color-background-grey:  #F5F5F5;
  --color-text-grey:        #838383;
  --color-dark-grey:        #434142;
}

/* ==========================================================================
   Desktop Styles (Base)
   ========================================================================== */

/* ---------------------------------------------------------------------------
   1. Header & Navigation
   --------------------------------------------------------------------------- */

/* Sticky topheader: shrinks once Elementor Pro's Effects Offset (100px)
   has been crossed. Pro adds .elementor-sticky--effects to the container at
   that threshold; we drive the size, badge scale, and the scrolled-state
   gradient off it. At rest the topheader has no background (gradient was
   removed in Elementor because it was bleeding into sections below). */
.topheader {
  min-height: 90px;
  transition: min-height 250ms ease;
}

/* Scrolled state: force the strip down to 60px and paint the gradient
   (dark blue at top fading to transparent at bottom). `height` (not just
   min-height) is needed because the topheader at rest sizes to its
   content (~151px) and min-height alone wouldn't shrink it. overflow:
   visible keeps the badge's natural overhang below the strip. */
.topheader.elementor-sticky--effects {
  min-height: 100px;
  height: 100px;
  overflow: visible;
  background: linear-gradient(
    to top,
    rgba(217, 217, 217, 0) 0%,
    rgba(83, 127, 159, 0.65) 35%,
    rgba(10, 79, 128, 1) 100%
  ) !important;
}

/* The logo "badge" (.logoflexbox = white tile + curved bottom + image inside)
   scales as one unit. transform-origin: top left keeps it anchored to the
   same position when shrinking. */
.topheader .logoflexbox {
  transform-origin: top left;
  transition: transform 250ms ease;
  will-change: transform;
}

.topheader.elementor-sticky--effects .logoflexbox {
  transform: scale(0.66);
}

/* Main menu links: short underline accent on hover (excludes contact button) */
.mainmenu .elementor-nav-menu--main .elementor-nav-menu > li:not(.contact) > .elementor-item {
  position: relative;
}

.mainmenu .elementor-nav-menu--main .elementor-nav-menu > li:not(.contact) > .elementor-item::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: 0;
  width: 30px;
  height: 3px;
  background-color: var(--color-light-grey);
  transform: translateX(-50%);
  opacity: 0;
  transition: opacity 200ms ease;
  pointer-events: none;
}

.mainmenu .elementor-nav-menu--main .elementor-nav-menu > li:not(.contact) > .elementor-item:hover::after,
.mainmenu .elementor-nav-menu--main .elementor-nav-menu > li:not(.contact) > .elementor-item:focus-visible::after {
  opacity: 1;
}

/* Contact menu item: pill-outline button with chevron.
   Chevron is rendered via background-image on the link itself rather than
   a ::after pseudo, so Elementor's own ::before/::after hover-indicator
   rules can't interfere. Right-side padding leaves room for the icon. */
.mainmenu .elementor-nav-menu--main .contact > .elementor-item {
  display: inline-block;
  padding: 12px 52px 12px 28px;
  border: 2px solid #fff;
  border-radius: 999px;
  color: #fff;
  background-color: transparent;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='11' height='16' viewBox='0 0 11 16' fill='none' stroke='%23ffffff' stroke-width='2.5' stroke-linecap='square' stroke-linejoin='miter'><polyline points='2 2 9 8 2 14'/></svg>");
  background-repeat: no-repeat;
  background-position: right 22px center;
  background-size: 11px 16px;
  text-transform: uppercase;
  letter-spacing: 1px;
  text-decoration: none;
  transition: background-color 200ms ease, color 200ms ease;
}

/* Suppress Elementor's hover-indicator pseudo-elements on this button */
.mainmenu .elementor-nav-menu--main .contact > .elementor-item::before,
.mainmenu .elementor-nav-menu--main .contact > .elementor-item::after {
  content: none !important;
  display: none !important;
}

/* Hover/focus: invert fill + text and swap chevron to blue */
.mainmenu .elementor-nav-menu--main .contact > .elementor-item:hover,
.mainmenu .elementor-nav-menu--main .contact > .elementor-item:focus-visible {
  background-color: #fff;
  color: var(--color-blue);
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='11' height='16' viewBox='0 0 11 16' fill='none' stroke='%230068B1' stroke-width='2.5' stroke-linecap='square' stroke-linejoin='miter'><polyline points='2 2 9 8 2 14'/></svg>");
}

/* ---------------------------------------------------------------------------
   2. Forms
   --------------------------------------------------------------------------- */

/* ---------------------------------------------------------------------------
   3. Pages & Layouts
   --------------------------------------------------------------------------- */

/* Decorative dot grid anchored to the top-right of any .dotty container,
   designed to render BEHIND the surrounding section's light-grey
   background. Recreates assets/dotty.svg (12-col x 6-row grid of #C4C4C4
   dots, ~5.8px diameter on 18.24x17.66 spacing, total 207x95) via a
   single CSS radial-gradient — no inlined SVG.

   Stacking trick: NO isolation/stacking-context on .dotty (or its
   ancestors up to a stacking-contexted one), and z-index: -1 on the
   pseudo. The negative z-index lets the pseudo escape .dotty's box and
   render before ancestor backgrounds — including the section's grey —
   so the dots appear "underneath" that grey wherever they overlap and
   only show where the grey doesn't cover.

   Selector is .dotty.e-con::before (not just .dotty::before) to outrank
   Elementor's own .e-con::before rule (background-overlay machinery)
   which would otherwise stretch this pseudo to 100% width/height and
   suppress its content via an unset CSS custom property. */
.dotty {
  position: relative;
}

.dotty.e-con::before {
  content: "";
  display: block;
  position: absolute;
  top: -42px;
  right: -63px;
  left: auto;
  width: 207px;
  height: 95px;
  background-image: radial-gradient(circle at 2.9px 2.9px, #C4C4C4 2.9px, transparent 3px);
  background-size: 18.24px 17.66px;
  background-repeat: repeat;
  opacity: 1;
  pointer-events: none;
  z-index: -1;
}

/* ---------------------------------------------------------------------------
   4. Blog/Posts
   --------------------------------------------------------------------------- */

/* ---------------------------------------------------------------------------
   5. Search
   --------------------------------------------------------------------------- */

/* ---------------------------------------------------------------------------
   6. Buttons & Icons
   --------------------------------------------------------------------------- */


/* ---------------------------------------------------------------------------
   7. Typography
   --------------------------------------------------------------------------- */

/* Top-left angle bracket accent above any element tagged .lefttopangle.
   Inline SVG mirrors assets/angle-top-left.svg (path stroked with the
   brand dark-grey #434142). Sits as a block ::before so the heading
   below it stays on its own line. */
.lefttopangle::before {
  content: "";
  display: block;
  width: 22px;
  height: 22px;
  
  background: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none'><path d='M2 24V2H24' stroke='%23434142' stroke-width='4'/></svg>") no-repeat left center / contain;
}

/* White variant: same bracket, white stroke for use on dark backgrounds. */
.lefttopanglewhite::before {
  content: "";
  display: block;
  width: 22px;
  height: 22px;

  background: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none'><path d='M2 24V2H24' stroke='%23ffffff' stroke-width='4'/></svg>") no-repeat left center / contain;
}

/* Tighten the heading's line-height/margins so the visual gap above the
   cap-line matches the ::before's margin-bottom. Default heading
   line-height pads the top of the box and eats most of the gap. */
.lefttopangle .elementor-heading-title,
.lefttopanglewhite .elementor-heading-title {
  line-height: 1;
  margin-top: 0;
  margin-left: 30px;
}

/* ---------------------------------------------------------------------------
   8. Animations
   --------------------------------------------------------------------------- */

/* ---------------------------------------------------------------------------
   9. WooCommerce
   --------------------------------------------------------------------------- */

/* ---------------------------------------------------------------------------
   10. 404/Error Pages
   --------------------------------------------------------------------------- */

/* ---------------------------------------------------------------------------
   11. Footer
   --------------------------------------------------------------------------- */

/* ==========================================================================
   Responsive Styles
   ========================================================================== */

/* ---------------------------------------------------------------------------
   Mobile (max-width: 767px)
   --------------------------------------------------------------------------- */
@media (max-width: 767px) {
  /* 1. Header & Navigation */

  /* 2. Forms */

  /* 3. Pages & Layouts */

  /* 4. Blog/Posts */

  /* 5. Search */

  /* 6. Buttons & Icons */

  /* 7. Typography */

  /* 8. Animations */

  /* 9. WooCommerce */

  /* 10. 404/Error Pages */

  /* 11. Footer */
}

/* ---------------------------------------------------------------------------
   Tablet (768px - 1024px)
   --------------------------------------------------------------------------- */
@media (min-width: 768px) and (max-width: 1024px) {
  /* 1. Header & Navigation */

  /* 2. Forms */

  /* 3. Pages & Layouts */

  /* 4. Blog/Posts */

  /* 5. Search */

  /* 6. Buttons & Icons */

  /* 7. Typography */

  /* 8. Animations */

  /* 9. WooCommerce */

  /* 10. 404/Error Pages */

  /* 11. Footer */
}

/* ---------------------------------------------------------------------------
   Large Tablet / Small Desktop (1025px - 1199px)
   --------------------------------------------------------------------------- */
@media (min-width: 1025px) and (max-width: 1199px) {
  /* 1. Header & Navigation */

  /* 2. Forms */

  /* 3. Pages & Layouts */

  /* 4. Blog/Posts */

  /* 5. Search */

  /* 6. Buttons & Icons */

  /* 7. Typography */

  /* 8. Animations */

  /* 9. WooCommerce */

  /* 10. 404/Error Pages */

  /* 11. Footer */
}

/* ---------------------------------------------------------------------------
   Large Desktop (1200px and up)
   --------------------------------------------------------------------------- */
@media (min-width: 1200px) {
  /* 1. Header & Navigation */

  /* 2. Forms */

  /* 3. Pages & Layouts */

  /* 4. Blog/Posts */

  /* 5. Search */

  /* 6. Buttons & Icons */

  /* 7. Typography */

  /* 8. Animations */

  /* 9. WooCommerce */

  /* 10. 404/Error Pages */

  /* 11. Footer */
}
