/*
Theme Name: Healthy Mama
Theme URI: https://healthymama.ru
Author: Healthy Mama Team
Author URI: https://healthymama.ru
Description: Modern WordPress theme for Healthy Mama - children's health information portal
Version: 1.0.0
Requires at least: 5.0
Tested up to: 6.4
Requires PHP: 7.4
License: GPL v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: healthymama
Domain Path: /languages
*/

/* ===================================
   GLOBAL STYLES
   =================================== */

:root {
  --primary-color: #FF6B9D;
  --secondary-color: #C44569;
  --accent-color: #FFA07A;
  --dark-color: #2C3E50;
  --light-color: #ECF0F1;
  --white: #FFFFFF;
  --gray: #95A5A6;
  --success: #27AE60;
  --warning: #F39C12;
  --danger: #E74C3C;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  line-height: 1.6;
  color: var(--dark-color);
  background-color: var(--white);
}

/* ===================================
   TYPOGRAPHY
   =================================== */

h1, h2, h3, h4, h5, h6 {
  font-weight: 700;
  margin-bottom: 15px;
  color: var(--dark-color);
}

h1 {
  font-size: 2.5rem;
  line-height: 1.2;
}

h2 {
  font-size: 2rem;
  line-height: 1.3;
}

h3 {
  font-size: 1.5rem;
  line-height: 1.4;
}

h4 {
  font-size: 1.25rem;
}

h5 {
  font-size: 1.1rem;
}

h6 {
  font-size: 1rem;
}

p {
  margin-bottom: 15px;
}

a {
  color: var(--primary-color);
  text-decoration: none;
  transition: color 0.3s ease;
}

a:hover {
  color: var(--secondary-color);
  text-decoration: underline;
}

/* ===================================
   HEADER STYLES
   =================================== */

.site-header {
  background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
  color: var(--white);
  padding: 20px 0;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  position: sticky;
  top: 0;
  z-index: 100;
}

.header-content {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 20px;
}

.site-branding {
  display: flex;
  align-items: center;
  gap: 15px;
}

.site-logo {
  width: 50px;
  height: 50px;
  background-color: var(--white);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: bold;
  color: var(--primary-color);
  font-size: 24px;
}

.site-title {
  font-size: 24px;
  font-weight: 700;
  margin: 0;
}

.site-title a {
  color: var(--white);
}

.site-title a:hover {
  text-decoration: none;
}

.site-description {
  font-size: 14px;
  opacity: 0.9;
  margin: 0;
}

/* Navigation Menu */
.main-navigation {
  flex: 1;
  text-align: right;
}

.main-navigation ul {
  list-style: none;
  display: flex;
  gap: 30px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.main-navigation a {
  color: var(--white);
  font-weight: 500;
  transition: opacity 0.3s ease;
}

.main-navigation a:hover {
  opacity: 0.8;
  text-decoration: none;
}

.main-navigation li.current_page_item > a {
  border-bottom: 2px solid var(--white);
  padding-bottom: 3px;
}

/* ===================================
   MAIN CONTENT AREA
   =================================== */

.site-content {
  max-width: 1200px;
  margin: 40px auto;
  padding: 0 20px;
}

.content-wrapper {
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: 30px;
}

.main-content {
  grid-column: 1;
}

.sidebar {
  grid-column: 2;
}

@media (max-width: 768px) {
  .content-wrapper {
    grid-template-columns: 1fr;
  }
  .sidebar {
    grid-column: 1;
  }
}

/* ===================================
   TOPICS GRID
   =================================== */

.topics-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 30px;
  margin: 40px 0;
}

.topic-card {
  background-color: var(--white);
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  display: flex;
  flex-direction: column;
}

.topic-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.15);
}

.topic-card-header {
  background: linear-gradient(135deg, var(--primary-color) 0%, var(--accent-color) 100%);
  color: var(--white);
  padding: 20px;
  text-align: center;
  min-height: 100px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.topic-card-icon {
  font-size: 40px;
  margin-right: 15px;
}

.topic-card-header h3 {
  color: var(--white);
  margin: 0;
  font-size: 1.2rem;
}

.topic-card-body {
  padding: 20px;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.topic-card-description {
  flex: 1;
  color: var(--gray);
  font-size: 14px;
  margin-bottom: 15px;
}

.topic-card-link {
  display: inline-block;
  background-color: var(--primary-color);
  color: var(--white);
  padding: 10px 20px;
  border-radius: 5px;
  transition: background-color 0.3s ease;
  align-self: flex-start;
}

.topic-card-link:hover {
  background-color: var(--secondary-color);
  text-decoration: none;
}

/* ===================================
   POSTS & PAGES
   =================================== */

.post {
  background-color: var(--white);
  border-radius: 10px;
  overflow: hidden;
  margin-bottom: 30px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
}

.post-thumbnail {
  max-width: 100%;
  height: auto;
  display: block;
  background-color: var(--light-color);
}

.post-content {
  padding: 30px;
}

.post-header {
  margin-bottom: 20px;
}

.post-title {
  margin-bottom: 10px;
}

.post-title a {
  color: var(--dark-color);
}

.post-title a:hover {
  color: var(--primary-color);
  text-decoration: none;
}

.post-meta {
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
  font-size: 14px;
  color: var(--gray);
}

.post-meta-item {
  display: flex;
  align-items: center;
  gap: 5px;
}

.post-excerpt {
  color: var(--gray);
  margin-bottom: 15px;
  line-height: 1.8;
}

.read-more {
  display: inline-block;
  color: var(--primary-color);
  font-weight: 600;
  transition: color 0.3s ease;
}

.read-more:hover {
  color: var(--secondary-color);
  text-decoration: underline;
}

/* ===================================
   SIDEBAR & WIDGETS
   =================================== */

.sidebar-widget {
  background-color: var(--light-color);
  border-radius: 10px;
  padding: 20px;
  margin-bottom: 25px;
}

.sidebar-widget-title {
  font-size: 1.1rem;
  margin-bottom: 15px;
  color: var(--dark-color);
  border-left: 4px solid var(--primary-color);
  padding-left: 10px;
}

.sidebar-widget ul {
  list-style: none;
}

.sidebar-widget li {
  margin-bottom: 10px;
  padding-bottom: 10px;
  border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.sidebar-widget li:last-child {
  border-bottom: none;
  margin-bottom: 0;
  padding-bottom: 0;
}

.sidebar-widget a {
  color: var(--dark-color);
  transition: color 0.3s ease;
}

.sidebar-widget a:hover {
  color: var(--primary-color);
}

/* ===================================
   FOOTER
   =================================== */

.site-footer {
  background-color: var(--dark-color);
  color: var(--light-color);
  padding: 40px 0 20px;
  margin-top: 60px;
}

.footer-content {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

.footer-widgets {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 30px;
  margin-bottom: 30px;
}

.footer-widget {
  color: var(--light-color);
}

.footer-widget-title {
  font-size: 1.1rem;
  margin-bottom: 15px;
  color: var(--white);
}

.footer-widget ul {
  list-style: none;
}

.footer-widget li {
  margin-bottom: 10px;
}

.footer-widget a {
  color: var(--light-color);
  transition: color 0.3s ease;
}

.footer-widget a:hover {
  color: var(--primary-color);
  text-decoration: underline;
}

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding-top: 20px;
  text-align: center;
  font-size: 14px;
}

/* ===================================
   BUTTONS
   =================================== */

.btn {
  display: inline-block;
  padding: 12px 24px;
  border-radius: 5px;
  font-weight: 600;
  text-align: center;
  cursor: pointer;
  transition: all 0.3s ease;
  border: none;
  text-decoration: none;
}

.btn-primary {
  background-color: var(--primary-color);
  color: var(--white);
}

.btn-primary:hover {
  background-color: var(--secondary-color);
  text-decoration: none;
}

.btn-secondary {
  background-color: var(--accent-color);
  color: var(--white);
}

.btn-secondary:hover {
  background-color: var(--primary-color);
  text-decoration: none;
}

/* ===================================
   ALERTS & INFO BOXES
   =================================== */

.alert {
  padding: 15px 20px;
  border-radius: 5px;
  margin-bottom: 20px;
  border-left: 4px solid;
}

.alert-info {
  background-color: #E8F4F8;
  color: #1A5F7A;
  border-left-color: #0E90B8;
}

.alert-warning {
  background-color: #FEF5E7;
  color: #78571E;
  border-left-color: #F39C12;
}

.alert-danger {
  background-color: #FADBD8;
  color: #6C1414;
  border-left-color: #E74C3C;
}

.alert-success {
  background-color: #D5F4E6;
  color: #145A32;
  border-left-color: #27AE60;
}

/* ===================================
   FORMS
   =================================== */

form {
  margin: 20px 0;
}

form p {
  margin-bottom: 15px;
}

input[type="text"],
input[type="email"],
input[type="url"],
input[type="tel"],
textarea,
select {
  width: 100%;
  padding: 10px;
  border: 1px solid var(--light-color);
  border-radius: 5px;
  font-family: inherit;
  font-size: 14px;
  transition: border-color 0.3s ease;
}

input[type="text"]:focus,
input[type="email"]:focus,
input[type="url"]:focus,
input[type="tel"]:focus,
textarea:focus,
select:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px rgba(255, 107, 157, 0.1);
}

textarea {
  resize: vertical;
  min-height: 120px;
}

label {
  display: block;
  margin-bottom: 5px;
  font-weight: 600;
  color: var(--dark-color);
}

/* ===================================
   RESPONSIVE
   =================================== */

@media (max-width: 768px) {
  .header-content {
    justify-content: center;
    text-align: center;
  }

  .main-navigation {
    text-align: center;
    width: 100%;
    order: 3;
  }

  .main-navigation ul {
    justify-content: center;
    gap: 15px;
  }

  h1 {
    font-size: 2rem;
  }

  h2 {
    font-size: 1.5rem;
  }

  .topics-grid {
    grid-template-columns: 1fr;
  }

  .content-wrapper {
    gap: 20px;
  }
}

@media (max-width: 480px) {
  .post-content {
    padding: 15px;
  }

  h1 {
    font-size: 1.5rem;
  }

  h2 {
    font-size: 1.2rem;
  }

  .topics-grid {
    gap: 15px;
  }
}

/* ===================================
   SINGLE POST & ARTICLE STYLES
   =================================== */

.post-body {
  font-size: 16px;
  line-height: 1.8;
  color: var(--dark-color);
  margin-bottom: 30px;
}

.post-body p {
  margin-bottom: 15px;
}

.post-body h2,
.post-body h3,
.post-body h4 {
  margin-top: 30px;
  margin-bottom: 15px;
}

.post-body img {
  max-width: 100%;
  height: auto;
  margin: 20px 0;
  border-radius: 8px;
  display: block;
}

.post-body ul,
.post-body ol {
  margin: 20px 0;
  padding-left: 30px;
}

.post-body li {
  margin-bottom: 10px;
  line-height: 1.8;
}

.post-body blockquote {
  border-left: 4px solid var(--primary-color);
  padding: 15px 20px;
  margin: 20px 0;
  background-color: var(--light-color);
  font-style: italic;
  color: var(--gray);
}

.post-body code {
  background-color: var(--light-color);
  padding: 2px 6px;
  border-radius: 3px;
  font-family: 'Courier New', monospace;
  font-size: 14px;
}

.post-body pre {
  background-color: var(--dark-color);
  color: var(--white);
  padding: 20px;
  border-radius: 5px;
  overflow-x: auto;
  margin: 20px 0;
}

.post-body pre code {
  background-color: transparent;
  color: inherit;
  padding: 0;
}

.post-tags {
  margin: 30px 0;
  padding: 20px;
  background-color: var(--light-color);
  border-radius: 5px;
}

.tag-link {
  display: inline-block;
  background-color: var(--primary-color);
  color: var(--white);
  padding: 5px 12px;
  border-radius: 20px;
  margin: 5px 5px 5px 0;
  font-size: 14px;
  transition: background-color 0.3s ease;
}

.tag-link:hover {
  background-color: var(--secondary-color);
  text-decoration: none;
}

/* Author Box */
.author-box {
  display: flex;
  gap: 20px;
  background-color: var(--light-color);
  padding: 30px;
  border-radius: 8px;
  margin: 40px 0;
}

.author-avatar {
  flex-shrink: 0;
}

.author-avatar img {
  width: 100px;
  height: 100px;
  border-radius: 50%;
  display: block;
}

.author-info {
  flex: 1;
}

.author-info h3 {
  margin-top: 0;
  color: var(--primary-color);
}

.author-info p {
  margin-bottom: 10px;
  color: var(--gray);
}

/* Related Posts */
.related-posts {
  margin: 60px 0;
}

.related-posts h3 {
  text-align: center;
  margin-bottom: 30px;
  color: var(--primary-color);
}

/* Comments Section */
.comments-area {
  margin-top: 50px;
  padding-top: 30px;
  border-top: 2px solid var(--light-color);
}

.comments-title {
  font-size: 1.5rem;
  margin-bottom: 30px;
  color: var(--dark-color);
}

.comment-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.comment-body {
  padding: 20px;
  margin-bottom: 20px;
  background-color: var(--light-color);
  border-radius: 8px;
  border-left: 4px solid var(--primary-color);
}

.comment-meta {
  display: flex;
  gap: 10px;
  align-items: center;
  margin-bottom: 15px;
  font-size: 14px;
  color: var(--gray);
}

.comment-author {
  font-weight: 600;
  color: var(--dark-color);
}

.comment-content {
  color: var(--dark-color);
  line-height: 1.8;
}

.comment-text p {
  margin-bottom: 10px;
}

.children {
  list-style: none;
  margin: 20px 0 20px 30px;
  padding: 0;
}

.comment-form {
  margin-top: 30px;
  padding: 30px;
  background-color: var(--light-color);
  border-radius: 8px;
}

.comment-form-title {
  font-size: 1.2rem;
  margin-bottom: 20px;
  color: var(--dark-color);
}

.comment-form p {
  margin-bottom: 20px;
}

.comment-form label {
  display: block;
  font-weight: 600;
  margin-bottom: 8px;
  color: var(--dark-color);
}

.comment-form input,
.comment-form textarea {
  width: 100%;
  padding: 10px;
  border: 1px solid var(--gray);
  border-radius: 5px;
  font-family: inherit;
}

.comment-form textarea {
  min-height: 120px;
  resize: vertical;
}

/* ===================================
   SEARCH & ARCHIVE
   =================================== */

.archive-header {
  background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
  color: var(--white);
  padding: 40px;
  border-radius: 8px;
  margin-bottom: 40px;
}

.archive-title {
  color: var(--white);
  margin-bottom: 10px;
}

.archive-description {
  opacity: 0.9;
}

.search-results-count {
  font-size: 14px;
  opacity: 0.9;
  margin: 0;
}

.pagination {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin: 40px 0;
  flex-wrap: wrap;
}

.page-numbers {
  display: inline-block;
  padding: 8px 12px;
  background-color: var(--light-color);
  color: var(--dark-color);
  border-radius: 5px;
  transition: all 0.3s ease;
  text-decoration: none;
}

.page-numbers:hover {
  background-color: var(--primary-color);
  color: var(--white);
}

.page-numbers.current {
  background-color: var(--primary-color);
  color: var(--white);
  font-weight: 600;
}

.page-numbers.dots {
  background-color: transparent;
  cursor: default;
}

/* ===================================
   ERROR PAGE STYLES
   =================================== */

.error-404 {
  text-align: center;
  padding: 60px 20px;
}

.error-404 h1 {
  font-size: 4rem;
  color: var(--primary-color);
  margin-bottom: 20px;
}

.error-404 .alert {
  max-width: 600px;
  margin: 30px auto;
}

.error-404 ul {
  list-style: none;
  margin: 30px 0;
  padding: 0;
}

.error-404 ul li {
  margin: 15px 0;
}

.error-404 ul li a {
  display: inline-block;
  background-color: var(--primary-color);
  color: var(--white);
  padding: 10px 20px;
  border-radius: 5px;
  transition: background-color 0.3s ease;
}

.error-404 ul li a:hover {
  background-color: var(--secondary-color);
  text-decoration: none;
}

/* ===================================
   WIDGET STYLES
   =================================== */

.sidebar-widget.widget_search {
  padding: 0;
}

.search-submit {
  display: inline-block;
  background-color: var(--primary-color);
  color: var(--white);
  padding: 10px 20px;
  border: none;
  border-radius: 5px;
  cursor: pointer;
  font-weight: 600;
  transition: background-color 0.3s ease;
}

.search-submit:hover {
  background-color: var(--secondary-color);
}

.widget_categories ul,
.widget_archive ul,
.widget_recent_posts ul {
  list-style: none;
}

.widget_categories li,
.widget_archive li,
.widget_recent_posts li {
  border-bottom: 1px solid rgba(0, 0, 0, 0.05);
  padding-bottom: 10px;
  margin-bottom: 10px;
}

.widget_categories li:last-child,
.widget_archive li:last-child,
.widget_recent_posts li:last-child {
  border-bottom: none;
}

.widget_calendar table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
}

.widget_calendar table caption {
  font-weight: 600;
  padding: 10px 0;
  color: var(--primary-color);
}

.widget_calendar table th {
  background-color: var(--light-color);
  padding: 5px;
  text-align: center;
}

.widget_calendar table td {
  padding: 5px;
  text-align: center;
  border: 1px solid var(--light-color);
}

.widget_calendar table td a {
  display: block;
  background-color: var(--primary-color);
  color: var(--white);
  padding: 5px;
  border-radius: 3px;
  text-decoration: none;
}

/* ===================================
   CUSTOM STYLES FOR MOBILE DEVICES
   =================================== */

@media (max-width: 768px) {
  .author-box {
    flex-direction: column;
    text-align: center;
  }

  .author-avatar {
    display: flex;
    justify-content: center;
  }

  .archive-header {
    padding: 20px;
  }

  .archive-title {
    font-size: 1.5rem;
  }

  .error-404 h1 {
    font-size: 2.5rem;
  }

  .comment-form {
    padding: 20px;
  }

  .children {
    margin-left: 15px;
  }
}

/* ===================================
   UTILITY CLASSES
   =================================== */

.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;
}

.no-comments {
  text-align: center;
  color: var(--gray);
  font-size: 16px;
  margin: 20px 0;
}

.wp-caption {
  max-width: 100%;
}

.wp-caption img {
  display: block;
}

.wp-caption-text {
  font-size: 13px;
  text-align: center;
  color: var(--gray);
  margin-top: 8px;
}

.gallery {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 15px;
  margin: 20px 0;
}

.gallery-item {
  overflow: hidden;
  border-radius: 5px;
}

.gallery-item img {
  display: block;
  width: 100%;
  height: 150px;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.gallery-item img:hover {
  transform: scale(1.05);
}

/* ===================================
   SKIP LINK
   =================================== */

.skip-link {
  background-color: #f1d5e4;
  box-shadow: 0 0 0 2px var(--primary-color);
  color: var(--primary-color);
  display: block;
  font-weight: 600;
  left: -9999rem;
  outline-offset: -2px;
  padding: 1.5rem;
  text-decoration: none;
  z-index: 20;
}

.skip-link:focus {
  left: 6px;
  top: 7px;
  width: auto;
}
