/* ============================================
   Landing Page Styles - Scoped to Landing Page Only
   These styles use "landing-" prefix to avoid conflicts with explore page
   ============================================ */

.landing-page {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.landing-header {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    position: sticky;
    top: 0;
    z-index: 100;
}

.landing-navbar {
    padding: 0.5rem 1rem;
}

.landing-header-content {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 1rem;
}

.landing-logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    color: #1a1a1a;
    text-decoration: none;
    margin-right: 1rem;
    flex: 0 1 auto;
    min-width: 0;
}

.landing-logo i {
    font-size: 2rem;
    color: #667eea;
    flex-shrink: 0;
}

.landing-logo-text {
    font-size: 1.25rem;
    font-weight: 700;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
}

@media (max-width: 1200px) {
    .landing-logo-text {
        font-size: 1.1rem;
    }
}

@media (max-width: 992px) {
    .landing-logo-text {
        font-size: 1rem;
        max-width: 200px;
    }
}

.landing-navbar-toggler {
    border: none;
    padding: 0.5rem;
    background: transparent;
    color: #1a1a1a;
    font-size: 1.5rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.3s;
}

.landing-navbar-toggler:hover {
    color: #667eea;
}

.landing-navbar-toggler:focus {
    box-shadow: none;
    outline: none;
}

.landing-navbar-toggler .navbar-toggler-icon {
    display: flex;
    align-items: center;
    justify-content: center;
}

.landing-navbar-toggler .navbar-toggler-icon i {
    font-size: 1.75rem;
}

.landing-nav {
    display: flex;
    gap: 1rem;
    align-items: center;
    flex-wrap: wrap;
}

.landing-nav-link {
    color: #1a1a1a;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s;
    padding: 0.5rem 1rem;
}

.landing-nav-link:hover {
    color: #667eea;
}

.landing-nav-btn {
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    background: transparent;
    color: #1a1a1a;
    font-size: 0.95rem;
}

.landing-nav-btn:hover {
    background: #f3f4f6;
    color: #667eea;
}

.landing-nav-btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.landing-nav-btn-primary:hover {
    background: linear-gradient(135deg, #5568d3 0%, #653a8f 100%);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

/* Hero/Welcome Section */
.landing-hero {
    padding: 4rem 2rem;
    text-align: center;
    color: white;
    position: relative;
}

.landing-hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.3);
    z-index: 0;
}

.landing-hero-content {
    max-width: 800px;
    margin: 0 auto;
    position: relative;
    z-index: 1;
}

.landing-hero-branding {
    margin-bottom: 2rem;
}

.landing-hero-logo {
    width: 100px;
    height: 100px;
    background: rgba(255, 255, 255, 0.25);
    backdrop-filter: blur(10px);
    border-radius: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.5rem;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
    border: 2px solid rgba(255, 255, 255, 0.3);
}

.landing-hero-logo i {
    font-size: 3rem;
    color: white;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.landing-hero-title {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
    color: white;
    text-shadow: 0 3px 12px rgba(0, 0, 0, 0.5), 0 1px 3px rgba(0, 0, 0, 0.4);
    letter-spacing: -0.5px;
}

.landing-hero-description {
    font-size: 1.25rem;
    line-height: 1.6;
    color: rgba(255, 255, 255, 0.95);
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.4), 0 1px 2px rgba(0, 0, 0, 0.3);
    font-weight: 400;
}

/* Categories Section */
.landing-categories-section {
    background: white;
    padding: 2rem 1rem;
    margin-top: 0;
}

.landing-categories-container {
    max-width: 1400px;
    margin: 0 auto;
}

.landing-categories-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    flex-wrap: wrap;
    gap: 1rem;
}

.landing-categories-title {
    font-size: 1.625rem;
    font-weight: 600;
    color: #1a1a1a;
    margin: 0;
}

.landing-categories-view-all {
    display: flex;
    align-items: center;
    gap: 0.625rem;
    font-size: 1.5rem;
    font-weight: 700;
    color: #0179FF;
    text-decoration: none;
    transition: color 0.2s;
}

.landing-categories-view-all:hover {
    color: #0056b3;
    text-decoration: none;
}

.landing-categories-view-all svg {
    width: 21px;
    height: 21px;
    flex-shrink: 0;
}

.landing-categories-grid {
    display: grid;
    gap: 0.9375rem;
    width: 100%;
    /* grid-template-columns will be set dynamically via JavaScript */
}

.landing-category-card {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    align-items: center;
    background: #f3f4f6;
    border-radius: 8px;
    padding: 1rem;
    min-height: 140px;
    text-decoration: none;
    color: #1a1a1a;
    transition: background-color 0.2s, transform 0.2s, box-shadow 0.2s;
    position: relative;
    border: 1px solid transparent;
    text-align: center;
}

.landing-category-card:hover {
    background: #e5e7eb;
    transform: translateY(-2px);
    text-decoration: none;
    color: #1a1a1a;
    border-color: #d1d5db;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.landing-category-title {
    font-size: 1rem;
    font-weight: 600;
    margin: 0 0 0.75rem 0;
    color: #1a1a1a;
    line-height: 1.3;
    word-wrap: break-word;
    overflow-wrap: break-word;
    hyphens: auto;
}

.landing-category-icon {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-top: auto;
    width: 100%;
}

.landing-category-icon i {
    font-size: 2.5rem;
    color: #6b7280;
    width: 70px;
    height: 70px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Full Screen Explore Section */
.landing-explore-fullscreen {
    flex: 1;
    background: white;
    padding: 3rem 2rem;
    overflow-y: auto;
}

.landing-explore-container {
    max-width: 1400px;
    margin: 0 auto;
}

.landing-explore-header {
    text-align: center;
    margin-bottom: 3rem;
}

.landing-explore-title {
    font-size: 2.5rem;
    font-weight: 700;
    color: #1a1a1a;
    margin-bottom: 0.75rem;
}

.landing-explore-subtitle {
    color: #6b7280;
    font-size: 1.1rem;
}

.landing-explore-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-bottom: 3rem;
}

.landing-ad-card {
    background: white;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s, box-shadow 0.3s;
    cursor: pointer;
    border: 1px solid #e5e7eb;
}

.landing-ad-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
}

.landing-ad-card-image {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

.landing-ad-card-body {
    padding: 1.25rem;
}

.landing-ad-card-title {
    font-size: 1rem;
    font-weight: 600;
    color: #1a1a1a;
    margin-bottom: 0.75rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.landing-ad-card-price {
    font-size: 1.25rem;
    font-weight: 700;
    color: #667eea;
}

.explore-view-all {
    text-align: center;
    margin-top: 2rem;
}

.explore-view-all-btn {
    display: inline-block;
    padding: 1rem 2.5rem;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    text-decoration: none;
    border-radius: 12px;
    font-weight: 600;
    font-size: 1.1rem;
    transition: transform 0.3s, box-shadow 0.3s;
}

.explore-view-all-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(102, 126, 234, 0.4);
}

/* Empty State Styles */
.landing-empty-state {
    grid-column: 1 / -1;
    text-align: center;
    padding: 4rem 2rem;
    background: linear-gradient(135deg, #f8f9fa 0%, #ffffff 100%);
    border-radius: 20px;
    border: 2px dashed #e5e7eb;
    margin: 2rem 0;
}

.empty-state-icon {
    width: 120px;
    height: 120px;
    margin: 0 auto 2rem;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 8px 24px rgba(102, 126, 234, 0.3);
}

.empty-state-icon i {
    font-size: 4rem;
    color: white;
}

.empty-state-title {
    font-size: 2rem;
    font-weight: 700;
    color: #1a1a1a;
    margin: 0 0 1rem 0;
}

.empty-state-description {
    font-size: 1.1rem;
    color: #6b7280;
    line-height: 1.7;
    max-width: 600px;
    margin: 0 auto 2.5rem;
}

.empty-state-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

.empty-state-actions .btn-modern {
    padding: 1rem 2rem;
    font-size: 1.1rem;
    font-weight: 600;
    border-radius: 12px;
    transition: all 0.3s;
    min-width: 200px;
}

.empty-state-actions .btn-modern:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(102, 126, 234, 0.3);
}

.empty-state-actions .btn-outline-secondary {
    border: 2px solid #e5e7eb;
    background: white;
    color: #374151;
}

.empty-state-actions .btn-outline-secondary:hover {
    background: #f9fafb;
    border-color: #d1d5db;
    color: #1a1a1a;
}

/* Auth Modals */
.auth-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1000;
    align-items: center;
    justify-content: center;
}

.auth-modal.active {
    display: flex;
}

.auth-modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
}

.auth-modal-content {
    position: relative;
    background: white;
    border-radius: 20px;
    width: 90%;
    max-width: 560px;
    max-height: 95vh;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    z-index: 1001;
    animation: modalSlideIn 0.3s ease-out;
    display: flex;
    flex-direction: column;
    height: auto;
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.auth-modal-header {
    padding: 1.75rem 2rem 1.25rem;
    border-bottom: 1px solid #e5e7eb;
    position: relative;
    flex-shrink: 0;
}

.auth-modal-close {
    position: absolute;
    top: 1.5rem;
    right: 1.5rem;
    background: none;
    border: none;
    font-size: 1.5rem;
    color: #6b7280;
    cursor: pointer;
    padding: 0.5rem;
    line-height: 1;
    transition: color 0.3s;
}

.auth-modal-close:hover {
    color: #1a1a1a;
}

.auth-modal-title {
    font-size: 1.75rem;
    font-weight: 700;
    color: #1a1a1a;
    margin-bottom: 0.5rem;
}

.auth-modal-subtitle {
    color: #6b7280;
    font-size: 0.95rem;
}

.auth-form {
    padding: 1.75rem 2rem 2rem;
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
    scrollbar-width: thin;
    scrollbar-color: #cbd5e1 transparent;
    min-height: 0;
    -webkit-overflow-scrolling: touch;
}

.auth-form::-webkit-scrollbar {
    width: 6px;
}

.auth-form::-webkit-scrollbar-track {
    background: transparent;
}

.auth-form::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 3px;
}

.auth-form::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}

.auth-form .form-group {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
    margin-bottom: 0;
}

.auth-form .form-label {
    font-size: 0.9rem;
    font-weight: 600;
    color: #374151;
    margin-bottom: 0.25rem;
}

.auth-form .form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.auth-form button[type="submit"] {
    margin-top: 0.5rem;
    flex-shrink: 0;
}

.password-strength-meter {
    margin-top: 0.4rem;
    height: 4px;
    background: #e5e7eb;
    border-radius: 2px;
    overflow: hidden;
}

.password-strength-bar {
    height: 100%;
    width: 0%;
    transition: all 0.3s;
    border-radius: 2px;
}

.password-strength-bar.weak {
    width: 33%;
    background: #ef4444;
}

.password-strength-bar.medium {
    width: 66%;
    background: #f59e0b;
}

.password-strength-bar.strong {
    width: 100%;
    background: #10b981;
}

.password-strength-text {
    margin-top: 0.25rem;
    font-size: 0.75rem;
    color: #6b7280;
}

.password-requirements {
    margin-top: 0.5rem;
    font-size: 0.75rem;
    color: #6b7280;
    transition: all 0.3s ease;
}

.password-requirements ul {
    margin: 0.4rem 0 0 1.25rem;
    padding: 0;
    list-style: none;
}

.password-requirements li {
    margin: 0.3rem 0;
    padding-left: 1.5rem;
    position: relative;
    line-height: 1.4;
}

.password-requirements li::before {
    content: "○";
    position: absolute;
    left: 0;
    color: #9ca3af;
    font-size: 0.6rem;
}

.password-requirements li.valid {
    color: #10b981;
}

.password-requirements li.valid::before {
    content: "✓";
    color: #10b981;
    font-size: 0.9rem;
    font-weight: bold;
}

@media (max-width: 991.98px) {
    .landing-navbar {
        padding: 0.75rem 1rem;
    }

    .landing-logo {
        margin-right: 0.5rem;
    }

    .landing-logo i {
        font-size: 1.5rem;
    }

    .landing-nav {
        width: 100%;
        flex-direction: column;
        align-items: stretch;
        gap: 0.5rem;
        padding: 1rem 0;
        margin-top: 0.5rem;
    }

    .landing-nav-link {
        padding: 0.75rem 1rem;
        text-align: center;
        border-radius: 8px;
        transition: background-color 0.3s;
    }

    .landing-nav-link:hover {
        background-color: #f3f4f6;
    }

    .landing-nav-btn {
        width: 100%;
        text-align: center;
        padding: 0.875rem 1.5rem;
    }

    .landing-nav-btn-primary {
        margin-top: 0.5rem;
    }
}

@media (max-width: 768px) {
    .landing-header {
        padding: 0;
    }

    .landing-logo-text {
        font-size: 0.9rem;
    }

    .landing-hero {
        padding: 3rem 1.5rem;
    }

    .landing-hero-title {
        font-size: 2rem;
    }

    .landing-hero-description {
        font-size: 1.1rem;
    }

    .landing-explore-fullscreen {
        padding: 2rem 1rem;
    }

    .landing-explore-title {
        font-size: 2rem;
    }

    .landing-explore-grid {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
        gap: 1rem;
    }

    .landing-empty-state {
        padding: 3rem 1.5rem;
        margin: 1.5rem 0;
        border-radius: 16px;
    }

    .empty-state-icon {
        width: 100px;
        height: 100px;
        margin-bottom: 1.5rem;
    }

    .empty-state-icon i {
        font-size: 3rem;
    }

    .empty-state-title {
        font-size: 1.5rem;
        margin-bottom: 0.75rem;
    }

    .empty-state-description {
        font-size: 1rem;
        margin-bottom: 2rem;
    }

    .empty-state-actions {
        flex-direction: column;
        align-items: stretch;
    }

    .empty-state-actions .btn-modern {
        width: 100%;
        min-width: auto;
        padding: 0.875rem 1.5rem;
        font-size: 1rem;
    }

    .auth-modal {
        align-items: flex-end;
    }

    .auth-modal-content {
        width: 100%;
        max-width: 100%;
        height: 100vh;
        max-height: 100vh;
        border-radius: 24px 24px 0 0;
        margin-top: 0;
        display: flex;
        flex-direction: column;
    }

    .auth-modal-header {
        padding: 1.5rem 1.5rem 1rem;
        flex-shrink: 0;
    }

    .auth-form {
        padding: 1.25rem 1.5rem 3rem;
        gap: 1rem;
        flex: 1;
        overflow-y: auto;
        overflow-x: hidden;
        min-height: 0;
        -webkit-overflow-scrolling: touch;
    }

    .auth-form button[type="submit"] {
        margin-top: 1rem;
        padding: 1rem;
        font-size: 1rem;
    }

    .form-row {
        grid-template-columns: 1fr !important;
        gap: 1.25rem !important;
    }
}

@media (max-width: 480px) {
    .landing-logo-text {
        font-size: 0.8rem;
    }

    .landing-logo i {
        font-size: 1.25rem;
    }

    .auth-modal-content {
        height: 100vh;
        max-height: 100vh;
        border-radius: 0;
    }

    .auth-modal-header {
        padding: 1.25rem 1.25rem 0.875rem;
        flex-shrink: 0;
    }

    .auth-form {
        padding: 1rem 1.25rem 3rem;
        gap: 0.875rem;
        flex: 1;
        overflow-y: auto;
        overflow-x: hidden;
        min-height: 0;
        -webkit-overflow-scrolling: touch;
    }

    .auth-form button[type="submit"] {
        margin-top: 1rem;
        padding: 1rem;
        font-size: 1rem;
    }

    .auth-modal-title {
        font-size: 1.4rem;
    }

    .auth-modal-subtitle {
        font-size: 0.85rem;
    }

    .auth-form .form-group {
        gap: 0.35rem;
    }

    .landing-empty-state {
        padding: 2rem 1rem;
    }

    .empty-state-icon {
        width: 80px;
        height: 80px;
        margin-bottom: 1rem;
    }

    .empty-state-icon i {
        font-size: 2.5rem;
    }

    .empty-state-title {
        font-size: 1.25rem;
    }

    .empty-state-description {
        font-size: 0.95rem;
        margin-bottom: 1.5rem;
    }

    /* Categories Section Mobile */
    .landing-categories-section {
        padding: 1.5rem 1rem;
    }

    .landing-categories-header {
        flex-direction: column;
        align-items: flex-start;
        margin-bottom: 1.5rem;
    }

    .landing-categories-title {
        font-size: 1.25rem;
    }

    .landing-categories-view-all {
        font-size: 1.125rem;
        align-self: flex-end;
    }

    .landing-categories-grid {
        gap: 0.75rem;
        /* Keep dynamic columns but ensure minimum width */
    }
    
    .landing-category-card {
        min-width: 0; /* Allow cards to shrink on mobile */
        min-height: 130px;
        padding: 0.875rem;
    }

    .landing-category-title {
        font-size: 0.875rem;
        margin-bottom: 0.625rem;
    }

    .landing-category-icon i {
        font-size: 2.25rem;
        width: 60px;
        height: 60px;
    }
}

@media (max-width: 480px) {
    .landing-categories-grid {
        gap: 0.625rem;
        /* Keep dynamic columns on mobile too */
    }

    .landing-category-card {
        min-height: 120px;
        padding: 0.75rem;
    }

    .landing-category-title {
        font-size: 0.8125rem;
        margin-bottom: 0.5rem;
    }

    .landing-category-icon i {
        font-size: 2rem;
        width: 50px;
        height: 50px;
    }
}
