/*
Theme Name: Poznaj Polskę
Theme URI: https://poznajpol.pl
Author: poznajpol.pl
Author URI: https://poznajpol.pl
Description: WordPress theme converted from static site.
Version: 1.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: poznaj-polske
*/

/* Custom CSS from original index.html */
body {
  font-family: 'Inter', sans-serif;
  background-color: #F9FAFB;
  color: #111827;
}

.custom-scrollbar::-webkit-scrollbar {
  width: 8px;
}

.custom-scrollbar::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.1);
  border-radius: 10px;
}

.custom-scrollbar::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.2);
  border-radius: 10px;
}

.custom-scrollbar::-webkit-scrollbar-thumb:hover {
  background: rgba(220, 38, 38, 0.6);
}

.perspective-1000 {
  perspective: 1000px;
}

/* Card Stack Transitions */
.card-stack-item {
  transition: all 0.5s cubic-bezier(0.25, 0.8, 0.25, 1);
  position: absolute;
  inset: 0;
  transform-origin: bottom center;
  backface-visibility: hidden;
  will-change: transform, opacity;
}

.card-exit-left {
  transform: translateX(-120%) rotate(-20deg) !important;
  opacity: 0 !important;
}

.card-exit-right {
  transform: translateX(120%) rotate(20deg) !important;
  opacity: 0 !important;
}

.animation-delay-2000 {
  animation-delay: 2s;
}

.animation-delay-4000 {
  animation-delay: 4s;
}

/* Pagination */
.pagination-container ul {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.pagination-container ul li {
  display: inline-flex;
}

.pagination-container .page-numbers {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
  border-radius: 9999px;
  font-size: 0.875rem;
  font-weight: 500;
  color: #4b5563;
  transition: all 0.2s;
  text-decoration: none;
}

.pagination-container .page-numbers:hover:not(.current):not(.dots) {
  background-color: #f3f4f6;
  color: #111827;
}

.pagination-container .page-numbers.current {
  background-color: #DC2626;
  /* polishRed */
  color: white;
}

.pagination-container .page-numbers.dots {
  color: #6b7280;
}

/* Blog Post Styles */
.post-card {
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.post-card:hover {
  transform: translateY(-4px);
}

.post-card .post-thumbnail-link img {
  transition: transform 0.3s ease;
}

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

/* Single Post Styles */
.single-post-container {
  animation: fadeIn 0.5s ease-in;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.post-content.prose {
  line-height: 1.8;
}

.post-content.prose h1,
.post-content.prose h2,
.post-content.prose h3,
.post-content.prose h4,
.post-content.prose h5,
.post-content.prose h6 {
  margin-top: 2rem;
  margin-bottom: 1rem;
  font-weight: 700;
  line-height: 1.3;
}

.post-content.prose p {
  margin-bottom: 1.5rem;
}

.post-content.prose a {
  color: #DC2626;
  text-decoration: underline;
  transition: color 0.2s;
}

.post-content.prose a:hover {
  color: #991B1B;
}

.post-content.prose img {
  border-radius: 0.5rem;
  margin: 2rem auto;
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
}

.post-content.prose ul,
.post-content.prose ol {
  margin-bottom: 1.5rem;
  padding-left: 2rem;
}

.post-content.prose li {
  margin-bottom: 0.5rem;
}

.post-content.prose blockquote {
  border-left: 4px solid #DC2626;
  padding-left: 1.5rem;
  margin: 2rem 0;
  font-style: italic;
  color: #4b5563;
}

.post-content.prose code {
  background-color: #f3f4f6;
  padding: 0.2rem 0.4rem;
  border-radius: 0.25rem;
  font-size: 0.875em;
  font-family: 'Courier New', monospace;
}

.post-content.prose pre {
  background-color: #1f2937;
  color: #f9fafb;
  padding: 1.5rem;
  border-radius: 0.5rem;
  overflow-x: auto;
  margin: 2rem 0;
}

.post-content.prose pre code {
  background-color: transparent;
  padding: 0;
  color: inherit;
}

/* Dark mode adjustments */
@media (prefers-color-scheme: dark) {
  .post-content.prose-invert blockquote {
    color: #d1d5db;
  }

  .post-content.prose-invert code {
    background-color: #374151;
    color: #f9fafb;
  }
}

/* Post Navigation */
.post-navigation a {
  transition: all 0.3s ease;
  padding: 0.5rem 1rem;
  border-radius: 0.5rem;
}

.post-navigation a:hover {
  background-color: rgba(220, 38, 38, 0.1);
  transform: translateX(0);
}

.post-navigation .prev-post a:hover {
  transform: translateX(-4px);
}

.post-navigation .next-post a:hover {
  transform: translateX(4px);
}

/* WordPress Pagination */
.pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 0.5rem;
  margin-top: 3rem;
  flex-wrap: wrap;
}

.pagination .page-numbers {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 2.5rem;
  height: 2.5rem;
  padding: 0 0.75rem;
  border-radius: 0.5rem;
  font-size: 0.875rem;
  font-weight: 500;
  color: #4b5563;
  background-color: white;
  border: 1px solid #e5e7eb;
  transition: all 0.2s;
  text-decoration: none;
}

.pagination .page-numbers:hover:not(.current):not(.dots) {
  background-color: #f3f4f6;
  color: #111827;
  border-color: #d1d5db;
  transform: translateY(-2px);
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

.pagination .page-numbers.current {
  background-color: #DC2626;
  color: white;
  border-color: #DC2626;
  box-shadow: 0 4px 6px -1px rgba(220, 38, 38, 0.3);
}

.pagination .page-numbers.dots {
  color: #6b7280;
  background-color: transparent;
  border-color: transparent;
  cursor: default;
}

.pagination .page-numbers.prev,
.pagination .page-numbers.next {
  font-weight: 600;
}

/* Dark mode for pagination */
@media (prefers-color-scheme: dark) {
  .pagination .page-numbers {
    background-color: #374151;
    border-color: #4b5563;
    color: #d1d5db;
  }

  .pagination .page-numbers:hover:not(.current):not(.dots) {
    background-color: #4b5563;
    border-color: #6b7280;
    color: #f9fafb;
  }

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

/* Comments Section Styles */
.comments-area {
  animation: fadeIn 0.5s ease-in;
}

.comment-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.comment-item {
  transition: all 0.3s ease;
}

.comment-item:hover {
  transform: translateX(4px);
}

.comment-author-avatar img {
  border: 2px solid #e5e7eb;
  transition: border-color 0.3s ease;
}

.comment-item:hover .comment-author-avatar img {
  border-color: #DC2626;
}

.comment-content {
  color: #374151;
}

.comment-content p {
  margin-bottom: 1rem;
}

.comment-content a {
  color: #DC2626;
  text-decoration: underline;
}

.comment-content a:hover {
  color: #991B1B;
}

/* Nested comments */
.children {
  list-style: none;
  padding-left: 2rem;
  margin-top: 1.5rem;
}

@media (max-width: 768px) {
  .children {
    padding-left: 1rem;
  }
}

/* Comment navigation */
.comment-navigation {
  margin: 2rem 0;
  padding: 1rem 0;
  border-top: 1px solid #e5e7eb;
  border-bottom: 1px solid #e5e7eb;
}

.comment-navigation .nav-previous,
.comment-navigation .nav-next {
  display: inline-block;
}

.comment-navigation a {
  color: #DC2626;
  text-decoration: none;
  font-weight: 600;
  transition: color 0.2s;
}

.comment-navigation a:hover {
  color: #991B1B;
}

/* Comment form styles */
.comment-form {
  transition: all 0.3s ease;
}

.comment-form input[type="text"],
.comment-form input[type="email"],
.comment-form input[type="url"],
.comment-form textarea {
  font-family: 'Inter', sans-serif;
}

.comment-form input:focus,
.comment-form textarea:focus {
  outline: none;
  box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.1);
}

.comment-form .required {
  color: #DC2626;
  font-weight: bold;
}

.comment-form .form-submit {
  margin-top: 1.5rem;
}

.comment-form .submit:hover {
  box-shadow: 0 10px 20px -5px rgba(220, 38, 38, 0.4);
}

/* Dark mode for comments */
@media (prefers-color-scheme: dark) {
  .comment-content {
    color: #d1d5db;
  }

  .comment-author-avatar img {
    border-color: #4b5563;
  }

  .comment-item:hover .comment-author-avatar img {
    border-color: #DC2626;
  }

  .comment-navigation {
    border-color: #4b5563;
  }
}

/* Height-based responsive fixes for Hero section (Mobile Landscape / Short screens) */
@media (max-height: 580px) and (orientation: landscape) {
  .hero-section-custom {
    padding-top: 8rem !important;
    padding-bottom: 5rem !important;
  }

  .hero-card-stack-container {
    height: 380px !important;
  }

  /* Force height-based sizing for landscape mobile */
  .card-stack-layer {
    width: auto !important;
    height: 100% !important;
    /* Aspect ratio is already defined in HTML classes (aspect-[4/5]), 
       so height: 100% will determine the correct width. */
  }

  .hero-title-text {
    font-size: 3rem !important;
  }
}

@media (max-height: 480px) and (orientation: landscape) {
  .hero-section-custom {
    padding-top: 7rem !important;
    padding-bottom: 4rem !important;
  }

  .hero-card-stack-container {
    height: 300px !important;
  }

  /* Force height-based sizing for very short landscape mobile */
  .card-stack-layer {
    width: auto !important;
    height: 100% !important;
  }

  .hero-title-text {
    font-size: 2.5rem !important;
  }
}

/* 2-Column Layout for Mobile Landscape (Standard Phones) */
@media (max-width: 1023px) and (orientation: landscape) {
  .hero-grid-container {
    grid-template-columns: repeat(12, minmax(0, 1fr)) !important;
    align-items: center !important;
  }

  .hero-text-col {
    grid-column: span 7 / span 7 !important;
    text-align: left !important;
    padding-right: 1rem;
    margin-top: 0 !important;
  }

  /* Adjust inner text sizes for smaller split screen */
  .hero-text-col h1 {
    font-size: 2.5rem !important;
    /* Smaller title */
    line-height: 1 !important;
  }

  .hero-text-col p {
    font-size: 0.875rem !important;
    /* Smaller description */
    margin-top: 0.5rem !important;
  }

  .hero-text-col .group.bg-polishRed {
    padding: 0.5rem 1.5rem !important;
    /* Smaller button */
    font-size: 0.875rem !important;
  }

  .hero-card-col {
    grid-column: span 5 / span 5 !important;
    margin-top: 0 !important;
    height: 100% !important;
    /* Ensure it stays compact */
  }

  /* Ensure card stack fits in this column */
  .hero-card-stack-container {
    height: 320px !important;
    /* Fixed height for split view */
    width: 100% !important;
  }
}

/* Sticky Stacking Cards for Mobile Vertical */
@media (max-width: 767px) {
  .sticky-card {
    position: sticky !important;
    margin-bottom: 2rem;
    box-shadow: 0 -10px 20px -5px rgba(0, 0, 0, 0.1);
    /* Shadow specifically at top for stacking effect */
  }

  .sticky-card:nth-child(1) {
    top: 100px;
  }

  .sticky-card:nth-child(2) {
    top: 110px;
  }

  .sticky-card:nth-child(3) {
    top: 120px;
  }

  .sticky-card:nth-child(4) {
    top: 130px;
  }

  .sticky-card:nth-child(5) {
    top: 140px;
  }

  .sticky-card:nth-child(6) {
    top: 150px;
  }

  .sticky-card:nth-child(7) {
    top: 160px;
  }

  .sticky-card:nth-child(8) {
    top: 170px;
  }
}