/* =========================================
             STRONA GŁÓWNA
========================================= */

#strona-glowna {
    width: 100%;
    padding-top: calc(var(--header-height) + 20px);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 40px;
    padding-bottom: 40px;
}

/* --- SLIDER --- */
#slider {
    max-width: 1200px;
    width: 92%;
    display: flex;
    position: relative;
    aspect-ratio: 16 / 7;
    overflow: hidden;
    border-radius: var(--border-radius);
    box-shadow: 0 10px 30px rgba(16, 23, 29, 0.3);
}

#slider-container {
    position: relative;
    width: 100%;
    height: 100%;
}

#slider img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0;
    transition: opacity 1s ease;
}

#slider img.active {
    opacity: 1;
}

#slider:not(:hover) .slider-btn {
    opacity: 0;
}

.slider-btn {
    opacity: 1;
    top: 50%;
    transform: translateY(-50%);
    position: absolute;
    border-radius: var(--border-radius);
    width: 40px;
    aspect-ratio: 1 / 1;
    display: flex;
    justify-content: center;
    align-items: center;
    background-color: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(10px);
    cursor: pointer;
    transition: background 0.3s ease, opacity 0.3s ease;
    z-index: 10;
}

.slider-btn:hover {
    background-color: rgba(186, 140, 73, 0.8);
}

.slider-btn.left {
    left: 20px;
}

.slider-btn.right {
    right: 20px;
}

.slider-btn::after {
    font-family: "Font Awesome 6 Free";
    font-weight: 900;
    font-size: 18px;
    color: white;
}

.slider-btn.left::after {
    content: "\f104";
}

.slider-btn.right::after {
    content: "\f105";
}


@media(max-width: 900px) {
    #strona-glowna {
        width: 100%;
        padding-top: var(--header-height);
    }

    #slider {
        width: 100%;
        border-radius: 0;
    }

    #slider:not(:hover) .slider-btn {
        opacity: 1;
    }
}

/* --- SEKCJA POWITALNA --- */
#welcome-container {
    max-width: 1200px;
    width: 92%;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
}

#strona-glowna h1{
    margin-top: 28px;
    max-width: 1100px;
}

#strona-glowna h1,
#welcome-container h2,
#card-container > h2,
#accesories-container h2,
#gallery-container > h2 {
    width: 90%;
    display: flex;
    color: var(--st-text-color);
    align-items: center;
    text-transform: uppercase;
    font-size: clamp(1.2rem, 2.5vw, 1.8rem);
    gap: 20px;
}
#strona-glowna h1 div,
#welcome-container h2 div,
#card-container > h2 div,
#accesories-container h2 div,
#gallery-container h2 div {
    flex: 1;
    height: 3px;
    background-color: var(--rufio-meble-color);
}

#welcome-container p {
    text-align: justify;
    color: var(--nd-text-color);
    font-size: clamp(0.9rem, 1.2vw, 1.05rem);
    line-height: 1.7;
}

/* --- KARTY (JAK PRACUJEMY) --- */
#card-container {
    max-width: 1200px;
    width: 92%;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 28px;
}

#card-container .card-list {
    display: flex;
    flex-wrap: wrap;
    gap: 25px;
    justify-content: center;
}

#card-container .card-list .card {
    flex: 1;
    min-width: 280px;
    max-width: 385px;
    display: flex;
    flex-direction: column;
    gap: 15px;
    padding: 35px 30px;
    background: var(--nd-body);
    border-radius: var(--border-radius);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
    border: 1px solid rgba(0, 0, 0, 0.04);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    position: relative;
    overflow: hidden;
}

#card-container .card-list .card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.08);
}

#card-container .card-list .card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: #d1d1d1;
    transition: background 0.3s ease;
}

#card-container .card-list .card:hover::before {
    background: var(--rufio-meble-color);
}

#card-container .card .card-number {
    font-size: 0.85rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: var(--rufio-meble-color);
}

#card-container .card-list .card h3 {
    text-align: left;
    color: var(--st-text-color);
    font-size: 1.35rem;
    font-weight: 600;
}

#card-container .card-list .card p {
    text-align: left;
    color: var(--nd-text-color);
    font-size: 0.95rem;
    line-height: 1.6;
}

/* --- AKCESORIA --- */
#accesories-container {
    width: 100%;
    padding: 40px 0;
    display: flex;
    justify-content: center;
    background: var(--nd-body);
    box-shadow: 0 0 15px rgba(16, 23, 29, 0.05);
}

#accesories-container .accesories-wraper {
    max-width: 1200px;
    width: 92%;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
}

#accesories-container .accesories-wraper p {
    color: var(--nd-text-color);
    text-align: center;
    font-size: 1rem;
}

#accesories-container .accesories-wraper .accesories-list {
    display: flex;
    flex-direction: row;
    gap: 30px;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    margin-top: 10px;
}

#accesories-container .accesories-wraper .accesories-list img {
    width: 140px;
    transition: 0.3s all ease;
}

#accesories-container .accesories-wraper .accesories-list img:hover {
    transform: scale(1.08);
}

/* --- GALERIA / REALIZACJE --- */
#gallery-container {
    max-width: 1200px;
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
}

#gallery-container .buttons-container {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
}

#gallery-container .buttons-container button {
    padding: 10px 20px;
    color: var(--nd-text-color);
    border-radius: var(--border-radius);
    background: var(--nd-body);
    box-shadow: 0 4px 10px rgba(16, 23, 29, 0.08);
    border: 1px solid rgba(0,0,0,0.05);
    cursor: pointer;
    font-weight: 600;
    transition: background 0.3s ease, color 0.3s ease, transform 0.2s ease;
}

#gallery-container .buttons-container button:hover {
    background: var(--rufio-meble-color);
    color: white;
    transform: translateY(-2px);
}

#gallery-container .project-container {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: center;
    gap: 20px;
    width: 100%;
}

#gallery-container .project-container .project { 
    overflow: hidden;
    position: relative;
    width: 370px;
    height: 260px;
    background: var(--nd-body);
    border-radius: var(--border-radius);
    box-shadow: 0 5px 15px rgba(0,0,0,0.05);
    transition: transform 0.3s ease;
}

#gallery-container .project-container .project img {
    position: absolute;
    top: 0px;
    left: 0px;
    width: 100%;
    height: auto;
    min-width: 100%;
    min-height: 100%;
}

.project .hidden-data {
    position: absolute;
    top: 0px;
    left: 0px;
    width: 100%;
    height: 100%;
    background: rgba(16, 23, 29, 0.61);
    backdrop-filter: blur(10px);
    border-radius: var(--border-radius);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    opacity: 0;
    transition: 0.3s all ease;
}

.project:hover .hidden-data {
    opacity: 1;
}

.project .hidden-data p{
    color: white;
}

.project .hidden-data h3{
    color: white;
    text-align: center;
    font-size: 20px;
}


/*KONTAKT*/

#kontakt-content {
    max-width: 1200px;
    width: 92%;
    margin: 40px auto 80px auto;
    display: flex;
    flex-direction: column;
    gap: 40px;
}

.contact-hero {
    text-align: center;
    max-width: 800px;
    margin: 0 auto;
}
.contact-hero h1 {
    font-size: 2.2rem;
    color: var(--st-text-color, #222);
    margin-bottom: 15px;
    text-transform: uppercase;
    letter-spacing: 1px;
    display: flex;
    align-items: center;
    gap: 20px;
}

.contact-hero h1 div {
    flex: 1;
    height: 3px;
    background-color: var(--rufio-meble-color);
}

.contact-hero p {
    color: var(--nd-text-color, #666);
    font-size: 1.05rem;
    line-height: 1.7;
}

.contact-main-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    align-items: stretch;
}

.contact-panel {
    background: var(--nd-body, #fff);
    padding: 40px;
    border-radius: var(--border-radius, 8px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
    border: 1px solid rgba(0, 0, 0, 0.04);
    display: flex;
    flex-direction: column;
}

.contact-panel h2 {
    font-size: 1.5rem;
    color: var(--st-text-color, #222);
    margin-bottom: 10px;
}

.contact-panel p.subtitle {
    color: var(--nd-text-color, #666);
    font-size: 0.95rem;
    margin-bottom: 25px;
}

.contact-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
    flex-grow: 1;
}
.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}
.form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.form-group label {
    font-size: 0.85rem;
    color: var(--st-text-color, #444);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.form-group input, 
.form-group textarea {
    width: 100%;
    padding: 14px 16px;
    border: 1px solid #e1e1e1;
    border-radius: var(--border-radius, 6px);
    font-size: 1rem;
    background: #fafafa;
    color: var(--nd-text-color, #333);
    transition: all 0.3s ease;
    font-family: inherit;
}
.form-group input:focus, 
.form-group textarea:focus {
    border-color: var(--rufio-meble-color, #ba8c49);
    background: #fff;
    outline: none;
    box-shadow: 0 0 0 4px rgba(186, 140, 73, 0.1);
}
.form-group textarea {
    resize: vertical;
    min-height: 140px;
    flex-grow: 1;
}

.submit-btn {
    background-color: var(--header, #222);
    color: white;
    border: none;
    padding: 16px 24px;
    border-radius: var(--border-radius, 6px);
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: background 0.3s ease, transform 0.2s ease;
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    margin-top: auto;
}
.submit-btn:hover {
    background-color: var(--rufio-meble-color, #ba8c49);
    transform: translateY(-2px);
}

/* Alerty formularza */
.form-alert {
    padding: 15px 20px;
    border-radius: var(--border-radius, 6px);
    font-size: 0.95rem;
    margin-bottom: 25px;
    display: flex;
    align-items: center;
    gap: 10px;
}
.form-alert.success {
    background-color: #f0fdf4;
    color: #166534;
    border: 1px solid #bbf7d0;
}
.form-alert.error {
    background-color: #fef2f2;
    color: #991b1b;
    border: 1px solid #fecaca;
}

/* --- PRAWA STRONA: Dane i Mapa --- */
.info-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 25px 15px;
    margin-bottom: 30px;
}

.info-item {
    display: flex;
    align-items: flex-start;
    gap: 15px;
    text-decoration: none;
    color: inherit;
    transition: transform 0.2s ease;
}

a.info-item:hover {
    transform: translateX(3px);
}

.info-item i {
    font-size: 1.5rem;
    color: var(--rufio-meble-color, #ba8c49);
    margin-top: 2px;
    width: 25px;
    text-align: center;
}

.info-item div h3 {
    font-size: 0.95rem;
    color: var(--st-text-color, #333);
    margin: 0 0 4px 0;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.info-item div span {
    color: var(--nd-text-color, #666);
    font-size: 0.95rem;
    line-height: 1.4;
    display: block;
}

.map-container {
    flex-grow: 1;
    border-radius: var(--border-radius, 6px);
    overflow: hidden;
    border: 1px solid rgba(0, 0, 0, 0.06);
    min-height: 250px; /* Minimalna wysokość mapy */
}

.map-container iframe {
    width: 100%;
    height: 100%;
    border: 0;
    display: block;
}

/* Responsywność */
@media (max-width: 900px) {
    .contact-main-grid {
        grid-template-columns: 1fr;
    }
    .map-container {
        min-height: 300px;
    }
}
@media (max-width: 600px) {
    .form-row, .info-grid {
        grid-template-columns: 1fr;
    }
    .contact-panel {
        padding: 25px 20px;
    }
}