/* css/wellbeing.css */

/* =========================================
   1. GLOBAL & VARIABLES
   ========================================= */
   :root {
    --mag-bg: #FDFCF8;
    --mag-card-bg: #ffffff;
    --mag-text: #4a5568;
    --mag-heading: #1a202c;
    --accent-blue: #3E5C9A;
    --deep-blue: #2A4068;
}

body {
    background-color: var(--mag-bg);
    /* Ensure body allows scrolling */
    overflow-x: hidden; 
}

/* =========================================
   2. HERO SECTION
   ========================================= */
   .mag-hero {
    position: relative;
    /* REDUCED: Changed from 70vh to 50vh (half screen height) */
    min-height: 100vh; 
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    background-color: var(--deep-blue);
    overflow: hidden;
    color: white;
    margin-top: 30px;
    /* ADJUSTED: More top padding to clear navbar, 
       and bottom padding to account for the overlapping cards */
    padding-top: 1400px; 
    padding-bottom: 300px;
}

.hero-container {
    position: relative;
    z-index: 10;
}

.mag-brand-tag {
    font-family: var(--font-sans);
    text-transform: uppercase;
    letter-spacing: 3px;
    font-size: 0.8rem; /* Slightly smaller */
    opacity: 0.9;
    margin-top: 15px;
    margin-bottom: 20px;
    display: block;
    color: #a3bffa;
}

.hero-title {
    font-family: var(--font-serif);
    /* REDUCED: Changed from 4rem to 3rem to fit the smaller space */
    font-size: 3rem; 
    line-height: 1.1;
    margin-bottom: 100px;
    color: white;
}
.hero-title em {
    font-family: var(--font-serif);
    font-style: italic;
    color: #dbeafe;
}

.hero-subtitle {
    font-family: var(--font-sans);
    font-size: 1.1rem; /* Reduced from 1.25rem */
    opacity: 0.9;
    max-width: 600px;
    margin: 0 auto;
    font-weight: 300;
    padding-bottom: 40px;
}
/* Mesh Gradient Blobs */
.mesh-blob {
    position: absolute;
    filter: blur(80px);
    z-index: 1;
    opacity: 0.6;
    animation: float 10s infinite alternate;
}
.blob-1 {
    top: -10%; left: -10%;
    width: 50vw; height: 50vw;
    background: #3E5C9A;
}
.blob-2 {
    bottom: -10%; right: -10%;
    width: 40vw; height: 40vw;
    background: #6b4c9a;
    animation-delay: -5s;
}

@keyframes float {
    0% { transform: translate(0, 0) scale(1); }
    100% { transform: translate(20px, 40px) scale(1.1); }
}

/* =========================================
   3. BENTO GRID LAYOUT
   ========================================= */
/* Update this too to prevent cards covering the text */
.mag-content {
    margin-top: 10px; /* Proper spacing below hero section */
    padding-bottom: 100px;
    position: relative;
    z-index: 20;
}
.bento-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
}

.mag-card {
    background: var(--mag-card-bg);
    border-radius: 16px;
    overflow: hidden;
    text-decoration: none;
    color: inherit;
    box-shadow: 0 10px 40px rgba(0,0,0,0.06);
    transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
    display: flex;
    flex-direction: column;
    border: 1px solid rgba(0,0,0,0.02);
}

.mag-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 50px rgba(0,0,0,0.12);
}

.card-img-wrap {
    position: relative;
    overflow: hidden;
    height: 250px;
}
.card-img-wrap img {
    width: 100%; height: 100%; object-fit: cover;
    transition: transform 0.6s ease;
}
.mag-card:hover .card-img-wrap img { transform: scale(1.05); }

.card-category {
    position: absolute; top: 15px; left: 15px;
    background: rgba(255,255,255,0.95);
    color: var(--deep-blue);
    padding: 6px 14px;
    border-radius: 30px;
    font-size: 0.7rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.5px;
    -webkit-backdrop-filter: blur(4px);
    backdrop-filter: blur(4px);
}

.card-text {
    padding: 30px;
    display: flex; flex-direction: column; flex-grow: 1;
}

.meta-top {
    font-size: 0.8rem; color: #999; margin-bottom: 12px;
}

.mag-card h2 {
    font-size: 1.5rem;
    font-family: var(--font-serif);
    margin-bottom: 10px;
    line-height: 1.25;
    color: var(--deep-blue);
}

.excerpt {
    font-size: 0.95rem;
    color: #666;
    line-height: 1.6;
    margin-bottom: 25px;
    flex-grow: 1;
}

.card-footer-link {
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--accent-blue);
    display: flex; align-items: center; gap: 8px;
    opacity: 0.8; transition: 0.3s;
}
.mag-card:hover .card-footer-link { opacity: 1; gap: 12px; }

/* FEATURED CARD */
.card-featured {
    grid-column: span 2;
    flex-direction: row;
}
.card-featured .card-img-wrap { width: 55%; height: auto; }
.card-featured .card-text { width: 45%; justify-content: center; padding: 50px; }
.card-featured h2 { font-size: 2.2rem; margin-bottom: 15px; }
.card-featured .excerpt { font-size: 1.05rem; }

/* =========================================
   4. ARTICLE READER PAGE
   ========================================= */
.reading-progress {
    position: fixed; top: 0; left: 0; height: 4px; background: var(--accent-blue);
    width: 0%; z-index: 9999;
}

.article-header-section {
    padding: 160px 0 60px 0;
    background-color: var(--mag-bg);
}

.back-link {
    display: inline-block; margin-bottom: 30px;
    color: #888; font-weight: 500; font-size: 0.9rem;
}
.back-link:hover { color: var(--accent-blue); transform: translateX(-5px); }

.article-category-tag {
    color: var(--accent-blue); font-weight: 700; text-transform: uppercase; letter-spacing: 2px; font-size: 0.8rem;
}

.article-main-title {
    font-size: 3.5rem; color: var(--deep-blue); margin: 15px 0; line-height: 1.15;
}

.article-main-subtitle {
    font-size: 1.5rem; color: #555; font-family: var(--font-serif); font-style: italic; max-width: 700px; margin: 0 auto;
}

.article-meta-row { margin-top: 40px; display: flex; justify-content: center; }
.meta-author { display: flex; align-items: center; gap: 15px; text-align: left; }
.author-avatar-placeholder { width: 50px; height: 50px; background: #e2e8f0; border-radius: 50%; display: flex; align-items: center; justify-content: center; color: #718096; font-size: 1.2rem; }
.author-name { display: block; font-weight: 700; color: var(--deep-blue); font-size: 0.95rem; }
.post-date { display: block; font-size: 0.85rem; color: #888; }

.article-container { max-width: 800px; margin: 0 auto 100px auto; }
.article-hero-image-wrapper { width: 100%; border-radius: 12px; overflow: hidden; margin-bottom: 50px; box-shadow: 0 15px 40px rgba(0,0,0,0.08); }
.article-hero-image-wrapper img { width: 100%; height: auto; display: block; }

.prose-content { font-size: 1.2rem; line-height: 1.8; color: #2d3748; font-family: 'Merriweather', serif; }
.prose-content p { margin-bottom: 30px; }
.prose-content h3 { margin-top: 60px; margin-bottom: 25px; font-size: 2rem; font-family: var(--font-sans); color: var(--deep-blue); font-weight: 700; letter-spacing: -0.5px; }
.prose-content blockquote { border-left: 4px solid var(--accent-blue); padding-left: 30px; margin: 50px 0; font-size: 1.6rem; font-family: var(--font-serif); font-style: italic; color: #555; }
.prose-content ul { padding-left: 20px; margin-bottom: 30px; }
.prose-content li { margin-bottom: 10px; }

.article-footer-interaction { margin-top: 80px; text-align: center; }
.interaction-buttons { display: flex; justify-content: center; gap: 20px; margin-top: 20px; }
.btn-interact { padding: 12px 35px; border-radius: 50px; border: 1px solid #e2e8f0; background: white; cursor: pointer; transition: 0.2s; font-size: 1rem; color: #4a5568; display: flex; align-items: center; gap: 8px; }
.btn-interact:hover { border-color: var(--accent-blue); color: var(--accent-blue); transform: translateY(-3px); }


/* Add to css/wellbeing.css */

.mag-card, 
.mag-card:hover {
    text-decoration: none !important;
    color: inherit; /* Keeps text color consistent */
}

/* =========================================
   5. RESPONSIVE
   ========================================= */
@media (max-width: 992px) {
    .bento-grid { grid-template-columns: 1fr 1fr; }
    .card-featured { grid-column: span 2; }
    .hero-title { font-size: 3rem; }
}

@media (max-width: 768px) {
    .bento-grid { grid-template-columns: 1fr; }
    .card-featured { grid-column: span 1; flex-direction: column; }
    .card-featured .card-img-wrap, .card-featured .card-text { width: 100%; }
    .hero-title { font-size: 2.5rem; }
    .article-main-title { font-size: 2.2rem; }
    .mag-content { margin-top: -50px; }
}
/* YourDOST Feature Grid */
.yd-features-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 25px;
    margin: 30px 0 40px;
}

.yd-feature-tile {
    background: #fff;
    border-radius: 12px;
    padding: 25px 20px;
    text-align: center;
    box-shadow: 0 5px 20px rgba(0,0,0,0.05);
    border-top: 3px solid #3E5C9A;
}

.yd-icon {
    font-size: 2rem;
    color: #3E5C9A;
    margin-bottom: 15px;
}

.yd-feature-tile h4 {
    font-family: 'Playfair Display', serif;
    color: #2A4068;
    margin-bottom: 10px;
    font-size: 1.1rem;
}

.yd-feature-tile p {
    font-size: 0.9rem;
    color: #666;
    line-height: 1.6;
}

/* =========================================
   ACTION BUTTONS (LIKE & SHARE)
   ========================================= */
.action-btn {
    background: none;
    border: 1px solid #ddd;
    padding: 10px 14px;
    cursor: pointer;
    border-radius: 6px;
    transition: all 0.3s ease;
    font-size: 0.9rem;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.action-btn:hover {
    background: #f5f5f5;
    border-color: #999;
    transform: translateY(-2px);
}

.action-btn.liked {
    background: #ffe0e6;
    border-color: #ff4757;
    color: #ff4757;
}

.action-btn.liked i {
    animation: likePopin 0.5s ease;
    color: #ff4757;
}

@keyframes likePopin {
    0% {
        transform: scale(0.8);
        opacity: 0;
    }
    50% {
        transform: scale(1.2);
    }
    100% {
        transform: scale(1);
        opacity: 1;
    }
}

/* YourDOST Steps */
.yd-steps-wrapper {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
    margin-top: 10px;
}

.yd-steps-card {
    background: #fff;
    border-radius: 12px;
    padding: 30px 25px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.05);
}

.yd-steps-card h3 {
    font-family: 'Playfair Display', serif;
    color: #2A4068;
    margin-bottom: 20px;
    font-size: 1.3rem;
}

.yd-steps-card h3 i {
    margin-right: 8px;
    color: #3E5C9A;
}

.yd-steps-list {
    padding-left: 20px;
    color: #444;
    line-height: 2;
    font-size: 0.95rem;
}

.yd-steps-list a {
    color: #3E5C9A;
    text-decoration: underline;
}

/* Responsive */
@media (max-width: 768px) {
    .yd-features-grid { grid-template-columns: 1fr; }
    .yd-steps-wrapper { grid-template-columns: 1fr; }
}

/* Toast Notifications */
.toast-notification {
    position: fixed;
    bottom: 30px;
    right: 30px;
    background: linear-gradient(135deg, #27ae60, #229954);
    color: white;
    padding: 18px 28px;
    border-radius: 12px;
    box-shadow: 0 15px 50px rgba(0, 0, 0, 0.3);
    font-weight: 700;
    font-size: 1rem;
    z-index: 9999;
    animation: slideInToast 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
    display: flex;
    align-items: center;
    gap: 14px;
    max-width: 350px;
    border-left: 5px solid #fff;
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
}

.toast-notification i {
    font-size: 1.4rem;
    animation: iconBounce 0.6s ease;
}

.toast-notification.fadeOut {
    animation: slideOutToast 0.5s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}

@keyframes slideInToast {
    from {
        transform: translateX(450px);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes slideOutToast {
    from {
        transform: translateX(0);
        opacity: 1;
    }
    to {
        transform: translateX(450px);
        opacity: 0;
    }
}

@keyframes iconBounce {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.2); }
}

@media (max-width: 768px) {
    .toast-notification {
        bottom: 20px;
        right: 20px;
        left: 20px;
        max-width: none;
    }
}
@media (max-width: 768px) {
    .mag-content {
        margin-top: 40px;
    }
}
