/* OSWALD FONT */
@import url('https://fonts.googleapis.com/css2?family=Oswald:wght@200..700&display=swap');

body,html{
    font-family: "Oswald", serif;
    margin: 0px;
    padding: 0px;
    scroll-behavior: smooth;
    width: 100%;
    background-color: rgba(0, 0, 0,0.7);
    overflow-x: hidden;
    margin-top: 55px;
}

section {
    min-height: 100vh;
    width: 100%;
    font-size: 24px;
    color: white;
}

section h2{
    font-weight: 500;
    font-size: 60px;
    margin: 0;
    text-align: center;
}

section #linia{
    width: 150px;
    color: #bf0000; 
    border: 3px solid #bf0000; 
    border-radius: 3%;
}


/* STRONA GŁÓWNA */
.section1{
    z-index: 1;
    overflow-x: hidden;
}

.section1-content{
    z-index: 2;
    margin-left: 100px;
    width: 60%;
    animation: 1.5s fadeInLeft;
    position: relative;
    text-align: left !important;
}

.section1-content h1{
    font-size: 80px;
}

.section1-content p{
    font-size: 40px;
}

#redtext:hover{
    color: #bf0000;
    transition: 0.4s ease-in;
    cursor: default;
}

.section1 img{
    display: inline-block;
    position: absolute;
    top: -40px;
    filter: brightness(80%);
    /* right: -350px; */
    right:0;
    width: 650px;
    animation: 1.5s fadeInRight;
    z-index: 0;
}

.section1button {
	background-color:#bf0000;
	border-radius:7px;
	border:2px solid #ad1414;
	display:inline-block;
	cursor:pointer;
	color:#ffffff;
	font-size:20px;
    font-weight: 500;
	padding:16px 31px;
    margin-top: 30px;
	text-decoration:none;
	text-shadow:0px 1px 0px #000000;
}
.section1button:hover {
	background-color:#ad1414;
}
.section1button:active {
	position:relative;
	top:1px;
}



/* OFERTY */

.section2{
    /* background-color: rgb(44, 44, 44); */
}

.oferty {
    margin-top: 100px;
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 20px;
}

.oferty div {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.6);
    text-align: center;
    width: 25%;
    min-width: 250px;
    padding: 20px;
}

.oferty h3{
    color: white;
}

.oferty h3:hover{
    cursor: default;
    color: #bf0000;
    transition: color 0.4s ease-in;
}





#tireTrackImage{
    width: 100%;
    position: absolute;
    display:block;
    left: -100%;
    transition: transform 1.5s ease-out;
    margin-top: -80px;
    opacity: 60%;
}

.animate {
    transform: translateX(100vw);
}




/* SEKCJA 3 – KARUZELA SAMOCHODÓW */

.carousel-container {
    position: relative;
    width: 90%;
    max-width: 1720px;
    margin: 0 auto 70px auto; /* większy odstęp pod karuzelą na telefonach */
    overflow: hidden;
}

/* wysokość NIE jest sztywna – każdy rekord może być wyższy,
   ale początek wszystkich jest na tej samej linii u góry */
.carousel-track {
    display: flex;
    transition: transform 0.5s cubic-bezier(.4,.3,.3,1);
    width: 100%;
    max-width: 500px;
    margin: 0 auto;
    align-items: flex-start; /* wyrównanie górnej linii rekordów, także na telefonach */
}

/* każdy slajd wyrównany od góry, treść rośnie TYLKO w dół */
.carousel-item {
    flex: 0 0 100%;
    box-sizing: border-box;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;          /* środek w poziomie */
    justify-content: flex-start;  /* start w pionie – góra wspólna */
    max-width: 100%;
    padding: 24px 16px 30px 16px; /* większe paddingi na telefonach */
    margin-bottom: 20px;          /* odstęp między rekordami na telefonach */
}

/* OBRAZ/WIDEO – stała wysokość, zawsze na tej samej linii */
.carousel-item img,
.carousel-item video {
    width: 100%;
    max-width: 330px !important;
    height: 190px;
    object-fit: cover;
    border-radius: 16px;
    margin: 0 auto 14px auto;
    box-shadow: 0px 4px 18px rgba(0,0,0,0.25);
    border: 2.5px solid #bf0000;
}

/* TEKST – zawijanie, bez scrolla, rośnie w dół */
.carousel-item .car-info {
    max-width: 100%;
    width: 100%;
    word-wrap: break-word;
    overflow-wrap: break-word;
    word-break: break-word;
}

/* większy, responsywny tekst */
.carousel-item .car-info h3 {
    margin: 4px 0 6px 0;
    font-size: 28px; /* powiększone nagłówki */
}

.carousel-item .car-info p {
    margin: 2px 0;
    font-size: clamp(16px, 3vw, 20px); /* większy, responsywny tekst */
    line-height: 1.3;
}

/* ODSTĘP MIĘDZY REKORDAMI NA TELEFONACH */
@media (max-width: 600px) {
    .carousel-container {
        margin-bottom: 70px;
    }

    .carousel-item {
        padding-top: 24px;
        padding-bottom: 30px;
        margin-bottom: 20px;
    }

    /* zachowanie wyrównania górnej linii rekordów na telefonach */
    .carousel-track {
        align-items: flex-start;
    }

    /* ewentualne dostosowanie wysokości obrazków na telefonach */
    .carousel-item img,
    .carousel-item video {
        height: 190px;
    }
}

/* trochę więcej miejsca na malutkich ekranach */
@media (max-width: 480px) {
    .carousel-item img,
    .carousel-item video {
        height: 180px;
    }

    .carousel-item .car-info h3 {
        font-size: 22px;
    }

    .carousel-item .car-info p {
        font-size: 14px;
    }
}

/* STRZAŁKI */

.carousel-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: linear-gradient(145deg, #bf0000 90%, #444 100%);
    border: 2.5px solid #ad1414;
    color: #fff;
    font-size: 34px;
    border-radius: 50%;
    width: 56px;
    height: 56px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0px 3px 10px rgba(0,0,0,0.35);
    transition: all 0.18s ease;
    outline: none;
    filter: grayscale(0.1);
    z-index: 10;
}

.carousel-arrow.left { left: 10px; }
.carousel-arrow.right { right: 10px; }

.carousel-arrow span {
    display: block;
    line-height: 56px;
}

/* hover – subtelne powiększenie i cień */
.carousel-arrow:hover,
.carousel-arrow:focus {
    background: linear-gradient(200deg, #ad1414 80%, #333 95%);
    border-color: #bf0000;
    filter: grayscale(0);
    transform: translateY(-50%) scale(1.06);
    box-shadow: 0px 4px 14px rgba(0,0,0,0.45);
}

/* active – efekt wciśnięcia */
.carousel-arrow:active {
    transform: translateY(-50%) scale(0.97);
    box-shadow: 0px 1px 5px rgba(0,0,0,0.55);
}

/* mniejsze strzałki na małych ekranach */
@media (max-width: 600px) {
    .carousel-arrow {
        width: 46px;
        height: 46px;
        font-size: 26px;
    }

    .carousel-arrow span {
        line-height: 46px;
    }
}



/* KONTAKT */
.section4 {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    color: white;
    text-align: center;
    margin-top: 0;
    padding: 2.5rem 1.5rem;
}

.section4 .content {
    display: flex;
    flex-direction: row;
    justify-content: center;
    align-items: center;
    gap: 2.5rem;
    max-width: 1200px;
    width: 100%;
}

.section4 h2, .section4 #linia {
    margin-top: 0;
    margin-bottom: 2rem;
    font-size: clamp(2rem, 4vw, 3rem);
}

.section4 iframe {
    width: 600px;
    height: 450px;
    border: 2px solid #bf0000;
    border-radius: 8px;
}

.section4 #linia-pionowa {
    width: 5px;
    height: 320px;
    background-color: #bf0000;
    border-radius: 50px;
}

.section4 #informacje-kontaktowe {
    width: 600px;
    padding: 2rem 1.5rem;
    text-align: center;
    background-color: rgba(255, 255, 255, 0.12);
    border-radius: 12px;
    font-size: clamp(1.1rem, 2.8vw, 1.2rem);
    line-height: 1.5;
    letter-spacing: 0.5px;
}

/* Oddzielne linie dla każdej informacji */
.section4 #informacje-kontaktowe p {
    margin: 0.9rem 0;
    padding: 0.5rem 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
}

/* Usuń border pod ostatnim elementem */
.section4 #informacje-kontaktowe p:last-child {
    border-bottom: none;
}

.section4 #informacje-kontaktowe a {
    text-decoration: none;
    color: #fff;
    font-weight: 400;
    transition: color 0.3s ease;
}

.section4 #informacje-kontaktowe a:hover {
    color: #bf0000;
}

/* RESPONSYWNOŚĆ DLA MNIEJSZYCH EKRANÓW */
@media (max-width: 1024px) {
    .section4 .content {
        flex-direction: column;
        gap: 2rem;
        align-items: center;
    }
    .section4 #linia-pionowa {
        width: 120px;
        height: 6px;
    }
    .section4 iframe {
        width: 500px;
        height: 400px;
    }
    .section4 #informacje-kontaktowe {
        width: 500px;
        padding: 1.8rem 1.2rem;
    }
}

@media (max-width: 768px) {
    .section4 #informacje-kontaktowe {
        width: 500px;
        font-size: 1.1rem;
        padding: 1.5rem 1rem;
    }
    .section4 iframe {
        width: 420px;
        height: 360px;
    }
}

@media (max-width: 600px) {
    .section4 #informacje-kontaktowe {
        font-size: 1.05rem;
        padding: 1.3rem 1rem;
        width: 300px;
    }
    .section4 iframe {
        width: 300px;
        height: 320px;
    }
    .section4 #linia-pionowa {
        width: 100px;
        height: 5px;
    }
}

@media (max-width: 480px) {
    .section4 #informacje-kontaktowe {
        font-size: 1rem;
        padding: 1.2rem 0.9rem;
        width: 280px;
    }
    .section4 iframe {
        width: 280px;
        height: 280px;
    }
}







/* RESPONSYWNOŚĆ DLA MNIEJSZYCH EKRANÓW */
@media (max-width: 1024px) {
    .section1-content {
        max-width: 85%;

    }
    .section1-content h1 {
        font-size: 50px;
    }
    .section1-content p {
        font-size: 24px;
    }
    .section1 img {
        top: 100px;
        width: 800px;
        /* right: -200px; */
        filter: brightness(30%)
    }


    .oferty div {
        width: 40%;
    }


    #tireTrackImage{
        margin-top: -20px;
    }
}

@media (max-width: 768px) {
    .section1 {
        text-align: center;
        /* padding: 20px; */
    }

    .section1-content {
        max-width: 90%;
        margin-left: 40px;
    }

    .section1-content h1 {
        font-size: 40px;
    }

    .section1-content p {
        font-size: 20px;
    }

    .section1 img {
        top: 0;
        width: 600px;
        /* right: -100px; */
        bottom: -20px;
        filter: brightness(30%)
    }

    .section1button {
        font-size: 18px;
        padding: 12px 25px;
    }


    .oferty {
        flex-direction: column;
        align-items: center;
    }

    .oferty div {
        width: 80%;
    }
}


@media (max-width: 480px) {
    .section1-content h1 {
        font-size: 32px;
    }

    .section1-content p {
        font-size: 18px;
    }

    .section1 img {
        top: 40px;
        width: 500px;
        /* right: -120px; */
        bottom: 0;
    }

    .section1button {
        font-size: 16px;
        padding: 10px 20px;
    }
}

footer {
    width: 100%;
    background-color: black;
    color: white;
    padding: 30px 0;
}

.footer-content {
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
}

#company-name {
    font-size: 18px;
    font-weight: bold;
    text-decoration: none;
}

#paneltxt {
    text-decoration: none;
    position: absolute;
    right: 30px;
    color: white;
}

footer #paneltxt:hover {
    color: gray;
    transition: color 0.3s ease-out;
}









/* ANIMACJE */


@keyframes fadeInRight {
    0% {
      transform: translateX(40%);
      opacity: 0;
    }
    100% {
      transform: translateX(0%);
      opacity: 1;
    }
}

@keyframes fadeInLeft {
    0% {
      transform: translateX(-400%);
      opacity: 0;
    }
    100% {
      transform: translateX(0%);
      opacity: 1;
    }
}





/* Modal podglądu obrazu */
.modal {
    display: none; /* Domyślnie ukryty */
    position: fixed;
    z-index: 1000; /* nad wszystkim */
    padding-top: 60px;
    left: 0;
    top: 0;
    width: 100vw;
    height: 100vh;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.9);
}

.modal-content {
    margin: auto;
    display: block;
    max-width: 90vw;
    max-height: 80vh;
    border-radius: 12px;
    box-shadow: 0 0 30px rgba(255, 255, 255, 0.4);
    width: auto;
    height: auto;
    object-fit: contain;
}

/* Close button */
.modal-close {
    position: absolute;
    top: 20px;
    right: 35px;
    color: #fff;
    font-size: 40px;
    font-weight: bold;
    cursor: pointer;
    transition: color 0.3s ease;
    user-select: none;
}

@media (max-width: 480px) {
    .modal-content {
        max-width: 95vw;
        max-height: 70vh;
        border-radius: 8px;
    }

    .modal-close {
        top: 10px;
        right: 15px;
        font-size: 30px;
    }
}


.modal-close:hover {
    color: #bbb;
}

/* Kursor "rączka" przy zdjęciach */
.carousel-item img {
    cursor: pointer;
}
