/* Speakers Swiper Custom Styles */
.speakers-swiper {
    padding: 20px 0 60px 0;
    overflow: visible;
}

.speakers-swiper .swiper-slide {
    height: auto;
    display: flex;
    align-items: center;
    justify-content: center;
}

.speaker-card {
    text-align: center;
    padding: 20px;
    border-radius: 15px;
    backdrop-filter: blur(4px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    transition: all 0.3s ease;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    width: 100%;
}

.speaker-card:hover {
    transform: translateY(-5px);
    background: rgba(255, 255, 255, 0.15);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.speaker-card img {
    width: 150px;
    height: 150px;
    object-fit: cover;
    margin: 0 auto;
    transition: all 0.3s ease;
}

.speaker-card:hover img {
    transform: scale(1.05);
}

.speaker-info {
    margin-top: 15px;
}

.speaker-info h3 {
    font-size: 1.25rem;
    font-weight: bold;
    margin-bottom: 5px;
    color: #ffffff;
}

.speaker-info p {
    font-size: 0.9rem;
    line-height: 1.4;
    color: #ffffff;
    opacity: 0.9;
}

/* Navigation Buttons */
.speakers-swiper .swiper-button-next,
.speakers-swiper .swiper-button-prev {
    color: #fff;
    background: rgba(255, 255, 255, 0.1);
    width: 50px;
    height: 50px;
    border-radius: 50%;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    transition: all 0.3s ease;
}

.speakers-swiper .swiper-button-next:hover,
.speakers-swiper .swiper-button-prev:hover {
    background: rgba(0, 181, 209, 0.2);
    transform: scale(1.1);
}

.speakers-swiper .swiper-button-next:after,
.speakers-swiper .swiper-button-prev:after {
    font-size: 18px;
    font-weight: bold;
}

.speakers-swiper .swiper-button-next {
    right: -25px;
}

.speakers-swiper .swiper-button-prev {
    left: -25px;
}

/* Pagination */
.speakers-swiper .swiper-pagination {
    bottom: 0;
}

.speakers-swiper .swiper-pagination-bullet {
    background: rgba(255, 255, 255, 0.5);
    opacity: 1;
    width: 12px;
    height: 12px;
    margin: 0 5px;
    transition: all 0.3s ease;
}

.speakers-swiper .swiper-pagination-bullet-active {
    background: #00B5D1;
    transform: scale(1.2);
}

/* Responsive Design */
@media (max-width: 1024px) {
    .speakers-swiper .swiper-button-next {
        right: -15px;
    }
    
    .speakers-swiper .swiper-button-prev {
        left: -15px;
    }
    
    .speaker-card img {
        width: 120px;
        height: 120px;
    }
}

@media (max-width: 768px) {
    .speakers-swiper {
        padding: 20px 0 50px 0;
    }
    
    .speakers-swiper .swiper-button-next,
    .speakers-swiper .swiper-button-prev {
        width: 40px;
        height: 40px;
    }
    
    .speakers-swiper .swiper-button-next:after,
    .speakers-swiper .swiper-button-prev:after {
        font-size: 14px;
    }
    
    .speaker-card {
        padding: 15px;
    }
    
    .speaker-card img {
        width: 100px;
        height: 100px;
    }
    
    .speaker-info h3 {
        font-size: 1.1rem;
    }
    
    .speaker-info p {
        font-size: 0.8rem;
    }
}

@media (max-width: 480px) {
    .speakers-swiper .swiper-button-next {
        right: 10px;
    }
    
    .speakers-swiper .swiper-button-prev {
        left: 10px;
    }
    
    .speaker-card img {
        width: 80px;
        height: 80px;
    }
}

/* Speaker Modal Styles */
.speaker-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 9999;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.speaker-modal.active {
    opacity: 1;
    visibility: visible;
}

.modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(5px);
}

.modal-content {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.9);
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    border-radius: 15px;
    width: 90%;
    max-width: 900px;
    max-height: 90vh;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    overflow: hidden;
    transition: all 0.3s ease;
}

.modal-content::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url('../images/bg-modal.webp');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

.speaker-modal.active .modal-content {
    transform: translate(-50%, -50%) scale(1);
}

.modal-close {
    position: absolute;
    top: 10px;
    right: 10px;
    background: none;
    border: none;
    font-size: 30px;
    color: #666;
    cursor: pointer;
    z-index: 10;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.3s ease;
}

.modal-close:hover {
    background: rgba(0, 0, 0, 0.1);
    color: #000;
}

.modal-body {
    display: flex;
    min-height: 500px;
}

.modal-left {
    flex: 0 0 30%;
    background: linear-gradient(0deg, #1B4580 0%, #00B6D1 100%);
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 40px 30px;
    text-align: center;
}

.modal-left::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-size: 30px 30px;
    opacity: 0.3;
}

.speaker-image-container {
    position: relative;
    z-index: 2;
    margin-bottom: 30px;
}

.modal-speaker-image {
    width: 180px;
    height: 180px;
    border-radius: 50%;
    object-fit: cover;
    border: 4px solid rgba(255, 255, 255, 0.3);
}

.speaker-details {
    position: relative;
    z-index: 2;
    color: white;
}

.modal-speaker-name {
    font-family: 'DIN', sans-serif;
    font-size: 1.8rem;
    font-weight: bold;
    text-transform: uppercase;
    margin-bottom: 10px;
    line-height: 1.2;
}

.modal-speaker-position {
    font-size: 1rem;
    opacity: 0.9;
    line-height: 1.4;
}

.modal-right {
    flex: 1;
    padding: 40px;
    background: white;
    position: relative;
    overflow-y: auto;
    max-height: 500px;
}

.modal-right::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: 
        radial-gradient(circle at 25% 25%, rgba(0,0,0,0.05) 1px, transparent 1px),
        radial-gradient(circle at 75% 75%, rgba(0,0,0,0.05) 1px, transparent 1px);
    background-size: 20px 20px;
    opacity: 0.3;
}

.modal-description {
    position: relative;
    z-index: 2;
}

.modal-description p {
    font-size: 1rem;
    line-height: 1.6;
    color: #333;
    margin-bottom: 20px;
    text-align: justify;
}

.modal-description p:last-child {
    margin-bottom: 0;
}

/* Speaker Description Text Formatting */
.modal-description {
    font-size: 1rem;
    line-height: 1.6;
    color: #333;
    text-align: justify;
}

.modal-description span {
    display: inline;
    font-weight: 400;
    color: #333;
}

.modal-description span[style*="font-weight: 400"] {
    font-weight: 400 !important;
}

.modal-description span[style*="font-weight: 700"] {
    font-weight: 700 !important;
}

.modal-description span[style*="font-weight: bold"] {
    font-weight: bold !important;
}

/* Ensure proper spacing between sentences */
.modal-description span + span {
    margin-left: 0;
}

/* Style for work experience section */
.modal-description span:contains("Опыт работы:") {
    font-weight: bold;
    color: #1B4580;
    display: block;
    margin-top: 20px;
    margin-bottom: 10px;
}

/* Responsive Modal */
@media (max-width: 768px) {
    .modal-content {
        width: 95%;
        max-height: 95vh;
    }
    
    .modal-body {
        flex-direction: column;
        min-height: auto;
    }
    
    .modal-left {
        flex: none;
        padding: 30px 20px;
    }
    
    .modal-left::after {
        display: none;
    }
    
    .modal-speaker-image {
        width: 120px;
        height: 120px;
    }
    
    .modal-speaker-name {
        font-size: 1.4rem;
    }
    
    .modal-right {
        padding: 30px 20px;
        max-height: 300px;
    }
    
    .modal-close {
        top: 15px;
        right: 15px;
        font-size: 24px;
    }
}

@media (max-width: 480px) {
    .modal-content {
        width: 98%;
        border-radius: 10px;
    }
    
    .modal-left {
        padding: 20px 15px;
    }
    
    .modal-speaker-image {
        width: 100px;
        height: 100px;
    }
    
    .modal-speaker-name {
        font-size: 1.2rem;
    }
    
    .modal-right {
        padding: 20px 15px;
        max-height: 250px;
    }
    
    .modal-description p {
        font-size: 0.9rem;
    }
}
