/* Custom styles for EduSystem Blog */

/* Typography */
body {
    font-family: 'Open Sans', sans-serif;
    line-height: 1.7;
    color: #212529;
}

h1, h2, h3, h4, h5, h6 {
    font-family: 'Lora', serif;
    font-weight: 600;
    line-height: 1.2;
}

/* Navigation */
.navbar-brand {
    font-family: 'Open Sans', serif;
    font-size: 1rem;
    color: #212529 !important;
}

.navbar-nav .nav-link {
    font-weight: 500;
    transition: color 0.3s ease;
}

.navbar-nav .nav-link:hover {
    color: #0d6efd !important;
}

.navbar-nav .nav-link:focus {
    outline: 2px solid #0d6efd;
    outline-offset: 2px;
}

/* Hero Section */
.hero-section {
    min-height: 60vh;
    background-size: cover;
    background-position: center 20%;
    background-repeat: no-repeat;
    background-attachment: scroll;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

@media (max-width: 768px) {
    .hero-section {
        min-height: 50vh;
    }
}

@media (min-width: 1200px) {
    .hero-section {
        min-height: 65vh;
        background-position: center 15%;
    }
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.5);
}

.hero-content {
    position: relative;
    z-index: 2;
    padding: 4rem 0;
}

.hero-title {
    font-size: 3.5rem;
    font-weight: 600;
    margin-bottom: 1rem;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

.hero-subtitle {
    font-size: 1.25rem;
    margin-bottom: 1rem;
    opacity: 0.9;
}

.hero-meta {
    margin-top: 1.5rem;
}

/* Post Previews */
.post-preview {
    padding: 2rem 0;
    transition: transform 0.3s ease;
}

.post-preview:hover {
    transform: translateY(-2px);
}

.post-preview a {
    color: inherit;
    text-decoration: none;
}

.post-title {
    font-size: 1.75rem;
    margin-bottom: 0.75rem;
    color: #212529;
    transition: color 0.3s ease;
}

.post-preview:hover .post-title {
    color: #0d6efd;
}

.post-subtitle {
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
    line-height: 1.6;
}

.post-meta {
    font-size: 0.9rem;
    margin-bottom: 0;
}

/* Post Content */
.content-main {
  padding-top: 3rem;   
  padding-bottom: 0.5rem !important; /* zmniejszony dół */
}

.post-content {
    font-size: 1.1rem;
}

.post-content h2 {
    margin-top: 2.5rem;
    margin-bottom: 1rem;
    color: #212529;
}

.post-content h3 {
    margin-top: 2rem;
    margin-bottom: 0.75rem;
    color: #495057;
}

.post-content blockquote {
    border-left: 4px solid #0d6efd;
    background-color: #f8f9fa;
    padding: 1.5rem;
    margin: 2rem 0;
    font-style: italic;
}

.post-content img {
    border-radius: 0.5rem;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

/* Content sections */
.content h2 {
    margin-top: 2rem;
    margin-bottom: 1rem;
    color: #212529;
}

.content h3 {
    margin-top: 1.5rem;
    margin-bottom: 0.75rem;
    color: #495057;
}

/* Buttons */
.btn {
    font-weight: 500;
    transition: all 0.3s ease;
}

.btn:focus {
    outline: 2px solid #0d6efd;
    outline-offset: 2px;
}

/* Horizontal rules */
hr {
    margin: 2rem 0;
    opacity: 0.3;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .hero-title {
        font-size: 2.5rem;
    }
    
    .hero-subtitle {
        font-size: 1.1rem;
    }
    
    .post-title {
        font-size: 1.5rem;
    }
    
    .hero-content {
        padding: 2rem 0;
    }
}

@media (max-width: 576px) {
    .hero-title {
        font-size: 2rem;
    }
    
    .post-title {
        font-size: 1.25rem;
    }
}

/* Focus states for accessibility */
a:focus,
button:focus {
    outline: none !important;
    box-shadow: none !important;
}

/* Skip to main content link for screen readers */
.skip-link {
    position: absolute;
    top: -40px;
    left: 6px;
    background: #0d6efd;
    color: white;
    padding: 8px;
    text-decoration: none;
    z-index: 1000;
}

.skip-link:focus {
    top: 6px;
}

/* Footer */
footer img {
  margin-right: 10px;
}
footer p.small {
  font-size: 0.85rem;
  line-height: 1.6;
}
footer ul.list-inline a {
  color: #212529;
  text-decoration: none;
}
footer ul.list-inline a:hover {
  color: #0d6efd;
  text-decoration: underline;
}

/* Sidebar cards */
.sidebar-card {
  border: none;
  border-radius: 0.75rem;
}

.sidebar-card .card-title {
  font-family: 'Lora', serif;
  font-weight: 600;
  font-size: 1.1rem;
  margin-bottom: 0.75rem;
}

.sidebar-card .small {
  line-height: 1.6;
}

.sidebar-card a {
  color: #0d6efd;
  text-decoration: none;
}

.sidebar-card a:hover {
  text-decoration: underline;
}

/* Czy wiesz, że – karuzela */
#ideasCarousel .carousel-item {
  padding-left: 0.25rem;
  padding-right: 0.25rem;
}

#ideasCarousel p {
  font-style: normal;
  font-size: 1rem;
  transition: transform 0.6s ease-in-out;
}

/* Słownik – alfabet */
.alphabet a {
  margin: 0 5px;
  font-weight: 600;
  color: #0d6efd;
  text-decoration: none;
}

.alphabet a:hover {
  text-decoration: underline;
}

.alphabet a.disabled {
  color: #aaa;
  pointer-events: none; /* brak haseł */
  cursor: default;
}

/* Smooth scroll */
html {
  scroll-behavior: smooth;
}

/* Odstęp od sticky nav dla nagłówków w słowniku */
:root {
  --nav-h: 72px;
}

#glossary h2 {
  scroll-margin-top: calc(var(--nav-h) + 16px);
}

/* Delikatne podświetlenie sekcji po kliknięciu w literę */
#glossary h2:target {
  background: linear-gradient(to bottom, rgba(13,110,253,.08), transparent);
  border-radius: .25rem;
  padding: 0.25rem 0.5rem;
  transition: background 0.3s ease;
}

/* Strzałka powrotu do góry */
.back-to-top {
  position: fixed;
  bottom: 20px; 
  right: 20px;    
  width: 45px;
  height: 45px;
  border-radius: 50%;
  background-color: #0d6efd;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.8rem;
  text-decoration: none;
  box-shadow: 0 4px 6px rgba(0,0,0,0.2);
  transition: opacity 0.3s, transform 0.3s;
  opacity: 0;
  visibility: hidden;
  z-index: 9999;
}

.back-to-top.show {
  opacity: 1;
  visibility: visible;
  transform: scale(1);
}

.back-to-top:hover {
  background-color: #0b5ed7;
}

/* YouTube w sidebarze */
/* YouTube carousel: lepsze warstwy + widoczne strzałki */
#ytCarousel {
  position: relative;
}

#ytCarousel .carousel-inner {
  border-radius: 0.75rem;
  overflow: hidden;
}

#ytCarousel iframe {
  display: block;
  width: 100%;
  height: 100%;
  border: 0;
}

/* Strzałki zawsze nad video */
#ytCarousel .carousel-control-prev,
#ytCarousel .carousel-control-next {
  z-index: 3;
  opacity: 0.9;
  transition: opacity .2s ease;
}

#ytCarousel .carousel-control-prev:hover,
#ytCarousel .carousel-control-next:hover {
  opacity: 1;
}

/* Kontrast ikon na jasnych miniaturach */
#ytCarousel .carousel-control-prev-icon,
#ytCarousel .carousel-control-next-icon {
  filter: invert(1) drop-shadow(0 0 2px rgba(0,0,0,.6));
}

/* Większa strefa klikalna na małych ekranach */
@media (max-width: 576px) {
  #ytCarousel .carousel-control-prev,
  #ytCarousel .carousel-control-next {
    width: 18%;
  }
}

/* Ultra-wide ekrany: pokaż więcej hero */
@media (min-width: 1600px) {
  .hero-section {
    min-height: 70vh;              /* było 60–65vh; dajemy więcej pionu */
    background-position: center 30%;/* mniej „przycięte” góry/dół */
  }
}

@media (min-width: 2200px) {
  .hero-section {
    min-height: 80vh;              /* jeszcze więcej pionu powyżej ~2.2k */
    background-position: center center;
  }
}

/* Cookie banner */
.cookie-banner {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  background: #ffffff;
  border-top: 1px solid rgba(0,0,0,.08);
  z-index: 1080; /* powyżej sticky nav i modali */
  padding: .85rem 0;
  opacity: 0;
  transform: translateY(8px);
  transition: opacity .25s ease, transform .25s ease;
}
.cookie-banner.show {
  opacity: 1;
  transform: translateY(0);
}
@media (min-width: 992px) {
  .cookie-banner {
    padding: 1rem 0;
  }
}
.cookie-banner .link-primary { text-decoration: underline; }
