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

body {
    font-family: 'Crimson Text', 'Times New Roman', serif;
    background: #f9f9f9;
    color: #2c3e50;
    line-height: 1.8;
}

/* Navigation */
nav {
    background: #34495e;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    position: sticky;
    top: 0;
    z-index: 100;
}

#main-content {
    max-width:1200px;
}

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

.nav-menu {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0;
    align-items: center
}

.nav-menu li {
    height:max-content;
}

.nav-menu.active .nav-link {
    padding:0;
    font-size: 1.5rem;
}

.nav-link {
    color: #bdc3c7;
    text-decoration: none;
    padding: 1rem 1.5rem;
    transition: color 0.3s ease;
    font-size: 0.95rem;
    cursor: pointer;
}

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

.nav-user {
    color: #ecf0f1;
    font-family: 'Montserrat', sans-serif;
    font-size: 0.9rem;
    margin-right: 1rem;
}

.auth-item {
    display: flex;
    align-items: center;
}

.logout-link {
    background: #e74c3c;
    color: white !important;
    padding: 0.5rem 1rem;
    border-radius: 4px;
    font-size: 0.85rem;
    text-decoration: none;
    transition: background-color 0.3s ease;
}

.logout-link:hover {
    background: #c0392b;
}

.nav-login {
    background: #50747e /*#3498db*/;
    color: white !important;
    padding: 0.5rem 1rem;
    border-radius: 4px;
    font-size: 0.85rem;
    text-decoration: none;
    transition: background-color 0.3s ease;
    font-family: 'Montserrat', sans-serif;
    font-weight: 600;
}

.nav-login:hover {
    background: #5f838d;
}

.nav-register {
    background: #27ae60;
    color: white !important;
    padding: 0.5rem 1rem;
    border-radius: 4px;
    font-size: 0.85rem;
    text-decoration: none;
    transition: background-color 0.3s ease;
    font-family: 'Montserrat', sans-serif;
    font-weight: 600;
}

.nav-register:hover {
    background: #229954;
}

.nav-search {
    display: flex;
    align-items: center;
}

.nav-search-input {
    padding: 0.5rem 1rem;
    border: 1px solid #7f8c8d;
    border-radius: 20px;
    background: #2c3e50;
    color: white;
    font-size: 0.9rem;
    width: 200px;
    outline: none;
    transition: all 0.3s ease;
}

.nav-search-input::placeholder {
    color: #95a5a6;
}

.nav-search-input:focus {
    border-color: #ecf0f1;
    background: #34495e;
}

.nav-toggle {
    display: none;
    background: none;
    border: none;
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
}

/* Container principal */
.container {
    margin: 0 auto;
    padding: 3rem;
    background: #ffffff;
    box-shadow: 0 2px 10px rgba(0,0,0,0.08);
    min-height: calc(100vh - 140px);
}

/* Loading */
.loading {
    text-align: center;
    padding: 3rem;
    color: #7f8c8d;
}

/* Headers */
header {
    text-align: center;
    margin-bottom: 3rem;
    padding-bottom: 2rem;
    position: relative;
}

header::after {
    content: '❦';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    font-size: 1.5rem;
    color: #34495e;
}

.nav-brand {
    color: white;
    font-size: 1.3rem;
    font-weight: 600;
    text-decoration: none;
    padding: 1rem 0;
    cursor: pointer;

    display: flex;
    flex-direction: row;
    flex-wrap: nowrap;
    align-content: center;
    justify-content: center;
    align-items: center;
    gap: 6px;
}

#nav_icon {
    height:2rem;
}

h1 {
    font-size: 2.8rem;
    color: #34495e;
    margin-bottom: 1rem;
    font-weight: 400;
}

h2 {
    font-size: 2rem;
    color: #34495e;
    margin-bottom: 1.5rem;
    font-weight: 400;
}

h3 {
    font-size: 1.4rem;
    color: #34495e;
    margin-bottom: 1rem;
    font-weight: 600;
}

.subtitle {
    color: #7f8c8d;
    font-size: 1.1rem;
    font-style: italic;
}

/* Search */
.search-section {
    max-width: 500px;
    margin: 2rem auto;
    text-align: center;
    display: none;
    margin:0 auto;
}

.search-input {
    width: 100%;
    padding: 12px 20px;
    border: 1px solid #bdc3c7;
    border-radius: 4px;
    font-size: 1rem;
    outline: none;
    transition: border-color 0.3s ease;
    font-family: 'Crimson Text', serif;
}

.search-input:focus {
    border-color: #34495e;
}

/* Stats Banner */
.stats-banner {
    display: flex;
    justify-content: center;
    gap: 2rem;
    margin: 3rem 0;
    padding: 1.5rem;
    flex-wrap: wrap;
    background: #ecf0f1;
    border-radius: 4px;
}

.stat-item {
    text-align: center;
}

.stat-number {
    font-size: 2rem;
    font-weight: bold;
    display: block;
    margin-bottom: 0.3rem;
    color: #34495e;
}

.stat-label {
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: #666;
}

/* Sections principales */
.main-sections {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
    margin: 3rem 0;
}

.section-card {
    padding: 2rem;
    text-decoration: none;
    color: inherit;
    transition: all 0.3s ease;
    display: block;
    border: 1px solid #bdc3c7;
    background: white;
    border-radius: 4px;
    cursor: pointer;
}

.section-card:hover {
    border-color: #34495e;
    box-shadow: 0 4px 15px rgba(52, 73, 94, 0.1);
    transform: translateY(-2px);
}

.section-title {
    font-size: 1.3rem;
    margin-bottom: 1rem;
    font-weight: 600;
    color: #34495e;
}

.section-description {
    color: #666;
    line-height: 1.6;
}

/* Chronicles */
.chronicles {
    margin: 3rem 0;
    padding: 2rem;
    background: #ecf0f1;
    border-radius: 4px;
}

.chronicles h3 {
    font-size: 1.4rem;
    margin-bottom: 1.5rem;
    text-align: center;
    color: #34495e;
}

.chronicle-entry {
    margin-bottom: 1.5rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid rgba(0,0,0,0.1);
}

.chronicle-entry:last-child {
    border-bottom: none;
}

.chronicle-date {
    font-size: 0.85rem;
    margin-bottom: 0.5rem;
    font-weight: bold;
    color: #7f8c8d;
}

.chronicle-title {
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: #333;
}

.chronicle-description {
    color: #666;
    font-size: 0.95rem;
}

/* Footer */
.footer {
    text-align: center;
    margin-top: 3rem;
    padding: 2rem;
    color: #999;
    font-size: 0.9rem;
    border-top: 1px solid #bdc3c7;
    background: white;
}

/* Animations de transition */
.fade-in {
    animation: fadeIn 0.3s ease-in;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Responsive */
@media (max-width: 768px) {
    .nav-menu {
        position: fixed;
        top: 70px;
        left: -100%;
        width: 100%;
        height: calc(100vh - 70px);
        background: #34495e;
        flex-direction: column;
        justify-content: flex-start;
        align-items: center;
        transition: left 0.3s ease;
        padding-top: 2rem;
    }

    .nav-menu.active {
        left: 0;
    }

    .nav-link {
        padding:0;
        font-size: 1.5rem;
        width: 100%;
        text-align: center;
        border-bottom: 1px solid #2c3e50;
    }

    .nav-search {
        display: none;
    }

    .nav-toggle {
        display: block;
    }

    .container {
        padding: 2rem 1.5rem;
    }
    
    h1 {
        font-size: 2rem;
    }
    
    .stats-banner {
        gap: 1rem;
    }

    .search-section {
        display: block;
    }
}