/* Theme: Modern Professional */
* { box-sizing: border-box; }
:root {
    --bg-dark: #0f172a;
    --bg-gray: #334155;
    --bg-light-gray: #f8fafc;
    --text-white: #ffffff;
    --text-dark: #1e293b;
    --accent: #2563eb;
    --accent-hover: #1d4ed8;
    --border-color: #e2e8f0;
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --radius-sm: 0.375rem;
    --radius-md: 0.5rem;
    --radius-lg: 0.75rem;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    margin: 0;
    padding: 0;
    background-color: var(--bg-light-gray);
    color: var(--text-dark);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Responsive Content Images */
img {
    max-width: 100%;
    height: auto;
}

/* Utilities for responsive covering photos */
.img-cover {
    width: 100%;
    height: 100% !important;
    object-fit: cover;
    object-position: center;
    display: block;
}

.content-area img {
    display: block;
    max-width: 100%;
    height: auto !important;
    margin: 1.5rem auto;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-md);
    transition: transform 0.3s ease;
}

/* Ensure images respond immediately on narrow window widths (Desktop & Mobile) */
@media (max-width: 600px) {
    .content-area img {
        width: 100% !important;
        margin-left: 0;
        margin-right: 0;
        border-radius: 0; /* Flush look on very narrow views */
        box-shadow: none; /* Cleaner look when edge-to-edge */
    }
    
    .card {
        padding: 15px; /* Reduce card padding on very small views to give images more room */
    }
}

header {
    background-color: var(--bg-dark);
    color: var(--text-white);
    padding: 15px 0;
    box-shadow: var(--shadow-sm);
    border-bottom: 1.5px solid rgba(255, 255, 255, 0.1);
    position: sticky;
    top: 0;
    z-index: 50;
}


header .container {
    padding-top: 0;
    padding-bottom: 0;
}


header a {
    color: var(--text-white);
    text-decoration: none;
    margin-right: 24px;
    font-weight: 500;
    font-size: 0.95rem;
    position: relative;
    transition: color 0.2s ease;
}

header a:hover {
    color: var(--accent);
    filter: brightness(1.2);
}

body.nytmarket header a:hover {
    color: #4ade80; /* Brighter green for better visibility on dark green bg */
}

header .auth-links {
    float: right;
}

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

.card {
    background-color: var(--text-white);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-color);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.card:hover {
    box-shadow: var(--shadow-md);
}

/* Premium Visual AD Card System */
.ad-visual-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 20px;
    margin-top: 15px;
}

.featured-grid-fix {
    grid-template-columns: repeat(3, 1fr) !important;
}

@media (max-width: 992px) {
    .featured-grid-fix {
        grid-template-columns: repeat(2, 1fr) !important;
    }
}

@media (max-width: 600px) {
    .featured-grid-fix {
        grid-template-columns: 1fr !important;
    }
}

.ad-visual-card {
    padding: 0 !important;
    overflow: hidden;
    height: 100%;
    border-radius: 20px !important;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1) !important;
    border: 1px solid #e2e8f0 !important;
}

.ad-card-link {
    text-decoration: none;
    color: inherit;
    display: block;
}

.ad-visual-card:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: 0 20px 40px -10px rgba(0, 0, 0, 0.12) !important;
    border-color: var(--accent) !important;
    z-index: 10;
}

.ad-visual-card .image-wrap {
    width: 100%;
    aspect-ratio: 4/3;
    overflow: hidden;
    background: #f1f5f9;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

.ad-visual-card .image-wrap img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s ease;
}

.ad-visual-card:hover .image-wrap img {
    transform: scale(1.1);
}

.ad-badge-featured {
    position: absolute;
    top: 12px;
    right: 12px;
    background: rgba(254, 240, 138, 0.95);
    color: #854d0e;
    padding: 4px 10px;
    border-radius: 8px;
    font-size: 10px;
    font-weight: 800;
    backdrop-filter: blur(4px);
    border: 1px solid rgba(254, 240, 138, 0.3);
    z-index: 5;
}

.ad-card-price {
    position: absolute;
    bottom: 10px;
    right: 10px;
    background: rgba(15, 23, 42, 0.7);
    color: white;
    padding: 4px 8px;
    border-radius: 6px;
    font-size: 11px;
    font-weight: 600;
    backdrop-filter: blur(4px);
}

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

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    font-size: 0.9rem;
    color: #475569;
}

.form-group input, .form-group textarea, .form-group select {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    box-sizing: border-box;
    font-family: inherit;
    font-size: 0.95rem;
    background-color: #fcfcfc;
    transition: all 0.2s ease;
    color: var(--text-dark);
}

.form-group input:focus, .form-group textarea:focus, .form-group select:focus {
    outline: none;
    border-color: var(--accent);
    background-color: var(--text-white);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
}

button, .btn {
    background-color: var(--accent);
    color: var(--text-white);
    padding: 10px 20px;
    border: none;
    border-radius: var(--radius-md);
    cursor: pointer;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 0.95rem;
    transition: all 0.2s ease;
    box-shadow: var(--shadow-sm);
}

button:hover, .btn:hover {
    background-color: var(--accent-hover);
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}

button:active, .btn:active {
    transform: translateY(0);
}

footer {
    background-color: var(--bg-dark);
    color: #cbd5e1;
    text-align: center;
    padding: 30px 20px;
    margin-top: 60px;
    font-size: 0.9rem;
    border-top: 1px solid #1e293b;
}

/* Utilities */
.text-center { text-align: center; }
.mb-3 { margin-bottom: 1.25rem; }
.d-flex { display: flex; }
.justify-content-between { justify-content: space-between; }
.align-items-center { align-items: center; }
.google-map { width: 100%; height: 350px; background-color: #e2e8f0; margin-top: 15px; border-radius: var(--radius-md); overflow: hidden; }

/* Mobile Navigation */
.menu-toggle {
    display: none;
    font-size: 24px;
    cursor: pointer;
    background: transparent;
    color: var(--text-white);
    border: none;
    padding: 5px;
    transition: opacity 0.2s ease;
}

.menu-toggle:hover {
    opacity: 0.8;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 20px;
}
.nav-links i { font-size: 18px; margin-right: 6px; }

/* Icon mode logic */
.nav-icons-only .nav-text { display: none; }
.nav-icons-only i { margin-right: 0; font-size: 20px; }

.nav-links .auth-links {
    display: flex;
    align-items: center;
    gap: 15px;
}
.nav-links hr { display: none; border: none; height: 1px; background: #334155; margin: 15px 0; width: 100%; }

@media (max-width: 992px) {
    .nav-icons-only .nav-text { display: inline; }
    .nav-icons-only i { margin-right: 8px; font-size: 18px; }
    .container { padding: 15px; }
    
    .menu-toggle { display: block; }
    
    .logo-section { width: 100%; display: flex; justify-content: space-between; align-items: center; }
    
    .nav-links {
        display: none;
        flex-direction: column;
        width: 100%;
        background: var(--bg-dark);
        border-top: 1px solid #1e293b;
        position: absolute;
        top: 85px;
        left: 0;
        z-index: 1000;
        padding: 24px;
        box-sizing: border-box;
        align-items: flex-start;
        max-height: calc(100vh - 85px);
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
        box-shadow: var(--shadow-lg);
    }
    .nav-links.active { display: flex; }
    .nav-links hr { display: block; }
    .nav-links a { margin: 10px 0; width: 100%; font-size: 1.05rem; }
    .nav-links .auth-links {
        flex-direction: column;
        align-items: flex-start;
        width: 100%;
        gap: 0;
    }
    .d-flex { flex-direction: column; }
    .card form.d-flex { flex-direction: column; gap: 15px; }
    .card form.d-flex input, .card form.d-flex select, .card form.d-flex button { width: 100% !important; margin: 0; }
    
    /* Layout stacking */
    div[style*="display: grid;"] {
        grid-template-columns: 1fr !important;
    }
    
    table { width: 100%; border-collapse: collapse; }
    table thead { display: none; }
    table, table tbody, table tr, table td { display: block; width: 100%; box-sizing: border-box; }
    table tr { margin-bottom: 20px; border: 1px solid var(--border-color); border-radius: var(--radius-md); padding: 5px; box-shadow: var(--shadow-sm); }
    table td { text-align: right; padding: 12px 12px 12px 50%; position: relative; border-bottom: 1px solid #f1f5f9; }
    table td:last-child { border-bottom: none; }
    table td:before {
        content: attr(data-label);
        position: absolute;
        left: 15px;
        width: 45%;
        padding-right: 15px;
        white-space: nowrap;
        text-align: left;
        font-weight: 600;
        color: #64748b;
    }
}
@media (max-width: 768px) {
    .search-hero-card {
        padding: 20px 15px !important;
    }
    .search-hero-card h2 {
        font-size: 1.25rem !important;
        margin-bottom: 15px !important;
    }
    .search-hero-card form {
        gap: 10px !important;
        flex-direction: column !important;
    }
    .search-hero-card form input, 
    .search-hero-card form select, 
    .search-hero-card form button {
        width: 100% !important;
        max-width: 100% !important;
        margin: 0 !important;
        flex: none !important;
        box-sizing: border-box !important;
    }
}

/* Google Translate Modern Skin - Aggressive Centering */
/* --- Permanent Modern Language Selector (Robust Solution) --- */
.language-selector-wrap {
    display: inline-flex !important;
    align-items: center !important;
    background: rgba(255, 255, 255, 0.1) !important;
    border: 1px solid rgba(255, 255, 255, 0.2) !important;
    border-radius: 50px !important;
    padding: 2px 20px !important;
    gap: 12px !important;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
    backdrop-filter: blur(10px) !important;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1) !important;
}

.language-selector-wrap:hover {
    background: rgba(255, 255, 255, 0.15) !important;
    border-color: rgba(255, 255, 255, 0.4) !important;
    transform: translateY(-2px) !important;
}

.language-selector-wrap i {
    color: #ffffff;
    font-size: 16px;
    opacity: 0.8;
}

.modern-lang-select {
    background: transparent !important;
    border: none !important;
    color: #ffffff !important;
    font-size: 14px !important;
    font-weight: 700 !important;
    padding: 10px 0 !important;
    cursor: pointer !important;
    outline: none !important;
    font-family: inherit !important;
    appearance: none !important;
    -webkit-appearance: none !important;
    min-width: 140px !important;
    text-align: center !important;
}

.modern-lang-select option {
    background: var(--bg-dark) !important;
    color: #fff !important;
}

/* Hide Google's native bar if it tries to appear */
.goog-te-banner-frame, .goog-te-gadget { 
    display: none !important; 
}

body { top: 0 !important; }

/* Hide Google's original branding and frames */
.goog-te-banner-frame.skiptranslate, .goog-te-gadget span {
    display: none !important;
}

body {
    top: 0px !important;
}

iframe.goog-te-menu-frame {
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04) !important;
    border: 1px solid #e2e8f0 !important;
    border-radius: 12px !important;
}

/* NytMartket Signature Theme Refinements (Blue & Yellow) */
body.nytmarket header {
    background-color: #00039e; /* Deeper Blue */
    border-bottom: 2px solid #ba8c00; /* Gold/Yellow Accent Line */
}

body.nytmarket .nav-links {
    gap: 12px;
}

body.nytmarket header a {
    margin-right: 5px;
    padding: 8px;
    border-radius: 8px;
    color: #ffffff !important;
}

body.nytmarket header a:hover {
    background: rgba(186, 140, 0, 0.1); /* Yellowish tint on hover */
    color: #ba8c00 !important; /* Yellow text on hover */
}

body.nytmarket .logo-section a {
    color: #ffffff !important;
}

body.nytmarket .nav-text {
    display: none;
}
@media (max-width: 992px) {
    body.nytmarket .nav-text {
        display: inline !important;
        margin-left: 10px;
        font-weight: 600;
        font-size: 14px;
        color: #fff;
    }
}

@media (min-width: 993px) {
    body.nytmarket .main-nav a:hover .nav-text, 
    body.nytmarket .auth-links a:hover .nav-text {
        display: none;
    }
}
