/* 
 * EleMeTron - Main Stylesheet
 * Methodology: BEM-inspired, Mobile First
 * Updated: EMT'26
 */


/* === 1. ZMIENNE GLOBALNE (Custom Properties) === */
:root {
    /* Paleta kolorów */
    --primary-color: #0a3d91;       /* Główny granat - Header, CTA */
    --primary-hover: #082a66;       /* Ciemniejszy odcień dla hover */
    --secondary-color: #0056b3;     /* Akcenty */
    --bg-body: #f4f7f9;             /* Jasnoszare tło */
    --bg-white: #ffffff;
    --text-main: #333333;           /* Główny tekst */
    --text-muted: #555555;          /* Tekst pomocniczy */
    --border-color: #dddddd;
    --error-border-color: #00dddd;
    --gold-soft: #eaf82b;
    
    /* Typografia i Layout */
    --font-stack: 'Helvetica Neue', Arial, sans-serif;
    --container-width: 800px;
    --border-radius: 8px;
    --box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    --transition: all 0.3s ease;
}

/* === 2. RESET I BAZA === */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    height: 100%;
}

body {
    font-family: var(--font-stack);
    background-color: var(--bg-body);
    color: var(--text-main);
    line-height: 1.6;
    /* Sticky Footer Implementation  */
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

/* === 3. KOMPONENTY UKŁADU === */
.container {
    max-width: var(--container-width);
    width: 95%;
    margin: 0 auto;
    padding: 20px;
}

/* === 4. NAGŁÓWEK I NAWIGACJA === */
header {
    background-color: var(--primary-color);
    border-bottom: 5px solid #000;
    padding: 15px 0;
    box-shadow: 0 2px 10px rgba(0,0,0,0.2);
}

.header-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
}

.logo img {
    height: 60px;
    width: auto;
    display: block;
    transition: transform 0.3s ease;
}

.logo img:hover {
    transform: scale(1.05);
}

nav ul {
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
}

nav a {
    color: var(--bg-white);
    text-decoration: none;
    font-weight: 700;
    padding: 8px 16px;
    border-radius: 20px;
    transition: var(--transition);
}

nav a:hover, nav a.active {
    background-color: var(--bg-white);
    color: var(--primary-color);
}

/* === 5. SEKCJE HERO I CONTENT === */



/* 1. Usunięcie paddingu z samej sekcji */
.hero, .error-hero {
    width: 100%;
    background-color: var(--gold-soft);
    padding: 0;
    border-bottom: 1px solid var(--border-color);
    margin-bottom: 20px;
}

/* 2. Usunięcie domyślnych marginesów z tekstu, które "rozpychają" baner */
.hero h1, 
.hero p {
    margin: 0 !important; 
    padding: 2px 0;         
    line-height: 1.2;       
}

.hero h1 {
    color: var(--primary-color);
    font-size: 1.8em; 
    margin-bottom: 0px;
    line-height: 1.2;
}

.hero p {
    margin: 0;
    line-height: 1.3;
}

.hero-center {
    text-align: center;
}

.hero-left {
    text-align: left;
}

.cointainer {
    max-width: var(--container-width);
}

.card {
    background: var(--bg-white);
    padding: 25px;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    margin-bottom: 25px;
    border-left: 5px solid var(--primary-color); /* Akcent wizualny */
    animation: fadeIn 0.5s ease-in-out;
}

.card-image {
    max-width: 80%;      
    height: auto;         
    border-radius: 4px;
    margin-bottom: 20px;  
    margin-bottom: 15px;  
    display: block;      
}

.center {
    display: flex;
    flex-direction: column; /* Układa elementy jeden pod drugim */
    align-items: center;    /* Środkuje w poziomie */
    justify-content: center; /* Środkuje w pionie (jeśli karta ma określoną wysokość) */
    text-align: center;     /* Środkuje sam tekst wewnątrz elementów */
}

/* Nowa klasa do precyzyjnego środkowania */
.text-center {
    display: block;      /* Label musi być blokiem, aby margin: auto zadziałał */
    text-align: center;  /* Środkowanie tekstu */
    width: 100%;         /* Zajęcie pełnej szerokości */
    margin-bottom: 15px; /* Odstęp od następnej etykiety */
}

/* Opcjonalnie: pogrubienie dla tytułu kalkulatora */
.u-bold {
    font-weight: 700;
    color: var(--primary-color);
}

/* Poprawka dla drugiej etykiety, aby nie zlewała się z górną */
.form-group label:not(.text-center) {
    display: block;
    line-height: 1.4;
}


/* Listy z własnym bulletem (Square) */
ul.custom-list {
    list-style: none;
    padding-left: 20px;
    margin-top: 15px;
}

ul.custom-list li {
    position: relative;
    margin-bottom: 10px;
    padding-left: 20px;
}

ul.custom-list li::before {
    content: "■";
    color: var(--text-main);
    position: absolute;
    left: -5px;
    font-size: 0.8em;
    top: 2px;
}

/* Styl dla linków w sekcji kontaktowej */
.contact-details a {
    text-decoration: none; /* Usuwa podkreślenie */
    color: #000000;        /* Ustawia kolor czarny */
    transition: var(--transition); /* Płynna zmiana koloru, jeśli dodasz hover */
}

/* Opcjonalnie: kolor po najechaniu myszką, by użytkownik wiedział, że to link */
.contact-details a:hover {
    color: var(--primary-color);
}

/* Styl dla dużego numeru telefonu */
.email-contact {
    font-size: 1.5rem;
    font-weight: normal;
    margin: 15px 0;
}
.phone-contact {
    font-size: 1.5rem;
    font-weight: normal;
    margin: 15px 0;
}



/* === 6. FORMULARZE I KALKULATOR === */
.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    font-weight: bold;
    margin-bottom: 8px;
    color: var(--text-main);
}

input[type="number"], 
select, 
textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid #ccc;
    border-radius: var(--border-radius);
    font-size: 16px;
    transition: border-color 0.3s;
}

input:focus, select:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(10, 61, 145, 0.1);
}

.input-small {
    max-width: 150px;
}

.result-box {
    background-color: var(--primary-color);
    color: var(--bg-white);
    padding: 20px;
    border-radius: var(--border-radius);
    text-align: center;
    font-size: 1.4em;
    font-weight: bold;
    margin: 25px 0;
    box-shadow: inset 0 2px 4px rgba(0,0,0,0.2);
}

.disclaimer {
    font-size: 0.85em;
    color: var(--text-muted);
    border-top: 1px solid var(--border-color);
    border-bottom: 1px solid var(--border-color);
    padding: 10px 0;
    margin-top: 15px;
    margin-bottom: 15px;
}

/* === 7. PRZYCISKI (CTA) === */
.btn {
    display: inline-block;
    padding: 12px 30px;
    border-radius: var(--border-radius);
    text-decoration: none;
    font-weight: bold;
    text-align: center;
    cursor: pointer;
    transition: background 0.3s;
    border: none;
    font-size: 1em;
}

.btn-primary {
    background-color: var(--primary-color);
    color: var(--bg-white);
}

.btn-primary:hover {
    background-color: var(--primary-hover);
}

/* === 8. STOPKA === */
footer {
    background-color: #000;
    color: #aaa;
    text-align: center;
    padding: 30px 20px;
    margin-top: auto; /* Sticky Footer Key */
    font-size: 0.9em;
}

footer a {
    color: #ccc;
    text-decoration: none;
    transition: color 0.3s;
}

footer a:hover {
    color: var(--bg-white);
}

footer.legal {
    margin-top: 10px;
    font-size: 0.8em;
}

/* === 9. ANIMACJE I RWD === */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

@media (max-width: 600px) {
    nav ul {
        flex-direction: column;
        width: 100%;
    }
    nav a {
        display: block;
        text-align: center;
        width: 100%;
        margin-bottom: 5px;
    }
   .input-small {
        max-width: 100%;
    }
}


/* Styl dla menu wiedzy */
.knowledge-menu {
    background: #f9f9f9;
    padding: 15px;
    border-radius: var(--border-radius);
    margin: 15px 0;
    border: 1px solid var(--border-color);
}

.knowledge-menu a {
    text-decoration: none;
    color: var(--secondary-color);
    font-weight: bold;
    transition: var(--transition);
}

.knowledge-menu a:hover {
    color: var(--primary-color);
    padding-left: 5px;
}

/* FAQ i dzielniki */
.faq-item {
    padding: 10px 0;
}

.divider {
    margin: 15px 0;
    border: 0;
    border-top: 1px solid var(--border-color);
}

/* Animacja dla pokazującego się tematu */
.knowledge-item {
    border-left: 5px solid var(--gold-soft); /* Inny kolor dla bazy wiedzy */
}

/* === EMAIL - FORMULARZ KONTAKTOWY === */
/* Elegancki formularz kontaktowy */
.contact-form {
    max-width: 600px;
    margin: 0 auto;
}

.contact-form .form-group {
    margin-bottom: 1.5rem;
}

.contact-form label {
    font-size: 0.9rem;
    color: var(--text-muted);
    margin-bottom: 6px;
}

.required {
    color: #d9534f;
}

.contact-form input, 
.contact-form textarea {
    border: 1px solid #e1e1e1;
    background-color: #fafafa;
    padding: 14px;
    transition: var(--transition);
}

/* Walidacja wizualna */
.contact-form input:focus:invalid {
    border-color: #ffb3b3;
    background-color: #fffafa;
}

.contact-form input:focus:valid {
    border-color: var(--primary-color);
}

.btn-full {
    width: 100%;
    text-transform: uppercase;
    letter-spacing: 1px;
    padding: 15px;
}

/* Styl plakietki technicznej */
.badge-tech {
    display: inline-flex;
    align-items: center;
    background-color: var(--bg-body); /* Jasne tło */
    color: var(--primary-color);
    border: 1px solid var(--primary-color);
    padding: 4px 12px;
    border-radius: 50px; /* Zaokrąglony kształt "pigułki" */
    font-size: 0.8rem;
    font-weight: bold;
    text-transform: uppercase;
    margin-top: 10px;
}

/* Kropka sygnalizująca "aktywny certyfikat/gotowość" */
.badge-tech::before {
    content: "";
    width: 8px;
    height: 8px;
    background-color: #28a745; /* Zielony kolor */
    border-radius: 50%;
    margin-right: 8px;
}

/* === GALERIA REALIZACJI === */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 25px;
    margin-top: 30px;
}

.gallery-item {
    display: block;
    text-decoration: none;
    color: inherit;
    background: var(--bg-white);
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--box-shadow);
    transition: var(--transition);
}

.gallery-item:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 20px rgba(10, 61, 145, 0.15);
}

.gallery-item img {
    width: 100%;
    height: 220px;
    object-fit: cover;
    display: block;
    transition: transform 0.4s ease;
}

.gallery-item:hover img {
    transform: scale(1.08);
}

.gallery-caption {
    padding: 18px 20px;
    text-align: center;
    font-size: 1.05em;
    font-weight: 600;
    color: var(--primary-color);
    line-height: 1.4;
    border-top: 1px solid var(--border-color);
}

.gallery-caption small {
    display: block;
    margin-top: 6px;
    font-size: 0.85em;
    color: var(--text-muted);
    font-weight: normal;
}


/* === ALERTY FORMULARZA KONTAKTOWEGO === */
.alert {
    padding: 18px 22px;
    border-radius: var(--border-radius);
    margin-bottom: 25px;
    border: 1px solid;
    font-size: 1.05em;
    line-height: 1.5;
}

.alert-success {
    background: #d4edda;
    color: #155724;
    border-color: #c3e6cb;
}

.alert-warning {
    background: #fff3cd;
    color: #856404;
    border-color: #ffeaa7;
}

.alert-error {
    background: #f8d7da;
    color: #721c24;
    border-color: #f5c6cb;
}

.alert strong {
    font-size: 1.2em;
}
