/*
Theme Name: Pikler Triangle DIY
Theme URI: https://piklertrianglediy.com
Description: A warm, kid/parent-friendly WordPress theme optimized for SEO, AEO, and GEO. Features AdSense support, affiliate product cards, comparison tables, and schema markup.
Version: 1.1.0
Author: Pikler Theme
Author URI: https://piklertrianglediy.com
License: GPL v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: pikler-theme
Domain Path: /languages
Requires at least: 5.9
Requires PHP: 7.4
*/

/* ========================================
   CRITICAL ABOVE-THE-FOLD CSS
   Warm, friendly colors for parents & kids
   Optimized for Core Web Vitals
   ======================================== */

:root {
  /* Warm, kid-friendly palette */
  --primary-color: #4A90A4;    /* Soft teal - trustworthy, calming */
  --primary-dark: #3A7A8E;
  --primary-light: #E8F4F8;
  --secondary-color: #E8735A;  /* Warm coral - playful, inviting */
  --secondary-light: #FFF0ED;
  --cta-color: #F5A623;        /* Warm amber - friendly CTA */
  --cta-hover: #E59513;
  --bg-light: #FFF9F5;         /* Warm off-white - cozy feel */
  --bg-white: #FFFFFF;
  --bg-cream: #FEF7F0;         /* Subtle warm cream for cards */
  --text-dark: #2D3436;
  --text-body: #4A4A4A;        /* Softer body text - easier to read */
  --text-light: #7F8C8D;
  --border-color: #E8E0D8;     /* Warm border */
  --border-light: #F0EAE4;
  --warning-color: #F39C12;
  --success-color: #27AE60;
  --danger-color: #E74C3C;
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.06);
  --shadow-md: 0 4px 12px rgba(0,0,0,0.08);
  --shadow-lg: 0 8px 24px rgba(0,0,0,0.1);
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --transition: 0.25s ease;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: 17px;
  line-height: 1.75;
  color: var(--text-body);
  background-color: var(--bg-light);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-wrap: break-word;
  word-wrap: break-word;
}

a { color: var(--primary-color); text-decoration: none; transition: color var(--transition); }
a:hover { color: var(--primary-dark); text-decoration: underline; }
img { max-width: 100%; height: auto; display: block; }

h1, h2, h3, h4, h5, h6 {
  line-height: 1.3;
  margin-top: 1.6em;
  margin-bottom: 0.6em;
  color: var(--text-dark);
  font-weight: 700;
  letter-spacing: -0.01em;
}

h1 { font-size: 2.2rem; }
h2 { font-size: 1.7rem; }
h3 { font-size: 1.35rem; }
h4 { font-size: 1.15rem; }

p { margin-bottom: 1.1em; }

/* Layout */
.site-container { max-width: 1140px; margin: 0 auto; padding: 0 20px; }
.content-wrapper { display: flex; gap: 35px; padding-top: 30px; }
.main-content { flex: 1; min-width: 0; max-width: 780px; }
.sidebar { width: 320px; flex-shrink: 0; }

/* ---- HEADER ---- */
.site-header {
  background-color: var(--bg-white);
  border-bottom: 2px solid var(--border-light);
  padding: 12px 0;
  position: sticky;
  top: 0;
  z-index: 1000;
  box-shadow: var(--shadow-sm);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.site-branding { display: flex; align-items: center; gap: 12px; }
.site-logo img { max-height: 42px; width: auto; }
.site-title { font-size: 1.4rem; font-weight: 800; margin: 0; }
.site-title a { color: var(--primary-color); text-decoration: none; }
.site-title a:hover { color: var(--primary-dark); text-decoration: none; }
.site-tagline { font-size: 0.8rem; color: var(--text-light); margin: 0; display: none; }

/* Navigation */
.primary-nav .nav-menu { list-style: none; display: flex; gap: 5px; margin: 0; padding: 0; }
.primary-nav .nav-menu li { position: relative; }
.primary-nav .nav-menu a {
  display: block; padding: 8px 14px; font-size: 0.95rem; font-weight: 500;
  color: var(--text-dark); border-radius: var(--radius-sm); transition: all var(--transition);
}
.primary-nav .nav-menu a:hover,
.primary-nav .nav-menu .current-menu-item > a {
  background-color: var(--primary-light); color: var(--primary-color); text-decoration: none;
}

/* Dropdown */
.primary-nav .nav-menu .sub-menu {
  display: none; position: absolute; top: 100%; left: 0; background: var(--bg-white);
  border: 1px solid var(--border-color); border-radius: var(--radius-sm); padding: 6px 0;
  min-width: 200px; box-shadow: var(--shadow-md); z-index: 100; list-style: none;
}
.primary-nav .nav-menu li:hover > .sub-menu { display: block; }
.primary-nav .nav-menu .sub-menu a { padding: 8px 16px; border-radius: 0; }

/* Mobile Menu Toggle */
.mobile-menu-toggle {
  display: none; background: none; border: none; cursor: pointer; padding: 8px;
  flex-direction: column; gap: 5px; width: 36px;
}
.hamburger-line {
  display: block; width: 24px; height: 2px; background-color: var(--text-dark);
  border-radius: 2px; transition: all var(--transition);
}

/* ---- FOOTER ---- */
.site-footer {
  background-color: var(--text-dark);
  color: rgba(255,255,255,0.85);
  padding: 50px 0 30px;
  margin-top: 60px;
}
.site-footer a { color: rgba(255,255,255,0.85); }
.site-footer a:hover { color: #fff; }

/* ---- BUTTONS ---- */
.btn {
  display: inline-block; padding: 12px 28px; background-color: var(--cta-color);
  color: white; border: none; border-radius: var(--radius-sm); cursor: pointer;
  font-size: 1rem; font-weight: 600; transition: all var(--transition);
  text-decoration: none; text-align: center;
}
.btn:hover { background-color: var(--cta-hover); color: white; text-decoration: none; transform: translateY(-1px); box-shadow: var(--shadow-md); }

/* ---- FORMS ---- */
input[type="text"], input[type="email"], input[type="url"], input[type="search"], textarea, select {
  width: 100%; padding: 12px 14px; border: 1px solid var(--border-color);
  border-radius: var(--radius-sm); font-family: inherit; font-size: 1rem; margin-bottom: 15px;
  transition: border-color var(--transition), box-shadow var(--transition);
}
input:focus, textarea:focus, select:focus {
  outline: none; border-color: var(--primary-color);
  box-shadow: 0 0 0 3px rgba(74, 144, 164, 0.15);
}

/* ---- POSTS ---- */
.post {
  background-color: var(--bg-white); padding: 35px; border-radius: var(--radius-md);
  margin-bottom: 30px; box-shadow: var(--shadow-sm);
}

/* ---- MOBILE RESPONSIVE ---- */

/* Tablet */
@media (max-width: 1024px) {
  .content-wrapper { flex-direction: column; gap: 25px; }
  .sidebar { width: 100%; }
  .main-content { max-width: 100%; }
  h1 { font-size: 1.85rem; }
  h2 { font-size: 1.45rem; }
  .site-tagline { display: none; }
}

/* Mobile */
@media (max-width: 768px) {
  body { font-size: 16px; line-height: 1.7; }
  .site-container { padding: 0 16px; }
  .post { padding: 20px 18px; border-radius: var(--radius-sm); }
  h1 { font-size: 1.6rem; }
  h2 { font-size: 1.3rem; }
  h3 { font-size: 1.15rem; }

  /* Mobile menu */
  .mobile-menu-toggle { display: flex; }
  .primary-nav {
    display: none; position: absolute; top: 100%; left: 0; right: 0;
    background: var(--bg-white); border-top: 1px solid var(--border-color);
    box-shadow: var(--shadow-md); padding: 10px 0;
  }
  .primary-nav.active { display: block; }
  .primary-nav .nav-menu { flex-direction: column; gap: 0; padding: 0 16px; }
  .primary-nav .nav-menu a { padding: 12px 14px; font-size: 1rem; }
  .primary-nav .nav-menu .sub-menu {
    position: static; box-shadow: none; border: none;
    padding: 0 0 0 16px; display: block;
  }

  /* Touch-friendly spacing */
  .content-wrapper { padding-top: 20px; }
  .single-post-full { padding: 20px 16px; }
}

/* Small phones */
@media (max-width: 480px) {
  body { font-size: 15px; }
  .site-container { padding: 0 12px; }
  .post { padding: 16px 14px; }
  .site-title { font-size: 1.15rem; }
  h1 { font-size: 1.45rem; }
  h2 { font-size: 1.2rem; }
}

/* Print styles */
@media print {
  .site-header, .site-footer, .sidebar, .ad-slot, .related-posts, .mobile-menu-toggle,
  .post-navigation, .pikler-toc { display: none !important; }
  body { font-size: 12pt; line-height: 1.5; color: #000; background: #fff; }
}
