/* ---
    Soubor: index.css
    Popis: Kompletní redesign stylů pro proklepniauto.cz
    Verze: 2.3 - Vylepšený design formuláře
--- */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&display=swap');

:root {
    --primary-color: #007aff;
    --primary-dark: #005ecb;
    --background-color: #f0f2f5;
    --card-background: #ffffff;
    --text-color: #1d1d1f;
    --subtle-text: #6e6e73;
    --border-color: #dcdce0;
    --shadow: 0 8px 32px rgba(0, 0, 0, 0.08);
    --border-radius-lg: 24px;
    --border-radius-md: 16px;
    --border-radius-sm: 12px;
}

/* --- Základní styly --- */
body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    background-color: var(--background-color);
    color: var(--text-color);
    margin: 0;
    padding: 20px;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

.container {
    max-width: 900px;
    margin: 20px auto;
}

/* --- Header --- */
header { text-align: center; margin-bottom: 40px; }
header .logo { font-size: 1.2rem; font-weight: 700; margin-bottom: 20px; color: var(--primary-color); }
header h1 { font-size: 3.2rem; font-weight: 800; line-height: 1.2; margin: 0 0 16px 0; color: #000; }
header .subtitle { font-size: 1.2rem; color: var(--subtle-text); max-width: 650px; margin: 0 auto; line-height: 1.6; }

/* --- Hlavní karta s obsahem --- */
.main-card { background-color: var(--card-background); border-radius: var(--border-radius-lg); box-shadow: var(--shadow); overflow: hidden; }

/* --- Přepínač záložek (Tabs) --- */
.tabs { display: flex; background-color: #f8f8f8; padding: 8px; border-bottom: 1px solid var(--border-color); }
.tab-button { flex: 1; display: flex; align-items: center; justify-content: center; gap: 10px; padding: 16px; cursor: pointer; font-size: 1rem; font-weight: 600; color: var(--subtle-text); border: none; background-color: transparent; border-radius: var(--border-radius-md); transition: background-color 0.3s ease, color 0.3s ease; }
.tab-button.active { background-color: var(--card-background); color: var(--primary-color); box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08); }
.tab-content-wrapper { padding: 40px; }
.tab-content { display: none; animation: fadeIn 0.5s ease; }
.tab-content.active { display: block; }
.tab-content h2 { font-size: 1.8rem; margin: 0 0 10px 0; }
.tab-content p { font-size: 1rem; color: var(--subtle-text); margin: 0 0 30px 0; line-height: 1.6; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }

/* --- Formuláře --- */
.main-form { display: flex; flex-direction: column; gap: 16px; }
textarea, input[type="url"] { width: 100%; padding: 18px; font-size: 1rem; font-family: 'Inter', sans-serif; border: 1px solid var(--border-color); border-radius: var(--border-radius-md); box-sizing: border-box; transition: border-color 0.2s, box-shadow 0.2s; background-color: #f8f9fa; resize: vertical; }
textarea { min-height: 120px; }
textarea:focus, input[type="url"]:focus { outline: none; border-color: var(--primary-color); box-shadow: 0 0 0 4px rgba(0, 123, 255, 0.15); background-color: var(--card-background); }

/* --- Vylepšené přepínače (Segmented Controls) --- */
.form-options-wrapper {
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin-bottom: 16px;
}
.control-group {
    display: flex;
    align-items: center;
    gap: 16px;
}
.control-group .control-label {
    font-weight: 600;
    font-size: 1rem;
    color: var(--text-color);
    flex-shrink: 0;
}
.segmented-control {
    display: flex;
    background-color: #f0f2f5;
    border-radius: var(--border-radius-md);
    padding: 5px;
    width: 100%;
    border: 1px solid var(--border-color);
}
.segmented-control input[type="radio"] {
    display: none;
}
.segmented-control label {
    flex: 1;
    text-align: center;
    padding: 12px 10px;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    font-weight: 600;
    color: var(--subtle-text);
    font-size: 0.95rem;
}
.segmented-control input[type="radio"]:checked + label {
    background-color: var(--card-background);
    color: var(--primary-color);
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.1), 0 1px 2px rgba(0,0,0,0.05);
    transform: scale(1.02);
}

/* --- Tlačítka --- */
.main-form button { width: 100%; padding: 18px; font-size: 1.1rem; font-weight: 700; background: var(--primary-color); color: white; border: none; border-radius: var(--border-radius-md); cursor: pointer; transition: all 0.2s ease; display: flex; align-items: center; justify-content: center; gap: 12px; }
.main-form button:disabled { background: #a9ccee; cursor: not-allowed; transform: none; }
.main-form button:not(:disabled):hover { background: var(--primary-dark); transform: translateY(-2px); box-shadow: 0 4px 20px rgba(0, 123, 255, 0.3); }

/* --- Zbytek stylů (výsledky, loader atd.) --- */
#results, #ad-results, #price-evaluation-results { margin-top: 40px; }
.loader { width: 20px; height: 20px; border: 3px solid rgba(255, 255, 255, 0.3); border-top-color: #fff; border-radius: 50%; animation: spin 1s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.summary-message, .error-message { padding: 20px; border-radius: 12px; font-size: 1.1rem; line-height: 1.6; text-align: center; margin-top: 30px; border-width: 1px; border-style: solid; }
.summary-message { background-color: #e3f2fd; color: #0d47a1; border-color: #90caf9; }
.error-message { background-color: #ffebee; color: #ff3b30; border-color: #ef9a9a; }
.car-card, .price-evaluation-card { background-color: var(--card-background); border-radius: var(--border-radius-lg); box-shadow: var(--shadow); margin-bottom: 30px; overflow: hidden; border: 1px solid var(--border-color); }
.rank-badge { background: var(--primary-color); color: white; padding: 8px 15px; font-weight: 600; font-size: 14px; display: inline-block; border-bottom-right-radius: var(--border-radius-lg); }
.car-gallery { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 5px; padding: 20px 20px 0 20px; }
.car-gallery-image { width: 100%; height: 200px; object-fit: cover; border-radius: var(--border-radius-md); }
.car-content-wrapper, .price-evaluation-body, .price-evaluation-header { padding: 25px; }
.car-title { display: flex; justify-content: space-between; align-items: flex-start; gap: 20px; margin-bottom: 15px; padding-bottom: 15px; border-bottom: 1px solid var(--border-color); }
.car-title h3 { margin: 0; font-size: 1.5rem; }
.car-title a { text-decoration: none; color: var(--text-color); transition: color 0.2s; }
.car-title a:hover { color: var(--primary-color); }
.car-price { font-size: 1.6rem; font-weight: 700; color: var(--primary-color); white-space: nowrap; }
.vin-code { font-family: 'Courier New', Courier, monospace; background-color: #f0f2f5; padding: 8px 12px; border-radius: 8px; margin-bottom: 15px; font-size: 1rem; color: #333; border: 1px solid var(--border-color); }
.car-summary { font-size: 1rem; line-height: 1.6; margin: 20px 0; padding: 15px; background-color: #f8f9fa; border-radius: 8px; border-left: 4px solid var(--border-color); }
.details-section h4 { font-size: 1.1rem; margin-bottom: 15px; border-bottom: 2px solid #f0f2f5; padding-bottom: 10px; color: var(--text-color); }
.details-section ul { list-style: none; padding-left: 0; margin: 0; }
.details-section ul li { display: flex; align-items: flex-start; font-size: 1rem; margin-bottom: 12px; line-height: 1.5; gap: 12px; }
.details-section .icon { font-size: 18px; line-height: 1.5; color: var(--primary-color); }
.details-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 30px; margin-top: 25px; }
.verdict { background-color: #e3f2fd; padding: 20px; border-radius: 12px; border-left: 4px solid var(--primary-color); }
.price-evaluation-header { border-bottom: 1px solid var(--border-color); }
.price-evaluation-header h3 { margin: 0 0 10px 0; font-size: 1.5rem; }
.estimated-price-box { text-align: center; background-color: #e3f2fd; padding: 20px; border-radius: 12px; margin-bottom: 25px; }
.estimated-price-box h4 { margin: 0 0 10px 0; font-size: 1.1rem; color: #0d47a1; }
.estimated-price-box .price-range { font-size: 2.2rem; font-weight: 700; color: var(--primary-dark); }
.analysis-summary { border-left: 4px solid var(--primary-color); font-style: italic; }
.factors-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 25px; margin-bottom: 25px; }


/* --- Nové styly pro Footer --- */
.site-footer {
    background-color: #1c1c1e;
    color: #8e8e93;
    padding: 60px 20px;
    margin-top: 60px;
}
.footer-container {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 60px;
}
.footer-about h4 {
    font-size: 1.5rem;
    color: #fff;
    margin-bottom: 15px;
}
.footer-about p {
    line-height: 1.7;
    margin-bottom: 20px;
}
.social-links {
    display: flex;
    gap: 15px;
}
.social-icon {
    display: block;
    width: 40px;
    height: 40px;
    background-size: 60%;
    background-repeat: no-repeat;
    background-position: center;
    border-radius: 50%;
    transition: background-color 0.3s, transform 0.3s;
}
.social-icon:hover {
    transform: scale(1.1);
}
.social-icon.telegram {
    background-color: #2AABEE;
    background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="white"><path d="M9.78 18.65l.28-4.23 7.68-6.92c.34-.31-.07-.46-.52-.19L7.74 13.3 3.64 12c-.88-.25-.89-1.37.2-1.54l15.97-5.85c.73-.27 1.36.17 1.15.93L20.2 17.83c-.16.58-.59.72-1.2.45L14.5 16l-2.5 2.36c-.28.27-.5.4-.88.4z"/></svg>');
}
.social-icon.facebook {
    background-color: #1877F2;
    background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="white"><path d="M22 12c0-5.52-4.48-10-10-10S2 6.48 2 12c0 4.84 3.44 8.87 8 9.8V15H8v-3h2V9.5C10 7.57 11.57 6 13.5 6H16v3h-1.5c-1.38 0-1.5.62-1.5 1.4V12h3l-.5 3h-2.5v6.8A10.02 10.02 0 0022 12z"/></svg>');
}
.footer-links-section h4 {
    color: #fff;
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 20px;
}
.footer-links-section ul {
    list-style: none;
    padding: 0;
    margin: 0;
}
.footer-links-section ul li {
    margin-bottom: 12px;
}
.footer-link {
    color: #8e8e93;
    text-decoration: none;
    transition: color 0.3s;
}
.footer-link:hover {
    color: #fff;
}
.footer-bottom-bar {
    text-align: center;
    padding-top: 40px;
    margin-top: 40px;
    border-top: 1px solid #3a3a3c;
    color: #6e6e73;
    font-size: 14px;
}
/* --- Nové styly pro zobrazení výsledků v mřížce --- */

.car-card-new {
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-lg);
    margin-bottom: 40px;
    overflow: hidden;
    background-color: var(--card-background);
    box-shadow: var(--shadow);
}

.car-card-new .rank-badge {
    background: var(--primary-color);
    color: white;
    padding: 8px 15px;
    font-weight: 600;
    font-size: 14px;
    display: inline-block;
    border-bottom-right-radius: var(--border-radius-lg);
}

.result-grid-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    grid-template-rows: auto auto;
    gap: 1px;
    background-color: var(--border-color);
}

.grid-quadrant {
    background-color: var(--card-background);
    padding: 25px;
}

.grid-quadrant h4 {
    font-size: 1.2rem;
    margin-top: 0;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid #f0f2f5;
}

/* Styly pro jednotlivé kvadranty */
.quadrant-images .car-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 10px;
}

.quadrant-images .car-gallery-image {
    width: 100%;
    height: 120px;
    object-fit: cover;
    border-radius: var(--border-radius-md);
}

.quadrant-info .car-title-new {
    font-size: 1.6rem;
    font-weight: 700;
    margin-bottom: 10px;
}
.quadrant-info .car-title-new a {
    color: var(--text-color);
    text-decoration: none;
    transition: color 0.2s;
}
.quadrant-info .car-title-new a:hover {
    color: var(--primary-color);
}
.quadrant-info .car-price-new {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--primary-color);
    margin-bottom: 20px;
}

.quadrant-info .details-list {
    list-style: none;
    padding: 0;
    margin: 0;
}
.quadrant-info .details-list li {
    display: flex;
    justify-content: space-between;
    padding: 8px 0;
    border-bottom: 1px solid #f0f2f5;
    font-size: 0.95rem;
}

.quadrant-verdict p {
    line-height: 1.6;
    font-style: italic;
    color: var(--subtle-text);
}
.quadrant-verdict .pros-list, .quadrant-cons .cons-list {
    list-style: none;
    padding: 0;
    margin: 0;
}
.quadrant-verdict .pros-list li, .quadrant-cons .cons-list li {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin-bottom: 10px;
    line-height: 1.5;
}
.quadrant-verdict .icon, .quadrant-cons .icon {
    font-size: 18px;
    color: var(--primary-color);
}
.quadrant-cons .icon {
    color: #ff3b30;
}


/* --- Responzivní design pro mřížku --- */
@media (max-width: 900px) {
    .result-grid-layout {
        grid-template-columns: 1fr; /* Jeden sloupec na mobilu */
    }
}
/* --- Styly pro nové detailní zobrazení --- */
.detailed-info-section {
    padding: 25px;
    background-color: #f8f9fa;
    border-top: 1px solid var(--border-color);
}
.car-description p {
    font-size: 1rem;
    line-height: 1.7;
    color: var(--subtle-text);
    margin-bottom: 25px;
    padding-bottom: 25px;
    border-bottom: 1px solid var(--border-color);
}
.details-columns {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 30px;
}
.column h4 {
    font-size: 1.2rem;
    margin-bottom: 15px;
}
.details-list {
    list-style: none;
    padding: 0;
    margin: 0;
}
.details-list li {
    display: flex;
    justify-content: space-between;
    padding: 8px 0;
    border-bottom: 1px solid #e9ecef;
}
.equipment-grid {
    column-count: 2;
    column-gap: 20px;
}
.equipment-category {
    break-inside: avoid;
    margin-bottom: 20px;
}
.equipment-category ul {
    list-style: '✓ ';
    padding-left: 20px;
}
@media (max-width: 768px) {
    .details-columns, .equipment-grid {
        grid-template-columns: 1fr;
        column-count: 1;
    }
}
/* --- Responzivní design --- */
@media (max-width: 768px) {
    body { padding: 10px; }
    header h1 { font-size: 2.5rem; }
    .tab-content-wrapper { padding: 25px; }
    .tabs { flex-direction: column; padding: 0; }
    .tab-button { border-radius: 0; }
    .details-grid, .factors-grid { grid-template-columns: 1fr; }
    .footer-container { grid-template-columns: 1fr; text-align: center; }
    .social-links { justify-content: center; }
    .control-group { flex-direction: column; align-items: stretch; }
    .control-group .control-label { width: auto; margin-bottom: 8px; text-align: center; }
}