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

:root {
    --primary-color: #22c55e;
    /* Bright Green */
    --primary-dark: #15803d;
    /* Darker Green */
    --secondary-color: #4ade80;
    /* Lighter Green accent */
    --text-dark: #f3f4f6;
    /* White/Light Gray for headers on dark bg */
    --text-light: #9ca3af;
    /* Gray for body text on dark bg */
    --price-text: #ffffff;
    /* White for price */
    --bg-light: #111827;
    /* Dark Gray background */
    --bg-section: #000000;
    /* Black background */
    --white: #ffffff;
    --card-bg: #1f2937;
    /* Dark Gray for cards */
    --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.5), 0 2px 4px -1px rgba(0, 0, 0, 0.3);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.5), 0 4px 6px -2px rgba(0, 0, 0, 0.3);
    /* approximate height of the fixed navbar (adjusted per breakpoint below) */
    --nav-safe: 140px;
}

html {
    scroll-behavior: smooth;
}

/* Ensure fragment navigation (anchors) accounts for fixed navbar height */
html {
    scroll-padding-top: calc(var(--nav-safe) + 8px);
}

/* Apply scroll offset to all sections with id so clicking nav links shows full heading */
section[id],
.hero {
    scroll-margin-top: calc(var(--nav-safe) + 8px);
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    line-height: 1.6;
    color: var(--text-light);
    background-color: var(--bg-section);
    overflow-x: hidden;
    padding-top: var(--nav-safe);
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

a {
    color: inherit;
    text-decoration: none;
}

/* Navigation */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: rgba(0, 0, 0, 0.95);
    backdrop-filter: blur(10px);
    box-shadow: var(--shadow);
    z-index: 1000;
    transition: all 0.3s ease;
    border-bottom: 1px solid #374151;
}

.nav-wrapper {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 0;
    flex-wrap: wrap;
    gap: 1rem;
}

.logo {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.nav-logo-img {
    height: 140px;
    width: auto;
}

.logo h2 {
    font-size: 1.5rem;
    color: var(--primary-color);
    font-weight: 700;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 1.5rem;
    flex-wrap: wrap;
}

.nav-menu a {
    text-decoration: none;
    color: var(--text-light);
    font-weight: 500;
    transition: color 0.3s ease;
    position: relative;
    font-size: 0.95rem;
}

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

.nav-menu a::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--primary-color);
    transition: width 0.3s ease;
}

.nav-menu a:hover::after {
    width: 100%;
}

.nav-contact {
    display: flex;
    align-items: center;
}

.nav-phone {
    text-align: right;
}

.phone-label {
    display: block;
    font-size: 0.75rem;
    color: var(--text-light);
    margin-bottom: 0.25rem;
}

.phone-number {
    display: block;
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--primary-color);
    text-decoration: none;
}

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

.nav-toggle span {
    width: 25px;
    height: 3px;
    background: var(--text-dark);
    transition: all 0.3s ease;
}

/* Hero Section */
.hero {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    /* Zdjęcie autolawety jako tło - zielony Opel Movano z przyczepą */
    background-image: url('images/autolaweta-tlo.jpg');
    /* Fallback - jeśli zdjęcie nie jest dostępne */
    background-color: #111827;
    background-size: cover;
    background-position: center center;
    background-repeat: no-repeat;
    background-attachment: scroll;
    color: var(--white);
    text-align: center;
    padding-top: 12px;
    padding-bottom: clamp(40px, 10vh, 100px);
    overflow: hidden;
}

/* Gradient overlay dla lepszej czytelności tekstu */
.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    /* Gradient - Green/Black theme */
    background: linear-gradient(180deg, rgba(0, 0, 0, 0.8) 0%, rgba(21, 128, 61, 0.4) 50%, rgba(0, 0, 0, 0.8) 100%);
    z-index: 1;
}

/* Dodatkowy overlay dla ciemniejszego tła - głównie w górnej części */
.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.6);
    z-index: 1;
}

.hero-content {
    position: relative;
    z-index: 2;
    max-width: 900px;
    margin-top: clamp(30px, 8vh, 90px);
    animation: fadeInUp 1s ease;
}

.hero-title {
    font-size: clamp(1.8rem, 6vw, 4rem);
    font-weight: 300;
    margin-bottom: 0.5rem;
    line-height: 1.2;
    color: var(--white);
    overflow-wrap: anywhere;
    word-break: break-word;
}

.hero-subtitle-large {
    font-size: clamp(2.2rem, 10vw, 5rem);
    font-weight: 700;
    margin-bottom: 2rem;
    line-height: 1.1;
    color: var(--primary-color);
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
    overflow-wrap: anywhere;
    word-break: break-word;
}

.hero-description {
    font-size: clamp(0.95rem, 3vw, 1.25rem);
    margin-bottom: 2.5rem;
    opacity: 0.95;
    line-height: 1.6;
    color: #e5e7eb;
    overflow-wrap: anywhere;
    word-break: break-word;
}

/* Responsive tweaks for hero to improve readability on small devices */
@media (min-width: 1024px) {
    .hero {
        background-attachment: fixed;
    }
}

@media (max-width: 900px) {
    .hero {
        background-position: center top;
        align-items: flex-start;
        min-height: auto;
        padding-top: 56px; /* allow space for fixed navbar */
        padding-bottom: 48px;
    }
    .hero-content {
        padding: 0 20px;
    }
}

@media (max-width: 480px) {
    .hero-title {
        line-height: 1.05;
    }
    .hero-subtitle-large {
        margin-bottom: 1rem;
    }
    .hero-description {
        font-size: clamp(0.9rem, 3.5vw, 1rem);
    }
    .nav-logo-img {
        height: 80px;
    }
}

/* Adjust nav-safe variable per breakpoint so hero is not covered by navbar */
@media (max-width: 900px) {
    :root { --nav-safe: 110px; }
    .nav-logo-img { height: 100px; }
}

@media (max-width: 480px) {
    :root { --nav-safe: 88px; }
    .nav-logo-img { height: 80px; }
}

@media (max-width: 360px) {
    :root { --nav-safe: 72px; }
    .nav-logo-img { height: 64px; }
}

/* Tablet-specific tweaks */
@media (max-width: 1024px) and (min-width: 601px) {
    .hero {
        align-items: flex-start;
        min-height: 60vh;
        padding-top: 64px; /* leave room for navbar */
        padding-bottom: 48px;
    }
    .hero-content {
        margin-top: 24px;
    }
    .hero-title {
        font-size: clamp(1.6rem, 4.5vw, 3rem);
    }
    .hero-subtitle-large {
        font-size: clamp(1.8rem, 6.5vw, 3.5rem);
    }
}

/* Small phones - ensure compact layout */
@media (max-width: 360px) {
    .hero {
        padding-top: 48px;
        padding-bottom: 36px;
    }
    .hero-title {
        font-size: clamp(1.2rem, 6.5vw, 1.6rem);
    }
    .hero-subtitle-large {
        font-size: clamp(1.4rem, 8.5vw, 2rem);
    }
    .hero-content {
        padding-left: 14px;
        padding-right: 14px;
    }
}

/* Rental & Transport Sections */
.rental-section,
.transport-section {
    padding: 5rem 0;
    background: var(--bg-section);
}

.rental-section {
    background: var(--bg-light);
}

.section-content {
    max-width: 800px;
    margin: 0 auto;
}

.section-title-left {
    font-size: 3rem;
    font-weight: 300;
    margin-bottom: 0.5rem;
    color: var(--text-dark);
}

.section-subtitle-left {
    font-size: 3.5rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    color: var(--primary-color);
}

.section-text {
    font-size: 1.1rem;
    color: var(--text-light);
    margin-bottom: 2rem;
    line-height: 1.8;
}

/* Cities Section */
.cities-section {
    padding: 5rem 0;
    background: linear-gradient(135deg, #064e3b 0%, #065f46 100%);
    color: var(--white);
    text-align: center;
    border-top: 1px solid #065f46;
    border-bottom: 1px solid #065f46;
}

.cities-content {
    max-width: 800px;
    margin: 0 auto;
}

.cities-title {
    font-size: 3rem;
    font-weight: 300;
    margin-bottom: 0.5rem;
    color: #e5e7eb;
}

.cities-subtitle {
    font-size: 3.5rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    color: var(--primary-color);
}

.cities-text {
    font-size: 1.2rem;
    margin-bottom: 2rem;
    opacity: 0.95;
    color: #d1d5db;
}

.cities-contact {
    margin-bottom: 2rem;
}

.cities-phone {
    display: flex;
    flex-direction: column;
    gap: 6px;
    align-items: center;
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 1rem;
    color: var(--primary-color);
}

.cities-phone-number {
    display: block;
    line-height: 1;
}

.cities-email {
    font-size: 1.1rem;
    opacity: 0.9;
    color: #d1d5db;
}

/* Shared Background Style for Offer, Pricing, Conditions */
.offer-section,
.pricing-section,
.conditions-section {
    padding: 5rem 0;
    position: relative;
    background-image: url('images/highway-bg.png');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    color: var(--white);
}

/* Background overlay */
.offer-section::before,
.pricing-section::before,
.conditions-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.75);
    /* Dark overlay for readability */
    z-index: 1;
}

.offer-section .container,
.pricing-section .container,
.conditions-section .container {
    position: relative;
    z-index: 2;
}

.section-title {
    font-size: 2.5rem;
    font-weight: 700;
    text-align: center;
    margin-bottom: 1rem;
    color: var(--white);
}

.section-subtitle {
    text-align: center;
    color: #d1d5db;
    /* Light gray */
    font-size: 1.1rem;
    margin-bottom: 3rem;
}

.offer-content {
    max-width: 900px;
    margin: 0 auto 3rem;
    text-align: center;
}

.offer-text {
    font-size: 1.1rem;
    color: #e5e7eb;
    margin-bottom: 2rem;
    line-height: 1.8;
}

.offer-highlight {
    background: rgba(31, 41, 55, 0.9);
    /* Semi-transparent card */
    padding: 3rem;
    border-radius: 12px;
    box-shadow: var(--shadow-lg);
    text-align: center;
    max-width: 600px;
    margin: 0 auto;
    border: 1px solid rgba(34, 197, 94, 0.3);
    /* Green border accent */
    backdrop-filter: blur(5px);
}

.offer-price {
    margin-bottom: 1.5rem;
}

.price-amount {
    font-size: 4rem;
    font-weight: 700;
    color: var(--primary-color);
}

.price-currency {
    font-size: 1.5rem;
    color: #d1d5db;
    margin-left: 0.5rem;
}

.offer-features p {
    font-size: 1.1rem;
    color: var(--white);
    margin-bottom: 0.5rem;
    font-weight: 500;
}

/* Road Help Section */
.road-help-section {
    padding: 5rem 0;
    background: var(--bg-section);
    text-align: center;
}

.road-help-icon {
    font-size: 4rem;
    margin-bottom: 1rem;
    color: var(--primary-color);
}

.road-help-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: var(--primary-color);
    color: #000;
    padding: 0.75rem 1.5rem;
    border-radius: 25px;
    font-weight: 600;
    margin-bottom: 1.5rem;
}

.badge-icon {
    font-size: 1.5rem;
}

.road-help-phone {
    font-size: 2rem;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 1.5rem;
}

.road-help-text {
    max-width: 800px;
    margin: 0 auto 2rem;
    font-size: 1.1rem;
    color: var(--text-light);
    line-height: 1.8;
}

/* Pricing Section */
.pricing-table {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
    margin-top: 3rem;
}

.pricing-column {
    background: rgba(31, 41, 55, 0.9);
    padding: 2.5rem;
    border-radius: 12px;
    box-shadow: var(--shadow);
    transition: all 0.3s ease;
    text-align: center;
    border: 1px solid rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(5px);
}

.pricing-column:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
    border-color: var(--primary-color);
    background: rgba(31, 41, 55, 1);
}

.pricing-column h3 {
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
    color: var(--white);
}

.pricing-price {
    margin-bottom: 2rem;
}

.price-main {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--primary-color);
}

.price-period {
    font-size: 1.1rem;
    color: #d1d5db;
    margin-left: 0.5rem;
}

.pricing-features {
    list-style: none;
    margin-bottom: 2rem;
    text-align: left;
}

.pricing-features li {
    padding: 0.75rem 0;
    color: #e5e7eb;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.pricing-features li:last-child {
    border-bottom: none;
}

/* Conditions Section */
.conditions-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-top: 3rem;
}

.condition-item {
    background: rgba(31, 41, 55, 0.9);
    padding: 2rem;
    border-radius: 12px;
    box-shadow: var(--shadow);
    border: 1px solid rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(5px);
}

.condition-item h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    color: var(--primary-color);
}

.condition-item ul {
    list-style: none;
}

.condition-item li {
    padding: 0.5rem 0;
    color: #e5e7eb;
    padding-left: 1.5rem;
    position: relative;
}

.condition-item li::before {
    content: '✓';
    position: absolute;
    left: 0;
    color: var(--primary-color);
    font-weight: 700;
}

/* Contact Section */
.contact-section {
    padding: 5rem 0;
    background: var(--bg-light);
}

.contact-wrapper {
    display: grid;
    grid-template-columns: 1fr 1.5fr;
    gap: 3rem;
    margin-top: 3rem;
}

.contact-info {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.contact-item {
    display: flex;
    gap: 1.5rem;
    align-items: flex-start;
}

.contact-icon {
    font-size: 2rem;
    flex-shrink: 0;
    color: var(--primary-color);
}

.contact-item h3 {
    font-size: 1.25rem;
    margin-bottom: 0.5rem;
    color: var(--text-dark);
}

.contact-item p {
    color: var(--text-light);
    margin-bottom: 0.25rem;
}

.contact-item a {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 700;
}

.contact-item a:hover {
    text-decoration: underline;
}

/* Contact Map */
.contact-map {
    border-radius: 12px;
    overflow: hidden;
    box-shadow: var(--shadow);
    border: 2px solid #374151;
}

/* Contact Form */
.contact-form {
    background: var(--card-bg);
    padding: 2.5rem;
    border-radius: 12px;
    box-shadow: var(--shadow);
    border: 1px solid #374151;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: var(--text-dark);
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 0.875rem;
    border: 2px solid #374151;
    border-radius: 8px;
    font-size: 1rem;
    font-family: inherit;
    background: #111827;
    color: var(--text-dark);
    transition: border-color 0.3s ease;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary-color);
}

.form-group textarea {
    resize: vertical;
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 1rem 2rem;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
    cursor: pointer;
    border: none;
    font-size: 1rem;
    text-transform: lowercase;
}

.btn-primary {
    background: var(--primary-color);
    color: #000;
}

.btn-primary:hover {
    background: var(--primary-dark);
    color: #fff;
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.btn-secondary {
    background: transparent;
    color: var(--primary-color);
    border: 2px solid var(--primary-color);
}

.btn-secondary:hover {
    background: var(--primary-color);
    color: #000;
}

.btn-full {
    width: 100%;
}

/* Footer */
.footer {
    background: #000000;
    color: var(--white);
    padding: 3rem 0 1rem;
    border-top: 1px solid #374151;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

.footer-section h3,
.footer-section h4 {
    margin-bottom: 1rem;
    color: var(--primary-color);
}

.footer-section p {
    color: #9ca3af;
    line-height: 1.8;
}

.footer-section ul {
    list-style: none;
}

.footer-section ul li {
    margin-bottom: 0.5rem;
}

.footer-section a {
    color: #9ca3af;
    text-decoration: none;
    transition: color 0.3s ease;
}

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

.footer-bottom {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid #374151;
    color: #6b7280;
}

/* Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Responsive Design */
@media (max-width: 968px) {
    .nav-wrapper {
        flex-direction: column;
        align-items: flex-start;
    }

    .nav-menu {
        width: 100%;
        flex-direction: column;
        gap: 0.5rem;
    }

    .nav-contact {
        width: 100%;
    }
}

@media (max-width: 768px) {
    .nav-menu {
        position: fixed;
        left: -100%;
        top: 80px;
        flex-direction: column;
        background: var(--card-bg);
        width: 100%;
        text-align: left;
        transition: 0.3s;
        box-shadow: var(--shadow);
        padding: 2rem;
        z-index: 999;
    }

    .nav-menu.active {
        left: 0;
    }

    .nav-menu a {
        color: var(--text-dark);
    }

    .nav-toggle {
        display: flex;
        position: absolute;
        right: 0;
        top: 1rem;
    }

    .nav-toggle span {
        background: var(--text-dark);
    }

    /* Hero section - mobile optimization */
    .hero {
        background-attachment: scroll;
        /* Lepsze dla mobile */
        background-size: cover;
        background-position: center center;
    }

    .hero::after {
        height: 50%;
        opacity: 0.6;
    }

    .hero-title {
        font-size: 2.5rem;
    }

    .hero-subtitle-large {
        font-size: 3rem;
    }

    .hero-description {
        font-size: 1.1rem;
    }

    .section-title-left,
    .cities-title {
        font-size: 2rem;
    }

    .section-subtitle-left,
    .cities-subtitle {
        font-size: 2.5rem;
    }

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

    .contact-wrapper {
        grid-template-columns: 1fr;
    }

    .pricing-table {
        grid-template-columns: 1fr;
    }

    .conditions-content {
        grid-template-columns: 1fr;
    }

    .form-row {
        grid-template-columns: 1fr;
    }

    .price-amount {
        font-size: 3rem;
    }
}

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

    .hero-subtitle-large {
        font-size: 2.5rem;
    }

    .section-title-left,
    .cities-title {
        font-size: 1.5rem;
    }

    .section-subtitle-left,
    .cities-subtitle {
        font-size: 2rem;
    }

    .btn {
        width: 100%;
    }
}

/* Offer flex layout */
.offer-flex-wrapper {
    display: flex;
    justify-content: center;
    align-items: center;
    /* Center vertically */
    gap: 2rem;
    max-width: 1000px;
    /* Slightly tighter width */
    margin: 0 auto;
    flex-wrap: wrap;
    /* Keep wrap for mobile */
}

.offer-highlight {
    flex: 1;
    min-width: 300px;
    margin: 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
    /* Ensure it has a bounded height we can match */
}

.offer-image-container {
    flex: 1;
    min-width: 300px;
    display: flex;
    align-items: center;
    justify-content: center;
    /* Center image within its half */
}

.offer-car-img {
    width: auto;
    /* Allow width to scale with height */
    max-width: 100%;
    max-height: 280px;
    /* Constrain height to roughly match the text box */
    object-fit: contain;
    border-radius: 12px;
    filter: drop-shadow(0 10px 15px rgba(0, 0, 0, 0.5));
}

@media (max-width: 768px) {
    .offer-flex-wrapper {
        flex-direction: column;
        align-items: center;
    }

    .offer-highlight,
    .offer-image-container {
        width: 100%;
        max-width: 500px;
    }
}