/*
Theme Name: GeneratePress Child
Template: generatepress
Version: 1.0
*/

/* =========================
   GLOBAL DESIGN SYSTEM
   ========================= */

:root{

  /* Layout – desktop defaults (≥1280px) */
  --dfl-rail-max: 1280px;
  --dfl-rail-pad: 24px;

  /* Spacing scale (single post + consistent rhythm) */
  --dfl-space-8: 8px;
  --dfl-space-12: 12px;
  --dfl-space-16: 16px;
  --dfl-space-24: 24px;
  --dfl-space-32: 32px;
  --dfl-heading-font: din-2014, "Helvetica Neue", Helvetica, Arial, sans-serif;
  --dfl-red:   #E74C3C;
  --dfl-blue:  #2980B9;
  --dfl-dark:  #1C1917;
  --dfl-white: #FFFFFF;
  --dfl-black: #000000;
  --dfl-bg: var(--dfl-white);
  --dfl-text: var(--dfl-dark);
  --dfl-link: var(--dfl-blue);
  --dfl-accent: var(--dfl-red);
  --contrast: var(--dfl-dark);
  --contrast-2: var(--dfl-black);
  --base: var(--dfl-white);
  --accent: var(--dfl-red);
}

/* Header: sticky on scroll (full header, not inner container), align logo with content */
.site-header{
  position: sticky;
  top: 0;
  z-index: 100;
  width: 100%;
  /* Override GP grid-container so full header sticks edge-to-edge */
  max-width: none;
  border-bottom: 1px solid var(--dfl-red);
  box-shadow: 0 6px 24px rgba(28, 25, 23, 0.25);
}
.site-header .inside-header{
  max-width: var(--dfl-rail-max);
  margin: 0 auto;
  padding-left: var(--dfl-rail-pad);
  padding-right: var(--dfl-rail-pad);
}

/* Sign In button: header, right of nav */
.dfl-signin-btn{
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 8px 18px;
  background-color: var(--dfl-red);
  color: var(--dfl-white);
  font-size: 14px;
  font-weight: 500;
  text-decoration: none;
  border-radius: 4px;
  border: 1px solid var(--dfl-black);
  transition: background-color 0.2s ease, border-color 0.2s ease;
  margin-right: 20px;
}

.dfl-signin-btn:hover{
  background-color: var(--dfl-blue);
  color: var(--dfl-white);
  border-color: var(--dfl-black);
}

/* Mobile: show Sign In in overlay (below menu links) */
@media (max-width: 768px){
  .site-header .dfl-signin-btn{
    display: none;
  }

  #site-navigation.toggled .dfl-signin-btn{
    display: inline-flex;
    margin-top: 24px;
    margin-left: 0;
    min-height: 48px;
    -webkit-tap-highlight-color: transparent;
  }
}

/* Remove gap between header and content (all pages) */
.separate-containers .site-main{
  margin-top: 0;
}

/* Generic rail utility you can reuse */
.dfl-rail{
  width: 100%;
  max-width: var(--dfl-rail-max);
  margin-left: auto;
  margin-right: auto;
  padding-left: var(--dfl-rail-pad);
  padding-right: var(--dfl-rail-pad);
}

/* =========================
   GLOBAL BASE STYLES
   ========================= */

body{
  font-family: 'Poppins', sans-serif;
  background: var(--dfl-bg);
  color: var(--dfl-text);
  font-weight: 400;
}

/* Headings */
h1, h2, h3, h4, h5, h6{
  font-family: 'Inter', sans-serif;
  font-weight: 500;
  color: var(--dfl-black);
  letter-spacing: -0.015em;
}

h2{
  font-size: 19px;
}

/* Links */
a{
  color: var(--dfl-link);
  text-decoration: none;
  transition: color .2s ease;
}

a:hover{
  color: var(--dfl-accent);
}

/* Tablet: proportional scaling */
@media (max-width: 1024px){
  :root{
    --dfl-rail-pad: 20px;
  }

  h2{
    font-size: 19px;
  }
}

/* Mobile */
@media (max-width: 768px){
  :root{
    --dfl-rail-pad: 16px;
  }

  h2{
    font-size: 15px;
  }
}

/* =========================
   MOBILE MENU: FULLSCREEN OVERLAY
   ========================= */

/* Scroll lock when overlay is open */
@media (max-width: 768px){
  html.mobile-menu-open{
    overflow: hidden;
  }
}

/* Fullscreen overlay at 768px */
@media (max-width: 768px){
  /* Overlay container */
  #site-navigation.toggled{
    position: fixed;
    inset: 0;
    z-index: 999999;
    display: flex !important;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: rgba(28, 25, 23, 0.95);
    padding: 24px;
    overflow-y: auto;
  }

  #site-navigation.toggled .inside-navigation{
    display: flex !important;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 100%;
    max-width: 320px;
    position: relative;
  }

  /* Hide default GP menu-toggle in overlay; use our close button */
  #site-navigation.toggled .menu-toggle:not(.dfl-mobile-close){
    display: none !important;
  }

  /* Close button: hidden until overlay is open, 48px min touch target */
  .dfl-mobile-close{
    display: none !important;
  }

  #site-navigation.toggled .dfl-mobile-close{
    display: flex !important;
    position: absolute;
    top: 0;
    right: 0;
    min-width: 48px;
    min-height: 48px;
    padding: 0;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: none;
    color: var(--dfl-white);
    cursor: pointer;
    font-size: 24px;
    line-height: 1;
    -webkit-tap-highlight-color: transparent;
  }

  #site-navigation.toggled .dfl-mobile-close:hover,
  #site-navigation.toggled .dfl-mobile-close:focus{
    color: var(--dfl-white);
    opacity: 0.85;
  }

  /* Menu list: centered, stacked */
  #site-navigation.toggled .main-nav > ul{
    display: flex !important;
    flex-direction: column;
    align-items: center;
    gap: 0;
    width: 100%;
    text-align: center;
  }

  /* Menu links: 48px min touch target */
  #site-navigation.toggled .main-nav ul li a{
    display: block;
    min-height: 48px;
    padding: 14px 20px;
    color: var(--dfl-white);
    font-size: 18px;
    font-weight: 500;
    -webkit-tap-highlight-color: transparent;
  }

  #site-navigation.toggled .main-nav ul li a:hover,
  #site-navigation.toggled .main-nav ul li a:focus{
    color: var(--dfl-white);
    opacity: 0.9;
    text-decoration: none;
  }

  /* Sub-menus in overlay */
  #site-navigation.toggled .main-nav ul ul{
    padding-left: 0;
    margin-top: 0;
  }

  #site-navigation.toggled .main-nav ul ul li a{
    font-size: 16px;
    padding-left: 32px;
  }

  /* Hamburger button: 48px min touch target */
  .menu-toggle,
  #mobile-menu-control-wrapper .menu-toggle{
    min-width: 48px;
    min-height: 48px;
    padding: 0 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    -webkit-tap-highlight-color: transparent;
  }

}

