/* Services section */
.services-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
    margin-top: 2rem;
}

.service-card {
    height: 300px;
    perspective: 1000px;
}

.service-card-inner {
    position: relative;
    width: 100%;
    height: 100%;
    text-align: center;
    transition: transform 0.8s;
    transform-style: preserve-3d;
}

@media (hover: hover) {
    .service-card:hover .service-card-inner {
        transform: rotateY(180deg);
    }
}

.service-card-front,
.service-card-back {
    position: absolute;
    width: 100%;
    height: 100%;
    backface-visibility: hidden;
    border-radius: 12px;
    padding: 2rem;
}

.service-card-front {
    background: var(--light-gray);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    padding-top: 2.5rem;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

.service-card-front::after {
    content: 'info'; 
    font-family: 'Material Icons';
    position: absolute;
    bottom: 0.8rem;
    right: 0.8rem;
    color: var(--primary-blue);
    opacity: 0.4;
    font-size: 20px;
    transition: opacity 0.3s ease;
    display: none; /* Skrytá defaultně */
}

@media (hover: hover) {
    .service-card-front::after {
        display: block; /* Zobrazit jen na zařízeních s hover */
    }
    
    .service-card:hover .service-card-front::after {
        opacity: 0.7;
    }
}

.service-card-back {
    background: var(--primary-blue);
    color: var(--white);
    transform: rotateY(180deg);
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    justify-content: center;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

.service-card .material-icons {
    font-size: 48px;
    color: var(--primary-blue);
    margin-bottom: 1.5rem;
}

.service-card-front h3 {
    margin-bottom: 1rem;
    font-size: 1.5rem;
    min-height: 4rem; /* Fixní výška pro 2 řádky textu */
    display: flex;
    align-items: center;
    text-align: center;
    line-height: 1.3;
}

.service-card h3 {
    margin-bottom: 1rem;
    font-size: 1.5rem;
}

.service-card-back h3 {
    color: var(--white);
}

/* Consultants section */
.poradci-section {
    background: var(--light-gray);
    position: relative;
    padding: 5rem 0;
}

.consultants {
    position: relative;
    max-width: 1000px;
    margin: 0 auto;
    padding: 0 4rem;
}

.consultant-container {
    position: relative;
    width: 100%;
    overflow: hidden;
}

.consultant-card {
    max-width: 900px;
    margin: 0 auto;
    padding: 2.5rem;
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
}

.consultant-header {
    display: flex;
    align-items: center;
    margin-bottom: 2rem;
    gap: 2rem;
}

.consultant-photo {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 1.5rem;
}

.consultant-image {
    width: 150px;
    height: 150px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid var(--primary-blue);
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    flex-shrink: 0;
}

.consultant-info {
    flex-grow: 1;
}

.consultant-info h3 {
    color: var(--primary-blue);
    font-size: 1.8rem;
    margin-bottom: 0.5rem;
}

.consultant-position {
    color: #666;
    font-size: 1.2rem;
}

.consultant-photo h3 {
    color: var(--white);
    font-size: 1.3rem;
    margin: 0;
}

.consultant-separator {
    width: 2px;
    height: 100%;
    background: repeating-linear-gradient(
        to bottom,
        var(--white) 0,
        var(--white) 4px,
        transparent 4px,
        transparent 8px
    );
    opacity: 0.5;
}

.consultant-content {
    color: #444;
    font-size: 1.1rem;
    line-height: 1.8;
}

.consultant-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 44px;
    height: 44px;
    background: var(--primary-blue);
    color: var(--white);
    border: none;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    z-index: 2;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.consultant-arrow:hover {
    background: var(--light-blue);
    transform: translateY(-50%) scale(1.1);
}

.consultant-prev { left: 0; }
.consultant-next { right: 0; }

.more-consultants {
    text-align: center;
    margin-top: 3rem;
}

/* Podcast section */
.podcast-section {
    background: white; 
    position: relative;
    overflow: hidden;
}

.podcast-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
}

.podcast-image img {
    width: 100%;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.15);
}

.podcast-info h2 {
    text-align: left;
}

.podcast-info h2::after {
    left: 0;
    transform: none;
}

.podcast-info p {
    font-size: 1.1rem;
    color: #444;
    margin-bottom: 2rem;
    line-height: 1.8;
}

.podcast-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: var(--primary-blue);
    color: var(--white);
    padding: 1rem 2rem;
    border-radius: 8px;
    text-decoration: none;
    transition: all 0.3s ease;
}

.podcast-link:hover {
    background: var(--light-blue);
    transform: translateY(-2px);
}

/* Responsive styles */
@media (max-width: 992px) {
    .services-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .consultant-card {
        padding: 2rem;
        gap: 2rem;
    }

    .consultant-image {
        width: 120px;
        height: 120px;
    }

    .podcast-content {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
}

@media (max-width: 768px) {
    .services-grid {
        grid-template-columns: 1fr;
    }

    .consultant-card {
        padding: 1.5rem;
    }

    .consultant-header {
        flex-direction: column;
        text-align: center;
        gap: 1rem;
    }

    .consultant-image {
        width: 120px;
        height: 120px;
    }


    .consultant-content {
        text-align: center;
        justify-content: center;
    }

    .consultant-info h3 {
        font-size: 1.5rem;
    }

    .consultant-position {
        font-size: 1.1rem;
    }

    /* Mobilní úpravy pro karty služeb */
    .service-card {
        cursor: default;
        height: auto; /* Zrušit fixní výšku – karta se roztáhne podle obsahu */
        perspective: none;
    }

    .service-card-inner {
        transform: none !important;
        position: static; /* Zrušit 3D kontext, aby front nebyl absolute */
        height: auto;
    }

    .service-card-front {
        position: static; /* Klíčová oprava – zrušit absolute positioning */
        height: auto;
    }
    
    .service-card-back {
        display: none;
    }
    
    .service-card-front::after {
        display: none !important;
    }
}

@media (max-width: 480px) {
    .consultant-image {
        width: 100px;
        height: 100px;
    }

    .consultant-card {
        padding: 1.5rem;
    }

    .consultant-content {
        font-size: 1rem;
    }

    .service-card-front::after {
        font-size: 16px;
    }
}