body {
    margin: 0;
    padding: 0;
    font-family: Arial, sans-serif;
    background-color: #363946;
    color: white;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

.topnav {
    background-color: #603CC0;
    overflow: hidden;
}

.topnav a {
    float: left;
    color: white;
    text-align: center;
    padding: 14px 16px;
    text-decoration: none;
    font-size: 17px;

}

.topnav a:hover {
    background-color: #301E60;
}

.topnav a.active {
    background-color: #7f50ff;
}

.content-section {
    display: none;
    padding: 20px;
    flex: 1;
}



.topnav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: sticky;
    top: 0;
    z-index: 1000;
    background-color: #603CC0;
    padding: 0 20px;
}

.navbar_center {
    display: flex;
    justify-content: center;
    flex-grow: 1;
}

.navbar_left  {
    color: white;
    font-size: 225%;
    font-weight: 600;
}

.navbar_right {
    display: flex;
    gap: 15px;
}

.dropbtn {
    font-size: 1.75rem;
    border-radius: 1rem;
    background-color: #6BAB90;
    border: none;
    color: white;
}

.dropbtn:hover {
    box-shadow: 0 0 0.75rem #E1F0C4;
    background-color: #82B99A;
    color: #D3D3D3;
}

.dropdown-content {
    display: none;
    position: absolute;
    top: 3rem;
    right: 0;
    transform: translateY(0.25rem);
    background-color: #f9f9f9;
    min-width: 10rem;
    box-shadow: 0 0.4rem 0 rgba(0,0,0,0.2);
    z-index: 2;
    text-align: center;
    border-radius: 1rem;
}

.dropdown-content:hover{
    box-shadow: 0.1rem #E1F0C4;
}

.dropdown-button {
    display: block;
    padding: 0.75rem;
    background-color: lime;
    text-decoration: none;
    color: black;
}

.dropdown-button:hover {
    background-color: darkgreen;
    color: white;
}

.offers-container {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    justify-content: center;
    padding: 1.25%;
}

.offer-image {
    background-color: #fff;
    color: #000;
    text-align: center;
    padding: 50px 0;
    margin: 10px 0;
}

footer {
    background-color: #000000;
    color: white;
    text-align: center;
    padding: 0.5rem;
    margin-top: auto;
}

.offer-card {
    display: flex;
    flex-direction: column;
}

.offer-title {
    order: 1;
    text-align: center;
}

.offer-content {
    order: 2;
}

.offer-image {
    order: 3;
}

.offer-form {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  flex: 1;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
}

.form-group label {
  font-size: 0.9rem;
  opacity: 0.8;
}

.form-group input {
  padding: 0.8rem;
  border-radius: 0.5rem;
  border: 1px solid rgba(255, 255, 255, 0.2);
  background: rgba(0, 0, 0, 0.1);
  color: white;
}

.terms-check {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.85rem;
  cursor: pointer;
}

.offer-back-footer {
  margin-top: auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 1.5rem;
}

.price-box {
  display: flex;
  flex-direction: column;
}

.price-label {
  font-size: 0.8rem;
  opacity: 0.7;
}

.price {
  font-size: 1.5rem;
  font-weight: 700;
  color: #41D3BD;
}

.submit-btn {
  background: #6BAB90;
  color: white;
  border: none;
  padding: 0.8rem 1.5rem;
  border-radius: 0.5rem;
  cursor: pointer;
  transition: all 0.2s ease;
}

.submit-btn:hover {
  background: #82B99A;
  transform: translateY(-2px);
}

.offer-author {
    position: absolute;
    top: 10px;
    left: 10px;
    background-color: rgba(0, 0, 0, 0.7);
    color: white;
    padding: 5px 10px;
    border-radius: 5px;
    font-size: 0.8em;
    z-index: 2;
}

.offer-author {
    position: absolute;
    top: 10px;
    left: 10px;
    background-color: rgba(0, 0, 0, 0.7);
    color: white;
    padding: 5px 10px;
    border-radius: 5px;
    font-size: 0.8em;
    z-index: 2;
}
.offer-card-front.admin-offer {
    border: 2px solid orange;
}
.search-form {
    margin-bottom: 20px;
    display: flex;
    gap: 10px;
    align-items: center;
}
.search-form input[type="text"] {
    padding: 8px;
    border: 1px solid #ccc;
    border-radius: 4px;
    width: 250px;
}
.search-form input[type="submit"] {
    padding: 8px 15px;
    background-color: #007bff;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
}
.search-form input[type="submit"]:hover {
    background-color: #0056b3;
}
.success-message {
    color: green;
    font-weight: bold;
    margin-bottom: 15px;
    text-align: center;
}
.error-message {
    color: red;
    font-weight: bold;
    margin-bottom: 15px;
    text-align: center;
}

.offer-back-title{
    text-align: center;
    font-weight: 900;
}

.offer-back-info{
    text-align: center;
    font-weight: 600;
}

.offer-card, .offer-card-back{
    background-color: #197278;
    border-radius: 1rem;
    padding: 15px;
    width: 100%;
    transition: box-shadow 0.3s;
}

.flip-card-front, .flip-card-back {
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    -webkit-backface-visibility: hidden;
    backface-visibility: hidden;
}

.flip-card .offer-card {
    position: static;
    height: 100%;
    width: 100%;
    margin: 0;
    box-shadow: none !important;
    display: flex;
    flex-direction: column;
    box-sizing: border-box;
}



.flip-card {
    width: 100%;
    height: 400px;
    perspective: 1000px;
    margin: 10px auto;
}

.flip-card-inner {
    height: 100%;
    min-height: 400px;
    position: relative;
    transform-style: preserve-3d;
    transition: transform 0.6s;
}

/* Responsywność */
@media screen and (min-width: 992px) {
    
    .flip-card {
        width: calc(100% - 20px);
        height: 400px;
    }
    
    .offer-card {
        min-height: 400px;
    }
    
    .offer-image {
        margin-top: auto;
    }
}

.flip-card-back {
    transform: rotateY(180deg);
    box-shadow: 0 0 1rem #41D3BD;
    border-radius: 1rem;
}

.flip-card:hover .flip-card-inner {
    transform: rotateY(180deg);
}


/* Tablet */
@media screen and (min-width: 600px) {
    .navbar_left{
        padding-left: 20px;
    }
    .offer-card {
        width: calc(50% - 20px);
    }
    .offers-container {
        justify-content: flex-start;
    }
}

/* Desktop */
@media screen and (min-width: 992px) {
    .offers-container {
        display: grid;
        grid-template-columns: repeat(3, 1fr);
        gap: 20px;
        padding: 20px;
    }

    .offer-card {
        width: 90%;
        min-height: 400px;
        display: flex;
        flex-direction: column;
        margin: 0;
    }


    .price{
        color: ;
    }

    .offer-title {
        text-align: left;
        margin: 0 0 15px 0;
        text-align: center;
    }

    .offer-content {
        flex: 1;
        padding: 0;
        margin: 0 0 15px 0;
    }

    .offer-image {
        height: 200px;
        width: 100%;
        margin: 0;
        padding: 0;
        overflow: hidden;
        flex-shrink: 0;
    }

    .offer-image img {
        width: 100%;
        height: 100%;
        object-fit: cover;
        object-position: center;
    }

}

.offer-back-title{
    text-align: center;
    font-weight: 900;
}

.offer-back-info{
    text-align: center;
    font-weight: 600;
}

.offer-card, .offer-card-back{
    background-color: #197278;
    border-radius: 1rem;
    padding: 15px;
    width: 100%;
    transition: box-shadow 0.3s;
}

.flip-card-front, .flip-card-back {
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    -webkit-backface-visibility: hidden;
    backface-visibility: hidden;
}

.flip-card .offer-card {
    position: static;
    height: 100%;
    width: 100%;
    margin: 0;
    box-shadow: none !important;
    display: flex;
    flex-direction: column;
    box-sizing: border-box;
}

.flip-card {
    width: 100%;
    height: 400px;
    perspective: 1000px;
    margin: 10px auto;
}

.flip-card-inner {
    height: 100%;
    min-height: 400px;
    position: relative;
    transform-style: preserve-3d;
    transition: transform 0.6s;
}

.calculation-result {
    margin-top: 10px;
    font-weight: bold;
}

.calculation-result.error-message {
    color: #e74c3c;
}

.calculation-result.success-message {
    color: #27ae60;
}


/* Styl dla sekcji Home */
#home {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    color: white;
    padding: 20px;
    box-sizing: border-box;
}

#home h1 {
    
    justify-content: center;
    align-items: center;
    align-text: center;
    font-size: 4rem;
    color: rgba(255, 192, 203, 1);
    text-shadow: 0 0 15px rgba(255, 192, 203, 1);
}

#home p {
    font-size: 2rem;
    line-height: 1.6;
    text-shadow: 1px 1px 4px rgba(0, 0, 0, 0.6);
    text-align: center;
}

.home-button {
    background-color: #6BAB90;
    color: white;
    padding: 15px 30px;
    border: none;
    border-radius: 8px;
    font-size: 1.2em;
    cursor: pointer;
    text-decoration: none;
    margin-top: 30px;
    transition: background-color 0.3s ease, transform 0.2s ease;
}

.home-button:hover {
    background-color: #82B99A;
    transform: translateY(-2px);
}

#contact {
    display: flex;
    flex-direction: column;
    padding: 40px 20px;
    gap: 40px;
    align-items: center;
    flex: 1;
}

#contact h2 {
    width: 100%;
    text-align: center;
    font-size: 3em;
    color: #41D3BD;
    text-shadow: 0 0 10px rgba(65, 211, 189, 0.5);
    margin-bottom: 20px;
}

.contact_content-wrapper {
    display: flex;
    flex-direction: row;
    justify-content: center;
    align-items: flex-start;
    gap: 40px;
    width: 100%;
    max-width: 1400px;
    margin: 0 auto;
}

.contact-info-container {
    background-color: #197278;
    border-radius: 1rem;
    padding: 1rem;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    gap: 20px;
    box-shadow: 0 0 15px rgba(0, 0, 0, 0.3);
    flex: 1;
    min-width: 300px;
    max-width: 500px;
}

.contact-info-item {
    display: flex;
    align-items: center;
    gap: 15px;
    font-size: 1.1em;
    color: #fff;
}

.contact-info-item i {
    color: #41D3BD;
    font-size: 1.5em;
}

.contact-map-container {
    background-color: #197278;
    border-radius: 1rem;
    padding: 1rem;
    box-sizing: border-box;
    height: 400px;
    display: flex;
    justify-content: center;
    align-items: center;
    box-shadow: 0 0 15px rgba(0, 0, 0, 0.3);
    overflow: hidden;
    flex: 2;
    min-width: 400px;
    max-width: 700px;
}

.contact-map-container iframe {
    width: 100%;
    height: 100%;
    border: none;
    border-radius: 0.8rem;
}

/* Media query dla urządzeń mobilnych */
@media screen and (max-width: 767px) {
    .contact_content-wrapper {
        flex-direction: column;
        align-items: center;
        gap: 20px;
    }

    .contact-info-container,
    .contact-map-container {
        width: 90%;
        max-width: 500px;
        margin: 0 auto;
    }
}
