/*
Theme Name: KeyAPI Theme
Theme URI: https://keyapi.pl
Author: Twój Zespół
Description: Motyw w minimalistycznym stylu dla platformy licencyjnej KeyAPI.pl. Wzorowany na estetyce Gumroad.
Version: 1.0
*/

/* Magiczna reguła naprawiająca szerokość wszystkich elementów (zapobiega wylewaniu się poza ekran) */
*, *::before, *::after {
    box-sizing: border-box;
}

/* =========================================
   1. PODSTAWY (BAZA)
   ========================================= */
body {
    font-family: 'Inter', sans-serif;
    background-color: #f4f4f0;
    color: #000000;
    margin: 0;
    padding: 0;
}

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

.text-center {
    text-align: center;
}

/* =========================================
   2. NAGŁÓWEK (HEADER)
   ========================================= */
.site-header {
    background-color: #ffffff;
    border-bottom: 2px solid #000000;
    padding: 15px 0;
}

.site-header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.site-header .site-branding h1 {
    margin: 0;
    font-size: 2rem;
    letter-spacing: -1px;
}

/* Wymuszamy brak podkreślenia i czarny kolor dla linków */
.site-header a,
.site-header h1 a,
.site-header .site-navigation a {
    text-decoration: none !important;
    color: #000000 !important;
    font-weight: 800;
}

.site-header .site-navigation {
    display: flex;
    align-items: center;
    gap: 25px;
}

.site-header .site-navigation a {
    font-weight: 600;
    font-size: 1.1rem;
    transition: opacity 0.2s ease;
}

.site-header .site-navigation a:hover {
    opacity: 0.7;
}

/* Przycisk 'Rozpocznij' w nagłówku */
.site-header .site-navigation a.btn-nav {
    background-color: #000000 !important;
    color: #ffffff !important;
    padding: 10px 20px;
    border-radius: 6px;
    border: 2px solid #000000;
    transition: all 0.2s ease;
}

.site-header .site-navigation a.btn-nav:hover {
    background-color: #ffffff !important;
    color: #000000 !important;
    opacity: 1;
}

/* =========================================
   3. STRONA GŁÓWNA (FRONT-PAGE)
   ========================================= */

/* --- Sekcja Hero z Wideo --- */
.hero-section {
    position: relative;
    overflow: hidden;
    padding: 120px 20px;
    border-bottom: 2px solid #000000;
    background-color: #ffffff;
}

/* Ustawienia tła wideo */
.hero-video-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: 0;
    opacity: 0.8;
}

.hero-section .container {
    position: relative;
    z-index: 1;
}

/* --- Półprzezroczysty kafelek na tekst --- */
.hero-content-box {
    background-color: rgba(244, 244, 240, 0.85);
    backdrop-filter: blur(8px);
    border: 3px solid #000000;
    border-radius: 16px;
    padding: 50px 30px;
    max-width: 850px;
    margin: 0 auto;
    box-shadow: 8px 8px 0px #000000;
}

.hero-title {
    font-size: 3.5rem;
    font-weight: 800;
    margin-bottom: 20px;
    margin-top: 0;
    line-height: 1.1;
    letter-spacing: -1px;
}

.hero-subtitle {
    font-size: 1.25rem;
    max-width: 700px;
    margin: 0 auto 40px auto;
    color: #222222;
    line-height: 1.6;
    font-weight: 600;
}

/* Główny przycisk rejestracji */
.btn-primary {
    background: #ff90e8;
    color: #000000;
    padding: 16px 32px;
    font-size: 1.2rem;
    font-weight: 800;
    text-decoration: none;
    border: 2px solid #000000;
    border-radius: 8px;
    box-shadow: 4px 4px 0px #000000;
    display: inline-block;
    transition: transform 0.1s ease, box-shadow 0.1s ease;
}

.btn-primary:active {
    transform: translate(4px, 4px);
    box-shadow: 0px 0px 0px #000000;
}

/* --- Sekcja Funkcji --- */
.features-section {
    padding: 80px 20px;
}

.section-title {
    text-align: center;
    font-size: 2.5rem;
    font-weight: 800;
    margin-bottom: 50px;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

.feature-box {
    background: #ffffff;
    border: 2px solid #000000;
    border-radius: 12px;
    padding: 30px;
    box-shadow: 6px 6px 0px #000000;
    transition: transform 0.2s ease;
}

.feature-box:hover {
    transform: translateY(-5px);
}

.feature-box h3 {
    margin-top: 0;
    font-size: 1.5rem;
    font-weight: 800;
    border-bottom: 2px solid #000000;
    padding-bottom: 15px;
    margin-bottom: 15px;
}

.feature-box p {
    font-size: 1.05rem;
    line-height: 1.5;
    color: #222222;
}

/* =========================================
   4. PODSTRONY, WPISY I STOPKA
   ========================================= */
.site-main {
    padding: 0 0 40px 0;
    min-height: 70vh;
}

.post {
    background: #ffffff;
    border: 2px solid #000000;
    border-radius: 8px;
    padding: 40px;
    margin-top: 40px;
    margin-bottom: 40px;
    box-shadow: 4px 4px 0px #000000;
}

.site-footer {
    border-top: 2px solid #000000;
    background-color: #ffffff;
    padding: 20px 0;
    text-align: center;
    font-weight: 600;
}

/* =========================================
   5. PANEL KLIENTA (DASHBOARD) - STYL GUMROAD
   ========================================= */
.dashboard-body {
    background-color: #f4f4f0;
    margin: 0;
    overflow-x: hidden;
}

.dashboard-layout {
    display: flex;
    min-height: 100vh;
}

/* --- LEWA STRONA (Sidebar) --- */
.dashboard-sidebar {
    width: 240px;
    background-color: #000000;
    color: #ffffff;
    display: flex;
    flex-direction: column;
    position: fixed;
    top: 0;
    bottom: 0;
    left: 0;
    z-index: 100;
}

.sidebar-logo {
    padding: 20px;
    border-bottom: 1px solid #222222;
}

.sidebar-logo h2 { margin: 0; }
.sidebar-logo a { color: #ffffff; text-decoration: none; font-weight: 800; font-size: 1.8rem; letter-spacing: -1px; }

.sidebar-nav {
    display: flex;
    flex-direction: column;
    padding: 20px 0;
    flex-grow: 1;
}

.sidebar-nav a, .sidebar-bottom a {
    color: #aaaaaa;
    text-decoration: none;
    padding: 12px 25px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 15px;
    transition: 0.2s;
}

.sidebar-nav a:hover, .sidebar-bottom a:hover {
    color: #ffffff;
    background-color: #1a1a1a;
}

.sidebar-nav a.active {
    color: #ff90e8; 
    border-left: 4px solid #ff90e8;
    background-color: #1a1a1a;
    padding-left: 21px; 
}

.sidebar-bottom {
    padding: 20px 0;
    border-top: 1px solid #222222;
}

/* --- PRAWA STRONA (Główna Zawartość) --- */
.dashboard-main {
    margin-left: 240px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.dashboard-header {
    background-color: #f4f4f0;
    padding: 20px 40px;
    border-bottom: 2px solid #000000;
}

.dashboard-header h1 {
    margin: 0;
    font-size: 1.5rem;
    font-weight: 600;
}

.dashboard-content {
    padding: 40px;
    max-width: 1200px;
}

.section-heading {
    font-size: 1.2rem;
    font-weight: 600;
    margin-top: 0;
    margin-bottom: 15px;
    color: #333;
}

/* --- Kafelki (Zadania) --- */
.dashboard-cards {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 20px;
    margin-bottom: 50px;
}

.dash-card {
    background: #ffffff;
    border: 2px solid #000000;
    border-radius: 6px;
    padding: 25px 15px;
    text-align: center;
    cursor: pointer;
    transition: transform 0.1s, box-shadow 0.1s;
}

.dash-card.active-card, .dash-card:hover {
    box-shadow: 4px 4px 0px #000000;
    transform: translate(-2px, -2px);
}

.card-icon {
    font-size: 2.5rem;
    margin-bottom: 15px;
}

.dash-card h4 {
    margin: 0 0 5px 0;
    font-weight: 800;
    font-size: 1.1rem;
}

.dash-card p {
    margin: 0;
    font-size: 0.9rem;
    color: #666;
}

/* --- Tabela --- */
.dashboard-table-container {
    background: #ffffff;
    border: 2px solid #000000;
    border-radius: 6px;
    overflow-x: auto;
}

.dashboard-table {
    width: 100%;
    border-collapse: collapse;
}

.dashboard-table th, .dashboard-table td {
    padding: 15px 20px;
    text-align: left;
    border-bottom: 1px solid #dddddd;
}

.dashboard-table th {
    font-weight: 600;
    font-size: 0.9rem;
    color: #555;
    background-color: #fafafa;
}

.dashboard-table tr:last-child td {
    border-bottom: none;
}

/* =========================================
   6. WERSJA MOBILNA (SMARTFONY) - DASHBOARD
   ========================================= */
.mobile-top-bar { display: none; }
.mobile-only { display: none; }

.sidebar-overlay {
    display: none;
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0,0,0,0.6);
    z-index: 95;
    backdrop-filter: blur(2px);
}

@media (max-width: 768px) {
    .mobile-top-bar {
        display: flex;
        background-color: #000000;
        color: #ffffff;
        padding: 15px 20px;
        justify-content: space-between;
        align-items: center;
        position: sticky;
        top: 0;
        z-index: 90;
    }
    
    .mobile-top-bar h2 { margin: 0; font-size: 1.5rem; letter-spacing: -1px; }
    .mobile-top-bar a { color: #ffffff; text-decoration: none; font-weight: 800; }
    
    .hamburger-menu {
        background: none;
        border: none;
        color: #ffffff;
        font-size: 1.8rem;
        cursor: pointer;
    }

    .desktop-only { display: none; }
    .mobile-only { display: block; }
    
    .dashboard-sidebar {
        transform: translateX(-100%);
        transition: transform 0.3s ease-in-out;
    }
    
    .dashboard-sidebar.active {
        transform: translateX(0);
    }
    
    .sidebar-overlay.active {
        display: block;
    }
    
    .sidebar-close {
        text-align: right;
        padding: 15px 20px;
        font-size: 1.5rem;
        cursor: pointer;
        color: #ffffff;
        border-bottom: 1px solid #222;
    }
    
    .dashboard-main {
        margin-left: 0; 
    }
    
    .dashboard-header {
        padding: 15px 20px;
    }
    .dashboard-content {
        padding: 20px;
    }
    
    /* Poprawka Box-model dla kafelków na małych ekranach (miejsce na cień) */
    .dashboard-cards {
        grid-template-columns: 1fr;
    }
    
  .dash-card {
        width: 96%; /* Bezpieczna szerokość */
        margin: 0 auto 10px auto; /* Wyśrodkowanie i dolny margines */
    }
}

/* =========================================
   7. WERSJA MOBILNA (SMARTFONY) - STRONA GŁÓWNA I NAGŁÓWEK
   ========================================= */

@media (max-width: 768px) {
    /* --- Poprawka Nagłówka Głównego --- */
    .site-header .container {
        flex-direction: column; /* Układa logo nad przyciskami */
        gap: 15px;
    }

    .site-header .site-navigation {
        width: 100%;
        justify-content: center; /* Wyśrodkowuje przyciski */
        gap: 15px;
    }

    .site-header .site-navigation a.btn-nav {
        padding: 8px 15px; /* Nieco mniejszy przycisk */
        font-size: 1rem;
    }

    /* --- Poprawka Sekcji Hero na Stronie Głównej --- */
    .hero-section {
        padding: 60px 15px; /* Mniejsze marginesy na telefonie */
    }

    .hero-content-box {
        padding: 30px 20px; /* Mniejsze pudełko */
    }

    .hero-title {
        font-size: 2rem; /* Znacznie mniejszy, czytelny na telefonie tytuł */
        line-height: 1.2;
    }

    .hero-subtitle {
        font-size: 1rem;
        margin-bottom: 25px;
    }

    .btn-primary {
        width: 100%; /* Przycisk na pełną szerokość pudełka */
        box-sizing: border-box;
    }
}