/*
Theme Name: Terapia do Stress
Theme URI: https://terapiadostress.pt
Author: Terapia do Stress
Author URI: https://terapiadostress.pt
Description: Tema personalizado para Terapia do Stress
Version: 1.0.0
Requires at least: 6.0
Tested up to: 6.4
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: terapiadostress
Tags: custom-background, custom-logo, custom-menu, featured-images, threaded-comments, translation-ready
*/

/* Variáveis CSS do Tema */
:root {
  --color-brown: #56433b;
  --color-green: #609574;
  --color-green-hover: #3e684e;
  --color-green-light: #98c1a8;
  --color-white: #ffffff;
}

/* Reset básico */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family:
    -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen-Sans, Ubuntu,
    Cantarell, 'Helvetica Neue', sans-serif;
  line-height: 1.6;
  color: #333;
  margin: 0;
  padding: 0;
  width: 100%;
  overflow-x: hidden;
}

a {
  text-decoration: none;
  color: inherit;
}

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

/* Header */
.site-header {
  background-color: var(--color-white);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  position: sticky;
  top: 0;
  z-index: 1000;
  transition: all 0.3s ease;
}

.page-template-template-homepage .site-header {
  display: none;
}

.site-header__container {
  max-width: 1170px;
  margin: 0 auto;
  padding: 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.site-branding .custom-logo-link {
  display: block;
  line-height: 0;
}

.site-branding .custom-logo {
  max-height: 60px;
  width: auto;
  transition: all 0.3s ease;
}

.site-title {
  margin: 0;
  font-size: 24px;
  font-weight: 700;
  font-family: 'Montserrat', sans-serif;
}

.site-title a {
  color: var(--color-brown);
  text-decoration: none;
  transition: color 0.3s ease;
}

.site-title a:hover {
  color: var(--color-green);
}

/* Main Navigation */
.main-navigation {
  display: flex;
  align-items: center;
}

.menu-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 10px;
  flex-direction: column;
  gap: 5px;
  z-index: 1001;
}

.menu-toggle__line {
  width: 25px;
  height: 3px;
  background-color: var(--color-brown);
  transition: all 0.3s ease;
  border-radius: 2px;
}

.primary-menu {
  display: flex;
  justify-content: flex-end;
}

.primary-menu ul {
  list-style: none;
  list-style-type: none;
  margin: 0;
  padding: 0;
  display: flex;
  gap: 30px;
  flex-wrap: wrap;
}

.primary-menu li {
  margin: 0;
  padding: 0;
  position: relative;
  list-style: none;
  list-style-type: none;
}

.primary-menu li::before {
  display: none;
}

.primary-menu a {
  color: var(--color-brown);
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  font-family: 'Montserrat', sans-serif;
  transition: color 0.3s ease;
  padding: 5px 0;
  display: block;
}

.primary-menu a:hover,
.primary-menu .current-menu-item > a {
  color: var(--color-green);
}

/* Submenu */
.primary-menu .sub-menu {
  position: absolute;
  top: 100%;
  left: 0;
  background-color: var(--color-white);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  list-style: none;
  margin: 0;
  padding: 10px 0;
  min-width: 200px;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-10px);
  transition: all 0.3s ease;
  z-index: 100;
}

.primary-menu li:hover > .sub-menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.primary-menu .sub-menu li {
  display: block;
}

.primary-menu .sub-menu a {
  padding: 10px 20px;
  font-size: 14px;
}

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

  .main-navigation {
    position: fixed;
    top: 0;
    right: -100%;
    width: 280px;
    height: 100vh;
    background-color: var(--color-white);
    box-shadow: -2px 0 10px rgba(0, 0, 0, 0.1);
    transition: right 0.3s ease;
    overflow-y: auto;
    padding: 80px 20px 20px;
    z-index: 999;
  }

  .main-navigation.toggled {
    right: 0;
  }

  .menu-toggle[aria-expanded='true'] .menu-toggle__line:nth-child(1) {
    transform: rotate(45deg) translate(7px, 7px);
  }

  .menu-toggle[aria-expanded='true'] .menu-toggle__line:nth-child(2) {
    opacity: 0;
  }

  .menu-toggle[aria-expanded='true'] .menu-toggle__line:nth-child(3) {
    transform: rotate(-45deg) translate(7px, -7px);
  }

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

  .primary-menu li {
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
  }

  .primary-menu a {
    padding: 15px 0;
  }

  .primary-menu .sub-menu {
    position: static;
    box-shadow: none;
    opacity: 1;
    visibility: visible;
    transform: none;
    padding-left: 20px;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
  }

  .primary-menu li:hover > .sub-menu,
  .primary-menu li.focus > .sub-menu {
    max-height: 500px;
  }

  .site-branding .custom-logo {
    max-height: 50px;
  }
}

/* Site wrapper */
.site {
  width: 100%;
  overflow-x: hidden;
}

/* Footer */
.site-footer {
  background-color: var(--color-white);
  color: var(--color-brown);
  padding: 60px 20px 30px;
  text-align: center;
}

.site-footer .site-container {
  max-width: 1170px;
  margin: 0 auto;
}

/* Redes Sociais no Footer */
.footer-social {
  display: flex;
  justify-content: center;
  gap: 20px;
  margin-bottom: 30px;
}

.social-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 50px;
  height: 50px;
  background-color: var(--color-green-light);
  color: var(--color-white);
  border-radius: 50%;
  font-size: 22px;
  transition: all 0.3s ease;
  text-decoration: none;
}

.social-link:hover {
  background-color: var(--color-green);
  color: var(--color-white);
  transform: translateY(-3px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

/* Footer Navigation */
.footer-navigation {
  margin: 30px 0;
}

.footer-menu {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  justify-content: center;
  gap: 30px;
  flex-wrap: wrap;
}

.footer-menu li {
  margin: 0;
}

.footer-menu a {
  color: var(--color-brown);
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  transition: color 0.3s ease;
}

.footer-menu a:hover {
  color: var(--color-green);
}

.site-info {
  color: var(--color-brown);
  opacity: 0.9;
}

.site-info p {
  margin: 0;
  font-size: 14px;
}

.footer-info-text {
  margin-top: 15px;
  font-size: 13px;
  line-height: 1.6;
  opacity: 0.85;
}

/* Content wrapper - Full width */
.site-content {
  width: 100%;
}

/* Container principal - Centrado */
.site-container {
  max-width: 1170px;
  margin: 0 auto;
  padding: 0 20px;
}

/* Páginas e posts - Full width */
.site-main {
  width: 100%;
}

.site-main article {
  max-width: 1170px;
  margin: 0 auto;
  padding: 40px 20px;
}

/* Homepage específico */
.site-main--homepage {
  padding: 0;
}

.homepage-article {
  max-width: 100% !important;
  padding: 0 !important;
  margin: 0 !important;
}

.entry-content--full-width {
  max-width: 100%;
  padding: 0;
  margin: 0;
}

/* Content Lists */
.entry-content ul,
.entry-content ol {
  list-style-position: inside;
  padding-left: 0;
  margin-left: 0;
}

.entry-content ul li,
.entry-content ol li {
  margin-bottom: 8px;
}

/* Screen reader only - visível apenas para leitores de ecrã */
.screen-reader-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border-width: 0;
}

/* Scroll to Top Button */
#scroll-to-top {
  position: fixed;
  bottom: 30px;
  right: 30px;
  width: 50px;
  height: 50px;
  background-color: var(--color-green-light);
  color: var(--color-white);
  border: none;
  border-radius: 50%;
  font-size: 24px;
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

#scroll-to-top.show {
  opacity: 1;
  visibility: visible;
}

#scroll-to-top:hover {
  background-color: var(--color-green);
  transform: translateY(-3px);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.2);
}

/* Acessibilidade */
.skip-link.screen-reader-text {
  position: absolute;
  top: -40px;
  left: 6px;
  display: block;
  padding: 12px 16px;
  background-color: var(--color-green);
  color: var(--color-white);
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  border-radius: 4px;
  z-index: 100000;
  transition: top 0.3s;
}

.skip-link.screen-reader-text:focus {
  top: 6px;
  outline: 2px solid var(--color-white);
  outline-offset: 2px;
}

/* Indicadores de foco visíveis */
a:focus,
button:focus,
input:focus,
textarea:focus,
select:focus {
  outline: 2px solid var(--color-green);
  outline-offset: 2px;
}

/* Melhorar contraste do botão de scroll-to-top */
#scroll-to-top:focus {
  outline: 3px solid var(--color-white);
  outline-offset: 3px;
}

@media (max-width: 768px) {
  #scroll-to-top {
    bottom: 20px;
    right: 20px;
    width: 45px;
    height: 45px;
    font-size: 20px;
  }
}
/* Fixed WhatsApp CTA Button */
.fixed-whatsapp-cta {
  position: fixed;
  top: 10%;
  right: 20px;
  transform: translateY(-50%);
  z-index: 9999;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 16px 40px;
  background-color: var(--color-green-light);
  color: var(--color-white);
  font-family: 'Montserrat', sans-serif;
  font-size: 16px;
  font-weight: 600;
  text-decoration: none;
  border-radius: 8px;
  transition: all 0.3s ease;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.fixed-whatsapp-cta:hover {
  background-color: var(--color-green);
  color: var(--color-white);
  transform: translateY(-50%) translateX(-5px);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.4);
}

.fixed-whatsapp-cta i {
  font-size: 24px;
}

.fixed-whatsapp-cta:focus {
  outline: 3px solid var(--color-white);
  outline-offset: 3px;
}

@media (max-width: 1024px) {
  .fixed-whatsapp-cta {
    right: 15px;
    padding: 14px 30px;
    font-size: 14px;
  }

  .fixed-whatsapp-cta i {
    font-size: 20px;
  }
}

@media (max-width: 768px) {
  .fixed-whatsapp-cta {
    top: auto;
    bottom: 80px;
    right: 15px;
    transform: translateY(0);
    padding: 12px 20px;
    font-size: 12px;
    gap: 8px;
  }

  .fixed-whatsapp-cta:hover {
    transform: translateY(-3px);
  }

  .fixed-whatsapp-cta i {
    font-size: 18px;
  }
}

@media (max-width: 480px) {
  .fixed-whatsapp-cta {
    bottom: 70px;
    right: 10px;
    padding: 10px 16px;
    font-size: 11px;
  }

  .fixed-whatsapp-cta i {
    font-size: 16px;
  }
}
