.hero {
    padding: 60px 0 80px;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: var(--white);
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: -100px;
    right: -100px;
    width: 400px;
    height: 400px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
}

.hero::after {
    content: '';
    position: absolute;
    bottom: -100px;
    left: -100px;
    width: 300px;
    height: 300px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
}

.hero-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
    position: relative;
    z-index: 1;
}

.hero-text {
    padding-right: 40px;
}

.hero-title {
    font-size: 3.2rem;
    margin-bottom: 1.5rem;
    color: var(--white);
    line-height: 1.2;
}

.hero-subtitle {
    font-size: 1.3rem;
    margin-bottom: 2.5rem;
    font-weight: 400;
    opacity: 0.9;
    line-height: 1.6;
}

.hero-image {
    display: flex;
    justify-content: center;
    align-items: center;
}

/* Phone Mockup */
.phone-mockup {
    position: relative;
    perspective: 1000px;
}

.phone-frame {
    width: 320px;
    height: 640px;
    background: #222;
    border-radius: 40px;
    padding: 16px;
    box-shadow:
            0 25px 60px rgba(0, 0, 0, 0.4),
            0 0 0 4px #333,
            0 0 0 8px #555;
    transform: rotate3d(0.1, 0.1, 0, 15deg);
    transition: transform 0.5s ease;
}

.phone-mockup:hover .phone-frame {
    transform: rotate3d(0.1, 0.1, 0, 5deg);
}

.phone-screen {
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #0088cc 0%, #006da3 100%);
    border-radius: 32px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

/* Telegram Interface */
.telegram-screen {
    flex: 1;
    display: flex;
    flex-direction: column;
    background: var(--white);
}

.telegram-header {
    /*background: var(--primary);*/
    background: #F1F1F1;
    padding: 20px;
    display: flex;
    align-items: center;
    gap: 12px;
    color: black;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.tg-avatar {
    width: 42px;
    height: 42px;
    border-radius: 50%;     /* делаем круг */
    overflow: hidden;       /* обрезаем всё, что выходит за круг */
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.2);
}

.tg-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;      /* вписываем картинку, обрезая лишнее */
    display: block;
}

.tg-info {
    flex: 1;
}

.tg-name {
    font-weight: 600;
    font-size: 16px;
    text-align: left;
}

.tg-status {
    font-size: 13px;
    opacity: 0.9;
    text-align: left;
}

.telegram-messages {
    flex: 1;
    padding: 20px 15px;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    gap: 12px;
    overflow-y: auto;

    background-image: url("../images/hero/tg-bg.jpg");
    background-size: cover;       /* растянуть на весь блок */
    background-position: center;  /* по центру */
    background-repeat: no-repeat; /* без повторений */
    background-attachment: fixed; /* картинка будет статичной */
}

.message {
    display: flex;
    max-width: 85%;
}

.message__appeared {
    opacity: 0;
    display: none;
    animation: messageAppear 0.1s ease-out forwards;

}



.message.bot {
    align-self: flex-start;
}

.message-content {
    position: relative;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.message.bot .message-content {
    border-bottom-left-radius: 6px;
}

.message-img {
    width: 100%;
    height: auto;
    display: block;
    transition: transform 0.3s ease;
}

.message:hover .message-img {
    transform: scale(1.02);
}

/* Анимации сообщений */
@keyframes messageAppear {
    to {
        opacity: 1;
    }
}

/* Стили для скроллбара */
.telegram-messages::-webkit-scrollbar {
    width: 4px;
}

.telegram-messages::-webkit-scrollbar-track {
    background: transparent;
}

.telegram-messages::-webkit-scrollbar-thumb {
    background: rgba(0, 136, 204, 0.3);
    border-radius: 2px;
}

.telegram-messages::-webkit-scrollbar-thumb:hover {
    background: rgba(0, 136, 204, 0.5);
}

/* Responsive Design */
@media (max-width: 1024px) {
    .hero-content {
        grid-template-columns: 1fr;
        gap: 50px;
        text-align: center;
    }

    .hero-text {
        padding-right: 0;
        order: 2;
    }

    .hero-image {
        order: 1;
    }

    .hero-title {
        font-size: 2.8rem;
    }

    .phone-frame {
        width: 300px;
        height: 600px;
    }
}

@media (max-width: 768px) {
    .hero {
        padding: 40px 0 60px;
    }

    .hero-title {
        font-size: 2.3rem;
    }

    .hero-subtitle {
        font-size: 1.1rem;
    }

    .phone-frame {
        width: 260px;
        height: 520px;
        transform: rotate3d(0.1, 0.1, 0, 8deg);
    }

    .telegram-header {
        padding: 16px;
    }

    .telegram-messages {
        padding: 16px 12px;
        gap: 10px;
    }
}

@media (max-width: 576px) {
    .hero-title {
        font-size: 2rem;
    }

    .phone-frame {
        width: 230px;
        height: 460px;
        padding: 12px;
    }

    .telegram-header {
        padding: 14px;
    }

    .tg-avatar {
        width: 36px;
        height: 36px;
        font-size: 16px;
    }

    .tg-name {
        font-size: 14px;
    }

    .tg-status {
        font-size: 11px;
    }

    .telegram-messages {
        padding: 14px 10px;
        gap: 8px;
    }
}

/* CTA Button */
.cta-button {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background: var(--white);
    color: var(--primary);
    padding: 16px 36px;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 600;
    font-size: 1.1rem;
    transition: var(--transition);
    box-shadow: var(--shadow);
}

.cta-button:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-hover);
}

.features {
    padding: 100px 0;
    background-color: var(--white);
}

.section-title {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 3rem;
    color: var(--text-dark);
}

.section-subtitle {
    text-align: center;
    font-size: 1.2rem;
    color: var(--text-light);
    max-width: 700px;
    margin: 0 auto 4rem;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

.feature-card {
    background-color: var(--white);
    border-radius: var(--border-radius);
    padding: 40px 30px;
    box-shadow: var(--shadow);
    transition: var(--transition);
    text-align: center;
    border: 1px solid var(--gray-200);
}

.feature-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-hover);
    border-color: var(--primary-light);
}

.feature-icon {
    width: 70px;
    height: 70px;
    background: linear-gradient(135deg, var(--primary-light), var(--white));
    border-radius: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 25px;
    color: var(--primary);
    font-size: 28px;
    box-shadow: var(--shadow);
}

.feature-title {
    font-size: 1.4rem;
    margin-bottom: 15px;
}

.feature-text {
    color: var(--text-light);
}

/* Анимации для новых иконок */
.feature-card:nth-child(2) .feature-icon i {
    transform: rotate(90deg);
}

.feature-card:nth-child(2):hover .feature-icon i {
    transform: rotate(90deg) scale(1.1);
}

.feature-card:nth-child(3):hover .feature-icon i {
    transform: scale(1.1);
}

/* How It Works Section */
.how-it-works {
    padding: 100px 0;
    background-color: var(--bg-light);
}



.cta-button.primary.large {
    padding: 20px 50px;
    font-size: 1.3rem;
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: var(--white);
    border: none;
}

.cta-button.primary.large:hover {
    background: linear-gradient(135deg, var(--primary-dark), #0056b3);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 136, 204, 0.3);
}

/* Responsive Design */
@media (max-width: 767px) {


    .cta-button.primary.large {
        padding: 18px 40px;
        font-size: 1.2rem;
    }
}

@media (max-width: 576px) {
    .how-it-works {
        padding: 80px 0;
    }

}


.cta-section {
    padding: 100px 0;
    text-align: center;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: var(--white);
    position: relative;
    overflow: hidden;
}

.cta-section::before {
    content: '';
    position: absolute;
    top: -50px;
    right: -50px;
    width: 200px;
    height: 200px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
}

.cta-section::after {
    content: '';
    position: absolute;
    bottom: -80px;
    left: -80px;
    width: 250px;
    height: 250px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
}

.cta-title {
    font-size: 2.5rem;
    margin-bottom: 1.5rem;
    color: var(--white);
}

.cta-text {
    font-size: 1.2rem;
    margin-bottom: 2.5rem;
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
    opacity: 0.9;
}

.cta-button.secondary {
    background: var(--white);
    color: var(--primary);
}

.cta-button.secondary:hover {
    background: var(--gray-100);
}

/* Responsive Design */
@media (max-width: 992px) {


    .hero-title {
        font-size: 2.8rem;
    }
}

@media (max-width: 768px) {
    .hero-title {
        font-size: 2.2rem;
    }

    .hero-subtitle {
        font-size: 1.1rem;
    }

    .section-title {
        font-size: 2rem;
    }
}

@media (max-width: 576px) {

    .hero-title {
        font-size: 2rem;
    }


    .features, .how-it-works, .articles-preview, .cta-section {
        padding: 80px 0;
    }

    .section-title {
        font-size: 1.8rem;
    }

    .cta-title {
        font-size: 1.8rem;
    }
}



/* Resources Section */
.resources-section {
    padding: 80px 0;
    background: linear-gradient(135deg, #f8fafc 0%, #e9ecef 100%);
}

.resources-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 40px;
    margin-top: 50px;
}

.resource-card {
    background: var(--white);
    border-radius: var(--border-radius);
    padding: 40px;
    box-shadow: var(--shadow);
    transition: var(--transition);
    position: relative;
    overflow: hidden;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.resource-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-hover);
}

.resource-card-blog {
    border-top: 4px solid var(--primary);
}

.resource-card-directions {
    border-top: 4px solid var(--accent);
}

.resource-icon {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, var(--primary-light), #e6f7ff);
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 25px;
    color: var(--primary);
    font-size: 24px;
}

.resource-card-directions .resource-icon {
    background: linear-gradient(135deg, #fff0e6, #fff7f0);
    color: var(--accent);
}

.resource-title {
    font-size: 1.5rem;
    margin-bottom: 15px;
    color: var(--text-dark);
}

.resource-description {
    color: var(--text-light);
    margin-bottom: 25px;
    line-height: 1.6;
}

.resource-links {
    list-style: none;
    margin-bottom: 30px;
    flex-grow: 1;
}

.resource-links li {
    margin-bottom: 10px;
    position: relative;
    padding-left: 15px;
}

.resource-links li::before {
    content: '•';
    color: var(--primary);
    position: absolute;
    left: 0;
    top: 0;
}

.resource-card-directions .resource-links li::before {
    color: var(--accent);
}

.resource-links a {
    color: var(--text-dark);
    text-decoration: none;
    transition: var(--transition);
    font-size: 0.95rem;
}

.resource-links a:hover {
    color: var(--primary);
    padding-left: 5px;
}

.resource-card-directions .resource-links a:hover {
    color: var(--accent);
}

.resource-cta {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--primary);
    text-decoration: none;
    font-weight: 600;
    transition: var(--transition);
    margin-top: auto;
}

.resource-card-directions .resource-cta {
    color: var(--accent);
}

.resource-cta:hover {
    gap: 12px;
    color: var(--primary-dark);
}

.resource-card-directions .resource-cta:hover {
    color: #e55a2b;
}

/* Responsive Design */
@media (max-width: 768px) {
    .resources-grid {
        grid-template-columns: 1fr;
        gap: 30px;
    }

    .resource-card {
        padding: 30px;
    }

    .resource-icon {
        width: 50px;
        height: 50px;
        font-size: 20px;
        margin-bottom: 20px;
    }

    .resource-title {
        font-size: 1.3rem;
    }
}

@media (max-width: 576px) {
    .resources-section {
        padding: 60px 0;
    }

    .resource-card {
        padding: 25px;
    }

    .resource-links li {
        margin-bottom: 8px;
    }

    .resource-links a {
        font-size: 0.9rem;
    }
}

/* Анимации */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.resource-card {
    animation: fadeInUp 0.6s ease-out;
}

.resource-card:nth-child(1) {
    animation-delay: 0.1s;
}

.resource-card:nth-child(2) {
    animation-delay: 0.2s;
}

/* Expert Section Styles - обновленная версия */
.expert-section {
    padding: 80px 0;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    position: relative;
    overflow: hidden;
}

.expert-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #0088cc, #006699, #0088cc);
}

.expert-card {
    max-width: 1100px;
    margin: 40px auto 0;
    background: white;
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.expert-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.12);
}

.expert-photo {
    position: relative;
    background: linear-gradient(135deg, #0088cc 0%, #006699 100%);
    padding: 40px;
    text-align: center;
    min-height: 250px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.expert-photo img {
    width: 200px;
    height: 200px;
    border-radius: 50%;
    border: 6px solid white;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
    object-fit: cover;
    object-position: center;
}

.expert-content {
    padding: 40px;
    flex: 1;
}

.expert-header {
    margin-bottom: 25px;
    padding-bottom: 20px;
    border-bottom: 2px solid #e9ecef;
}

.expert-name {
    font-size: 1.8rem;
    color: #333;
    margin-bottom: 5px;
    font-weight: 700;
}

.expert-role {
    font-size: 1.1rem;
    color: #0088cc;
    font-weight: 600;
    margin: 0;
}

.expert-story {
    line-height: 1.7;
    color: #555;
    margin-bottom: 30px;
}

.expert-story p {
    margin-bottom: 20px;
    font-size: 1.05rem;
}

.expert-story p:last-child {
    margin-bottom: 0;
}

.expert-story strong {
    color: #0088cc;
    font-weight: 600;
}

.expert-quote {
    background: linear-gradient(135deg, #f8fdff 0%, #e6f7ff 100%);
    border-left: 4px solid #0088cc;
    padding: 20px 25px;
    border-radius: 10px;
    position: relative;
    margin-top: 30px;
}

.expert-quote i.fa-quote-left {
    position: absolute;
    top: 12px;
    left: 12px;
    font-size: 1.3rem;
    color: #0088cc;
    opacity: 0.3;
}

.expert-quote i.fa-quote-right {
    position: absolute;
    bottom: 12px;
    right: 12px;
    font-size: 1.3rem;
    color: #0088cc;
    opacity: 0.3;
}

.expert-quote p {
    font-size: 1.05rem;
    line-height: 1.6;
    color: #333;
    font-style: italic;
    margin: 0;
    padding: 0 20px;
    text-align: center;
}

/* Responsive Design */
@media (min-width: 768px) {
    .expert-card {
        flex-direction: row;
    }

    .expert-photo {
        width: 300px;
        min-width: 300px;
        padding: 40px;
    }

    .expert-content {
        padding: 40px 45px;
    }
}

@media (max-width: 767px) {
    .expert-section {
        padding: 50px 0;
    }

    .expert-photo {
        min-height: 220px;
        padding: 30px;
    }

    .expert-photo img {
        width: 160px;
        height: 160px;
    }

    .expert-content {
        padding: 30px 25px;
    }

    .expert-name {
        font-size: 1.6rem;
    }

    .expert-story p {
        font-size: 1rem;
    }

    .expert-quote p {
        font-size: 1rem;
        padding: 0 10px;
    }

    .expert-quote {
        padding: 18px 20px;
    }
}

@media (max-width: 480px) {
    .expert-photo {
        min-height: 200px;
        padding: 25px;
    }

    .expert-photo img {
        width: 140px;
        height: 140px;
        border-width: 4px;
    }

    .expert-content {
        padding: 25px 20px;
    }

    .expert-name {
        font-size: 1.5rem;
    }

    .expert-role {
        font-size: 1rem;
    }

    .expert-quote {
        padding: 15px 18px;
        margin-top: 25px;
    }

    .expert-quote p {
        font-size: 0.95rem;
        padding: 0;
    }
}

/* Анимация для появления */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.expert-card {
    animation: fadeInUp 0.6s ease-out;
}