/*
Theme Name: YouthPlug
Theme URI: https://youthplug.co.za
Author: YouthPlug (Pty) Ltd
Author URI: https://youthplug.co.za
Description: A modern, lightweight, Elementor-ready WordPress theme for YouthPlug (Pty) Ltd – South African technology company. Fully editable with Elementor (header, footer, all pages and sections). Built for conversion, performance and easy content management.
Version: 1.8.0
Requires at least: 6.0
Tested up to: 6.7
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: youthplug
Tags: elementor, custom-logo, custom-menu, featured-images, full-width-template, theme-options, translation-ready, blog, portfolio, technology
*/

/* ==========================================================================
   YouthPlug Theme – Base Styles
   Designed as a clean canvas for Elementor.
   Brand colours and typography are also registered in the Customizer
   and can be overridden by Elementor Global Styles.
   ========================================================================== */

:root {
  --yp-primary: #101828;
  --yp-secondary: #2563EB;
  --yp-accent: #06B6D4;
  --yp-bg: #FFFFFF;
  --yp-bg-light: #F5F7FA;
  --yp-text: #172033;
  --yp-muted: #667085;
  --yp-white: #FFFFFF;
  --yp-radius: 8px;
  --yp-shadow: 0 4px 20px rgba(16, 24, 40, 0.08);
  --yp-transition: 0.25s ease;
}

/* Reset & base */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: 16px;
  line-height: 1.6;
  color: var(--yp-text);
  background-color: var(--yp-bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

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

a {
  color: var(--yp-secondary);
  text-decoration: none;
  transition: color var(--yp-transition);
}

a:hover,
a:focus {
  color: var(--yp-accent);
}

/* Accessibility */
.screen-reader-text {
  border: 0;
  clip: rect(1px, 1px, 1px, 1px);
  clip-path: inset(50%);
  height: 1px;
  margin: -1px;
  overflow: hidden;
  padding: 0;
  position: absolute;
  width: 1px;
  word-wrap: normal !important;
}

.screen-reader-text:focus {
  background-color: #f1f1f1;
  border-radius: 3px;
  box-shadow: 0 0 2px 2px rgba(0, 0, 0, 0.6);
  clip: auto !important;
  clip-path: none;
  color: #21759b;
  display: block;
  font-size: 0.875rem;
  font-weight: 700;
  height: auto;
  left: 5px;
  line-height: normal;
  padding: 15px 23px 14px;
  text-decoration: none;
  top: 5px;
  width: auto;
  z-index: 100000;
}

/* Focus states */
:focus-visible {
  outline: 2px solid var(--yp-secondary);
  outline-offset: 2px;
}

/* Skip link */
.skip-link {
  position: absolute;
  top: -100px;
  left: 0;
  background: var(--yp-primary);
  color: var(--yp-white);
  padding: 0.75rem 1.25rem;
  z-index: 100000;
  transition: top 0.2s;
}

.skip-link:focus {
  top: 0;
}

/* Typography helpers (used when Elementor is not active) */
h1, h2, h3, h4, h5, h6 {
  color: var(--yp-primary);
  font-weight: 700;
  line-height: 1.25;
  margin-top: 0;
}

/* Layout helpers */
.yp-container {
  width: 100%;
  max-width: 1200px;
  margin-left: auto;
  margin-right: auto;
  padding-left: 1.25rem;
  padding-right: 1.25rem;
}

.yp-section {
  padding: 4rem 0;
}

/* Header (fallback when Elementor Theme Builder is not used) */
.site-header {
  background: var(--yp-white);
  border-bottom: 1px solid #E4E7EC;
  position: sticky;
  top: 0;
  z-index: 1000;
}

.site-header .yp-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 72px;
  gap: 1.5rem;
}

.site-branding {
  flex-shrink: 0;
}

.site-title {
  margin: 0;
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--yp-primary);
}

.site-title a {
  color: inherit;
  text-decoration: none;
}

.custom-logo-link img {
  max-height: 48px;
  width: auto;
}

/* Navigation */
.main-navigation ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

.main-navigation a {
  display: block;
  padding: 0.5rem 0.85rem;
  color: var(--yp-text);
  font-weight: 500;
  font-size: 0.95rem;
  border-radius: 6px;
  transition: background var(--yp-transition), color var(--yp-transition);
}

.main-navigation a:hover,
.main-navigation a:focus,
.main-navigation .current-menu-item > a {
  color: var(--yp-secondary);
  background: rgba(37, 99, 235, 0.06);
}

/* Dropdown */
.main-navigation .sub-menu {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  min-width: 220px;
  background: var(--yp-white);
  border: 1px solid #E4E7EC;
  border-radius: var(--yp-radius);
  box-shadow: var(--yp-shadow);
  padding: 0.5rem 0;
  z-index: 100;
}

.main-navigation li {
  position: relative;
}

.main-navigation li:hover > .sub-menu,
.main-navigation li:focus-within > .sub-menu {
  display: block;
}

.main-navigation .sub-menu a {
  padding: 0.6rem 1.1rem;
  white-space: nowrap;
}

/* CTA button in nav */
.main-navigation .menu-item-cta a,
.yp-btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.65rem 1.35rem;
  background: var(--yp-secondary);
  color: var(--yp-white) !important;
  font-weight: 600;
  border-radius: 8px;
  border: none;
  cursor: pointer;
  transition: background var(--yp-transition), transform 0.15s;
}

.main-navigation .menu-item-cta a:hover,
.yp-btn-primary:hover {
  background: #1D4ED8;
  color: var(--yp-white) !important;
}

.yp-btn-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.65rem 1.35rem;
  background: transparent;
  color: var(--yp-secondary);
  font-weight: 600;
  border: 2px solid var(--yp-secondary);
  border-radius: 8px;
  transition: background var(--yp-transition), color var(--yp-transition);
}

.yp-btn-secondary:hover {
  background: var(--yp-secondary);
  color: var(--yp-white);
}

/* Mobile menu toggle */
.menu-toggle {
  display: none;
  background: none;
  border: none;
  padding: 0.5rem;
  cursor: pointer;
  color: var(--yp-primary);
}

.menu-toggle svg {
  width: 28px;
  height: 28px;
}

/* Mobile navigation */
@media (max-width: 991px) {
  .menu-toggle {
    display: block;
  }

  .main-navigation {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--yp-white);
    border-bottom: 1px solid #E4E7EC;
    padding: 1rem;
    box-shadow: var(--yp-shadow);
  }

  .main-navigation.toggled {
    display: block;
  }

  .main-navigation ul {
    flex-direction: column;
    align-items: stretch;
  }

  .main-navigation .sub-menu {
    position: static;
    display: none;
    box-shadow: none;
    border: none;
    padding-left: 1rem;
  }

  .main-navigation li:hover > .sub-menu,
  .main-navigation li.submenu-open > .sub-menu {
    display: block;
  }
}

/* Content area */
.site-main {
  min-height: 50vh;
}

/* Footer (fallback) */
.site-footer {
  background: var(--yp-primary);
  color: #D0D5DD;
  padding: 4rem 0 2rem;
}

.site-footer a {
  color: #D0D5DD;
}

.site-footer a:hover {
  color: var(--yp-accent);
}

.footer-widgets {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 2.5rem;
  margin-bottom: 3rem;
}

.footer-widgets h3,
.footer-widgets h4 {
  color: var(--yp-white);
  font-size: 1rem;
  margin-bottom: 1rem;
}

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding-top: 1.5rem;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 1rem;
  font-size: 0.9rem;
}

/* Elementor canvas / full-width support */
.elementor-page .site-header,
.elementor-page .site-footer,
.page-template-elementor-canvas .site-header,
.page-template-elementor-canvas .site-footer,
.page-template-elementor-full-width .site-header,
.page-template-elementor-full-width .site-footer {
  /* These can still show if Theme Builder is not used.
     When Elementor Theme Builder header/footer is active they are replaced. */
}

body.elementor-page .site-main,
.page-template-elementor-canvas .site-main,
.page-template-elementor-full-width .site-main {
  padding: 0;
}

/* Blog / archive fallback styles */
.entry-title {
  margin-bottom: 0.5rem;
}

.entry-meta {
  color: var(--yp-muted);
  font-size: 0.9rem;
  margin-bottom: 1rem;
}

.post-thumbnail {
  margin-bottom: 1.5rem;
  border-radius: var(--yp-radius);
  overflow: hidden;
}

/* 404 */
.error-404 {
  text-align: center;
  padding: 6rem 1.25rem;
}

.error-404 h1 {
  font-size: clamp(2.5rem, 6vw, 4rem);
  margin-bottom: 1rem;
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* Print */
@media print {
  .site-header,
  .site-footer,
  .menu-toggle {
    display: none;
  }
}

/* ========== Page Hero (About, Contact, Quote, Services) ========== */
.yp-page-hero {
  background: linear-gradient(135deg, #F5F7FA 0%, #EEF2FF 100%);
  padding: 4rem 0 3rem;
  text-align: center;
}
.yp-page-hero h1 {
  font-size: clamp(1.9rem, 4vw, 2.6rem);
  margin: 0 0 0.75rem;
}
.yp-page-lead {
  font-size: 1.15rem;
  color: var(--yp-muted);
  max-width: 600px;
  margin: 0 auto;
}

.yp-content-narrow {
  max-width: 720px;
  margin-left: auto;
  margin-right: auto;
}
.yp-content-narrow h2 {
  margin-top: 2.5rem;
  margin-bottom: 0.75rem;
  font-size: 1.4rem;
}
.yp-content-narrow p {
  color: var(--yp-text);
  line-height: 1.7;
}
.yp-values-list {
  padding-left: 1.25rem;
  line-height: 1.8;
}
.yp-values-list li {
  margin-bottom: 0.6rem;
}

/* Contact grid */
.yp-contact-grid {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 3rem;
  align-items: start;
}
.yp-contact-info h2,
.yp-contact-form-area h2 {
  font-size: 1.3rem;
  margin-bottom: 1.25rem;
}
.yp-response-note {
  margin-top: 1.5rem;
  padding: 1rem;
  background: var(--yp-bg-light);
  border-radius: 8px;
  font-size: 0.9rem;
  color: var(--yp-muted);
}
.yp-form-placeholder {
  background: var(--yp-bg-light);
  border: 2px dashed #D0D5DD;
  border-radius: 10px;
  padding: 2rem;
  min-height: 200px;
}
.yp-form-hint {
  color: var(--yp-muted);
  margin: 0;
  text-align: center;
}
.yp-quote-fields {
  background: var(--yp-bg-light);
  border-radius: 8px;
  padding: 1.25rem 1.25rem 1.25rem 2.25rem;
  margin: 1.5rem 0;
}
.yp-quote-fields li {
  margin-bottom: 0.4rem;
}

@media (max-width: 768px) {
  .yp-contact-grid {
    grid-template-columns: 1fr;
  }
}

/* Ensure buttons work on inner pages */
.yp-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.85rem 1.6rem;
  font-weight: 600;
  font-size: 0.95rem;
  border-radius: 8px;
  border: 2px solid transparent;
  text-decoration: none;
  transition: background 0.2s, color 0.2s, border-color 0.2s;
  cursor: pointer;
}
.yp-btn-primary {
  background: var(--yp-secondary);
  color: #fff !important;
  border-color: var(--yp-secondary);
}
.yp-btn-primary:hover {
  background: #1D4ED8;
  border-color: #1D4ED8;
  color: #fff !important;
}
.yp-btn-outline {
  background: transparent;
  color: var(--yp-secondary) !important;
  border-color: var(--yp-secondary);
}
.yp-btn-outline:hover {
  background: var(--yp-secondary);
  color: #fff !important;
}
.yp-eyebrow {
  display: inline-block;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--yp-secondary);
  margin: 0 0 0.75rem;
}
.yp-section-cta {
  text-align: center;
  margin-top: 2.5rem;
}

/* ========== Portfolio cards ========== */
.yp-portfolio-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}
.yp-portfolio-card {
  background: #fff;
  border: 1px solid #E4E7EC;
  border-radius: 12px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: box-shadow 0.2s, transform 0.2s;
}
.yp-portfolio-card:hover {
  box-shadow: 0 12px 32px rgba(16, 24, 40, 0.1);
  transform: translateY(-3px);
}
.yp-portfolio-thumb {
  position: relative;
  height: 200px;
  background: linear-gradient(135deg, #101828, #2563EB);
  overflow: hidden;
}
.yp-portfolio-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.yp-portfolio-thumb-placeholder {
  display: block;
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, #101828, #2563EB);
}
.yp-portfolio-badge {
  position: absolute;
  top: 12px;
  left: 12px;
  background: rgba(255,255,255,0.95);
  color: #101828;
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 0.3rem 0.65rem;
  border-radius: 6px;
}
.yp-portfolio-body {
  padding: 1.25rem 1.35rem 1.4rem;
  display: flex;
  flex-direction: column;
  flex: 1;
}
.yp-portfolio-title {
  font-size: 1.1rem;
  margin: 0 0 0.4rem;
  line-height: 1.3;
}
.yp-portfolio-title a {
  color: #101828;
  text-decoration: none;
}
.yp-portfolio-title a:hover {
  color: #2563EB;
}
.yp-portfolio-excerpt {
  font-size: 0.9rem;
  color: #667085;
  margin: 0 0 0.9rem;
  flex: 1;
}
.yp-portfolio-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-bottom: 1rem;
}
.yp-chip {
  font-size: 0.72rem;
  font-weight: 600;
  padding: 0.2rem 0.55rem;
  border-radius: 4px;
  background: #EEF2FF;
  color: #2563EB;
}
.yp-chip-own {
  background: #ECFDF5;
  color: #065F46;
}
.yp-chip-client {
  background: #FEF3C7;
  color: #92400E;
}
.yp-chip-demo {
  background: #F3F4F6;
  color: #4B5563;
}
.yp-portfolio-actions {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin-top: auto;
}
.yp-portfolio-actions .yp-btn {
  font-size: 0.85rem;
  padding: 0.55rem 1rem;
}
.yp-portfolio-empty {
  text-align: center;
  color: #667085;
  padding: 2rem;
}

@media (max-width: 900px) {
  .yp-portfolio-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}
@media (max-width: 560px) {
  .yp-portfolio-grid {
    grid-template-columns: 1fr;
  }
}

/* ========== Team ========== */
.yp-team-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.75rem;
}
.yp-team-card {
  background: #fff;
  border: 1px solid #E4E7EC;
  border-radius: 14px;
  overflow: hidden;
  text-align: center;
  transition: box-shadow 0.2s, transform 0.2s;
}
.yp-team-card:hover {
  box-shadow: 0 12px 32px rgba(16, 24, 40, 0.1);
  transform: translateY(-3px);
}
.yp-team-photo {
  min-height: 220px;
  max-height: 320px;
  background: #F5F7FA;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}
.yp-team-photo img {
  width: 100%;
  height: auto;
  max-height: 320px;
  object-fit: contain;
  object-position: center;
  display: block;
}
.yp-team-photo-placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 220px;
  background: linear-gradient(135deg, #101828, #2563EB);
  font-size: 3rem;
  font-weight: 700;
  color: rgba(255,255,255,0.85);
}
.yp-team-body {
  padding: 1.35rem 1.25rem 1.5rem;
}
.yp-team-name {
  margin: 0 0 0.25rem;
  font-size: 1.15rem;
  color: #101828;
}
.yp-team-role {
  margin: 0 0 0.75rem;
  font-size: 0.9rem;
  font-weight: 600;
  color: #2563EB;
}
.yp-team-bio {
  font-size: 0.9rem;
  color: #667085;
  margin-bottom: 0.75rem;
  text-align: left;
}
.yp-team-bio p:last-child {
  margin-bottom: 0;
}
.yp-team-links {
  display: flex;
  justify-content: center;
  gap: 0.75rem;
  flex-wrap: wrap;
}
.yp-team-link {
  font-size: 0.85rem;
  font-weight: 600;
  color: #2563EB;
  text-decoration: none;
}
.yp-team-link:hover {
  text-decoration: underline;
}
.yp-team-empty {
  text-align: center;
  color: #667085;
  padding: 2rem;
}
@media (max-width: 900px) {
  .yp-team-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}
@media (max-width: 560px) {
  .yp-team-grid {
    grid-template-columns: 1fr;
  }
}

/* ========== Monthly Packages ========== */
.yp-packages-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}
.yp-package-card {
  background: #fff;
  border: 1px solid #E4E7EC;
  border-radius: 14px;
  padding: 1.75rem 1.5rem 1.5rem;
  display: flex;
  flex-direction: column;
  position: relative;
  transition: box-shadow 0.2s, transform 0.2s;
}
.yp-package-card:hover {
  box-shadow: 0 14px 36px rgba(16, 24, 40, 0.1);
  transform: translateY(-3px);
}
.yp-package-featured {
  border-color: #2563EB;
  box-shadow: 0 8px 24px rgba(37, 99, 235, 0.12);
}
.yp-package-badge {
  position: absolute;
  top: 12px;
  right: 12px;
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  background: #EEF2FF;
  color: #2563EB;
  padding: 0.25rem 0.55rem;
  border-radius: 6px;
}
.yp-package-featured .yp-package-badge {
  background: #2563EB;
  color: #fff;
}
.yp-package-card h3 {
  margin: 0 0 0.4rem;
  font-size: 1.2rem;
  color: #101828;
  padding-right: 4rem;
}
.yp-package-tagline {
  font-size: 0.92rem;
  color: #667085;
  margin: 0 0 1rem;
}
.yp-package-features {
  list-style: none;
  padding: 0;
  margin: 0 0 1rem;
  flex: 1;
}
.yp-package-features li {
  position: relative;
  padding: 0.35rem 0 0.35rem 1.25rem;
  font-size: 0.9rem;
  color: #172033;
}
.yp-package-features li::before {
  content: "✓";
  position: absolute;
  left: 0;
  color: #2563EB;
  font-weight: 700;
}
.yp-package-note {
  font-size: 0.8rem;
  color: #667085;
  margin: 0 0 1rem;
  font-style: italic;
}
.yp-btn-block {
  display: block;
  text-align: center;
  width: 100%;
}
.yp-packages-extra {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
}
.yp-extra-item {
  background: #fff;
  border: 1px solid #E4E7EC;
  border-radius: 10px;
  padding: 1rem 1.15rem;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}
.yp-extra-item strong {
  color: #101828;
  font-size: 0.95rem;
}
.yp-extra-item span {
  font-size: 0.85rem;
  color: #667085;
}
@media (max-width: 900px) {
  .yp-packages-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}
@media (max-width: 600px) {
  .yp-packages-grid,
  .yp-packages-extra {
    grid-template-columns: 1fr;
  }
}
