/* main.css - Shared styles for all pages */

:root {
    --primary-red: #cd3b26;
    --dark-red: #a82c1a;
    --light-red: #fdf2f0;
    --background: #fcf5f5;
    --text-dark: #1f2937;
    --text-light: #6b7280;
    --border: #e5e7eb;
    --card-bg: #ffffff;
    --footer-dark: #2c3e50;
}

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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    line-height: 1.6;
    color: var(--text-dark);
    background: var(--background);
    scrollbar-width: thin;
    scrollbar-color: var(--primary-red) var(--background);
}

/* Custom scrollbar */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: var(--background);
}

::-webkit-scrollbar-thumb {
    background: var(--primary-red);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--dark-red);
}

/* Header */
header {
    background: var(--card-bg);
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 1rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 1.5rem;
    font-weight: bold;
    color: var(--primary-red);
    text-decoration: none;
}

/* Desktop Navigation */
.nav-links {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.nav-links a {
    color: var(--text-dark);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease;
    padding: 0.5rem 0;
}

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

/* Dropdown */
.dropdown {
    position: relative;
}

.dropdown-toggle {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    font-weight: 500;
    color: var(--text-dark);
    transition: color 0.3s ease;
}

.dropdown-toggle:hover {
    color: var(--primary-red);
}

.dropdown-arrow {
    font-size: 0.7rem;
    transition: transform 0.3s ease;
    display: inline-block;
}

.dropdown:hover .dropdown-arrow {
    transform: rotate(180deg);
}

.dropdown-menu {
    position: absolute;
    top: 100%;
    left: 0;
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 0.5rem 0;
    min-width: 200px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s ease;
    z-index: 1001;
}

.dropdown:hover .dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.dropdown-menu a {
    display: block;
    padding: 0.75rem 1.5rem;
    border-bottom: 1px solid var(--border);
    font-weight: 500;
    color: var(--text-dark);
    text-decoration: none;
    transition: all 0.3s ease;
}

.dropdown-menu a:hover {
    background: var(--light-red);
    color: var(--primary-red);
}

.dropdown-menu a:last-child {
    border-bottom: none;
}

/* Auth Buttons */
.auth-buttons {
    display: flex;
    gap: 1rem;
    margin-left: 1rem;
}

.auth-btn {
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
    cursor: pointer;
    font-family: inherit;
    font-size: 0.9rem;
    display: inline-block;
    text-align: center;
    background: none;
    border: none;
    color: var(--text-dark);
    padding: 0.5rem 0;
}

.auth-btn:hover {
    color: var(--primary-red);
}

/* Burger Menu */
.burger {
    display: none;
    flex-direction: column;
    cursor: pointer;
    padding: 6px;
    background: none;
    border: none;
    width: 30px;
    height: 30px;
    position: relative;
    align-items: center;
    justify-content: center;
    z-index: 1002;
}

.burger-line {
    width: 20px;
    height: 2px;
    background: var(--text-dark);
    border-radius: 1px;
    transition: all 0.3s ease;
    transform-origin: center;
    margin: 2px 0;
}

.burger.active .burger-line:nth-child(1) {
    transform: rotate(45deg) translate(4px, 4px);
    background: var(--primary-red);
}

.burger.active .burger-line:nth-child(2) {
    opacity: 0;
}

.burger.active .burger-line:nth-child(3) {
    transform: rotate(-45deg) translate(4px, -4px);
    background: var(--primary-red);
}

/* Back to Top Button */
.back-to-top {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    background: var(--primary-red);
    color: white;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    font-size: 1.2rem;
    box-shadow: 0 4px 12px rgba(205, 59, 38, 0.3);
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: 999;
    border: none;
    cursor: pointer;
    font-weight: bold;
}

.back-to-top.visible {
    opacity: 1;
    visibility: visible;
}

.back-to-top:hover {
    background: var(--dark-red);
    transform: translateY(-3px);
}

/* Footer */
footer {
    background: var(--footer-dark);
    color: white;
    text-align: center;
    padding: 3rem 2rem;
    margin-top: 4rem;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
}

.footer-links {
    display: flex;
    justify-content: center;
    gap: 2rem;
    margin-bottom: 2rem;
    flex-wrap: wrap;
}

.footer-links a {
    color: white;
    text-decoration: none;
}

.footer-links a:hover {
    color: var(--light-red);
}

/* Pillar Badge Styles */
.post-pillar {
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 500;
    text-transform: capitalize;
}

.pillar-action {
    background: #e8f4fd;
    color: #1e88e5;
    border: 1px solid #bbdefb;
}

.pillar-community {
    background: #f3e5f5;
    color: #8e24aa;
    border: 1px solid #e1bee7;
}

.pillar-education {
    background: #e8f5e8;
    color: #43a047;
    border: 1px solid #c8e6c9;
}