/* --- ZÁKLADNÍ MŘÍŽKY --- */
.card-grid, .contact-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 30px;
    padding: 20px 0;
}

/* --- KARTY --- */
.card {
    background: var(--glass-bg-card);
    backdrop-filter: var(--blur-card);
    -webkit-backdrop-filter: var(--blur-card);
    border: 1px solid var(--glass-border);
    padding: 40px 30px;
    border-radius: var(--radius-lg);
    
    transition: border-color var(--transition-speed);
    
    text-align: center;
    color: var(--text-light);
    display: flex;
    flex-direction: column;
    justify-content: center; 
    align-items: center;     
    flex: 0 1 calc(33.333% - 20px);
    min-width: 300px;
    max-width: 380px; 
    position: relative; 
    text-decoration: none;
    transform: translateZ(0); 
}

.contact-grid .card {
    flex: 0 1 calc(50% - 20px);
    max-width: 450px;
}

.click-card {
    cursor: pointer;
}

.card:hover {
    border-color: var(--glass-border-hover) !important;
    transform: translateZ(0) !important; 
}

.badge-preferred {
    position: absolute;
    top: -12px; 
    left: 50%;
    transform: translateX(-50%);
    background-color: var(--color-whatsapp);
    color: #000;
    font-size: 0.75rem;
    font-weight: 800;
    padding: 4px 14px;
    border-radius: var(--radius-pill);
    box-shadow: var(--shadow-whatsapp);
    text-transform: uppercase;
    letter-spacing: 1px;
    white-space: nowrap;
    z-index: 10;
}

.card-icon {
    font-size: 3rem;
    margin-bottom: 20px;
    filter: var(--shadow-icon);
}

/* --- SEKCE HODNOCENÍ --- */
.review-stars {
    font-size: 1.5rem;
    margin-bottom: 15px;
    letter-spacing: 2px;
}

.review-text {
    font-style: italic;
    line-height: 1.6;
    color: var(--text-light) !important;
}

.review-author {
    margin-top: 20px;
    font-weight: bold;
    color: var(--accent-color);
}

.google-btn-wrapper {
    margin-top: 40px;
}

/* --- KONTAKTNÍ IKONY --- */
.contact-svg-icon {
    width: 55px;
    height: 55px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 20px;
}

.contact-svg-icon svg {
    width: 100%;
    height: 100%;
}

.phone-icon svg {
    fill: var(--color-whatsapp); 
    filter: var(--shadow-whatsapp);
}

.email-icon svg {
    fill: var(--color-email); 
    filter: var(--shadow-email);
}

.card h3 {
    color: var(--accent-color);
    margin-bottom: 15px;
    font-size: 1.4rem;
    text-shadow: var(--shadow-card-text);
}

.card p {
    line-height: 1.6;
    color: var(--text-muted);
}

.contact-highlight {
    font-size: 1.5rem;
    color: var(--text-light) !important;
    font-weight: bold;
    margin: 10px 0;
    text-decoration: none; 
    transition: color var(--transition-speed);
    display: inline-block;
}

.card:hover .contact-highlight {
    color: var(--accent-color) !important;
}

.swipe-indicators {
    display: none;
    justify-content: center;
    gap: 10px;
    margin-top: 20px;
}

.swipe-dot {
    width: 8px;
    height: 8px;
    background: var(--swipe-dot-bg);
    border-radius: var(--radius-round);
    transition: background-color var(--transition-speed), width var(--transition-speed);
}

.swipe-dot.active {
    background: var(--accent-color);
    width: 20px;
    border-radius: var(--radius-md);
}

/* --- PATIČKA --- */
.hero-footer {
    position: absolute;
    bottom: 20px;
    left: 0;
    width: 100%;
    text-align: center;
    opacity: 0.6;
    pointer-events: none;
    z-index: 5;
}

.hero-footer p {
    color: var(--text-muted);
    font-size: 0.85rem;
    letter-spacing: 1px;
    margin: 0;
}

.hero-footer .primary-text {
    color: var(--primary-color);
}

/* ============================================== */
/* 💻 TABLETY A NÍZKÉ DISPLEJE (Záchrana výšky)    */
/* ============================================== */
@media (max-width: 1024px), (max-height: 850px) {
    .card-grid, .contact-grid {
        gap: 15px;
        padding: 10px 0;
        margin-top: 45px; /* Bezpečnostní polštář pod logem/navigací */
    }
    
    .card {
        padding: 20px 20px;
        min-width: 270px; /* Mírné zmenšení, aby šly lépe 2 vedle sebe na iPadech */
    }
    
    .card-icon {
        font-size: 2.2rem;
        margin-bottom: 12px;
    }
    
    .card h3 {
        font-size: 1.2rem;
        margin-bottom: 8px;
    }
    
    .card p {
        font-size: 0.9rem;
        line-height: 1.4;
    }

    .contact-svg-icon {
        width: 45px;
        height: 45px;
        margin-bottom: 15px;
    }

    .contact-highlight {
        font-size: 1.3rem; 
    }
}

/* ============================================== */
/* 📱 MOBILNÍ ROZLOŽENÍ - KOMPAKTNÍ VERZE          */
/* ============================================== */
@media (max-width: 767px) {
    
    .mobile-slider-container {
        width: 100%;
        margin-left: 0;
    }

    .card-grid {
        display: flex;
        flex-wrap: nowrap; 
        justify-content: flex-start; 
        overflow-x: auto;
        
        scroll-snap-type: x mandatory !important;
        scroll-behavior: auto !important; 
        -webkit-overflow-scrolling: touch; 
        
        gap: 20px; 
        padding: 10px 0 20px 0; 
        scrollbar-width: none;
        -ms-overflow-style: none;
        width: 100%;
        margin-top: 20px;
    }
    
    .card-grid::-webkit-scrollbar { display: none; }
    
    .card-grid .card { 
        scroll-snap-stop: always;
        scroll-snap-align: center;
        flex: 0 0 100%; 
        max-width: 100%; 
    }
    
    .swipe-indicators { 
        display: flex; 
        flex-wrap: wrap; 
        justify-content: center;
        margin-top: 10px;
    }

    /* 🎯 KONTAKTY - MASIVNÍ ZMENŠENÍ PRO MOBIL */
    .contact-grid {
        flex-direction: column;
        align-items: center;
        justify-content: center; 
        gap: 20px; 
        width: 100%;
        margin-top: 10px;
        padding-bottom: 50px; 
    }
    
    .contact-grid .card {
        width: 100%;
        min-width: unset;
        max-width: 380px;
        margin: 0 auto;
        padding: 25px 20px; 
    }
    
    .contact-svg-icon {
        width: 40px; 
        height: 40px;
        margin-bottom: 10px;
    }
    
    .card h3 {
        font-size: 1.2rem; 
        margin-bottom: 10px;
    }
    
    .contact-highlight {
        font-size: 1.25rem; 
    }
    
    .card p {
        font-size: 0.85rem; 
    }
    
    .badge-preferred {
        font-size: 0.65rem; 
        padding: 3px 10px;
    }
    
    .hero-footer {
        bottom: 5px; 
        padding: 0 10px;
    }
}