/*
Theme Name: PRO-AGRO
Theme URI: https://pro-agro.rs/
Author: sala2000
Description: PRO-AGRO
Version: 1.1.3
Text Domain: proagro
*/

:root {
  --primary: #ef1c23;
  --secondary: #781800;
  --light: #f5f5f5;
  --dark: rgba(0,0,0,0.6);
  --text: #282829;
  --white: #ffffff;
}

/* Base Styles */
html {
  scroll-behavior: smooth;
}

body,
.page-content {
  font-family: 'Roboto', -apple-system, BlinkMacSystemFont, sans-serif;
  font-size: 18px;
  color: var(--text);
  line-height: 1.6;
}

a {
  color: var(--primary);
  text-decoration: none;
  transition: color 0.3s;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
  /* loading: lazy; */
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
  color: var(--primary);
  margin-top: 1.5em;
  hyphens: auto;
}

.nav {
  --bs-nav-link-font-size: 18px;
  --bs-nav-link-font-weight: 800;
  --bs-nav-link-color: var(--text);
}

/* Общие стили для одиночных записей */
.main-content {
    font-family: 'Roboto', -apple-system, BlinkMacSystemFont, sans-serif;
}

.page-title, .section-title {
  color: var(--primary);
  font-family: 'Roboto', -apple-system, BlinkMacSystemFont, sans-serif;
  font-size: 34px;
  font-weight: 600;
  margin-top: 1.5em;
  /* margin-bottom: 30px; */
  margin-bottom: 2rem !important;
  position: relative;
  padding-bottom: 15px;
  hyphens: auto;
}

/* .page-title:after, .section-title:after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 50px;
  height: 3px;
  background: var(--primary);
  margin-bottom: 2rem !important;
} */

.about-text {
  font-family: 'Roboto', -apple-system, BlinkMacSystemFont, sans-serif;
  font-size: 18px;
  color: var(--text);
  line-height: 1.6;
  background: var(--light);
  padding: 2rem;
  border-radius: 8px;
  height: 100%;
  display: flex;
  flex-direction: column;
}

.about-image img {
  /* width: 100%; */
  /* height: auto; */
  border-radius: 8px;
  display: block;
  box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

/* Стили для одиночных постов */
.post-article,
.service-article {
  font-family: inherit;
}

.post-container,
.service-container {
  max-width: 800px;
  margin: 0 auto;
  padding: 0 15px;
}

.post-title,
.service-title {
  font-size: 2.5rem;
  color: var(--primary);
  margin-bottom: 1.5rem;
  font-weight: 600;
}

.post-meta {
  font-size: 0.9rem;
  margin-bottom: 1.5rem;
  color: var(--dark);
}

.post-featured-image,
.service-featured-image {
  margin: 2rem 0;
}

.post-image,
.service-image {
  width: 100%;
  height: auto;
  border-radius: 8px;
  display: block;
}

.post-entry-content,
.service-entry-content {
  font-size: 1.1rem;
  line-height: 1.8;
  color: var(--text);
}

.post-entry-content p,
.service-entry-content p {
  margin-bottom: 1.5rem;
}

/* Принудительно переопределяем стили редактора */
.post-entry-content *,
.service-entry-content * {
  font-family: inherit !important;
  color: inherit !important;
  line-height: inherit !important;
}

/* Стили для изображений внутри контента постов */
.post-entry-content img,
.service-entry-content img {
  border-radius: 8px !important;
  margin: 1.5rem 0;
}

/* Специфичные стили для изображений с классами wp-image-* */
.post-entry-content img[class*="wp-image-"],
.service-entry-content img[class*="wp-image-"] {
  border-radius: 8px !important;
  height: auto;
  max-width: 100%;
}

/* Components */
.btn,
.proagro-btn,
.proagro-btn-primary {
  display: inline-block;
  background: var(--primary);
  color: var(--white) !important;
  padding: 12px 30px;
  border-radius: 0;
  text-transform: uppercase;
  font-weight: 600;
  letter-spacing: 1px;
  border: none;
  transition: all 0.3s;
}

.proagro-btn-outline {
  border: 2px solid var(--primary);
  color: var(--primary) !important;
  padding: 8px 20px;
  border-radius: 4px;
  font-size: 2.5rem;
  font-weight: 600;
}

.proagro-btn-outline:hover {
    background-color: var(--primary);
    color: var(--secondary) !important;
}

/* Header */
.header {
  background: var(--light);
  padding: 15px 0;
  position: relative;
  z-index: 1000;
}

.header .proagro-btn-primary {
  background-color: var(--primary);
  color: var(--white) !important;
  padding: 10px 25px;
  border-radius: 4px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  transition: all 0.3s ease;
  border: 2px solid var(--primary);
  /* box-shadow: 0 2px 10px var(--primary); */
}

.header .proagro-btn-primary:hover {
  background-color: var(--light);
  color: var(--primary) !important;
  border-color: var(--primary);
  transform: translateY(-2px);
  /* box-shadow: 0 4px 15px var(--primary); */
}

.header .proagro-btn-primary:active {
  transform: translateY(0);
  /* box-shadow: 0 2px 5px var(--primary); */
}

.navbar {
  padding: 0;
  box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.navbar-brand {
  margin-right: 0;
  padding: 10px 0;
}

.navbar-brand img {
  height: 60px;
  width: auto;
}

.navbar-nav {
  flex-wrap: wrap;
  justify-content: center;
  max-width: 800px;
  margin: 0 auto;
}

.nav-item {
  white-space: nowrap;
}

.nav-link {
  font-family: 'Roboto', -apple-system, BlinkMacSystemFont, sans-serif;
  font-size: var(--bs-nav-link-font-size) !important;
  font-weight: var(--bs-nav-link-font-weight) !important;
  padding: 1rem 1.25rem !important;
  color: var(--text) !important;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  transition: all 0.2s ease-in-out;
  position: relative;
}

/* .nav-link:hover,
.nav-link.active {
  color: var(--primary) !important;
} */

.nav-link:hover {
  color: var(--primary) !important;
  transform: translateY(-1px);
}

.nav-link:focus {
  color: var(--primary) !important;
}

.nav-link.active {
  color: var(--primary) !important;
  font-weight: 700 !important;
  position: relative;
}

.nav-link.active:after {
  content: '';
  position: absolute;
  bottom: -5px;
  left: 1rem;
  right: 1rem;
  height: 2px;
  background: var(--primary);
}

/* Dropdown menu */
.dropdown-menu {
  border: none;
  box-shadow: 0 5px 15px rgba(0,0,0,0.1);
  margin-top: 0;
}

.dropdown-item {
  font-weight: 500;
  transition: all 0.2s;
  padding: 0.4rem 1.2rem;
}

.dropdown-item:hover {
  background-color: var(--light);
  color: var(--primary);
  transform: translateX(3px);
}

.dropdown-item:focus {
  background-color: var(--light);
  color: var(--primary);
}

.navbar-toggler {
  border: none;
  padding: 0.4rem;
}

.navbar-toggler:focus {
  box-shadow: none;
}

/* Cards */
.hero-story,
.news-card,
.service-card {
  background: var(--light);
  border-radius: 0 0 40px 0;
  padding: 20px;
  transition: all 0.3s;
  height: 100%;
  position: relative;
  overflow: hidden;
}

.hero-story:hover,
.news-card:hover,
.service-card:hover {
  transform: translateY(-5px);
  /* box-shadow: 0 10px 25px var(--dark); */
  box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.hero-image {
  height: 100%;
  max-height: 400px;
  object-fit: cover;
  border-radius: 8px;
}

.news-card-thumbnail img,
.service-card-thumbnail img {
  height: 200px;
  object-fit: cover;
  border-radius: 8px;
}

.hero-story-title,
.news-card-title,
.service-card-title {
  /* font-size: 26px; */
  /* margin-bottom: 20px; */
  font-size: 1.8rem;
  color: var(--primary);
  margin-bottom: 1.2rem;
  font-weight: 600;
}

.hero-story-title a,
.news-card-title a,
.service-card-title a {
  color: var(--primary);
  text-decoration: none;
}

.hero-story-title a:hover,
.news-card-title a:hover,
.service-card-title a:hover {
  color: var(--secondary);
}

.news-card-meta {
  color: #666;
  font-size: 0.9rem;
}

.hero-story-excerpt,
.news-card-excerpt,
.service-card-excerpt
 {
  font-family: 'Roboto', -apple-system, BlinkMacSystemFont, sans-serif;
  font-size: 1.2rem;
  /* font-size: 18px; */
  color: var(--text);
  line-height: 1.5;
  /* line-height: 1.6;
  background: var(--light); */
  padding: 2rem;
  /* border-radius: 8px;
  height: 100%;
  display: flex;
  flex-direction: column; */
  margin: 1rem 0;
}

.read-more {
  position: absolute;
  bottom: 15px;
  right: 15px;
  margin-top: 15;
  text-decoration: none !important;
}

.read-more-icon {
  display: inline-flex;
}

.read-more-icon .bi {
  color: var(--primary);
  font-size: 2.5rem;
}

.read-more:hover .read-more-icon .bi {
  color: var(--secondary);
}

.proagro-more-link {
  display: inline-flex;
  /* align-items: center; */
  color: var(--primary);
  font-size: 1.8rem;
  font-weight: 600;
  transition: all 0.3s ease;
  text-decoration: none;
}

.proagro-more-link a {
  color: var(--primary);
  text-decoration: none;
}

.proagro-more-link:hover {
  color: var(--secondary);
  transform: translateX(5px);
}

/* .proagro-more-link:after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 50px;
  height: 3px;
  background: var(--primary);
} */

/* .proagro-more-link .bi {
  color: var(--primary);
  font-size: 2rem;
  font-weight: 600;
  transition: transform 0.3s ease;
}

.proagro-more-link a .bi {
  color: var(--primary);
  text-decoration: none;
}

.proagro-more-link:hover .bi {
  transform: translateX(3px);
} */

/* Banner */
.proagro-banner {
  width: 100%;
  height: 300px;
  overflow: visible;
  margin-top: 200px;
  position: relative;
}

.banner-background {
  background-color: var(--primary);
  height: 100%;
  position: relative;
  z-index: 1;
}

.banner-image-wrapper {
  position: absolute;
  left: 50%;
  top: -235px;
  transform: translateX(-50%);
  z-index: 2;
  transform-origin: center bottom;
}

.banner-image {
  width: 466px;
  height: 535px;
  display: block;
  transition: transform 0.3s ease;
  transform-origin: center bottom;
}

.banner-link {
  font-size: 3rem;
  font-weight: bold;
  color: var(--white);
  text-decoration: none;
  text-align: right;
  display: inline-block;
  transition: transform 0.3s ease;
}

.banner-features li {
  font-size: 1.2rem;
  margin-bottom: 0.5rem;
}

.banner-features i {
  color: var(--white);
  margin-right: 5px;
}

/* Анимации при наведении */
.banner-link:hover {
  transform: scale(1.05);
}

.banner-image:hover {
  transform: scale(1.05);
}

/* Contact Page Styles */
.main-content .container .row.g-4 {
  margin-bottom: 4rem; /* Увеличиваем отступ снизу */
}

.contact-info {
  background: var(--light);
  padding: 2rem;
  border-radius: 8px;
  height: 100%;
  display: flex;
  flex-direction: column;
}

.contact-subtitle {
  color: var(--primary);
  margin-bottom: 1.5rem;
  font-size: 1.5rem;
}

.contact-details {
  flex: 1;
}
.contact-details p {
  margin-bottom: 1rem;
  font-size: 1.1rem;
}

.contact-details i {
  color: var(--primary);
  margin-right: 10px;
  width: 20px;
  text-align: center;
}

.contact-link {
  color: var(--text) !important;
  text-decoration: none;
}

.contact-link:hover {
  color: var(--primary) !important;
}

.openstreetmap-container {
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 5px 15px rgba(0,0,0,0.1);
  height: 100%;
  /* min-height: 400px; */
  /* display: flex;
  flex-direction: column; */
}

.openstreetmap-container iframe {
  width: 100%;
  height: 400px;
  display: block;
}

/* Footer */
.footer {
  background: linear-gradient(rgba(0,0,0,0.8), rgba(0,0,0,0.9));
  color: var(--white);
  padding: 40px 0 20px;
}

.logo_footer img {
    height: 50px;
    width: auto;
}

.footer-title {
  color: var(--white);
  font-size: 1.2rem;
  margin-bottom: 20px;
  text-transform: uppercase;
}

.footer-menu {
  display: flex;
  flex-direction: column;
  list-style: none;
  padding: 0;
  margin: 0;
}

.footer-menu li {
  margin-bottom: 10px;
  margin-right: 0;
}

.footer-menu a {
  color: var(--white);
  text-decoration: none;
  transition: color 0.3s;
  display: block;
  padding: 5px 0;
}

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

.footer-contacts address p {
  margin-bottom: 10px;
  line-height: 1.6;
}

.footer-contacts address .bi {
  margin-right: 8px;
  color: var(--primary);
}

.footer-link {
  color: var(--white) !important;
  text-decoration: none;
}

.footer-link:hover {
  color: var(--primary) !important;
}

/* Responsive */
@media (max-width: 1199.98px) {
  .navbar-nav {
      max-width: 700px;
  }
}

@media (max-width: 991.98px) {
  .navbar-collapse {
      padding-top: 20px;
      text-align: center;
  }

  .navbar-nav {
      margin-bottom: 15px;
  }

  .nav-link {
    font-size: 16px !important;
    padding: 0.5rem 0.75rem !important;
  }

  .header .proagro-btn-primary {
      margin-left: 0 !important;
      margin-top: 10px;
  }

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

  .contact-info {
      min-height: auto;
      padding: 1.5rem;
  }

  .openstreetmap-container {
      margin-top: 2rem;
  }

  .openstreetmap-container iframe {
      height: 350px;
  }
}

@media (max-width: 768px) {
  .proagro-banner {
      margin-top: 50px;
      height: auto;
      padding: 40px 0;
  }

  .banner-image-wrapper {
      display: none;
  }

  .banner-background {
      height: auto;
  }

  .banner-link {
      font-size: 1.8rem;
      text-align: center;
      display: block;
      margin-bottom: 20px;
  }

  .banner-features {
      text-align: center;
      padding: 0;
  }

  .row.align-items-center {
      flex-direction: column;
  }

  .col-md-3.text-white {
      width: 100%;
      text-align: center !important;
      margin-bottom: 20px;
  }

  .col-md-6 {
      display: none;
  }
}

@media (max-width: 767.98px) {
  .navbar-brand img {
      height: 50px;
      width: auto;
  }

  .footer .col-md-4 {
    margin-bottom: 30px;
    text-align: left !important;
  }

  .news-card-thumbnail img,
  .service-card-thumbnail img {
    height: 150px;
    border-radius: 6px;
  }
}
