/*
Theme Name:        Centrum SEO Landing
Theme URI:         https://centrum.seo
Author:            Centrum SEO
Author URI:        https://centrum.seo
Description:       Minimalny, bezpieczny szablon WordPress zoptymalizowany pod landing page generowany przez shortcode. Kompatybilny z WooCommerce i klasycznym edytorem.
Version:           1.0.0
Requires at least: 6.0
Tested up to:      6.7
Requires PHP:      8.0
License:           GNU General Public License v2 or later
License URI:       https://www.gnu.org/licenses/gpl-2.0.html
Text Domain:       centrum-seo-landing
Tags:              landing-page, woocommerce, minimal, one-column, custom-background, custom-logo
*/

/* ==========================================
   RESET & BASE
   ========================================== */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    font-size: 100%;
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    font-size: 1rem;
    line-height: 1.6;
    color: #333;
    background-color: #fff;
    overflow-x: hidden;
}

/* ==========================================
   LAYOUT
   ========================================== */
.site {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

.site-content {
    flex: 1 0 auto;
    width: 100%;
}

/* Pełna szerokość dla landing page */
.site-content.full-width {
    max-width: 100%;
    padding: 0;
}

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

/* ==========================================
   HEADER – WizzySocial Dark Edition
   Sticky, glassmorphism-on-scroll, gradient CTA
   ========================================== */

/* --- Zmienne koloru nagłówka --- */
:root {
    --hdr-bg:          #0b0b14;
    --hdr-bg-scroll:   rgba(11, 11, 20, 0.92);
    --hdr-border:      rgba(255, 255, 255, 0.07);
    --hdr-text:        rgba(245, 245, 250, 0.72);
    --hdr-text-hover:  #f5f5fa;
    --hdr-logo:        #f5f5fa;
    --hdr-cta-from:    #f77737;
    --hdr-cta-mid:     #e1306c;
    --hdr-cta-to:      #833ab4;
    --hdr-height:      68px;
}

/* --- Bazowy nagłówek --- */
.site-header {
    position: sticky;
    top: 0;
    z-index: 9999;
    width: 100%;
    height: var(--hdr-height);
    background: var(--hdr-bg);
    border-bottom: 1px solid var(--hdr-border);
    transition: background 0.3s ease, backdrop-filter 0.3s ease, box-shadow 0.3s ease;
}

/* Glassmorphism po przewinięciu (klasa dodawana przez JS) */
.site-header.is-scrolled {
    background: var(--hdr-bg-scroll);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    box-shadow: 0 4px 32px rgba(0, 0, 0, 0.45);
}

/* Wewnętrzny flex-wrapper */
.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: var(--hdr-height);
    gap: 12px;
}

/* --- Logo / branding --- */
.site-branding {
    flex-shrink: 0;
    display: flex;
    align-items: center;
}

.custom-logo {
    max-height: 44px;
    width: auto;
    display: block;
}

.site-title {
    font-size: 1.35rem;
    font-weight: 800;
    margin: 0;
    line-height: 1;
}

/* Gradient na nazwie serwisu (gdy brak custom-logo) */
.site-title-link,
.site-title a {
    background: linear-gradient(135deg, var(--hdr-cta-from), var(--hdr-cta-mid), var(--hdr-cta-to));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-decoration: none;
    font-size: 1.35rem;
    font-weight: 800;
    letter-spacing: -0.01em;
    transition: opacity 0.2s;
}

.site-title a:hover,
.site-title-link:hover {
    opacity: 0.85;
}

.site-description {
    display: none; /* ukryj tagline – nie pasuje do dark designu */
}

/* --- Główna nawigacja --- */
.main-navigation {
    display: flex;
    align-items: center;
    flex: 1;
    justify-content: center;
}

.main-navigation ul,
.nav-menu {
    list-style: none;
    display: flex;
    align-items: center;
    gap: 0;
    margin: 0;
    padding: 0;
}

.main-navigation li {
    position: relative;
}

.main-navigation a {
    display: block;
    padding: 8px 15px;
    color: var(--hdr-text);
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
    letter-spacing: 0.01em;
    transition: color 0.2s;
    white-space: nowrap;
}

.main-navigation a:hover,
.main-navigation .current-menu-item > a,
.main-navigation .current_page_item > a {
    color: var(--hdr-text-hover);
}

/* Subtelna kreska-gradient pod aktywnym/hovered linkiem */
.main-navigation li > a::after {
    content: '';
    display: block;
    height: 2px;
    border-radius: 2px;
    background: linear-gradient(90deg, var(--hdr-cta-from), var(--hdr-cta-mid), var(--hdr-cta-to));
    transform: scaleX(0);
    transition: transform 0.25s ease;
    margin-top: 2px;
}

.main-navigation li > a:hover::after,
.main-navigation .current-menu-item > a::after,
.main-navigation .current_page_item > a::after {
    transform: scaleX(1);
}

/* --- Dropdown (podmenu) --- */
.main-navigation ul ul {
    position: absolute;
    top: calc(100% + 8px);
    left: 50%;
    transform: translateX(-50%);
    background: #181828;
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 10px;
    box-shadow: 0 16px 48px rgba(0,0,0,0.55);
    min-width: 210px;
    flex-direction: column;
    display: none;
    z-index: 9999;
    padding: 6px 0;
}

.main-navigation ul li:hover > ul {
    display: flex;
}

.main-navigation ul ul a {
    padding: 10px 20px;
    font-size: 0.875rem;
    color: rgba(245,245,250,0.65);
    border-radius: 0;
}

.main-navigation ul ul a:hover {
    color: #f5f5fa;
    background: rgba(255,255,255,0.05);
}

.main-navigation ul ul a::after {
    display: none;
}

/* --- Prawa strona: CTA + hamburger --- */
.header-actions {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    gap: 10px;
}

/* CTA button */
.header-cta-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 10px 22px;
    border-radius: 999px;
    background: linear-gradient(135deg, var(--hdr-cta-from) 0%, var(--hdr-cta-mid) 50%, var(--hdr-cta-to) 100%);
    color: #fff !important;
    font-size: 0.875rem;
    font-weight: 700;
    text-decoration: none;
    letter-spacing: 0.01em;
    white-space: nowrap;
    box-shadow: 0 6px 24px rgba(225, 48, 108, 0.35);
    transition: transform 0.2s ease, box-shadow 0.2s ease, opacity 0.2s;
    position: relative;
    z-index: 1;
    overflow: hidden;
}

.header-cta-btn::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, var(--hdr-cta-to) 0%, var(--hdr-cta-mid) 50%, var(--hdr-cta-from) 100%);
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: -1;
}

.header-cta-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 32px rgba(225, 48, 108, 0.5);
    color: #fff !important;
}

.header-cta-btn:hover::before {
    opacity: 1;
}

.header-cta-btn:active {
    transform: translateY(0);
}

.header-cta-btn__arrow {
    font-style: normal;
    transition: transform 0.2s ease;
}

.header-cta-btn:hover .header-cta-btn__arrow {
    transform: translateX(3px);
}

/* --- Hamburger (mobile) --- */
.menu-toggle {
    display: none; /* widoczny tylko w breakpoincie mobilnym */
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 5px;
    width: 40px;
    height: 40px;
    padding: 0;
    background: rgba(255,255,255,0.07);
    border: 1px solid rgba(255,255,255,0.12);
    border-radius: 8px;
    cursor: pointer;
    transition: background 0.2s;
}

.menu-toggle:hover {
    background: rgba(255,255,255,0.13);
}

.menu-toggle__bar {
    display: block;
    width: 20px;
    height: 2px;
    background: rgba(245,245,250,0.85);
    border-radius: 2px;
    transition: transform 0.3s ease, opacity 0.3s ease, width 0.3s ease;
    transform-origin: center;
}

/* Animacja X gdy menu otwarte */
.menu-toggle[aria-expanded="true"] .menu-toggle__bar:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
}

.menu-toggle[aria-expanded="true"] .menu-toggle__bar:nth-child(2) {
    opacity: 0;
    width: 0;
}

.menu-toggle[aria-expanded="true"] .menu-toggle__bar:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
}

/* ==========================================
   FOOTER
   ========================================== */
.site-footer {
    background: #1a1a1a;
    color: #ccc;
    padding: 30px 0;
    font-size: 0.875rem;
    flex-shrink: 0;
}

.footer-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 15px;
}

.footer-links {
    display: flex;
    gap: 20px;
}

.footer-links a {
    color: #aaa;
    text-decoration: none;
    transition: color 0.2s;
}

.footer-links a:hover {
    color: #fff;
}

/* ==========================================
   LANDING PAGE - pełna szerokość
   Header i footer POZOSTAJĄ widoczne (ukrywane tylko przez PHP gdy opcja Customizera aktywna)
   ========================================== */
/* .page-template-landing .site-header { display: none; } – wyłączone celowo */

/* Offset dla sticky header na anchor linkach */
[id] {
    scroll-margin-top: calc(var(--hdr-height, 68px) + 16px);
}

.entry-content {
    width: 100%;
}

/* ==========================================
   WORDPRESS CORE CLASSES
   ========================================== */
.alignnone  { margin: 5px 20px 20px 0; }
.aligncenter { display: block; margin: 0 auto 20px; }
.alignright  { float: right; margin: 5px 0 20px 20px; }
.alignleft   { float: left; margin: 5px 20px 20px 0; }
.wp-caption  { max-width: 100%; }

img { max-width: 100%; height: auto; }

/* Screen reader */
.screen-reader-text {
    border: 0;
    clip: rect(1px, 1px, 1px, 1px);
    clip-path: inset(50%);
    height: 1px;
    margin: -1px;
    overflow: hidden;
    padding: 0;
    position: absolute;
    width: 1px;
    word-wrap: normal !important;
}

.skip-link {
    position: absolute;
    top: -100px;
    left: 0;
    background: #000;
    color: #fff;
    padding: 8px 16px;
    z-index: 99999;
    transition: top 0.2s;
}

.skip-link:focus {
    top: 0;
}

/* ==========================================
   WOOCOMMERCE - podstawowe style
   ========================================== */
.woocommerce-message,
.woocommerce-error,
.woocommerce-info {
    padding: 12px 20px;
    margin: 0 0 20px;
    border-left: 4px solid;
    background: #f8f8f8;
}

.woocommerce-message { border-color: #46b450; }
.woocommerce-error   { border-color: #dc3232; }
.woocommerce-info    { border-color: #0073aa; }

/* ==========================================
   404 / NO CONTENT
   ========================================== */
.error-404,
.no-results {
    padding: 60px 0;
    text-align: center;
}

.error-404 h1 {
    font-size: 6rem;
    line-height: 1;
    color: #ddd;
    margin-bottom: 20px;
}

/* ==========================================
   RESPONSYWNOŚĆ
   ========================================== */
/* ==========================================
   RESPONSYWNOŚĆ
   ========================================== */

/* --- Tablet (do 860px): chowamy środkową nawigację, pokazujemy hamburger --- */
@media (max-width: 860px) {
    .main-navigation {
        display: none;
        position: absolute;
        top: var(--hdr-height);
        left: 0;
        right: 0;
        background: #0f0f1e;
        border-bottom: 1px solid rgba(255,255,255,0.08);
        box-shadow: 0 16px 40px rgba(0,0,0,0.6);
        padding: 16px 20px 24px;
        z-index: 9998;
    }

    /* Pokazuj nawigację gdy is-open */
    .main-navigation.is-open {
        display: flex;
        flex-direction: column;
        align-items: stretch;
    }

    .main-navigation ul,
    .nav-menu {
        flex-direction: column;
        gap: 0;
        width: 100%;
    }

    .main-navigation a {
        padding: 13px 4px;
        font-size: 1rem;
        border-bottom: 1px solid rgba(255,255,255,0.06);
        color: rgba(245,245,250,0.8);
    }

    .main-navigation li:last-child > a {
        border-bottom: none;
    }

    .main-navigation a::after {
        display: none;
    }

    .main-navigation ul ul {
        position: static;
        transform: none;
        box-shadow: none;
        border: none;
        background: transparent;
        padding: 0 0 0 16px;
        margin-top: 4px;
    }

    /* Hamburger widoczny */
    .menu-toggle {
        display: flex;
    }

    /* Na mobile CTA jest mniejszy */
    .header-cta-btn {
        padding: 8px 16px;
        font-size: 0.8rem;
    }

    /* Header musi mieć position: relative dla absolute menu */
    .site-header {
        position: sticky;
        overflow: visible;
    }
}

/* --- Mobile (do 420px): chowamy CTA, zostaje tylko hamburger --- */
@media (max-width: 420px) {
    .header-cta-btn {
        display: none;
    }
}

/* --- Footer responsywność --- */
@media (max-width: 768px) {
    .footer-inner {
        flex-direction: column;
        text-align: center;
    }

    .footer-links {
        flex-direction: column;
        align-items: center;
    }
}
