/* Reset and Base Styles */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  /* Colors */
  --primary-blue: #6b9bd2;
  --primary-blue-dark: #5a8bc4;
  --secondary-beige: #f7f5f3;
  --secondary-ivory: #fefcfa;
  --accent-coral: #e8a598;
  --accent-sage: #a8c09a;
  --text-dark: #2c3e50;
  --text-medium: #5d6d7e;
  --text-light: #85929e;
  --white: #ffffff;
  --border-light: #e8e8e8;

  /* Typography */
  --font-serif: "Merriweather", serif;
  --font-sans: "Open Sans", sans-serif;

  /* Spacing */
  --container-max-width: 1200px;
  --section-padding: 4rem 0;
  --element-spacing: 1.5rem;

  /* Borders */
  --border-radius: 6px;
  --border-radius-small: 4px;

  /* Shadows */
  --shadow-light: 0 2px 8px rgba(0, 0, 0, 0.1);
  --shadow-medium: 0 4px 16px rgba(0, 0, 0, 0.15);
}

body {
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.6;
  color: var(--text-dark);
  background-color: var(--white);
  user-select: none;
  -webkit-user-select: none;
  -ms-user-select: none;
  -moz-user-select: none;
}

.container {
  max-width: var(--container-max-width);
  margin: 0 auto;
  padding: 0 1rem;
}

/* Header Styles */
.header {
  background-color: var(--white);
  box-shadow: var(--shadow-light);
  position: sticky;
  top: 0;
  z-index: 1000;
}

.nav-container {
  max-width: var(--container-max-width);
  margin: 0 auto;
  padding: 0 1rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 70px;
}

.nav-logo a {
  font-family: var(--font-serif);
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--primary-blue);
  text-decoration: none;
}

.nav-menu {
  display: flex;
  list-style: none;
  gap: 2rem;
}

.nav-link {
  color: var(--text-dark);
  text-decoration: none;
  font-weight: 500;
  transition: color 0.3s ease;
  position: relative;
}

.nav-link:hover,
.nav-link.active {
  color: var(--primary-blue);
}

.nav-link.active::after {
  content: "";
  position: absolute;
  bottom: -8px;
  left: 0;
  right: 0;
  height: 2px;
  background-color: var(--primary-blue);
}

.search-btn {
  background: none;
  border: none;
  color: var(--text-medium);
  cursor: pointer;
  padding: 0.5rem;
  border-radius: var(--border-radius-small);
  transition: background-color 0.3s ease;
}

.search-btn:hover {
  background-color: var(--secondary-beige);
}

.nav-toggle {
  display: none;
  flex-direction: column;
  cursor: pointer;
  gap: 4px;
}

.nav-toggle span {
  width: 25px;
  height: 3px;
  background-color: var(--text-dark);
  transition: 0.3s;
}

/* Hero Section */
.hero {
  background: linear-gradient(
    135deg,
    var(--secondary-ivory) 0%,
    var(--secondary-beige) 100%
  );
  padding: 4rem 0;
  display: flex;
  align-items: center;
  min-height: 500px;
}

.hero-content {
  max-width: var(--container-max-width);
  margin: 0 auto;
  padding: 0 1rem;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  align-items: center;
}

.hero-title {
  font-family: var(--font-serif);
  font-size: 2.5rem;
  font-weight: 700;
  color: var(--text-dark);
  margin-bottom: 1rem;
  line-height: 1.2;
}

.hero-subtitle {
  font-size: 1.1rem;
  color: var(--text-medium);
  margin-bottom: 2rem;
  line-height: 1.6;
}

.hero-cta {
  display: inline-block;
  background-color: var(--accent-coral);
  color: var(--white);
  padding: 1rem 2rem;
  text-decoration: none;
  border-radius: var(--border-radius);
  font-weight: 600;
  transition: all 0.3s ease;
  box-shadow: var(--shadow-light);
}

.hero-cta:hover {
  background-color: var(--primary-blue);
  transform: translateY(-2px);
  box-shadow: var(--shadow-medium);
}

.hero-image img {
  width: 100%;
  height: auto;
  border-radius: var(--border-radius);
  box-shadow: var(--shadow-medium);
}

/* Featured Content */
.featured-content {
  padding: var(--section-padding);
}

.content-grid {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 3rem;
}

.section-title {
  font-family: var(--font-serif);
  font-size: 2rem;
  color: var(--text-dark);
  margin-bottom: 2rem;
}

.article-grid {
  display: grid;
  gap: 2rem;
}

.article-card {
  background-color: var(--white);
  border-radius: var(--border-radius);
  overflow: hidden;
  box-shadow: var(--shadow-light);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.article-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-medium);
}

.article-card.featured {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
}

.article-image img {
  width: 100%;
  height: 200px;
  object-fit: cover;
}

.article-content {
  padding: 1.5rem;
}

.article-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
}

.article-category {
  background-color: var(--accent-sage);
  color: var(--white);
  padding: 0.25rem 0.75rem;
  border-radius: 20px;
  font-size: 0.875rem;
  font-weight: 500;
}

.article-date {
  color: var(--text-light);
  font-size: 0.875rem;
}

.article-title {
  margin-bottom: 1rem;
}

.article-title a {
  font-family: var(--font-serif);
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--text-dark);
  text-decoration: none;
  line-height: 1.3;
}

.article-title a:hover {
  color: var(--primary-blue);
}

.article-excerpt {
  color: var(--text-medium);
  margin-bottom: 1rem;
  line-height: 1.6;
}

.read-more {
  color: var(--primary-blue);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.read-more:hover {
  color: var(--primary-blue-dark);
}

/* Sidebar */
.sidebar-widget {
  background-color: var(--secondary-beige);
  padding: 1.5rem;
  border-radius: var(--border-radius);
  margin-bottom: 2rem;
}

.widget-title {
  font-family: var(--font-serif);
  font-size: 1.25rem;
  color: var(--text-dark);
  margin-bottom: 1rem;
}

.recent-posts {
  list-style: none;
}

.recent-posts li {
  padding: 0.75rem 0;
  border-bottom: 1px solid var(--border-light);
}

.recent-posts li:last-child {
  border-bottom: none;
}

.recent-posts a {
  color: var(--text-dark);
  text-decoration: none;
  font-weight: 500;
  display: block;
  margin-bottom: 0.25rem;
}

.recent-posts a:hover {
  color: var(--primary-blue);
}

.recent-posts time {
  color: var(--text-light);
  font-size: 0.875rem;
}

.topic-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.topic-tag {
  background-color: var(--white);
  color: var(--text-medium);
  padding: 0.5rem 1rem;
  border-radius: 20px;
  text-decoration: none;
  font-size: 0.875rem;
  transition: all 0.3s ease;
}

.topic-tag:hover {
  background-color: var(--primary-blue);
  color: var(--white);
}

.newsletter {
  background-color: var(--primary-blue);
  color: var(--white);
}

.newsletter .widget-title {
  color: var(--white);
}

.newsletter p {
  margin-bottom: 1rem;
  opacity: 0.9;
}

.newsletter-form {
  display: flex;
  gap: 0.5rem;
}

.newsletter-form input {
  flex: 1;
  padding: 0.75rem;
  border: none;
  border-radius: var(--border-radius-small);
  font-size: 0.9rem;
}

.newsletter-form button {
  background-color: var(--accent-coral);
  color: var(--white);
  border: none;
  padding: 0.75rem 1rem;
  border-radius: var(--border-radius-small);
  font-weight: 600;
  cursor: pointer;
  transition: background-color 0.3s ease;
}

.newsletter-form button:hover {
  background-color: var(--accent-sage);
}

/* Footer */
.footer {
  background-color: var(--text-dark);
  color: var(--white);
  padding: 3rem 0 1rem;
}

.footer-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
  margin-bottom: 2rem;
}

.footer-column h4 {
  font-family: var(--font-serif);
  font-size: 1.1rem;
  margin-bottom: 1rem;
  color: var(--white);
}

.footer-column p {
  color: #bdc3c7;
  line-height: 1.6;
  margin-bottom: 1rem;
}

.footer-column ul {
  list-style: none;
}

.footer-column ul li {
  margin-bottom: 0.5rem;
}

.footer-column ul li a {
  color: #bdc3c7;
  text-decoration: none;
  transition: color 0.3s ease;
}

.footer-column ul li a:hover {
  color: var(--primary-blue);
}

.footer-newsletter {
  display: flex;
  gap: 0.5rem;
}

.footer-newsletter input {
  flex: 1;
  padding: 0.75rem;
  border: 1px solid #34495e;
  border-radius: var(--border-radius-small);
  background-color: #34495e;
  color: var(--white);
  font-size: 0.9rem;
}

.footer-newsletter input::placeholder {
  color: #bdc3c7;
}

.footer-newsletter button {
  background-color: var(--primary-blue);
  color: var(--white);
  border: none;
  padding: 0.75rem 1rem;
  border-radius: var(--border-radius-small);
  font-weight: 600;
  cursor: pointer;
  transition: background-color 0.3s ease;
}

.footer-newsletter button:hover {
  background-color: var(--primary-blue-dark);
}

.footer-bottom {
  border-top: 1px solid #34495e;
  padding-top: 1rem;
  text-align: center;
}

.footer-bottom p {
  color: #bdc3c7;
  font-size: 0.9rem;
}

/* Responsive Design */
@media (max-width: 768px) {
  .nav-menu {
    position: fixed;
    left: -100%;
    top: 70px;
    flex-direction: column;
    background-color: var(--white);
    width: 100%;
    text-align: center;
    transition: 0.3s;
    box-shadow: var(--shadow-light);
    padding: 2rem 0;
  }

  .nav-menu.active {
    left: 0;
  }

  .nav-toggle {
    display: flex;
  }

  .hero-content {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .hero-title {
    font-size: 2rem;
  }

  .content-grid {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .article-card.featured {
    grid-template-columns: 1fr;
  }

  .footer-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
  }

  .newsletter-form,
  .footer-newsletter {
    flex-direction: column;
  }
}

@media (max-width: 480px) {
  .hero-title {
    font-size: 1.75rem;
  }

  .section-title {
    font-size: 1.5rem;
  }

  .footer-grid {
    grid-template-columns: 1fr;
  }
}

/* Accessibility */
@media (prefers-reduced-motion: reduce) {
  * {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* Focus styles for keyboard navigation */
a:focus,
button:focus,
input:focus {
  outline: 2px solid var(--primary-blue);
  outline-offset: 2px;
}

/* Screen reader only text */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* Заборона копіювання тексту на всьому сайті */
body,
p,
h1,
h2,
h3,
h4,
h5,
h6,
li,
span,
a,
.article-content,
.main-content,
.resource-content,
.sidebar,
.footer,
.header,
.page-title,
.page-subtitle {
  user-select: none;
  -webkit-user-select: none;
  -ms-user-select: none;
  -moz-user-select: none;
}
