/* In The Wild - Community Section Styles */
/* Matches GOAT Grids main site styling */

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

:root {
    /* Springbok/Rugby Colors */
    --springbok-green: #007749;
    --springbok-gold: #FFB81C;
    --dark-green: #005234;
    --light-green: #00A859;

    /* Nature/Bush/Hunting Colors */
    --bush-brown: #8B6F47;
    --sunset-orange: #D2691E;
    --khaki: #C3B091;
    --charcoal: #2C2C2C;
    --off-white: #F5F5DC;

    /* System Colors */
    --rugby-white: #FFFFFF;
    --text-dark: #1a1a1a;
    --text-light: #666;
    --shadow: rgba(0, 0, 0, 0.1);
    --shadow-heavy: rgba(0, 0, 0, 0.3);
}

body {
    font-family: 'Roboto', sans-serif;
    line-height: 1.6;
    color: var(--text-dark);
    overflow-x: hidden;
    background: linear-gradient(to bottom, #f8f9fa 0%, #ffffff 100%);
    min-height: 100vh;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Typography */
h1, h2, h3, h4 {
    font-family: 'Bebas Neue', cursive;
    letter-spacing: 2px;
}

/* Navbar */
.navbar {
    padding: 15px 0;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: rgba(0, 82, 52, 0.98);
    backdrop-filter: blur(20px);
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.3);
    border-bottom: 1px solid rgba(255, 184, 28, 0.2);
}

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

.logo {
    display: flex;
    align-items: center;
    gap: 15px;
    cursor: pointer;
    transition: transform 0.3s;
    text-decoration: none;
}

.logo:hover {
    transform: scale(1.05);
}

.logo-icon {
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, var(--springbok-gold) 0%, var(--sunset-orange) 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: white;
    box-shadow: 0 4px 15px rgba(255, 184, 28, 0.4);
}

.logo-text h1 {
    font-size: 1.5rem;
    color: var(--springbok-gold);
    margin: 0;
    line-height: 1;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
}

.tagline {
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.8);
    font-weight: 400;
    margin: 4px 0 0 0;
    letter-spacing: 1px;
}

/* Mobile Menu Toggle */
.mobile-menu-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 5px;
    z-index: 1001;
}

.mobile-menu-toggle span {
    width: 28px;
    height: 3px;
    background: var(--springbok-gold);
    border-radius: 2px;
    transition: all 0.3s;
}

.nav-links {
    display: flex;
    list-style: none;
    gap: 25px;
    align-items: center;
    margin: 0;
    padding: 0;
}

.nav-link {
    color: white;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s;
    font-size: 0.9rem;
    letter-spacing: 0.5px;
    padding: 8px 12px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.nav-link:hover {
    color: var(--springbok-gold);
    background: rgba(255, 184, 28, 0.1);
}

.nav-link.active {
    color: var(--springbok-gold);
    background: rgba(255, 184, 28, 0.2);
}

.auth-btn {
    background: var(--springbok-gold);
    color: var(--text-dark);
    padding: 10px 20px;
    border-radius: 25px;
    font-weight: 700;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s;
    box-shadow: 0 4px 15px rgba(255, 184, 28, 0.3);
    border: 2px solid var(--springbok-gold);
}

.auth-btn:hover {
    background: var(--text-dark);
    color: var(--springbok-gold);
    transform: translateY(-2px);
}

.user-menu {
    display: flex;
    align-items: center;
    gap: 15px;
}

.user-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--springbok-gold);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-dark);
    font-weight: 700;
    cursor: pointer;
    border: 2px solid white;
}

.user-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
}

/* Main Content */
.main-content {
    padding-top: 100px;
    min-height: calc(100vh - 100px);
}

/* Page Header */
.page-header {
    background: linear-gradient(135deg, var(--dark-green) 0%, var(--springbok-green) 100%);
    padding: 60px 0;
    text-align: center;
    color: white;
    position: relative;
    overflow: hidden;
}

.page-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: repeating-linear-gradient(
        90deg,
        transparent,
        transparent 48px,
        rgba(255, 255, 255, 0.05) 48px,
        rgba(255, 255, 255, 0.05) 52px
    );
    pointer-events: none;
}

.page-header h1 {
    font-size: 3rem;
    color: var(--springbok-gold);
    margin-bottom: 10px;
    position: relative;
    z-index: 1;
}

.page-header p {
    font-size: 1.2rem;
    opacity: 0.9;
    position: relative;
    z-index: 1;
}

/* Map Container */
.map-section {
    padding: 40px 0;
    background: var(--off-white);
}

.map-container {
    height: 400px;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 10px 30px var(--shadow);
    background: #e0e0e0;
}

#posts-map {
    width: 100%;
    height: 100%;
}

/* Feed Section */
.feed-section {
    padding: 60px 0;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 40px;
}

.section-header h2 {
    font-size: 2rem;
    color: var(--springbok-green);
}

.new-post-btn {
    background: var(--springbok-green);
    color: white;
    padding: 12px 25px;
    border-radius: 25px;
    text-decoration: none;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s;
}

.new-post-btn:hover {
    background: var(--dark-green);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px var(--shadow);
}

/* Posts Grid */
.posts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 30px;
}

.post-card {
    background: white;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 5px 20px var(--shadow);
    transition: transform 0.3s, box-shadow 0.3s;
}

.post-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px var(--shadow-heavy);
}

.post-header {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 15px 20px;
    border-bottom: 1px solid #f0f0f0;
}

.post-avatar {
    width: 45px;
    height: 45px;
    border-radius: 50%;
    background: var(--springbok-gold);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-dark);
    font-weight: 700;
    font-size: 1.2rem;
}

.post-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
}

.post-meta {
    flex: 1;
}

.post-author {
    font-weight: 700;
    color: var(--springbok-green);
    text-decoration: none;
}

.post-author:hover {
    text-decoration: underline;
}

.post-date {
    font-size: 0.85rem;
    color: var(--text-light);
}

.post-images {
    position: relative;
    width: 100%;
    height: 250px;
    overflow: hidden;
    background: #f0f0f0;
}

.post-images img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    cursor: pointer;
    transition: transform 0.3s;
}

.post-images img:hover {
    transform: scale(1.05);
}

.image-count {
    position: absolute;
    bottom: 10px;
    right: 10px;
    background: rgba(0, 0, 0, 0.7);
    color: white;
    padding: 5px 10px;
    border-radius: 15px;
    font-size: 0.85rem;
}

.post-content {
    padding: 20px;
}

.post-description {
    color: var(--text-dark);
    line-height: 1.7;
    margin-bottom: 15px;
}

.post-location {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--text-light);
    font-size: 0.9rem;
}

.post-location i {
    color: var(--sunset-orange);
}

/* Auth Pages */
.auth-section {
    min-height: calc(100vh - 100px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px 20px;
    background: linear-gradient(135deg, rgba(0, 82, 52, 0.05) 0%, rgba(139, 111, 71, 0.05) 100%);
}

.auth-card {
    background: white;
    border-radius: 20px;
    box-shadow: 0 10px 40px var(--shadow);
    width: 100%;
    max-width: 450px;
    padding: 50px 40px;
}

.auth-card h2 {
    font-size: 2rem;
    color: var(--springbok-green);
    text-align: center;
    margin-bottom: 10px;
}

.auth-card .subtitle {
    text-align: center;
    color: var(--text-light);
    margin-bottom: 30px;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: var(--text-dark);
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 15px;
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    font-size: 1rem;
    font-family: 'Roboto', sans-serif;
    transition: border-color 0.3s;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--springbok-green);
}

.form-group textarea {
    resize: vertical;
    min-height: 100px;
}

.btn {
    width: 100%;
    padding: 15px;
    border: none;
    border-radius: 10px;
    font-weight: 700;
    cursor: pointer;
    font-size: 1rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    transition: all 0.3s;
}

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

.btn-primary:hover {
    background: var(--dark-green);
    transform: translateY(-2px);
}

.btn-secondary {
    background: var(--springbok-gold);
    color: var(--text-dark);
}

.btn-secondary:hover {
    background: #ffcc33;
    transform: translateY(-2px);
}

.auth-link {
    text-align: center;
    margin-top: 25px;
    color: var(--text-light);
}

.auth-link a {
    color: var(--springbok-green);
    font-weight: 600;
    text-decoration: none;
}

.auth-link a:hover {
    text-decoration: underline;
}

.error-message {
    background: #ffe6e6;
    color: #d32f2f;
    padding: 12px 15px;
    border-radius: 8px;
    margin-bottom: 20px;
    font-size: 0.9rem;
    display: none;
}

.success-message {
    background: #e6ffe6;
    color: #2e7d32;
    padding: 12px 15px;
    border-radius: 8px;
    margin-bottom: 20px;
    font-size: 0.9rem;
    display: none;
}

/* New Post Page */
.new-post-section {
    padding: 40px 0 80px;
}

.new-post-card {
    background: white;
    border-radius: 20px;
    box-shadow: 0 10px 40px var(--shadow);
    max-width: 800px;
    margin: 0 auto;
    padding: 40px;
}

.new-post-card h2 {
    font-size: 2rem;
    color: var(--springbok-green);
    margin-bottom: 30px;
}

/* Photo Upload */
.photo-upload-area {
    border: 3px dashed #e0e0e0;
    border-radius: 15px;
    padding: 40px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s;
    margin-bottom: 20px;
}

.photo-upload-area:hover {
    border-color: var(--springbok-green);
    background: rgba(0, 119, 73, 0.05);
}

.photo-upload-area.dragover {
    border-color: var(--springbok-gold);
    background: rgba(255, 184, 28, 0.1);
}

.photo-upload-area i {
    font-size: 3rem;
    color: var(--springbok-green);
    margin-bottom: 15px;
}

.photo-upload-area p {
    color: var(--text-light);
}

.photo-upload-area span {
    color: var(--springbok-green);
    font-weight: 600;
}

.photo-previews {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    margin-bottom: 20px;
}

.photo-preview {
    position: relative;
    width: 120px;
    height: 120px;
    border-radius: 10px;
    overflow: hidden;
}

.photo-preview img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.photo-preview .remove-photo {
    position: absolute;
    top: 5px;
    right: 5px;
    background: rgba(0, 0, 0, 0.7);
    color: white;
    border: none;
    width: 25px;
    height: 25px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Location Picker */
.location-picker-container {
    margin-bottom: 20px;
}

.location-search {
    display: flex;
    gap: 10px;
    margin-bottom: 15px;
}

.location-search input {
    flex: 1;
    padding: 12px 15px;
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    font-size: 1rem;
}

.location-search button {
    padding: 12px 20px;
    background: var(--springbok-green);
    color: white;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    font-weight: 600;
}

.location-picker-map {
    height: 300px;
    border-radius: 10px;
    overflow: hidden;
    background: #e0e0e0;
    margin-bottom: 15px;
}

.selected-location {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 15px;
    background: rgba(0, 119, 73, 0.1);
    border-radius: 10px;
    color: var(--springbok-green);
}

.selected-location i {
    font-size: 1.5rem;
}

/* Profile Page */
.profile-header {
    background: linear-gradient(135deg, var(--dark-green) 0%, var(--springbok-green) 100%);
    padding: 80px 0 60px;
    color: white;
    position: relative;
}

.profile-info {
    display: flex;
    align-items: center;
    gap: 30px;
    position: relative;
    z-index: 1;
}

.profile-avatar {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    background: var(--springbok-gold);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3rem;
    color: var(--text-dark);
    font-weight: 700;
    border: 4px solid white;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.3);
}

.profile-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
}

.profile-details h1 {
    font-size: 2.5rem;
    color: white;
    margin-bottom: 5px;
}

.profile-bio {
    font-size: 1.1rem;
    opacity: 0.9;
    max-width: 500px;
}

.profile-stats {
    display: flex;
    gap: 30px;
    margin-top: 20px;
}

.stat {
    text-align: center;
}

.stat-value {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--springbok-gold);
}

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

.profile-actions {
    margin-left: auto;
}

.edit-profile-btn {
    background: white;
    color: var(--springbok-green);
    padding: 12px 25px;
    border-radius: 25px;
    text-decoration: none;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s;
}

.edit-profile-btn:hover {
    background: var(--springbok-gold);
    transform: translateY(-2px);
}

.profile-map-section {
    padding: 40px 0;
    background: var(--off-white);
}

.profile-map-section h2 {
    font-size: 1.8rem;
    color: var(--springbok-green);
    margin-bottom: 20px;
}

.profile-posts-section {
    padding: 60px 0;
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: var(--text-light);
}

.empty-state i {
    font-size: 4rem;
    color: #e0e0e0;
    margin-bottom: 20px;
}

.empty-state h3 {
    font-size: 1.5rem;
    color: var(--text-dark);
    margin-bottom: 10px;
}

.empty-state p {
    margin-bottom: 20px;
}

/* Loading State */
.loading {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 60px 20px;
}

.loading-spinner {
    width: 50px;
    height: 50px;
    border: 4px solid #e0e0e0;
    border-top-color: var(--springbok-green);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Custom Info Window for Map */
.map-info-window {
    max-width: 250px;
}

.map-info-window img {
    width: 100%;
    height: 150px;
    object-fit: cover;
    border-radius: 8px;
    margin-bottom: 10px;
}

.map-info-window h4 {
    color: var(--springbok-green);
    margin-bottom: 5px;
}

.map-info-window p {
    color: var(--text-light);
    font-size: 0.9rem;
}

/* Footer */
.footer {
    background: linear-gradient(135deg, var(--charcoal) 0%, var(--dark-green) 50%, var(--charcoal) 100%);
    color: white;
    padding: 40px 0 20px;
    text-align: center;
}

.footer p {
    color: rgba(255, 255, 255, 0.6);
}

.footer a {
    color: var(--springbok-gold);
    text-decoration: none;
}

.footer a:hover {
    text-decoration: underline;
}

/* Responsive Design */
@media (max-width: 768px) {
    .mobile-menu-toggle {
        display: flex;
    }

    .nav-links {
        position: fixed;
        top: 80px;
        right: -100%;
        width: 280px;
        height: calc(100vh - 80px);
        background: rgba(0, 82, 52, 0.98);
        backdrop-filter: blur(20px);
        flex-direction: column;
        padding: 30px 20px;
        gap: 0;
        align-items: stretch;
        box-shadow: -5px 0 20px rgba(0, 0, 0, 0.3);
        transition: right 0.3s ease;
    }

    .nav-links.active {
        right: 0;
    }

    .nav-links li {
        width: 100%;
        margin-bottom: 10px;
    }

    .nav-link {
        width: 100%;
        padding: 15px 20px;
        border-radius: 10px;
        font-size: 1rem;
    }

    .auth-btn {
        width: 100%;
        justify-content: center;
        margin-top: 10px;
    }

    .page-header h1 {
        font-size: 2rem;
    }

    .posts-grid {
        grid-template-columns: 1fr;
    }

    .section-header {
        flex-direction: column;
        gap: 20px;
        text-align: center;
    }

    .profile-info {
        flex-direction: column;
        text-align: center;
    }

    .profile-actions {
        margin-left: 0;
        margin-top: 20px;
    }

    .auth-card {
        padding: 30px 20px;
    }

    .new-post-card {
        padding: 25px 20px;
    }

    .map-container {
        height: 300px;
    }
}

/* Smooth Scrolling */
html {
    scroll-behavior: smooth;
}
