/* =============================================
   MyRecoveryPal - Main Stylesheet
   Brand Colors: Blue (#1e4d8b, #4db8e8) + Green (#52b788)
   ============================================= */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    /* Primary Brand Colors */
    --primary-dark: #1e4d8b;
    /* Dark blue from logo */
    --primary-light: #4db8e8;
    /* Light blue/cyan from logo */
    --accent-green: #52b788;
    /* Green from checkmark */

    /* Legacy support (keeping old variable names) */
    --primary-color: #1e4d8b;
    --secondary-color: #4db8e8;
    --accent-color: #52b788;

    /* Text Colors */
    --text-dark: #2c3e50;
    --text-light: #ffffff;
    --text-muted: #6B7280;

    /* Background Colors */
    --bg-light: #f8f9fa;
    --bg-lighter: #ffffff;
    --bg-gray: #F3F4F6;

    /* Shadows */
    --shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    --shadow-hover: 0 5px 20px rgba(0, 0, 0, 0.15);
    --shadow-lg: 0 10px 40px rgba(0, 0, 0, 0.1);

    /* Gradients - Updated to match brand */
    --gradient-primary: linear-gradient(135deg, #1e4d8b 0%, #4db8e8 60%, #52b788 100%);
    --gradient-secondary: linear-gradient(135deg, #1e4d8b 0%, #4db8e8 100%);
    --gradient-accent: linear-gradient(135deg, #4db8e8 0%, #52b788 100%);

    /* Borders */
    --border-radius: 12px;
    --border-radius-lg: 15px;
    --border-radius-xl: 20px;
}

/* Typography */
body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    line-height: 1.6;
    color: var(--text-dark);
    background: var(--bg-light);
}

h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    color: var(--primary-dark);
    font-weight: 600;
    line-height: 1.2;
}

a {
    color: var(--primary-light);
    text-decoration: none;
    transition: color 0.3s ease;
}

a:hover {
    color: var(--primary-dark);
}

/* Common Page Headers - Unified Style */
.page-header,
.blog-header,
.resources-header,
.category-header,
.educational-resources-header,
.support-header,
.journal-header,
.community-header,
.profile-header,
.dashboard-header,
.milestones-header,
.stats-header,
.prompts-header,
.entries-header,
.hero-section {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif !important;
    background: var(--gradient-primary) !important;
    padding: 100px 0 50px;
    color: white;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.page-header h1,
.blog-header h1,
.resources-header h1,
.category-header h1,
.educational-resources-header h1,
.support-header h1,
.entries-header h1,
.hero-section h1 {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif !important;
    font-size: 2.5rem;
    color: white !important;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
    margin-bottom: 0.5rem;
}

.page-header p,
.blog-header p,
.resources-header p,
.category-header p,
.educational-resources-header p,
.support-header p,
.hero-section p {
    font-size: 1.1rem;
    color: rgba(255, 255, 255, 0.95) !important;
    max-width: 600px;
    margin: 0 auto;
}

/* Animated Background Pattern for Headers */
.page-header::before,
.blog-header::before,
.resources-header::before,
.category-header::before,
.educational-resources-header::before,
.support-header::before {
    content: '';
    position: absolute;
    width: 150%;
    height: 150%;
    top: -25%;
    left: -25%;
    background-image:
        radial-gradient(circle at 20% 80%, rgba(255, 255, 255, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(255, 255, 255, 0.08) 0%, transparent 50%);
    animation: float-bg 20s ease-in-out infinite;
}

@keyframes float-bg {

    0%,
    100% {
        transform: translate(0, 0);
    }

    50% {
        transform: translate(-20px, -20px);
    }
}

/* Buttons - Unified Styles */
.btn,
.button,
.btn-primary,
.btn-success,
.cta-button,
.search-button,
.download-button {
    padding: 0.75rem 1.5rem;
    background: var(--accent-green);
    color: white;
    border: none;
    border-radius: 50px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-block;
    text-align: center;
}

.btn:hover,
.button:hover,
.btn-primary:hover,
.btn-success:hover,
.cta-button:hover,
.search-button:hover,
.download-button:hover {
    background: #45a675;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(82, 183, 136, 0.3);
    color: white;
}

.btn-secondary {
    background: var(--primary-light);
}

.btn-secondary:hover {
    background: var(--primary-dark);
}

/* Cards - Unified Styles */
.card,
.resource-card,
.blog-card,
.feature-card,
.stat-card,
.meeting-card,
.service-card {
    background: white;
    border-radius: var(--border-radius-lg);
    padding: 1.5rem;
    box-shadow: var(--shadow);
    transition: all 0.3s ease;
}

.card:hover,
.resource-card:hover,
.blog-card:hover,
.feature-card:hover,
.stat-card:hover,
.meeting-card:hover,
.service-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-hover);
}

/* Crisis Banner - Consistent Style */
.crisis-banner {
    background: #FEE2E2;
    border: 2px solid #FCA5A5;
    border-radius: var(--border-radius);
    padding: 1.5rem;
    margin: 1.5rem auto;
    text-align: center;
    max-width: 1200px;
}

.crisis-banner h3,
.crisis-banner h4 {
    color: #DC2626;
    margin-bottom: 0.75rem;
}

/* Search Bars - Unified */
.search-section form,
.search-bar,
.search-container {
    display: flex;
    gap: 0.5rem;
    box-shadow: var(--shadow);
    border-radius: 50px;
    overflow: hidden;
    background: white;
    max-width: 600px;
    margin: 2rem auto;
}

.search-input,
input[type="search"] {
    flex: 1;
    border: none;
    padding: 0.75rem 1.5rem;
    font-size: 1rem;
    outline: none;
}

/* Resource Type Badges */
.resource-type,
.badge,
.tag,
.meeting-type-badge,
.attendance-badge {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
    background: var(--bg-gray);
    color: var(--text-dark);
}

/* Fix old purple gradients */
.gradient-text {
    background: var(--gradient-secondary) !important;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* Statistics and Numbers */
.stat-number,
.big-number {
    background: var(--gradient-secondary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-weight: 700;
}

/* Mobile Responsive */
@media (max-width: 768px) {

    .page-header h1,
    .blog-header h1,
    .resources-header h1,
    .category-header h1,
    .educational-resources-header h1,
    .support-header h1,
    .hero-section h1 {
        font-size: 2rem;
    }

    .page-header,
    .blog-header,
    .resources-header,
    .category-header,
    .educational-resources-header,
    .support-header,
    .hero-section {
        padding: 80px 0 40px;
    }
}