/* main css file for my website */

@import url('https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@300;400;500;600;700&display=swap');

/* reset some default browser stuff */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* color variables so i dont have to copy paste hex codes */
:root {
    --blue: #0081cc;
    --brown: #332102;
    --cream: #fbf4eb;
    --white: #ffffff;
    --gray: #8a8a8a;
    --danger: #c0392b;
    --blue-dark: #006aaa;
    --blue-light: #e8f4fd;
    --cream-dark: #f0e8d8;
    --radius: 12px;
    --radius-sm: 8px;
}

body {
    font-family: 'Space Grotesk', sans-serif;
    background-color: var(--cream);
    color: #332102;
}

a {
    text-decoration: none;
    color: inherit;
}

ul {
    list-style: none;
}

/* login and register pages */

.auth-wrapper {
    display: flex;
    min-height: 100vh;
}

.auth-hero {
    flex: 1;
    background-color: #0081cc;
    padding: 60px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    overflow: hidden;
    position: relative;
}

/* decorative circles on the blue side */
.auth-hero::before {
    content: '';
    position: absolute;
    width: 300px;
    height: 300px;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.07);
    bottom: -80px;
    left: -80px;
}

.auth-hero::after {
    content: '';
    position: absolute;
    width: 240px;
    height: 240px;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.05);
    top: -60px;
    right: -60px;
}

.auth-hero .brand {
    font-size: 3rem;
    font-weight: 700;
    color: #332102;
    margin-bottom: 20px;
    position: relative;
    z-index: 1;
}

.auth-hero .tagline {
    font-size: 1.5rem;
    font-weight: 700;
    color: #332102;
    line-height: 1.4;
    position: relative;
    z-index: 1;
}

.auth-hero .sub-tagline {
    margin-top: 14px;
    font-size: 0.95rem;
    color: rgba(51, 33, 2, 0.7);
    line-height: 1.6;
    position: relative;
    z-index: 1;
}

.auth-panel {
    width: 460px;
    background-color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px;
}

.auth-card {
    width: 100%;
    max-width: 360px;
}

.auth-card h2 {
    font-size: 1.4rem;
    font-weight: 600;
    text-align: center;
    margin-bottom: 28px;
    color: #332102;
}

/* form stuff */
.form-group {
    margin-bottom: 18px;
}

.form-group label {
    display: block;
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 6px;
    color: #332102;
}

.form-group input {
    width: 100%;
    padding: 11px 14px;
    border: 2px solid #f0e8d8;
    border-radius: 8px;
    background-color: #fbf4eb;
    font-family: 'Space Grotesk', sans-serif;
    font-size: 0.9rem;
    color: #332102;
    outline: none;
}

.form-group input:focus {
    border-color: #0081cc;
}

.form-group input::placeholder {
    color: #8a8a8a;
}

.form-hint {
    font-size: 0.75rem;
    color: #8a8a8a;
    margin-top: 4px;
}

/* buttons */
.btn {
    padding: 11px 24px;
    border-radius: 50px;
    font-family: 'Space Grotesk', sans-serif;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    border: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

.btn-primary {
    background-color: #0081cc;
    color: white;
    width: 100%;
    padding: 13px;
    font-size: 0.95rem;
}

.btn-primary:hover {
    background-color: #006aaa;
}

.btn-outline {
    background-color: transparent;
    color: #0081cc;
    border: 2px solid #0081cc;
}

.btn-outline:hover {
    background-color: #0081cc;
    color: white;
}

.btn-danger {
    background-color: #c0392b;
    color: white;
}

.btn-danger:hover {
    background-color: #a93226;
}

.btn-ghost {
    background: none;
    color: #0081cc;
    padding: 8px 14px;
    font-size: 0.85rem;
}

.btn-ghost:hover {
    text-decoration: underline;
}

.auth-links {
    margin-top: 18px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
}

.auth-links a {
    font-size: 0.85rem;
    color: #0081cc;
}

.auth-links .register-row {
    font-size: 0.85rem;
    color: #8a8a8a;
}

.auth-links .register-row a {
    color: #0081cc;
    font-weight: 600;
}

.divider {
    width: 100%;
    height: 1px;
    background-color: #f0e8d8;
    margin: 20px 0;
}

/* top navbar */
/* top navbar */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 70px;
    background-color: #0081cc;
    
    /* Uses Grid to create three distinct zones */
    display: grid;
    grid-template-columns: 200px 1fr 200px; 
    
    align-items: center;
    padding: 0 20px;
    z-index: 999;
}

.navbar-brand {
    font-size: 1.7rem;
    font-weight: 700;
    color: #332102;
    /* ensure it stays in the left column */
    justify-self: start; 
}

/*  THE SEARCH BAR  */
.navbar-search {
    /* This makes the search bar container center itself inside the middle grid column */
    justify-self: center; 
    width: 100%;
    max-width: 600px; 
    position: relative;
    display: flex;
    align-items: center;
    margin: 0; 
}

.navbar-search input {
    width: 100%;
    height: 40px;
    padding: 0 18px 0 40px;
    border-radius: 50px;
    border: none;
    font-family: 'Space Grotesk', sans-serif;
    font-size: 0.9rem;
    color: #332102;
    outline: none;
    background-color: rgba(255, 255, 255, 0.95);
}

.navbar-actions {
    /* Force this container to hug the far right of the grid cell */
    justify-self: end; 
    
    display: flex;
    align-items: center;
    gap: 10px;
    /* Remove fixed width to allow it to sit flush against the right padding */
    width: auto; 
}
/* user profile circle in navbar */
.avatar {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    border: 2px solid rgba(255, 255, 255, 0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1rem;
    color: #332102;
    cursor: pointer;
    text-decoration: none;
    background-color: #f0e8d8;
    overflow: hidden;
}

.avatar:hover {
    border-color: white;
}

/* left sidebar nav */
.sidebar {
    position: fixed;
    top: 70px;
    left: 0;
    width: 200px;
    height: calc(100vh - 70px);
    background-color: var(--white);
    border-right: 1px solid #f0e8d8;
    padding: 24px 0;
    overflow-y: auto;
    z-index: 100;
}

.sidebar nav ul {
    padding: 0 10px;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.sidebar nav ul li a {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    border-radius: 8px;
    font-size: 0.95rem;
    font-weight: 500;
    color: #332102;
}

.sidebar nav ul li a:hover {
    background-color: #f0e8d8;
}

.sidebar nav ul li a.active {
    background-color: #0081cc;
    color: white;
    font-weight: 600;
}


/* main page content */
.main-content {
    margin-top: 70px;
    margin-left: 200px; 
    padding: 28px;
    min-height: calc(100vh - 70px);
    width: calc(100% - 200px); 

    justify-content: flex-start;
    flex-direction: column;
    align-items: stretch;
}

.page-title {
    font-size: 2rem;
    font-weight: 700;
    color: #332102;
    margin-bottom: 24px;
}

/* home page layout */
.home-layout {
    display: block;
    width: 100%;
    margin: 0 auto;
}

.feed-area {
    width: 100%;
    min-width: 0;
}
/* welcome message at top of home */
.welcome-banner {
    background-color: #0081cc;
    border-radius: 10px;
    padding: 24px 28px;
    margin-bottom: 22px;
    color: white;
}

.welcome-banner h2 {
    font-size: 1.3rem;
    font-weight: 700;
    margin-bottom: 5px;
}

.welcome-banner p {
    font-size: 0.875rem;
    opacity: 0.85;
}

/* post cards */
.post-card {
    background-color: white;
    border-radius: 10px;
    border: 1px solid #f0e8d8;
    padding: 18px 20px;
    margin-bottom: 14px;
}

.post-card:hover {
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
}

.post-card-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
}

.post-card-header .avatar-sm {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: 2px solid #0081cc;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    font-weight: 700;
    flex-shrink: 0;
    background-color: #e8f4fd;
    color: #0081cc;
}

.post-meta {
    flex: 1;
}

.post-meta .username {
    font-size: 0.875rem;
    font-weight: 600;
    color: #332102;
}

.post-meta .timestamp {
    font-size: 0.75rem;
    color: #8a8a8a;
}

.post-card h3 {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 6px;
    color: #332102;
}

.post-card p {
    font-size: 0.875rem;
    color: #555;
    line-height: 1.5;
}

.post-card-footer {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 12px;
    padding-top: 10px;
    border-top: 1px solid #f0e8d8;
    flex-wrap: wrap;
}

.post-action {
    font-size: 0.85rem;
    color: var(--gray); 
    cursor: pointer;
    padding: 6px 12px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--cream-dark); 
    background-color: var(--white);
    font-family: 'Space Grotesk', sans-serif;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    text-decoration: none;
    transition: all 0.2s ease;
}

.post-action:hover {
    color: var(--blue);
    background-color: var(--blue-light);
    border-color: var(--blue);
    transform: translateY(-1px); 
}

button.post-action {
    outline: none;
    height: 32px; 
}

/* right side widgets */
.widget-panel {
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.widget-card {
    background-color: white;
    border-radius: 10px;
    border: 1px solid #f0e8d8;
    padding: 18px;
}

.widget-card h3 {
    font-size: 0.85rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #0081cc;
    margin-bottom: 12px;
}

.widget-card .today-item {
    display: flex;
    gap: 8px;
    padding: 7px 0;
    border-bottom: 1px solid #f0e8d8;
    font-size: 0.85rem;
    line-height: 1.4;
    align-items: flex-start;
}

.widget-card .today-item:last-child {
    border-bottom: none;
}

.today-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background-color: #0081cc;
    margin-top: 5px;
    flex-shrink: 0;
}

/* create post bar */
.create-post-bar {
    background-color: white;
    border-radius: 10px;
    border: 1px solid #f0e8d8;
    padding: 12px 16px;
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 18px;
    cursor: pointer;
}

.create-post-bar:hover {
    border-color: #0081cc;
}

.create-post-bar input {
    flex: 1;
    border: none;
    background-color: #fbf4eb;
    border-radius: 50px;
    padding: 9px 16px;
    font-family: 'Space Grotesk', sans-serif;
    font-size: 0.875rem;
    color: #8a8a8a;
    cursor: pointer;
    outline: none;
}

/* profile page */
.profile-banner {
    width: 100%;
    height: 200px;
    border-radius: 10px;
    overflow: hidden;
    margin-bottom: -50px;
}

.profile-card {
    background-color: white;
    border-radius: 10px;
    border: 1px solid #f0e8d8;
    padding: 65px 24px 24px;
    position: relative;
}

.profile-avatar-wrap {
    position: absolute;
    top: -50px;
    left: 24px;
}

.profile-avatar {
    width: 95px;
    height: 95px;
    border-radius: 50%;
    background-color: #f0e8d8;
    border: 4px solid white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    font-weight: 700;
    color: #332102;
    overflow: hidden;
}

.profile-username {
    font-size: 1.3rem;
    font-weight: 700;
    color: #332102;
    margin-bottom: 4px;
}

.profile-stats {
    font-size: 0.85rem;
    color: #8a8a8a;
    margin-bottom: 12px;
}

.profile-stats span {
    font-weight: 600;
    color: #332102;
}

.profile-bio {
    font-size: 0.875rem;
    color: #555;
    line-height: 1.5;
    margin-bottom: 14px;
}

.social-links-widget {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.social-link-item {
    background-color: #fbf4eb;
    border-radius: 8px;
    padding: 9px 12px;
    font-size: 0.85rem;
}

.social-link-item .platform {
    font-weight: 700;
    color: #332102;
    font-size: 0.72rem;
    text-transform: uppercase;
    margin-bottom: 2px;
}

.social-link-item .handle {
    color: #0081cc;
}

/* news page */
.news-layout {
    display: grid;
    grid-template-columns: 1fr 280px;
    gap: 24px;
    max-width: 1080px;
}

.today-news-card {
    background-color: #0081cc;
    border-radius: 10px;
    padding: 20px;
    height: fit-content;
    position: sticky;
    top: 90px;
}

.today-news-card h3 {
    font-size: 0.95rem;
    font-weight: 700;
    color: white;
    margin-bottom: 14px;
}

.news-item {
    background-color: rgba(255, 255, 255, 0.15);
    border-radius: 8px;
    padding: 10px 12px;
    margin-bottom: 8px;
    color: white;
    font-size: 0.85rem;
    line-height: 1.5;
}

.news-item:last-child {
    margin-bottom: 0;
}

.news-date {
    font-size: 0.72rem;
    opacity: 0.7;
    margin-bottom: 3px;
}

/* explore page */
.explore-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 16px;
}

.explore-card {
    background-color: white;
    border-radius: 10px;
    border: 1px solid #f0e8d8;
    padding: 20px;
    cursor: pointer;
}

.explore-card:hover {
    border-color: #0081cc;
}

.explore-card .card-icon {
    width: 40px;
    height: 40px;
    border-radius: 8px;
    background-color: #e8f4fd;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    margin-bottom: 10px;
    color: #0081cc;
}

.explore-card h4 {
    font-size: 0.95rem;
    font-weight: 600;
    margin-bottom: 5px;
    color: #332102;
}

.explore-card p {
    font-size: 0.8rem;
    color: #8a8a8a;
    line-height: 1.5;
}

.explore-tag {
    display: inline-block;
    background-color: #e8f4fd;
    color: #0081cc;
    font-size: 0.72rem;
    font-weight: 600;
    padding: 3px 8px;
    border-radius: 50px;
    margin-top: 8px;
}

/* settings page */
.settings-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 18px;
    max-width: 780px;
}

.settings-card {
    background-color: #0081cc;
    border-radius: 10px;
    padding: 28px 20px;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
    cursor: pointer;
    text-decoration: none;
    border: none;
    text-align: left;
}

.settings-card:hover {
    background-color: #006aaa;
}

.settings-card.danger {
    background-color: #fbf4eb;
    border: 2px solid #c0392b;
}

.settings-card.danger:hover {
    background-color: #c0392b;
}

.settings-card.danger:hover .settings-card-icon,
.settings-card.danger:hover .settings-card-title,
.settings-card.danger:hover .settings-card-desc {
    color: white;
}

.settings-card-icon {
    font-size: 1.7rem;
    color: white;
}

.settings-card.danger .settings-card-icon {
    color: #c0392b;
}

.settings-card-title {
    font-size: 0.95rem;
    font-weight: 700;
    color: white;
}

.settings-card.danger .settings-card-title {
    color: #c0392b;
}

.settings-card-desc {
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.8);
    line-height: 1.5;
}

.settings-card.danger .settings-card-desc {
    color: #8a8a8a;
}

/* form pages (create post / report) */
.form-card {
    background-color: white;
    border-radius: 10px;
    border: 1px solid #f0e8d8;
    padding: 28px;
    max-width: 700px;
}

.form-card h2 {
    font-size: 1.2rem;
    font-weight: 700;
    color: #332102;
    margin-bottom: 22px;
}

.form-field {
    margin-bottom: 18px;
}

.form-field label {
    display: block;
    font-size: 0.85rem;
    font-weight: 600;
    color: #332102;
    margin-bottom: 5px;
}

.form-field input,
.form-field textarea,
.form-field select {
    width: 100%;
    padding: 11px 14px;
    border: 2px solid #f0e8d8;
    border-radius: 8px;
    background-color: #fbf4eb;
    font-family: 'Space Grotesk', sans-serif;
    font-size: 0.9rem;
    color: #332102;
    outline: none;
    resize: vertical;
}

.form-field input:focus,
.form-field textarea:focus,
.form-field select:focus {
    border-color: #0081cc;
}

.form-field textarea {
    min-height: 180px;
    line-height: 1.5;
}

.form-field input::placeholder,
.form-field textarea::placeholder {
    color: #8a8a8a;
}

.form-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 6px;
}

/* floating + button */
.fab {
    position: fixed;
    bottom: 24px;
    right: 24px;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background-color: #0081cc;
    color: white;
    border: none;
    font-size: 1.4rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    z-index: 200;
}

.fab:hover {
    background-color: #006aaa;
}

/* badge labels */
.badge {
    display: inline-flex;
    align-items: center;
    padding: 2px 9px;
    border-radius: 50px;
    font-size: 0.72rem;
    font-weight: 600;
}

.badge-blue {
    background-color: #e8f4fd;
    color: #0081cc;
}

.badge-brown {
    background-color: #f0e8d8;
    color: #332102;
}

/* helper classes */
.mt-8  { margin-top: 8px; }
.mt-16 { margin-top: 16px; }
.mt-24 { margin-top: 24px; }
.mb-16 { margin-bottom: 16px; }
.text-center { text-align: center; }
.text-gray { color: #8a8a8a; }
.text-blue { color: #0081cc; }


@media (max-width: 650px) {
    .sidebar {
        display: none;
    }
    .auth-wrapper {
        flex-direction: column;
    }
    .auth-panel {
        width: 100%;
    }
    .auth-hero {
        padding: 30px;
        min-height: 180px;
    }
    .settings-grid {
        grid-template-columns: 1fr;
    }
}

/* * { outline: 1px solid red !important; } */

.main-content {
    flex-direction: column;   /* Stack items vertically */
    justify-content: flex-start; /* Start from the top, not the middle */
    align-items: flex-start;     /* Align items to the left */
}

/* Ensure cards take up the full width available */
.main-content > .post-card, 
.main-content > .form-card, 
.main-content > .comments-list {
    width: 100%;
    max-width: 100%; /* Limits width so it doesn't look stretched on ultra-wide monitors */
}

/* back button fix */
.main-content > .btn-outline {
    width: auto;      
    align-self: flex-start; 
    margin-bottom: 20px;
}
