/* ============================================
   Plan My Retire - Stylesheet
   ============================================ */

/* Reset & Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    /* Color Palette - Financial Trust & Growth */
    --primary-color: #2563eb;      /* Trust blue */
    --secondary-color: #10b981;    /* Growth green */
    --accent-color: #f59e0b;       /* Gold accent */
    --dark: #1e293b;
    --light: #f8fafc;
    --gray: #64748b;
    --white: #ffffff;

    /* Typography */
    --font-main: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    --font-heading: 'Georgia', serif;

    /* Spacing */
    --spacing-xs: 0.5rem;
    --spacing-sm: 1rem;
    --spacing-md: 2rem;
    --spacing-lg: 4rem;
    --spacing-xl: 6rem;

    /* Border Radius */
    --radius-sm: 4px;
    --radius-md: 8px;
    --radius-lg: 16px;

    /* Shadows */
    --shadow-sm: 0 1px 3px rgba(0,0,0,0.1);
    --shadow-md: 0 4px 6px rgba(0,0,0,0.1);
    --shadow-lg: 0 10px 25px rgba(0,0,0,0.15);
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-main);
    line-height: 1.6;
    color: var(--dark);
    background-color: var(--light);
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 var(--spacing-md);
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    line-height: 1.2;
    margin-bottom: var(--spacing-sm);
}

h1 { font-size: 3rem; }
h2 { font-size: 2.5rem; }
h3 { font-size: 2rem; }
h4 { font-size: 1.5rem; }

/* Navigation */
.navbar {
    background-color: var(--white);
    box-shadow: var(--shadow-md);
    position: sticky;
    top: 0;
    z-index: 1000;
    padding: var(--spacing-sm) 0;
}

.navbar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-brand h1 {
    font-size: 1.75rem;
    color: var(--primary-color);
    margin-bottom: 0;
}

.tagline {
    font-size: 0.875rem;
    color: var(--gray);
    margin: 0;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: var(--spacing-md);
    align-items: center;
}

.nav-menu a {
    text-decoration: none;
    color: var(--dark);
    font-weight: 500;
    transition: color 0.3s;
}

.nav-menu a:hover {
    color: var(--primary-color);
}

.btn-signin {
    background-color: transparent;
    color: var(--primary-color) !important;
    padding: var(--spacing-xs) var(--spacing-md);
    border: 2px solid var(--primary-color);
    border-radius: var(--radius-md);
    transition: all 0.3s;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
}

.btn-signin:hover {
    background-color: var(--primary-color);
    color: var(--white) !important;
}

.btn-subscribe {
    background-color: var(--primary-color);
    color: var(--white) !important;
    padding: var(--spacing-xs) var(--spacing-md);
    border-radius: var(--radius-md);
    transition: background-color 0.3s;
}

.btn-subscribe:hover {
    background-color: #1d4ed8;
}

/* User Profile Icon & Dropdown */
#user-profile-container {
    position: relative;
    display: flex;
    align-items: center;
}

.user-profile-icon {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: var(--primary-color);
    border-radius: 50%;
    transition: background-color 0.3s, transform 0.2s;
}

.user-profile-icon:hover {
    background-color: rgba(37, 99, 235, 0.1);
    transform: scale(1.05);
}

.user-dropdown {
    position: absolute;
    top: 50px;
    right: 0;
    background: var(--white);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg);
    min-width: 280px;
    z-index: 1001;
    border: 1px solid rgba(0, 0, 0, 0.1);
}

.user-dropdown-header {
    padding: var(--spacing-md);
    background: linear-gradient(135deg, var(--primary-color) 0%, #1e40af 100%);
    color: var(--white);
    border-radius: var(--radius-md) var(--radius-md) 0 0;
}

.user-email {
    font-weight: 600;
    font-size: 0.95rem;
    margin-bottom: 0.5rem;
    word-break: break-word;
}

.user-status {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.status-badge {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.status-badge.premium {
    background: var(--secondary-color);
    color: var(--white);
}

.status-badge.canceling {
    background: #f59e0b;
    color: var(--white);
}

.status-badge.lifetime {
    background: var(--accent-color);
    color: var(--white);
}

.user-dropdown-divider {
    height: 1px;
    background: rgba(0, 0, 0, 0.1);
    margin: 0.5rem 0;
}

.user-dropdown a {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem var(--spacing-md);
    color: var(--dark);
    text-decoration: none;
    transition: background-color 0.2s;
    font-size: 0.95rem;
}

.user-dropdown a:hover {
    background-color: rgba(37, 99, 235, 0.05);
}

.user-dropdown a svg {
    flex-shrink: 0;
    opacity: 0.7;
}

/* User Profile Modal */
.user-profile-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    z-index: 2000;
    align-items: center;
    justify-content: center;
}

.user-profile-content {
    background: var(--white);
    border-radius: var(--radius-lg);
    max-width: 500px;
    width: 90%;
    max-height: 80vh;
    overflow-y: auto;
    box-shadow: var(--shadow-lg);
}

.user-profile-header {
    background: linear-gradient(135deg, var(--primary-color) 0%, #1e40af 100%);
    color: var(--white);
    padding: var(--spacing-md);
    border-radius: var(--radius-lg) var(--radius-lg) 0 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.user-profile-close {
    background: none;
    border: none;
    color: var(--white);
    font-size: 1.5rem;
    cursor: pointer;
    padding: 0;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: background-color 0.2s;
}

.user-profile-close:hover {
    background-color: rgba(255, 255, 255, 0.2);
}

.user-profile-body {
    padding: var(--spacing-md);
}

.profile-section {
    margin-bottom: var(--spacing-md);
}

.profile-section h3 {
    font-size: 1.1rem;
    color: var(--primary-color);
    margin-bottom: 0.75rem;
}

.profile-info-row {
    display: flex;
    justify-content: space-between;
    padding: 0.75rem 0;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.profile-info-label {
    font-weight: 600;
    color: var(--gray);
}

.profile-info-value {
    color: var(--dark);
    text-align: right;
}

/* Hero Section */
.hero {
    background: linear-gradient(135deg, var(--primary-color) 0%, #1e40af 100%);
    color: var(--white);
    padding: var(--spacing-xl) 0;
    text-align: center;
}

.hero-content h1 {
    font-size: 3.5rem;
    margin-bottom: var(--spacing-md);
    color: var(--white);
}

.hero-subtitle {
    font-size: 1.25rem;
    max-width: 800px;
    margin: 0 auto var(--spacing-lg);
    opacity: 0.95;
}

.hero-cta {
    display: flex;
    gap: var(--spacing-md);
    justify-content: center;
    margin-bottom: var(--spacing-lg);
}

.btn-primary, .btn-secondary {
    padding: var(--spacing-sm) var(--spacing-lg);
    border-radius: var(--radius-md);
    text-decoration: none;
    font-weight: 600;
    font-size: 1.125rem;
    transition: all 0.3s;
    display: inline-block;
}

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

.btn-primary:hover {
    background-color: #059669;
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.btn-secondary {
    background-color: transparent;
    color: var(--white);
    border: 2px solid var(--white);
}

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

.hero-stats {
    display: flex;
    justify-content: center;
    gap: var(--spacing-xl);
    margin-top: var(--spacing-lg);
}

.stat {
    display: flex;
    flex-direction: column;
}

.stat-number {
    font-size: 2.5rem;
    font-weight: bold;
    color: var(--accent-color);
}

.stat-label {
    font-size: 0.875rem;
    opacity: 0.9;
}

/* About Section */
.about {
    padding: var(--spacing-xl) 0;
    background-color: var(--white);
}

.about h2 {
    text-align: center;
    margin-bottom: var(--spacing-lg);
    color: var(--primary-color);
}

.about-content {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: var(--spacing-lg);
    align-items: start;
}

.about-text p {
    margin-bottom: var(--spacing-md);
    font-size: 1.125rem;
    color: var(--dark);
}

.about-benefits {
    background-color: var(--light);
    padding: var(--spacing-md);
    border-radius: var(--radius-lg);
    border-left: 4px solid var(--secondary-color);
}

.about-benefits h3 {
    color: var(--secondary-color);
    margin-bottom: var(--spacing-md);
}

.about-benefits ul {
    list-style: none;
}

.about-benefits li {
    padding: var(--spacing-xs) 0;
    font-size: 1.125rem;
}

/* Tools Section */
.tools {
    padding: var(--spacing-xl) 0;
    background-color: var(--light);
}

.tools h2 {
    text-align: center;
    margin-bottom: var(--spacing-sm);
    color: var(--primary-color);
}

.section-subtitle {
    text-align: center;
    color: var(--gray);
    font-size: 1.125rem;
    margin-bottom: var(--spacing-lg);
}

.tools-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: var(--spacing-md);
}

.tool-card {
    background-color: var(--white);
    padding: var(--spacing-md);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    transition: transform 0.3s, box-shadow 0.3s;
    position: relative;
}

.tool-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.tool-card.featured {
    border: 2px solid #2563eb;
    background: linear-gradient(135deg, #ffffff 0%, #f0f9ff 100%);
}

.tool-card.featured:hover {
    border-color: #1e40af;
    box-shadow: 0 20px 40px rgba(37, 99, 235, 0.2);
}

.tool-icon {
    font-size: 3rem;
    margin-bottom: var(--spacing-sm);
}

.tool-card h3 {
    color: var(--dark);
    margin-bottom: var(--spacing-sm);
}

.tool-card p {
    color: var(--gray);
    margin-bottom: var(--spacing-md);
}

.btn-tool {
    display: inline-block;
    padding: var(--spacing-xs) var(--spacing-md);
    background-color: var(--primary-color);
    color: var(--white);
    text-decoration: none;
    border-radius: var(--radius-md);
    transition: background-color 0.3s;
}

.btn-tool:hover {
    background-color: #1d4ed8;
}

.badge-free, .badge-premium {
    position: absolute;
    top: var(--spacing-sm);
    right: var(--spacing-sm);
    padding: 4px 12px;
    border-radius: var(--radius-sm);
    font-size: 0.75rem;
    font-weight: 600;
}

.badge-free {
    background-color: var(--secondary-color);
    color: var(--white);
}

.badge-premium {
    background-color: var(--accent-color);
    color: var(--white);
}

.badge-new {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: var(--white);
    animation: pulse-badge 2s ease-in-out infinite;
}

@keyframes pulse-badge {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

/* Articles Section */
.articles {
    padding: var(--spacing-xl) 0;
    background-color: var(--white);
}

.articles h2 {
    text-align: center;
    margin-bottom: var(--spacing-lg);
    color: var(--primary-color);
}

.articles-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: var(--spacing-md);
    margin-bottom: var(--spacing-lg);
}

.article-card {
    background-color: var(--light);
    padding: var(--spacing-md);
    border-radius: var(--radius-lg);
    border-top: 4px solid var(--primary-color);
    transition: transform 0.3s;
}

.article-card:hover {
    transform: translateY(-3px);
}

.article-category {
    display: inline-block;
    background-color: var(--primary-color);
    color: var(--white);
    padding: 4px 12px;
    border-radius: var(--radius-sm);
    font-size: 0.75rem;
    font-weight: 600;
    margin-bottom: var(--spacing-sm);
}

.article-card h3 {
    color: var(--dark);
    margin-bottom: var(--spacing-sm);
}

.article-card p {
    color: var(--gray);
    margin-bottom: var(--spacing-md);
}

.article-link {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 600;
    transition: color 0.3s;
}

.article-link:hover {
    color: #1d4ed8;
}

.articles-cta {
    text-align: center;
}

/* Subscription Section */
.subscription {
    padding: var(--spacing-xl) 0;
    background: linear-gradient(135deg, #f0f9ff 0%, #e0f2fe 100%);
}

.subscription h2 {
    text-align: center;
    margin-bottom: var(--spacing-sm);
    color: var(--primary-color);
}

.pricing-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: var(--spacing-md);
    margin-top: var(--spacing-lg);
}

.pricing-card {
    background-color: var(--white);
    padding: var(--spacing-lg);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    position: relative;
    transition: transform 0.3s;
}

.pricing-card:hover {
    transform: scale(1.05);
}

.pricing-card.featured {
    border: 3px solid var(--primary-color);
    transform: scale(1.05);
}

.pricing-badge {
    position: absolute;
    top: -15px;
    left: 50%;
    transform: translateX(-50%);
    background-color: var(--accent-color);
    color: var(--white);
    padding: 6px 20px;
    border-radius: var(--radius-md);
    font-weight: 600;
    font-size: 0.875rem;
}

.pricing-header {
    text-align: center;
    margin-bottom: var(--spacing-md);
    padding-bottom: var(--spacing-md);
    border-bottom: 2px solid var(--light);
}

.pricing-header h3 {
    color: var(--dark);
    margin-bottom: var(--spacing-sm);
}

.price {
    font-size: 3rem;
    font-weight: bold;
    color: var(--primary-color);
}

.price span {
    font-size: 1rem;
    color: var(--gray);
    font-weight: normal;
}

.pricing-features {
    list-style: none;
    margin-bottom: var(--spacing-lg);
}

.pricing-features li {
    padding: var(--spacing-xs) 0;
    color: var(--dark);
}

.btn-pricing {
    display: block;
    width: 100%;
    padding: var(--spacing-sm);
    background-color: var(--primary-color);
    color: var(--white);
    text-align: center;
    text-decoration: none;
    border-radius: var(--radius-md);
    font-weight: 600;
    transition: background-color 0.3s;
}

.btn-pricing:hover {
    background-color: #1d4ed8;
}

/* Resources Section */
.resources {
    padding: var(--spacing-xl) 0;
    background-color: var(--white);
}

.resources h2 {
    text-align: center;
    margin-bottom: var(--spacing-lg);
    color: var(--primary-color);
}

.resources-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: var(--spacing-md);
}

.resource-card {
    background-color: var(--light);
    padding: var(--spacing-md);
    border-radius: var(--radius-lg);
}

.resource-card h3 {
    color: var(--dark);
    margin-bottom: var(--spacing-md);
}

.resource-card ul {
    list-style: none;
}

.resource-card li {
    padding: var(--spacing-xs) 0;
    color: var(--gray);
    border-bottom: 1px solid #e2e8f0;
}

.resource-card li:last-child {
    border-bottom: none;
}

/* Footer */
.footer {
    background-color: var(--dark);
    color: var(--white);
    padding: var(--spacing-lg) 0 var(--spacing-md);
}

.footer-content {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: var(--spacing-lg);
    margin-bottom: var(--spacing-lg);
}

.footer h3, .footer h4 {
    margin-bottom: var(--spacing-md);
    color: var(--white);
}

.footer-about p {
    color: var(--gray);
}

.footer-links ul, .footer-legal ul {
    list-style: none;
}

.footer-links a, .footer-legal a {
    color: var(--gray);
    text-decoration: none;
    transition: color 0.3s;
}

.footer-links a:hover, .footer-legal a:hover {
    color: var(--white);
}

.social-links {
    display: flex;
    gap: var(--spacing-sm);
}

.social-links a {
    color: var(--gray);
    text-decoration: none;
    transition: color 0.3s;
}

.social-links a:hover {
    color: var(--white);
}

.footer-bottom {
    border-top: 1px solid #475569;
    padding-top: var(--spacing-md);
    text-align: center;
}

.footer-bottom p {
    color: var(--gray);
    margin-bottom: var(--spacing-sm);
}

.disclaimer {
    font-size: 0.875rem;
    max-width: 800px;
    margin: 0 auto;
}

/* Responsive Design */
@media (max-width: 968px) {
    .nav-menu {
        display: none; /* Add mobile menu later */
    }

    .hero-content h1 {
        font-size: 2.5rem;
    }

    .about-content {
        grid-template-columns: 1fr;
    }

    .hero-stats {
        flex-direction: column;
        gap: var(--spacing-md);
    }

    .footer-content {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 640px) {
    h1 { font-size: 2rem; }
    h2 { font-size: 1.75rem; }

    .tools-grid, .articles-grid, .pricing-grid {
        grid-template-columns: 1fr;
    }

    .footer-content {
        grid-template-columns: 1fr;
    }
}
