/*
 Theme Name:   Astra Child
 Template:     astra
 Version:      2.0.0
*/

:root {
    /* Tealowa paleta (z certyfikaty) */
    --bg-body: #F7F9FB;
    --bg-card: #FFFFFF;
    --bg-element: #F0F5F3;
    --bg-border: #E4E9ED;
    --text-heading: #1C2B33;
    --text-body: #1C2B33;
    --text-muted: #8B99A4;
    --text-sec: #5A6B78;
    --text-light: #8B99A4;
    --accent: #1B7A6E;
    --accent-hover: #15635A;
    --accent-light: #E6F5F2;
    --accent-muted: rgba(27,122,110,0.08);
    --accent-ring: rgba(27,122,110,0.18);
    --bg-header: #ffffff;
    --bg-footer: #1C2B33;
    --cta-text: #ffffff;
    --cta-btn-bg: #ffffff;
    --cta-btn-text: #1B7A6E;
    --logo-filter: none;
    --table-header-bg: #E4E9ED;
    --separator-color: #E4E9ED;
    --hero-gradient: linear-gradient(135deg, #1C2B33 0%, #1A3A3A 60%, #1B7A6E 100%);
    --cta-gradient: linear-gradient(135deg, #1C2B33 0%, #1B7A6E 100%);

    /* Radius tokens */
    --radius: 10px;
    --radius-lg: 16px;
    --radius-xl: 20px;

    /* Shadow tokens */
    --shadow-light: 0 1px 3px rgba(0,0,0,0.04), 0 4px 12px rgba(0,0,0,0.03);
    --shadow-hover: 0 4px 16px rgba(0,0,0,0.07), 0 12px 32px rgba(0,0,0,0.04);
    --shadow-large: 0 8px 40px rgba(0,0,0,0.08);

    /* Astra palette overrides */
    --ast-global-color-0: #1B7A6E;
    --ast-global-color-1: #15635A;
    --ast-global-color-2: #1C2B33;
    --ast-global-color-3: #1C2B33;
    --ast-global-color-4: #FFFFFF;
    --ast-global-color-5: #F7F9FB;
    --ast-global-color-6: #F0F5F3;
    --ast-global-color-7: #E4E9ED;
    --ast-global-color-8: #8B99A4;
}

/* ===== GLOBAL STYLES ===== */
body,
.ast-separate-container,
.ast-plain-container {
    background-color: var(--bg-body) !important;
    color: var(--text-body) !important;
    font-family: 'Source Sans 3', 'Segoe UI', sans-serif !important;
    line-height: 1.65;
    -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, h5, h6 {
    color: var(--text-heading) !important;
    font-family: 'Playfair Display', Georgia, serif !important;
    font-weight: 600 !important;
    line-height: 1.2;
}

a:not(.wp-block-button__link) {
    color: var(--accent) !important;
}

a:hover:not(.wp-block-button__link) {
    color: var(--accent-hover) !important;
}

/* Cover blocks control their own text colors */
.wp-block-cover h1,
.wp-block-cover h2,
.wp-block-cover h3,
.wp-block-cover h4,
.wp-block-cover h5,
.wp-block-cover h6,
.wp-block-cover p {
    color: inherit !important;
}

/* Separator */
.wp-block-separator {
    border-color: var(--separator-color) !important;
    color: var(--separator-color) !important;
}

/* Global button radius override (Gutenberg inline border-radius) */
.wp-block-button__link {
    border-radius: var(--radius) !important;
}

/* ===== LOGO ===== */
.custom-logo-link img {
    max-height: 85px;
    width: auto;
    object-fit: contain;
    filter: var(--logo-filter);
}

/* ===== STICKY HEADER (glassmorphism) ===== */
.site-header {
    position: sticky;
    top: 0;
    z-index: 999;
    background: rgba(255, 255, 255, 0.97) !important;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border-bottom: 1px solid var(--bg-border);
}

.site-header .main-header-bar {
    transition: padding 0.3s ease;
}

.site-header.header-scrolled .main-header-bar {
    padding-top: 0.3rem;
    padding-bottom: 0.3rem;
}

.site-header.header-scrolled .custom-logo-link img {
    max-height: 45px;
}

/* ===== HEADER / FOOTER (ASTRA OVERRIDES) ===== */
.main-header-bar,
.ast-primary-header-bar {
    background-color: var(--bg-header) !important;
}

.main-header-bar .site-title a,
.ast-site-identity .site-title a {
    color: var(--text-heading) !important;
}

.main-navigation .main-header-menu > .menu-item > a {
    color: var(--text-muted) !important;
    font-weight: 500;
}

.main-navigation .main-header-menu > .menu-item > a:hover {
    color: var(--accent) !important;
}

/* No active state highlighting — all items stay muted */
.main-navigation .main-header-menu > .current-menu-item > a,
.main-navigation .main-header-menu > .current-menu-ancestor > a,
.main-navigation .main-header-menu > .current_page_item > a {
    color: var(--text-muted) !important;
}

/* Remove focus outline / box on menu items */
.main-navigation .main-header-menu > .menu-item > a:focus,
.main-navigation .main-header-menu > .menu-item > a:focus-visible {
    outline: none !important;
    box-shadow: none !important;
}

.ast-header-break-point .main-header-menu .menu-item > a:focus,
.main-navigation a:focus {
    outline: none !important;
    box-shadow: none !important;
}

.site-footer,
.ast-small-footer {
    background-color: var(--bg-footer) !important;
    color: var(--text-light) !important;
}

.site-footer a {
    color: var(--accent) !important;
}

/* ===== CUSTOM FOOTER ===== */
.bo-footer {
    padding: 1.2rem 2rem;
    text-align: center;
}

.bo-footer-text {
    color: var(--text-light);
    font-size: 0.85rem;
}

/* Logo UE na podstronie /dofinansowanie-ue/ — pelne skalowanie */
.eu-logo-figure {
    width: 100%;
    margin-left: auto;
    margin-right: auto;
}
.eu-logo-figure img {
    width: 100%;
    max-width: 760px;
    height: auto;
    display: block;
    margin: 0 auto;
}

/* ===== EU FUNDING BAR (EDIH re_d — wymog ŁSSE) ===== */
.eu-funding-bar {
    width: 100%;
    background: var(--bg-element);
    border-top: 1px solid var(--bg-border);
    padding: 1.25rem 1.5rem;
    text-align: center;
    line-height: 0;
}
.eu-funding-bar a {
    display: inline-block;
    text-decoration: none;
    transition: opacity 0.2s ease;
}
.eu-funding-bar a:hover,
.eu-funding-bar a:focus-visible {
    opacity: 0.85;
}
.eu-funding-bar img {
    max-width: 700px;
    width: 100%;
    height: auto;
    display: inline-block;
}
@media (max-width: 768px) {
    .eu-funding-bar {
        padding: 0.9rem 1rem;
    }
    .eu-funding-bar img {
        max-width: 100%;
    }
}

/* Remove gap between last full-width section and footer */
.site-main > article {
    margin-bottom: 0 !important;
}

.entry-content > .alignfull:last-child {
    margin-bottom: 0 !important;
}

.ast-plain-container .site-content .ast-container {
    padding-bottom: 0 !important;
}

.ast-plain-container.ast-no-sidebar #primary {
    margin-bottom: 0 !important;
}

/* ===== HERO SECTION ===== */
.hero-section {
    position: relative;
    overflow: hidden;
}

.hero-section .wp-block-cover__background {
    background-color: rgba(26, 26, 26, 0.8) !important;
    z-index: 1;
}

.hero-section .wp-block-cover__inner-container {
    position: relative;
    z-index: 2;
}

.wp-block-cover.hero-section h1,
.hero-section h1 {
    font-size: clamp(2rem, 5vw, 3.25rem);
    color: #ffffff !important;
    margin-bottom: 0.5rem;
    line-height: 1.15;
}

.wp-block-cover.hero-section p,
.hero-section p {
    font-size: 1.125rem;
    color: rgba(255, 255, 255, 0.7) !important;
    line-height: 1.7;
}

.hero-section .wp-block-button__link {
    transition: all 0.25s ease;
}

.hero-section .wp-block-button__link:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-hover);
}

/* ===== PAGE SECTIONS ===== */
.is-style-page-section h2 {
    color: var(--text-heading);
    margin-bottom: 1rem;
}

/* ===== SERVICE CARDS ===== */
.is-style-card {
    border: 1px solid var(--bg-border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-light);
    transition: border-color 0.3s ease, transform 0.3s ease, box-shadow 0.3s ease;
}

.is-style-card:hover {
    border-color: var(--accent);
    transform: translateY(-4px);
    box-shadow: var(--shadow-hover);
}

.is-style-card h3 {
    color: var(--text-heading);
    margin-bottom: 0.75rem;
}

.is-style-card p {
    color: var(--text-sec);
}

/* ===== CTA SECTION ===== */
.is-style-cta-section {
    background: var(--cta-gradient) !important;
}

.is-style-cta-section h2 {
    color: var(--cta-text) !important;
    margin-bottom: 1rem;
}

.is-style-cta-section p {
    color: rgba(255, 255, 255, 0.7);
    margin-bottom: 1.5rem;
}

.is-style-cta-section .wp-block-button:not(.is-style-outline) .wp-block-button__link {
    background-color: var(--cta-btn-bg) !important;
    color: var(--cta-btn-text) !important;
}

.is-style-cta-section .wp-block-button:not(.is-style-outline) .wp-block-button__link:hover {
    background-color: var(--bg-element);
    color: var(--accent-hover) !important;
}

.is-style-cta-section .wp-block-button.is-style-outline .wp-block-button__link {
    background-color: transparent !important;
    color: #ffffff !important;
}

.is-style-cta-section .wp-block-button.is-style-outline .wp-block-button__link:hover {
    background-color: rgba(255, 255, 255, 0.15) !important;
    color: #ffffff !important;
}

/* ===== OPENING HOURS TABLE ===== */
.opening-hours table {
    width: 100%;
    border-collapse: collapse;
}

.opening-hours th,
.opening-hours td {
    border: 1px solid var(--bg-border);
    padding: 0.6rem 1rem;
    text-align: left;
    color: var(--text-body);
}

.opening-hours th {
    background-color: var(--table-header-bg);
    font-weight: 600;
    color: var(--text-heading);
}

/* ===== CONTACT INFO ===== */
.contact-info p {
    line-height: 1.8;
    color: var(--text-body);
}

.contact-info a {
    color: var(--accent);
}

.contact-info a:hover {
    color: var(--accent-hover);
}

/* ===== SOCIAL LINKS ===== */
.social-links {
    display: flex;
    gap: 1rem;
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--bg-border);
}

.social-links a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: var(--radius);
    color: var(--text-muted) !important;
    background-color: var(--bg-element);
    transition: color 0.25s ease, background-color 0.25s ease, transform 0.25s ease;
}

.social-links a:hover {
    color: var(--accent) !important;
    background-color: var(--accent-light);
    transform: translateY(-2px);
}

.social-links a svg {
    width: 20px;
    height: 20px;
}

/* ===== 4-COLUMN CARDS GRID ===== */
.cards-grid {
    flex-wrap: wrap !important;
}

.cards-grid > .wp-block-column {
    flex-basis: calc(50% - 1rem) !important;
    flex-grow: 0 !important;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 1024px) {
    .cards-grid > .wp-block-column {
        flex-basis: calc(50% - 1rem) !important;
    }
}

@media (max-width: 768px) {
    .hero-section {
        min-height: 220px !important;
    }

    .hero-section h1 {
        font-size: 1.5rem;
    }

    .is-style-page-section {
        padding: 2.5rem 1rem !important;
    }

    .is-style-cta-section {
        padding: 2.5rem 1rem !important;
    }

    .is-style-card {
        padding: 1.5rem 1rem !important;
    }

    .cards-grid > .wp-block-column {
        flex-basis: 100% !important;
    }
}
