/* ═══════════════════════════════════════════════════════════════
   DIVINE PREMIUM COLLECTION — Shared Collection Page Styles
   Design System: Cream #FFFBF0, Saffron #E67E22, Gold #D4AF37, 
                  Maroon #5B1A18
   Fonts: 'Laila' (headings), 'Hind' (body)
   ═══════════════════════════════════════════════════════════════ */

/* ───────────── CSS Variables ───────────── */
.collection-page {
    --cp-cream: #FFFBF0;
    --cp-saffron: #E67E22;
    --cp-gold: #D4AF37;
    --cp-maroon: #5B1A18;
    --cp-maroon-light: #7B3F3C;
    --cp-brown-muted: #8B7355;
    --cp-card-shadow: 0 4px 20px rgba(91, 26, 24, 0.08), 0 1px 3px rgba(0,0,0,0.04);
    --cp-card-shadow-hover: 0 20px 50px rgba(91, 26, 24, 0.14), 0 0 0 2px rgba(212, 175, 55, 0.35);
    --cp-radius: 18px;
    --cp-transition: 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.collection-page {
    background: var(--cp-cream);
}


/* ═══════════════════════════════════════════
   HERO SECTION — Premium Glassmorphism
   ═══════════════════════════════════════════ */

.collection-page .hero-section {
    min-height: 50vh;
    padding: 100px 24px 80px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
    text-align: center;
    /* Default gradient (Aarti) */
    background: linear-gradient(135deg, #5B1A18 0%, #7B2D26 30%, #B8510D 65%, #E67E22 100%);
}

/* ── Mandala Concentric Ring Pattern ── */
.collection-page .hero-section::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background-image:
        radial-gradient(circle at center, transparent 18%, rgba(212,175,55,0.07) 18.5%, transparent 19%),
        radial-gradient(circle at center, transparent 28%, rgba(212,175,55,0.06) 28.5%, transparent 29%),
        radial-gradient(circle at center, transparent 38%, rgba(212,175,55,0.05) 38.5%, transparent 39%),
        radial-gradient(circle at center, transparent 48%, rgba(212,175,55,0.04) 48.5%, transparent 49%),
        radial-gradient(circle at center, transparent 58%, rgba(255,251,240,0.03) 58.5%, transparent 59%);
    animation: cp-mandala-spin 120s linear infinite;
    z-index: 1;
    pointer-events: none;
}

/* ── Subtle Grain Texture ── */
.collection-page .hero-section::after {
    content: '';
    position: absolute;
    inset: 0;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.04'/%3E%3C/svg%3E");
    opacity: 0.5;
    z-index: 2;
    pointer-events: none;
}

/* ── Glassmorphism Text Container ── */
.collection-page .hero-text {
    position: relative;
    z-index: 10;
    max-width: 760px;
    padding: 46px 56px;
    background: rgba(255, 251, 240, 0.07);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-radius: 24px;
    border: 1px solid rgba(212, 175, 55, 0.2);
    box-shadow:
        0 8px 32px rgba(0, 0, 0, 0.15),
        inset 0 1px 0 rgba(255, 251, 240, 0.1);
    animation: cp-hero-fadeIn 0.8s ease-out both;
}

/* ── Title & Subtitle ── */
.collection-page .divine-title {
    font-family: 'Laila', serif;
    font-size: 3.2rem;
    color: #FFFBF0 !important;
    background: none !important;
    -webkit-text-fill-color: #FFFBF0 !important;
    -webkit-background-clip: unset !important;
    background-clip: unset !important;
    text-shadow: 0 2px 20px rgba(0, 0, 0, 0.25);
    margin-bottom: 14px;
    animation: none !important;
    letter-spacing: 0.5px;
    line-height: 1.2;
}

.collection-page .divine-subtitle {
    font-family: 'Hind', sans-serif;
    font-size: 1.15rem;
    color: var(--cp-gold);
    margin-bottom: 0;
    animation: none !important;
    opacity: 0.95;
    font-weight: 400;
    letter-spacing: 0.3px;
    line-height: 1.5;
    text-shadow: 0 1px 8px rgba(0, 0, 0, 0.2);
}

/* ── Gold Shimmer Divider at Hero Bottom ── */
.collection-page .cp-hero-shimmer {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 3px;
    z-index: 10;
    background: linear-gradient(
        90deg,
        transparent 0%,
        rgba(212, 175, 55, 0) 15%,
        rgba(212, 175, 55, 0.8) 35%,
        #D4AF37 50%,
        rgba(212, 175, 55, 0.8) 65%,
        rgba(212, 175, 55, 0) 85%,
        transparent 100%
    );
    animation: cp-shimmer-move 4s ease-in-out infinite;
}


/* ═══════════════════════════════════════════
   PER-COLLECTION HERO GRADIENTS
   ═══════════════════════════════════════════ */

/* Aarti — Sacred Fire / Warm Saffron */
.collection-page .aarti-hero {
    background: linear-gradient(135deg, #5B1A18 0%, #7B2D26 25%, #B8510D 55%, #E67E22 85%, #F0A030 100%);
}

/* Chalisa — Deep Devotion / Saffron-Red */
.collection-page .chalisa-hero {
    background: linear-gradient(135deg, #5B1A18 0%, #8B1A1A 25%, #C0392B 50%, #E67E22 80%, #F5B041 100%);
}

/* Stotram — Ancient Temple / Indigo-Gold */
.collection-page .stotram-hero {
    background: linear-gradient(135deg, #0d1b2a 0%, #1b263b 25%, #2d3e50 55%, #415a77 80%, #547891 100%);
}
.collection-page .stotram-hero .divine-subtitle {
    color: #9BC8E8;
}

/* Mantra — Cosmic Vibration / Deep Purple */
.collection-page .mantra-hero {
    background: linear-gradient(135deg, #1a0533 0%, #2d1b69 25%, #4a1c8b 55%, #6c2ebf 80%, #8E44AD 100%);
}
.collection-page .mantra-hero .divine-subtitle {
    color: #D7BDE2;
}

/* Ashtakam — Temple Gold / Bronze */
.collection-page .ashtakam-hero {
    background: linear-gradient(135deg, #2C1810 0%, #3d2914 25%, #5c3d1e 50%, #8B6914 80%, #D4AF37 100%);
}


/* ═══════════════════════════════════════════
   ORNAMENTAL DIVIDER — Between Hero & Grid
   ═══════════════════════════════════════════ */

.collection-page .cp-ornament-divider {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    padding: 32px 20px 0;
    background: var(--cp-cream);
    user-select: none;
}

.collection-page .cp-ornament-divider .cp-ornament-line {
    flex: 1;
    max-width: 120px;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--cp-gold), transparent);
}

.collection-page .cp-ornament-divider .cp-ornament-symbol {
    font-size: 1.4rem;
    color: var(--cp-gold);
    line-height: 1;
}


/* ═══════════════════════════════════════════
   DEITY GRID SECTION — Premium Card Layout
   ═══════════════════════════════════════════ */

.collection-page .deity-grid {
    padding: 40px 24px 90px;
    background: var(--cp-cream);
    text-align: center;
}

.collection-page .section-title {
    font-family: 'Laila', serif;
    font-size: 2rem;
    color: var(--cp-maroon);
    margin-bottom: 12px;
    position: relative;
    display: inline-block;
    letter-spacing: 0.5px;
}

/* ── Sub-count Label ── */
.collection-page .cp-grid-count {
    display: block;
    font-family: 'Hind', sans-serif;
    font-size: 0.95rem;
    color: var(--cp-brown-muted);
    font-weight: 400;
    margin-bottom: 44px;
    letter-spacing: 0.5px;
}

/* ── Grid Layout ── */
.collection-page .grid-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
    gap: 28px;
    max-width: 1200px;
    margin: 0 auto;
}


/* ═══════════════════════════════════════════
   PREMIUM DEITY CARDS
   ═══════════════════════════════════════════ */

.collection-page .deity-card {
    background: #FFFFFF;
    border: 1.5px solid rgba(212, 175, 55, 0.15);
    border-radius: var(--cp-radius);
    overflow: hidden;
    text-decoration: none;
    color: #333;
    box-shadow: var(--cp-card-shadow);
    transition: all var(--cp-transition);
    position: relative;
    display: flex;
    flex-direction: column;
    will-change: transform, box-shadow;
}

/* ── Image Container ── */
.collection-page .deity-card picture {
    display: block;
    overflow: hidden;
    border-radius: var(--cp-radius) var(--cp-radius) 0 0;
    position: relative;
}

.collection-page .deity-card img {
    width: 100%;
    height: 230px;
    object-fit: cover;
    transition: transform 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    border-radius: 0;
}

/* ── Image Warm Gradient Overlay ── */
.collection-page .deity-card picture::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 60px;
    background: linear-gradient(to top, rgba(255,255,255,0.9) 0%, transparent 100%);
    pointer-events: none;
    z-index: 2;
}

/* ── Card Text Area ── */
.collection-page .deity-card h3 {
    font-family: 'Laila', serif;
    font-size: 1.05rem;
    color: var(--cp-maroon);
    margin: 10px 16px 16px;
    font-weight: 700;
    letter-spacing: 0.2px;
    line-height: 1.3;
    text-align: center;
}

.collection-page .deity-card-desc {
    font-family: 'Hind', sans-serif;
    font-size: 0.82rem;
    color: var(--cp-brown-muted);
    margin: -8px 16px 18px;
    font-style: normal;
    font-weight: 400;
    text-align: center;
    line-height: 1.4;
}

/* ── Card Hover Effects ── */
.collection-page .deity-card:hover {
    transform: translateY(-10px);
    box-shadow: var(--cp-card-shadow-hover);
    border-color: rgba(212, 175, 55, 0.4);
}

.collection-page .deity-card:hover img {
    transform: scale(1.08);
}

/* ── Card Active/Focus State ── */
.collection-page .deity-card:active {
    transform: translateY(-4px);
    transition-duration: 0.15s;
}

.collection-page .deity-card:focus-visible {
    outline: 3px solid var(--cp-gold);
    outline-offset: 3px;
}

/* ── Stagger Animation on Load ── */
.collection-page .deity-card {
    opacity: 0;
    transform: translateY(24px);
    animation: cp-card-appear 0.5s ease-out forwards;
}

.collection-page .deity-card:nth-child(1)  { animation-delay: 0.05s; }
.collection-page .deity-card:nth-child(2)  { animation-delay: 0.10s; }
.collection-page .deity-card:nth-child(3)  { animation-delay: 0.15s; }
.collection-page .deity-card:nth-child(4)  { animation-delay: 0.20s; }
.collection-page .deity-card:nth-child(5)  { animation-delay: 0.25s; }
.collection-page .deity-card:nth-child(6)  { animation-delay: 0.30s; }
.collection-page .deity-card:nth-child(7)  { animation-delay: 0.35s; }
.collection-page .deity-card:nth-child(8)  { animation-delay: 0.40s; }
.collection-page .deity-card:nth-child(9)  { animation-delay: 0.42s; }
.collection-page .deity-card:nth-child(10) { animation-delay: 0.44s; }
.collection-page .deity-card:nth-child(11) { animation-delay: 0.46s; }
.collection-page .deity-card:nth-child(12) { animation-delay: 0.48s; }
.collection-page .deity-card:nth-child(n+13) { animation-delay: 0.50s; }


/* ═══════════════════════════════════════════
   CATEGORY SUBTITLES — For Stotram & Ashtakam
   ═══════════════════════════════════════════ */

.collection-page .category-subtitle {
    font-family: 'Laila', serif;
    font-size: 1.25rem;
    color: var(--cp-maroon);
    margin: 40px 0 18px 0;
    padding: 10px 0 10px 18px;
    border-left: 4px solid var(--cp-gold);
    text-align: left;
    max-width: 1200px;
    margin-left: auto;
    margin-right: auto;
    letter-spacing: 0.3px;
    background: linear-gradient(90deg, rgba(212,175,55,0.06) 0%, transparent 60%);
    border-radius: 0 8px 8px 0;
}

.collection-page .category-subtitle:first-of-type {
    margin-top: 10px;
}


/* ═══════════════════════════════════════════
   FOOTER ENHANCEMENTS — Premium Warm Tones
   ═══════════════════════════════════════════ */

/* .collection-page .main-footer {
    background: linear-gradient(180deg, #2C1810 0%, #1a0f0a 100%);
}

.collection-page .footer-top-ornament {
    border-color: rgba(212, 175, 55, 0.3);
}

.collection-page .footer-title {
    color: var(--cp-gold);
} */


/* ═══════════════════════════════════════════
   BACK TO TOP FAB (Optional Enhancement)
   ═══════════════════════════════════════════ */

.collection-page .cp-back-top {
    position: fixed;
    bottom: 32px;
    right: 32px;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: var(--cp-maroon);
    color: var(--cp-gold);
    border: 2px solid rgba(212, 175, 55, 0.4);
    font-size: 1.3rem;
    cursor: pointer;
    z-index: 999;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 16px rgba(0,0,0,0.2);
    transition: all 0.3s ease;
    opacity: 0;
    pointer-events: none;
    transform: translateY(20px);
}

.collection-page .cp-back-top.visible {
    opacity: 1;
    pointer-events: all;
    transform: translateY(0);
}

.collection-page .cp-back-top:hover {
    background: var(--cp-gold);
    color: var(--cp-maroon);
    transform: translateY(-3px);
    box-shadow: 0 6px 24px rgba(212, 175, 55, 0.3);
}


/* ═══════════════════════════════════════════
   ANIMATIONS
   ═══════════════════════════════════════════ */

@keyframes cp-mandala-spin {
    from { transform: rotate(0deg); }
    to   { transform: rotate(360deg); }
}

@keyframes cp-shimmer-move {
    0%, 100% { opacity: 0.5; }
    50%      { opacity: 1; }
}

@keyframes cp-hero-fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px) scale(0.97);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

@keyframes cp-card-appear {
    from {
        opacity: 0;
        transform: translateY(24px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}


/* ═══════════════════════════════════════════
   RESPONSIVE DESIGN
   ═══════════════════════════════════════════ */

/* Tablet */
@media (max-width: 992px) {
    .collection-page .hero-section {
        min-height: 42vh;
        padding: 80px 20px 60px;
    }
    .collection-page .hero-text {
        padding: 36px 40px;
    }
    .collection-page .divine-title {
        font-size: 2.6rem;
    }
    .collection-page .divine-subtitle {
        font-size: 1.05rem;
    }
    .collection-page .grid-container {
        grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
        gap: 22px;
    }
    .collection-page .deity-card img {
        height: 200px;
    }
}

/* Mobile */
@media (max-width: 768px) {
    .collection-page .hero-section {
        min-height: 38vh;
        padding: 70px 16px 50px;
    }
    .collection-page .hero-text {
        padding: 28px 24px;
        border-radius: 18px;
    }
    .collection-page .divine-title {
        font-size: 2rem;
    }
    .collection-page .divine-subtitle {
        font-size: 0.95rem;
    }
    .collection-page .deity-grid {
        padding: 28px 16px 60px;
    }
    .collection-page .section-title {
        font-size: 1.6rem;
    }
    .collection-page .cp-grid-count {
        margin-bottom: 30px;
        font-size: 0.88rem;
    }
    .collection-page .grid-container {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
        gap: 16px;
        max-width: 100%;
    }
    .collection-page .deity-card img {
        height: 180px;
    }
    .collection-page .deity-card h3 {
        font-size: 0.95rem;
        margin: 8px 12px 14px;
    }
    .collection-page .deity-card-desc {
        font-size: 0.78rem;
        margin: -6px 12px 14px;
    }
    .collection-page .deity-card:hover {
        transform: translateY(-6px);
    }
    .collection-page .cp-ornament-divider {
        padding-top: 24px;
    }
    .collection-page .cp-ornament-divider .cp-ornament-line {
        max-width: 80px;
    }
    .collection-page .cp-back-top {
        bottom: 20px;
        right: 20px;
        width: 42px;
        height: 42px;
    }
}

/* Small Mobile */
@media (max-width: 480px) {
    .collection-page .hero-section {
        min-height: 34vh;
        padding: 60px 12px 40px;
    }
    .collection-page .hero-text {
        padding: 22px 18px;
        border-radius: 14px;
    }
    .collection-page .divine-title {
        font-size: 1.7rem;
    }
    .collection-page .divine-subtitle {
        font-size: 0.88rem;
    }
    .collection-page .grid-container {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }
    .collection-page .deity-card img {
        height: 150px;
    }
    .collection-page .deity-card h3 {
        font-size: 0.88rem;
        margin: 6px 10px 12px;
    }
}


/* ═══════════════════════════════════════════
   ACCESSIBILITY & REDUCED MOTION
   ═══════════════════════════════════════════ */

@media (prefers-reduced-motion: reduce) {
    .collection-page .hero-section::before {
        animation: none;
    }
    .collection-page .cp-hero-shimmer {
        animation: none;
        opacity: 0.7;
    }
    .collection-page .hero-text {
        animation: none;
    }
    .collection-page .deity-card {
        animation: none;
        opacity: 1;
        transform: none;
    }
    .collection-page .deity-card,
    .collection-page .deity-card img {
        transition-duration: 0.01s;
    }
}


/* ═══════════════════════════════════════════
   PRINT STYLES
   ═══════════════════════════════════════════ */

@media print {
    .collection-page .hero-section {
        min-height: auto;
        padding: 30px;
        background: #5B1A18 !important;
    }
    .collection-page .hero-section::before,
    .collection-page .hero-section::after,
    .collection-page .cp-hero-shimmer,
    .collection-page .cp-back-top {
        display: none;
    }
    .collection-page .deity-card {
        opacity: 1;
        transform: none;
        animation: none;
        break-inside: avoid;
    }
}
