/*
Theme Name: RECOM Theme
Theme URI: https://recom-system.pl
Author: Adam Piersa -  AP2Media
Description: RECOM
Version: 1.0
Text Domain: recom
*/

body {
    background-color: #f4f4f5;
    color: #18181b;
    -webkit-font-smoothing: antialiased;
}

::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-track { background: #f4f4f5; }
::-webkit-scrollbar-thumb { background: #16a34a; border-radius: 10px; }

/* Dropdown Menu CSS */
.nav-item-group:hover .dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
    pointer-events: auto;
}
.dropdown-menu {
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    pointer-events: none;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Animacje dla terminala */
.emoji-btn { transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1); }
.emoji-btn:hover { transform: translateY(-8px) scale(1.05); }

.floating-element { animation: float 6s ease-in-out infinite; }
@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-15px); }
}

.text-gradient {
    background: linear-gradient(135deg, #15803d 0%, #22c55e 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* Niewidzialny most łączący główny link z rozwijanym menu */
.dropdown-menu::before {
    content: '';
    position: absolute;
    top: -20px; /* Pokrywa przerwę nad menu */
    left: 0;
    right: 0;
    height: 20px; /* Wysokość strefy buforowej */
    background: transparent;
}

/* ==========================================================================
   WIDŻETY SIDEBARA (WordPress Blocks)
   ========================================================================== */

/* Ukrycie domyślnego tytułu z Gutenberga, jeśli chcemy by pasował do naszego */
.widget_block h3 {
    font-size: 1.25rem !important;
    font-weight: 700 !important;
    color: #18181b !important;
    margin-bottom: 1.5rem !important;
}

/* Ostatnie wpisy - Kontener listy */
.wp-block-latest-posts {
    list-style: none !important;
    padding: 0 !important;
    margin: 0 !important;
    display: flex !important;
    flex-direction: column !important;
    gap: 1.25rem !important; /* Odstępy między wpisami */
}

/* Pojedynczy element listy */
.wp-block-latest-posts li {
    display: flex !important;
    align-items: center !important;
    gap: 1rem !important;
    transition: all 0.3s ease !important;
}

/* Obrazek wyróżniający */
.wp-block-latest-posts__featured-image {
    margin: 0 !important;
    width: 5rem !important;
    height: 5rem !important;
    flex-shrink: 0 !important;
    border-radius: 1rem !important;
    overflow: hidden !important;
    background-color: #f4f4f5 !important;
}

.wp-block-latest-posts__featured-image img {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
    transition: transform 0.5s ease !important;
}

/* Efekt na najechanie - powiększenie obrazka */
.wp-block-latest-posts li:hover .wp-block-latest-posts__featured-image img {
    transform: scale(1.1) !important;
}

/* Tytuł wpisu */
.wp-block-latest-posts__post-title {
    font-size: 0.95rem !important;
    font-weight: 700 !important;
    color: #18181b !important;
    text-decoration: none !important;
    line-height: 1.4 !important;
    transition: color 0.3s ease !important;
    display: -webkit-box !important;
    -webkit-line-clamp: 3 !important; /* Maksymalnie 3 linijki tekstu */
    -webkit-box-orient: vertical !important;
    overflow: hidden !important;
}

/* Efekt na najechanie - zielony tytuł */
.wp-block-latest-posts li:hover .wp-block-latest-posts__post-title {
    color: #16a34a !important;
}

/* ==========================================================================
   WYSZUKIWARKA (Gutenberg Block)
   ========================================================================== */

/* Etykieta (tytuł) wyszukiwarki */
.widget_search .wp-block-search__label {
    font-size: 1.25rem !important;
    font-weight: 700 !important;
    color: #18181b !important;
    margin-bottom: 1rem !important;
    display: block !important;
}

/* Kontener na pole i przycisk */
.widget_search .wp-block-search__inside-wrapper {
    display: flex !important;
    gap: 0.5rem !important;
    width: 100% !important;
}

/* Pole tekstowe (Input) */
.widget_search .wp-block-search__input {
    width: 100% !important;
    flex-grow: 1 !important;
    background-color: #f4f4f5 !important;
    border: 1px solid #e5e7eb !important;
    border-radius: 1rem !important; /* Odpowiednik Tailwind rounded-2xl */
    padding: 0.75rem 1.25rem !important;
    font-size: 0.875rem !important; /* text-sm */
    color: #18181b !important;
    font-weight: 500 !important;
    outline: none !important;
    transition: all 0.3s ease !important;
}

/* Efekt kliknięcia (Focus) w pole */
.widget_search .wp-block-search__input:focus {
    border-color: #16a34a !important;
    box-shadow: 0 0 0 4px rgba(22, 163, 74, 0.15) !important;
}

/* Przycisk wyszukiwania */
.widget_search .wp-block-search__button {
    background-color: #16a34a !important;
    color: #ffffff !important;
    border: none !important;
    border-radius: 1rem !important;
    padding: 0.75rem 1.5rem !important;
    font-size: 0.875rem !important;
    font-weight: 700 !important;
    cursor: pointer !important;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1) !important;
    white-space: nowrap !important;
}

/* Hover na przycisku */
.widget_search .wp-block-search__button:hover {
    background-color: #15803d !important;
    transform: translateY(-2px) !important;
    box-shadow: 0 10px 15px -3px rgba(22, 163, 74, 0.2) !important;
}

/* Kliknięcie przycisku */
.widget_search .wp-block-search__button:active {
    transform: scale(0.95) !important;
}

/* Ukrycie domyślnej białej ramki WordPressa dla banera CTA */
.widget:has(.recom-cta-banner) {
    padding: 0 !important;
    border: none !important;
    background: transparent !important;
    box-shadow: none !important;
}

/* ==========================================================================
   FORMULARZ KONTAKTOWY (Contact Form 7) - WERSJA KOMPAKTOWA
   ========================================================================== */

/* Odstępy między polami (Zmniejszono z 1.5rem na 1rem) */
.wpcf7-form p {
    margin-bottom: 1rem !important;
}

/* Etykiety (Labels) */
.wpcf7-form label {
    display: block !important;
    font-size: 0.8rem !important; /* Lekko zmniejszona czcionka */
    font-weight: 700 !important; 
    color: #6b7280 !important; 
    margin-bottom: 0.25rem !important; /* Ciasne przyleganie do pola */
    text-transform: uppercase !important; 
    letter-spacing: 0.05em !important; 
}

/* Pola tekstowe i Textarea */
.wpcf7-form input[type="text"],
.wpcf7-form input[type="email"],
.wpcf7-form textarea {
    width: 100% !important;
    background-color: #f4f4f5 !important; 
    border: 1px solid transparent !important; /* Cieńsza, niewidoczna ramka */
    border-radius: 0.75rem !important; /* Mniejsze zaokrąglenia (rounded-xl) */
    padding: 0.6rem 1rem !important; /* Węższe marginesy wewnątrz pola */
    color: #18181b !important; 
    font-weight: 500 !important; 
    font-family: inherit !important;
    transition: all 0.3s ease !important;
    box-sizing: border-box !important;
    font-size: 0.95rem !important;
}

/* Efekt aktywnego pola (Focus) */
.wpcf7-form input[type="text"]:focus,
.wpcf7-form input[type="email"]:focus,
.wpcf7-form textarea:focus {
    outline: none !important;
    border-color: #16a34a !important; 
    box-shadow: 0 0 0 3px rgba(22, 163, 74, 0.15) !important; /* Delikatny glow */
    background-color: #ffffff !important; 
}

/* Dostosowanie Textarea */
.wpcf7-form textarea {
    resize: vertical !important;
    min-height: 100px !important; /* Zmniejszono z 140px */
}

/* Przycisk Wyślij */
.wpcf7-form input[type="submit"] {
    width: 100% !important;
    padding: 0.875rem !important; /* Zmniejszono wysokość przycisku */
    background-color: #16a34a !important; 
    color: #ffffff !important;
    font-weight: 700 !important;
    font-size: 1rem !important; /* Zmniejszono czcionkę */
    border-radius: 0.75rem !important; 
    border: none !important;
    cursor: pointer !important;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1) !important;
    margin-top: 0.5rem !important; /* Bliżej pól */
}

/* Przycisk - Efekt Hover i Active */
.wpcf7-form input[type="submit"]:hover {
    background-color: #15803d !important; 
    transform: translateY(-2px) !important;
    box-shadow: 0 8px 12px -3px rgba(22, 163, 74, 0.2) !important;
}
.wpcf7-form input[type="submit"]:active {
    transform: scale(0.98) !important;
}

/* --------------------------------------------------------
   Komunikaty CF7 (Błędy walidacji i komunikaty o wysłaniu)
   -------------------------------------------------------- */

/* Czerwony tekst błędu pod polem */
.wpcf7-not-valid-tip {
    font-size: 0.8rem !important;
    color: #ef4444 !important; 
    margin-top: 0.25rem !important; 
    font-weight: 600 !important;
}

/* Główne okienko z informacją zwrotną na dole */
.wpcf7 form .wpcf7-response-output {
    border-radius: 0.75rem !important;
    margin-top: 1rem !important;
    padding: 0.75rem 1rem !important;
    font-size: 0.9rem !important;
    font-weight: 700 !important;
    border: none !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
}

/* Błąd przy wysyłaniu */
.wpcf7 form.invalid .wpcf7-response-output,
.wpcf7 form.unaccepted .wpcf7-response-output,
.wpcf7 form.failed .wpcf7-response-output {
    background-color: #fee2e2 !important; 
    color: #b91c1c !important; 
}

/* Sukces (Wysłano) */
.wpcf7 form.sent .wpcf7-response-output {
    background-color: #dcfce7 !important; 
    color: #15803d !important; 
}