:root {
    --primary: #2563eb;
    --secondary: #1e293b;
    --accent: #f59e0b;
    --light: #f8fafc;
    --dark: #0f172a;
}

* { margin: 0; padding: 0; box-sizing: border-box; font-family: 'Segoe UI', sans-serif; }
body { background: var(--light); color: var(--secondary); line-height: 1.6; display: flex; flex-direction: column; min-height: 100vh; }

/* --- GLOBAL BUTTON STYLES --- */
.btn-primary, .btn-secondary {
    display: inline-block; /* Makes <a> tags behave like buttons */
    padding: 12px 28px;
    border-radius: 50px; /* Pill shape */
    font-weight: 600;
    text-decoration: none;
    text-align: center;
    transition: all 0.3s ease;
    cursor: pointer;
    border: none;
    font-size: 1rem;
}

/* 1. Primary Blue Button */
.btn-primary {
    background: var(--primary);
    color: white;
    box-shadow: 0 10px 20px rgba(37, 99, 235, 0.3);
}

.btn-primary:hover {
    background: #1d4ed8;
    transform: translateY(-3px);
    box-shadow: 0 15px 25px rgba(37, 99, 235, 0.4);
}

/* 2. Secondary White/Outline Button */
.btn-secondary {
    background: white;
    color: var(--primary);
    border: 2px solid #e2e8f0;
}

.btn-secondary:hover {
    border-color: var(--primary);
    color: var(--primary);
    transform: translateY(-3px);
    box-shadow: 0 10px 20px rgba(0,0,0,0.05);
}

/* --- 1. MODERN NAVIGATION (Glassmorphism) --- */
nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 5%;
    position: sticky;
    top: 0;
    z-index: 1000;
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.3);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.03);
    transition: all 0.3s ease;
}

.logo {
    font-size: 1.8rem;
    font-weight: 800;
    letter-spacing: -1px;
    background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    cursor: pointer;
}

.nav-links { display: flex; align-items: center; gap: 30px; }

.nav-links a {
    text-decoration: none;
    color: #475569;
    font-weight: 600;
    font-size: 1rem;
    position: relative;
    transition: color 0.3s ease;
}

.nav-links a:not(.btn-primary)::after {
    content: ''; position: absolute; width: 0; height: 2px; bottom: -4px; left: 0;
    background-color: var(--primary); transition: width 0.3s ease;
}
.nav-links a:not(.btn-primary):hover::after { width: 100%; }
.nav-links a:hover { color: var(--primary); }

.nav-links .btn-primary {
    background: var(--primary); color: white; padding: 10px 24px; border-radius: 50px;
    box-shadow: 0 4px 14px rgba(37, 99, 235, 0.3); transition: transform 0.2s, box-shadow 0.2s;
}
.nav-links .btn-primary:hover {
    transform: translateY(-2px); box-shadow: 0 6px 20px rgba(37, 99, 235, 0.4); background: #1d4ed8;
}

@media (max-width: 768px) {
    nav { flex-direction: column; gap: 15px; padding: 20px; }
    .nav-links { gap: 15px; flex-wrap: wrap; justify-content: center; }
}

/* --- 2. HERO SECTION (Animated) --- */
.hero-container {
    position: relative;
    background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
    min-height: 90vh;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

.blob {
    position: absolute; border-radius: 50%; filter: blur(50px); z-index: 1; opacity: 0.6;
    animation: float 10s infinite ease-in-out;
}
.blob-1 { top: -10%; left: -10%; width: 300px; height: 300px; background: #60a5fa; animation-delay: 0s; }
.blob-2 { bottom: -10%; right: -10%; width: 400px; height: 400px; background: #a78bfa; animation-delay: 2s; }
.blob-3 { top: 40%; left: 40%; width: 200px; height: 200px; background: #f472b6; animation-delay: 4s; }

.hero-content {
    position: relative; z-index: 10; max-width: 1200px; width: 90%;
    display: grid; grid-template-columns: 1fr 1fr; gap: 50px; align-items: center;
}

.hero-text h1 {
    font-size: 3.5rem; line-height: 1.2; margin-bottom: 20px;
    background: linear-gradient(to right, #1e293b, #2563eb);
    -webkit-background-clip: text; -webkit-text-fill-color: transparent;
}
.hero-text p { font-size: 1.2rem; color: #64748b; margin-bottom: 30px; }

.hero-visual { position: relative; height: 400px; display: flex; justify-content: center; align-items: center; }

.glass-card {
    background: rgba(255, 255, 255, 0.4); backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.5); padding: 20px;
    border-radius: 20px; box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
}

.float-icon {
    position: absolute; width: 80px; height: 80px; background: white;
    box-shadow: 0 10px 25px rgba(0,0,0,0.1); border-radius: 20px;
    display: flex; align-items: center; justify-content: center; font-size: 2.5rem;
    animation: floatIcon 6s ease-in-out infinite; z-index: 20;
}
.icon-1 { top: 0; left: 10%; animation-delay: 0s; }
.icon-2 { top: 40%; right: 0; animation-delay: 2s; }
.icon-3 { bottom: 0; left: 20%; animation-delay: 4s; }

@keyframes float { 0%, 100% { transform: translate(0, 0); } 50% { transform: translate(30px, -30px); } }
@keyframes floatIcon { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-20px); } }

@media (max-width: 768px) {
    .hero-content { grid-template-columns: 1fr; text-align: center; }
    .hero-visual { height: 300px; margin-top: 30px; }
    .hero-text h1 { font-size: 2.5rem; }
}

/* --- 3. AUTH & GENERAL FORMS --- */
.auth-container { max-width: 400px; margin: 50px auto; background: white; padding: 2rem; border-radius: 10px; box-shadow: 0 4px 6px rgba(0,0,0,0.1); }
input, select, textarea { width: 100%; padding: 10px; margin: 10px 0; border: 1px solid #cbd5e1; border-radius: 5px; font-size: 1rem; }
button { width: 100%; padding: 10px; background: var(--primary); color: white; border: none; border-radius: 5px; cursor: pointer; font-size: 1rem; transition: background 0.3s; }
button:hover { background: #1d4ed8; }

/* --- 4. COMMUNITY & CARDS --- */
.community-container { max-width: 800px; margin: 40px auto; padding: 0 20px; flex: 1; }
.post-box { background: white; padding: 20px; border-radius: 10px; box-shadow: 0 2px 4px rgba(0,0,0,0.05); margin-bottom: 20px; }
.post-card { background: white; border: 1px solid #e2e8f0; border-radius: 8px; padding: 20px; margin-bottom: 15px; }

.badge { display: inline-block; padding: 4px 12px; border-radius: 20px; font-size: 0.8rem; font-weight: bold; margin-bottom: 10px; }
.badge.achievement, .badge.active { background: #dcfce7; color: #166534; }
.badge.doubt, .badge.inactive { background: #fee2e2; color: #991b1b; }
.post-meta { font-size: 0.85rem; color: #64748b; margin-top: 10px; }

/* Community Images & Comments (NEW) */
.post-image { width: 100%; max-height: 400px; object-fit: cover; border-radius: 8px; margin-top: 10px; border: 1px solid #e2e8f0; }
.comment-section { background: #f8fafc; padding: 15px; margin-top: 15px; border-radius: 8px; border-top: 1px solid #e2e8f0; }
.single-comment { border-bottom: 1px solid #e2e8f0; padding: 8px 0; font-size: 0.95rem; }
.single-comment:last-child { border-bottom: none; }
.comment-form { display: flex; gap: 10px; margin-top: 15px; }
.comment-form input { margin: 0; padding: 8px; flex: 1; }
.comment-form button { width: auto; padding: 8px 20px; }

/* --- 5. DASHBOARD & JOBS/COURSES --- */
.dashboard-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 20px; margin-bottom: 40px; }
.stat-card {
    background: white; padding: 25px; border-radius: 10px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.05); border-left: 5px solid var(--primary);
    transition: transform 0.2s;
}
.stat-card:hover { transform: translateY(-5px); }
.stat-card h3 { font-size: 1.5rem; color: var(--dark); margin-bottom: 5px; }
.stat-card .btn-primary { display: inline-block; margin-top: 15px; text-decoration: none; text-align: center; }

/* --- 6. ADMIN TABLES --- */
.table-container { background: white; padding: 20px; border-radius: 10px; box-shadow: 0 2px 4px rgba(0,0,0,0.05); overflow-x: auto; }
table { width: 100%; border-collapse: collapse; margin-top: 10px; }
th, td { padding: 12px; text-align: left; border-bottom: 1px solid #e2e8f0; }
th { background-color: #f8fafc; color: #475569; font-weight: 600; }
.btn-delete { background: #ef4444; color: white; padding: 5px 10px; border-radius: 4px; text-decoration: none; font-size: 0.85rem; }
.btn-delete:hover { background: #dc2626; }

/* --- 7. FOOTER --- */
footer { margin-top: auto; } /* Pushes footer to bottom */

/* --- MODERN COMMUNITY FEED STYLES --- */

/* Feed Layout - Centered and Readable */
.community-container {
    max-width: 700px; /* Optimal reading width for feeds */
    margin: 40px auto;
    padding: 0 20px;
    width: 100%;
}

/* 1. The "Create Post" Box */
.post-box {
    background: white;
    padding: 25px;
    border-radius: 16px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.05);
    border: 1px solid #f1f5f9;
    margin-bottom: 30px;
    transition: transform 0.2s;
}

.post-box h3 {
    margin-bottom: 15px;
    font-size: 1.2rem;
    color: #334155;
}

.post-box textarea {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 15px;
    font-size: 1rem;
    transition: all 0.3s;
    resize: vertical;
}

.post-box textarea:focus {
    background: white;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
    outline: none;
}

/* 2. Post Card Design */
.post-card {
    background: white;
    border-radius: 16px;
    border: 1px solid #e2e8f0;
    padding: 0; /* Removing padding from container to handle inner sections */
    margin-bottom: 25px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.03);
    overflow: hidden;
}

.post-header {
    padding: 20px 20px 0 20px;
    display: flex;
    align-items: center;
    gap: 12px;
}

/* Generated Avatar Circle */
.avatar-circle {
    width: 45px;
    height: 45px;
    background: linear-gradient(135deg, #3b82f6, #2563eb);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 1.1rem;
    text-transform: uppercase;
    box-shadow: 0 4px 10px rgba(37, 99, 235, 0.2);
}

.user-info h4 {
    margin: 0;
    color: #1e293b;
    font-size: 1rem;
}

.user-info span {
    font-size: 0.8rem;
    color: #94a3b8;
}

.post-body {
    padding: 15px 20px;
}

.post-text {
    font-size: 1.05rem;
    color: #334155;
    line-height: 1.6;
    margin-bottom: 15px;
}

.post-image {
    width: 100%;
    height: auto;
    max-height: 500px;
    object-fit: cover;
    border-radius: 8px;
    border: 1px solid #f1f5f9;
    margin-top: 10px;
}

/* 3. Comment Section */
.comment-section {
    background: #f8fafc;
    border-top: 1px solid #f1f5f9;
    padding: 20px;
}

.comment-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 15px;
}

.single-comment {
    background: white;
    padding: 10px 15px;
    border-radius: 0 12px 12px 12px;
    border: 1px solid #e2e8f0;
    font-size: 0.95rem;
    position: relative;
    box-shadow: 0 1px 2px rgba(0,0,0,0.02);
}

.single-comment strong {
    color: var(--primary);
    display: block;
    font-size: 0.8rem;
    margin-bottom: 2px;
}

.comment-form {
    display: flex;
    gap: 10px;
}
.comment-form input {
    background: white;
    border-radius: 20px;
    padding: 10px 15px;
    border: 1px solid #cbd5e1;
}
.comment-form input:focus {
    outline: none;
    border-color: var(--primary);
}
.comment-form button {
    border-radius: 20px;
    padding: 8px 20px;
    font-weight: 600;
}