/*
Theme Name: Ravypa Blog
Theme URI: https://ravypa.cz
Author: Ravypa.cz
Author URI: https://ravypa.cz
Description: Custom WordPress téma pro blog Ravypa.cz - napojené na hlavní web
Version: 1.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: ravypa-blog
*/

/* 
   Všechny styly jsou načtené z hlavního webu 
   (/assets/stylesheets/site-177f9a89.css a redesign.css)
   Zde jsou jen drobné úpravy pro WordPress blog
*/

/* WordPress Blog specifické styly */

/* Header s background obrázkem na detailu článku */
.single #header {
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  position: relative;
}

.header-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(106, 14, 73, 0.85);
  z-index: 0;
}

.single #header .navbar,
.single #header .container {
  position: relative;
  /* z-index: 1; */
}

.single #header h1 {
  color: white;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

/* Fix pro šířku obsahu článku */
.full {
  width: 100%;
}

/* Meta informace v headeru na detailu článku */
.single-header-meta {
  display: flex;
  align-items: center;
  gap: 12px;
  justify-content: start;
}

.single-header-meta .post-date {
  color: white;
  font-size: 0.85rem;
}

.single-header-meta .post-separator {
  color: rgba(255, 255, 255, 0.6);
  font-size: 0.85rem;
}

.single-header-meta .post-categories .category-tag {
  display: inline-block;
  padding: 2px 8px;
  line-height: 1.5;
  background: #7c9d6e;
  color: white;
  border-radius: 1000px;
  font-size: 0.8rem;
  font-weight: 500;
  margin-bottom: 5px;
}

/* Prokliknutelné tagy v hlavičce */
.tagy a {
  text-decoration: none;
  color: white;
}

.tagy a span {
  cursor: pointer;
  transition: all 0.3s ease;
  color: white;
}

.tagy a:hover span {
  background-color: #6a8a5d;
  transform: scale(1.05);
  color: white;
}

.tagy a.active span {
  background-color: #5a7a4d;
  font-weight: bold;
  color: white;
}

.blog-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 40px 20px;
}

.blog-header {
  margin-bottom: 40px;
}

.blog-title {
  font-size: 2.5rem;
  margin-bottom: 20px;
  color: #333;
}

/* Výpis článků - kartový design */
.blog-posts {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
  gap: 30px;
  padding: 20px 0;
}

.blog-post {
  background: white;
  border-radius: 12px;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
  overflow: hidden;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  display: flex;
  flex-direction: column;
  height: 100%;
  position: relative;
  cursor: pointer;
}

.blog-post:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
}

/* Roztáhnout odkaz z nadpisu přes celou kartu */
.blog-post h2 a::after {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 1;
}

/* Tlačítko "Číst celý článek" musí být nad stretched linkem */
.blog-post-more {
  position: relative;
  z-index: 2;
}

.blog-post-thumbnail {
  width: 100%;
  height: 280px;
  overflow: hidden;
  background: #f5f5f5;
}

.blog-post-thumbnail img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.blog-post:hover .blog-post-thumbnail img {
  transform: scale(1.05);
}

.blog-post-thumbnail a {
  display: block;
  width: 100%;
  height: 100%;
}

.blog-post-content-wrapper {
  padding: 25px;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}

.blog-post h2 {
  font-size: 1.5rem;
  margin-bottom: 10px;
  line-height: 1.3;
}

.blog-post h2 a {
  color: #333;
  text-decoration: none;
  transition: color 0.3s;
}

.blog-post h2 a:hover {
  color: #7c9d6e;
}

.blog-post-meta {
  color: #999;
  font-size: 0.85rem;
  margin-bottom: 0;
  display: flex;
  align-items: center;
  gap: 12px;
}

.blog-post-meta .post-date {
  display: flex;
  align-items: center;
}

.blog-post-meta .post-separator {
  display: flex;
  align-items: center;
  color: #ccc;
}

.blog-post-meta .post-categories {
  display: inline-flex;
  gap: 8px;
  flex-wrap: wrap;
  align-items: center;
}

.blog-post-meta .post-categories a {
  display: inline-block;
  padding: 2px 8px;
  line-height: 1.5;
  background: #7c9d6e;
  color: white;
  text-decoration: none;
  font-weight: 500;
  border-radius: 1000px;
  font-size: 0.8rem;
  transition: background 0.3s ease;
  position: relative;
  z-index: 2;
  margin-bottom: 5px;
}

.blog-post-meta .post-categories a:hover {
  background: #6a8a5d;
}

.blog-post-excerpt {
  line-height: 1.6;
  color: #666;
  flex-grow: 1;
  font-size: 0.95rem;
}

.blog-post-excerpt p {
  margin-top: 0;
}

.blog-post-more {
  display: inline-block;
  padding: 5px 18px;
  background: #7c9d6e;
  color: white;
  text-decoration: none;
  border-radius: 6px;
  transition: all 0.3s;
  text-align: center;
  font-weight: 500;
  align-self: flex-start;
  font-size: 16px;
}

.blog-post-more:hover {
  background: #6a8a5d;
  transform: translateX(5px);
}

/* Responsive */
@media (max-width: 768px) {
  .blog-posts {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  /* Fix pro obsah článků na mobilech */
  .blog-container {
    padding: 20px 15px;
  }

  .single-post-content {
    font-size: 1rem;
    max-width: 100%;
  }

  .single-post-content img {
    max-width: 100%;
    height: auto;
  }

  /* Zajistit že obrázky v obsahu nepřetečou */
  .single-post-content p,
  .single-post-content ul,
  .single-post-content ol,
  .single-post-content blockquote {
    word-wrap: break-word;
    overflow-wrap: break-word;
  }
}

/* Extra malé mobilní obrazovky */
@media (max-width: 480px) {
  .blog-container {
    padding: 15px 10px;
  }

  .blog-post-content-wrapper {
    padding: 20px;
  }

  .single-post-content {
    font-size: 0.95rem;
  }

  .blog-post h2 {
    font-size: 1.3rem;
  }
}

/* Jednotlivý článek */
.single-post {
  width: 100%;
}

.single-post-content {
  line-height: 1.8;
  font-size: 1.1rem;
  margin-bottom: 30px;
}

.single-post-content img {
  max-width: 100%;
  height: auto;
  border-radius: 8px;
  margin: 20px 0;
}

.single-post-content p {
  margin-bottom: 20px;
}

.single-post-content h2,
.single-post-content h3 {
  margin-top: 40px;
  margin-bottom: 20px;
  color: #333;
}

.single-post-content ul,
.single-post-content ol {
  margin-bottom: 20px;
  padding-left: 30px;
}

.single-post-content li {
  margin-bottom: 10px;
}

/* Navigace mezi články */
.post-navigation {
  display: flex;
  justify-content: space-between;
  margin-top: 50px;
  padding-top: 30px;
  border-top: 1px solid #eee;
}

.post-navigation a {
  color: #7c9d6e;
  text-decoration: none;
}

.post-navigation a:hover {
  text-decoration: underline;
}

@media only screen and (max-width: 768px) {
  .post-navigation {
    display: none;
  }
}

/* Pagination */
.pagination {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin-top: 50px;
  grid-column: 1 / -1;
}

.pagination .page-numbers {
  padding: 10px 16px;
  border: 2px solid #e0e0e0;
  text-decoration: none;
  color: #333;
  border-radius: 6px;
  transition: all 0.3s;
  font-weight: 500;
}

.pagination .page-numbers.current {
  background: #7c9d6e;
  color: white;
  border-color: #7c9d6e;
}

.pagination a.page-numbers:hover {
  background: #7c9d6e;
  color: white;
  border-color: #7c9d6e;
  transform: translateY(-2px);
}

.pagination .dots {
  padding: 10px 16px;
  color: #999;
}

/* Reference Section Styles */
#references {
  padding-bottom: 60px;
}

/* Margin top pro stránku Sportovní výživa */
.vyziva #references {
  margin-top: 50px;
}

#references .title-bg {
  background-color: #1c345a;
  padding: 60px 0;
  text-align: center;
}

#references .title-bg h2 {
  color: white;
  margin: 0 0 20px 0;
  font-size: 32px;
}

@media only screen and (min-width: 768px) {
  #references .title-bg h2 {
    font-size: 40px;
  }
}

#references .subtitle {
  color: white;
  font-size: 18px;
  margin: 0;
  opacity: 0.9;
}

@media only screen and (min-width: 768px) {
  #references .subtitle {
    font-size: 22px;
  }
}

#references .references-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 40px;
  margin-top: 60px;
  margin-bottom: 40px;
}

@media only screen and (min-width: 992px) {
  #references .references-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 50px;
  }

  /* První reference (rodiče Vojtěcha) na celou šířku */
  #references .reference-item:nth-child(1) {
    grid-column: 1 / -1;
  }
}

#references .reference-item {
  background: #f9f9f9;
  border-radius: 8px;
  padding: 30px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
  display: flex;
  flex-direction: column;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

#references .reference-item:hover {
  transform: translateY(-5px);
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.12);
}

#references .reference-content {
  flex: 1;
  margin-bottom: 20px;
}

#references .reference-content p {
  color: #333;
  line-height: 1.7;
  margin-bottom: 15px;
  font-size: 15px;
}

#references .reference-content p:last-child {
  margin-bottom: 0;
}

#references .reference-thanks {
  font-style: italic;
  color: #6a0e49;
  margin-top: 10px;
}

#references .reference-author {
  color: #1c345a;
  font-size: 16px;
  padding-top: 20px;
  border-top: 2px solid #e0e0e0;
  margin-top: auto;
}

#references .reference-author strong {
  font-weight: 700;
  color: #6a0e49;
}
