﻿/* =========================================================
   HERO DATABASE
   ========================================================= */

.hero-database {
    max-width: var(--max-width);

    margin: auto;

    padding: 20px 30px 100px;
}


/* =========================================================
   HERO GRID
   ========================================================= */

.hero-grid {
    display: grid;

    grid-template-columns:
        repeat(4, minmax(0, 1fr));

    gap: 18px;
}


/* =========================================================
   HERO CARD
   ========================================================= */

.hero-card {
    position: relative;

    min-height: 0;

    display: flex;
    flex-direction: column;

    background: var(--surface);

    border: 1px solid var(--border);

    border-radius: 12px;

    overflow: hidden;

    text-decoration: none;
    color: var(--text);

    transition:
        transform 0.25s ease,
        border-color 0.25s ease,
        box-shadow 0.25s ease;
}


.hero-card:hover {
    transform: translateY(-5px);

    border-color: var(--border-red);

    box-shadow:
        0 15px 35px rgba(0, 0, 0, 0.35);
}


/* =========================================================
   HERO IMAGE
   ========================================================= */

.hero-card-image {
    position: relative;

    width: 100%;

    aspect-ratio: 1 / 1;

    overflow: hidden;

    background: var(--surface-light);
}


.hero-card-image img {
    width: 100%;
    height: 100%;

    display: block;

    object-fit: cover;

    transition:
        transform 0.35s ease;
}


.hero-card:hover .hero-card-image img {
    transform: scale(1.045);
}


/* Image gradient */

.hero-card-image::after {
    content: "";

    position: absolute;

    inset: 0;

    background:
        linear-gradient(
            to top,
            rgba(8, 8, 10, 0.88),
            rgba(8, 8, 10, 0.08) 45%,
            transparent 70%
        );

    pointer-events: none;
}


/* =========================================================
   CARD INFORMATION
   ========================================================= */

.hero-card-info {
    padding: 14px 16px 16px;

    display: flex;
    flex-direction: column;

    gap: 8px;

    background: var(--surface);
}


.hero-card-info h3 {
    margin: 0;

    color: var(--text);

    font-size: 1.05rem;

    font-weight: 800;

    line-height: 1.2;
}


/* =========================================================
   CARD METADATA
   ========================================================= */

.hero-card-meta {
    display: flex;

    flex-wrap: wrap;

    gap: 6px;
}


/* Troop type */

.hero-tag {
    display: inline-flex;

    align-items: center;

    min-height: 24px;

    padding: 0 9px;

    border-radius: 5px;

    background:
        rgba(197, 31, 50, 0.08);

    border:
        1px solid rgba(197, 31, 50, 0.2);

    color: var(--red-light);

    font-size: 0.63rem;

    font-weight: 800;

    letter-spacing: 0.06em;

    text-transform: uppercase;
}


/* =========================================================
   HERO RESPONSIVE
   ========================================================= */

@media (max-width: 1100px) {

    .hero-grid {
        grid-template-columns:
            repeat(3, minmax(0, 1fr));
    }

}


@media (max-width: 850px) {

    .hero-grid {
        grid-template-columns:
            repeat(2, minmax(0, 1fr));
    }

}


@media (max-width: 550px) {

    .hero-database {
        padding:
            15px 20px 70px;
    }


    .hero-grid {
        grid-template-columns: 1fr;
    }

}


/* =========================================================
   FARMING MARCHES
   ========================================================= */

.farming-view {
    max-width: var(--max-width);

    margin: auto;

    padding: 20px 30px 100px;
}


.farming-header {
    display: flex;

    flex-direction: column;

    align-items: flex-start;

    margin-bottom: 30px;

    padding-bottom: 24px;

    border-bottom: 1px solid var(--border);
}


.farming-back-button {
    display: inline-flex;

    align-items: center;

    gap: 8px;

    margin-bottom: 28px;

    padding: 10px 14px;

    border: 1px solid var(--border);

    border-radius: 6px;

    background: var(--surface);

    color: var(--text-muted);

    font-family: inherit;

    font-size: 0.68rem;

    font-weight: 800;

    letter-spacing: 0.07em;

    text-transform: uppercase;

    cursor: pointer;

    transition:
        border-color 0.2s ease,
        color 0.2s ease,
        background 0.2s ease;
}


.farming-back-button:hover {
    border-color: var(--border-red);

    background: var(--surface-light);

    color: var(--text);
}


.farming-header h2 {
    margin: 8px 0 10px;

    color: var(--text);

    font-size: clamp(1.7rem, 3vw, 2.35rem);

    font-weight: 900;

    line-height: 1.2;
}


.farming-header p {
    max-width: 700px;

    margin: 0;

    color: var(--text-muted);

    font-size: 0.8rem;

    line-height: 1.6;
}


/* =========================================================
   FARMING GRID
   ========================================================= */

.farming-grid {
    display: grid;

    grid-template-columns:
        repeat(2, minmax(0, 1fr));

    gap: 20px;

    width: 100%;
}


/* =========================================================
   FARMING CARD
   ========================================================= */

.farming-card {
    padding: 24px;

    border: 1px solid var(--border);

    border-radius: 8px;

    background: var(--surface);

    transition:
        border-color 0.2s ease,
        background 0.2s ease,
        transform 0.2s ease;
}


.farming-card:hover {
    border-color: var(--border-red);

    background: var(--surface-light);

    transform: translateY(-2px);
}


/* =========================================================
   FARMING CARD HEADER
   ========================================================= */

.farming-card-header {
    display: flex;

    align-items: center;

    justify-content: space-between;

    gap: 16px;

    margin-bottom: 22px;

    padding-bottom: 16px;

    border-bottom: 1px solid var(--border);
}


.farming-resource {
    color: var(--text);

    font-size: 0.82rem;

    font-weight: 900;

    letter-spacing: 0.08em;

    text-transform: uppercase;
}


.farming-efficiency {
    color: var(--red-light);

    font-size: 0.62rem;

    font-weight: 900;

    letter-spacing: 0.06em;

    text-align: right;

    text-transform: uppercase;
}


/* =========================================================
   FARMING MARCH
   ========================================================= */

.farming-march {
    display: flex;

    align-items: center;

    justify-content: space-between;

    gap: 16px;

    margin-bottom: 22px;
}


.farming-hero {
    flex: 1;

    min-width: 0;

    padding: 16px;

    border: 1px solid var(--border);

    border-radius: 6px;

    background: rgba(255, 255, 255, 0.015);
}


.farming-role {
    display: block;

    margin-bottom: 7px;

    color: var(--text-muted);

    font-size: 0.56rem;

    font-weight: 900;

    letter-spacing: 0.1em;

    text-transform: uppercase;
}


.farming-hero strong {
    display: block;

    color: var(--text);

    font-size: 1rem;

    font-weight: 900;
}


.farming-arrow {
    flex: 0 0 auto;

    color: var(--red-light);

    font-size: 1.25rem;

    font-weight: 900;
}


/* =========================================================
   FARMING DETAILS
   ========================================================= */

.farming-details {
    padding-top: 4px;
}


.farming-details p {
    margin: 10px 0 0;

    color: var(--text-muted);

    font-size: 0.74rem;

    line-height: 1.65;
}


.farming-details p:first-child {
    margin-top: 0;
}


.farming-details strong {
    color: var(--text);
}


/* =========================================================
   FIFTH MARCH
   ========================================================= */

.farming-card-flexible {
    grid-column: 1 / -1;
}


/* =========================================================
   FARMING RESPONSIVE
   ========================================================= */

@media (max-width: 800px) {

    .farming-grid {
        grid-template-columns: 1fr;
    }


    .farming-card-flexible {
        grid-column: auto;
    }

}


@media (max-width: 600px) {

    .farming-card {
        padding: 20px;
    }


    .farming-card-header {
        align-items: flex-start;

        flex-direction: column;
    }


    .farming-efficiency {
        text-align: left;
    }


    .farming-march {
        gap: 10px;
    }


    .farming-hero {
        padding: 13px;
    }


    .farming-hero strong {
        font-size: 0.9rem;
    }

}
/* =========================================================
   HERO TOOLS
   ========================================================= */

.hero-tools {
    max-width: var(--max-width);

    margin: 0 auto;

    padding: 0 30px 24px;
}


.hero-tool-button {
    display: flex;

    align-items: center;

    width: 100%;

    padding: 18px 20px;

    border: 1px solid var(--border);

    border-radius: 8px;

    background: var(--surface);

    color: var(--text);

    font-family: inherit;

    text-align: left;

    cursor: pointer;

    transition:
        border-color 0.2s ease,
        background 0.2s ease,
        transform 0.2s ease;
}


.hero-tool-button:hover {
    border-color: var(--border-red);

    background: var(--surface-light);

    transform: translateY(-2px);
}


.hero-tool-icon {
    display: flex;

    align-items: center;

    justify-content: center;

    width: 42px;
    height: 42px;

    margin-right: 15px;

    border: 1px solid rgba(
        197,
        31,
        50,
        0.25
    );

    border-radius: 7px;

    background: rgba(
        197,
        31,
        50,
        0.06
    );

    font-size: 1.15rem;
}


.hero-tool-text {
    display: flex;

    flex-direction: column;

    gap: 4px;

    flex: 1;
}


.hero-tool-text strong {
    color: var(--text);

    font-size: 0.82rem;

    font-weight: 900;

    letter-spacing: 0.06em;

    text-transform: uppercase;
}


.hero-tool-text small {
    color: var(--text-muted);

    font-size: 0.72rem;

    line-height: 1.4;
}


.hero-tool-button::after {
    content: "→";

    margin-left: 20px;

    color: var(--red-light);

    font-size: 1.2rem;

    font-weight: 700;

    transition:
        transform 0.2s ease;
}


.hero-tool-button:hover::after {
    transform: translateX(4px);
}


@media (max-width: 550px) {

    .hero-tools {
        padding:
            0 20px 20px;
    }


    .hero-tool-button {
        padding: 15px;
    }


    .hero-tool-icon {
        width: 36px;
        height: 36px;

        margin-right: 12px;
    }

}
