/* Styles for the main history hub page (pages/history.html) */

.history-overview {
    text-align: center;
    margin-bottom: 40px;
    padding: 30px;
    background: rgba(30, 30, 30, 0.8);
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    position: relative;
    overflow: hidden;
    transition: all 0.4s ease;
    z-index: 1;
}

.history-overview::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 0;
    height: 100%;
    background: linear-gradient(90deg, rgba(206, 17, 38, 0.1), rgba(0, 151, 54, 0.1), rgba(255, 255, 255, 0.1));
    transition: all 0.6s ease;
    z-index: -1;
}

.history-overview:hover::before {
    width: 100%;
}

.history-overview:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.3);
}

.history-overview h1 {
    color: #009736;
    font-size: 2.5em;
    margin-bottom: 15px;
    position: relative;
    display: inline-block;
    transition: all 0.3s ease;
}

.history-overview h1::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, #ce1126, #009736, #ffffff);
    transition: all 0.4s ease;
}

.history-overview:hover h1::after {
    width: 100%;
}

.history-overview p {
    color: #ddd;
    font-size: 1.1em;
    line-height: 1.6;
    max-width: 800px;
    margin: 0 auto;
}

.historical-periods-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
    padding: 20px;
    max-width: 1200px;
    margin: 40px auto;
}

.period-card {
    background-color: #222;
    border-radius: 10px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
    padding: 25px;
    text-align: center;
    transition: all 0.4s ease;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    position: relative;
    overflow: hidden;
    z-index: 1;
    border-left: 3px solid #009736;
}

.period-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 0;
    height: 100%;
    background: linear-gradient(90deg, rgba(206, 17, 38, 0.1), rgba(0, 151, 54, 0.1), rgba(255, 255, 255, 0.1));
    transition: all 0.6s ease;
    z-index: -1;
}

.period-card:hover::before {
    width: 100%;
}

.period-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 8px 16px rgba(0,0,0,0.3);
    border-left: 3px solid #ce1126;
}

.period-card h3 {
    font-size: 1.8em;
    margin-bottom: 15px;
    position: relative;
    display: inline-block;
    transition: all 0.3s ease;
}

.period-card h3::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, #ce1126, #009736, #ffffff);
    transition: all 0.4s ease;
}

.period-card:hover h3::after {
    width: 100%;
}

.period-card h3 a {
    color: #009736;
    text-decoration: none;
    font-weight: bold;
    transition: all 0.3s ease;
    position: relative;
    display: inline-block;
    overflow: hidden;
    z-index: 1;
}

.period-card h3 a::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 0;
    height: 100%;
    background: linear-gradient(90deg, rgba(206, 17, 38, 0.2), rgba(0, 151, 54, 0.2), rgba(255, 255, 255, 0.2));
    transition: all 0.5s ease;
    z-index: -1;
}

.period-card h3 a:hover::before {
    width: 100%;
}

.period-card h3 a:hover {
    color: #ce1126;
}

.period-card p {
    color: #ccc;
    font-size: 1em;
    line-height: 1.5;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .history-overview h1 {
        font-size: 2em;
    }

    .historical-periods-grid {
        grid-template-columns: 1fr;
        padding: 15px;
    }

    .period-card {
        padding: 20px;
    }
}

@media (max-width: 480px) {
    .history-overview h1 {
        font-size: 1.8em;
    }

    .history-overview p {
        font-size: 0.95em;
    }

    .period-card h3 {
        font-size: 1.5em;
    }
}