/* ============================================
   STYLE.CSS - Home page specific styles
   ============================================ */

/* ---------- Hero ---------- */
.hero {
    min-height: calc(70vh - 80px);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    background: #ffffff;
    padding: 20px 0;
    overflow: hidden;
}

.hero-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
    align-items: center;
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 10px;
}

.hero-video {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    max-width: 100%;
}

.hero-video video {
    width: 100%;
    max-width: 100%;
    height: auto;
    aspect-ratio: 16 / 9;
    border-radius: 24px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.06);
    border: 1px solid #e2e6ed;
    display: block;
    background: #f0f2f5;
    object-fit: cover;
}

.hero-content {
    text-align: right;
    width: 100%;
    max-width: 100%;
}

.hero-title {
    font-size: 3.2rem;
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 24px;
    color: #1e1e2f;
    word-wrap: break-word;
}
.hero-title span {
    background: linear-gradient(135deg, #ff6b6b, #feca57, #48dbfb);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-sub {
    font-size: 1.2rem;
    color: #4a4a5a;
    margin-bottom: 36px;
    max-width: 100%;
    word-wrap: break-word;
}

/* ---------- Section Shared ---------- */
.section {
    padding: 80px 0;
}

.section-header {
    text-align: center;
    margin-bottom: 50px;
}
.section-header p {
    color: #6a6a82;
    font-size: 1.05rem;
}

.section-title {
    font-size: 2.2rem;
    font-weight: 700;
    color: #1e1e2f;
    margin-bottom: 12px;
}

/* ---------- Trust Section ---------- */
.trust-section {
    background: #ffffff;
    padding: 70px 0;
    border-bottom: 1px solid #e2e6ed;
}

.trust-wrapper {
    display: flex;
    align-items: center;
    gap: 50px;
}

.trust-image {
    flex: 1;
    max-width: 45%;
}
.trust-image img {
    width: 100%;
    height: auto;
    border-radius: 30px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.08);
    border: 1px solid #e2e6ed;
}

.trust-content {
    flex: 1;
    text-align: right;
}

.trust-title {
    font-size: 2rem;
    font-weight: 700;
    color: #1e1e2f;
    margin-bottom: 20px;
    position: relative;
}
.trust-title::after {
    content: '';
    display: block;
    width: 60px;
    height: 4px;
    background: linear-gradient(90deg, #ff6b6b, #feca57);
    margin-top: 10px;
    border-radius: 4px;
}

.trust-text {
    font-size: 1.05rem;
    color: #4a4a5a;
    line-height: 1.9;
}

/* ---------- Portfolio (dark) ---------- */
.portfolio {
    background: #0b0c1a;
    position: relative;
    padding-top: 60px;
    padding-bottom: 60px;
    color: #ffffff;
    margin-top: -1px;
    overflow: visible;
}

.portfolio::before {
    content: '';
    position: absolute;
    top: -30px;
    left: 0;
    right: 0;
    height: 30px;
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1200 30' preserveAspectRatio='none'%3E%3Cpath d='M0,30 Q600,0 1200,30 L1200,30 L0,30 Z' fill='%230b0c1a'/%3E%3C/svg%3E") no-repeat;
    background-size: 100% 100%;
    pointer-events: none;
}

.portfolio::after {
    content: '';
    position: absolute;
    bottom: -30px;
    left: 0;
    right: 0;
    height: 30px;
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1200 30' preserveAspectRatio='none'%3E%3Cpath d='M0,0 Q600,30 1200,0 L1200,0 L0,0 Z' fill='%230b0c1a'/%3E%3C/svg%3E") no-repeat;
    background-size: 100% 100%;
    pointer-events: none;
}

.portfolio .section-title {
    color: #ffffff;
}
.portfolio .section-header p {
    color: #b0b8d0;
}

.portfolio-scroll-wrapper {
    overflow-x: auto;
    padding-bottom: 15px;
    scrollbar-width: none;
    -ms-overflow-style: none;
    position: relative;
}
.portfolio-scroll-wrapper::-webkit-scrollbar {
    display: none;
}

.portfolio-scroll-wrapper::after {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 60px;
    height: 100%;
    background: linear-gradient(to left, rgba(11, 12, 26, 0.95), transparent);
    pointer-events: none;
    z-index: 2;
}

.portfolio-grid-horizontal {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 30px;
}

.portfolio-card {
    width: 250px;
    flex-shrink: 0;
    border-radius: 24px;
    overflow: hidden;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.4);
    border: 2px solid transparent;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    cursor: default;
}
.portfolio-card:hover {
    transform: translateY(-8px) scale(1.02);
    border-color: #ff6b6b;
    box-shadow: 0 16px 50px rgba(255, 107, 107, 0.25);
}

.portfolio-image {
    aspect-ratio: 3 / 4;
    width: 100%;
    overflow: hidden;
}
.portfolio-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.portfolio-title {
    text-align: center;
    padding: 16px 10px;
    font-size: 1.1rem;
    font-weight: 600;
    color: #ffffff;
    margin: 0;
    border-top: 2px solid rgba(255,255,255,0.1);
    transition: background 0.3s;
}

.card-1 .portfolio-image {
    background: linear-gradient(135deg, #ff6b6b, #ee5a24);
}
.card-1 .portfolio-title {
    background: #1a1b2e;
}

.card-2 .portfolio-image {
    background: linear-gradient(135deg, #48dbfb, #0abde3);
}
.card-2 .portfolio-title {
    background: #0f1a2e;
}

.card-3 .portfolio-image {
    background: linear-gradient(135deg, #feca57, #ff9f43);
}
.card-3 .portfolio-title {
    background: #1e1a2e;
}

.card-4 .portfolio-image {
    background: linear-gradient(135deg, #a29bfe, #6c5ce7);
}
.card-4 .portfolio-title {
    background: #1a0e2e;
}

/* ---------- Videos (بخش ویدیوهای صفحه اصلی) ---------- */
.videos {
    background: #ffffff;
    position: relative;
    padding: 80px 0;
    border-bottom: 1px solid #e2e6ed;
}

.videos-scroll-wrapper {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.videos-scroll-container {
    overflow-x: auto;
    padding: 10px 0 20px 0;
    scrollbar-width: none;
    -ms-overflow-style: none;
    width: 100%;
}
.videos-scroll-container::-webkit-scrollbar {
    display: none;
}

.videos-grid-horizontal {
    display: flex;
    gap: 30px;
    padding: 0 10px;
    flex-wrap: nowrap;
    justify-content: flex-start;
}

/* کارت‌های ویدیو در صفحه هوم - عرض ثابت مناسب */
.videos-grid-horizontal .video-card-link {
    flex: 0 0 320px;
    width: 320px;
    max-width: 320px;
}

.videos-more-btn {
    margin-top: 25px;
    text-align: center;
}

/* ---------- Blog (dark purple) ---------- */
.blog {
    background: #1a0e2e;
    position: relative;
    padding-top: 60px;
    padding-bottom: 70px;
    color: #ffffff;
    margin-top: -1px;
    overflow: hidden;
}

.blog-top-decoration {
    position: absolute;
    top: -2px;
    left: 0;
    right: 0;
    height: 40px;
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1200 40' preserveAspectRatio='none'%3E%3Cpath d='M0,40 Q150,0 300,40 T600,40 T900,40 T1200,40 L1200,40 L0,40 Z' fill='%231a0e2e'/%3E%3C/svg%3E") no-repeat;
    background-size: 100% 100%;
    pointer-events: none;
    z-index: 1;
}

.blog-top-decoration::after {
    content: '';
    position: absolute;
    bottom: 6px;
    left: 50%;
    transform: translateX(-50%);
    width: 120px;
    height: 3px;
    background: linear-gradient(90deg, transparent, #feca57, #ff6b6b, #feca57, transparent);
    border-radius: 4px;
    opacity: 0.6;
}

.blog .section-title {
    color: #ffffff;
}
.blog .section-header p {
    color: #c4b0d8;
}

.blog-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
    position: relative;
    z-index: 2;
}

.blog-card-link {
    display: block;
    text-decoration: none;
    color: inherit;
    border-radius: 20px;
    transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275), box-shadow 0.3s ease;
}
.blog-card-link:hover {
    transform: translateY(-10px) scale(1.01);
    box-shadow: 0 20px 50px rgba(255, 107, 107, 0.15), 0 8px 30px rgba(0, 0, 0, 0.3);
}

.blog-card {
    background: #ffffff;
    border-radius: 20px;
    overflow: hidden;
    border: none;
    display: flex;
    flex-direction: column;
    position: relative;
    height: 100%;
}

.blog-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #ff6b6b, #feca57, #48dbfb, #ff6b6b);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.blog-card-link:hover .blog-card::before {
    opacity: 1;
}

.blog-card-image {
    aspect-ratio: 16 / 9;
    width: 100%;
    overflow: hidden;
    background: linear-gradient(135deg, #d5dbe8, #b8c0d8);
}

.blog-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.blog-card-link:hover .blog-card-image img {
    transform: scale(1.05);
}

.blog-title {
    font-size: 1.15rem;
    font-weight: 700;
    color: #1a142b;
    padding: 18px 22px 22px;
    margin: 0;
    line-height: 1.5;
    flex-grow: 1;
}

.blog-more-btn {
    text-align: center;
    margin-top: 30px;
    position: relative;
    z-index: 2;
}

.blog-more-btn .btn-outline {
    color: #ffffff !important;
    border-color: rgba(255,255,255,0.3);
}
.blog-more-btn .btn-outline:hover {
    border-color: #ff6b6b;
    color: #ff6b6b !important;
    background: rgba(255, 107, 107, 0.1);
}

/* ---------- Testimonial ---------- */
@keyframes subtlePulse {
    0%   { opacity: 0.7; transform: scale(1); }
    50%  { opacity: 1;   transform: scale(1.03); }
    100% { opacity: 0.7; transform: scale(1); }
}

.testimonial {
    background: #f8f9fc;
    padding: 70px 0;
    border-bottom: 1px solid #e2e6ed;
}

.testimonial-grid {
    display: flex;
    justify-content: center;
    gap: 25px;
    flex-wrap: wrap;
    max-width: 800px;
    margin: 0 auto;
}

.testimonial-card {
    background: #ffffff;
    border-radius: 20px;
    padding: 25px 20px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.04);
    border: 1px solid #e2e6ed;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    flex: 0 1 320px;
    max-width: 100%;
}
.testimonial-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.08);
}

.testimonial-card-text:first-of-type {
    font-weight: 600;
    color: #1e1e2f;
    display: inline-block;
    animation: subtlePulse 1.8s infinite ease-in-out;
    transform-origin: center;
}

.testimonial-card.played .testimonial-card-text:first-of-type {
    animation: none;
    opacity: 1;
    transform: scale(1);
}

.testimonial-voice {
    width: 100%;
    margin-bottom: 15px;
}
.testimonial-voice audio {
    width: 100%;
    outline: none;
}
.testimonial-voice audio::-webkit-media-controls-panel {
    background: #f0f2f5;
}

.testimonial-card-text {
    font-size: 0.95rem;
    color: #3d3d4a;
    line-height: 1.7;
    margin: 0;
}

/* ---------- SEO Section ---------- */
.seo-section {
    background: #f4f6f9;
    padding: 60px 0 80px;
}

.seo-wrapper {
    max-width: 820px;
    margin: 0 auto;
    background: #ffffff;
    padding: 36px 40px;
    border-radius: 20px;
    border: 1px solid #e2e6ed;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.seo-title {
    text-align: center;
    margin-bottom: 20px;
}

.seo-text {
    max-height: 4.8em;
    overflow: hidden;
    transition: max-height 0.5s ease;
    line-height: 1.8;
    color: #1e1e2f;
    font-size: 1rem;
}
.seo-text.expanded {
    max-height: 2000px;
}

.seo-toggle {
    margin-top: 20px;
    background: transparent;
    border: 1px solid #c5c9d9;
    color: #1e1e2f;
    padding: 8px 28px;
    border-radius: 40px;
    cursor: pointer;
    font-family: inherit;
    font-size: 0.95rem;
    transition: all 0.3s;
}
.seo-toggle:hover {
    border-color: #ff6b6b;
    color: #ff6b6b;
}

/* ---------- Responsive (Home specific) ---------- */
@media (max-width: 992px) {
    .hero-container {
        padding: 0 15px;
        gap: 25px;
    }
    .hero-title {
        font-size: 2.8rem;
    }
    .hero-sub {
        font-size: 1.1rem;
    }
    .blog-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .trust-wrapper {
        gap: 30px;
    }
    .trust-image {
        max-width: 40%;
    }
    .testimonial-card {
        flex: 0 1 280px;
    }

    /* کارت‌های ویدیو در صفحه هوم - تبلت */
    .videos-grid-horizontal .video-card-link {
        flex: 0 0 280px;
        width: 280px;
        max-width: 280px;
    }
    .videos-grid-horizontal {
        gap: 24px;
    }
}

@media (max-width: 768px) {
    .hero {
        padding: 30px 0;
        min-height: auto;
    }
    .hero-container {
        grid-template-columns: 1fr;
        gap: 25px;
        padding: 0 15px;
    }
    .hero-video {
        order: -1;
        width: 100%;
    }
    .hero-video video {
        max-width: 100%;
        aspect-ratio: 16 / 9;
        border-radius: 16px;
    }
    .hero-content {
        text-align: center;
        width: 100%;
    }
    .hero-title {
        font-size: 2.2rem;
    }
    .hero-sub {
        font-size: 1rem;
        margin-left: auto;
        margin-right: auto;
        max-width: 100%;
    }
    .section {
        padding: 50px 0;
    }
    .section-title {
        font-size: 1.8rem;
    }
    .blog-grid {
        grid-template-columns: 1fr;
        gap: 24px;
    }
    .portfolio-grid-horizontal {
        flex-wrap: nowrap;
        justify-content: flex-start;
        gap: 16px;
        padding-right: 4px;
    }
    .portfolio-card {
        width: 200px;
        flex-shrink: 0;
    }
    .portfolio-title {
        font-size: 0.95rem;
        padding: 12px 8px;
    }
    .portfolio-scroll-wrapper {
        overflow-x: auto;
        padding-bottom: 10px;
    }
    .portfolio-scroll-wrapper::after {
        width: 40px;
        background: linear-gradient(to left, rgba(11, 12, 26, 0.95), transparent);
    }
    .videos-scroll-container {
        padding: 10px 0 20px 0;
    }
    .seo-wrapper {
        padding: 24px 20px;
    }
    .blog-top-decoration {
        height: 30px;
    }
    .blog-top-decoration::after {
        width: 80px;
        bottom: 4px;
    }

    .trust-wrapper {
        flex-direction: column;
        gap: 30px;
    }
    .trust-image {
        max-width: 100%;
        order: 2;
    }
    .trust-content {
        order: 1;
        text-align: center;
    }
    .trust-title::after {
        margin: 10px auto 0;
    }

    .testimonial-card {
        flex: 0 0 100%;
        max-width: 400px;
        margin: 0 auto;
        width: 100%;
    }

    .trust-title {
        font-size: 1.6rem;
    }
    .trust-text {
        font-size: 0.95rem;
    }

    /* کارت‌های ویدیو در صفحه هوم - موبایل */
    .videos-grid-horizontal .video-card-link {
        flex: 0 0 280px;
        width: 280px;
        max-width: 280px;
    }
    .videos-grid-horizontal {
        gap: 20px;
        padding: 0 8px;
    }
}

@media (max-width: 420px) {
    .videos-grid-horizontal .video-card-link {
        flex: 0 0 260px;
        width: 260px;
        max-width: 260px;
    }
    .videos-grid-horizontal {
        gap: 16px;
        padding: 0 6px;
    }
}

@media (max-width: 320px) {
    .hero-title {
        font-size: 1.6rem;
    }
    .btn {
        padding: 8px 18px;
        font-size: 0.8rem;
    }
    .videos-grid-horizontal .video-card-link {
        flex: 0 0 220px;
        width: 220px;
        max-width: 220px;
    }
}

@media (max-width: 480px) {
    .hero-title {
        font-size: 1.8rem;
    }
    .hero-sub {
        font-size: 0.95rem;
    }
    .btn {
        padding: 10px 22px;
        font-size: 0.9rem;
    }
    .portfolio-card {
        width: 170px;
    }
    .portfolio-title {
        font-size: 0.85rem;
        padding: 10px 6px;
    }
    .seo-text {
        font-size: 0.9rem;
    }
}