/*
Theme Name: Dakro Serwis
Theme URI: https://dakro-serwis.pl
Author: Dakro
Author URI: https://dakro-serwis.pl
Description: Profesjonalny motyw WordPress dla Dakro Serwis - nowoczesny, responsywny i zoptymalizowany pod SEO.
Version: 1.0.1
Requires at least: 6.0
Tested up to: 6.4
Requires PHP: 8.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: dakro-serwis
Tags: custom-background, custom-logo, custom-menu, featured-images, threaded-comments, translation-ready, responsive-layout

Dakro Serwis Theme - All rights reserved.
*/

/* ==========================================================================
   CSS Variables / Custom Properties
   ========================================================================== */
:root {
    /* Colors - Modern Palette */
    --color-primary: #000000;
    --color-primary-dark: #1a1a1a;
    --color-secondary: #333333;
    --color-accent: #2563eb;
    /* Blue accent for interactions */
    --color-success: #22c55e;
    --color-warning: #eab308;
    --color-error: #ef4444;

    /* Neutrals */
    --color-white: #ffffff;
    --color-black: #000000;
    --color-gray-50: #fafafa;
    --color-gray-100: #f5f5f5;
    --color-gray-200: #e5e5e5;
    --color-gray-300: #d4d4d4;
    --color-gray-400: #a3a3a3;
    --color-gray-500: #737373;
    --color-gray-600: #525252;
    --color-gray-700: #404040;
    --color-gray-800: #262626;
    --color-gray-900: #171717;

    /* Topbar Specific */
    --topbar-bg: #111111;
    --topbar-text: #e5e5e5;
    --topbar-height: 44px;

    /* Typography */
    --font-family-primary: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
    --font-family-heading: 'Poppins', var(--font-family-primary);

    --font-size-xs: 0.75rem;
    --font-size-sm: 0.875rem;
    --font-size-base: 1rem;
    --font-size-lg: 1.125rem;
    --font-size-xl: 1.25rem;
    --font-size-2xl: 1.5rem;
    --font-size-3xl: 1.875rem;
    --font-size-4xl: 2.25rem;
    --font-size-5xl: 3rem;

    --font-weight-normal: 400;
    --font-weight-medium: 500;
    --font-weight-semibold: 600;
    --font-weight-bold: 700;

    --line-height-tight: 1.25;
    --line-height-normal: 1.5;
    --line-height-relaxed: 1.75;

    /* Spacing */
    --spacing-0: 0;
    --spacing-1: 0.25rem;
    --spacing-2: 0.5rem;
    --spacing-3: 0.75rem;
    --spacing-4: 1rem;
    --spacing-5: 1.25rem;
    --spacing-6: 1.5rem;
    --spacing-8: 2rem;
    --spacing-10: 2.5rem;
    --spacing-12: 3rem;
    --spacing-16: 4rem;
    --spacing-20: 5rem;
    --spacing-24: 6rem;

    /* Border Radius */
    --radius-sm: 0.25rem;
    --radius-md: 0.375rem;
    --radius-lg: 0.5rem;
    --radius-xl: 0.75rem;
    --radius-2xl: 1rem;
    --radius-full: 9999px;

    /* Shadows */
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
    --shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1);
    --shadow-glass: 0 8px 32px 0 rgba(31, 38, 135, 0.07);

    /* Transitions */
    --transition-fast: 150ms cubic-bezier(0.4, 0, 0.2, 1);
    --transition-normal: 300ms cubic-bezier(0.4, 0, 0.2, 1);
    --transition-slow: 500ms cubic-bezier(0.4, 0, 0.2, 1);

    /* Container */
    --container-max-width: 1280px;
    --container-padding: var(--spacing-4);

    /* Header */
    --header-height: 90px;
    --header-bg: rgba(255, 255, 255, 0.9);
    --header-backdrop: blur(10px);
}

/* ==========================================================================
   Reset & Base Styles
   ========================================================================== */
*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

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

body {
    font-family: var(--font-family-primary);
    font-size: var(--font-size-base);
    font-weight: var(--font-weight-normal);
    line-height: var(--line-height-normal);
    color: var(--color-black);
    background-color: var(--color-white);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* ==========================================================================
   Typography
   ========================================================================== */
h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: var(--font-family-heading);
    font-weight: var(--font-weight-bold);
    line-height: var(--line-height-tight);
    color: var(--color-black);
    margin-bottom: var(--spacing-4);
}

h1 {
    font-size: var(--font-size-4xl);
}

h2 {
    font-size: var(--font-size-3xl);
}

h3 {
    font-size: 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-4);
}

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

a:hover {
    color: var(--color-gray-600);
}

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

/* ==========================================================================
   Layout
   ========================================================================== */
.container {
    width: 100%;
    max-width: var(--container-max-width);
    margin-left: auto;
    margin-right: auto;
    padding-left: var(--container-padding);
    padding-right: var(--container-padding);
}

.site-content {
    padding-top: var(--spacing-12);
    padding-bottom: var(--spacing-12);
}

/* ==========================================================================
   Topbar
   ========================================================================== */
.topbar {
    background: #f5f5f5;
    border-bottom: 1px solid #e0e0e0;
    font-size: var(--font-size-xs);
    letter-spacing: 0.02em;
}

.topbar-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 0;
}

.topbar-left {
    display: flex;
    align-items: center;
    gap: 12px;
}

.topbar-right {
    display: flex;
    align-items: center;
    gap: 20px;
}

/* Social Icons */
.social-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: transparent;
    color: #666;
    transition: all var(--transition-fast);
}

.social-icon:hover {
    background: #e0e0e0;
    color: #c41e3a;
    /* Red accent matching DAKRO logo */
    transform: scale(1.05);
}

.social-icon svg {
    width: 14px;
    height: 14px;
}

/* Topbar Contact Items */
.topbar-item {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: #555;
    font-weight: var(--font-weight-medium);
    transition: color var(--transition-fast);
}

.topbar-item svg {
    opacity: 0.8;
}

a.topbar-item:hover {
    color: #c41e3a;
    /* Red accent */
}

a.topbar-item:hover svg {
    opacity: 1;
}

.topbar-divider {
    width: 1px;
    height: 16px;
    background: #d0d0d0;
}

/* ==========================================================================
   Header
   ========================================================================== */
.site-header {
    position: sticky;
    top: 0;
    z-index: 1000;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}

.header-inner {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    padding: 20px 0;
}

/* Branding */
.site-branding {
    justify-self: start;
    display: flex;
    align-items: center;
}

.site-branding a,
.site-branding .custom-logo-link {
    display: flex;
    align-items: center;
    line-height: 0;
    /* Remove any line-height spacing */
}

.site-branding img,
.custom-logo {
    height: 48px;
    width: auto;
    display: block;
}

.site-title {
    font-family: var(--font-family-heading);
    font-size: var(--font-size-xl);
    font-weight: var(--font-weight-bold);
    letter-spacing: -0.03em;
    color: var(--color-black);
    margin: 0;
}

.site-description {
    display: none;
}

/* Navigation */
.main-navigation {
    justify-self: center;
    display: flex;
    align-items: center;
}

.menu-toggle {
    display: none;
}

.primary-menu {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0;
    gap: 36px;
}

.primary-menu li {
    position: relative;
}

.primary-menu a {
    display: inline-block;
    font-size: 14px;
    font-weight: 500;
    color: #374151;
    padding: 8px 0;
    position: relative;
    transition: color var(--transition-fast);
}

.primary-menu a::after {
    content: '';
    position: absolute;
    bottom: 4px;
    left: 0;
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, #000, #333);
    border-radius: 1px;
    transition: width var(--transition-normal);
}

.primary-menu a:hover {
    color: #000;
}

.primary-menu a:hover::after {
    width: 100%;
}

/* Header Actions */
.header-actions {
    justify-self: end;
    display: flex;
    align-items: center;
    gap: 24px;
}

.header-phone {
    display: none;
}

.header-cta {
    padding: 12px 28px;
    font-size: 14px;
    font-weight: 600;
    color: #fff;
    background: linear-gradient(135deg, #000 0%, #333 100%);
    border-radius: 50px;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.15);
    transition: all var(--transition-fast);
}

.header-cta:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.2);
    color: #fff;
}

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

/* ==========================================================================
   Buttons
   ========================================================================== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: var(--spacing-3) var(--spacing-6);
    font-family: var(--font-family-primary);
    font-size: var(--font-size-base);
    font-weight: var(--font-weight-medium);
    line-height: 1;
    text-decoration: none;
    border: none;
    border-radius: var(--radius-lg);
    cursor: pointer;
    transition: all var(--transition-fast);
}

.btn-primary {
    background-color: var(--color-primary);
    color: var(--color-white);
}

.btn-primary:hover {
    background-color: var(--color-primary-dark);
    color: var(--color-white);
}

.btn-secondary {
    background-color: var(--color-gray-200);
    color: var(--color-gray-800);
}

.btn-secondary:hover {
    background-color: var(--color-gray-300);
}

.btn-outline {
    background-color: transparent;
    border: 2px solid var(--color-primary);
    color: var(--color-primary);
}

.btn-outline:hover {
    background-color: var(--color-primary);
    color: var(--color-white);
}

/* ==========================================================================
   Forms
   ========================================================================== */
input[type="text"],
input[type="email"],
input[type="tel"],
input[type="password"],
input[type="search"],
input[type="url"],
textarea,
select {
    width: 100%;
    padding: var(--spacing-3) var(--spacing-4);
    font-family: var(--font-family-primary);
    font-size: var(--font-size-base);
    color: var(--color-gray-800);
    background-color: var(--color-white);
    border: 1px solid var(--color-gray-300);
    border-radius: var(--radius-md);
    transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
}

input:focus,
textarea:focus,
select:focus {
    outline: none;
    border-color: var(--color-black);
    box-shadow: 0 0 0 3px rgb(0 0 0 / 0.1);
}

/* ==========================================================================
   Utilities
   ========================================================================== */
.text-center {
    text-align: center;
}

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

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

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* ==========================================================================
   Responsive
   ========================================================================== */
@media (max-width: 1024px) {
    .header-phone {
        display: none;
    }

    .primary-menu {
        gap: var(--spacing-4);
    }
}

@media (max-width: 768px) {
    :root {
        --font-size-4xl: 2rem;
        --font-size-3xl: 1.5rem;
        --font-size-2xl: 1.25rem;
        --header-height: 70px;
        --topbar-height: auto;
    }

    .topbar-inner {
        flex-direction: column;
        padding: var(--spacing-2) 0;
        gap: var(--spacing-2);
    }

    .topbar-divider {
        display: none;
    }

    .topbar-right {
        flex-direction: column;
        gap: var(--spacing-1);
    }

    .menu-toggle {
        display: block;
        background: none;
        border: none;
        cursor: pointer;
        padding: var(--spacing-2);
    }

    .hamburger {
        display: block;
        width: 24px;
        height: 18px;
        position: relative;
    }

    .hamburger-line {
        display: block;
        width: 100%;
        height: 2px;
        background-color: var(--color-black);
        position: absolute;
        left: 0;
        transition: all var(--transition-normal);
    }

    .hamburger-line:nth-child(1) {
        top: 0;
    }

    .hamburger-line:nth-child(2) {
        top: 8px;
    }

    .hamburger-line:nth-child(3) {
        top: 16px;
    }

    .primary-menu {
        display: none;
        /* Needs JS to toggle */
        position: absolute;
        top: var(--header-height);
        left: 0;
        right: 0;
        background-color: var(--color-white);
        flex-direction: column;
        padding: var(--spacing-4);
        box-shadow: var(--shadow-lg);
        border-top: 1px solid var(--color-gray-100);
    }

    .main-navigation.toggled .primary-menu {
        display: flex;
        animation: slideDown 0.3s ease-out forwards;
    }

    @keyframes slideDown {
        from {
            opacity: 0;
            transform: translateY(-10px);
        }

        to {
            opacity: 1;
            transform: translateY(0);
        }
    }

    .header-actions {
        display: none;
        /* Hide CTA on mobile or move to menu */
    }
}