/**
 * Kancelaria Patentowa Magdalena Jezierska-Zięba
 * Main Stylesheet - version 2.0
 * Last updated: December 2025
 */

/* =====================================================
   CSS Custom Properties (Design Tokens)
   ===================================================== */
:root {
    /* Colors */
    --primary: #1e3a8a;        /* Deep Royal Blue */
    --primary-light: #2563eb;
    --primary-dark: #1e2f6d;
    --secondary: #cca43b;      /* Elegant Gold */
    --secondary-light: #e5b84a;
    --dark: #1f2937;
    --dark-light: #374151;
    --light: #f3f4f6;
    --lighter: #f9fafb;
    --white: #ffffff;
    --text-muted: rgba(255,255,255,0.8);
    
    /* Shadows */
    --shadow-sm: 0 2px 10px rgba(0,0,0,0.05);
    --shadow: 0 10px 30px rgba(0,0,0,0.08);
    --shadow-lg: 0 20px 40px rgba(0,0,0,0.12);
    
    /* Transitions */
    --transition: all 0.3s ease;
    --transition-fast: all 0.2s ease;
    
    /* Spacing */
    --header-height: 100px;
    --section-padding: 100px;
    --container-max: 1200px;
    
    /* Border radius */
    --radius-sm: 2px;
    --radius: 4px;
    --radius-lg: 8px;
    --radius-full: 50px;
}

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

html {
    scroll-behavior: smooth;
    scroll-padding-top: var(--header-height);
}

body {
    font-family: 'Lato', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    color: var(--dark);
    line-height: 1.7;
    overflow-x: hidden;
    font-size: 16px;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* =====================================================
   Typography
   ===================================================== */
h1, h2, h3, h4, h5, h6 {
    font-family: 'Playfair Display', Georgia, 'Times New Roman', serif;
    color: var(--primary);
    margin-bottom: 1rem;
    line-height: 1.3;
}

h1 { font-size: clamp(1.6rem, 4vw, 3.15rem); }
h2 { font-size: clamp(1.75rem, 4vw, 2.5rem); }
h3 { font-size: clamp(1.25rem, 3vw, 1.5rem); }
h4 { font-size: 1.25rem; }

p {
    margin-bottom: 1rem;
}

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

a:focus-visible {
    outline: 2px solid var(--secondary);
    outline-offset: 2px;
}

ul {
    list-style: none;
}

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

strong {
    font-weight: 700;
}

/* =====================================================
   Utility Classes
   ===================================================== */
.container {
    max-width: var(--container-max);
    margin: 0 auto;
    padding: 0 24px;
}

.section-padding {
    padding: var(--section-padding) 0;
}

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

/* Skip Link for Accessibility */
.skip-link {
    position: absolute;
    top: -100%;
    left: 50%;
    transform: translateX(-50%);
    background: var(--primary);
    color: var(--white);
    padding: 12px 24px;
    border-radius: var(--radius);
    z-index: 10000;
    font-weight: 700;
}

.skip-link:focus {
    top: 10px;
}

/* =====================================================
   Buttons
   ===================================================== */
.btn {
    display: inline-block;
    background: var(--secondary);
    color: var(--white);
    padding: 14px 32px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    border-radius: var(--radius-sm);
    font-size: 0.85rem;
    border: 2px solid var(--secondary);
    cursor: pointer;
    transition: var(--transition);
}

.btn:hover,
.btn:focus {
    background: transparent;
    color: var(--secondary);
}

.btn--outline {
    background: transparent;
    color: var(--secondary);
}

.btn--outline:hover,
.btn--outline:focus {
    background: var(--secondary);
    color: var(--white);
}

/* =====================================================
   Header & Navigation
   ===================================================== */
.header {
    background: var(--white);
    box-shadow: var(--shadow-sm);
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
    height: var(--header-height);
}

.header .container {
    max-width: var(--container-max);
    margin: 0 auto;
    padding: 0 24px;
    height: 100%;
}

.nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    height: 100%;
}

.logo {
    display: flex;
    align-items: center;
    flex-shrink: 1;
    min-width: 0;
}

.logo img {
    height: 290px;
    width: auto;
    max-width: 100%;
}

.nav-spacer {
    flex: 1;
    min-width: 40px;
}

.nav-links {
    display: flex;
    gap: 40px;
    align-items: center;
    flex-shrink: 0;
}

.nav-links a {
    font-weight: 600;
    font-size: 0.95rem;
    color: var(--dark);
    position: relative;
    padding: 5px 0;
}

.nav-links a::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    background: var(--secondary);
    bottom: 0;
    left: 0;
    transition: var(--transition);
}

.nav-links a:hover::after,
.nav-links a:focus::after {
    width: 100%;
}

.lang-switch {
    border: 1px solid var(--primary);
    padding: 6px 14px;
    border-radius: var(--radius-full);
    font-size: 0.8rem;
    color: var(--primary) !important;
}

.lang-switch:hover,
.lang-switch:focus {
    background: var(--primary);
    color: var(--white) !important;
}

.lang-switch::after {
    display: none !important;
}

/* Mobile Menu Button */
.hamburger {
    display: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--primary);
    background: none;
    border: none;
    padding: 8px;
}

/* =====================================================
   Hero Section with Slider
   ===================================================== */
.hero {
    position: relative;
    min-height: 90vh;
    display: flex;
    align-items: center;
    text-align: center;
    color: var(--white);
    margin-top: var(--header-height);
    overflow: hidden;
}

.hero-slider {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
}

.hero-slider .slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    opacity: 0;
    transition: opacity 1.5s ease-in-out;
}

.hero-slider .slide.active {
    opacity: 1;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(rgba(30, 58, 138, 0.8), rgba(30, 58, 138, 0.7));
    z-index: 2;
}

.hero-content {
    position: relative;
    z-index: 3;
}

.hero h1 {
    color: var(--white);
    margin-bottom: 20px;
}

.hero p {
    font-size: clamp(0.95rem, 2.5vw, 1.15rem);
    font-weight: 300;
    max-width: 700px;
    margin: 0 auto 40px;
    opacity: 0.9;
}

.hero p.hero__subtitle {
    font-size: clamp(1.3rem, 3.5vw, 1.8rem);
    text-transform: uppercase;
    letter-spacing: 4px;
    margin-bottom: 20px;
    opacity: 0.9;
}

/* =====================================================
   Section Headers
   ===================================================== */
.section-header {
    text-align: center;
    margin-bottom: 60px;
}

.section-header h2 {
    margin-bottom: 0;
}

.section-header .divider {
    width: 60px;
    height: 3px;
    background: var(--secondary);
    margin: 20px auto;
}

.section-header p {
    color: var(--dark-light);
    max-width: 600px;
    margin: 0 auto;
}

/* =====================================================
   About Section
   ===================================================== */
.about-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: start;
}

.about-img {
    position: relative;
}

.about-img img {
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    max-width: 240px;
    height: auto;
}

.about-img::before {
    content: '';
    position: absolute;
    top: -20px;
    left: -20px;
    width: 100px;
    height: 100px;
    border-top: 4px solid var(--secondary);
    border-left: 4px solid var(--secondary);
    z-index: -1;
}

.about-content h3 {
    margin-bottom: 1.5rem;
}

.about-content p {
    color: var(--dark-light);
}

.credentials-list {
    margin-top: 1.5rem;
    padding-left: 0;
}

.credentials-list li {
    position: relative;
    padding-left: 28px;
    margin-bottom: 12px;
    color: var(--dark-light);
}

.credentials-list li::before {
    content: '\f00c';
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    position: absolute;
    left: 0;
    color: var(--secondary);
}

/* =====================================================
   Services Section
   ===================================================== */
.services {
    background: var(--light);
}

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

.service-card {
    background: var(--white);
    padding: 40px 30px;
    border-radius: var(--radius);
    box-shadow: 0 5px 15px rgba(0,0,0,0.03);
    transition: var(--transition);
    border-bottom: 3px solid transparent;
}

.service-card:hover {
    transform: translateY(-10px);
    border-bottom-color: var(--secondary);
    box-shadow: var(--shadow);
}

.service-card:focus-within {
    outline: 2px solid var(--secondary);
    outline-offset: 4px;
}

.service-icon {
    font-size: 2.5rem;
    color: var(--secondary);
    margin-bottom: 20px;
}

.service-card h3 {
    font-size: 1.25rem;
    margin-bottom: 15px;
}

.service-card p {
    color: var(--dark-light);
    font-size: 0.95rem;
    margin-bottom: 0;
}

.service-list {
    margin-top: 15px;
    padding-left: 0;
}

.service-list li {
    position: relative;
    padding-left: 20px;
    margin-bottom: 8px;
    font-size: 0.9rem;
    color: var(--dark-light);
}

.service-list li::before {
    content: '•';
    position: absolute;
    left: 5px;
    color: var(--secondary);
    font-weight: bold;
}

/* Expanded Services - Full Width */
.services-detailed {
    /* margin removed - no small cards above */
}

.services-detailed-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 40px;
}

.service-detail-card {
    background: var(--white);
    padding: 35px;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
}

.service-detail-card h3 {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 1.3rem;
    margin-bottom: 15px;
}

.service-detail-card h3 i {
    color: var(--secondary);
}

.service-detail-card .service-intro {
    color: var(--dark-light);
    font-size: 1rem;
    line-height: 1.6;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid var(--light);
}

.service-detail-card ul {
    padding-left: 0;
}

.service-detail-card li {
    position: relative;
    padding-left: 24px;
    margin-bottom: 10px;
    color: var(--dark-light);
    line-height: 1.6;
}

.service-detail-card li::before {
    content: '\f00c';
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    position: absolute;
    left: 0;
    color: var(--secondary);
    font-size: 0.75rem;
    top: 4px;
}

/* =====================================================
   Contact Section - Compact
   ===================================================== */
.contact-section {
    background: var(--light);
}

.contact-compact {
    display: flex;
    justify-content: center;
    gap: 60px;
    flex-wrap: wrap;
}

.contact-item {
    display: flex;
    align-items: center;
    gap: 15px;
}

.contact-item i {
    font-size: 1.5rem;
    color: var(--secondary);
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--white);
    border-radius: 50%;
    box-shadow: var(--shadow-sm);
}

.contact-item div {
    display: flex;
    flex-direction: column;
}

.contact-item strong {
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--dark-light);
    margin-bottom: 2px;
}

.contact-item span,
.contact-item a {
    color: var(--dark);
    font-size: 1rem;
    font-weight: 600;
}

.contact-item a:hover {
    color: var(--primary);
}

/* =====================================================
   Footer
   ===================================================== */
.footer {
    background: #0f172a;
    color: rgba(255,255,255,0.6);
    padding: 40px 0;
    text-align: center;
    font-size: 0.9rem;
    border-top: 4px solid var(--secondary);
}

.footer p {
    margin: 0;
}

.footer a {
    color: var(--secondary);
}

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

/* =====================================================
   Responsive Design
   ===================================================== */

/* Tablet and smaller */
@media (max-width: 968px) {
    :root {
        --section-padding: 80px;
    }
    
    .about-grid {
        grid-template-columns: 1fr;
        gap: 40px;
    }
    
    .about-img {
        max-width: 400px;
        margin: 0 auto;
    }
    
    .contact-compact {
        gap: 40px;
    }
    
    .services-detailed-grid {
        grid-template-columns: 1fr;
    }
}

/* Mobile */
@media (max-width: 768px) {
    :root {
        --header-height: 70px;
        --section-padding: 60px;
    }
    
    .logo img {
        height: 182px;
    }

    .nav-spacer {
        display: none;
    }
    
    .hamburger {
        display: block;
        flex-shrink: 0;
    }
    
    .nav-links {
        position: fixed;
        top: var(--header-height);
        left: -100%;
        width: 100%;
        height: calc(100vh - var(--header-height));
        background: var(--white);
        flex-direction: column;
        justify-content: center;
        gap: 30px;
        transition: 0.4s ease;
        box-shadow: var(--shadow-lg);
    }
    
    .nav-links.active {
        left: 0;
    }
    
    .nav-links a {
        font-size: 1.1rem;
    }
    
    .hero {
        min-height: 80vh;
    }
    
    .container {
        padding: 0 20px;
    }
    
    .contact-compact {
        flex-direction: column;
        align-items: center;
        gap: 30px;
    }
    
    .contact-item {
        width: 100%;
        max-width: 320px;
    }
}

/* Small Mobile */
@media (max-width: 480px) {
    .services-grid {
        grid-template-columns: 1fr;
    }
    
    .service-card {
        padding: 30px 24px;
    }
    
    .btn {
        width: 100%;
        text-align: center;
    }
}

/* High DPI Displays */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
    body {
        -webkit-font-smoothing: antialiased;
    }
}

/* Reduced Motion Preference */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    
    html {
        scroll-behavior: auto;
    }
}

/* Cookie Banner */
.cookie-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(55, 65, 81, 0.95);
    color: #f3f4f6;
    padding: 12px 0;
    z-index: 9999;
    font-size: 0.85rem;
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.1);
}

.cookie-banner .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
}

.cookie-banner p {
    margin: 0;
    flex: 1;
}

.cookie-banner a {
    color: #e5e7eb;
    text-decoration: underline;
}

.cookie-banner a:hover {
    color: #fff;
}

.cookie-btn {
    background: #6b7280;
    color: #fff;
    border: none;
    padding: 8px 20px;
    font-weight: 600;
    font-size: 0.8rem;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: var(--transition);
    white-space: nowrap;
}

.cookie-btn:hover {
    background: #9ca3af;
}

.cookie-banner.hidden {
    display: none;
}

@media (max-width: 600px) {
    .cookie-banner {
        padding: 15px 0;
    }
    
    .cookie-banner .container {
        flex-direction: column;
        text-align: center;
        gap: 12px;
    }
}

/* Print Styles */
@media print {
    .header,
    .hero,
    .hamburger,
    .contact-map,
    .cookie-banner {
        display: none !important;
    }
    
    body {
        font-size: 12pt;
        line-height: 1.5;
        color: #000;
    }
    
    a {
        text-decoration: underline;
    }
    
    .section-padding {
        padding: 20px 0;
    }
}
