/* ==========================================================================
   Futuristic / Modern Advice Page Styles
   ========================================================================== */

:root {
    --adv-bg: #f8f9fc;
    --adv-white: rgba(255, 255, 255, 0.85);
    --adv-glass-bg: rgba(255, 255, 255, 0.65);
    --adv-glass-border: rgba(255, 255, 255, 0.4);
    --adv-primary: #1a73e8;
    --adv-primary-glow: rgba(26, 115, 232, 0.4);
    --adv-secondary: #0b1f33;
    --adv-accent: #fca311;
    --adv-text-dark: #1e293b;
    --adv-text-muted: #64748b;
    --adv-radius-lg: 24px;
    --adv-radius-md: 16px;
    --adv-shadow-soft: 0 10px 40px -10px rgba(0, 0, 0, 0.08);
    --adv-shadow-hover: 0 20px 40px -10px var(--adv-primary-glow);
    --adv-transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

body {
    background-color: var(--adv-bg);
}

/* Base Layout for the page */
.advice-page {
    padding-bottom: 80px;
    position: relative;
    overflow: hidden;
}

/* Add some futuristic background glow elements */
.advice-page::before {
    content: '';
    position: absolute;
    top: -10%;
    left: -10%;
    width: 50vw;
    height: 50vw;
    background: radial-gradient(circle, rgba(26, 115, 232, 0.1) 0%, transparent 70%);
    border-radius: 50%;
    z-index: -1;
    pointer-events: none;
}

.advice-page::after {
    content: '';
    position: absolute;
    bottom: -10%;
    right: -10%;
    width: 60vw;
    height: 60vw;
    background: radial-gradient(circle, rgba(252, 163, 17, 0.08) 0%, transparent 70%);
    border-radius: 50%;
    z-index: -1;
    pointer-events: none;
}

/* =========================================
   Hero Section
   ========================================= */
.advice-hero {
    padding: 80px 0 60px;
    text-align: center;
    position: relative;
    z-index: 10;
}

.advice-hero-content h1 {
    font-size: 3.5rem;
    font-weight: 800;
    color: var(--adv-secondary);
    background: linear-gradient(135deg, var(--adv-secondary) 0%, var(--adv-primary) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 20px;
    letter-spacing: -1px;
}

.advice-hero-content p {
    font-size: 1.25rem;
    color: var(--adv-text-muted);
    max-width: 600px;
    margin: 0 auto;
    line-height: 1.6;
}

/* =========================================
   Glassmorphism Category Tabs
   ========================================= */
.advice-categories {
    margin-bottom: 50px;
    position: relative;
    z-index: 10;
}

.category-tabs {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 15px;
    background: var(--adv-glass-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--adv-glass-border);
    padding: 10px;
    border-radius: 100px;
    max-width: fit-content;
    margin: 0 auto;
    box-shadow: var(--adv-shadow-soft);
}

.tab-btn {
    background: transparent;
    border: none;
    padding: 12px 30px;
    border-radius: 100px;
    font-family: inherit;
    font-weight: 700;
    font-size: 1rem;
    color: var(--adv-text-muted);
    cursor: pointer;
    transition: var(--adv-transition);
    position: relative;
    overflow: hidden;
    z-index: 1;
}

.tab-btn.active {
    color: #fff;
    background: var(--adv-primary);
    box-shadow: 0 4px 15px var(--adv-primary-glow);
}

.tab-btn:not(.active):hover {
    color: var(--adv-secondary);
    background: rgba(255, 255, 255, 0.5);
}

/* =========================================
   Advice Grid & Cards
   ========================================= */
.category-panel {
    display: none;
    animation: fadeUp 0.5s ease forwards;
}

.category-panel.active {
    display: block;
}

.category-panel h2 {
    font-size: 2rem;
    font-weight: 800;
    color: var(--adv-secondary);
    margin-bottom: 30px;
    text-align: center;
}

.advice-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 30px;
}

.advice-card {
    background: var(--adv-glass-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--adv-glass-border);
    border-radius: var(--adv-radius-lg);
    padding: 30px;
    position: relative;
    transition: var(--adv-transition);
    box-shadow: var(--adv-shadow-soft);
    display: flex;
    flex-direction: column;
    height: 100%;
    overflow: hidden;
}

/* Glowing line at the top of cards */
.advice-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: linear-gradient(90deg, var(--adv-primary), var(--adv-accent));
    opacity: 0;
    transition: var(--adv-transition);
}

.advice-card:hover {
    transform: translateY(-10px);
    box-shadow: var(--adv-shadow-hover);
    border-color: rgba(26, 115, 232, 0.2);
}

.advice-card:hover::before {
    opacity: 1;
}

.advice-icon-wrapper {
    width: 60px;
    height: 60px;
    border-radius: var(--adv-radius-md);
    background: rgba(26, 115, 232, 0.05);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.75rem;
    color: var(--adv-primary);
    margin-bottom: 20px;
    transition: var(--adv-transition);
}

.advice-card:hover .advice-icon-wrapper {
    background: var(--adv-primary);
    color: #fff;
    transform: scale(1.1) rotate(-5deg);
    box-shadow: 0 8px 15px var(--adv-primary-glow);
}

.advice-card h3 {
    font-size: 1.35rem;
    font-weight: 700;
    color: var(--adv-text-dark);
    margin-bottom: 15px;
    line-height: 1.4;
}

.advice-card .advice-text {
    color: var(--adv-text-muted);
    font-size: 1rem;
    line-height: 1.7;
    flex-grow: 1;
}

/* Basic styling for lists within the content if any */
.advice-card .advice-text ul {
    padding-right: 20px;
    margin-top: 10px;
}

.advice-card .advice-text li {
    margin-bottom: 8px;
}

@keyframes fadeUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* =========================================
   Responsive Adjustments
   ========================================= */
@media (max-width: 768px) {
    .advice-hero-content h1 {
        font-size: 2.2rem;
    }

    .category-tabs {
        border-radius: var(--adv-radius-md);
        padding: 10px;
        flex-wrap: nowrap;
        justify-content: flex-start;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        /* Smooth iOS scrolling */
        scrollbar-width: none;
        /* Hide scrollbar for Firefox */
    }

    .category-tabs::-webkit-scrollbar {
        display: none;
        /* Hide scrollbar for Chrome/Safari */
    }

    .tab-btn {
        flex: 0 0 auto;
        border-radius: 100px;
        padding: 10px 20px;
        font-size: 0.9rem;
        white-space: nowrap;
    }

    .advice-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .advice-card {
        padding: 20px;
    }
}