/* ========================================
   AI TIPS SECTION
   Premium design with purple/violet theme
   ======================================== */

/* Main Section */
.ai-tips-section {
    padding: 6rem 2rem 5rem;
    background: var(--primary-bg);
    position: relative;
}

.tips-section-container {
    max-width: 1400px;
    margin: 0 auto;
    position: relative;
    z-index: 1;
}

/* Section Heading */
.tips-section-heading-wrapper {
    text-align: center;
    margin-bottom: 4rem;
    padding: 0 2rem;
    animation: fadeInDown 0.8s ease-out;
}

.tips-section-main-title {
    font-size: clamp(2rem, 5vw, 3rem);
    font-weight: 800;
    color: var(--text-primary);
    margin: 0 0 1rem 0;
    line-height: 1.2;
    letter-spacing: -0.02em;
    background: linear-gradient(135deg, #8b5cf6, #a855f7, #7c3aed);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.tips-section-main-subtitle {
    font-size: 1.1rem;
    color: var(--text-secondary);
    max-width: 700px;
    margin: 0 auto;
    line-height: 1.6;
}

/* Tips Grid - 3x3 Layout */
.tips-section-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
    margin-bottom: 3rem;
}

/* Tip Card */
.tip-section-card {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    overflow: hidden;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    opacity: 0;
    animation: fadeInUp 0.6s ease-out forwards;
}

.tip-section-card:nth-child(1) { animation-delay: 0.1s; }
.tip-section-card:nth-child(2) { animation-delay: 0.15s; }
.tip-section-card:nth-child(3) { animation-delay: 0.2s; }
.tip-section-card:nth-child(4) { animation-delay: 0.25s; }
.tip-section-card:nth-child(5) { animation-delay: 0.3s; }
.tip-section-card:nth-child(6) { animation-delay: 0.35s; }

.tip-section-card:hover {
    transform: translateY(-6px);
    border-color: #8b5cf6;
    box-shadow: 0 12px 40px rgba(139, 92, 246, 0.2);
}

/* Tip Image */
.tip-section-image {
    position: relative;
    width: 100%;
    padding-top: 60%; /* 5:3 aspect ratio */
    overflow: hidden;
    background: linear-gradient(135deg, rgba(139, 92, 246, 0.1), rgba(168, 85, 247, 0.1));
}

.tip-section-image img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.tip-section-card:hover .tip-section-image img {
    transform: scale(1.05);
}

/* Tip Overlay */
.tip-section-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(180deg, transparent 0%, rgba(0, 0, 0, 0.85) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.tip-section-card:hover .tip-section-overlay {
    opacity: 1;
}

.tip-section-view-btn {
    padding: 0.75rem 1.75rem;
    background: linear-gradient(135deg, #8b5cf6, #a855f7);
    color: #ffffff;
    border: none;
    border-radius: 8px;
    font-size: 0.95rem;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(139, 92, 246, 0.3);
    transform: translateY(10px);
}

.tip-section-card:hover .tip-section-view-btn {
    transform: translateY(0);
}

.tip-section-view-btn:hover {
    background: linear-gradient(135deg, #7c3aed, #9333ea);
    color: #ffffff;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(139, 92, 246, 0.5);
}

/* Category Badge */
.tip-section-category-badge {
    position: absolute;
    top: 1rem;
    left: 1rem;
    padding: 0.35rem 0.75rem;
    background: linear-gradient(135deg, #8b5cf6, #a855f7);
    color: #ffffff;
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 600;
    z-index: 2;
    box-shadow: 0 2px 8px rgba(139, 92, 246, 0.3);
}

/* Tool Badge */
.tip-section-tool-badge {
    position: absolute;
    top: 1rem;
    right: 1rem;
    padding: 0.35rem 0.75rem;
    background: rgba(0, 0, 0, 0.7);
    color: #ffffff;
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 600;
    z-index: 2;
    backdrop-filter: blur(4px);
}

/* Tip Content */
.tip-section-content {
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 1.1rem;
    flex: 1;
}

/* Tip Meta */
.tip-section-meta {
    display: flex;
    gap: 1.25rem;
    flex-wrap: wrap;
    font-size: 0.8rem;
    color: var(--text-secondary);
}

.tip-section-author,
.tip-section-date {
    display: flex;
    align-items: center;
    gap: 0.35rem;
}

a.tip-section-author {
    text-decoration: none;
    color: var(--text-secondary);
    transition: color 0.2s ease;
}

a.tip-section-author:hover {
    color: #8b5cf6;
}

.tip-section-author-icon,
.tip-section-date-icon {
    font-size: 0.9rem;
}

/* Tip Title */
.tip-section-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0;
    line-height: 1.3;
}

.tip-section-title a {
    color: inherit;
    text-decoration: none;
    transition: color 0.2s ease;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.tip-section-title a:hover {
    color: #8b5cf6;
}

/* Tip Excerpt */
.tip-section-excerpt {
    font-size: 0.95rem;
    line-height: 1.6;
    color: var(--text-secondary);
    margin: 0;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Tip Tags */
.tip-section-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 0.25rem;
}

.tip-section-tag {
    padding: 0.25rem 0.65rem;
    background: rgba(139, 92, 246, 0.1);
    color: #8b5cf6;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 500;
}

/* Read More Link */
.tip-section-read-more {
    display: inline-flex;
    align-items: center;
    width: fit-content;
    gap: 0.5rem;
    color: #8b5cf6;
    font-size: 0.9rem;
    font-weight: 600;
    text-decoration: none;
    margin-top: auto;
    padding: 0.4rem 1rem;
    border: 1.5px solid #8b5cf6;
    border-radius: 6px;
    background: transparent;
    transition: all 0.3s ease;
}

.tip-section-read-more:hover {
    color: #ffffff;
    background: linear-gradient(135deg, #8b5cf6, #7c3aed);
    border-color: transparent;
    gap: 0.75rem;
    box-shadow: 0 4px 15px rgba(139, 92, 246, 0.3);
}

.tip-section-read-more-arrow {
    transition: transform 0.2s ease;
}

.tip-section-read-more:hover .tip-section-read-more-arrow {
    transform: translateX(3px);
}

/* Footer */
.tips-section-footer {
    text-align: center;
    margin-top: 2rem;
}

.view-all-tips-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem 2.5rem;
    background: linear-gradient(135deg, #8b5cf6, #a855f7);
    color: #ffffff;
    border: none;
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 700;
    text-decoration: none;
    transition: all 0.3s ease;
    box-shadow: 0 6px 25px rgba(139, 92, 246, 0.3);
}

.view-all-tips-btn:hover {
    background: linear-gradient(135deg, #7c3aed, #9333ea);
    color: #ffffff;
    transform: translateY(-3px);
    box-shadow: 0 10px 35px rgba(139, 92, 246, 0.5);
}

.view-all-tips-btn .btn-arrow {
    font-size: 1.2rem;
    transition: transform 0.3s ease;
}

.view-all-tips-btn:hover .btn-arrow {
    transform: translateX(5px);
}

/* =======================================
   RESPONSIVE DESIGN
   ======================================= */

@media (max-width: 1024px) {
    .tips-section-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .ai-tips-section {
        padding: 4rem 1.5rem 3rem;
    }

    .tips-section-heading-wrapper {
        margin-bottom: 3rem;
        padding: 0 1rem;
    }

    .tips-section-main-title {
        font-size: 1.75rem;
    }

    .tips-section-main-subtitle {
        font-size: 1rem;
    }

    .tips-section-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .tip-section-title {
        font-size: 1.15rem;
    }

    .view-all-tips-btn {
        padding: 0.85rem 2rem;
        font-size: 0.95rem;
    }
}

@media (max-width: 480px) {
    .ai-tips-section {
        padding: 3.5rem 1rem 2.5rem;
    }

    .tip-section-content {
        padding: 1.25rem;
    }

    .tip-section-meta {
        gap: 1rem;
        font-size: 0.75rem;
    }

    .tip-section-title {
        font-size: 1.05rem;
    }

    .tip-section-excerpt {
        font-size: 0.9rem;
        -webkit-line-clamp: 2;
    }

    .tip-section-tags {
        display: none;
    }
}

/* =======================================
   ANIMATIONS
   ======================================= */

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* =======================================
   ACCESSIBILITY
   ======================================= */

@media (prefers-reduced-motion: reduce) {
    .tip-section-card,
    .tips-section-heading-wrapper {
        animation: none;
        opacity: 1;
    }
    
    .tip-section-card:hover {
        transform: none;
    }
}

.tip-section-view-btn:focus,
.tip-section-read-more:focus,
.view-all-tips-btn:focus,
.tip-section-title a:focus {
    outline: 2px solid #8b5cf6;
    outline-offset: 2px;
}
