/* KONTAKT.CSS - Wersja Finalna: SEO, UX, Print Friendly */

/* Klasa pomocnicza do ukrywania tekstu dla SEO (zgodna z index.html) */
.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* Stylizacja logo jako tekstu w menu (gdy nie jest H1) */
.brand-name.h1-style {
    font-family: 'logoFont-Face', serif; 
    font-size: 40px;
    color: #fff;
    text-transform: uppercase;
    letter-spacing: 1px;
    line-height: 1; 
    margin-bottom: -4px;
    font-weight: normal; 
}
@media screen and (min-width: 1700px) { .brand-name.h1-style { font-size: 56px; } }
@media screen and (max-width: 1200px) { .brand-name.h1-style { font-size: 34px; } }

/* Główny kontener strony kontaktowej */
.contact-hero-section {
    position: relative;
    width: 100%;
    min-height: 85vh; 
    display: flex;
    flex-direction: column;
    justify-content: flex-end; 
    overflow: hidden;
    padding-top: 80px; 
}

/* Zdjęcie w tle */
.hero-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    background-attachment: fixed; 
    z-index: -2;
}

/* Przyciemnienie tła */
.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.4); 
    z-index: -1;
}

/* Kontener na treść */
.contact-wrapper {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: space-between; 
    flex-grow: 1; 
}

/* --- 1. TYTUŁ "Kontakt" --- */
.title-container {
    flex-grow: 1; 
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 40px 20px;
}

.script-title {
    font-family: 'myFirstFont', serif; 
    font-size: 140px;
    color: #fff;
    text-shadow: 2px 2px 10px rgba(0,0,0,0.5);
    margin: 0;
    font-weight: normal;
    
    opacity: 0;
    animation: fadeInTitle 1.5s ease-out forwards;
    animation-delay: 2.2s;
    transform: rotate(-5deg); 
    will-change: transform, opacity; /* Optymalizacja wydajności */
}

@keyframes fadeInTitle {
    from { opacity: 0; transform: translateY(-30px) rotate(-5deg); }
    to { opacity: 1; transform: translateY(0) rotate(-5deg); }
}

/* --- 2. PASEK INFORMACYJNY (3 Kolumny) --- */
.info-bar-container {
    display: flex;
    width: 100%;
    background-color: rgba(10, 8, 5, 0.85); 
    border-top: 1px solid var(--color-gold); 
    padding: 0; 
    
    opacity: 0;
    animation: slideUpBar 1s ease-out forwards;
    animation-delay: 2.5s;
}

@keyframes slideUpBar {
    from { opacity: 0; transform: translateY(50px); }
    to { opacity: 1; transform: translateY(0); }
}

.info-col {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start; 
    padding: 70px 20px; 
    color: #eae2c5; 
}

/* Złote linie oddzielające kolumny */
.bordered-col {
    border-left: 1px solid var(--color-gold);
}

/* --- IKONY --- */
.icon-wrapper {
    margin-bottom: 30px;
    color: #eaddcf; 
}

.contact-icon {
    width: 75px; 
    height: 75px;
    display: block;
}

/* --- TEKST W KOLUMNACH --- */
.text-wrapper {
    text-align: center;
    font-family: "freight-text-pro", serif;
    font-size: 24px; 
    letter-spacing: 1.5px;
    line-height: 1.6;
}

.text-wrapper p { margin: 6px 0; }

.text-wrapper a {
    color: inherit;
    text-decoration: none;
    transition: color 0.3s;
    outline: none; /* Usuwamy domyślny outline na rzecz własnego focusa */
}
.text-wrapper a:hover { color: var(--color-gold); }
/* Ulepszenie dostępności: Focus state */
.text-wrapper a:focus-visible {
    color: var(--color-gold);
    text-decoration: underline;
    outline: 2px solid var(--color-gold);
    outline-offset: 4px;
}

/* --- NOWA SEKCJA SEO: TEKST --- */
.contact-text-section {
    background-color: rgba(10, 8, 5, 0.95);
    text-align: center;
    padding: 60px 40px 60px; /* Padding od dołu większy */
    border-bottom: 1px solid var(--color-gold);
    border-top: 1px solid var(--color-gold);
    color: #dcdcdc;
    opacity: 0;
    animation: fadeInText 1s ease-out forwards;
    animation-delay: 3s;
}

@keyframes fadeInText {
    to { opacity: 1; }
}

.contact-text-section h2 {
    font-family: "FreightBigProMedium-Regular", serif;
    font-size: 2rem;
    color: var(--color-gold);
    margin-bottom: 15px;
}

.contact-text-section p {
    font-family: "freight-text-pro", serif;
    font-size: 1.1rem;
    max-width: 800px;
    margin: 0 auto 10px;
    line-height: 1.6;
}

.contact-text-section .small-info {
    font-size: 0.9rem;
    color: #9f9c9a;
    margin-top: 15px;
}

/* --- 3. MAPA (Zmieniony wygląd) --- */
.map-section {
    width: 100%;
    height: 450px; /* Nieco wyższa mapa */
    background-color: #eaddcf; 
    border-top: 4px solid var(--color-gold); 
    position: relative;
    overflow: hidden;
}

.map-placeholder {
    width: 100%;
    height: 100%;
}

.map-iframe {
    width: 100%; height: 100%; border: 0; display: block;
    filter: grayscale(100%) invert(0%) contrast(1.1);
    transition: filter 0.5s ease;
}
.map-section:hover .map-iframe { filter: grayscale(0%) contrast(1); }

/* --- RESPONSYWNOŚĆ --- */

@media screen and (max-width: 1024px) {
    .script-title { font-size: 100px; }
    .contact-icon { width: 55px; height: 55px; }
    .info-col { padding: 50px 10px; }
    .text-wrapper { font-size: 20px; }
}

@media screen and (max-width: 768px) {
    .contact-hero-section { min-height: auto; padding-bottom: 0; }
    .info-bar-container { flex-direction: column; }
    .info-col { width: 100%; padding: 40px 20px; }
    .bordered-col { border-left: none; border-top: 1px solid var(--color-gold); }
    .script-title { font-size: 70px; transform: rotate(-3deg); }
    .map-section { height: 350px; }
    
    .contact-text-section { padding: 30px 20px; }
    .contact-text-section h2 { font-size: 1.5rem; }
}

/* Dodatkowy próg dla bardzo małych ekranów (np. iPhone SE) */
@media screen and (max-width: 480px) {
    .script-title { font-size: 50px; }
    .text-wrapper { font-size: 18px; }
    .contact-text-section h2 { font-size: 1.3rem; }
    .info-col { padding: 30px 15px; }
}

/* --- STYLES FOR PRINT (Drukowanie strony) --- */
@media print {
    /* Ukrywamy zbędne elementy */
    .intro-overlay, .success-overlay, .mobile-bar, .hamburger-btn, 
    .form-sidebar, .nav-list, .hero-overlay, footer, .footer-bottom, 
    #toggleQuestionBtn, .submit-container {
        display: none !important;
    }

    /* Resetujemy tła i kolory dla oszczędności tuszu */
    body, .contact-hero-section, .info-bar-container, .contact-text-section {
        background: #fff !important;
        color: #000 !important;
        height: auto !important;
        min-height: 0 !important;
        padding: 0 !important;
        border: none !important;
    }

    /* Dostosowanie nagłówków i tekstów */
    .script-title {
        color: #000 !important;
        text-shadow: none !important;
        font-size: 40pt !important;
        transform: none !important;
        margin-bottom: 20px !important;
        opacity: 1 !important;
        animation: none !important;
    }

    .contact-text-section h2, .text-wrapper, .text-wrapper a {
        color: #000 !important;
        text-decoration: none !important;
    }

    /* Układ kolumnowy dla adresu */
    .info-bar-container {
        display: block !important;
        border: 1px solid #000 !important;
        margin-bottom: 20px;
    }
    
    .info-col {
        padding: 10px !important;
        border-bottom: 1px solid #ccc;
    }

    /* Mapa */
    .map-section {
        height: 300px !important;
        border: 1px solid #000 !important;
        filter: none !important; /* Mapa w kolorze lub grayscale bez inwersji */
    }
    .map-iframe { filter: grayscale(100%); }
    
    /* Dodajemy stopkę wydruku */
    body::after {
        content: "Estica - Pracownia Stolarska | estica.pl | tel: 505-567-256";
        display: block;
        text-align: center;
        margin-top: 20px;
        font-size: 10pt;
        border-top: 1px solid #000;
        padding-top: 10px;
    }
}