/* ===========================
   CUBE CSS - Footer
   =========================== */

/* COMPOSITION: Layout container with display: contents */

#footer-container {
    display: contents;
}

/* BLOCK: Footer main component */

.footer {
    background: rgb(var(--color-secondary));
    color: rgb(var(--color-dark));
    padding: 0;
    box-shadow: 0 -5px 20px rgb(var(--color-black-rgb) / 0.08);
}

.footer-content {
    padding: 60px 0 40px;
    border-bottom: 0.5px solid rgb(var(--color-text));
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1.5fr;
    gap: 60px;
    align-items: flex-start;
}

/* BLOCK: Footer brand section */

.footer-brand {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
}

.footer-brand-top {
    display: flex;
    align-items: center;
    gap: 10px;
}

.footer-logo {
    width: 80px;
    height: 80px;
    flex-shrink: 0;
}

.footer-logo img {
    width: 100%;
    height: 100%;
    border-radius: 50%;
}

.footer-logo img.brand-image {
    object-fit: cover;
    object-position: 50% 50%;
    transform-origin: center center;
    transform: scale(1);
}

.footer-brand-text h3 {
    font-family: 'Playfair Display', serif;
    font-size: 24px;
    color: rgb(var(--color-dark));
    margin: 0;
    line-height: 0.95;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.footer-brand-text h3 span {
    display: block;
}

.footer-brand-description {
    font-size: 14px;
    color: rgb(var(--color-text));
    margin: 0;
    max-width: 320px;
}

/* BLOCK: Footer sections (navigation, contact) */

.footer-section h4 {
    font-family: 'Playfair Display', serif;
    font-size: 20px;
    color: rgb(var(--color-dark));
    margin: 0 0 20px 0;
    padding-bottom: 10px;
    border-bottom: 0.5px solid rgb(var(--color-text));
}

.footer-section ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-section li {
    margin-bottom: 12px;
}

.footer-section a {
    color: rgb(var(--color-dark));
    text-decoration: none;
    transition: color var(--transition-base), text-decoration var(--transition-base);
    font-size: 15px;
}

.footer-section a:hover {
    color: rgb(var(--color-primary-dark)) !important;
}

/* BLOCK: Footer contact details */

.footer-contact p {
    margin: 12px 0;
    font-size: 14px;
    color: rgb(var(--color-dark));
}

.footer-contact .icon {
    margin-right: 10px;
    font-size: 16px;
}

.footer-contact a {
    color: rgb(var(--color-dark));
    text-decoration: none;
    transition: color var(--transition-base), text-decoration var(--transition-base);
}

.footer-contact a:hover {
    color: rgb(var(--color-primary-dark)) !important;
}

/* BLOCK: Footer bottom (legal and credits) */

.footer-bottom {
    background: rgb(var(--color-light));
    padding: 15px 0;
    border-top: 0.5px solid rgb(var(--color-text));
}

.footer-legal {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 20px;
    font-size: 12px;
}

.footer-legal a {
    color: rgb(var(--color-dark));
    text-decoration: none;
    transition: color var(--transition-base), text-decoration var(--transition-base);
}

.footer-legal a:hover {
    color: rgb(var(--color-primary-dark)) !important;
}

.footer-credits {
    flex-grow: 1;
    text-align: center;
    color: rgb(var(--color-dark));
}

/* EXCEPTION - Tablet */
@media (max-width: 1024px) {
    .footer-content {
        padding: 50px 0 30px;
    }

    .footer-grid {
        grid-template-columns: 1.5fr 1fr 1.5fr;
        gap: 40px;
    }

    .footer-logo {
        width: 70px;
        height: 70px;
    }

    .footer-brand-text h3 {
        font-size: 20px;
    }

    .footer-brand-description {
        font-size: 13px;
        max-width: 280px;
    }

    .footer-section h4 {
        font-size: 18px;
        margin-bottom: 15px;
    }

    .footer-section a {
        font-size: 14px;
    }

    .footer-contact p {
        font-size: 13px;
    }
}

/* EXCEPTION - Mobile */
@media (max-width: 768px) {
    .footer-content {
        padding: 40px 0 25px;
    }

    .footer-grid {
        grid-template-columns: 1fr 1fr;
        gap: 30px;
    }

    .footer-brand {
        grid-column: 1 / -1;
        align-items: center;
        text-align: center;
        margin-bottom: 10px;
    }

    .footer-brand-top {
        gap: 12px;
        justify-content: center;
    }

    .footer-brand-text h3 {
        align-items: center;
    }

    .footer-logo {
        width: 60px;
        height: 60px;
    }

    .footer-brand-text h3 {
        font-size: 18px;
    }

    .footer-brand-description {
        font-size: 13px;
        max-width: 100%;
    }

    .footer-section {
        text-align: center;
    }

    .footer-section h4 {
        font-size: 16px;
        margin-bottom: 15px;
        padding-bottom: 8px;
    }

    .footer-section ul {
        display: flex;
        flex-direction: column;
        align-items: center;
    }

    .footer-section a {
        font-size: 13px;
    }

    .footer-section li {
        margin-bottom: 10px;
    }

    .footer-contact {
        text-align: center;
    }

    .footer-contact p {
        font-size: 13px;
        margin: 10px 0;
    }

    .footer-legal {
        display: flex;
        flex-wrap: wrap;
        align-items: center;
        justify-content: center;
        gap: 8px;
        font-size: 11px;
        text-align: center;
    }

    .footer-legal a {
        display: inline;
        white-space: nowrap;
    }

    .footer-legal a::after {
        content: " • ";
        margin: 0 4px;
        color: rgb(var(--color-text));
    }

    .footer-legal a:last-of-type::after {
        content: "";
        margin: 0;
    }

    .footer-credits {
        flex-grow: 0;
        width: 100%;
        margin-top: 8px;
    }

    .footer-bottom {
        padding: 12px 0;
    }
}

/* EXCEPTION - Small mobile */
@media (max-width: 480px) {
    .footer-content {
        padding: 30px 0 20px;
    }

    .footer-grid {
        grid-template-columns: 1fr 1fr;
        gap: 20px;
    }

    .footer-brand {
        grid-column: 1 / -1;
        align-items: center;
        text-align: center;
        gap: 12px;
        margin-bottom: 10px;
    }

    .footer-brand-top {
        gap: 10px;
        justify-content: center;
    }

    .footer-brand-text h3 {
        align-items: center;
    }

    .footer-logo {
        width: 50px;
        height: 50px;
    }

    .footer-brand-text h3 {
        font-size: 16px;
    }

    .footer-brand-description {
        font-size: 12px;
        text-align: center;
    }

    .footer-section {
        text-align: center;
    }

    .footer-section h4 {
        font-size: 15px;
        margin-bottom: 12px;
    }

    .footer-section a {
        font-size: 12px;
    }

    .footer-section li {
        margin-bottom: 8px;
    }

    .footer-contact p {
        font-size: 12px;
        margin: 8px 0;
    }

    .footer-legal {
        display: flex;
        flex-wrap: wrap;
        align-items: center;
        justify-content: center;
        gap: 6px;
        font-size: 10px;
        text-align: center;
    }

    .footer-legal a {
        display: inline;
        white-space: nowrap;
    }

    .footer-legal a::after {
        content: " • ";
        margin: 0 3px;
        color: rgb(var(--color-text));
    }

    .footer-legal a:last-of-type::after {
        content: "";
        margin: 0;
    }

    .footer-credits {
        width: 100%;
        margin-top: 6px;
    }

    .footer-bottom {
        padding: 10px 0;
    }
}
