/* ==========================================================================
   1. GLOBALNE USTAWIENIA (Struktura i Typografia)
   ========================================================================== */
body {
    padding-top: 100px; 
    margin: 0;
    overflow-x: hidden;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

/* Adaptacja dla mniejszych ekranów - navbar może być wyższy po zawinięciu */
@media (max-width: 991px) {
    body {
        padding-top: 120px;
    }
}

main {
    flex: 1 0 auto;
    margin-top: 2rem; /* Odstęp treści od navbara */
}

.container {
    flex: 1 0 auto;
}

h1, h2 {
    scroll-margin-top: 110px; /* Zapobiega zasłanianiu nagłówków przez navbar przy linkach wewnętrznych */
}

/* Kontenery sekcji specjalnych */
.login-container, 
.register-container, 
.contact-section {
    padding-top: 40px;
    padding-bottom: 60px;
}

/* ==========================================================================
   2. NAWIGACJA (Navbar i Dropdown)
   ========================================================================== */
.navbar-dark .navbar-nav .nav-link {
    color: rgba(255, 255, 255, 0.85);
    transition: color 0.3s ease;
}

.navbar-dark .navbar-nav .nav-link:hover,
.navbar-dark .navbar-nav .nav-link.active {
    color: #fff;
}

/* Rozwijanie menu po najechaniu myszką (tylko desktopy) */
@media (min-width: 992px) {
    .nav-item.dropdown:hover .dropdown-menu {
        display: block;
        margin-top: 0;
    }
}

.sticky-top {
    top: 2rem;
}

/* ==========================================================================
   3. KARUZELA (Hero Section)
   ========================================================================== */
#heroCarousel {
    width: 100%;
}

.carousel-item {
    height: 90vh;
    min-height: 500px;
    background: no-repeat center center scroll;
    background-size: cover;
}

.carousel-fade .carousel-item {
    transition-duration: 0.8s;
}

.carousel-caption {
    bottom: 15%;
    z-index: 10;
}

/* Responsywność karuzeli i przycisków */
@media (max-width: 768px) {
    .carousel-item {
        height: 500px !important;
    }
    .carousel-caption h1 {
        font-size: 1.8rem;
    }
    .carousel-caption .btn {
        padding: 12px 20px;
        font-size: 1rem;
        display: block;
        margin: 10px auto;
        width: 85%;
    }
    .carousel-caption .ms-3 {
        margin-left: 0 !important;
    }
}

/* ==========================================================================
   4. FORMULARZE (Logowanie, Rejestracja, 2FA)
   ========================================================================== */
.card {
    background: #ffffff;
    border: none;
}

.form-control {
    border-radius: 10px;
    padding: 12px;
    border: 1px solid #dee2e6;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.form-control:focus {
    border-color: #0d6efd;
    box-shadow: 0 0 0 0.25rem rgba(13, 110, 253, 0.15);
    outline: 0;
}

.two-factor-setup-container {
    text-align: center;
    padding: 20px;
}

/* ==========================================================================
   5. BLOG I KOMPONENTY (Karty, Treść)
   ========================================================================== */
.hover-up {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.hover-up:hover {
    transform: translateY(-10px);
    box-shadow: 0 1rem 3rem rgba(0,0,0,.175) !important;
}

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

.post-content h2, 
.post-content h3 {
    margin-top: 2rem;
    margin-bottom: 1rem;
    font-weight: bold;
}

/* ==========================================================================
   6. KURSY I LEKCJE (SQL, Kod)
   ========================================================================== */
.lesson-content pre {
    background-color: #f8f9fa;
    border-radius: 8px;
    padding: 15px;
    border: 1px solid #e9ecef;
}

/* ==========================================================================
   7. STOPKA (Footer)
   ========================================================================== */
.footer-main {
    border-top: 4px solid #0d6efd;
    background-color: #212529;
}

.footer-main a:hover {
    color: #0d6efd !important;
    transition: color 0.3s ease;
}

.footer-main .social-links a {
    transition: transform 0.3s ease;
    display: inline-block;
}

.footer-main .social-links a:hover {
    transform: translateY(-3px);
}

/* ==========================================================================
   8. BANER COOKIES
   ========================================================================== */
.cookie-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    width: 100%;
    background-color: #ffffff;
    z-index: 10000;
    box-shadow: 0 -5px 25px rgba(0, 0, 0, 0.15);
    display: none;
}

@keyframes slideUp {
    from { transform: translateY(100%); }
    to { transform: translateY(0); }
}

.cookie-banner.show {
    display: block !important;
    animation: slideUp 0.5s forwards;
}

@media (max-width: 768px) {
    .cookie-banner .btn {
        width: 100%;
        margin-top: 10px;
    }
}