/* style.css - Journal of Advanced Gravitational Physics */

:root {
    --primary: #1a3a5c;
    --secondary: #2c6b9e;
    --accent: #e8a838;
    --light-bg: #f5f7fa;
    --dark-text: #2c3e50;
    --border-color: #e0e6ed;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Georgia', 'Times New Roman', serif;
    line-height: 1.8;
    color: var(--dark-text);
    background: #ffffff;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 20px;
}

/* ===== HEADER ===== */
.header {
    background: var(--primary);
    color: white;
    padding: 25px 0;
    border-bottom: 5px solid var(--accent);
    text-align: center;
}

.header .logo {
    max-width: 200px;
    height: auto;
    margin-bottom: 10px;
}

.header h1 {
    font-size: 2rem;
    letter-spacing: 2px;
    font-weight: bold;
}

.header p {
    font-size: 1.1rem;
    opacity: 0.9;
    margin-top: 5px;
}

/* ===== NAV ===== */
.nav {
    background: var(--secondary);
    padding: 12px 0;
    text-align: center;
    border-bottom: 3px solid var(--accent);
}

.nav a {
    color: white;
    text-decoration: none;
    margin: 0 20px;
    font-size: 1.05rem;
    padding: 5px 0;
    border-bottom: 2px solid transparent;
    transition: border-color 0.3s;
}

.nav a:hover,
.nav a.active {
    border-bottom-color: var(--accent);
}

/* ===== CONTENT ===== */
.content {
    background: white;
    padding: 40px;
    border-radius: 8px;
    margin: 30px 0;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    flex: 1;
}

.content h1,
.content h2 {
    color: var(--primary);
    margin-bottom: 15px;
}

.content h3 {
    color: var(--secondary);
    margin: 20px 0 10px;
}

.content hr {
    margin: 30px 0;
    border: none;
    border-top: 2px solid var(--border-color);
}

/* ===== FORM ===== */
.form-section {
    background: var(--light-bg);
    padding: 25px;
    border-radius: 8px;
    margin: 20px 0;
}

.form-section h3 {
    color: var(--primary);
    margin-top: 0;
    margin-bottom: 15px;
    border-bottom: 2px solid var(--border-color);
    padding-bottom: 10px;
}

label {
    display: block;
    font-weight: bold;
    margin: 15px 0 5px;
    color: var(--dark-text);
}

input[type="text"],
input[type="email"],
input[type="password"],
input[type="file"],
textarea,
select {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid var(--border-color);
    border-radius: 6px;
    font-family: inherit;
    font-size: 1rem;
    transition: border-color 0.3s;
    background: white;
}

input:focus,
textarea:focus {
    border-color: var(--secondary);
    outline: none;
    box-shadow: 0 0 0 3px rgba(44, 107, 158, 0.1);
}

textarea {
    resize: vertical;
    min-height: 80px;
}

.file-upload {
    border: 2px dashed var(--border-color);
    padding: 30px;
    text-align: center;
    border-radius: 8px;
    background: white;
    transition: border-color 0.3s;
}

.file-upload:hover {
    border-color: var(--secondary);
}

.file-upload input[type="file"] {
    padding: 10px;
    border: none;
}

.file-hint {
    color: #888;
    font-size: 0.85rem;
    margin-top: 5px;
}

.checkbox-group {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin: 15px 0;
}

.checkbox-group input[type="checkbox"] {
    margin-top: 5px;
    width: 18px;
    height: 18px;
    flex-shrink: 0;
    cursor: pointer;
}

.checkbox-group label {
    margin: 0;
    font-weight: normal;
    font-size: 0.95rem;
    cursor: pointer;
}

/* ===== BUTTONS ===== */
.btn-submit,
.btn-primary,
.btn-pdf {
    display: inline-block;
    background: var(--secondary);
    color: white;
    padding: 14px 40px;
    border-radius: 6px;
    text-decoration: none;
    font-weight: bold;
    font-size: 1.1rem;
    border: none;
    cursor: pointer;
    transition: background 0.3s, transform 0.1s;
}

.btn-submit:hover,
.btn-primary:hover {
    background: var(--primary);
}

.btn-submit:active,
.btn-primary:active {
    transform: scale(0.98);
}

.btn-submit {
    background: var(--accent);
    color: var(--primary);
    font-size: 1.2rem;
    padding: 16px 50px;
}

.btn-submit:hover {
    background: #d49a30;
    color: var(--primary);
}

.btn-pdf {
    background: #cc3333;
    padding: 10px 25px;
    font-size: 0.95rem;
}

.btn-pdf:hover {
    background: #990000;
}

.tab-btn {
    background: var(--light-bg);
    border: 2px solid var(--border-color);
    padding: 10px 30px;
    border-radius: 6px;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s;
    font-weight: bold;
}

.tab-btn.active {
    background: var(--secondary);
    color: white;
    border-color: var(--secondary);
}

.tab-btn:hover:not(.active) {
    background: var(--border-color);
}

/* ===== MESSAGES ===== */
.message {
    margin: 15px 0;
    padding: 12px 20px;
    border-radius: 6px;
    font-weight: bold;
    display: none;
}

.message.success {
    display: block;
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.message.error {
    display: block;
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

/* ===== ARTICLE LIST ===== */
.article-item {
    background: var(--light-bg);
    padding: 20px 25px;
    border-radius: 6px;
    margin: 15px 0;
    border-left: 4px solid var(--accent);
}

.article-item h3 {
    margin-top: 0;
}

.article-item p {
    margin: 5px 0;
    color: #555;
}

/* ===== FOOTER ===== */
.footer {
    background: var(--primary);
    color: rgba(255, 255, 255, 0.8);
    padding: 25px 0;
    margin-top: auto;
    border-top: 4px solid var(--accent);
}

.footer .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 20px;
}

.footer a {
    color: var(--accent);
    text-decoration: none;
}

.footer a:hover {
    text-decoration: underline;
}

.footer-info p {
    margin: 3px 0;
    font-size: 0.9rem;
}

.footer-barcode {
    text-align: center;
}

.footer-barcode img {
    max-width: 120px;
    height: auto;
    display: block;
    margin: 0 auto 5px;
}

.footer-barcode p {
    font-size: 0.7rem;
    opacity: 0.7;
    letter-spacing: 1px;
    text-transform: uppercase;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
    .header h1 { font-size: 1.5rem; }
    .nav a { margin: 0 10px; font-size: 0.9rem; }
    .content { padding: 20px; }
    .form-section { padding: 15px; }
    .footer .container { flex-direction: column; text-align: center; }
    .btn-submit { padding: 14px 30px; font-size: 1rem; }
}

/* ============================================================
   NUOVI STILI PER AREA UTENTE E RICERCA
   ============================================================ */

/* ---- Barra di Ricerca ---- */
.search-container {
    max-width: 800px;
    margin: 30px auto;
    padding: 20px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

.search-box {
    display: flex;
    gap: 10px;
    align-items: center;
}

.search-box input[type="text"] {
    flex: 1;
    padding: 14px 20px;
    border: 2px solid #e0e6ed;
    border-radius: 8px;
    font-size: 1rem;
    font-family: 'Georgia', serif;
    transition: border-color 0.3s;
}

.search-box input[type="text"]:focus {
    outline: none;
    border-color: #2c6b9e;
}

.search-box button {
    padding: 14px 30px;
    background: #2c6b9e;
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: bold;
    cursor: pointer;
    transition: background 0.3s;
}

.search-box button:hover {
    background: #1a3a5c;
}

.search-filters {
    display: flex;
    gap: 20px;
    margin-top: 15px;
    flex-wrap: wrap;
    font-size: 0.9rem;
}

.search-filters label {
    display: flex;
    align-items: center;
    gap: 5px;
    cursor: pointer;
}

.search-results {
    margin-top: 30px;
}

.search-result-item {
    padding: 15px 20px;
    margin: 10px 0;
    background: #f8f9fa;
    border-radius: 8px;
    border-left: 4px solid #e8a838;
    transition: background 0.2s;
}

.search-result-item:hover {
    background: #eef2f7;
}

.search-result-item h3 {
    margin: 0 0 5px 0;
}

.search-result-item h3 a {
    color: #1a3a5c;
    text-decoration: none;
}

.search-result-item h3 a:hover {
    text-decoration: underline;
}

.search-result-item .meta {
    font-size: 0.85rem;
    color: #666;
}

.search-result-item .badge {
    display: inline-block;
    font-size: 0.7rem;
    font-weight: bold;
    padding: 2px 12px;
    border-radius: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-right: 8px;
}

.badge-article {
    background: #e8a838;
    color: #1a3a5c;
}

.badge-working {
    background: #6c757d;
    color: white;
}

.no-results {
    text-align: center;
    padding: 40px;
    color: #888;
    font-size: 1.1rem;
}

/* ---- Area Autore ---- */
.author-page-header {
    background: linear-gradient(135deg, #1a3a5c 0%, #2c6b9e 100%);
    color: white;
    padding: 40px;
    border-radius: 12px;
    margin-bottom: 30px;
    text-align: center;
}

.author-page-header h1 {
    font-size: 2.5rem;
    margin-bottom: 5px;
}

.author-page-header .subtitle {
    font-size: 1.1rem;
    opacity: 0.8;
}

.author-articles {
    display: grid;
    gap: 20px;
}

.author-article-card {
    padding: 20px 25px;
    background: white;
    border-radius: 10px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
    border-left: 4px solid #e8a838;
    transition: transform 0.2s, box-shadow 0.2s;
}

.author-article-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(0,0,0,0.1);
}

.author-article-card h3 {
    margin: 0 0 8px 0;
}

.author-article-card h3 a {
    color: #1a3a5c;
    text-decoration: none;
}

.author-article-card h3 a:hover {
    text-decoration: underline;
}

.author-article-card .meta {
    font-size: 0.9rem;
    color: #666;
}

.author-article-card .links {
    margin-top: 10px;
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
}

.author-article-card .links a {
    font-size: 0.85rem;
    color: #2c6b9e;
    text-decoration: none;
}

.author-article-card .links a:hover {
    text-decoration: underline;
}

/* ---- Pagina Ricerca ---- */
.search-page {
    max-width: 1000px;
    margin: 0 auto;
    padding: 20px;
}

.search-page .search-container {
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
    padding: 30px;
}

.search-page .search-box input[type="text"] {
    font-size: 1.1rem;
    padding: 16px 24px;
}

.search-page .search-box button {
    padding: 16px 40px;
    font-size: 1.1rem;
}

/* ---- Responsive ---- */
@media (max-width: 768px) {
    .search-box {
        flex-direction: column;
    }
    .search-box button {
        width: 100%;
    }
    .search-filters {
        flex-direction: column;
        gap: 10px;
    }
    .author-page-header h1 {
        font-size: 1.8rem;
    }
    .author-page-header {
        padding: 25px;
    }
}