/* Специфичные стили для главной страницы */

/* Секция услуг */
.services {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 2rem;
    margin: 3rem 0;
}

.service-card {
    background: white;
    border-radius: 10px;
    padding: 0.5rem 1.5rem;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    overflow: hidden;
    cursor: pointer;
    position: relative;
}

.service-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0,0,0,0.15);
}

.service-card:after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 3px;
    background: var(--accent);
    transition: width 0.5s cubic-bezier(0.23, 1, 0.32, 1);
}

.service-card.active:after {
    width: 80%;
}

.service-top {
    min-height: 25rem;
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
    padding-bottom: 1.5rem;
}

.service-icon {
    font-size: 2.5rem;
    color: var(--accent);
    text-align: center;
    margin-bottom: 1rem;
}

.service-title {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    color: var(--primary);
    text-align: center;
    min-height: 5rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.service-text {
    color: #555;
    font-size: 1.1rem;
    margin: 0.5rem 0 1.2rem;
    text-align: center;
    line-height: 1.5;
    min-height: 4rem; 
    display: flex;
    justify-content: center;
    padding: 0 0.5rem;
}

.service-toggle-wrapper {
    margin-top: auto;
}

.service-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-top: 1.2rem;
    color: var(--secondary);
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
}

.service-toggle:hover {
    color: var(--accent);
}

.toggle-icon {
    margin-left: 0.5rem;
    transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.service-card.active .toggle-icon {
    transform: rotate(180deg);
}

.toggle-text {
    font-size: 0.95rem;
}

.service-details {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.6s cubic-bezier(0.23, 1, 0.32, 1), 
                padding-top 0.5s ease 0.1s;
    padding-top: 0;
    opacity: 0;
    transform: translateY(-10px);
}

.service-card.active .service-details {
    max-height: 1500px;
    padding-top: 1.5rem;
    opacity: 1;
    transform: translateY(0);
}

.details-group {
    margin-bottom: 1.5rem;
}

.details-group h4 {
    color: var(--secondary);
    margin-bottom: 0.8rem;
    font-size: 1.1rem;
    font-weight: 600;
    border-bottom: 1px solid #eee;
    padding-bottom: 0.5rem;
}

.accent-list {
    list-style-type: none;
    padding-left: 0;
}

.accent-list li {
    position: relative;
    padding-left: 1.5rem;
    margin-bottom: 0.5rem;
    line-height: 1.5;
}

.accent-list li:before {
    content: "•";
    position: absolute;
    left: 0;
    color: var(--accent);
    font-size: 1.2rem;
    line-height: 1;
}

/* Секция "О нас" */
.about {
    display: flex;
    align-items: center;
    gap: 3rem;
    margin: 5rem 0;
}

.about-image {
    flex: 1;
    min-height: 730px;
    background-image: url('../img/roman_body.webp');
    background-size: cover;
    background-position: center;
    border-radius: 10px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
}

.about-content {
    flex: 1;
}

.about-subtitle {
    font-size: 1.4rem;
    color: var(--secondary);
    margin-bottom: 1.5rem;
    font-weight: 500;
}

/* Отзывы */
.testimonials {
    background-color: var(--light);
    padding: 4rem 0;
    margin: 4rem 0;
}

.testimonial-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
}

.testimonial-card {
    background: white;
    padding: 2rem;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.testimonial-text {
    font-style: italic;
    margin-bottom: 1rem;
}

.testimonial-author {
    font-weight: bold;
    color: var(--secondary);
}

/* Проблемы */
.problems-section {
    background-color: var(--light);
    padding: 4rem 2rem;
    margin: 4rem 0;
    text-align: center;
    border-radius: 10px;
}

.problems-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
    gap: 1.5rem;
    margin: 3rem 0;
}

.problem-card {
    background: white;
    padding: 2rem;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.05);
    transition: transform 0.3s ease;
}

.problem-card:hover {
    transform: translateY(-5px);
}

.problem-icon {
    font-size: 2rem;
    color: var(--accent);
    margin-bottom: 1rem;
}

/* Раздел преимуществ */
.advantages-section {
    background: linear-gradient(135deg, #2c3e50 0%, #4a6491 100%);
    color: white;
    padding: 5rem 0;
    border-radius: 15px;
    position: relative;
    overflow: hidden;
}

.advantages-section:before {
    content: "";
    position: absolute;
    top: -50px;
    left: -50px;
    width: 200px;
    height: 200px;
    border-radius: 50%;
    background: rgba(255,255,255,0.05);
}

.advantages-section:after {
    content: "";
    position: absolute;
    bottom: -100px;
    right: -100px;
    width: 300px;
    height: 300px;
    border-radius: 50%;
    background: rgba(231, 76, 60, 0.08);
}

.advantages-section h2 {
    color: white;
    text-align: center;
    margin-bottom: 3rem;
    position: relative;
    z-index: 2;
}

.advantages-section h2:after {
    background-color: var(--accent);
}

.advantages-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 2rem;
    position: relative;
    z-index: 2;
}

.advantage-card {
    background: rgba(255,255,255,0.1);
    backdrop-filter: blur(10px);
    border-radius: 15px;
    padding: 2rem;
    text-align: center;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    border: 1px solid rgba(255,255,255,0.15);
}

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

.advantage-icon {
    font-size: 3rem;
    color: var(--accent);
    margin-bottom: 1.5rem;
    transition: transform 0.3s ease;
}

.advantage-card:hover .advantage-icon {
    transform: scale(1.1);
}

.advantage-card p {
    font-size: 1.2rem;
    line-height: 1.6;
    font-weight: 500;
}

/* Процесс работы */
.process-section {
    padding: 4rem 0;
    text-align: center;
}

.process-steps {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 2rem;
    margin: 3rem 0;
}

.process-step {
    background: white;
    padding: 2rem;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.05);
    position: relative;
}

.step-number {
    position: absolute;
    top: -20px;
    left: 50%;
    transform: translateX(-50%);
    width: 40px;
    height: 40px;
    background-color: var(--accent);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
}

.process-note {
    margin: 2rem 0;
    font-style: italic;
    color: var(--dark);
    opacity: 0.8;
}

/* Истории успеха */
.stories-section {
    background-color: var(--slategray);
    color: white;
    padding: 4rem 2rem;
    margin: 4rem 0;
    text-align: center;
    border-radius: 10px;
}

.stories-title {
    color: rgba(255, 255, 255, 0.877) !important;
}

.stories-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin: 3rem 0;
}

.story-card {
    background: rgba(255,255,255,0.1);
    padding: 2rem;
    border-radius: 10px;
    position: relative;
}

.story-quote {
    position: absolute;
    top: 10px;
    left: 20px;
    font-size: 3rem;
    opacity: 0.2;
}

/* Призыв к действию */
.final-cta {
    text-align: center;
    padding: 4rem 0;
    margin: 4rem 0;
    background-color: var(--light);
    border-radius: 10px;
}

.cta-list {
    list-style: none;
    margin: 2rem auto;
    max-width: 500px;
    text-align: left;
}

.cta-list li {
    margin: 1rem 0;
    position: relative;
    padding-left: 30px;
}

.cta-list li:before {
    content: "✓";
    color: var(--accent);
    position: absolute;
    left: 0;
}

.cta-buttons {
    display: flex;
    justify-content: center;
    gap: 1rem;
    flex-wrap: wrap;
    margin-top: 2rem;
}

.telegram-btn {
    background-color: cadetblue !important;
    border: 2px solid cadetblue !important;
}

.telegram-btn:hover {
    background-color: transparent !important;
    color: cadetblue !important;
}

/* Расположение */
.location-section {
    padding: 5rem 0;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    position: relative;
    overflow: hidden;
    border-radius: 10px;
}

.location-section:before {
    content: "";
    position: absolute;
    top: -50px;
    left: -50px;
    width: 200px;
    height: 200px;
    border-radius: 50%;
    background: var(--secondary);
    opacity: 0.1;
}

.location-section:after {
    content: "";
    position: absolute;
    bottom: -100px;
    right: -100px;
    width: 300px;
    height: 300px;
    border-radius: 50%;
    background: var(--accent);
    opacity: 0.05;
}

.location-header {
    text-align: center;
    margin-bottom: 3rem;
}

.location-header h2 {
    font-size: 2.8rem;
    color: var(--primary);
    margin-bottom: 1rem;
}

.location-subtitle {
    font-size: 1.3rem;
    max-width: 700px;
    margin: 0 auto;
    color: #555;
}

.map-container {
    display: flex;
    flex-wrap: wrap;
    gap: 30px;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 15px 50px rgba(0,0,0,0.15);
    background: white;
}

#office-map {
    flex: 1;
    min-height: 500px;
    min-width: 300px;
}

.map-info {
    flex: 1;
    min-width: 300px;
    padding: 40px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.map-info-content h3 {
    color: var(--primary);
    margin-bottom: 1.5rem;
    font-size: 1.8rem;
}

.map-info p {
    margin: 1.2rem 0;
    display: flex;
    align-items: flex-start;
    gap: 15px;
    font-size: 1.1rem;
}

.map-info i {
    color: var(--secondary);
    font-size: 1.3rem;
    min-width: 30px;
    text-align: center;
    margin-top: 3px;
}

.location-cta {
    margin-top: 2.5rem;
}

.cta-btn.pulse {
    background: linear-gradient(135deg, #4361ee 0%, #3a0ca3 100%);
    border: none;
    color: white;
    padding: 12px 25px;
    font-weight: 600;
    border-radius: 50px;
    box-shadow: 0 4px 15px rgba(67, 97, 238, 0.4);
    transition: all 0.4s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.cta-btn.pulse:hover {
    transform: translateY(-3px);
    box-shadow: 0 7px 20px rgba(67, 97, 238, 0.6);
    background: linear-gradient(135deg, #3a0ca3 0%, #4361ee 100%);
}

.cta-btn.pulse i {
    color: white;
    font-size: 1.2em;
    transition: transform 0.3s ease;
}

.cta-btn.pulse:hover i {
    transform: translateX(5px);
}

/* Анимация пульсации */
@keyframes pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(67, 97, 238, 0.6);
    }
    70% {
        box-shadow: 0 0 0 12px rgba(67, 97, 238, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(67, 97, 238, 0);
    }
}

.cta-btn.pulse {
    animation: pulse 2s infinite;
}

.fa-spinner {
    animation: spin 1s linear infinite;
}

@keyframes pulse {
    0% {
        transform: scale(1);
        opacity: 1;
    }
    50% {
        transform: scale(1.05);
        opacity: 0.7;
    }
    100% {
        transform: scale(1);
        opacity: 1;
    }
}

.location-note {
    margin-top: 15px;
    font-style: italic;
    color: #666;
    font-size: 0.95rem;
}

/* Location Badge */
.location-badge {
    background: rgba(52, 152, 219, 0.1);
    border-radius: 15px;
    padding: 20px;
    margin-top: 30px;
    border-left: 4px solid var(--secondary);
    display: flex;
    align-items: center;
    gap: 15px;
}

.badge-icon {
    width: 60px;
    height: 60px;
    background: var(--secondary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.badge-icon i {
    color: white;
    font-size: 1.8rem;
}

.location-badge p {
    margin: 0;
    font-weight: 500;
    color: var(--dark);
}

.testimonials-swiper {
    padding: 20px 0 50px;
}

.testimonials .testimonial-card {
    height: auto;
    padding: 0;
    box-shadow: 0 5px 25px rgba(0,0,0,0.15);
}

.testimonials .testimonial-card img {
    width: 100%;
    height: auto;
    border-radius: 10px;
    display: block;
}

.swiper-button-next, 
.swiper-button-prev {
    color: var(--secondary) !important;
    width: 40px;
    height: 40px;
}

.swiper-button-next:after, 
.swiper-button-prev:after {
    font-size: 20px;
}

.swiper-pagination-bullet-active {
    background: var(--secondary) !important;
}

/* Адаптивность для главной */
@media (max-width: 1024px) {
    .about-image {
        min-height: 500px;
    }
}

@media (max-width: 768px) {
    .about {
        flex-direction: column;
    }
    
    .about-image {
        width: 100%;
        min-height: 400px;
    }
    
    .process-steps {
        grid-template-columns: 1fr;
    }
    
    .cta-buttons {
        flex-direction: column;
    }
    
    .map-container {
        flex-direction: column;
    }
    
    #office-map {
        min-height: 300px;
    }

    .testimonials-swiper {
        padding: 10px 0 40px;
    }

    .advantages-section {
        padding: 3rem 1rem;
    }
    
    .advantage-card {
        padding: 1.5rem;
    }
}

@media (max-width: 480px) {
    #office-map {       
        right: 2.3rem;
    }

    .hero {
        margin-bottom: 0;
    }

    .map-info {
        padding: 25px;
    }

    .location-cta {
        max-width: 13.5rem;
    }

    .location-badge {
        margin-top: 0;
        max-width: 14rem;
    }

    .services {
        grid-template-columns: 1fr;
    }
    
    .service-title {
        min-height: auto;
        font-size: 1.3rem;
    }

    .problems-list {
        grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    }
    
    .problem-card {
        padding: 1.5rem;
    }

    .final-cta {
        padding: 1.3rem 1.3rem;
    }
}