:root {
    --brand-green: #2D5A27;
    --brand-green-light: #3a7a32;
    --navy-dark: #0F1024;
    --white: #ffffff;
    --light-bg: #F8FAFC;
    --text: #334155;
}

/* RESET */
* { margin: 0; padding: 0; box-sizing: border-box; }

html {
    scroll-behavior: smooth;
    overflow-x: hidden;
    width: 100%;
}

body {
    font-family: 'Montserrat', sans-serif;
    background: #fff;
    color: var(--text);
    line-height: 1.6;
    overflow-x: hidden;
    width: 100%;
}

.container { max-width: 1200px; margin: auto; padding: 0 20px; }
.narrow   { max-width: 800px; margin: auto; }
.text-center { text-align: center; }

/* ============ NAVBAR ============ */
.navbar {
    position: sticky;
    top: 0;
    z-index: 1000;
    background: rgba(255, 255, 255, 0.98);
    padding: 12px 0;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.flex-nav { display: flex; justify-content: space-between; align-items: center; }
.logo-img { height: 40px; width: auto; }

.menu-toggle {
    display: flex; flex-direction: column; gap: 5px;
    background: none; border: none; cursor: pointer;
}

.bar { width: 25px; height: 3px; background: var(--brand-green); transition: 0.3s; }

/* MOBILE NAV */
.nav-links {
    display: none; position: absolute; top: 100%; left: 0; width: 100%;
    background: white; padding: 30px; flex-direction: column; gap: 20px;
    text-align: center; box-shadow: 0 10px 20px rgba(0,0,0,0.1);
}
.nav-links.active { display: flex; }

.nav-links a {
    text-decoration: none;
    font-weight: 600;
    color: var(--navy-dark);
    position: relative;
    padding-bottom: 3px;
    transition: color 0.25s ease;
}

/* Animated underline for regular nav links */
.nav-links a:not(.nav-cta)::after {
    content: '';
    position: absolute;
    bottom: 0; left: 0;
    width: 100%;
    height: 2px;
    background: var(--brand-green);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.28s ease;
}

.nav-links a:not(.nav-cta):hover {
    color: var(--brand-green);
}

.nav-links a:not(.nav-cta):hover::after {
    transform: scaleX(1);
}

.nav-links a:not(.nav-cta):active {
    color: var(--brand-green-light);
}

/* CTA button hover */
.nav-cta {
    background: var(--brand-green);
    color: white !important;
    padding: 10px 20px;
    border-radius: 4px;
    transition: background 0.25s ease, transform 0.2s ease, box-shadow 0.25s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding-bottom: 10px; /* override inherited padding-bottom: 3px */
    line-height: 1;
}

.nav-cta:hover {
    background: var(--brand-green-light) !important;
    transform: translateY(-2px);
    box-shadow: 0 6px 18px rgba(45, 90, 39, 0.25);
}

.nav-cta:active {
    transform: translateY(0);
    box-shadow: none;
}

/* ============ HERO (FIXED FOR MOBILE) ============ */
.hero {
    position: relative;
    padding: 140px 0 80px 0;
    min-height: 80vh;
    display: flex;
    align-items: center;
    background-color: var(--navy-dark);
    /* Poprawka tła: usunięcie fixed, dodanie lepszego gradientu */
    background: 
        linear-gradient(to right, rgba(15, 16, 36, 0.95) 0%, rgba(15, 16, 36, 0.4) 100%),
        url('hero-casablanca.jpg') no-repeat center right / cover;
}

.glass {
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    padding: 40px;
    border-radius: 12px;
    max-width: 650px;
}

.hero h1 {
    font-family: 'Playfair Display', serif;
    font-size: clamp(2.5rem, 8vw, 4.5rem);
    color: white;
    line-height: 1.1;
    margin-bottom: 10px;
}

.hero-badge {
    color: #8fd88a; font-size: 0.75rem; font-weight: 700; text-transform: uppercase;
    letter-spacing: 1px; margin-bottom: 10px; display: block;
}

.hero-sub { color: var(--brand-green-light); font-weight: 600; margin-bottom: 15px; }
.hero-desc { color: rgba(255,255,255,0.8); margin-bottom: 30px; max-width: 500px; }

.hero-actions { display: flex; flex-wrap: wrap; gap: 15px; }

.btn {
    padding: 14px 28px; text-decoration: none; font-weight: 700;
    font-size: 0.75rem; text-transform: uppercase; transition: 0.3s;
}
.btn-green { background: var(--brand-green); color: white; }
.btn-outline { border: 1px solid white; color: white; }

/* ============ SECTIONS ============ */
.section { padding: 80px 0; }
.light-bg { background: var(--light-bg); }

.section-heading {
    font-family: 'Playfair Display', serif;
    font-size: clamp(1.8rem, 5vw, 2.8rem);
    margin-bottom: 30px;
    color: var(--navy-dark);
}

.feature-list { list-style: none; }
.feature-list li {
    padding: 15px 0; border-bottom: 1px solid rgba(0,0,0,0.05);
    display: flex; align-items: center; gap: 10px;
}
.feature-icon { color: var(--brand-green); font-weight: bold; }

.backbone-grid {
    display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px; margin-top: 30px;
}
.backbone-item { padding: 25px; border-left: 4px solid var(--brand-green); background: white; box-shadow: 0 5px 15px rgba(0,0,0,0.05); }

/* ============ PARTNERS ============ */
.partners-grid {
    display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px; margin-top: 40px;
}

.partner-card {
    background: white;
    border: 1px solid rgba(0,0,0,0.06);
    padding: 40px 20px;
    border-radius: 12px;
    text-decoration: none;
    color: var(--text);
    transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease, background 0.3s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

/* Subtle green shimmer line at top on hover */
.partner-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--brand-green), var(--brand-green-light), var(--brand-green));
    transform: scaleX(0);
    transition: transform 0.35s ease;
    transform-origin: left;
}

/* Arrow icon that slides up into view */
.partner-card::after {
    content: '↗';
    position: absolute;
    bottom: 14px;
    right: 18px;
    font-size: 1rem;
    color: var(--brand-green);
    opacity: 0;
    transform: translate(4px, 4px);
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.partner-card h3 {
    font-family: 'Playfair Display', serif;
    font-size: 1.5rem;
    color: var(--navy-dark);
    transition: color 0.3s ease;
}

.partner-card p {
    font-size: 0.85rem;
    color: var(--brand-green);
    font-weight: 600;
    margin-top: 5px;
    transition: letter-spacing 0.3s ease;
}

/* HOVER */
.partner-card:not(.no-link):hover {
    transform: translateY(-8px);
    border-color: var(--brand-green);
    box-shadow: 0 20px 40px rgba(45, 90, 39, 0.12), 0 4px 12px rgba(0,0,0,0.06);
    background: linear-gradient(160deg, #ffffff 60%, #f0f9f0 100%);
}

.partner-card:not(.no-link):hover::before {
    transform: scaleX(1);
}

.partner-card:not(.no-link):hover::after {
    opacity: 1;
    transform: translate(0, 0);
}

.partner-card:not(.no-link):hover h3 {
    color: var(--brand-green);
}

.partner-card:not(.no-link):hover p {
    letter-spacing: 0.03em;
}

/* ACTIVE (click) */
.partner-card:not(.no-link):active {
    transform: translateY(-3px) scale(0.98);
    box-shadow: 0 8px 20px rgba(45, 90, 39, 0.1);
    transition: transform 0.1s ease, box-shadow 0.1s ease;
}

/* ============ ANIMATIONS ============ */
.reveal { opacity: 0; transform: translateY(20px); transition: 0.8s ease-out; }
.reveal.revealed { opacity: 1; transform: translateY(0); }

/* ============ FOOTER ============ */
footer { padding: 60px 0; background: #080914; color: rgba(255,255,255,0.5); text-align: center; }
.footer-logo { height: 30px; margin-bottom: 20px; opacity: 0.6; }
.footer-nav { display: flex; gap: 20px; justify-content: center; margin-bottom: 20px; flex-wrap: wrap; }
.footer-nav a { color: inherit; text-decoration: none; font-size: 0.8rem; }

/* ============ MEDIA QUERIES ============ */
@media (max-width: 768px) {
    .hero {
        padding: 100px 0 60px 0;
        /* Pionowy gradient dla czytelności na małym ekranie */
        background: 
            linear-gradient(to bottom, rgba(15, 16, 36, 0.9) 0%, rgba(15, 16, 36, 0.7) 100%),
            url('hero-casablanca.jpg') no-repeat center center / cover;
    }
    .glass { background: transparent; border: none; backdrop-filter: none; padding: 20px; }
    .hero-actions { flex-direction: column; }
    .btn { text-align: center; width: 100%; }
}

@media (min-width: 1024px) {
    .menu-toggle { display: none; }
    .nav-links { display: flex !important; position: static; width: auto; flex-direction: row; box-shadow: none; padding: 0; }
}