/**
 * Aurelines — Custom styles
 * Modern redesign: badges, pill buttons, transparent header, rounded cards.
 */

/* ─── Smooth scroll ─── */
html {
    scroll-behavior: smooth;
}

/* ─── Scroll reveal animations ─── */
.aurelines-reveal {
    opacity: 0;
    transform: translateY(24px) scale(0.98);
    transition: opacity 0.7s cubic-bezier(0.25, 0.46, 0.45, 0.94),
                transform 0.7s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.aurelines-reveal.is-visible {
    opacity: 1;
    transform: translateY(0) scale(1);
}

.aurelines-reveal-delay-1 { transition-delay: 0.15s; }
.aurelines-reveal-delay-2 { transition-delay: 0.3s; }
.aurelines-reveal-delay-3 { transition-delay: 0.45s; }

/* ─── Reusable badge/pill ─── */
.aurelines-badge {
    display: inline-flex;
    align-items: center;
    padding: 0.5rem 1.5rem;
    border-radius: 50px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    font-family: 'DM Sans', sans-serif;
}

/* Badge variant: hero (blue on light) */
.aurelines-badge--hero {
    background: rgba(31, 63, 174, 0.1);
    color: #1F3FAE;
}

/* Badge variant: section (light on white bg) */
.aurelines-badge--section {
    background: var(--wp--preset--color--accent-light, #FFF3D6);
    color: var(--wp--preset--color--accent, #E8A838);
}

/* ─── Reusable card style ─── */
.aurelines-card {
    background: var(--wp--preset--color--surface, #FFFFFF);
    border-radius: 16px;
    box-shadow: 0 4px 24px rgba(31, 63, 174, 0.06);
    transition: transform 0.35s cubic-bezier(0.25, 0.46, 0.45, 0.94),
                box-shadow 0.35s ease;
}

.aurelines-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 48px rgba(31, 63, 174, 0.12);
}

/* ─── Sticky header — must be on <header>, not inner div ─── */
header.wp-block-template-part:has(.aurelines-header) {
    position: sticky;
    top: 0;
    z-index: 100;
    height: 80px;
}

/* ─── Transparent Header ─── */
.aurelines-header {
    position: static !important; /* sticky przeniesiony na <header> */
    z-index: auto !important;
    background-color: rgba(255, 255, 255, 0.65) !important;
    /* backdrop-filter przeniesiony na ::before — nie może być tu,
       bo tworzy containing block i psuje position:fixed overlay */
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    transition: background-color 0.4s ease, box-shadow 0.4s ease, backdrop-filter 0.4s ease;
}

.aurelines-header::before {
    content: "";
    position: absolute;
    inset: 0;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    z-index: -1;
}

/* Pull hero up behind the sticky transparent header */
#home {
    margin-top: -80px;
}

#home .wp-block-cover {
    padding-top: calc(var(--wp--preset--spacing--70) + 80px) !important;
}

.aurelines-header.is-scrolled {
    background-color: rgba(255, 255, 255, 0.65) !important;
    /* backdrop-filter przeniesiony na ::before — nie może być tu,
       bo tworzy containing block i psuje position:fixed overlay */
    box-shadow: 0 1px 16px rgba(0, 0, 0, 0.06);
}

.aurelines-header.is-scrolled::before {
    content: "";
    position: absolute;
    inset: 0;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    z-index: -1;
}

/* Header nav list spacing */
.aurelines-header .wp-block-navigation ul {
    gap: 2rem;
}

/* Header nav link styling — white on hero, dark when scrolled */
.aurelines-header .wp-block-navigation a,
.aurelines-header .wp-block-navigation .wp-block-navigation-item__content {
    position: relative;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    font-size: 0.8125rem !important;
    font-weight: 600 !important;
    font-family: 'DM Sans', sans-serif;
    color: #1F3FAE !important;
    transition: color 0.3s ease;
}

/* Header nav links — dark when scrolled */
.aurelines-header.is-scrolled .wp-block-navigation a,
.aurelines-header.is-scrolled .wp-block-navigation .wp-block-navigation-item__content {
    color: var(--wp--preset--color--text, #1A1A2E) !important;
}

.aurelines-header .wp-block-navigation a::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: -4px;
    width: 0;
    height: 2px;
    background: var(--wp--preset--color--accent, #E8A838);
    transition: width 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.aurelines-header .wp-block-navigation a:hover::after {
    width: 100%;
}

.aurelines-header .wp-block-navigation a:hover {
    color: var(--wp--preset--color--accent, #E8A838) !important;
}

/* Header logo image */
.aurelines-header-logo {
    display: inline-flex;
    align-items: center;
    text-decoration: none;
}

.aurelines-header-logo-img {
    height: 80px;
    width: auto;
    object-fit: contain;
    transition: opacity 0.3s ease;
}

.aurelines-header-logo-img:hover {
    opacity: 0.85;
}

/* ─── Hero section ─── */
#home .wp-block-cover__background {
    background: linear-gradient(
        160deg,
        rgba(255, 255, 255, 0.92) 0%,
        rgba(250, 251, 254, 0.88) 30%,
        rgba(255, 255, 255, 0.85) 55%,
        rgba(245, 247, 255, 0.88) 80%,
        rgba(255, 255, 255, 0.90) 100%
    ) !important;
}

#home .wp-block-cover__image-background {
    filter: blur(3px);
    transform: scale(1.05);
    object-fit: cover;
}

/* Hero decorative elements */
#home .wp-block-cover {
    position: relative;
    overflow: hidden;
}

#home .wp-block-cover::before {
    content: '';
    position: absolute;
    top: -20%;
    right: -10%;
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(31, 63, 174, 0.06) 0%, transparent 70%);
    border-radius: 50%;
    pointer-events: none;
    z-index: 0;
}

#home .wp-block-cover::after {
    content: '';
    position: absolute;
    bottom: -15%;
    left: -10%;
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, rgba(31, 63, 174, 0.03) 0%, transparent 70%);
    border-radius: 50%;
    pointer-events: none;
    z-index: 0;
}

/* Hero H1 */
#home h1 {
    text-shadow: 0 2px 40px rgba(255, 255, 255, 0.4);
}

/* Hero subtitle */
#home .aurelines-hero-subtitle {
    font-weight: 300;
    font-size: 1.25rem !important;
    opacity: 0.85;
    letter-spacing: 0.02em;
    max-width: 540px;
}

/* "Poznaj nas" button (solid primary) */
.aurelines-ghost-btn .wp-block-button__link {
    background: #1F3FAE !important;
    border: 2px solid #1F3FAE !important;
    border-radius: 50px !important;
    color: #fff !important;
    transition: background-color 0.3s ease, border-color 0.3s ease, transform 0.25s ease;
}

.aurelines-ghost-btn .wp-block-button__link:hover {
    background: #1a3599 !important;
    border-color: #1a3599 !important;
    transform: translateY(-2px);
}

/* Solid CTA button in hero */
#home .wp-element-button {
    transition: transform 0.25s ease, box-shadow 0.25s ease, background-color 0.25s ease;
    box-shadow: 0 4px 20px rgba(232, 168, 56, 0.3);
}

#home .wp-element-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 32px rgba(232, 168, 56, 0.45);
}

/* ─── About section ─── */
#o-nas {
    position: relative;
}

#o-nas p {
    color: var(--wp--preset--color--muted, #6B7194);
}

/* About image: rounded with soft shadow */
.aurelines-about-image img {
    aspect-ratio: 4/3;
    object-fit: cover;
    background-color: var(--wp--preset--color--background-alt, #F4F5FC);
    border-radius: 20px !important;
    box-shadow: 0 24px 48px rgba(31, 63, 174, 0.1);
    transition: box-shadow 0.4s ease, transform 0.4s ease;
}

.aurelines-about-image:hover img {
    transform: scale(1.02);
    box-shadow: 0 32px 64px rgba(31, 63, 174, 0.14);
}

/* ─── Mission cards ─── */
#misja .wp-block-column {
    position: relative;
    transition: transform 0.35s cubic-bezier(0.25, 0.46, 0.45, 0.94),
                box-shadow 0.35s ease;
    border-radius: 16px;
    box-shadow: 0 4px 24px rgba(31, 63, 174, 0.06);
}

#misja .wp-block-column:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 48px rgba(31, 63, 174, 0.12);
}

/* Mission icon circles */
.aurelines-icon-circle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 64px;
    height: 64px;
    border-radius: 50%;
    margin: 0 auto var(--wp--preset--spacing--20, 1rem);
}

.aurelines-icon-circle svg {
    width: 28px;
    height: 28px;
}

.aurelines-icon-circle--fire {
    background: rgba(232, 168, 56, 0.12);
    color: #E8A838;
}

.aurelines-icon-circle--shield {
    background: rgba(31, 63, 174, 0.1);
    color: #1F3FAE;
}

.aurelines-icon-circle--growth {
    background: rgba(76, 175, 80, 0.1);
    color: #4caf50;
}

/* Mission section subtitle */
#misja > p {
    color: var(--wp--preset--color--muted, #6B7194);
}

/* ─── Contact section ─── */

/* Contact form card */
.aurelines-form-card {
    background: var(--wp--preset--color--background-alt, #F4F5FC);
    border-radius: 20px;
    padding: 3rem;
}

/* Contact form */
.aurelines-contact-form {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.aurelines-form-field {
    display: flex;
    flex-direction: column;
    gap: 0.375rem;
}

.aurelines-form-field label {
    font-weight: 600;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--wp--preset--color--muted, #6B7194);
    font-family: 'DM Sans', sans-serif;
}

.aurelines-form-field input,
.aurelines-form-field textarea {
    padding: 0.875rem 1rem;
    border: 1.5px solid #E2E4EF;
    border-radius: 12px;
    font-family: 'DM Sans', sans-serif;
    font-size: 1rem;
    background: #fff;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.aurelines-form-field input:focus,
.aurelines-form-field textarea:focus {
    outline: none;
    border-color: var(--wp--preset--color--primary, #1F3FAE);
    box-shadow: 0 0 0 4px rgba(31, 63, 174, 0.08);
}

.aurelines-contact-form .wp-element-button {
    width: 100%;
    cursor: pointer;
    padding: 0.875rem 2.25rem;
    font-size: 0.875rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    font-weight: 700;
    border-radius: 50px;
    transition: transform 0.25s ease, box-shadow 0.25s ease, background-color 0.25s ease;
}

.aurelines-contact-form .wp-element-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(232, 168, 56, 0.3);
}

/* Contact info styling */
#kontakt .wp-block-column:first-child p {
    color: var(--wp--preset--color--muted, #6B7194);
}

/* Contact info icons */
.aurelines-contact-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 10px;
    background: var(--wp--preset--color--accent-light, #FFF3D6);
    color: var(--wp--preset--color--accent, #E8A838);
    margin-right: 0.75rem;
    flex-shrink: 0;
}

.aurelines-contact-icon svg {
    width: 18px;
    height: 18px;
}

.aurelines-contact-row {
    display: flex;
    align-items: center;
    margin-bottom: 1rem;
}

/* ─── Form messages ─── */
.aurelines-form-message {
    padding: 0.875rem 1.25rem;
    border-radius: 12px;
    margin-bottom: 1rem;
    font-size: 0.875rem;
    letter-spacing: 0.02em;
}

.aurelines-form-success {
    background-color: #e8f5e9;
    color: #2e7d32;
    border-left: 3px solid #4caf50;
}

.aurelines-form-error {
    background-color: #fce4ec;
    color: #c62828;
    border-left: 3px solid #ef5350;
}

/* ─── Footer ─── */
.aurelines-footer {
    background-color: #0D1640 !important;
}

.aurelines-footer .wp-block-columns {
    margin-bottom: 0;
}

.aurelines-footer p,
.aurelines-footer a {
    color: rgba(255, 255, 255, 0.6) !important;
    font-size: 0.875rem;
}

.aurelines-footer a:hover {
    color: var(--wp--preset--color--accent, #E8A838) !important;
}

.aurelines-footer .wp-block-site-title a {
    color: #fff !important;
    font-family: 'Sora', sans-serif !important;
    font-weight: 700 !important;
}

.aurelines-footer .wp-block-heading {
    color: #fff !important;
}

.aurelines-footer .wp-block-navigation a {
    color: rgba(255, 255, 255, 0.6) !important;
    text-decoration: none;
}

.aurelines-footer .wp-block-navigation a:hover {
    color: var(--wp--preset--color--accent, #E8A838) !important;
}

.aurelines-footer-desc {
    opacity: 0.7;
}

.aurelines-footer-copyright {
    opacity: 0.5;
}

.aurelines-footer .wp-block-separator {
    margin-top: 2rem;
    margin-bottom: 1.5rem;
}

/* Footer social icons */
.aurelines-footer .wp-block-social-links a {
    opacity: 0.5;
    transition: transform 0.25s ease, opacity 0.25s ease;
}

.aurelines-footer .wp-block-social-links a:hover {
    transform: translateY(-3px);
    opacity: 1;
}

/* ─── Global refinements ─── */

/* Selection color */
::selection {
    background-color: rgba(232, 168, 56, 0.2);
    color: #1A1A2E;
}

/* Smooth transitions on all links */
a {
    transition: color 0.25s ease;
}

/*
 * ─── Navigation ─────────────────────────────────────────────────────────────
 *
 * WP Navigation block (overlayMenu: "mobile") renders ONE set of nav items
 * inside .wp-block-navigation__responsive-container (nested 4 levels deep).
 *
 * WP's built-in CSS uses 600px as its breakpoint:
 *   < 600px  → hamburger shown, responsive-container hidden
 *   ≥ 600px  → hamburger hidden, responsive-container shown inline
 *
 * We want 768px. At 600–767px we override WP:
 *   < 768px  → hamburger shown, responsive-container hidden (unless .is-menu-open)
 *   ≥ 768px  → hamburger hidden, inline nav shown (WP handles this)
 *
 * ─────────────────────────────────────────────────────────────────────────────
 */

/* ─── Desktop (≥ 768px): hide hamburger — WP shows inline nav above 600px ─── */
.aurelines-header .wp-block-navigation__responsive-container-open,
.aurelines-header .wp-block-navigation__responsive-container-close {
    display: none !important;
}

/* ─── Mobile (< 768px) ─────────────────────────────────────────────────────── */
@media (max-width: 767px) {

    /* Hero offset for sticky header height on mobile */
    #home {
        margin-top: -80px;
    }

    #home .wp-block-cover {
        padding-top: calc(var(--wp--preset--spacing--50) + 80px) !important;
    }

    /* KEY FIX: hide responsive container when NOT open as overlay.
       Between 600–767px WP shows it as inline nav (display:block, position:relative),
       but we want hamburger-only below 768px. */
    .aurelines-header .wp-block-navigation__responsive-container:not(.is-menu-open) {
        display: none !important;
    }

    /* ── Hamburger open button ── */
    .aurelines-header .wp-block-navigation__responsive-container-open {
        display: flex !important;
        align-items: center;
        justify-content: center;
        width: 44px;
        height: 44px;
        padding: 0;
        background: transparent;
        border: none;
        cursor: pointer;
        color: #1F3FAE !important;
    }

    .aurelines-header .wp-block-navigation__responsive-container-open svg {
        fill: currentColor;
        width: 24px;
        height: 24px;
    }

    .aurelines-header.is-scrolled .wp-block-navigation__responsive-container-open {
        color: #1F3FAE !important;
    }

    /* Hide hamburger when overlay is open */
    .aurelines-header .wp-block-navigation__responsive-container-open[aria-expanded="true"] {
        display: none !important;
    }

    /* ── Close button: hidden by default ── */
    .aurelines-header .wp-block-navigation__responsive-container-close {
        display: none !important;
    }

    /* ── Full-screen overlay ── */
    .aurelines-header .wp-block-navigation__responsive-container.is-menu-open {
        position: fixed !important;
        inset: 0 !important;
        padding: 0 !important;
        background-color: #0D1640 !important;
        display: flex !important;
        flex-direction: column;
        justify-content: center;
        align-items: center;
        z-index: 9999;
    }

    .aurelines-header .wp-block-navigation__responsive-container-content {
        display: flex !important;
        flex-direction: column !important;
        justify-content: center !important;
        align-items: center !important;
        width: 100% !important;
        height: 100% !important;
    }

    /* Close button visible only when overlay is open */
    .aurelines-header .wp-block-navigation__responsive-container.is-menu-open
        .wp-block-navigation__responsive-container-close {
        position: fixed !important;
        top: 1rem;
        right: 1.5rem;
        display: flex !important;
        align-items: center;
        justify-content: center;
        width: 44px;
        height: 44px;
        background: transparent;
        border: none;
        cursor: pointer;
        z-index: 10000;
        color: #fff !important;
    }

    .aurelines-header .wp-block-navigation__responsive-container.is-menu-open
        .wp-block-navigation__responsive-container-close svg {
        fill: currentColor;
        width: 24px;
        height: 24px;
    }

    /* ── Nav item list in overlay ── */
    .aurelines-header .wp-block-navigation__responsive-container.is-menu-open
        .wp-block-navigation__container {
        display: flex !important;
        flex-direction: column;
        align-items: center;
        gap: 0;
        width: 100%;
        padding: 0 !important;
        padding-inline-start: 0 !important;
        margin: 0;
        list-style: none;
    }

    /* ── Nav items in overlay ── */
    .aurelines-header .wp-block-navigation__responsive-container.is-menu-open
        .wp-block-navigation-item {
        display: block !important;
        width: 100%;
        text-align: center;
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    }

    .aurelines-header .wp-block-navigation__responsive-container.is-menu-open
        .wp-block-navigation-item:first-child {
        border-top: 1px solid rgba(255, 255, 255, 0.1);
    }

    /* ── Nav links in overlay ── */
    .aurelines-header .wp-block-navigation__responsive-container.is-menu-open a,
    .aurelines-header .wp-block-navigation__responsive-container.is-menu-open
        .wp-block-navigation-item__content {
        display: block !important;
        box-sizing: border-box !important;
        width: 100% !important;
        padding: 1.25rem 2rem !important;
        font-size: 1.5rem !important;
        font-weight: 600 !important;
        text-align: center !important;
        color: #fff !important;
        text-transform: uppercase;
        letter-spacing: 0.1em;
    }

    .aurelines-header .wp-block-navigation__responsive-container.is-menu-open a:hover {
        color: var(--wp--preset--color--accent, #E8A838) !important;
    }

    /* Hide underline pseudo-element inside overlay */
    .aurelines-header .wp-block-navigation__responsive-container.is-menu-open a::after {
        display: none !important;
    }
}

/* ─── Responsive: other elements ─────────────────────────────────────────── */
@media (max-width: 767px) {
    .aurelines-form-card {
        padding: 1.5rem;
    }

    #home .wp-block-cover::before,
    #home .wp-block-cover::after {
        display: none;
    }

    #home h1 {
        font-size: 2.25rem !important;
    }

    .aurelines-hero-subtitle {
        font-size: 1.0625rem !important;
    }

    .aurelines-contact-row span:not(.aurelines-contact-icon) {
        font-size: 0.875rem;
    }
}
