/* index.php specific styles */

/* Hero Section */
.hero {
    padding: 140px 48px 80px;
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: center;
}

.hero-title {
    font-size: 48px;
    font-weight: 800;
    line-height: 1.1;
    margin-bottom: 20px;
    color: #081427;
}

.hero-title span {
    color: #4281c8;
}

.hero-desc {
    font-size: 16px;
    color: #6B7280;
    line-height: 1.7;
    margin-bottom: 32px;
    max-width: 480px;
}

.hero-desc strong {
    color: #081427;
}

.hero-buttons {
    display: flex;
    gap: 12px;
    margin-bottom: 40px;
}

.hero-features {
    display: flex;
    gap: 24px;
}

.hero-feature {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: #6B7280;
}

.hero-feature svg {
    width: 18px;
    height: 18px;
    color: #4281c8;
}

.hero-preview {
    position: relative;
    animation: floatHero 6s ease-in-out infinite;
}

@keyframes floatHero {
    0% { transform: translateY(0px); }
    50% { transform: translateY(-20px); }
    100% { transform: translateY(0px); }
}

.hero-bg-glow {
    position: absolute;
    width: 90vw;
    max-width: 450px;
    height: 90vw;
    max-height: 450px;
    background: radial-gradient(circle, rgba(66, 129, 200, 0.25) 0%, rgba(66, 129, 200, 0) 70%);
    border-radius: 50%;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 0;
    pointer-events: none;
}

.hero-shape {
    position: absolute;
    width: 90vw;
    height: 90vw;
    max-width: 380px;
    max-height: 380px;
    background: linear-gradient(135deg, rgba(66, 129, 200, 0.15) 0%, rgba(200, 220, 227, 0.4) 100%);
    border-radius: 50%;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 0;
    animation: pulseShape 4s ease-in-out infinite;
}

@keyframes pulseShape {
    0% { transform: translate(-50%, -50%) scale(1); }
    50% { transform: translate(-50%, -50%) scale(1.05); }
    100% { transform: translate(-50%, -50%) scale(1); }
}

.hero-dots {
    position: absolute;
    width: 120px;
    height: 120px;
    background-image: radial-gradient(#4281c8 2.5px, transparent 2.5px);
    background-size: 20px 20px;
    z-index: 0;
    top: 0;
    right: 0;
    opacity: 0.3;
    animation: floatDots 10s linear infinite;
}

@keyframes floatDots {
    0% { transform: translateY(0px) rotate(0deg); }
    50% { transform: translateY(-15px) rotate(5deg); }
    100% { transform: translateY(0px) rotate(0deg); }
}

.hero-preview img {
    transform: perspective(800px) rotateY(-15deg);
    transition: transform 0.3s ease;
}

.hero-preview img:hover {
    transform: perspective(800px) rotateY(-5deg);
}

/* How It Works Section */
.how-it-works {
    padding: 80px 48px 140px;
    text-align: center;
    background: #ffffff;
    position: relative;
    overflow: hidden;
}

.hiw-ornament-1 {
    position: absolute;
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(200, 220, 227, 0.4) 0%, rgba(255, 255, 255, 0) 70%);
    top: -150px;
    left: -200px;
    z-index: 0;
    pointer-events: none;
}

.hiw-ornament-2 {
    position: absolute;
    width: 150px;
    height: 150px;
    background-image: radial-gradient(#4281c8 2px, transparent 2px);
    background-size: 20px 20px;
    bottom: 50px;
    right: -50px;
    opacity: 0.15;
    z-index: 0;
    pointer-events: none;
    border-radius: 50%;
    animation: floatDots 12s linear infinite reverse;
}

.hiw-ornament-3 {
    position: absolute;
    width: 80px;
    height: 80px;
    border: 6px solid rgba(66, 129, 200, 0.1);
    border-radius: 50%;
    top: 40%;
    left: 5%;
    z-index: 0;
    pointer-events: none;
    animation: pulseShape 6s ease-in-out infinite;
}

.hiw-ornament-4 {
    position: absolute;
    width: 100px;
    height: 100px;
    border: 4px solid rgba(200, 220, 227, 0.5);
    border-radius: 30% 70% 70% 30% / 30% 30% 70% 70%;
    bottom: 20%;
    left: -20px;
    z-index: 0;
    pointer-events: none;
    animation: morphShape 8s ease-in-out infinite;
}

@keyframes morphShape {
    0% { border-radius: 30% 70% 70% 30% / 30% 30% 70% 70%; transform: rotate(0deg); }
    50% { border-radius: 70% 30% 30% 70% / 70% 70% 30% 30%; transform: rotate(180deg); }
    100% { border-radius: 30% 70% 70% 30% / 30% 30% 70% 70%; transform: rotate(360deg); }
}

.how-it-works .section-title,
.how-it-works .section-subtitle,
.how-it-works .steps-grid {
    position: relative;
    z-index: 1;
}

.steps-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 40px;
    max-width: 1200px;
    margin: 0 auto;
}

.step-card {
    background: #ffffff;
    border-radius: 16px;
    border: 1px solid #c8dce3;
    text-align: center;
    overflow: visible;
    position: relative;
    transition: transform 0.2s, box-shadow 0.2s;
    margin-top: 24px;
    padding-top: 24px;
}

.step-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 32px rgba(0,0,0,0.06);
}

@media (min-width: 1025px) {
    .steps-grid .step-card:nth-child(1) {
        transform: rotate(-5deg) !important;
    }
    .steps-grid .step-card:nth-child(2) {
        transform: rotate(0deg) translateY(-16px) !important;
    }
    .steps-grid .step-card:nth-child(3) {
        transform: rotate(5deg) !important;
    }
    .steps-grid .step-card:hover {
        transform: translateY(-4px) rotate(0deg) !important;
    }
    .step-card:not(:last-child)::after {
        content: '';
        position: absolute;
        top: 50%;
        right: -40px;
        width: 40px;
        height: 20px;
        background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 40 20'%3E%3Cpath d='M0,10 Q10,0 20,10 T40,10' fill='none' stroke='%236B7280' stroke-width='2' stroke-dasharray='4,3'/%3E%3C/svg%3E");
        background-repeat: no-repeat;
        background-position: center;
        z-index: -1;
    }
}

.step-number {
    width: 48px;
    height: 48px;
    background: #4281c8;
    color: #fff;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    font-weight: 700;
    position: absolute;
    top: -24px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 10;
}

.step-image {
    width: 100%;
    position: relative;
    padding: 0;
    margin-top: 0;
}

.step-image img {
    width: 100%;
    height: auto;
    display: block;
}

.step-content {
    padding: 16px 16px 20px;
}

.step-title {
    font-size: 20px;
    font-weight: 700;
    color: #081427;
    margin-bottom: 8px;
}

.step-desc {
    font-size: 14px;
    color: #6B7280;
    line-height: 1.6;
}

/* Templates Section (homepage carousel) */
.templates {
    padding: 100px 0 120px;
    text-align: center;
    overflow: visible;
    background: #4281c8;
    position: relative;
    color: #fff;
}

.templates .section-title {
    color: #fff;
}

.templates .section-subtitle {
    color: rgba(255,255,255,0.8);
}

.templates-wave-top {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 80px;
    line-height: 0;
    transform: translateY(-100%);
    z-index: 10;
    overflow: hidden;
}

.templates-wave-bottom {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 80px;
    line-height: 0;
    transform: translateY(100%);
    z-index: 10;
    overflow: hidden;
}

.templates-wave-top svg, .templates-wave-bottom svg {
    position: absolute;
    left: 0;
    width: 200%;
    height: 100%;
}

.templates-wave-top svg {
    bottom: 0;
    transform-origin: bottom;
}

.templates-wave-bottom svg {
    top: 0;
    transform-origin: top;
}

.wave-bg {
    animation: waveMoveBg 14s linear infinite;
}

.wave-fg {
    animation: waveMoveFg 10s linear infinite;
}

@keyframes waveMoveBg {
    0% { transform: translateX(0) scaleY(1.2); }
    100% { transform: translateX(-50%) scaleY(1.2); }
}

@keyframes waveMoveFg {
    0% { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}

.templates-wrapper {
    position: relative;
    padding: 0 60px;
}

.templates-grid {
    display: flex;
    gap: 24px;
    overflow-x: auto;
    padding: 20px 0 40px;
    scroll-snap-type: x mandatory;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
}

.templates-grid::-webkit-scrollbar {
    display: none;
}

.template-card {
    min-width: 280px;
    max-width: 280px;
    height: 380px;
    scroll-snap-align: center;
    border: none;
    flex-shrink: 0;
}

.templates-footer {
    margin-top: 12px;
    display: flex;
    justify-content: center;
    position: relative;
    z-index: 1;
}

.btn-view-all {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(255,255,255,0.15);
    color: #fff;
    font-size: 14px;
    font-weight: 600;
    padding: 12px 28px;
    border: 1px solid rgba(255,255,255,0.3);
    border-radius: 10px;
    text-decoration: none;
    transition: all 0.3s ease;
    backdrop-filter: blur(4px);
}

.btn-view-all:hover {
    background: rgba(255,255,255,0.25);
    border-color: rgba(255,255,255,0.5);
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(0,0,0,0.15);
}

.template-preview {
    height: 380px;
    background: #c8dce3;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding: 16px;
    position: relative;
    overflow: hidden;
}

.template-preview img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: top;
    border-radius: 8px;
    transition: transform 0.3s ease;
}

.template-card:hover .template-preview img {
    transform: scale(1.03);
}

.template-btn {
    position: relative;
    overflow: hidden;
}

.template-btn svg:first-child {
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    fill: transparent;
    pointer-events: none;
}

.template-btn svg:first-child rect {
    stroke: #4281c8;
    stroke-width: 4;
    stroke-dasharray: 100;
    stroke-dashoffset: 100;
    transition: stroke-dashoffset 0.6s ease-in-out 0.1s;
}

.template-btn:hover svg:first-child rect {
    stroke-dashoffset: 0;
}

.template-zoom-btn {
    width: 40px;
    height: 40px;
}

.template-zoom-btn svg {
    width: 20px;
    height: 20px;
}

.nav-arrow {
    width: 48px;
    height: 48px;
    background: rgba(255,255,255,0.95);
    color: #4281c8;
    border: none;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 10;
    box-shadow: 0 4px 16px rgba(0,0,0,0.12);
    transition: all 0.2s;
}

.nav-arrow:hover {
    background: #ffffff;
    box-shadow: 0 6px 24px rgba(0,0,0,0.16);
    transform: translateY(-50%) scale(1.05);
}

.nav-arrow svg {
    width: 22px;
    height: 22px;
}

.nav-arrow.prev { left: 8px; }
.nav-arrow.next { right: 8px; }

/* FAQ Section Total Redesign */
.faq {
    padding: 140px 48px 100px;
    background: #ffffff;
    position: relative;
    overflow: hidden;
    text-align: center;
}

.faq-layout {
    max-width: 1200px;
    width: 100%;
    margin: 0 auto;
    position: relative;
    z-index: 1;
}

.faq-container {
    max-width: 700px;
    width: 100%;
    margin: 0 auto;
    text-align: left;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.faq-item {
    background: #ffffff;
    border-radius: 20px;
    border: 1px solid #e2e8f0;
    overflow: hidden;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 2px 8px rgba(0,0,0,0.02);
}

.faq-item:hover {
    border-color: #cbd5e1;
    box-shadow: 0 12px 24px rgba(0,0,0,0.04);
}

.faq-item.active {
    border-color: #4281c8;
    box-shadow: 0 12px 24px rgba(66, 129, 200, 0.1);
}

.faq-question {
    padding: 24px 28px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    cursor: pointer;
    font-size: 16px;
    font-weight: 600;
    color: #0f172a;
    transition: color 0.2s;
    user-select: none;
}

.faq-item.active .faq-question {
    color: #4281c8;
    padding-bottom: 12px;
}

.faq-question-left {
    display: flex;
    align-items: center;
    gap: 16px;
}

.faq-question-icon {
    width: 40px;
    height: 40px;
    background: #f1f5f9;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: all 0.3s;
}

.faq-item.active .faq-question-icon {
    background: rgba(66, 129, 200, 0.1);
}

.faq-question-icon svg {
    width: 20px;
    height: 20px;
    color: #64748b;
    transition: color 0.3s;
}

.faq-item.active .faq-question-icon svg {
    color: #4281c8;
}

.faq-question > svg {
    width: 20px;
    height: 20px;
    color: #94a3b8;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.faq-item.active .faq-question > svg {
    transform: rotate(180deg);
    color: #4281c8;
}

.faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.faq-item.active .faq-answer {
    max-height: 300px;
}

.faq-answer-content {
    padding: 0 28px 24px 84px;
    font-size: 15px;
    color: #475569;
    line-height: 1.7;
}





/* Responsive index */
@media (max-width: 1024px) {
    .hero {
        grid-template-columns: 1fr;
        text-align: center;
        padding: 160px 24px 60px;
    }
    .hero-desc {
        margin-left: auto;
        margin-right: auto;
    }
    .hero-buttons {
        justify-content: center;
    }
    .hero-features {
        justify-content: center;
    }
    .hero-preview {
        max-width: 600px;
        margin: 0 auto;
    }
    .hero-preview img {
        width: 100% !important;
        margin-left: 0 !important;
    }
    .steps-grid {
        grid-template-columns: 1fr;
        max-width: 500px;
        margin: 0 auto;
        gap: 48px;
    }
    .step-card::after {
        content: '';
        position: absolute;
        bottom: -48px;
        left: 50%;
        transform: translateX(-50%);
        width: 20px;
        height: 48px;
        background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 48'%3E%3Cpath d='M10,0 Q2,12 10,24 T10,48' fill='none' stroke='%236B7280' stroke-width='2' stroke-dasharray='4,3'/%3E%3C/svg%3E");
        background-repeat: no-repeat;
        background-position: center;
        background-size: contain;
    }
    .step-card:last-child::after {
        display: none;
    }
    .hero-title {
        font-size: 36px;
}

@media (max-width: 768px) {
    .hero {
        padding: 140px 20px 40px;
        gap: 32px;
    }
    .hero-preview {
        order: -1;
        width: 100%;
        display: flex;
        justify-content: center;
    }
    .hero-preview img {
        width: 100% !important;
        margin-left: 0 !important;
        transform: none;
    }
    .hero-title {
        font-size: 28px;
    }
    .hero-desc {
        font-size: 14px;
    }
    .hero-buttons {
        flex-direction: column;
        gap: 10px;
        margin-bottom: 24px;
    }
    .hero-buttons a {
        width: 100%;
        justify-content: center;
        padding: 12px 20px;
        font-size: 14px;
    }
    .hero-features {
        display: grid;
        grid-template-columns: repeat(3, 1fr);
        gap: 12px;
    }
    .hero-feature {
        font-size: 11px;
        flex-direction: column;
        text-align: center;
        gap: 4px;
    }
    .hero-feature svg {
        width: 20px;
        height: 20px;
    }
    .templates {
        padding: 60px 0;
        overflow: visible;
    }
    .templates-wave-top,
    .templates-wave-bottom {
        height: 40px;
    }
    .templates-wrapper {
        padding: 0 16px;
    }
    .templates-wrapper .nav-arrow {
        width: 36px;
        height: 36px;
    }
    .templates-wrapper .nav-arrow svg {
        width: 18px;
        height: 18px;
    }
    .templates-wrapper .nav-arrow.prev { left: 4px; }
    .templates-wrapper .nav-arrow.next { right: 4px; }
    .templates-grid {
        display: flex;
        gap: 16px;
        overflow-x: auto;
        padding: 10px 0 30px;
        scroll-snap-type: x mandatory;
    }
    .template-card {
        min-width: 240px;
        max-width: 240px;
        height: 320px;
        scroll-snap-align: center;
        border: none;
    }
    .template-preview {
        height: 320px;
    }
    .template-card:hover {
        transform: none;
        box-shadow: 0 4px 20px rgba(0,0,0,0.08);
    }
    .template-card.active {
        transform: scale(1.08);
    }
    .template-card.active:hover {
        transform: scale(1.08);
    }
    .template-overlay {
        opacity: 1;
        background: rgba(0,0,0,0.35);
        padding-bottom: 20px;
    }
    .template-btn {
        transform: translateY(0);
        width: auto;
        height: 32px;
        font-size: 12px;
        padding: 0 14px;
    }
    .template-zoom-btn {
        transform: scale(1);
        opacity: 1;
    }
    .card-outline {
        display: none;
    }
    .templates-footer {
        margin-top: 8px;
    }
    .btn-view-all {
        font-size: 13px;
        padding: 10px 22px;
    }
    .step-title {
        font-size: 18px;
        white-space: nowrap;
    }
    .how-it-works {
        padding: 60px 24px 100px;
    }
    .faq {
        padding: 80px 20px 60px;
    }
    .faq-question {
        padding: 20px 24px;
    }
    .faq-question-icon {
        display: none;
    }
    .faq-answer-content {
        padding: 0 24px 20px 24px;
    }
}
}