/* assets/css/style.css */
:root {
    --primary-color: #4f46e5;
    /* Indigo 600 */
    --primary-hover: #4338ca;
    /* Indigo 700 */
    --secondary-color: #0ea5e9;
    /* Sky 500 */
    --bg-color: #f8fafc;
    /* Slate 50 */
    --surface-color: #ffffff;
    --text-color: #1e293b;
    /* Slate 800 */
    --text-light: #64748b;
    /* Slate 500 */
    --danger-color: #ef4444;
    /* Red 500 */
    --success-color: #10b981;
    /* Emerald 500 */
    --border-color: #e2e8f0;
    /* Slate 200 */
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
    --glass-bg: rgba(255, 255, 255, 0.7);
    --glass-border: rgba(255, 255, 255, 0.3);
    --border-radius: 12px;
    --transition: all 0.3s ease;
    --gold: #f59e0b;
    /* Amber 500 */
}

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

body {
    font-family: 'Outfit', sans-serif;
    background-color: var(--bg-color);
    color: var(--text-color);
    line-height: 1.6;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

/* Typography */
h1,
h2,
h3,
h4,
h5,
h6 {
    font-weight: 700;
    color: var(--text-color);
    margin-bottom: 1rem;
}

cursive-brand {
    font-family: 'Dancing Script', cursive;
    color: var(--gold);
    font-size: 1.4em;
    font-weight: 700;
}

.cursive-brand .red-letter {
    font-family: 'Great Vibes', cursive;
    color: var(--danger-color);
    font-size: 1.15em;
    line-height: 1;
    vertical-align: middle;
}


/* Scritte più grandi nella navbar desktop */
.nav-links .cursive-brand {
    font-size: 1.35rem;
}

/* Scritte più grandi nel menu mobile */
.mobile-menu .cursive-brand {
    font-size: 1.35rem;
}

a {
    color: var(--primary-color);
    text-decoration: none;
    transition: var(--transition);
}

a:hover {
    color: var(--primary-hover);
}

.text-danger {
    color: var(--danger-color);
}

.text-success {
    color: var(--success-color);
}


/* Navbar */
.navbar {
    background: var(--glass-bg);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--glass-border);
    position: sticky;
    top: 0;
    z-index: 100;
    padding: 1rem 2rem;
    box-shadow: var(--shadow-sm);
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-logo {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-color);
    display: flex;
    align-items: center;
}

.main-logo {
    max-height: 100px;
    max-width: 100%;
    width: auto;
    object-fit: contain;
    border-radius: 1px;
}

/* Allarga il logo del 30% su PC senza cambiare l'altezza */
@media (min-width: 769px) {
    .main-logo {
        transform: scaleX(1.3);
        transform-origin: left;
        margin-right: 3rem;
        /* Spazio extra per evitare sovrapposizioni con i link */
    }
}

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

.nav-links {
    display: flex;
    gap: 1.5rem;
    align-items: center;
}

.nav-links a.btn-primary,
.nav-links a.btn-outline,
.nav-links a.btn-ghost {
    padding: 0.5rem 1rem;
    border-radius: 8px;
    font-weight: 600;
    font-size: 0.9rem;
}

.btn-primary {
    background-color: #ff6f3c;
    color: white;
    box-shadow: var(--shadow-sm);
}

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

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

.btn-outline:hover {
    background-color: var(--primary-color);
    color: white;
}

.btn-ghost {
    color: var(--text-color);
}

.btn-ghost:hover {
    background-color: var(--border-color);
}

/* Dropdown Navbar */
.dropdown {
    position: relative;
    display: inline-block;
}

.dropbtn {
    background: none;
    border: none;
    font-family: 'Outfit', sans-serif;
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-color);
    cursor: pointer;
    padding: 0.5rem;
}

.dropdown-content {
    display: none;
    position: absolute;
    right: 0;
    background-color: var(--surface-color);
    min-width: 160px;
    box-shadow: var(--shadow-lg);
    border-radius: var(--border-radius);
    z-index: 1;
    overflow: hidden;
    border: 1px solid var(--border-color);
}

.dropdown-content a {
    color: var(--text-color);
    padding: 12px 16px;
    text-decoration: none;
    display: block;
    font-size: 0.9rem;
}

.dropdown-content a:hover {
    background-color: var(--bg-color);
}

.dropdown:hover .dropdown-content {
    display: block;
}

.mobile-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--text-color);
}

.mobile-menu {
    display: none;
    flex-direction: column;
    padding: 1rem 0;
    gap: 1rem;
    background: var(--surface-color);
    margin-top: 1rem;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-md);
}

.mobile-menu a {
    padding: 0.5rem 1rem;
    color: var(--text-color);
    font-weight: 600;
}

/* Layout */
.main-content {
    flex: 1;
    padding: 3rem 2rem;
    max-width: 1200px;
    margin: 0 auto;
    width: 100%;
}

/* Footer */
.footer {
    background-color: var(--surface-color);
    padding: 3rem 2rem 1rem;
    border-top: 1px solid var(--border-color);
    margin-top: auto;
}

.footer-container {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 2rem;
}

.footer-brand p {
    color: var(--text-light);
    margin-top: 0.5rem;
    max-width: 300px;
}

.footer-links ul {
    list-style: none;
}

.footer-links li {
    margin-bottom: 0.5rem;
}

.footer-links a {
    color: var(--text-light);
}

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

.footer-bottom {
    text-align: center;
    padding-top: 2rem;
    margin-top: 2rem;
    border-top: 1px solid var(--border-color);
    color: var(--text-light);
    font-size: 0.9rem;
}

/* Forms & Cards */
.card {
    background: var(--surface-color);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-md);
    padding: 2rem;
    border: 1px solid var(--glass-border);
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-label {
    display: block;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: var(--text-color);
}

.form-control {
    width: 100%;
    padding: 0.75rem 1rem;
    font-family: 'Outfit', sans-serif;
    font-size: 1rem;
    color: var(--text-color);
    background-color: var(--bg-color);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    transition: var(--transition);
}

.form-control:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.2);
}

.btn {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    font-family: 'Outfit', sans-serif;
    font-weight: 600;
    font-size: 1rem;
    text-align: center;
    border-radius: 8px;
    cursor: pointer;
    border: none;
    transition: var(--transition);
    width: 100%;
}

.btn-primary {
    background-color: #5585b5;
    color: white;
}

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

/* Auth Pages */
.auth-container {
    max-width: 450px;
    margin: 2rem auto;
}

.auth-header {
    text-align: center;
    margin-bottom: 2rem;
}

.auth-header h1 {
    font-size: 2rem;
    margin-bottom: 0.5rem;
}

.auth-header p {
    color: var(--text-light);
}

/* Alerts */
.alert {
    padding: 1rem;
    border-radius: 8px;
    margin-bottom: 1.5rem;
    font-weight: 500;
}

.alert-danger {
    background-color: #fef2f2;
    color: #b91c1c;
    border: 1px solid #fecaca;
}

.alert-success {
    background-color: #ecfdf5;
    color: #047857;
    border: 1px solid #a7f3d0;
}

.alert-info {
    background-color: #eff6ff;
    color: #1d4ed8;
    border: 1px solid #bfdbfe;
}

/* Responsive */
@media (max-width: 768px) {
    .nav-links {
        display: none;
        /* Hidden on mobile */
    }

    .mobile-toggle {
        display: block;
    }

    .main-content {
        padding: 2rem 1rem;
    }

    .grid-2col {
        grid-template-columns: 1fr !important;
    }
}

/* Grid system moved to consolidated section below */


/* Ad Card Optimization */
.listing-card {
    display: flex;
    flex-direction: column;
    overflow: hidden;
    padding: 0;
    height: 100%;
    background: white;
    border-radius: 12px;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
    border: 1px solid var(--border-color);
}

.listing-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-md);
}

/* Image wrapper moved to consolidated section below */


.listing-price-tag {
    position: absolute;
    top: 15px;
    left: 15px;
    background: #10b981;
    /* Verde come richiesto */
    color: white;
    padding: 4px 10px;
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 800;
    z-index: 15;
    box-shadow: var(--shadow-md);
}

.company-badge {
    position: absolute;
    top: 15px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.7);
    color: white;
    padding: 6px 15px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: bold;
    z-index: 20;
    box-shadow: var(--shadow-md);
    display: flex;
    align-items: center;
    gap: 8px;
    text-transform: uppercase;
    letter-spacing: 1px;
    backdrop-filter: blur(4px);
    pointer-events: none;
    white-space: nowrap;
}

.company-badge-bank {
    position: absolute;
    bottom: 10px;
    right: 10px;
    background: linear-gradient(135deg, #2563eb, #1d4ed8);
    color: white;
    padding: 4px 12px;
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 800;
    z-index: 25;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    white-space: nowrap;
    backdrop-filter: blur(4px);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.2);
    pointer-events: none;
    display: inline-block;
}

.company-badge i,
.company-badge svg {
    font-size: 1rem;
}

.company-header-banner {
    background: linear-gradient(135deg, #1e293b 0%, #334155 100%);
    color: white;
    padding: 2.5rem;
    border-radius: var(--border-radius);
    margin-bottom: 2rem;
    box-shadow: var(--shadow-lg);
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.company-header-banner h2 {
    color: #fbd38d;
    font-size: 2rem;
    margin-bottom: 0.5rem;
}

.company-header-banner p {
    font-size: 1.1rem;
    opacity: 0.9;
    max-width: 600px;
}

.btn-company {
    background: linear-gradient(to right, #f59e0b, #d97706);
    color: white !important;
    border: none;
    padding: 0.8rem 1.8rem;
    border-radius: 50px;
    font-weight: 700;
    font-size: 1rem;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    transition: var(--transition);
    box-shadow: 0 4px 15px rgba(217, 119, 6, 0.3);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    width: auto;
}

.btn-company:hover {
    transform: translateY(-3px) scale(1.02);
    box-shadow: 0 6px 20px rgba(217, 119, 6, 0.4);
    background: linear-gradient(to right, #fbbf24, #f59e0b);
}

.listing-card-info {
    padding: 0.75rem;
    /* Reduced padding */
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.listing-card-title {
    font-size: 1rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.3;
    min-height: 2.6em;
    display: block; /* Fallback per browser che non supportano flex-box clamp */
}

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

.listing-card-location {
    font-size: 0.75rem;
    color: var(--text-light);
    margin-top: auto;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Promo Placeholder */
.promo-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: #f0f7ff;
    border: 2px solid #3b82f6 !important;
    /* Blue profile */
    border-radius: 12px;
    min-height: 200px;
    margin: 1rem 0;
    grid-column: 1 / -1;
    /* Take full width of the row */
}


/* Consolidated Grid System */
.listing-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    /* Default to compact mobile style */
    gap: 0.75rem;
}

.listing-card-image-wrapper {
    height: 140px;
    /* Base height for all devices */
    overflow: hidden;
    position: relative;
    border: 1.5px solid #d32f2f;
    box-sizing: border-box;
    border-radius: 12px;
    margin: 8px;
}

@media (min-width: 769px) {
    .listing-grid {
        grid-template-columns: repeat(4, 1fr) !important;
        gap: 1.5rem !important;
    }
}

@media (max-width: 768px) {
    .listing-grid {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 0.5rem !important;
    }

    .listing-card-image-wrapper {
        height: 130px !important;
        margin: 4px !important;
        border-width: 1px !important;
    }

    .listing-price-tag {
        font-size: 0.7rem !important;
        padding: 2px 6px !important;
        top: 5px !important;
        left: 5px !important;
    }

    .listing-card-info {
        padding: 0.5rem !important;
    }

    .listing-card-title {
        font-size: 0.85rem !important;
    }

    .listing-card-location {
        font-size: 0.7rem !important;
    }
}

.compact-hidden {
    display: none !important;
}

.modal-close {
    position: absolute;
    top: 20px;
    right: 20px;
    color: white;
    font-size: 50px;
    font-weight: bold;
    cursor: pointer;
    z-index: 10001;
    background: rgba(0, 0, 0, 0.4);
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: var(--transition);
    line-height: 1;
}

.modal-close:hover {
    background: rgba(0, 0, 0, 0.7);
    transform: scale(1.1);
}

/* Detail Pages Optimization */
.detail-container {
    max-width: 900px !important;
    margin: 0 auto;
    padding: 2rem 1rem;
}

.detail-card {
    background: white;
    border-radius: 16px;
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    margin-bottom: 2rem;
    border: 1px solid var(--border-color);
}

.detail-carousel-wrapper {
    position: relative;
    width: 100%;
    height: 450px;
    background: #f1f5f9;
    overflow: hidden;
    border: 2px solid #d32f2f;
    /* Bordino rosso richiesto */
    border-radius: 12px;
    /* Angoli smussati richiesti */
    margin: 1.5rem;
    /* Margine per distaccarlo dal bordo della card */
    width: calc(100% - 3rem);
    /* Compensazione margine */
    box-shadow: var(--shadow-md);
    margin-bottom: 2.5rem;
    /* Separazione dalle scritte */
}

.detail-content {
    padding: 2.5rem;
}

.detail-title {
    margin-bottom: 0.25rem !important;
    /* Testi più vicini vertically */
    color: var(--text-color);
    display: flex;
    align-items: center;
    font-size: 2.2rem;
    line-height: 1.1;
}

.detail-tags-container {
    margin-bottom: 0.75rem !important;
    display: flex;
    gap: 0.5rem;
    row-gap: 0.75rem;
    /* Separazione più netta se vanno a capo */
    flex-wrap: wrap;
    align-items: center;
}

.detail-tag {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.4rem 0.8rem;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
    border: 1px solid transparent;
}

.tag-date {
    background: #f1f5f9;
    color: #475569;
    border-color: #cbd5e1;
}

.tag-location {
    background: #e0f2fe;
    color: #0369a1;
    border-color: #bae6fd;
}

.tag-category {
    background: #fef3c7;
    color: #92400e;
    border-color: #fde68a;
}

.detail-price-inline {
    color: var(--secondary-color);
    font-weight: 800;
    font-size: 1.8rem;
    margin: 0;
}

.detail-info-box {
    background: #f8fafc;
    padding: 1.5rem;
    border: 1px solid var(--border-color);
    border-radius: 12px;
    margin-bottom: 2.5rem;
    line-height: 1.7;
}

.detail-info-box h3 {
    font-size: 1.1rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-light);
    margin-bottom: 1rem;
}

#modalImage {
    margin: auto;
    display: block;
    max-width: 90%;
    max-height: 90%;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    object-fit: contain;
    border: 2px solid #d32f2f;
    /* Profilo rosso come richiesto */
    border-radius: 12px;
    box-shadow: 0 0 20px rgba(211, 47, 47, 0.3);
}

@media (max-width: 768px) {
    .detail-container {
        padding: 1rem 0.5rem !important;
    }

    .detail-card {
        border-radius: 12px;
        /* Ripristino angoli anche su mobile */
        margin: 0 0.5rem 1rem !important;
        /* Stacco dai bordi del telefono */
        border: 1px solid var(--border-color);
        box-shadow: var(--shadow-sm);
    }

    .detail-carousel-wrapper {
        height: 250px;
        margin: 0.75rem;
        width: calc(100% - 1.5rem);
        margin-bottom: 1rem;
        border: 2px solid #d32f2f !important;
        /* Forza bordo rosso su mobile */
        border-radius: 10px !important;
        /* Forza angoli smussati su mobile */
    }

    .detail-content {
        padding: 1rem 1.25rem !important;
    }

    .detail-title {
        font-size: 1.5rem !important;
        margin-bottom: 0.75rem !important;
    }

    .detail-price-inline {
        font-size: 1.3rem !important;
    }

    .detail-info-box {
        padding: 1rem !important;
        margin-left: -0.5rem;
        margin-right: -0.5rem;
        border-radius: 0;
        border-left: none;
        border-right: none;
    }
}

/* Optimization for mobile search filters reordering and wider layout */
@media (max-width: 768px) {
    .main-content {
        padding: 1rem 0.4rem !important;
        /* Allarga la pagina riducendo il padding laterale */
    }

    /* Mobile grid overrides moved to consolidated section */


    #filter-form.has-advanced-filters .filter-reorder-container {
        display: flex !important;
        flex-direction: column !important;
    }

    #filter-form.has-advanced-filters .filter-reorder-container #advanced_filters {
        order: -1 !important;
        /* Sposta i filtri in alto */
        margin-top: 0 !important;
        margin-bottom: 1.5rem !important;
        padding-top: 0 !important;
        padding-bottom: 1rem !important;
        border-top: none !important;
        border-bottom: 1px dashed var(--border-color) !important;
    }

    #filter-form.has-advanced-filters .filter-reorder-container .location-buttons-row {
        order: 1 !important;
    }
}

/* Notification Badges */
.mobile-toggle-wrapper {
    position: relative;
    display: inline-block;
}

.notification-badge-mobile-link {
    text-decoration: none;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
}

.notification-badge-mobile-link:hover {
    transform: scale(1.1);
}

.notification-badge-mobile-v2 {
    background-color: var(--danger-color);
    color: white;
    font-size: 0.75rem;
    font-weight: 700;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 4px rgba(239, 68, 68, 0.3);
    border: 1px solid white;
}

.badge-dot {
    display: inline-block;
    width: 8px;
    height: 8px;
    background-color: var(--danger-color);
    border-radius: 50%;
    margin-left: 5px;
    vertical-align: middle;
}

@media (max-width: 768px) {
    .mobile-toggle-wrapper {
        margin-left: 1rem;
    }
}

/* Announcement Banner */
.announcement-banner {
    background: linear-gradient(135deg, #4f46e5, #0ea5e9);
    color: white;
    padding: 1.25rem 2rem;
    border-radius: 16px;
    margin-bottom: 2.5rem;
    box-shadow: 0 10px 25px -5px rgba(79, 70, 229, 0.4);
    display: flex;
    align-items: center;
    gap: 1.5rem;
    animation: slideInBanner 0.6s cubic-bezier(0.16, 1, 0.3, 1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    position: relative;
    overflow: hidden;
}

.announcement-banner::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.15), transparent);
    animation: shineBanner 4s infinite linear;
}

@keyframes shineBanner {
    0% {
        left: -100%;
    }

    30% {
        left: 100%;
    }

    100% {
        left: 100%;
    }
}

@keyframes slideInBanner {
    from {
        transform: translateY(-30px);
        opacity: 0;
    }

    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.announcement-icon {
    font-size: 2.5rem;
    flex-shrink: 0;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.2));
    animation: pulseIcon 2s infinite ease-in-out;
}

@keyframes pulseIcon {

    0%,
    100% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.1);
    }
}

.announcement-text {
    flex-grow: 1;
}

.announcement-text p {
    margin: 0;
    font-size: 1.15rem;
    font-weight: 500;
    line-height: 1.5;
    color: rgba(255, 255, 255, 0.95);
}

.announcement-text strong {
    font-weight: 800;
    color: #fff;
    text-shadow: 0 0 10px rgba(255, 255, 255, 0.3);
}

.announcement-text .domain-old {
    text-decoration: line-through;
    opacity: 0.8;
    margin-right: 5px;
}

.announcement-text .domain-new {
    background: rgba(255, 255, 255, 0.2);
    padding: 2px 8px;
    border-radius: 6px;
    border: 1px solid rgba(255, 255, 255, 0.3);
}

@media (max-width: 768px) {
    .announcement-banner {
        padding: 1.25rem;
        flex-direction: column;
        text-align: center;
        gap: 1rem;
        margin-bottom: 2rem;
    }

    .announcement-icon {
        font-size: 2rem;
    }

    .announcement-text p {
        font-size: 1.05rem;
    }
}

/* Badge Fondatore e Azienda */
.badge-chip,
.founder-badge,
.company-badge,
.company-badge-bank,
.founder-badge-detail {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 3px 8px;
    border-radius: 999px;
    font-size: 0.68rem;
    font-weight: 700;
    line-height: 1.05;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border: 1px solid rgba(255, 255, 255, 0.35);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.18);
    white-space: nowrap;
}

.badge-stack-founder,
.badge-stack-company {
    position: absolute;
    z-index: 25;
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 6px;
    max-width: calc(100% - 16px);
}

.badge-stack-founder {
    top: 8px;
    right: 8px;
}

.badge-stack-company {
    bottom: 10px;
    right: 10px;
}

.badge-stack-founder .founder-badge,
.badge-stack-founder .founder-badge-detail {
    position: static;
    top: auto;
    left: auto;
}

.badge-stack-company .company-badge-bank {
    position: static;
    top: auto;
    left: auto;
    bottom: auto;
    right: auto;
}

.founder-badge,
.company-badge {
    background: linear-gradient(135deg, #ffd700, #ff8c00);
    color: #fff;
}

.company-badge-bank {
    background: linear-gradient(135deg, #2563eb, #1d4ed8);
    color: #fff;
}

.founder-badge-detail {
    background: linear-gradient(135deg, #fffbeb, #fef3c7);
    color: #92400e;
    border-color: #fde68a;
    margin-bottom: 1rem;
}

.badge-label {
    display: inline;
}

.badge-icon-mobile {
    display: none;
}

@media (max-width: 768px) {
    .badge-stack-founder,
    .badge-stack-company {
        max-width: 42px;
        gap: 4px;
    }

    .badge-chip,
    .founder-badge,
    .company-badge-bank {
        width: 32px;
        min-width: 32px;
        height: 32px;
        padding: 0;
        border-radius: 50%;
        justify-content: center;
        align-items: center;
        box-sizing: border-box;
        overflow: hidden;
    }

    .badge-label {
        display: none;
    }

    .badge-icon-mobile {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        width: 100%;
        height: 100%;
        font-size: 0.78rem;
        font-weight: 800;
        line-height: 1;
    }
}
