
html {
    scroll-behavior: smooth;
	overflow-y: scroll;
}

section {
    scroll-margin-top: 70px;
	padding: 100px 0;
}

:root {
    --primary-blue: #1a2537;   /* Bardzo ciemny granat dla powagi */
    --accent-yellow: #fbb80f;  /* Żółty Renault Master */
    --text-dark: #2C2C2C;
    --text-light: #F9F9F9;
	--font-head: 'Montserrat', Arial, sans-serif;
	--font-body: 'Open Sans', Helvetica, Arial, sans-serif;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: var(--font-body);
    line-height: 1.6;
    color: var(--text-dark);
}

/* Container limits width on big screens */
.container {
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
}

/* --- NAVIGATION --- */
.navbar {
    background: var(--primary-blue);
    height: 70px;
    display: flex;
    align-items: center;
    position: sticky; /* Keeps nav visible when scrolling */
    top: 0;
    z-index: 1000;
}

.navbar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 90%;
}

.logo {
    color: white;
    font-family: var(--font-head);
    font-size: 1.5rem;
    text-decoration: none;
    font-weight: 700;
}

.logo .highlight {
    color: white !important;
}


.nav-menu {
    display: none; /* We will use JS to toggle this on mobile */
    flex-direction: column;
    width: 100%;
    position: absolute;
    top: 70px;
    left: 0;
    background: var(--primary-blue);
    text-align: center;
    list-style: none; 
}

/* Active class to show menu (JS will add this) */
.nav-menu.active {
    display: flex;
}

.nav-link {
    color: white;
    text-decoration: none;
    display: block;
    padding: 10px 20px; /* Większe marginesy wewnętrzne */
    font-size: 1rem;
    font-weight: 600;
    border-radius: 4px;
    transition: background 0.3s;
}

.nav-link.active {
    color: var(--accent-yellow); /* Wyróżnienie aktywnej zakładki żółcią Mastera */
}

/* The Hamburger Icon */
.menu-toggle .bar {
    display: block;
    width: 25px;
    height: 3px;
    margin: 5px auto;
    background-color: white;
}

/* --- HERO SECTION --- */
.hero-section {
    background: linear-gradient(rgba(12, 45, 72, 0.8), rgba(12, 45, 72, 0.6)), url('../img/main_picture.png');
    background-size: cover;
    background-position: center;
    height: 90vh; /* 90% of screen height */
    display: flex;
    align-items: center;
    text-align: center;
    color: white;
}

.hero-content h1 {
    font-family: var(--font-head);
    font-size: 2.5rem;
    margin-bottom: 20px;
}

.hero-content p {
    font-size: 1.2rem;
    margin-bottom: 30px;
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 12px 30px;
    text-decoration: none;
    border-radius: 5px;
    font-weight: 600;
    margin: 5px;
}

.btn-primary {
    background: var(--accent-yellow) !important;
    color: var(--primary-blue) !important;
    border: none;
    padding: 12px 30px;
    font-weight: 700;
    cursor: pointer;
    border-radius: 5px;
    transition: 0.3s;
}

.btn-primary:hover {
    filter: brightness(1.1);
}

.btn-secondary {
    background: transparent;
    border: 2px solid white;
    color: white;
}

/* --- DESKTOP VIEW (Media Query) --- */
@media (min-width: 769px) {
    .nav-menu {
        display: flex; /* Always show menu on desktop */
        flex-direction: row;
        position: static;
        width: auto;
        background: transparent;
    }

    .menu-toggle {
        display: none; /* Hide hamburger on desktop */
    }


	.btn-cta {
		background: var(--accent-yellow) !important;
		color: var(--primary-blue) !important;
		padding: 10px 25px !important;
		font-weight: 700 !important;
		border-radius: 4px;
		transition: 0.3s ease;
	}

	.btn-cta:hover {
		filter: brightness(1.1);
		transform: translateY(-2px); /* Delikatne uniesienie przy najechaniu */
		box-shadow: 0 4px 10px rgba(0,0,0,0.2);
	}
}

/* --- SERVICES SECTION --- */
.services-section {
    padding: 80px 0;
    background-color: #f9f9f9; /* Light grey background for contrast */
    text-align: center;
}

.section-header h2 {
    font-family: var(--font-head);
    font-size: 2rem;
    color: var(--primary-blue);
    margin-bottom: 10px;
}

.section-header p {
    color: #666;
    margin-bottom: 40px;
}
.divider {
    height: 4px;
    width: 60px;
    background-color: var(--accent-orange);
    margin: 10px auto;
}

/* THE GRID SYSTEM */
.services-grid {
    display: grid;
    /* Domyślnie 1 kolumna (na telefony) */
    grid-template-columns: 1fr;
    gap: 30px;
    margin-top: 40px;
    max-width: 900px; /* Ograniczamy szerokość, żeby kafelki nie były za szerokie */
    margin-left: auto;
    margin-right: auto;
}

/* Service Card Design */
.service-card {
    background: white;
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1); /* Soft shadow */
    transition: transform 0.3s ease; /* Smooth animation on hover */
}

.service-card:hover {
    transform: translateY(-5px); /* Moves up slightly when hovered */
}

.icon-box {
    color: var(--accent-orange);
    margin-bottom: 20px;
}

.service-card h3 {
    font-family: var(--font-head);
    color: var(--primary-blue);
    margin-bottom: 15px;
}

/* --- DESKTOP GRID (Media Query) --- */
/* When screen is wider than 768px... */
@media (min-width: 768px) {
    .services-grid {
        grid-template-columns: repeat(2, 1fr); 
    }
}

/* --- ABOUT SECTION --- */
.about-section {
    padding: 80px 0;
    background: white;
}

.about-content {
    display: flex;
    flex-direction: column; /* Mobile: Stack vertically */
    gap: 40px;
    align-items: center;
}

.about-text {
    text-align: left;
}

/* Align divider left for this section */
.divider.align-left {
    margin: 10px 0 20px 0; /* No auto margin */
}

.about-features {
    list-style: none; /* No default bullets */
    margin: 20px 0;
}

.about-features li {
    margin-bottom: 10px;
    font-weight: 600;
    color: var(--text-dark);
}

.about-image img {
    width: 100%;
    border-radius: 8px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.15);
}

/* --- DESKTOP VIEW --- */
@media (min-width: 768px) {
    .about-content {
        flex-direction: row; /* Desktop: Side by side */
        justify-content: space-between;
    }

    .about-text {
        flex: 1; /* Take up 50% width */
        padding-right: 40px;
    }

    .about-image {
        flex: 1; /* Take up 50% width */
    }
}

/* --- CONTACT SECTION --- */
.contact-section {
    padding: 80px 0;
    background-color: var(--primary-blue);
    color: white;
}

.contact-section h2 {
    color: white;
}

.contact-section p {
    color: #e0e0e0;
}

.contact-wrapper {
    text-align: left;
    display: flex;
    gap: 30px;
}

/* Contact Info Box */
.contact-info {
    background: rgba(255, 255, 255, 0.1); /* Glass effect */
    padding: 30px;
    border-radius: 8px;
    backdrop-filter: blur(5px);
}

.contact-section .section-header {
    text-align: center;
    width: 100%;
}

.contact-section .section-header,
.pricing-status-bar {
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 100%;
}

.pricing-status-bar {
    flex-direction: row; /* Paski obok siebie na dużych ekranach */
    gap: 15px;
    margin-bottom: 40px;
}

.contact-section .divider {
    margin: 10px auto;
}
/*
.contact-wrapper {
    text-align: left;
    display: flex;
}
*/
.info-item {
    margin-bottom: 30px;
}

.info-item h4 {
    color: var(--accent-orange);
    margin-bottom: 10px;
    font-family: var(--font-head);
}

.info-item a {
    color: white;
    text-decoration: none;
    font-weight: 600;
    font-size: 1.1rem;
}

.large-text {
    font-size: 1.5rem; /* Make phone number huge */
}

/* Form Styling */
.contact-form {
    background: white;
    padding: 30px;
    border-radius: 8px;
    color: var(--text-dark); /* Reset text color for white form */
}

.form-group {
    margin-bottom: 20px;
    text-align: left;
}

.form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: 600;
    font-size: 0.9rem;
}

.form-group input, 
.form-group select, 
.form-group textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-family: var(--font-body);
    font-size: 1rem;
}

.form-group input:focus,
.form-group textarea:focus {
    border-color: var(--primary-blue);
    outline: none;
}

.btn-block {
    display: block;
    width: 100%;
    border: none;
    cursor: pointer;
    font-size: 1.1rem;
    transition: background 0.3s;
}

.btn-block:hover {
    background-color: #d99600; /* Darker orange on hover */
}

/* --- FOOTER --- */
footer {
    background: #081f33; /* Darker navy */
    color: #888;
    text-align: center;
    padding: 20px 0;
    font-size: 0.9rem;
}

/* --- DESKTOP CONTACT VIEW --- */
@media (min-width: 768px) {
    .contact-wrapper {
        flex-direction: row;
        align-items: flex-start;
    }

    .contact-info {
        flex: 1;
    }

    .contact-form {
        flex: 1;
    }
}

/* --- PHONE GROUP STYLING --- */

/* 1. Flex container wrapper */
.phone-input-group {
    display: flex;       /* Puts items side-by-side */
    gap: 10px;          /* Space between them */
    width: 100%;        /* Full width of the parent container */
}

/* 2. The Dropdown (Prefix) */
.prefix-select {
    /* Force specific width so it doesn't grow */
    width: 100px !important; 
    min-width: 100px;
    
    /* Prevent it from growing or shrinking */
    flex: 0 0 100px; 
    
    /* Styling to match inputs */
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    background-color: #f8f9fa;
    cursor: pointer;
}

/*  The Input Field */
.phone-input-group input {
    flex-grow: 1; 
    width: auto; 
    
    min-width: 0;  /* Allows the input to shrink on tiny screens */
    
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
}

/* --- FORM SUCCESS STATE --- */
.btn-success {
    background-color: #28a745 !important; /* Green */
    color: white !important;
    border-color: #28a745 !important;
    cursor: default; /* Show arrow instead of hand pointer */
    pointer-events: none; /* Prevent clicking twice */
}


/* --- PAGE HEADER (For Subpages) --- */
.page-header {
    background: var(--primary-blue);
    color: white;
    padding: 60px 0;
    text-align: center;
}

.page-header h1 {
    font-family: var(--font-head);
    font-size: 2.5rem;
    margin-bottom: 10px;
}

/* --- SERVICE DETAIL SECTION --- */
.service-detail {
    padding: 80px 0;
    background: white;
}

/* Light background variant for alternating sections */
.service-detail.bg-light {
    background-color: #f9f9f9;
}

.detail-wrapper {
    display: flex;
    flex-direction: column; /* Mobile: Stacked */
    gap: 50px;
    align-items: center;
}

.detail-image img {
    max-width: 100%;
    border-radius: 8px;
    box-shadow: 0 10px 20px rgba(0,0,0,0.1);
	display: block;
	background: #eee;
	aspect-ratio: 4 / 3;
	object-fit: cover;
}

.detail-content h2, .about-text h2 {
    margin-bottom: 25px;
    font-size: 2.2rem;
    line-height: 1.2;
}

.detail-list {
    margin: 20px 0;
    padding-left: 20px;
}

.detail-list li {
    margin-bottom: 10px;
    color: #444;
}

/* Pricing Highlight */
.price-estimate {
    font-weight: 700;
    color: var(--accent-orange);
    font-size: 1.1rem;
    margin-top: 20px;
    padding: 10px;
    border-left: 4px solid var(--accent-orange);
    background: rgba(242, 169, 0, 0.1);
}

/* --- DESKTOP ZIG-ZAG --- */
@media (min-width: 768px) {
    .detail-wrapper {
        flex-direction: row; /* Image Left, Text Right */
        gap: 80px;
    }

    /* Used for the middle section to flip order */
	.detail-wrapper.reverse .photo-full img {
		max-height: 400px; /* Nieco mniejsze niż główne zdjęcie taty */
		border-radius: 12px;
		box-shadow: 0 5px 15px rgba(0,0,0,0.1);
	}

    .detail-image, .detail-content {
        flex: 1; /* Split width 50/50 */
    }
}

/* --- CTA BANNER --- */
.cta-banner {
    background: var(--secondary-grey);
    padding: 50px 0;
    text-align: center;
}

.cta-banner h2 {
    color: var(--primary-blue);
    margin-bottom: 20px;
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); /* Automatyczne dopasowanie */
    gap: 20px;
    margin-top: 30px;
}

.gallery-item {
    position: relative;
    overflow: hidden;
    border-radius: 8px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
}

.gallery-item img {
    width: 100%;
    height: 250px;
    object-fit: cover; /* Zdjęcie wypełni ramkę bez zniekształceń */
    display: block;
    transition: transform 0.3s ease;
}

.gallery-item:hover img {
    transform: scale(1.05); /* Delikatny zoom przy najechaniu */
}

.gallery-desc {
    padding: 15px;
    background: white;
    font-size: 0.9rem;
    font-weight: 600;
}

/* Box dla WhatsAppa */
.highlight-box {
    background: rgba(242, 169, 0, 0.15);
    padding: 20px;
    border-radius: 8px;
    border-left: 4px solid var(--accent-orange);
    margin-bottom: 30px;
}

.btn-whatsapp {
    display: inline-block;
    background: #25D366;
    color: white;
    padding: 10px 20px;
    border-radius: 5px;
    text-decoration: none;
    font-weight: 700;
    margin-top: 10px;
    transition: 0.3s;
}

.btn-whatsapp:hover {
    background: #128C7E;
    transform: scale(1.02);
}

/* Stylizacja osób do kontaktu */
.contact-person {
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}

.contact-person:last-child {
    border-bottom: none;
}

.person-name {
    font-weight: 700;
    color: var(--accent-orange);
    margin-bottom: 2px;
}

.person-role {
    font-size: 0.8rem;
    color: #ccc;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 5px;
}

.person-phone {
    font-size: 1.3rem !important;
    font-weight: 700 !important;
    color: white !important;
}

/* Pasek informacyjny pod nagłówkiem sekcji
.pricing-status-bar {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin: 20px auto 40px;
    flex-wrap: wrap; /* Responsywność na komórki
}
*/

.status-item {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(242, 169, 0, 0.3);
    padding: 12px 20px;
    border-radius: 50px; /* Zaokrąglone końce (pill-shape) */
    display: flex;
    align-items: center;
    gap: 10px;
}

.status-icon {
    font-size: 1.2rem;
}

.status-item p {
    margin-bottom: 0 !important;
    font-size: 0.95rem;
    color: white !important;
}

.status-item strong {
    color: var(--accent-orange);
}

.status-item small {
    display: block;
    font-size: 0.75rem;
    opacity: 0.8;
}

/* Poprawka dla tekstu obszaru działania */
.info-item .sub-text {
    font-size: 0.85rem;
    color: #bbb;
    margin-top: 5px;
}

/* Responsywność dla paska */
@media (max-width: 768px) {
    .pricing-status-bar {
        flex-direction: column;
        align-items: center;
    }
    .status-item {
        width: 100%;
        max-width: 350px;
    }
	.lightbox-content {
        max-width: 95% !important; /* Zdjęcie zajmie prawie całą szerokość ekranu */
        max-height: 80vh !important; /* Pozwalamy mu być wyższym */
        border-width: 4px !important; /* Nieco cieńsza ramka, by nie zabierać miejsca */
    }

    .close-lightbox {
        top: 10px;
        right: 20px;
        font-size: 40px; /* Nieco mniejszy "X", żeby nie zasłaniał zdjęcia */
    }

    .lightbox-nav {
        width: 95%;
        justify-content: space-between; /* Przyciski szerzej, by łatwiej było klikać kciukiem */
    }
}

.detail-content p, 
.about-text p,
.services-section .service-detail p,
.bio-text p {
	text-align: left;
    line-height: 1.8; /* Zwiększono dla lekkości czytania */
    margin-bottom: 20px;
    font-size: 1.05rem; /* Delikatnie większy tekst */
    color: #444;
}

/* Upewniamy się, że kontenery z tekstem nie są za szerokie */
.detail-content, .about-text {
    max-width: 650px; /* Zapobiega zbyt długim liniom tekstu */
    margin-left: auto;
    margin-right: auto;
}

/* --- STYLIZACJA BOXU DANYCH FIRMY --- */
.bio-info-box {
    background: #f4f4f4; /* Jasnoszare tło */
    padding: 25px;
    border-radius: 8px;
    margin-top: 30px;
    /* Ustawienie szerokości tak, aby Obszar zmieścił się w jednej linii */
    max-width: 750px; 
    width: 100%;
}

.bio-info-box h4 {
    color: var(--primary-blue);
    margin-bottom: 20px;
    font-family: var(--font-head);
    font-size: 1.2rem;
    border-bottom: 2px solid var(--accent-orange);
    display: inline-block;
    padding-bottom: 5px;
}

.bio-info-box p {
    display: grid;
    /* 140px na etykietę, reszta na dane - to wyrównuje kolumny */
    grid-template-columns: 140px 1fr; 
    gap: 15px;
    border-bottom: 1px solid rgba(0,0,0,0.05); /* Delikatne linie oddzielające */
    padding: 12px 0;
    margin-bottom: 0 !important;
    align-items: baseline;
}

.bio-info-box p:last-child {
    border-bottom: none; /* Brak linii pod ostatnim elementem */
}

.bio-info-box p strong {
    text-transform: uppercase; /* Wielkie litery dla etykiet */
    font-size: 0.85rem;
    color: #555;
    letter-spacing: 1px;
}

/* Responsywność: na bardzo małych ekranach pozwalamy na zawijanie */
@media (max-width: 600px) {
    .bio-info-box p {
        grid-template-columns: 1fr;
        gap: 5px;
    }
}


/* Specyficzne ustawienia dla dużego zdjęcia o firmie */
.photo-full img {
    aspect-ratio: auto !important; /* Wyłącza sztywne 4/3 */
    max-height: 600px; /* Pozwala zdjęciu być znacznie wyższym */
    object-fit: contain !important; /* Pokazuje całe zdjęcie bez ucinania boków */
    background: transparent !important;
    box-shadow: none !important;
}

.about-detail .detail-wrapper {
    align-items: flex-start; /* Tekst nie ucieka na środek przy wysokim zdjęciu */
}

/* --- FIX MOBILNY: KONTAKT I PRZEWIJANIE --- */
@media (max-width: 768px) {
    html, body {
        overflow-x: hidden;
    }

    .contact-wrapper {
        flex-direction: column !important;
        width: 100%;
    }

    /* Rozciągamy info i formularz na pełną szerokość */
    .contact-info, .contact-form {
        width: 100% !important;
        max-width: 100% !important;
        flex: none !important;
    }


    .contact-info {
        order: 1; 
    }

    .contact-form {
        order: 2;
    }

    .pricing-status-bar {
        flex-direction: column !important;
        gap: 10px !important;
    }
}

/* --- UKŁAD FIRMA (Mobilny: zdjęcie -> tekst -> zdjęcie) --- */
.firma-layout {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 30px;
}

/* Wspólny styl białej ramki dla obu zdjęć */
.firma-layout .about-img {
    background: #ffffff !important;
    padding: 12px !important;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.15);
    width: 100%;
    max-width: 500px;
    height: auto;
    display: block;
    aspect-ratio: auto !important; /* Wyłącza 4/3 tylko tutaj */
    object-fit: contain !important;
}

/* --- UKŁAD DESKTOP (Grid: Zdjęcia po lewej, tekst po prawej) --- */
@media (min-width: 768px) {
    .firma-layout {
        display: grid;
        grid-template-columns: 1fr 1.2fr;
        grid-template-areas: 
            "tata content"
            "sign content";
        align-items: start;
        gap: 30px 80px;
    }

    /* Przypisanie elementów do obszarów siatki */
    .img-tata { grid-area: tata; }
    .detail-content { grid-area: content; }
    .img-sign { grid-area: sign; }

    /* Reset marginesów, które mogłyby psuć układ na desktopie */
    .detail-content {
        margin: 0;
        max-width: none;
    }
}

/*tutaj galeria*/
/* Styl kart kategorii */
.category-card {
    cursor: pointer;
    position: relative;
    transition: 0.3s;
}

.category-card:hover {
    transform: scale(1.03);
}

.category-card .gallery-desc span {
    color: var(--accent-orange);
    font-size: 0.8rem;
    font-weight: 700;
}

/* Styl Lightboxa (Powiększenia) */
.lightbox {
    display: none;
    position: fixed;
    z-index: 9999;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: rgba(0,0,0,0.9);
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.lightbox-content {
    max-width: 80%;
    max-height: 70vh;
    border: 5px solid white;
    border-radius: 5px;
}

.lightbox-nav {
    margin-top: 20px;
    color: white;
    display: flex;
    gap: 20px;
    align-items: center;
}

.lightbox-nav button {
    background: var(--accent-orange);
    border: none;
    padding: 10px 20px;
    color: white;
    cursor: pointer;
    font-weight: 700;
}

.close-lightbox {
    position: absolute;
    top: 20px; right: 40px;
    color: white;
    font-size: 50px;
    cursor: pointer;
}

/* --- LOADER DLA GALERII --- */
.lightbox-content {
    display: none; 
}

.lightbox.loading .lightbox-content {
    display: none;
}

.lightbox.loading::after {
    content: "";
    width: 50px;
    height: 50px;
    border: 5px solid #ddd;
    border-top: 5px solid var(--accent-yellow);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    position: absolute;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.lightbox.loaded .lightbox-content {
    display: block;
}