/*
Theme Name: Link Partner Theme
Theme URI: https://link-partner.pl
Author: Link Partner
Author URI: https://link-partner.pl
Description: Profesjonalny, nowoczesny i minimalistyczny motyw WordPress dla Link Partner. W pełni edytowalny w Gutenberg, responsywny, z gotowymi wzorcami bloków.
Version: 1.0.1
Requires at least: 6.0
Tested up to: 6.9
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: link-partner-theme
Tags: custom-colors, custom-menu, custom-logo, editor-style, featured-images, full-site-editing, block-patterns, rtl-language-support, sticky-post, threaded-comments, responsive-design, gutenberg
*/

/* ============================================
   CSS VARIABLES - PROFESSIONAL THEME
   ============================================ */

:root {
    --primary-color: #4F46E5;
    --secondary-color: #7C3AED;
    --contrast-color: #1F2937;
    --base-color: #FFFFFF;
    --neutral-color: #F3F4F6;
    --neutral-color: #F3F4F6;
    --light-gray: #E5E7EB;
    --dark-gray: #6B7280;
    --accent-color: #10B981;
    
    --font-primary: 'Outfit', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen-Sans, Ubuntu, Cantarell, 'Helvetica Neue', sans-serif;
    --font-body: 'Nunito Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen-Sans, Ubuntu, Cantarell, 'Helvetica Neue', sans-serif;
    
    --spacing-xs: 16px;
    --spacing-sm: 24px;
    --spacing-md: 32px;
    --spacing-lg: 48px;
    --spacing-xl: 64px;
    --spacing-2xl: 96px;
    
    --font-size-xs: 14px;
    --font-size-sm: 16px;
    --font-size-base: 18px;
    --font-size-lg: 20px;
    --font-size-xl: 24px;
    --font-size-2xl: 32px;
    --font-size-3xl: 40px;
    --font-size-4xl: 48px;
    
    --line-height-tight: 1.25;
    --line-height-normal: 1.5;
    --line-height-relaxed: 1.75;
    
    --border-radius-sm: 6px;
    --border-radius-md: 12px;
    --border-radius-lg: 16px;
    --border-radius-xl: 24px;
    --border-radius-full: 9999px;
    
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    
    --transition-fast: 150ms cubic-bezier(0.4, 0, 0.2, 1);
    --transition-base: 300ms cubic-bezier(0.4, 0, 0.2, 1);
    --transition-slow: 500ms cubic-bezier(0.4, 0, 0.2, 1);
    
    --max-content-width: 1280px;
    --max-text-width: 720px;
}

/* ============================================
   RESET & BASE STYLES
   ============================================ */

*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    font-size: 16px;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-body);
    font-size: var(--font-size-base);
    line-height: var(--line-height-relaxed);
    color: var(--contrast-color);
    background-color: var(--base-color);
    font-weight: 400;
    overflow-x: hidden;
}

/* ============================================
   TYPOGRAPHY
   ============================================ */

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-body);
    font-weight: 700;
    line-height: var(--line-height-tight);
    margin-bottom: var(--spacing-sm);
    color: var(--contrast-color);
    letter-spacing: -0.02em;
}

h1 {
    font-size: clamp(var(--font-size-2xl), 5vw + 1rem, var(--font-size-4xl));
    font-weight: 800;
}

h2 {
    font-size: clamp(var(--font-size-xl), 4vw + 0.5rem, var(--font-size-3xl));
}

h3 {
    font-size: clamp(var(--font-size-lg), 3vw, var(--font-size-2xl));
}

h4 {
    font-size: var(--font-size-xl);
}

h5 {
    font-size: var(--font-size-lg);
}

h6 {
    font-size: var(--font-size-base);
}

p {
    margin-bottom: var(--spacing-sm);
    color: var(--dark-gray);
}

strong, b {
    font-weight: 700;
    color: var(--contrast-color);
}

a {
    color: var(--primary-color);
    text-decoration: none;
    transition: color var(--transition-fast);
}

a:hover {
    color: var(--secondary-color);
}

a:focus-visible {
    outline: 2px solid var(--primary-color);
    outline-offset: 4px;
    border-radius: var(--border-radius-sm);
}

/* ============================================
   LOGO STYLES - FIX
   ============================================ */

.custom-logo-link {
    display: block;
    max-width: 200px;
}

.custom-logo,
img.custom-logo {
    width: 100% !important;
    height: auto !important;
    max-width: 200px !important;
    display: block;
    object-fit: contain;
    aspect-ratio: auto !important;
}

@media (max-width: 768px) {
    .custom-logo-link {
        max-width: 150px;
    }
    
    .custom-logo,
    img.custom-logo {
        max-width: 150px !important;
    }
}

/* ============================================
   LAYOUT & CONTAINER
   ============================================ */

.site-container {
    max-width: var(--max-content-width);
    margin: 0 auto;
    padding: 0 var(--spacing-md);
}

@media (max-width: 768px) {
    .site-container {
        padding: 0 var(--spacing-sm);
    }
}

/* ============================================
   HEADER
   ============================================ */

.site-header {
    background-color: var(--base-color);
    padding: var(--spacing-md) 0;
    border-bottom: 1px solid var(--light-gray);
    position: sticky;
    top: 0;
    z-index: 100;
    backdrop-filter: blur(10px);
    background-color: rgba(255, 255, 255, 0.95);
    box-shadow: var(--shadow-sm);
}

.site-branding {
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
}

.site-title {
    font-size: var(--font-size-xl);
    font-weight: 700;
    margin: 0;
    line-height: 1;
}

.site-title a {
    color: var(--contrast-color);
    text-decoration: none;
    transition: color var(--transition-fast);
}

.site-title a:hover {
    color: var(--primary-color);
}

.site-description {
    margin: 0;
    font-size: var(--font-size-sm);
    color: var(--dark-gray);
}

/* Navigation */
.main-navigation {
    margin-top: var(--spacing-sm);
}

.main-navigation ul {
    list-style: none;
    display: flex;
    gap: var(--spacing-md);
    flex-wrap: wrap;
}

.main-navigation a {
    color: var(--dark-gray);
    font-weight: 500;
    font-size: var(--font-size-base);
    padding: var(--spacing-xs) 0;
    position: relative;
}

.main-navigation a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--primary-color);
    transition: width var(--transition-base);
}

.main-navigation a:hover {
    color: var(--primary-color);
}

.main-navigation a:hover::after {
    width: 100%;
}

@media (max-width: 768px) {
    .site-header {
        padding: var(--spacing-sm) 0;
    }
    
    .main-navigation ul {
        gap: var(--spacing-sm);
    }
}

/* ============================================
   MAIN CONTENT
   ============================================ */

.site-main {
    padding: var(--spacing-2xl) 0;
}

.welcome-section {
    text-align: center;
    padding: var(--spacing-2xl) var(--spacing-md);
    margin-bottom: var(--spacing-2xl);
    background: linear-gradient(135deg, 
        var(--primary-color) 0%, 
        var(--secondary-color) 100%);
    border-radius: var(--border-radius-xl);
    color: var(--base-color);
    position: relative;
    overflow: hidden;
}

.welcome-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, transparent 0%, rgba(255, 255, 255, 0.1) 100%);
    pointer-events: none;
}

.welcome-section h2 {
    font-size: clamp(var(--font-size-3xl), 6vw, var(--font-size-4xl));
    letter-spacing: -0.03em;
    margin-bottom: 0;
    color: var(--base-color);
    position: relative;
    z-index: 1;
}

@media (max-width: 768px) {
    .welcome-section {
        padding: var(--spacing-xl) var(--spacing-md);
        margin-bottom: var(--spacing-xl);
    }
}

/* ============================================
   FEATURES SECTION
   ============================================ */

.features-section {
    padding: 0;
}

.feature-item {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--spacing-2xl);
    align-items: center;
    margin-bottom: var(--spacing-2xl);
    padding: var(--spacing-xl);
    background-color: var(--base-color);
    border-radius: var(--border-radius-lg);
    box-shadow: var(--shadow-lg);
    transition: transform var(--transition-base), box-shadow var(--transition-base);
}

.feature-item:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-xl);
}

.feature-item:nth-child(even) {
    direction: rtl;
}

.feature-item:nth-child(even) > * {
    direction: ltr;
}

.feature-image-wrapper {
    position: relative;
    border-radius: var(--border-radius-md);
    overflow: hidden;
}

.feature-image {
    width: 100%;
    height: auto;
    display: block;
    border-radius: var(--border-radius-md);
    transition: transform var(--transition-slow);
}

.feature-item:hover .feature-image {
    transform: scale(1.05);
}

.feature-content h2 {
    font-size: var(--font-size-2xl);
    margin-bottom: var(--spacing-xs);
    color: var(--contrast-color);
}

.feature-content h3 {
    font-size: var(--font-size-xl);
    margin-bottom: var(--spacing-md);
    color: var(--dark-gray);
}

.feature-content ul {
    list-style: none;
    padding-left: 0;
    margin: var(--spacing-md) 0;
}

.feature-content li {
    padding: var(--spacing-sm);
    padding-left: calc(var(--spacing-md) + 8px);
    position: relative;
    margin-bottom: var(--spacing-xs);
    color: var(--dark-gray);
    line-height: var(--line-height-relaxed);
}

.feature-content li::before {
    content: "→";
    position: absolute;
    left: 0;
    color: var(--primary-color);
    font-weight: 700;
    font-size: var(--font-size-lg);
}

.feature-content li strong {
    color: var(--contrast-color);
}

@media (max-width: 968px) {
    .feature-item {
        grid-template-columns: 1fr;
        gap: var(--spacing-lg);
        padding: var(--spacing-lg);
    }
    
    .feature-item:nth-child(even) {
        direction: ltr;
    }
}

/* ============================================
   BUTTONS
   ============================================ */

.btn,
.wp-block-button__link,
.button {
    display: inline-block;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    color: var(--base-color);
    padding: var(--spacing-sm) var(--spacing-lg);
    border-radius: var(--border-radius-full);
    text-decoration: none;
    font-size: var(--font-size-base);
    font-weight: 600;
    transition: all var(--transition-base);
    border: none;
    cursor: pointer;
    box-shadow: var(--shadow-md);
    position: relative;
    overflow: hidden;
}

.btn::before,
.wp-block-button__link::before,
.button::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    transition: left var(--transition-slow);
}

.btn:hover,
.wp-block-button__link:hover,
.button:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
    color: var(--base-color);
}

.btn:hover::before,
.wp-block-button__link:hover::before,
.button:hover::before {
    left: 100%;
}

.btn:active,
.wp-block-button__link:active,
.button:active {
    transform: translateY(0);
    box-shadow: var(--shadow-sm);
}

/* ============================================
   FOOTER
   ============================================ */

.site-footer {
    background-color: var(--contrast-color);
    border-top: 4px solid var(--primary-color);
    padding: var(--spacing-xl) 0;
    margin-top: var(--spacing-2xl);
    font-size: var(--font-size-sm);
    color: var(--light-gray);
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.footer-content p {
    margin: 0;
    color: var(--light-gray);
}

.footer-content a {
    color: var(--base-color);
    text-decoration: none;
    font-weight: 600;
    transition: color var(--transition-fast);
}

.footer-content a:hover {
    color: var(--primary-color);
}

@media (max-width: 768px) {
    .footer-content {
        flex-direction: column;
        text-align: center;
        gap: var(--spacing-sm);
    }
}

/* ============================================
   UTILITY CLASSES
   ============================================ */

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

.mb-0 {
    margin-bottom: 0;
}

.mt-0 {
    margin-top: 0;
}

/* WordPress Core */
.alignfull {
    width: 100vw;
    max-width: 100vw;
    margin-left: calc(50% - 50vw);
    margin-right: calc(50% - 50vw);
}

.alignwide {
    max-width: var(--max-content-width);
}

.aligncenter {
    text-align: center;
    margin-left: auto;
    margin-right: auto;
}

/* WordPress Blocks Support */
.wp-block-group {
    margin-bottom: var(--spacing-md);
}

.wp-block-columns {
    display: flex;
    flex-wrap: wrap;
    gap: var(--spacing-md);
    margin-bottom: var(--spacing-md);
}

.wp-block-column {
    flex: 1;
    min-width: 0;
}

.wp-block-image {
    margin-bottom: var(--spacing-md);
}

.wp-block-image img {
    display: block;
    max-width: 100%;
    height: auto;
}

.wp-block-button__link {
    background-color: var(--primary-color);
    color: var(--base-color);
    padding: 16px 32px;
    border-radius: var(--border-radius-md);
    text-decoration: none;
    display: inline-block;
    font-weight: 600;
    transition: all var(--transition-fast);
    border: none;
    cursor: pointer;
}

.wp-block-button__link:hover {
    background-color: var(--secondary-color);
    transform: translateY(-2px);
    box-shadow: 0 8px 16px rgba(79, 70, 229, 0.3);
}

.has-primary-background-color {
    background-color: var(--primary-color) !important;
}

.has-secondary-background-color {
    background-color: var(--secondary-color) !important;
}

.has-base-background-color {
    background-color: var(--base-color) !important;
}

.has-neutral-background-color {
    background-color: var(--neutral-color) !important;
}

.has-primary-color {
    color: var(--primary-color) !important;
}

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

.has-xx-large-font-size {
    font-size: var(--font-size-4xl);
}

.has-x-large-font-size {
    font-size: var(--font-size-3xl);
}

.has-large-font-size {
    font-size: var(--font-size-xl);
}

.has-primary-gradient-gradient-background {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
}

/* Block Editor Enhancements */
.entry-content > * {
    margin-bottom: var(--spacing-md);
}

.entry-content > *:last-child {
    margin-bottom: 0;
}

.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;
}

.screen-reader-text:focus {
    background-color: var(--neutral-color);
    clip: auto !important;
    clip-path: none;
    color: var(--contrast-color);
    display: block;
    font-size: var(--font-size-sm);
    height: auto;
    left: 5px;
    line-height: normal;
    padding: 15px 23px 14px;
    text-decoration: none;
    top: 5px;
    width: auto;
    z-index: 100000;
}

/* ============================================
   ANIMATIONS
   ============================================ */

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

.fade-in {
    animation: fadeIn 0.6s ease-out both;
}

.fade-in:nth-child(1) { animation-delay: 0.1s; }
.fade-in:nth-child(2) { animation-delay: 0.2s; }
.fade-in:nth-child(3) { animation-delay: 0.3s; }

/* ============================================
   RESPONSIVE DESIGN
   ============================================ */

/* WordPress Block Columns - Stack on mobile */
@media (max-width: 781px) {
    .wp-block-columns {
        flex-wrap: wrap;
    }
    
    .wp-block-column {
        flex-basis: 100% !important;
        margin-left: 0 !important;
        margin-bottom: var(--spacing-md);
    }
}

/* Images - Always responsive */
.wp-block-image img,
.feature-image,
img {
    max-width: 100%;
    height: auto;
}

/* Tablet adjustments */
@media (max-width: 968px) {
    :root {
        --spacing-xs: 12px;
        --spacing-sm: 16px;
        --spacing-md: 24px;
        --spacing-lg: 32px;
        --spacing-xl: 48px;
        --spacing-2xl: 64px;
    }
    
    .welcome-section {
        padding: 48px 24px !important;
    }
    
    .features-section {
        padding: 48px 16px !important;
    }
    
    .feature-item {
        padding: 24px !important;
        margin-bottom: 24px !important;
    }
}

/* Mobile - Full responsive */
@media (max-width: 768px) {
    body {
        font-size: var(--font-size-sm);
    }
    
    h1, .has-xx-large-font-size {
        font-size: clamp(28px, 8vw, 36px) !important;
    }
    
    h2, .has-x-large-font-size {
        font-size: clamp(24px, 6vw, 28px) !important;
    }
    
    h3 {
        font-size: clamp(20px, 5vw, 24px) !important;
    }
    
    .site-main {
        padding: 0;
    }
    
    .site-header .container {
        flex-direction: column;
        gap: var(--spacing-sm);
        padding: 16px;
    }
    
    .main-navigation ul {
        flex-direction: column;
        text-align: center;
        gap: 8px;
    }
    
    .main-navigation a {
        padding: 12px 16px;
        display: block;
    }
    
    .features-section {
        padding: 32px 16px !important;
    }
    
    .feature-item {
        padding: 20px !important;
        margin-bottom: 20px !important;
    }
    
    .welcome-section {
        padding: 40px 20px !important;
    }
    
    .wp-block-button__link {
        padding: 12px 24px !important;
        font-size: 16px !important;
        width: 100%;
        display: block;
        text-align: center;
    }
    
    .wp-block-buttons {
        flex-direction: column;
    }
    
    .feature-list {
        font-size: 15px;
        padding-left: 24px;
    }
    
    .feature-list li {
        margin-bottom: 10px;
    }
}

/* Small mobile */
@media (max-width: 480px) {
    .site-header {
        padding: 12px 0;
    }
    
    .feature-item {
        padding: 16px !important;
    }
    
    h1, .has-xx-large-font-size {
        font-size: 24px !important;
    }
    
    h3 {
        font-size: 18px !important;
    }
}

/* ============================================
   PRINT STYLES
   ============================================ */

@media print {
    .site-header,
    .site-footer,
    .main-navigation,
    .btn {
        display: none;
    }
    
    body {
        background: white;
        color: black;
    }
    
    .site-main {
        max-width: 100%;
        padding: 0;
    }
}

/* Utility Classes */
.text-center {
    text-align: center;
}

.mb-0 {
    margin-bottom: 0;
}

.mt-0 {
    margin-top: 0;
}

/* WordPress Core */
.alignfull {
    width: 100vw;
    max-width: 100vw;
    margin-left: calc(50% - 50vw);
    margin-right: calc(50% - 50vw);
}

.alignwide {
    max-width: 1200px;
}

.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;
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in {
    animation: fadeIn 0.6s ease-out;
}
