/* =========================================
   ASTROLOGY TIPS PAGE - FINAL
========================================= */

/* --- 1. HERO SECTION (RESTORED TO ORIGINAL MAROON) --- */
.tips-hero {
    position: relative;
    padding: 100px 0 80px 0;
    background-color: var(--astro-primary); /* Original Maroon */
    color: white;
    overflow: hidden;
    border-bottom: 5px solid var(--astro-accent);
}

/* Rotating Mandala Background (UPDATED SIZE) */
.mandala-bg {
    position: absolute;
    top: 50%;
    left: 50%;
    /* INCREASED TO 1500px for Full Header Coverage */
    width: 1500px;
    height: 1500px;
    background-image: url('images/mandala.png'); 
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    transform: translate(-50%, -50%);
    opacity: 0.1; 
    animation: spin-mandala 60s linear infinite;
    z-index: 1;
}

/* Fallback pattern if image missing */
.mandala-bg:empty {
    background: radial-gradient(circle, var(--astro-accent) 2px, transparent 2.5px);
    background-size: 30px 30px;
}

@keyframes spin-mandala {
    0% { transform: translate(-50%, -50%) rotate(0deg); }
    100% { transform: translate(-50%, -50%) rotate(360deg); }
}

.hero-badge {
    display: inline-block;
    background: var(--astro-accent);
    color: var(--astro-primary);
    padding: 5px 15px;
    border-radius: 20px;
    font-weight: 800;
    font-size: 0.85rem;
    margin-bottom: 15px;
    letter-spacing: 1px;
    position: relative; z-index: 2; /* Ensure above mandala */
}

.tips-title {
    font-size: 3.5rem;
    font-weight: 900;
    color: #fff;
    text-shadow: 0 5px 15px rgba(0,0,0,0.3);
    margin-bottom: 10px;
    position: relative; z-index: 2;
}

.tips-sub {
    font-size: 1.2rem;
    color: #eee;
    max-width: 600px;
    margin: 0 auto;
    position: relative; z-index: 2;
}

/* --- 2. FILTER BUTTONS --- */
.tips-section {
    padding: 60px 0 100px 0;
    background-color: var(--astro-light);
}

.filter-container {
    display: flex;
    justify-content: center;
    gap: 10px;
    flex-wrap: wrap;
}

.filter-btn {
    background: transparent;
    border: 2px solid var(--astro-primary);
    color: var(--astro-primary);
    padding: 8px 25px;
    border-radius: 50px;
    font-weight: 700;
    text-transform: uppercase;
    transition: all 0.3s ease;
    font-size: 0.9rem;
}

.filter-btn:hover, .filter-btn.active {
    background: var(--astro-primary);
    color: var(--astro-accent);
    box-shadow: 0 5px 15px rgba(92, 0, 0, 0.2);
}

/* --- 3. NEW BOLD 3D CARDS (High Visibility) --- */
.tip-card-container {
    background-color: transparent;
    width: 100%;
    height: 380px; /* Taller for better layout */
    perspective: 1000px;
}

.tip-card-inner {
    position: relative;
    width: 100%;
    height: 100%;
    text-align: center;
    transition: transform 0.6s;
    transform-style: preserve-3d;
    box-shadow: 0 10px 25px rgba(92, 0, 0, 0.15);
    border-radius: 15px;
}

.tip-card-container:hover .tip-card-inner {
    transform: rotateY(180deg);
}

.tip-card-front, .tip-card-back {
    position: absolute;
    width: 100%;
    height: 100%;
    -webkit-backface-visibility: hidden;
    backface-visibility: hidden;
    border-radius: 15px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 30px;
    border: 3px solid var(--astro-primary); /* Thick Border */
}

/* FRONT: Bold & Contrast */
.tip-card-front {
    background: linear-gradient(145deg, #ffffff, #fffdf5);
    color: var(--astro-primary);
}

.tip-icon {
    font-size: 3.5rem;
    color: var(--astro-primary);
    margin-bottom: 15px;
    /* Gold Circle Behind Icon */
    background: var(--astro-accent);
    width: 80px; height: 80px;
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

/* Category Badge inside Card */
.tip-category {
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: var(--astro-primary);
    font-weight: 800;
    background: rgba(255, 215, 0, 0.3); /* Light Gold Badge */
    padding: 4px 12px;
    border-radius: 4px;
    margin-bottom: 15px;
}

.tip-title {
    font-size: 1.8rem;
    font-weight: 900;
    line-height: 1.3;
    color: #2c0000; /* Darker Maroon for Text */
    margin-bottom: 30px;
}

/* Button-like "Hover" instruction */
.flip-hint {
    position: absolute;
    bottom: 20px;
    font-size: 0.9rem;
    font-weight: 700;
    color: white;
    background: var(--astro-primary);
    padding: 8px 20px;
    border-radius: 50px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.2);
}

/* BACK: Readable Text */
.tip-card-back {
    background-color: var(--astro-primary);
    color: white;
    transform: rotateY(180deg);
    border-color: var(--astro-accent);
}

.tip-text {
    font-size: 1.1rem;
    line-height: 1.7;
    color: #fff;
    font-weight: 500;
}

/* Responsive Font Sizes */
@media (max-width: 768px) {
    .tips-title { font-size: 2.5rem; }
    /* Mobile: Reduce mandala size slightly */
    .mandala-bg { width: 800px; height: 800px; }
}