/*
Theme Name: Meritoros
Theme URI: https://meritoros.pl
Author: Web-Canvas
Author URI: https://web-canvas.pl
Description: Profesjonalny motyw WordPress dla biura rachunkowego Meritoros z pełną edycją przez ACF.
Version: 1.0.1
Requires at least: 6.4
Tested up to: 6.8
Requires PHP: 8.1
License: Proprietary
Text Domain: meritoros
Tags: custom-logo, custom-menu, featured-images, full-width-template, translation-ready
*/

html {
    scroll-behavior: smooth;
    /* kompensata sticky headera przy anchor linkach */
    scroll-padding-top: 80px;
}

body {
    font-family: 'Host Grotesk', sans-serif;
    /* zapobieganie poziomemu overflowowi na mobile */
    overflow-x: hidden;
}

/* Zapewnia że sekcje nie wychodzą poza viewport */
section, main > * {
    max-width: 100vw;
    overflow-x: clip;
}

/* ── Contact Form 7 ──────────────────────────────────────────── */
.wpcf7 { margin: 0; }
.wpcf7 br { display: none; }
.wpcf7 p { margin: 0; }

/* Klasy Tailwind użyte w szablonie CF7 (w bazie danych — nie skanowane przez build) */
.wpcf7 .space-y-4 { display: flex; flex-direction: column; gap: 1rem; }
.wpcf7 .space-y-1 { display: flex; flex-direction: column; gap: 0.25rem; }
.wpcf7 .grid { display: grid; }
.wpcf7 .grid-cols-1 { grid-template-columns: repeat(1, minmax(0, 1fr)); }
.wpcf7 .gap-4 { gap: 1rem; }
.wpcf7 .gap-3 { gap: 0.75rem; }
@media (min-width: 640px) {
    .wpcf7 .sm\:grid-cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (min-width: 768px) {
    .wpcf7 .md\:grid-cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .wpcf7 .md\:grid-cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
.wpcf7 .mt-1 { margin-top: 0.25rem; }
.wpcf7 .mt-2 { margin-top: 0.5rem; }

.wpcf7 input[type="text"],
.wpcf7 input[type="email"],
.wpcf7 input[type="tel"],
.wpcf7 input[type="number"],
.wpcf7 textarea,
.wpcf7 select {
    width: 100%;
    padding: 1rem 1.25rem;
    border: 1px solid #e2e8f0;
    border-radius: 0.75rem;
    font-size: 0.875rem;
    color: #1e293b;
    background-color: #ffffff;
    transition: border-color 0.2s, box-shadow 0.2s;
    outline: none;
    font-family: 'Host Grotesk', sans-serif;
}

.wpcf7 input[type="text"]::placeholder,
.wpcf7 input[type="email"]::placeholder,
.wpcf7 input[type="tel"]::placeholder,
.wpcf7 textarea::placeholder { color: #94a3b8; }

.wpcf7 input[type="text"]:focus,
.wpcf7 input[type="email"]:focus,
.wpcf7 input[type="tel"]:focus,
.wpcf7 textarea:focus,
.wpcf7 select:focus {
    border-color: #00d084;
    box-shadow: 0 0 0 3px rgba(16,185,129,0.1);
}

.wpcf7 textarea { resize: none; }

.wpcf7 input[type="file"] {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 2px dashed #00d084;
    border-radius: 0.75rem;
    background: transparent;
    font-size: 0.875rem;
    cursor: pointer;
}

.wpcf7 input[type="submit"] {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 1rem 2rem;
    border-radius: 9999px;
    background-color: #00d084;
    color: #ffffff;
    font-size: 1rem;
    font-weight: 600;
    border: none;
    cursor: pointer;
    transition: background-color 0.2s;
    font-family: 'Host Grotesk', sans-serif;
}

.wpcf7 input[type="submit"]:hover { background-color: #00b872; }

.wpcf7-form-controls-wrap { display: block; width: 100%; }

.wpcf7-not-valid-tip {
    display: block;
    font-size: 0.75rem;
    color: #ef4444;
    margin-top: 0.25rem;
}

.wpcf7 input.wpcf7-not-valid,
.wpcf7 textarea.wpcf7-not-valid,
.wpcf7 select.wpcf7-not-valid {
    border-color: #ef4444;
    box-shadow: 0 0 0 3px rgba(239,68,68,0.1);
}

.wpcf7-response-output {
    margin: 0.75rem 0 0;
    padding: 0.75rem 1.25rem;
    border-radius: 0.75rem;
    font-size: 0.875rem;
    font-weight: 500;
    border: none !important;
}

.wpcf7-mail-sent-ok { background-color: #ecfdf5; color: #065f46; }
.wpcf7-mail-sent-ng,
.wpcf7-validation-errors,
.wpcf7-spam-blocked { background-color: #fef2f2; color: #991b1b; }

.wpcf7 input[type="checkbox"] {
    width: 1rem;
    height: 1rem;
    flex-shrink: 0;
    accent-color: #00d084;
    cursor: pointer;
}

.wpcf7-list-item { margin: 0 !important; }
.wpcf7-list-item-label { font-size: 0.75rem; color: #94a3b8; line-height: 1.6; }

/* Consent checkbox — walidacja po kliknięciu Wyślij */
.wpcf7 .mer-consent-error input[type="checkbox"] {
    outline: 2px solid #ef4444;
    outline-offset: 2px;
    border-radius: 2px;
}
.wpcf7 .mer-consent-error .wpcf7-list-item-label {
    color: #ef4444;
}
.mer-consent-tip {
    display: block;
    font-size: 0.75rem;
    color: #ef4444;
    margin-top: 0.375rem;
}

/* Newsletter CF7 overrides */
.mer-nl-form .wpcf7 input[type="email"] {
    background-color: #f8fafc;
    padding-left: 3rem;
}

.mer-nl-form .wpcf7 input[type="submit"] {
    width: 100%;
    justify-content: center;
    padding: 1rem;
    border-radius: 1rem;
    font-size: 1rem;
    font-weight: 700;
    background-color: #00d084;
}

.mer-nl-form .wpcf7 input[type="submit"]:hover { background-color: #00b872; }

/* CF7 — mobile tweaks */
@media (max-width: 639px) {
    .wpcf7 input[type="text"],
    .wpcf7 input[type="email"],
    .wpcf7 input[type="tel"],
    .wpcf7 textarea,
    .wpcf7 select {
        padding: 0.875rem 1rem;
        font-size: 1rem; /* prevents iOS auto-zoom on focus */
    }

    .wpcf7 input[type="submit"] {
        width: 100%;
        justify-content: center;
        padding: 0.875rem 1.5rem;
    }

    .wpcf7 input[type="file"] {
        padding: 0.625rem 0.75rem;
    }
}

/* Ebook mockup image – sekcja "Pobierz nasz darmowy ebook" */
.ebook-mockup-img {
    width: 100%;
    max-width: 24rem; /* mobile: max-w-sm */
}
@media (min-width: 1024px) {
    .ebook-mockup-img {
        width: 640px;
        max-width: none;
    }
}
@media (min-width: 1280px) {
    .ebook-mockup-img {
        width: 720px;
    }
}

/* Kariera — badge wynagrodzenia na hover kafla oferty */
.group:hover .group-hover\:bg-\[\#00b872\] { background-color: #00b872; }

/* Navbar — odstęp między separatorem a linkami menu */
.mer-nav-sep { margin-right: 3rem; }

/* Prose — listy (brak @tailwindcss/typography, style ręczne) */
.prose ol { list-style: decimal; padding-left: 1.5rem; }
.prose ul { list-style: disc; padding-left: 1.5rem; }
.prose li { margin-top: 0.375rem; margin-bottom: 0.375rem; }
.prose li::marker { color: #00d084; }

/* Tabela danych finansowych — zawsze widoczny scrollbar poziomy */
.ri-table-scroll::-webkit-scrollbar { height: 6px; }
.ri-table-scroll::-webkit-scrollbar-track { background: #e2e8f0; border-radius: 9999px; }
.ri-table-scroll::-webkit-scrollbar-thumb { background: #00d084; border-radius: 9999px; }
.ri-table-scroll { scrollbar-width: thin; scrollbar-color: #00d084 #e2e8f0; }

/* Slider wideo — ukryj scrollbar */
#mvid-slider::-webkit-scrollbar { display: none; }
#mvid-slider { -ms-overflow-style: none; scrollbar-width: none; }

/* BPO dlaczego slider — karty z minimalną wysokością */
@media (min-width: 1024px) { .lg\:min-h-\[325px\] { min-height: 325px; } }
