/*
Theme Name: KM Personal
Theme URI: https://kmpersonal.ee
Description: Professional HR consulting WordPress theme for KM Personal
Version: 1.0.0
Author: KM Personal
Author URI: https://kmpersonal.ee
Text Domain: kmpersonal
*/

/* ==========================================================================
   CSS VARIABLES - BRAND COLORS
   ========================================================================== */

:root {
  /* Backgrounds */
  --beige-bg: #FFFFFF;
  --dark-green: #214945;
  --darker-green: #002926;
  --light-purple: #B695B3;
  --dark-purple: #724A69;
  --white: #FFFFFF;

  /* Text colors */
  --text-dark: #002926;
  --text-body: #333333;
  --text-light: #FFFFFF;

  /* Spacing */
  --container-max-width: 1200px;
  --section-padding: 80px 20px;
  --section-padding-mobile: 60px 20px;
}

/* ==========================================================================
   GLOBAL RESET & BASE STYLES
   ========================================================================== */

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Open Sans', sans-serif;
  font-size: 16px;
  line-height: 1.7;
  color: var(--text-body);
  background-color: #FFFFFF;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Ensure all elements use Open Sans (except admin bar and dashicons) */
body *:not(#wpadminbar):not(#wpadminbar *):not(.dashicons),
body,
h1, h2, h3, h4, h5, h6,
p, a, span, div, li,
button, input, textarea, select,
.btn, .hero-title, .section-title,
.faq-accordion-question,
.faq-accordion-answer {
  font-family: 'Open Sans', sans-serif !important;
}

/* Explicitly preserve dashicons font */
.dashicons,
#wpadminbar .ab-icon:before,
#wpadminbar .dashicons-before:before {
  font-family: dashicons !important;
}

/* ==========================================================================
   TYPOGRAPHY
   ========================================================================== */

h1, .h1 {
  font-size: 56px;
  font-weight: 700;
  line-height: 1.2;
  color: var(--text-dark);
}

h2, .h2, .section-title {
  font-size: 42px;
  font-weight: 700;
  line-height: 1.3;
  color: var(--text-dark);
  margin-bottom: 24px;
  text-align: center;
}

h3, .h3 {
  font-size: 28px;
  font-weight: 600;
  line-height: 1.3;
  color: var(--text-dark);
}

p {
  font-size: 16px;
  line-height: 1.7;
  color: var(--text-body);
}

.section-subtitle {
  font-size: 18px;
  line-height: 1.6;
  color: #666;
  text-align: center;
  max-width: 700px;
  margin: 0 auto 48px;
}

/* ==========================================================================
   HEADER
   ========================================================================== */

.site-header {
  background: var(--white);
  box-shadow: none;
  position: relative;
  width: 100%;
  z-index: 1000;
  padding: 15px 0;
  transition: all 0.3s ease;
}

.site-header.header-scrolled {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  padding: 10px 0;
  box-shadow: none;
  animation: slideDown 0.3s ease;
}

@keyframes slideDown {
  from {
    transform: translateY(-100%);
  }
  to {
    transform: translateY(0);
  }
}

.site-header.header-scrolled .site-logo img {
  max-height: 100px;
}

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

.site-logo a {
  font-size: 24px;
  font-weight: 700;
  color: var(--dark-green);
  text-decoration: none;
  transition: color 0.3s ease;
}

.site-logo a:hover {
  color: var(--dark-purple);
}

.site-logo img {
  max-height: 130px;
  width: auto;
  display: block;
  transition: max-height 0.3s ease;
}

.main-navigation {
  flex: 1;
  display: flex;
  justify-content: flex-end;
}

.primary-menu {
  display: flex;
  list-style: none;
  gap: 40px;
  margin: 0;
  padding: 0;
}

.primary-menu li {
  margin: 0;
}

.primary-menu a {
  color: var(--text-dark);
  text-decoration: none;
  font-size: 16px;
  font-weight: 600;
  transition: color 0.3s ease;
  position: relative;
  padding-bottom: 5px;
}

.primary-menu a:hover {
  color: var(--dark-purple);
}

.primary-menu a::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--dark-purple);
  transition: width 0.3s ease;
}

.primary-menu a:hover::after {
  width: 100%;
}

/* Mobile Menu Toggle */
.mobile-menu-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 5px;
}

.mobile-menu-toggle span {
  width: 28px;
  height: 3px;
  background: var(--dark-green);
  border-radius: 2px;
  transition: all 0.3s ease;
}

.mobile-menu-toggle.active span:nth-child(1) {
  transform: rotate(45deg) translate(6px, 6px);
}

.mobile-menu-toggle.active span:nth-child(2) {
  opacity: 0;
}

.mobile-menu-toggle.active span:nth-child(3) {
  transform: rotate(-45deg) translate(6px, -6px);
}

/* Mobile Menu Styles */
@media (max-width: 992px) {
  .mobile-menu-toggle {
    display: flex;
  }

  .site-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1001;
  }

  body {
    padding-top: 0;
  }

  .site-main {
    padding-top: 0;
  }

  .site-logo img {
    max-height: 60px !important;
  }

  .main-navigation {
    position: fixed !important;
    left: 0;
    right: 0;
    top: 80px;
    background: var(--white);
    padding: 0;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s ease-in-out, padding 0.4s ease-in-out;
    z-index: 999;
    display: block !important;
    opacity: 1;
    visibility: visible;
  }

  .main-navigation.active {
    max-height: 500px !important;
    padding: 20px !important;
    overflow-y: auto;
  }

  .main-navigation .primary-menu {
    padding: 0;
    margin: 0;
    list-style: none;
  }

  .primary-menu {
    flex-direction: column;
    gap: 20px;
  }

  .primary-menu a {
    font-size: 18px;
  }
}

/* ==========================================================================
   LAYOUT
   ========================================================================== */

.container {
  max-width: var(--container-max-width);
  margin: 0 auto;
  padding: 0 20px;
  position: relative;
  z-index: 1;
}

.site-main {
  overflow-x: hidden;
}

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

.btn {
  padding: 14px 32px;
  border-radius: 4px;
  font-size: 16px;
  font-weight: 600;
  font-family: 'Open Sans', sans-serif;
  text-decoration: none;
  display: inline-block;
  cursor: pointer;
  transition: all 0.3s ease;
  border: none;
  text-align: center;
}

.btn-primary {
  background: var(--dark-green);
  color: var(--white);
}

.btn-primary:hover {
  background: var(--darker-green);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.btn-secondary {
  background: var(--light-purple);
  color: var(--white);
  border: 2px solid var(--light-purple);
}

.btn-secondary:hover {
  background: var(--dark-purple);
  border-color: var(--dark-purple);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(114, 74, 105, 0.3);
}

.btn-outline {
  background: transparent;
  color: var(--dark-purple);
  border: 2px solid var(--dark-purple);
}

.btn-outline:hover {
  background: var(--dark-purple);
  color: var(--white);
  transform: translateY(-2px);
}

.btn-light {
  background: var(--white);
  color: var(--dark-green);
}

.btn-light:hover {
  background: var(--beige-bg);
}

.btn-outline-light {
  background: transparent;
  border: 2px solid var(--white);
  color: var(--white);
}

.btn-outline-light:hover {
  background: rgba(255, 255, 255, 0.1);
}

.btn-large {
  padding: 16px 40px;
  font-size: 18px;
}

/* ==========================================================================
   DECORATIVE ELEMENTS
   ========================================================================== */

.decorative-circle {
  position: absolute;
  border-radius: 50%;
  background: rgba(182, 149, 179, 0.08);
  pointer-events: none;
  z-index: 0;
}

/* ==========================================================================
   RESPONSIVE DESIGN
   ========================================================================== */

/* Mobile (phones, less than 768px) */
@media (max-width: 767px) {
  h1, .h1 {
    font-size: 32px;
  }

  h2, .h2, .section-title {
    font-size: 28px;
  }

  h3, .h3 {
    font-size: 22px;
  }

  .btn {
    width: 100%;
    text-align: center;
  }

  :root {
    --section-padding: 60px 20px;
  }
}

/* Tablet (768px to 1023px) */
@media (min-width: 768px) and (max-width: 1023px) {
  h1, .h1 {
    font-size: 42px;
  }

  h2, .h2, .section-title {
    font-size: 36px;
  }
}

/* Desktop (1024px and up) */
@media (min-width: 1024px) {
  /* Full desktop styles already defined above */
}

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

.text-center {
  text-align: center;
}

.mt-0 { margin-top: 0; }
.mt-1 { margin-top: 8px; }
.mt-2 { margin-top: 16px; }
.mt-3 { margin-top: 24px; }
.mt-4 { margin-top: 32px; }

.mb-0 { margin-bottom: 0; }
.mb-1 { margin-bottom: 8px; }
.mb-2 { margin-bottom: 16px; }
.mb-3 { margin-bottom: 24px; }
.mb-4 { margin-bottom: 32px; }

/* ==========================================================================
   CTA SECTION (FOOTER)
   ========================================================================== */

.cta-section {
  background: var(--dark-green);
  color: var(--white);
  text-align: center;
  position: relative;
  overflow: hidden;
  padding: 50px 20px 40px;
}

.cta-section .section-title {
  color: var(--white);
  margin-bottom: 24px;
}

/* FAQ in Footer */
.cta-faq {
  margin-bottom: 40px;
  padding-bottom: 30px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.2);
}

.cta-faq .faq-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
  max-width: 1000px;
  margin: 0 auto;
  text-align: left;
}

.cta-faq .faq-item {
  background: rgba(255, 255, 255, 0.05);
  padding: 18px;
  border-radius: 8px;
  transition: all 0.3s ease;
}

.cta-faq .faq-item:hover {
  background: rgba(255, 255, 255, 0.08);
  transform: translateY(-2px);
}

.cta-faq .faq-question {
  font-size: 15px;
  font-weight: 600;
  color: var(--white);
  margin-bottom: 8px;
  line-height: 1.5;
}

.cta-faq .faq-answer {
  font-size: 13px;
  color: var(--white);
  opacity: 0.9;
  line-height: 1.6;
  margin: 0;
}

.cta-title {
  font-size: 32px;
  font-weight: 700;
  margin-bottom: 16px;
  color: var(--white);
}

.cta-text {
  font-size: 16px;
  line-height: 1.6;
  max-width: 700px;
  margin: 0 auto 30px;
  color: var(--white);
  opacity: 0.95;
}

.cta-buttons {
  display: flex;
  gap: 16px;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 35px;
}

.cta-contact-info {
  margin-top: 30px;
  padding-top: 30px;
  border-top: 1px solid rgba(255, 255, 255, 0.2);
}

.cta-contact-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 30px;
  max-width: 1100px;
  margin: 0 auto;
}

.cta-contact-item h4 {
  font-size: 13px;
  font-weight: 700;
  color: var(--white);
  margin-bottom: 8px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.cta-contact-item h4 a {
  color: var(--white);
  text-decoration: none;
  transition: opacity 0.3s ease;
}

.cta-contact-item h4 a:hover {
  opacity: 0.7;
}

.cta-contact-item p {
  font-size: 13px;
  color: var(--white);
  opacity: 0.9;
  margin: 4px 0;
  line-height: 1.5;
}

.cta-contact-item a {
  color: var(--white);
  text-decoration: none;
  transition: opacity 0.3s ease;
}

.cta-contact-item a:hover {
  opacity: 0.7;
  text-decoration: underline;
}

.cta-extra {
  margin-top: 16px;
}

.cta-extra-text {
  font-size: 14px;
  color: var(--white);
  opacity: 0.9;
}

.cta-extra-text a {
  color: var(--white);
  text-decoration: underline;
  font-weight: 600;
}

.cta-extra-text a:hover {
  opacity: 0.8;
}

.cta-section .circle-cta-1 {
  position: absolute;
  width: 250px;
  height: 250px;
  top: -80px;
  right: -80px;
  background: rgba(182, 149, 179, 0.05);
}

.cta-section .circle-cta-2 {
  position: absolute;
  width: 280px;
  height: 280px;
  bottom: -120px;
  left: -100px;
  background: rgba(182, 149, 179, 0.05);
}

/* CTA Responsive */
@media (max-width: 768px) {
  .cta-section {
    padding: 40px 20px 30px;
  }

  .cta-title {
    font-size: 26px;
  }

  .cta-text {
    font-size: 15px;
  }

  .cta-buttons {
    flex-direction: column;
    align-items: center;
    margin-bottom: 25px;
  }

  .cta-buttons .btn {
    width: 100%;
    max-width: 300px;
  }

  .cta-contact-info {
    margin-top: 20px;
    padding-top: 20px;
  }

  .cta-contact-grid {
    grid-template-columns: 1fr;
    gap: 20px;
    text-align: left;
  }

  .cta-contact-item h4 {
    font-size: 12px;
  }

  .cta-contact-item p {
    font-size: 12px;
  }

  .cta-faq .faq-grid {
    grid-template-columns: 1fr;
    gap: 15px;
  }

  .cta-faq .faq-item {
    padding: 15px;
  }

  .cta-faq .faq-question {
    font-size: 14px;
  }

  .cta-faq .faq-answer {
    font-size: 12px;
  }
}

@media (max-width: 992px) and (min-width: 769px) {
  .cta-contact-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 25px;
  }
}

/* ==========================================================================
   SITE FOOTER
   ========================================================================== */

.site-footer {
  background: var(--beige-bg);
  color: var(--text-dark);
  padding: 30px 20px;
  text-align: center;
  border-top: 1px solid rgba(33, 73, 69, 0.1);
}

.footer-content {
  max-width: var(--container-max-width);
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 20px;
  flex-wrap: wrap;
}

.footer-logo {
  display: flex;
  align-items: center;
  gap: 12px;
}

.footer-logo img,
.footer-logo a img,
.footer-logo .custom-logo {
  max-height: 130px !important;
  height: 130px !important;
  width: auto !important;
  display: block;
}

.footer-logo .site-name {
  font-size: 18px;
  font-weight: 700;
  color: var(--dark-green);
}

.footer-navigation {
  display: none;
}

.footer-info p {
  font-size: 14px;
  color: var(--text-dark);
  opacity: 0.7;
  margin: 0;
}

@media (max-width: 768px) {
  .site-footer {
    padding: 20px;
  }

  .footer-content {
    flex-direction: column;
    gap: 10px;
  }

  .footer-logo img,
  .footer-logo a img,
  .footer-logo .custom-logo {
    max-height: 100px !important;
    height: 100px !important;
  }

  .footer-logo .site-name {
    font-size: 16px;
  }

  .footer-info p {
    font-size: 12px;
  }
}

/* ==========================================================================
   FAQ ACCORDION
   ========================================================================== */

.faq-accordion {
  max-width: 900px;
  margin: 0 auto;
}

.faq-accordion-item {
  background: var(--white);
  border-radius: 8px;
  margin-bottom: 16px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
  overflow: hidden;
  transition: all 0.3s ease;
}

.faq-accordion-item:hover {
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
}

.faq-accordion-question {
  width: 100%;
  background: none;
  border: none;
  padding: 24px 28px;
  text-align: left;
  font-size: 18px;
  font-weight: 600;
  color: var(--dark-green);
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  transition: all 0.3s ease;
}

.faq-accordion-question:hover {
  background: rgba(33, 73, 69, 0.03);
}

.faq-accordion-question span {
  flex: 1;
  padding-right: 20px;
}

.faq-accordion-question i {
  font-size: 16px;
  color: var(--light-purple);
  transition: transform 0.3s ease;
}

.faq-accordion-item.active .faq-accordion-question i {
  transform: rotate(180deg);
}

.faq-accordion-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease, padding 0.3s ease;
  padding: 0 28px;
}

.faq-accordion-item.active .faq-accordion-answer {
  max-height: 500px;
  padding: 0 28px 24px 28px;
}

.faq-accordion-answer p {
  font-size: 16px;
  line-height: 1.8;
  color: #333;
  margin: 0;
}

/* FAQ Accordion Responsive */
@media (max-width: 768px) {
  .faq-accordion-question {
    font-size: 16px;
    padding: 20px;
  }

  .faq-accordion-answer {
    padding: 0 20px;
  }

  .faq-accordion-item.active .faq-accordion-answer {
    padding: 0 20px 20px 20px;
  }

  .faq-accordion-answer p {
    font-size: 15px;
  }
}

/* ==========================================================================
   SERVICES (TEENUSED) - ARCHIVE & SINGLE
   ========================================================================== */

/* Services Archive */
.services-archive {
  padding: var(--section-padding);
  background: var(--beige-bg);
}

.archive-header {
  text-align: center;
  margin-bottom: 60px;
}

.services-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 30px;
  max-width: 1200px;
  margin: 0 auto;
}

/* Service Single Page */
.service-single {
  background: var(--beige-bg);
}

.service-hero {
  background: var(--dark-green);
  color: var(--white);
  padding: 80px 20px 60px;
  text-align: center;
  position: relative;
}

.service-hero-content {
  max-width: 800px;
  margin: 0 auto;
}

.service-icon {
  color: #FCF7F0;
  margin-bottom: 24px;
  display: flex;
  justify-content: center;
  align-items: center;
}

.service-icon svg {
  width: 80px;
  height: 80px;
}

/* Wave Divider for Service Hero - Top */
.service-hero .wave-divider-top {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  overflow: hidden;
  line-height: 0;
  z-index: 3;
}

.service-hero .wave-divider-top svg {
  position: relative;
  display: block;
  width: calc(100% + 1.3px);
  height: 120px;
}

.service-hero .wave-divider-top .shape-fill {
  fill: var(--beige-bg);
}

.service-title {
  font-size: 42px;
  font-weight: 700;
  color: var(--white);
  margin-bottom: 20px;
}

.service-subtitle {
  font-size: 18px;
  line-height: 1.6;
  color: var(--white);
  opacity: 0.9;
  margin: 0;
}

.service-content {
  padding: 60px 20px;
}

.service-content-grid {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 40px;
  max-width: 1200px;
  margin: 0 auto;
}

.service-main-content {
  background: var(--white);
  padding: 40px;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.service-featured-image {
  margin-bottom: 30px;
  border-radius: 8px;
  overflow: hidden;
}

.service-featured-image img {
  width: 100%;
  height: auto;
  display: block;
}

.service-description {
  font-size: 16px;
  line-height: 1.8;
  color: var(--text-body);
  margin-bottom: 40px;
}

.service-description h2,
.service-description h3 {
  color: var(--dark-green);
  margin-top: 30px;
  margin-bottom: 16px;
}

.service-description ul,
.service-description ol {
  margin: 20px 0;
  padding-left: 24px;
}

.service-description li {
  margin-bottom: 12px;
}

.service-features {
  background: var(--beige-bg);
  padding: 30px;
  border-radius: 8px;
  border-left: 4px solid var(--dark-green);
}

.service-features h3 {
  font-size: 22px;
  color: var(--dark-green);
  margin-bottom: 20px;
}

.features-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.features-list li {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 16px;
  font-size: 16px;
  line-height: 1.6;
}

.features-list li:last-child {
  margin-bottom: 0;
}

.features-list i {
  color: var(--dark-green);
  font-size: 18px;
  margin-top: 2px;
  flex-shrink: 0;
}

/* Service Sidebar */
.service-sidebar {
  display: flex;
  flex-direction: column;
  gap: 30px;
}

.service-cta-box {
  background: linear-gradient(135deg, var(--dark-green) 0%, #003d38 100%);
  color: var(--white);
  padding: 40px;
  border-radius: 12px;
  text-align: center;
  position: sticky;
  top: 100px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
}

.service-cta-box h3 {
  font-size: 24px;
  color: var(--white);
  margin-bottom: 16px;
}

.service-cta-box p {
  font-size: 15px;
  line-height: 1.6;
  color: var(--white);
  opacity: 0.9;
  margin-bottom: 20px;
}

.service-cta-box .btn {
  width: 100%;
}

.other-services {
  background: var(--white);
  padding: 30px;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.other-services h3 {
  font-size: 20px;
  color: var(--dark-green);
  margin-bottom: 20px;
}

.services-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.services-list li {
  margin-bottom: 12px;
}

.services-list li:last-child {
  margin-bottom: 0;
}

.services-list a {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px;
  background: var(--beige-bg);
  border-radius: 6px;
  color: var(--dark-green);
  text-decoration: none;
  transition: all 0.3s ease;
}

.services-list a:hover {
  background: var(--dark-green);
  color: var(--white);
  transform: translateX(4px);
}

.services-list svg {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
}

/* Services Responsive */
@media (max-width: 992px) {
  .service-content-grid {
    grid-template-columns: 1fr;
  }

  .service-cta-box {
    position: static;
  }
}

@media (max-width: 768px) {
  .service-hero {
    padding: 60px 20px 40px;
  }

  .service-icon {
    font-size: 48px;
  }

  .service-title {
    font-size: 32px;
  }

  .service-subtitle {
    font-size: 16px;
  }

  .service-content {
    padding: 40px 20px;
  }

  .service-main-content {
    padding: 24px;
  }

  .services-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }
}
