/* Modern CSS for iCrewz - Responsive Film Directory
   Author: Grok 3 (xAI)
   Date: October 5, 2025
*/

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

body {
    font-family: 'Arial', 'Helvetica', sans-serif;
    color: #333333; /* Dark gray for readability */
    line-height: 1.6;
    background-color: #f5f5f5; /* Light gray background */
}

a {
    color: #075A02; /* Green from original */
    text-decoration: none;
}

a:hover {
    color: #ff6601; /* Orange hover from original */
}

/* Header */
.header-wrap {
    background-color: #ffffff;
    padding: 1rem 0;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

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

.header h1 a {
    font-size: 1.5rem;
    font-weight: bold;
    color: #075A02;
}

.logins {
    list-style: none;
    display: flex;
    gap: 1rem;
}

.logins li a {
    padding: 0.5rem 1rem;
    color: #333333;
    transition: background-color 0.3s;
}

.logins li a:hover {
    background-color: #075A02;
    color: #ffffff;
    border-radius: 4px;
}

/* Navigation */
.navigation {
    background-color: #075A02;
    padding: 0.5rem 0;
}

.navigation ul {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: center;
    list-style: none;
    gap: 2rem;
    padding: 0 1rem;
}

.navigation a {
    color: #ffffff;
    font-size: 1.1rem;
    padding: 0.5rem 1rem;
    transition: color 0.3s, background-color 0.3s;
}

.navigation a:hover {
    color: #ff6601;
    background-color: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
}

/* Main Content */
.main-wrap {
    max-width: 1200px;
    margin: 2rem auto;
    padding: 0 1rem;
}

.posts-wrap {
    background-color: #ffffff;
    padding: 1rem;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

body.page-listings .posts-wrap {
    background-color: #fcefa9;
}

.post-filters {
    display: flex;
    gap: 1rem;
    margin-bottom: 1rem;
    flex-wrap: wrap;
}

.post-filters input,
.post-filters select {
    padding: 0.5rem;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 1rem;
}

.post-filters input[type="submit"] {
    background-color: #075A02;
    color: #ffffff;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 4px;
    cursor: pointer;
}

.post-filters input[type="submit"]:hover {
    background-color: #ff6601;
}

.posts {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 1rem;
    list-style: none;
    padding: 0;
}

.posts li {
    background-color: #f0f0f0;
    padding: 1rem;
    border-radius: 4px;
    transition: transform 0.3s;
    position: relative;
}

.posts li:hover {
    transform: translateY(-5px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.listing-card-featured {
    border: 2px solid #f4b400;
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.1), 0 0 0 4px rgba(244, 180, 0, 0.35);
    background-color: #fff9e6;
}

.featured-pill {
    display: inline-flex;
    align-items: center;
    padding: 0.15rem 0.55rem;
    border-radius: 999px;
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.45px;
    text-transform: uppercase;
    background: #f4b400;
    color: #3a2500;
    line-height: 1.2;
    margin-left: 0.5rem;
}

.listing-card .featured-pill {
    margin-left: 0;
    margin-bottom: 0.4rem;
}

.listing-detail-wrap {
    position: relative;
}

.listing-detail-featured {
    border: 2px solid #f4b400;
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.08), 0 0 0 4px rgba(244, 180, 0, 0.35);
    background-color: #fff9e6;
}

.posts a {
    color: #333333;
    text-decoration: none;
}

.posts .img-wrap {
    height: 100px;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #ddd;
}

.posts .img-wrap img {
    max-width: 100%;
    max-height: 100%;
}

.posts .user-info {
    margin-top: 0.5rem;
}

.posts h3 {
    font-size: 1.1rem;
    font-weight: bold;
    margin-bottom: 0.25rem;
}

.posts h4 {
    font-size: 0.9rem;
    color: #666666;
    margin-bottom: 0.25rem;
}

.posts span {
    font-size: 0.85rem;
    color: #444444;
}

.posts cite {
    font-size: 0.75rem;
    color: #075A02;
}

.posts cite.date {
    color: #666666;
}

/* Reusable notice and button styles */
.flash {
    padding: 0.75rem 1rem;
    border-radius: 4px;
    margin: 0.5rem 0;
}
.flash-success {
    background: #e4f7ec;
    color: #225b34;
}
.flash-error {
    background: #fbecec;
    color: #a72626;
}

.btn-primary {
    background: #075A02;
    color: #ffffff;
    border: none;
    padding: 0.6rem 1.2rem;
    border-radius: 4px;
    cursor: pointer;
    font-weight: 600;
    display: inline-block;
}
.btn-primary:hover {
    background: #ff6601;
}

.form-note {
    margin-top: 1rem;
    text-align: center;
}
.form-note a {
    color: #075A02;
}
.form-note a:hover {
    color: #ff6601;
}

.auth-card {
    max-width: 420px;
    margin: 0 auto;
    text-align: left;
}
.auth-card h2 {
    margin-bottom: 1rem;
    color: #075A02;
}
.auth-form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}
.auth-form label {
    display: flex;
    flex-direction: column;
    font-weight: 600;
    color: #333;
}
.auth-form input {
    padding: 0.6rem;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 1rem;
}

.content-card h2 {
    margin-bottom: 1rem;
    color: #075A02;
}

.contact-form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.contact-form label {
    display: flex;
    flex-direction: column;
    font-weight: 600;
    color: #333;
}

.contact-form input,
.contact-form textarea {
    padding: 0.6rem;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 1rem;
}

/* Shared badge styling */
.mini-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.25rem;
    background: #1b9a59;
    color: #ffffff;
    padding: 0.2rem 0.5rem;
    border-radius: 999px;
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0.4px;
    line-height: 1.1;
}

.mini-badge svg {
    width: 0.9rem;
    height: 0.9rem;
    display: block;
    fill: currentColor;
    pointer-events: none;
}

.mini-badge[data-tooltip] {
    position: relative;
    cursor: help;
}

.mini-badge[data-tooltip]::after,
.mini-badge[data-tooltip]::before {
    position: absolute;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.15s ease, transform 0.15s ease;
}

.mini-badge[data-tooltip]::after {
    content: attr(data-tooltip);
    bottom: calc(100% + 0.35rem);
    left: 50%;
    transform: translate(-50%, 0.25rem);
    background: rgba(0, 0, 0, 0.85);
    color: #fff;
    padding: 0.2rem 0.45rem;
    border-radius: 4px;
    font-size: 0.7rem;
    line-height: 1.2;
    white-space: nowrap;
    z-index: 6;
}

.mini-badge[data-tooltip]::before {
    content: "";
    bottom: calc(100% + 0.05rem);
    left: 50%;
    transform: translate(-50%, 0.25rem);
    border: 6px solid transparent;
    border-top-color: rgba(0, 0, 0, 0.85);
    z-index: 5;
}

.mini-badge[data-tooltip]:hover::after,
.mini-badge[data-tooltip]:hover::before,
.mini-badge[data-tooltip]:focus-visible::after,
.mini-badge[data-tooltip]:focus-visible::before {
    opacity: 1;
    transform: translate(-50%, 0);
}

.mini-badge.badge-verified,
.mini-badge.verified {
    background: #1b9a59;
}

.mini-badge.badge-basic,
.mini-badge.basic {
    background: #4D8224;
}

.mini-badge.pending,
.badge.pending {
    background: #d88c09;
}


/* Footer */
.footer-wrap {
    background-color: #075A02;
    color: #ffffff;
    padding: 1rem 0;
    margin-top: 2rem;
}

.footer {
    max-width: 1200px;
    margin: 0 auto;
    text-align: center;
    padding: 0 1rem;
}

.free-to-post {
    font-size: 1rem;
    margin-bottom: 0.5rem;
}

.free-to-post span {
    font-weight: bold;
    color: #ff6601;
}

.footer-nav {
    list-style: none;
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin: 0.5rem 0;
}

.footer-nav a {
    color: #ffffff;
    font-size: 0.9rem;
}

.footer-nav a:hover {
    color: #ff6601;
}

.copyright {
    font-size: 0.8rem;
}

/* Responsive Design */
@media (max-width: 768px) {
    .header {
        flex-direction: column;
        gap: 1rem;
    }

    .logins {
        justify-content: center;
    }

    .navigation ul {
        flex-direction: column;
        align-items: center;
        gap: 0.5rem;
    }

    .posts {
        grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    }

    .post-filters {
        flex-direction: column;
        align-items: stretch;
    }

    .footer-nav {
        flex-direction: column;
        gap: 0.5rem;
    }
}

@media (max-width: 480px) {
    .posts {
        grid-template-columns: 1fr;
    }

    .post-filters input,
    .post-filters select {
        width: 100%;
        margin-bottom: 0.5rem;
    }
}

/* Theme: Dark mode overrides */
body.theme-dark {
    background-color: #0f141b;
    color: #e5ebf1;
}

body.theme-dark a {
    color: #8bd88a;
}

body.theme-dark a:hover {
    color: #ffb066;
}

body.theme-dark .header-wrap {
    background-color: #16202a;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.4);
}

body.theme-dark .logins li a {
    color: #e5ebf1;
}

body.theme-dark .logins li a:hover {
    background-color: rgba(139, 216, 138, 0.18);
    color: #8bd88a;
}

body.theme-dark .navigation {
    background-color: #0d4510;
}

body.theme-dark .navigation a {
    color: #f1f5f9;
}

body.theme-dark .navigation a:hover {
    background-color: rgba(255, 255, 255, 0.08);
    color: #c4f7b2;
}

body.theme-dark .posts-wrap,
body.theme-dark .content-card,
body.theme-dark .profile-card,
body.theme-dark .membership-tier,
body.theme-dark .faq-item,
body.theme-dark .posts li,
body.theme-dark .auth-card,
body.theme-dark .messages-list li {
    background-color: #1f2a35;
    color: inherit;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.5);
}

body.theme-dark.page-listings .posts-wrap {
    background-color: #2b331d;
}

body.theme-dark .posts .img-wrap {
    background-color: #24303c;
}

body.theme-dark .posts a {
    color: #e5ebf1;
}

body.theme-dark .posts span,
body.theme-dark .posts cite,
body.theme-dark .form-hint,
body.theme-dark .form-note,
body.theme-dark p {
    color: #c5cfdb;
}

body.theme-dark .posts cite {
    color: #96e296;
}

body.theme-dark .posts cite.date {
    color: #93a5b8;
}

body.theme-dark .listing-card-featured,
body.theme-dark .listing-detail-featured {
    border-color: #f7c948;
    box-shadow: 0 8px 18px rgba(0, 0, 0, 0.45), 0 0 0 4px rgba(247, 201, 72, 0.22);
    background-color: #2f2b16;
}

body.theme-dark .featured-pill {
    background: #f7c948;
    color: #1f1400;
}

body.theme-dark input,
body.theme-dark textarea,
body.theme-dark select {
    background-color: #101821;
    color: #e5ebf1;
    border: 1px solid #2d3c4a;
}

body.theme-dark input::placeholder,
body.theme-dark textarea::placeholder {
    color: #738494;
}

body.theme-dark .flash {
    background: #1f2a35;
    color: #dbe4ef;
}

body.theme-dark .flash-success {
    background: #1d3b2b;
    color: #b8f4c8;
}

body.theme-dark .flash-error {
    background: #3b2222;
    color: #f3b1b1;
}

body.theme-dark .form-note a,
body.theme-dark .footer-nav a {
    color: #8bd88a;
}

body.theme-dark .form-note a:hover,
body.theme-dark .footer-nav a:hover {
    color: #ffb066;
}

body.theme-dark .footer-wrap {
    background-color: #0b2c06;
    color: #dbe7d5;
}

body.theme-dark .mini-badge {
    color: #ffffff;
}

@media (prefers-color-scheme: dark) {
    body.theme-system {
        background-color: #0f141b;
        color: #e5ebf1;
    }

    body.theme-system a {
        color: #8bd88a;
    }

    body.theme-system a:hover {
        color: #ffb066;
    }

    body.theme-system .header-wrap {
        background-color: #16202a;
        box-shadow: 0 2px 6px rgba(0, 0, 0, 0.4);
    }

    body.theme-system .logins li a {
        color: #e5ebf1;
    }

    body.theme-system .logins li a:hover {
        background-color: rgba(139, 216, 138, 0.18);
        color: #8bd88a;
    }

    body.theme-system .navigation {
        background-color: #0d4510;
    }

    body.theme-system .navigation a {
        color: #f1f5f9;
    }

    body.theme-system .navigation a:hover {
        background-color: rgba(255, 255, 255, 0.08);
        color: #c4f7b2;
    }

    body.theme-system .posts-wrap,
    body.theme-system .content-card,
    body.theme-system .profile-card,
    body.theme-system .membership-tier,
    body.theme-system .faq-item,
    body.theme-system .posts li,
    body.theme-system .auth-card,
    body.theme-system .messages-list li {
        background-color: #1f2a35;
        color: inherit;
        box-shadow: 0 2px 6px rgba(0, 0, 0, 0.5);
    }

    body.theme-system.page-listings .posts-wrap {
        background-color: #2b331d;
    }

    body.theme-system .posts .img-wrap {
        background-color: #24303c;
    }

    body.theme-system .posts a {
        color: #e5ebf1;
    }

    body.theme-system .posts span,
    body.theme-system .posts cite,
    body.theme-system .form-hint,
    body.theme-system .form-note,
    body.theme-system p {
        color: #c5cfdb;
    }

    body.theme-system .posts cite {
        color: #96e296;
    }

    body.theme-system .posts cite.date {
        color: #93a5b8;
    }

    body.theme-system input,
    body.theme-system textarea,
    body.theme-system select {
        background-color: #101821;
        color: #e5ebf1;
        border: 1px solid #2d3c4a;
    }

    body.theme-system input::placeholder,
    body.theme-system textarea::placeholder {
        color: #738494;
    }

    body.theme-system .flash {
        background: #1f2a35;
        color: #dbe4ef;
    }

    body.theme-system .flash-success {
        background: #1d3b2b;
        color: #b8f4c8;
    }

    body.theme-system .flash-error {
        background: #3b2222;
        color: #f3b1b1;
    }

    body.theme-system .form-note a,
    body.theme-system .footer-nav a {
        color: #8bd88a;
    }

    body.theme-system .form-note a:hover,
    body.theme-system .footer-nav a:hover {
        color: #ffb066;
    }

    body.theme-system .footer-wrap {
        background-color: #0b2c06;
        color: #dbe7d5;
    }

    body.theme-system .mini-badge {
        color: #ffffff;
    }

    body.theme-system .listing-card-featured,
    body.theme-system .listing-detail-featured {
        border-color: #f7c948;
        box-shadow: 0 8px 18px rgba(0, 0, 0, 0.45), 0 0 0 4px rgba(247, 201, 72, 0.22);
        background-color: #2f2b16;
    }

    body.theme-system .featured-pill {
        background: #f7c948;
        color: #1f1400;
    }
}
