:root {
    --primary-green: #BADF93;
    --primary-green-dark: #a7c983;
    --primary-black: #000000;
    --secondary-bg: #F8F4F4;
    --text-color: #333333;
    --white: #FFFFFF;
    --light-gray: #E5E5E5;
    --medium-gray: #CCCCCC;
    --dark-gray: #333333;
}

body {
    font-family: 'Montserrat', sans-serif;
    margin: 0;
    padding: 0;
    background-color: var(--white);
    color: var(--text-color);
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
}

/* Header styles */
header {
    background-color: var(--primary-black);
    color: var(--white);
    padding: 15px 0;
}

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

.logo {
    font-size: 24px;
    font-weight: 700;
    color: var(--white);
    text-decoration: none;
}

.logo span {
    color: var(--primary-green);
}

.nav-links {
    display: flex;
    list-style: none;
}

.nav-links li {
    margin-left: 25px;
}

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

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

/* New styles for buttons in nav-links to align them properly */
.nav-links a.btn {
    padding: 5px 12px;
    margin: -5px 0; /* Negative margin to counter padding and align with text */
    display: inline-flex;
    align-items: center;
    height: auto;
    line-height: normal;
}

/* Ensure Register button (btn-primary) has black text */
.nav-links a.btn.btn-primary {
    color: var(--primary-black);
}

.nav-links a.btn:hover {
    color: inherit; /* Override the text hover color for buttons */
}

.btn {
    display: inline-block;
    padding: 8px 16px;
    border-radius: 4px;
    text-decoration: none;
    font-weight: 500;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s;
}

.btn-primary {
    background-color: var(--primary-green);
    color: var(--primary-black);
    border: 2px solid var(--primary-green);
}

.btn-primary:hover {
    background-color: var(--primary-green-dark);
    color: var(--primary-black);
    border: 2px solid var(--primary-green-dark);
}

.btn-secondary {
    background-color: var(--primary-black);
    color: var(--primary-green);
    border: 2px solid var(--primary-black);
}

.btn-secondary:hover {
    background-color: var(--dark-gray);
    color: var(--primary-green);
    border-color: var(--dark-gray);
}

.btn-danger { /* Added for delete buttons */
    background-color: #dc3545; /* Standard Bootstrap danger red */
    color: var(--white);
    border: 2px solid #dc3545;
}

.btn-danger:hover {
    background-color: #c82333; /* Darker red on hover */
    border-color: #bd2130;
    color: var(--white);
}

.btn-sm { /* Added for smaller buttons */
    padding: 0.25rem 0.5rem; /* Smaller padding */
    font-size: 0.875rem; /* Smaller font */
    border-radius: 0.2rem;
}

/* Form styles */
.form-container {
    background-color: var(--secondary-bg);
    border-radius: 8px;
    padding: 30px;
    margin: 30px auto;
    max-width: 500px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.form-title {
    color: var(--primary-black);
    text-align: center;
    margin-bottom: 25px;
}

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

.form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: 500;
}

.form-control {
    width: 100%;
    padding: 10px;
    border: 1px solid var(--medium-gray);
    border-radius: 4px;
    font-family: 'Montserrat', sans-serif;
}

.form-control:focus {
    outline: none;
    border-color: var(--primary-green);
    box-shadow: 0 0 0 2px rgba(186, 223, 147, 0.25);
}

.form-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 25px;
}

.form-message {
    margin: 20px 0;
    padding: 12px;
    border-radius: 4px;
}

.error-message {
    background-color: #FFEBEE;
    color: #D32F2F;
    border: 1px solid #FFCDD2;
}

.success-message {
    background-color: #E8F5E9;
    color: #2E7D32;
    border: 1px solid #C8E6C9;
}

.info-message {
    background-color: #E3F2FD;
    color: #1565C0;
    border: 1px solid #BBDEFB;
}

/* Main content area */
main {
    flex-grow: 1;
}

.main-content {
    padding: 40px 0;
}

/* Section styles */
.section {
    padding: 40px 0;
}

.section-colored {
    background-color: var(--secondary-bg);
}

.section-title {
    text-align: center;
    margin-bottom: 30px;
    color: var(--primary-black);
}

/* Footer styles */
footer {
    background-color: var(--primary-black);
    color: var(--white);
    padding: 30px 0;
}

.footer-content {
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
}

.footer-logo {
    margin-bottom: 15px;
    font-size: 20px;
    font-weight: 700;
}

.footer-logo span {
    color: var(--primary-green);
}

.footer-links {
    list-style: none;
    padding: 0;
}

.footer-links li {
    margin-bottom: 10px;
}

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

.footer-links a:hover {
    color: var(--primary-green);
}

.copyright {
    text-align: center;
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

/* Make sure the hamburger is hidden on desktop */
.hamburger-menu {
    display: none; /* Hidden by default on desktop */
}

/* Responsive styles */
@media (max-width: 768px) {
    .navbar {
        flex-direction: column;
        align-items: flex-start;
        position: relative;
        padding: 15px 0;
    }
    
    .hamburger-menu {
        display: block; /* Show on mobile */
        position: absolute;
        top: 10px;
        right: 10px;
        cursor: pointer;
        z-index: 1000;
        padding: 10px;
        background-color: rgba(0, 0, 0, 0.5);
        border-radius: 4px;
    }
    
    .bar {
        width: 25px;
        height: 3px;
        background-color: var(--primary-green);
        margin: 5px 0;
        transition: 0.4s;
    }
    
    /* Hamburger animation */
    .hamburger-menu.active .bar:nth-child(1) {
        transform: rotate(-45deg) translate(-5px, 6px);
    }
    
    .hamburger-menu.active .bar:nth-child(2) {
        opacity: 0;
    }
    
    .hamburger-menu.active .bar:nth-child(3) {
        transform: rotate(45deg) translate(-5px, -6px);
    }
    
    .nav-links {
        display: none;
        flex-direction: column;
        width: 100%;
        margin-top: 50px;
        padding-left: 0;
    }
    
    .nav-links.active {
        display: flex;
    }
    
    .nav-links li {
        margin: 10px 0;
        width: 100%;
        text-align: center;
    }
    
    .footer-content {
        flex-direction: column;
    }
    
    .footer-column {
        margin-bottom: 20px;
    }
}

/* == Form Styles from log_performance.html == */
/* Custom form styling aligned with site styles */
.form-container {
    max-width: 600px;
    margin: 0 auto 40px auto;
    background-color: var(--secondary-bg);
    border-radius: 8px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    overflow: hidden;
}

.form-header {
    padding: 20px;
    text-align: center;
    border-bottom: 1px solid var(--light-gray);
    color: var(--primary-black);
}

.form-header h2 {
    margin: 0;
    font-size: 1.5rem;
}

.form-header .description {
    margin: 8px 0 0 0;
    font-size: 0.9rem;
    opacity: 0.8;
}

.form-header .metrics {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-top: 15px;
    flex-wrap: wrap;
}

.metric-badge {
    background-color: rgba(255, 255, 255, 0.15);
    padding: 6px 12px;
    border-radius: 16px;
    font-size: 0.85rem;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.form-body {
    padding: 30px;
    background-color: var(--secondary-bg);
}

.form-errors {
    background-color: #FFEBEE;
    border-left: 3px solid #dc3545;
    padding: 10px 15px;
    margin-bottom: 20px;
    border-radius: 4px;
    color: #D32F2F;
}

.form-field {
    margin-bottom: 20px;
    position: relative;
    box-sizing: border-box;
}

.form-field label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: var(--primary-black);
    font-size: 1rem;
}

.form-field input,
.form-field select {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid var(--medium-gray);
    background-color: var(--white);
    border-radius: 4px;
    color: var(--text-color);
    font-size: 1rem;
    font-family: 'Montserrat', sans-serif;
    box-sizing: border-box;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
}

.form-field input:hover,
.form-field select:hover {
    border-color: var(--dark-gray);
}

.form-field input:focus,
.form-field select:focus {
    outline: none;
    border-color: var(--primary-green);
    box-shadow: 0 0 0 2px rgba(186, 223, 147, 0.25);
}

/* Error message specific styling within form fields */
.form-field .error-message {
    color: #D32F2F;
    font-size: 0.85rem;
    margin-top: 5px;
}

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

.form-field-group h3 {
    font-size: 1.1rem;
    margin: 0 0 15px 0;
    padding-bottom: 8px;
    border-bottom: 1px solid var(--light-gray);
    color: var(--primary-black);
}

.time-fields {
    display: flex;
    align-items: flex-start;
    gap: 15px;
    box-sizing: border-box;
    width: 100%;
}

.time-field {
    flex: 1;
    margin-bottom: 0;
    box-sizing: border-box;
}

.time-separator {
    font-size: 1.8rem;
    font-weight: bold;
    color: var(--primary-black);
    margin-top: 32px; /* Adjust alignment */
    display: flex;
    align-items: center;
    justify-content: center;
    height: 30px; /* Match input height approx */
}

.form-actions {
    display: flex;
    gap: 15px;
    margin-top: 30px;
}

.form-btn-submit { /* Renamed from .btn-log */
    background-color: var(--primary-green);
    color: var(--primary-black);
    border: 2px solid var(--primary-green);
    padding: 10px 20px;
    border-radius: 4px;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    flex: 1; /* Takes available space in form-actions */
    transition: all 0.3s;
    font-family: 'Montserrat', sans-serif;
}

.form-btn-submit:hover { /* Renamed from .btn-log:hover */
    background-color: var(--primary-green-dark);
    border-color: var(--primary-green-dark);
}

.form-btn-cancel { /* Renamed from .btn-cancel */
    background-color: var(--primary-black);
    color: var(--primary-green);
    border: 2px solid var(--primary-black);
    padding: 10px 20px;
    border-radius: 4px;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    text-decoration: none;
    text-align: center;
    transition: all 0.3s;
    font-family: 'Montserrat', sans-serif;
}

.form-btn-cancel:hover { /* Renamed from .btn-cancel:hover */
    background-color: var(--dark-gray);
    border-color: var(--dark-gray);
}

.required {
    color: #D32F2F;
    margin-left: 2px;
}

/* Custom select dropdown arrow */
.form-field select {
    background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23333' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    padding-right: 40px;
}

/* Date input styling */
.form-field input[type="date"] {
    padding-right: 15px;
    position: relative;
}

/* Style the date picker indicator */
.form-field input[type="date"]::-webkit-calendar-picker-indicator {
    background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="16" height="15" viewBox="0 0 24 24"><path fill="%23333" d="M8 7V3h2v4h4V3h2v4h2a2 2 0 0 1 2 2v10a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2V9a2 2 0 0 1 2-2h2zm0 2H6v10h12V9h-2v2h-2V9H8v2zm0-2V5H6v2h2zM14 7V5h-2v2h2z"/></svg>');
    background-repeat: no-repeat;
    background-position: center;
    cursor: pointer;
    width: 20px; /* Adjust size */
    height: 20px; /* Adjust size */
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
}

/* Number inputs - Remove spinners */
.form-field input[type="number"] {
    -moz-appearance: textfield;
}

.form-field input[type="number"]::-webkit-outer-spin-button,
.form-field input[type="number"]::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}
/* == End Form Styles from log_performance.html == */ 

/* == Home Page Centering == */
#home-content-container {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 70vh; /* Set a minimum height to ensure vertical centering */
}

#home-content-container > div {
    text-align: center; /* Center all text including buttons */
}

/* == Filter Form Styling == */
.filter-form {
    display: flex;
    align-items: center; /* Vertically align items */
    gap: 15px; /* Space between elements */
    flex-wrap: wrap; /* Allow wrapping on smaller screens */
}

/* Remove row styling if it conflicts */
/* .filter-form .row { ... } */

.filter-form label { /* Use label directly instead of col-form-label for simplicity */
    font-weight: 500;
    margin-bottom: 0; /* Remove default bottom margin */
}

.filter-form .form-select {
    /* width: 100%; */ /* Remove fixed width */
    min-width: 200px; /* Give it a minimum width */
    flex-grow: 1; /* Allow it to grow */
    max-width: 400px; /* But cap its maximum width */
    padding: 0.375rem 2.25rem 0.375rem 0.75rem; 
    font-size: 1rem;
    font-weight: 400;
    line-height: 1.5;
    color: var(--text-color);
    background-color: var(--white);
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill='none' stroke='%23343a40' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='m2 5 6 6 6-6'/%3e%3c/svg%3e"); /* Standard Bootstrap arrow */
    background-repeat: no-repeat;
    background-position: right 0.75rem center;
    background-size: 16px 12px;
    border: 1px solid var(--medium-gray);
    border-radius: 0.25rem;
    transition: border-color .15s ease-in-out,box-shadow .15s ease-in-out;
    appearance: none;
}

.filter-form .form-select:focus {
    border-color: var(--primary-green);
    outline: 0;
    box-shadow: 0 0 0 0.25rem rgba(186, 223, 147, 0.25);
}

.filter-form .btn {
    /* height: calc(1.5em + 0.75rem + 2px); */ /* Remove fixed height */
    /* Flex alignment should handle vertical centering */
}

/* == Card Grid & Generic Card Styling (Replaces Goal/Log/WOD Specific) == */
.card-grid {
    display: grid;
    /* Adjust minmax if needed, 300px is a good starting point */
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); 
    gap: 50px; /* Increased gap for more spacing */
    padding-top: 20px;
    justify-content: start; /* Prevent single items stretching */
    margin-bottom: 40px; /* Add margin below the grid */
}

.info-card {
    background-color: var(--secondary-bg); 
    border: 1px solid var(--light-gray);
    border-radius: 8px;
    padding: 15px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    transition: box-shadow 0.2s ease-in-out;
    display: flex;
    flex-direction: column; /* Stack content vertically */
    height: 100%; /* Ensure cards in a row have same height if wrapped in link */
    position: relative; /* For absolute positioned badges */
}

a.card-link {
    text-decoration: none; 
    color: inherit; 
}

a.card-link:hover .info-card {
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}

.info-card .card-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--primary-black);
    margin-bottom: 0.25rem; /* Less margin below title */
}

.info-card .card-subtitle { /* For things like category badge */
    margin-bottom: 0.5rem;
    display: block; /* Ensure it takes space */
}

.info-card .card-value {
    font-size: 1.2rem; 
    font-weight: 700;
    color: var(--primary-black); 
    margin-bottom: 0.5rem;
}

.info-card .card-details {
    font-size: 0.9rem;
    color: var(--dark-gray);
    margin-bottom: 0.25rem; /* Consistent small margin */
}

.info-card .card-image {
    max-height: 150px;
    width: 100%; /* Ensure image fits card width */
    object-fit: cover;
    border-radius: 4px; /* Slightly rounded corners */
    margin-bottom: 10px;
}

.info-card .card-actions {
    margin-top: auto; /* Push actions to the bottom */
    padding-top: 10px; 
    border-top: 1px solid var(--light-gray);
    display: flex;
    gap: 10px;
    justify-content: flex-end; /* Align buttons to the right by default */
}

/* Generic Badge Styling within Cards */
.info-card .card-badge {
    font-size: 0.75rem;
    font-weight: 500;
    padding: 0.25em 0.6em;
    border-radius: 10rem; /* Pill shape */
    display: inline-block;
}

.info-card .badge-category {
    background-color: var(--medium-gray);
    color: var(--primary-black);
}

.info-card .badge-attended {
    background-color: var(--primary-green);
    color: white;
    position: absolute; /* Position top-right */
    top: 10px;
    right: 10px;
}

/* Status-based styling for cards */
.info-card.status-achieved {
    background-color: #e8f5e9; 
}
.info-card.status-expired,
.info-card.status-abandoned {
    opacity: 0.7;
}

/* == Goal List Styling == (REMOVE old rules) */
/* Remove .goal-grid, .goal-card, etc. */

/* == Log List Styling == (REMOVE old rules - handled by inline styles) */
/* Remove .log-grid, .log-card, etc. if they exist */

/* == WOD History Styling == (REMOVE old rules - handled by inline styles) */
/* Remove .wod-grid, .wod-card, etc. if they exist */

/* Social Icons */
.social-icons {
    display: flex;
    gap: 15px;
    margin-top: 10px;
}

.social-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--white);
    transition: color 0.3s ease;
}

.social-icon:hover {
    color: var(--primary-green);
}

.mt-4 {
    margin-top: 20px;
}