/*
Theme Name: CUW Opalenica
Theme URI: https://cuwopalenica.pl
Author: Rokujemy.pl
Author URI: https://rokujemy.pl
Description: Motyw WordPress dla Centrum Usług Wspólnych w Opalenicy. Nowoczesny, jasny design z informacjami kontaktowymi.
Version: 1.0.0
Requires at least: 5.3
Tested up to: 6.7
Requires PHP: 7.4
License: Premium
Text Domain: cuwopalenica
*/

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

:root {
    --primary: #1a5276;
    --primary-dark: #0e3650;
    --primary-light: #2980b9;
    --accent: #e74c3c;
    --accent-light: #f39c12;
    --bg-light: #f8f9fa;
    --bg-white: #ffffff;
    --text-dark: #2c3e50;
    --text-medium: #5a6c7d;
    --text-light: #8e99a4;
    --border: #e1e8ed;
    --shadow-sm: 0 1px 3px rgba(0,0,0,0.08);
    --shadow-md: 0 4px 12px rgba(0,0,0,0.1);
    --shadow-lg: 0 8px 30px rgba(0,0,0,0.12);
    --radius: 12px;
    --radius-sm: 8px;
    --container: 1100px;
    --font-main: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    font-family: var(--font-main);
    color: var(--text-dark);
    background: var(--bg-light);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

a {
    color: var(--primary-light);
    text-decoration: none;
    transition: color 0.2s;
}

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

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

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

/* ===== HEADER ===== */
.site-header {
    background: var(--bg-white);
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: var(--shadow-sm);
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 24px;
    max-width: var(--container);
    margin: 0 auto;
}

.site-logo {
    display: flex;
    align-items: center;
    gap: 14px;
}

.site-logo svg {
    width: 44px;
    height: 44px;
    flex-shrink: 0;
}

.site-logo-img {
    display: block;
    width: auto;
    height: 110px;
    max-height: 110px;
    transition: transform 0.2s ease;
}

.site-logo:hover .site-logo-img {
    transform: scale(1.03);
}

.site-logo-text {
    font-size: 0.72rem;
    font-weight: 700;
    color: var(--primary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    line-height: 1.3;
}

.site-logo-text span {
    display: block;
    font-size: 0.65rem;
    font-weight: 500;
    color: var(--text-medium);
    text-transform: none;
    letter-spacing: 0;
}

.header-contact {
    display: flex;
    align-items: center;
    gap: 20px;
    font-size: 0.85rem;
    color: var(--text-medium);
}

.header-contact a {
    display: flex;
    align-items: center;
    gap: 6px;
    color: var(--text-medium);
    font-weight: 500;
}

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

.header-contact svg {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
}

.header-bip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: var(--primary);
    color: #fff !important;
    padding: 8px 14px;
    border-radius: 50px;
    font-weight: 700;
    font-size: 0.8rem;
    letter-spacing: 0.5px;
    transition: background 0.2s, transform 0.2s, box-shadow 0.2s;
    box-shadow: var(--shadow-sm);
}

.header-bip:hover {
    background: var(--primary-dark);
    color: #fff !important;
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}

/* ===== HERO SECTION ===== */
.hero {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: #fff;
    padding: 80px 0 90px;
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -20%;
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(255,255,255,0.06) 0%, transparent 70%);
    border-radius: 50%;
}

.hero::after {
    content: '';
    position: absolute;
    bottom: -30%;
    left: -10%;
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, rgba(255,255,255,0.04) 0%, transparent 70%);
    border-radius: 50%;
}

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

.hero-content {
    max-width: 700px;
}

.hero h1 {
    font-size: 2.5rem;
    font-weight: 800;
    line-height: 1.15;
    margin-bottom: 16px;
    letter-spacing: -0.5px;
}

.hero h1 span {
    display: block;
    font-size: 1.1rem;
    font-weight: 400;
    opacity: 0.85;
    margin-top: 8px;
    letter-spacing: 0;
}

.hero-subtitle {
    font-size: 1.1rem;
    opacity: 0.9;
    line-height: 1.6;
    margin-bottom: 32px;
}

.hero-badges {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(255,255,255,0.12);
    backdrop-filter: blur(10px);
    padding: 10px 18px;
    border-radius: 50px;
    font-size: 0.85rem;
    font-weight: 500;
    border: 1px solid rgba(255,255,255,0.15);
}

.hero-badge svg {
    width: 16px;
    height: 16px;
}

a.hero-badge {
    color: #fff;
    text-decoration: none;
}

a.hero-badge:hover {
    color: #fff;
    background: rgba(255,255,255,0.2);
}

/* ===== SECTION COMMON ===== */
.section {
    padding: 72px 0;
}

.section-title {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 12px;
    letter-spacing: -0.3px;
}

.section-subtitle {
    color: var(--text-medium);
    font-size: 1rem;
    margin-bottom: 40px;
}

/* ===== INFO CARDS GRID ===== */
.info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 24px;
    margin-top: 40px;
}

.info-card {
    background: var(--bg-white);
    border-radius: var(--radius);
    padding: 32px;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border);
    transition: transform 0.2s, box-shadow 0.2s;
}

.info-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.info-card-icon {
    width: 48px;
    height: 48px;
    background: linear-gradient(135deg, var(--primary-light), var(--primary));
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 20px;
}

.info-card-icon svg {
    width: 24px;
    height: 24px;
    color: #fff;
}

.info-card h3 {
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 12px;
}

.info-card p {
    color: var(--text-medium);
    font-size: 0.95rem;
    line-height: 1.7;
}

.info-card a {
    color: var(--primary-light);
    font-weight: 600;
}

.info-card a:hover {
    color: var(--primary);
}

/* ===== CONTACT DETAILS ===== */
.contact-section {
    background: var(--bg-white);
}

.contact-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 48px;
    align-items: start;
}

.contact-details {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.contact-item {
    display: flex;
    gap: 16px;
    align-items: flex-start;
}

.contact-item-icon {
    width: 40px;
    height: 40px;
    background: var(--bg-light);
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.contact-item-icon svg {
    width: 20px;
    height: 20px;
    color: var(--primary);
}

.contact-item-text h4 {
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-light);
    margin-bottom: 4px;
}

.contact-item-text p {
    font-size: 0.95rem;
    color: var(--text-dark);
    line-height: 1.6;
}

.contact-item-text a {
    color: var(--primary-light);
    font-weight: 500;
}

.contact-map {
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow-md);
    height: 100%;
    min-height: 380px;
}

.contact-map iframe {
    width: 100%;
    height: 100%;
    min-height: 380px;
    border: 0;
}

/* ===== HOURS TABLE ===== */
.hours-section {
    background: var(--bg-light);
}

.hours-card {
    background: var(--bg-white);
    border-radius: var(--radius);
    padding: 40px;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border);
    max-width: 600px;
    margin: 0 auto;
}

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

.hours-table tr {
    border-bottom: 1px solid var(--border);
}

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

.hours-table td {
    padding: 14px 16px;
    font-size: 0.95rem;
}

.hours-table td:first-child {
    font-weight: 600;
    color: var(--text-dark);
}

.hours-table td:last-child {
    text-align: right;
    color: var(--text-medium);
    font-weight: 500;
}

.hours-table tr.today {
    background: linear-gradient(90deg, rgba(41,128,185,0.06), transparent);
    border-radius: var(--radius-sm);
}

.hours-table tr.today td {
    color: var(--primary);
    font-weight: 700;
}

/* ===== DIRECTOR SECTION ===== */
.director-card {
    background: var(--bg-white);
    border-radius: var(--radius);
    padding: 32px;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border);
    display: flex;
    align-items: center;
    gap: 24px;
    max-width: 500px;
}

.director-avatar {
    width: 72px;
    height: 72px;
    background: linear-gradient(135deg, var(--primary-light), var(--primary));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.director-avatar svg {
    width: 32px;
    height: 32px;
    color: #fff;
}

.director-info h3 {
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--text-dark);
}

.director-info p {
    font-size: 0.85rem;
    color: var(--text-light);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 600;
}

/* ===== ABOUT SECTION ===== */
.about-section {
    background: var(--bg-white);
    position: relative;
    overflow: hidden;
}

.about-section::before {
    content: '';
    position: absolute;
    top: -120px;
    right: -120px;
    width: 360px;
    height: 360px;
    background: radial-gradient(circle, rgba(41,128,185,0.08) 0%, transparent 70%);
    border-radius: 50%;
    pointer-events: none;
}

.about-section::after {
    content: '';
    position: absolute;
    bottom: -150px;
    left: -100px;
    width: 320px;
    height: 320px;
    background: radial-gradient(circle, rgba(26,82,118,0.06) 0%, transparent 70%);
    border-radius: 50%;
    pointer-events: none;
}

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

.about-header {
    text-align: center;
    max-width: 760px;
    margin: 0 auto 56px;
}

.about-eyebrow {
    display: inline-block;
    font-size: 0.78rem;
    font-weight: 700;
    color: var(--primary-light);
    text-transform: uppercase;
    letter-spacing: 2px;
    background: rgba(41, 128, 185, 0.1);
    padding: 6px 16px;
    border-radius: 50px;
    margin-bottom: 18px;
}

.about-title {
    font-size: 2.25rem;
    font-weight: 800;
    color: var(--primary);
    line-height: 1.2;
    letter-spacing: -0.5px;
    margin-bottom: 18px;
}

.about-title span {
    display: inline-block;
    color: var(--primary-light);
    font-weight: 600;
}

.about-lead {
    font-size: 1.1rem;
    line-height: 1.7;
    color: var(--text-medium);
    max-width: 640px;
    margin: 0 auto;
}

.about-grid {
    display: grid;
    grid-template-columns: 1.4fr 1fr;
    gap: 48px;
    align-items: start;
}

.about-text {
    font-size: 1rem;
    line-height: 1.85;
    color: var(--text-medium);
    background: var(--bg-light);
    padding: 36px 36px;
    border-radius: var(--radius);
    border-left: 4px solid var(--primary-light);
}

.about-text p + p {
    margin-top: 18px;
}

.about-text strong {
    color: var(--text-dark);
    font-weight: 600;
}

.about-areas {
    background: linear-gradient(160deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: #fff;
    padding: 36px 32px;
    border-radius: var(--radius);
    box-shadow: var(--shadow-md);
    position: relative;
    overflow: hidden;
}

.about-areas::after {
    content: '';
    position: absolute;
    top: -40px;
    right: -40px;
    width: 180px;
    height: 180px;
    background: radial-gradient(circle, rgba(255,255,255,0.08) 0%, transparent 70%);
    border-radius: 50%;
    pointer-events: none;
}

.about-areas-title {
    font-size: 1rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: rgba(255, 255, 255, 0.95);
    margin-bottom: 24px;
    padding-bottom: 16px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.15);
    position: relative;
    z-index: 1;
}

.about-areas-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 14px;
    position: relative;
    z-index: 1;
}

.about-areas-list li {
    display: flex;
    align-items: center;
    gap: 14px;
    font-size: 0.95rem;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.92);
    line-height: 1.4;
}

.about-area-icon {
    width: 36px;
    height: 36px;
    flex-shrink: 0;
    background: rgba(255, 255, 255, 0.12);
    border-radius: 10px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.about-area-icon svg {
    width: 18px;
    height: 18px;
    color: #fff;
}

.about-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
    margin-top: 40px;
    max-width: 800px;
}

.stat-item {
    text-align: center;
    padding: 24px;
    background: var(--bg-white);
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border);
}

.stat-number {
    font-size: 2rem;
    font-weight: 800;
    color: var(--primary);
    line-height: 1;
    margin-bottom: 8px;
}

.stat-label {
    font-size: 0.8rem;
    color: var(--text-light);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 600;
}

/* ===== FOOTER ===== */
.site-footer {
    background: var(--primary-dark);
    color: rgba(255,255,255,0.7);
    padding: 48px 0 24px;
}

.footer-inner {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 40px;
    margin-bottom: 32px;
}

.footer-info h3 {
    color: #fff;
    font-size: 1rem;
    font-weight: 700;
    margin-bottom: 8px;
}

.footer-info p {
    font-size: 0.85rem;
    line-height: 1.7;
}

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

.footer-links a {
    color: rgba(255,255,255,0.7);
    font-size: 0.85rem;
    font-weight: 500;
    transition: color 0.2s;
}

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

.footer-bottom {
    border-top: 1px solid rgba(255,255,255,0.1);
    padding-top: 20px;
    text-align: center;
    font-size: 0.8rem;
    color: rgba(255,255,255,0.4);
}

/* ===== BIP BADGE ===== */
.bip-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: var(--bg-white);
    color: var(--text-dark) !important;
    padding: 10px 20px;
    border-radius: 50px;
    font-weight: 600;
    font-size: 0.85rem;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border);
    transition: box-shadow 0.2s, transform 0.2s;
}

.bip-link:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-1px);
    color: var(--primary) !important;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
    .hero {
        padding: 56px 0 64px;
    }

    .hero h1 {
        font-size: 1.8rem;
    }

    .header-inner {
        flex-direction: column;
        gap: 12px;
        padding: 12px 16px;
    }

    .site-logo-img {
        height: 80px;
        max-height: 80px;
    }

    .header-contact {
        font-size: 0.78rem;
        gap: 12px;
        flex-wrap: wrap;
        justify-content: center;
    }

    .header-bip {
        font-size: 0.75rem;
        padding: 6px 12px;
    }

    .contact-grid {
        grid-template-columns: 1fr;
        gap: 32px;
    }

    .contact-map {
        min-height: 280px;
    }

    .info-grid {
        grid-template-columns: 1fr;
    }

    .about-stats {
        grid-template-columns: 1fr;
    }

    .footer-inner {
        flex-direction: column;
        gap: 24px;
    }

    .section {
        padding: 48px 0;
    }

    .section-title {
        font-size: 1.4rem;
    }

    .director-card {
        flex-direction: column;
        text-align: center;
    }

    .hero-badges {
        justify-content: center;
    }

    .hours-card {
        padding: 24px;
    }

    .about-grid {
        grid-template-columns: 1fr;
        gap: 28px;
    }

    .about-title {
        font-size: 1.6rem;
    }

    .about-lead {
        font-size: 1rem;
    }

    .about-header {
        margin-bottom: 36px;
    }

    .about-text {
        padding: 24px;
        font-size: 0.95rem;
    }

    .about-areas {
        padding: 28px 24px;
    }
}

@media (max-width: 480px) {
    .hero h1 {
        font-size: 1.5rem;
    }

    .container {
        padding: 0 16px;
    }

    .info-card {
        padding: 24px;
    }
}

/* ===== WP ADMIN BAR FIX ===== */
body.admin-bar .site-header {
    top: 32px;
}

@media (max-width: 782px) {
    body.admin-bar .site-header {
        top: 46px;
    }
}

/* ===== WORDPRESS CONTENT ===== */
.wp-content {
    max-width: var(--container);
    margin: 0 auto;
    padding: 48px 24px;
}

.wp-content h1, .wp-content h2, .wp-content h3 {
    color: var(--primary);
    margin-bottom: 16px;
}

.wp-content p {
    margin-bottom: 16px;
    line-height: 1.8;
}

.wp-content img {
    border-radius: var(--radius-sm);
}
