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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: #f0f4f8;
    color: #1a202c;
    min-height: 100vh;
}

.navbar {
    background: #1a365d;
    color: white;
    padding: 1rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.nav-brand {
    font-size: 1.5rem;
    font-weight: 700;
}

.nav-links a {
    color: #bee3f8;
    text-decoration: none;
    margin-left: 1.5rem;
    transition: color 0.2s;
}

.nav-links a:hover,
.nav-links a.active {
    color: white;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem;
}

.hero {
    text-align: center;
    padding: 3rem 0;
}

.hero h1 {
    font-size: 2.5rem;
    color: #1a365d;
    margin-bottom: 1rem;
}

.hero p {
    font-size: 1.2rem;
    color: #4a5568;
    margin-bottom: 2rem;
}

.features {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
    margin-top: 2rem;
}

.feature-card {
    background: white;
    border-radius: 12px;
    padding: 2rem;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.07);
    transition: transform 0.2s;
}

.feature-card:hover {
    transform: translateY(-4px);
}

.feature-card h3 {
    color: #2b6cb0;
    margin-bottom: 0.75rem;
}

.feature-card p {
    color: #4a5568;
    margin-bottom: 1.5rem;
    line-height: 1.6;
}

.btn {
    display: inline-block;
    background: #2b6cb0;
    color: white;
    padding: 0.6rem 1.5rem;
    border-radius: 6px;
    text-decoration: none;
    transition: background 0.2s;
}

.btn:hover {
    background: #1a365d;
}

/* Chat */
.chat-container {
    max-width: 800px;
    margin: 0 auto;
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.07);
    overflow: hidden;
}

.chat-header {
    background: #1a365d;
    color: white;
    padding: 1.5rem;
}

.chat-header h2 {
    margin-bottom: 0.25rem;
}

.chat-header p {
    color: #bee3f8;
    font-size: 0.9rem;
}

.chat-messages {
    height: 500px;
    overflow-y: auto;
    padding: 1.5rem;
}

.message {
    margin-bottom: 1rem;
    padding: 1rem;
    border-radius: 8px;
    line-height: 1.6;
}

.message.user {
    background: #ebf8ff;
    margin-left: 2rem;
}

.message.assistant {
    background: #f7fafc;
    margin-right: 2rem;
    border: 1px solid #e2e8f0;
}

.chat-input {
    display: flex;
    gap: 0.5rem;
    padding: 1rem;
    border-top: 1px solid #e2e8f0;
}

.chat-input textarea {
    flex: 1;
    padding: 0.75rem;
    border: 1px solid #cbd5e0;
    border-radius: 6px;
    resize: none;
    font-family: inherit;
    font-size: 0.95rem;
}

.chat-input button {
    background: #2b6cb0;
    color: white;
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.95rem;
    transition: background 0.2s;
}

.chat-input button:hover {
    background: #1a365d;
}

.chat-input button:disabled {
    background: #a0aec0;
    cursor: not-allowed;
}

/* Tables */
.table-container {
    overflow-x: auto;
    margin-top: 1.5rem;
}

table {
    width: 100%;
    border-collapse: collapse;
    background: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.07);
}

th {
    background: #1a365d;
    color: white;
    padding: 1rem;
    text-align: left;
    font-weight: 600;
}

td {
    padding: 0.85rem 1rem;
    border-bottom: 1px solid #e2e8f0;
}

tr:hover {
    background: #f7fafc;
}

td a {
    color: #2b6cb0;
    text-decoration: none;
}

td a:hover {
    text-decoration: underline;
}

h1 {
    color: #1a365d;
    margin-bottom: 0.5rem;
}

.loading {
    color: #718096;
    font-style: italic;
}

/* Hero New */
.hero-new {
    background: linear-gradient(135deg, #1a365d 0%, #2b4c7e 100%);
    color: white;
    text-align: center;
    padding: 4rem 2rem 3rem;
}

.hero-new h1 {
    font-size: clamp(1.8rem, 4vw, 2.8rem);
    font-weight: 800;
    margin-bottom: 1rem;
    line-height: 1.2;
}

.hero-new h1 em {
    color: #63b3ed;
    font-style: normal;
}

.hero-subtitle {
    font-size: 1.1rem;
    color: #bee3f8;
    max-width: 600px;
    margin: 0 auto 2rem;
    line-height: 1.6;
}

.search-bar {
    max-width: 600px;
    margin: 0 auto 1.5rem;
    display: flex;
    gap: 0;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0,0,0,0.2);
}

.search-bar input {
    flex: 1;
    padding: 1rem 1.25rem;
    border: none;
    font-size: 1rem;
    outline: none;
}

.search-bar button {
    background: #2b6cb0;
    color: white;
    border: none;
    padding: 1rem 2rem;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
}

.search-bar button:hover {
    background: #1a4971;
}

.hero-cta-text {
    color: #63b3ed;
    font-weight: 600;
    font-size: 0.95rem;
    margin-bottom: 1.5rem;
}

.hero-counters {
    display: flex;
    justify-content: center;
    gap: 3rem;
    flex-wrap: wrap;
}

.counter {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.counter-n {
    font-size: 1.8rem;
    font-weight: 800;
    color: #fff;
}

.counter-l {
    font-size: 0.8rem;
    color: #bee3f8;
    margin-top: 0.25rem;
}

/* Home Sections */
.home-section {
    margin-bottom: 3rem;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.25rem;
}

.section-header h2 {
    color: #1a365d;
    font-size: 1.5rem;
}

.see-all {
    color: #2b6cb0;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.9rem;
}

.see-all:hover {
    text-decoration: underline;
}

/* Concorsi Grid */
.concorsi-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 1rem;
}

.concorso-card {
    background: white;
    border-radius: 10px;
    padding: 1.25rem;
    border-left: 4px solid #2b6cb0;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
    position: relative;
    transition: transform 0.2s;
}

.concorso-card:hover {
    transform: translateY(-2px);
}

.concorso-card.urgente {
    border-left-color: #e53e3e;
}

.badge-urgente {
    position: absolute;
    top: 0.75rem;
    right: 0.75rem;
    background: #e53e3e;
    color: white;
    font-size: 0.7rem;
    font-weight: 700;
    padding: 3px 8px;
    border-radius: 4px;
    text-transform: uppercase;
}

.cc-profilo {
    font-size: 0.75rem;
    font-weight: 700;
    color: #2b6cb0;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 0.4rem;
}

.concorso-card h4 {
    font-size: 0.95rem;
    color: #1a202c;
    margin-bottom: 0.6rem;
    line-height: 1.4;
}

.cc-meta {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
    font-size: 0.8rem;
    color: #718096;
    margin-bottom: 0.5rem;
}

.cc-meta span {
    background: #edf2f7;
    padding: 2px 8px;
    border-radius: 4px;
}

.cc-scadenza {
    font-size: 0.8rem;
    color: #4a5568;
    font-weight: 500;
}

.cc-link {
    display: inline-block;
    margin-top: 0.5rem;
    color: #2b6cb0;
    text-decoration: none;
    font-size: 0.85rem;
    font-weight: 600;
}

.cc-link:hover {
    text-decoration: underline;
}

/* Mobilità Grid */
.mobilita-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1rem;
}

.mobilita-card {
    background: white;
    border-radius: 10px;
    padding: 1.25rem;
    border-left: 4px solid #38a169;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}

.mc-tipo {
    font-size: 0.7rem;
    font-weight: 700;
    color: #38a169;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 0.4rem;
}

.mobilita-card h4 {
    font-size: 0.9rem;
    color: #1a202c;
    margin-bottom: 0.5rem;
    line-height: 1.4;
}

.mc-meta {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    font-size: 0.8rem;
    color: #718096;
    margin-bottom: 0.5rem;
}

/* AI Section */
.ai-section {
    background: white;
    border-radius: 12px;
    padding: 2.5rem;
    text-align: center;
    box-shadow: 0 4px 12px rgba(0,0,0,0.06);
    border: 1px solid #e2e8f0;
}

.ai-section h2 {
    color: #1a365d;
    margin-bottom: 0.5rem;
}

.ai-section > p {
    color: #4a5568;
    margin-bottom: 1.5rem;
}

.ai-examples {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    justify-content: center;
    margin-bottom: 1.5rem;
}

.ai-example {
    background: #edf2f7;
    border: 1px solid #e2e8f0;
    padding: 0.6rem 1.2rem;
    border-radius: 20px;
    font-size: 0.85rem;
    color: #2d3748;
    cursor: pointer;
    transition: all 0.2s;
}

.ai-example:hover {
    background: #2b6cb0;
    color: white;
    border-color: #2b6cb0;
}

.btn-large {
    display: inline-block;
    padding: 0.9rem 2.5rem;
    font-size: 1.05rem;
}

.btn-sm {
    padding: 0.4rem 1rem;
    font-size: 0.85rem;
}

/* Footer */
.site-footer {
    background: #1a365d;
    color: #bee3f8;
    padding: 1.5rem 2rem;
    margin-top: 2rem;
}

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

.footer-brand {
    font-size: 0.9rem;
}

.footer-brand a {
    color: #63b3ed;
    text-decoration: none;
}

.footer-links {
    display: flex;
    gap: 1.5rem;
}

.footer-links a {
    color: #bee3f8;
    text-decoration: none;
    font-size: 0.85rem;
}

.footer-links a:hover {
    color: white;
}

/* Books */
.books-section {
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 2px solid #e2e8f0;
    text-align: center;
}

.books-section h2 {
    color: #1a365d;
    margin-bottom: 0.5rem;
}

.books-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-top: 1.5rem;
}

.book-card {
    background: white;
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.07);
    border-left: 4px solid #2b6cb0;
    text-align: left;
}

.book-card h4 {
    color: #1a365d;
    margin-bottom: 0.5rem;
    font-size: 1rem;
}

.book-card p {
    color: #4a5568;
    font-size: 0.9rem;
    line-height: 1.5;
    margin-bottom: 1rem;
}

/* Auth */
.auth-container {
    max-width: 400px;
    margin: 2rem auto;
    background: white;
    padding: 2rem;
    border-radius: 12px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.07);
    text-align: center;
}

.auth-container h2 {
    color: #1a365d;
    margin-bottom: 0.5rem;
}

.auth-tabs {
    display: flex;
    gap: 0;
    margin-bottom: 1.5rem;
    border-bottom: 2px solid #e2e8f0;
}

.auth-tab {
    flex: 1;
    padding: 0.75rem;
    border: none;
    background: none;
    cursor: pointer;
    font-size: 0.95rem;
    font-weight: 500;
    color: #718096;
    border-bottom: 2px solid transparent;
    margin-bottom: -2px;
}

.auth-tab.active {
    color: #2b6cb0;
    border-bottom-color: #2b6cb0;
}

.auth-container input {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid #cbd5e0;
    border-radius: 6px;
    font-size: 0.95rem;
    margin-bottom: 0.75rem;
    box-sizing: border-box;
}

/* Pricing */
.pricing-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
    max-width: 700px;
    margin: 0 auto;
}

.pricing-card {
    background: white;
    border-radius: 12px;
    padding: 2rem;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.07);
    text-align: center;
    position: relative;
    border: 2px solid #e2e8f0;
}

.pricing-card.featured {
    border-color: #2b6cb0;
    transform: scale(1.03);
}

.pricing-card .badge {
    position: absolute;
    top: -12px;
    left: 50%;
    transform: translateX(-50%);
    background: #2b6cb0;
    color: white;
    padding: 4px 16px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
}

.pricing-card h3 {
    color: #1a365d;
    margin-bottom: 0.5rem;
}

.pricing-card .price {
    font-size: 2.5rem;
    font-weight: 800;
    color: #2b6cb0;
    margin: 1rem 0;
}

.pricing-card .price span {
    font-size: 1rem;
    font-weight: 400;
    color: #718096;
}

.pricing-card ul {
    list-style: none;
    margin: 1.5rem 0;
    text-align: left;
}

.pricing-card ul li {
    padding: 0.5rem 0;
    border-bottom: 1px solid #f0f4f8;
    color: #4a5568;
}

.pricing-card ul li::before {
    content: "✓ ";
    color: #2b6cb0;
    font-weight: 700;
}

.btn-premium {
    background: #2b6cb0;
    color: white;
    border: none;
    padding: 0.75rem 2rem;
    border-radius: 6px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
}

.btn-premium:hover {
    background: #1a365d;
}
