@font-face {
    font-family: "Trajan Pro";
    src: url("fonts/TrajanPro-Regular.ttf") format("truetype");
    font-weight: normal;
    font-style: normal;
}

/* =========================
   GENERALE
   ========================= */

.navbar-custom {
    background-color: #820000;
}

nav {
    font-family: "Trajan Pro", serif;
}

p {
    font-family: "Times New Roman", Times, serif;
}

/* =========================
   NAVBAR
   ========================= */

.navbar-brand {
    margin-left: 80px;
}

.navbar-logo {
    height: 40px;
    width: auto;
    display: block;
}

.navbar-nav {
    margin-left: 40px;
    gap: 20px;
    align-items: center;
}

.navbar-toggler {
    border: none;
}

.navbar-toggler:focus {
    box-shadow: none;
}

/* =========================
   RICERCA
   ========================= */

.search-button {
    margin-left: auto;
    margin-right: 30px;

    display: flex;
    align-items: center;
    gap: 8px;
}

.search-button > button {
    background: none;
    border: none;

    color: white;
    font-size: 22px;

    cursor: pointer;
    padding: 5px;
}

.search-button > button:hover {
    color: #ddd;
}

/* Campo di ricerca */

.search-bar {
    display: flex;
    align-items: center;

    width: 0;
    overflow: hidden;
    opacity: 0;

    transition:
        width 0.3s ease,
        opacity 0.3s ease;
}

.search-bar.active {
    width: 250px;
    opacity: 1;
}

.search-bar input {
    width: 100%;

    background: transparent;

    border: none;
    border-bottom: 1px solid white;

    color: white;

    padding: 5px 8px;

    outline: none;

    font-family: "Times New Roman", Times, serif;
    font-size: 16px;
}

.search-bar input::placeholder {
    color: rgba(255, 255, 255, 0.7);
}

.search-bar input:focus {
    border-bottom-color: white;
}

.search-bar button {
    background: none;
    border: none;

    color: white;

    cursor: pointer;

    padding: 5px;
}

.search-bar button:hover {
    color: #ddd;
}

/* =========================
   HOME
   ========================= */

.home-image {
    position: relative;

    width: 100%;
    height: 560px;

    overflow: hidden;
}

.img-home {
    width: 100%;
    height: 100%;

    object-fit: cover;
    display: block;
}

/* Overlay nero 50% */

.home-image::after {
    content: "";

    position: absolute;
    inset: 0;

    background: rgba(0, 0, 0, 0.5);

    z-index: 1;
}

/* Contenuto sopra l'immagine */

.home-content {
    position: absolute;

    z-index: 3;

    top: 35%;
    left: 50%;

    transform: translate(-50%, -50%);

    width: 80%;
    max-width: 800px;

    text-align: center;
}

/* Logo centrale */

.home-logo {
    width: 550px;
    max-width: 60%;

    height: auto;

    margin-bottom: 25px;
}

/* Testo */

.home-content p {
    color: white;

    font-size: 18px;

    line-height: 1;

    margin: 14px 0;
}

/* =========================
   FRECCIA SCROLL
   ========================= */

.scroll-down {
    position: absolute;

    z-index: 999;

    top: 65%;
    left: 50%;

    transform: translateX(-50%);

    color: white !important;

    font-size: 55px;

    text-decoration: none;

    line-height: 1;

    animation: arrow-bounce 1.5s infinite;
}

.scroll-down:hover {
    color: white !important;
}

@keyframes arrow-bounce {
    0%,
    100% {
        transform: translateX(-50%) translateY(0);
    }

    50% {
        transform: translateX(-50%) translateY(8px);
    }
}

/* =========================
   SEZIONE MONETE
   ========================= */

.coins-section {
    min-height: 100vh;

    padding: 40px 60px;

    background: white;
}

.coins-section h1 {
    font-family: "Times New Roman", Times, serif;

    font-size: 25px;
}

.coins-section p {
    font-size: 18px;
}

/* Titolo */

.titolo {
    margin-bottom: 30px;
    text-align: center;
    color: #820000;
}

.descrizione {
    max-width: 850px;
    margin: 0 auto 50px auto;
    text-align: center;
    font-size: 18px;
    line-height: 1.5;
}

/* Immagini Divisionale / Commemorativa */

.coin-types {
    display: flex;
    justify-content: center;
    align-items: flex-start;
    gap: 200px;
    width: 100%;
}

.coin-type {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.coin-type img {
    width: 200px;
    height: auto;
    margin-bottom: 20px;
}

.coin-button {
    display: inline-block;

    background-color: #820000;
    color: white;

    text-decoration: none;
    font-family: "Trajan Pro", serif;
    font-size: 13px;

    padding: 6px 14px;

    border-radius: 20px;

    transition: background-color 0.3s ease;
}

.coin-button:hover {
    background-color: #5f0000;
    color: white;
}

.coins-page {
    padding-top: 40px;
}

.coins-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 25px;
    align-items: start;
    margin-left: 30px;
    margin-right: 30px;
}

.coin-wrapper {
    width: 100%;
}

.coin-card {
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 12px;
    overflow: hidden;
}

.coin-image-slider {
    position: relative;
    height: 220px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.coin-slider-image {
    width: 100%;
    height: 100%;
    object-fit: contain;
    padding: 15px;
    display: block;
    transition: opacity 0.3s ease;
}

.coin-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 2;

    width: 35px;
    height: 35px;

    border: none;
    border-radius: 50%;

    background: rgba(130, 0, 0, 0.8);
    color: white;

    display: flex;
    align-items: center;
    justify-content: center;

    cursor: pointer;
}

.coin-arrow:hover {
    background: #5f0000;
}

.coin-prev {
    left: 8px;
}

.coin-next {
    right: 8px;
}
.coin-info {
    border-top: 1px solid #ddd;
    padding: 15px;
    text-align: left;
}

.coin-info p {
    margin: 0 0 7px;
}

.coin-info p:last-child {
    margin-bottom: 0;
}

.coin-exchange {
    margin-top: 10px;
}

.coin-exchange .btn {
    width: 100%;
}

.coin-detail {
    max-width: 1100px;
    margin: 50px auto;
    padding: 0 25px;
}

.coin-detail-header {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
    align-items: start;
}

.coin-detail-image {
    border: 1px solid #ddd;
    border-radius: 12px;
    padding: 15px;
    text-align: center;
}

.coin-detail-image img {
    width: 100%;
    height: 280px;
    object-fit: contain;
    display: block;
}

.coin-detail-slider {
    height: 320px;
}

.coin-detail-info h1 {
    margin-bottom: 25px;
}

.coin-description {
    margin-top: 30px;
    line-height: 1.7;
}

.coin-years {
    margin-top: 50px;
}

.coin-years h2 {
    margin-bottom: 20px;
}

.coin-year-row {
    display: grid;
    grid-template-columns: 1fr 1fr auto;
    align-items: center;
    gap: 20px;
    padding: 15px 0;
    border-bottom: 1px solid #ddd;
}

.coin-year {
    font-size: 1.1rem;
    font-weight: bold;
}

.coin-year-action .btn {
    min-width: 110px;
}

.coin-back {
    margin-top: 35px;
}

.coin-exchange .btn {
    background-color: #8f1b1b;
    border-color: #8f1b1b;
    color: white;
}

.coin-exchange .btn:hover {
    background-color: #5f0000;
    border-color: #5f0000;
    color: white;
}

.coin-country {
    padding: 12px 15px;
    border-bottom: 1px solid #ddd;
    font-family: "Trajan Pro", serif;
    font-size: 15px;
    font-weight: bold;
    color: #820000;
    text-align: center;
}

.btn-scambia {
    background-color: #8f1b1b;
    border-color: #8f1b1b;
    color: white;
}

.btn-scambia:hover {
    background-color: #5f0000;
    border-color: #5f0000;
    color: white;
}

.btn-scambia-disabled {
    background-color: #d6d6d6;
    border-color: #d6d6d6;
    color: #888;
    cursor: not-allowed;
}

.btn-torna {
    background-color: #8f1b1b;
    border-color: #8f1b1b;
    color: white;
}

.btn-torna:hover {
    background-color: #5f0000;
    border-color: #5f0000;
    color: white;
}

/* TELEFONO */

@media (max-width: 700px) {
    .coin-detail {
        margin: 30px auto;
        padding: 0 20px;
    }

    .coin-detail-header {
        grid-template-columns: 1fr;
        gap: 25px;
    }

    .coin-detail-image img {
        height: 250px;
    }

    .coin-year-row {
        grid-template-columns: 1fr 1fr;
        gap: 10px;
    }

    .coin-year-action {
        grid-column: 1 / -1;
    }

    .coin-year-action .btn {
        width: 100%;
    }
}

/* =========================
   COOKIE BANNER
   ========================= */

.cookie-banner {
    position: fixed;

    bottom: 0;
    left: 0;
    right: 0;

    background: white;
    color: #212529;

    padding: 14px 25px;

    display: flex;

    align-items: center;
    justify-content: space-between;

    gap: 20px;

    z-index: 9999;

    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.15);
}

.cookie-text {
    font-size: 14px;
}

.cookie-buttons {
    display: flex;

    gap: 10px;
}

.cookie-btn {
    background: black;
    color: white;

    border: none;
    border-radius: 5px;

    padding: 8px 18px;

    cursor: pointer;

    font-size: 14px;
}

.cookie-btn:hover {
    background: #333;
}

/* 3 per riga */
@media (max-width: 1100px) {
    .coins-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

/* 2 per riga */
@media (max-width: 750px) {
    .coins-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

/* 1 per riga */
@media (max-width: 500px) {
    .coins-grid {
        grid-template-columns: 1fr;
    }
}

/* =========================
   TABLET + SMARTPHONE
   ========================= */

@media (max-width: 991px) {
    /* NAVBAR */

    .navbar-brand {
        margin-left: 10px;
    }

    .navbar-logo {
        height: 35px;
    }

    .navbar-nav {
        margin-left: 10px;
        gap: 5px;
        padding-top: 15px;
        align-items: flex-start;
    }

    .navbar-nav .nav-link {
        padding: 8px 0;
        text-align: left;
    }

    /* RICERCA */

    .search-button {
        margin-left: 10px;
        margin-right: 0;

        padding: 10px 0;
    }

    .search-bar.active {
        width: 220px;
    }

    /* HOME */

    .home-image {
        height: 600px;
    }

    .home-content {
        width: 90%;
    }

    .home-logo {
        width: 200px;

        max-width: 70%;

        margin-bottom: 15px;
    }

    .home-content p {
        font-size: 14px;

        line-height: 1.4;
    }

    /* MONETE */

    .coin-types {
        flex-direction: row;
        justify-content: center;
        gap: 60px;
    }

    .coin-type img {
        width: 180px;
    }

    /* COOKIE */

    .cookie-banner {
        flex-direction: column;

        text-align: center;
    }

    .cookie-buttons {
        justify-content: center;
    }
}

/* =========================
   SMARTPHONE
   ========================= */

@media (max-width: 600px) {
    .navbar-logo {
        height: 30px;
    }

    .home-image {
        height: 600px;
    }

    .home-content {
        width: 90%;
    }

    .home-logo {
        width: 200px;

        max-width: 70%;
    }

    .home-content p {
        font-size: 14px;

        line-height: 1.4;
    }

    .coins-section {
        padding: 60px 20px;
    }

    .coin-types {
        flex-direction: column;
        align-items: center;
        gap: 30px;
    }

    .coin-type {
        width: 100%;
    }

    .coin-type img {
        width: 80%;
        max-width: 280px;
    }

    .search-bar.active {
        width: 180px;
    }

    .cookie-banner {
        padding: 12px 15px;
    }

    .cookie-text {
        font-size: 12px;
    }
}
