.fotg-wrapper,
.fotg-tab,
.fotg-tab-image,
.fotg-tab-title,
.fotg-tab-content,
.fotg-wide-hero {
    box-sizing: border-box;
}

.fotg-wrapper {
    max-width: 1200px;
    margin: 0 auto;
    padding: 40px 20px;
}

.fotg-header {
    margin-bottom: 50px;
    text-align: center;
}

.fotg-header h1 {
    font-family: "Cinzel", serif;
    font-size: 2.4em;
    font-weight: 600;
    margin: 0 0 10px 0;
    letter-spacing: 0.08em;
    color: var(--bold-bright);
}

.fotg-header h2 {
    font-size: 1.3em;
    font-weight: 300;
    font-style: italic;
    margin: 0 0 30px 0;
    color: var(--text-faded);
}

.fotg-intro {
    font-size: 1.1em;
    line-height: 1.8;
    max-width: 700px;
    margin: 0 auto 50px auto;
    text-align: center;
    color: var(--text-color);
}

.fotg-intro p {
    margin: 0 0 16px 0;
}

.fotg-intro .pull {
    font-size: 1.15em;
    font-style: italic;
    color: var(--bold-bright);
}

.fotg-tabs {
    display: flex;
    overflow: hidden;
    flex-direction: column;
    border-radius: 16px;
    box-shadow: var(--shadow-small-container);
    gap: 1px;
}

.fotg-tab {
    display: flex;
    position: relative;
    overflow: hidden;
    align-items: stretch;
    flex: 1 1 120px;
    min-height: 0;
    cursor: pointer;
    transition: all 0.5s ease-in-out;
    text-decoration: none;
    color: inherit;
    background: color-mix(in srgb, var(--bg-container-small) 85%, transparent);
}

.fotg-tab::before {
    position: absolute;
    top: 0;
    bottom: 0;
    left: 0;
    width: 3px;
    content: "";
    transition: background-color 0.5s ease-in-out;
    background-color: transparent;
    z-index: 5;
}

.fotg-tab:hover {
    background: color-mix(in srgb, var(--bg-container-medium) 65%, transparent);
}

.fotg-tabs:hover .fotg-tab:not(:hover) .fotg-tab-title {
    opacity: 0.65;
}

.fotg-tab + .fotg-tab {
    border-top: 1px solid rgba(197, 165, 90, 0.08);
}

.fotg-tab-image {
    position: relative;
    overflow: hidden;
    align-self: stretch;
    flex-shrink: 0;
    width: 120px;
    min-width: 120px;
    min-height: 0;
    transition: min-width 0.5s ease-in-out,
    min-height 0.5s ease-in-out;
    background-position: top;
    background-size: cover;
}

.fotg-tab:hover .fotg-tab-image {
    min-width: 160px;
}

.fotg-tab-image::after {
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    content: "";
    transition: background 0.4s ease-in-out;
    background: linear-gradient(
            90deg,
            transparent 50%,
            var(--bg-container-small) 100%
    );
}

.fotg-tab:hover .fotg-tab-image::after {
    background: linear-gradient(
            90deg,
            transparent 50%,
            var(--bg-container-medium) 100%
    );
}

.fotg-tab-title {
    display: flex;
    flex-direction: column;
    flex-shrink: 0;
    justify-content: center;
    min-width: 280px;
    padding: 15px 20px;
    transition: min-width 0.5s ease-in-out,
    padding 0.5s ease-in-out,
    opacity 0.5s ease-in-out;
}

.fotg-tab-title .num {
    font-family: "Cinzel", serif;
    font-size: 0.7em;
    margin-bottom: 4px;
    transition: color 0.3s;
    letter-spacing: 0.15em;
    color: var(--gold);
}

.fotg-tab:hover .fotg-tab-title .num {
    color: var(--bold-bright);
}

.fotg-tab-title .main {
    font-family: "Cinzel", serif;
    font-size: 1.05em;
    font-weight: 600;
    line-height: 1.3;
    transition: color 0.3s;
    color: var(--title-color);
}

.fotg-tab:hover .fotg-tab-title .main {
    color: var(--bold-bright);
}

.fotg-tab-title .sub {
    font-size: 0.95em;
    font-weight: 300;
    font-style: italic;
    margin-top: 3px;
    color: var(--text-faded);
}

.fotg-tab-content {
    display: flex;
    overflow: hidden;
    align-items: center;
    flex: 1;
    max-height: 0;
    padding: 0 25px;
    transition: max-height 0.5s ease-in-out,
    opacity 0.4s ease-in-out 0.1s,
    padding 0.5s ease-in-out;
    opacity: 0;
}

.fotg-tab:hover .fotg-tab-content {
    max-height: 300px;
    padding: 15px 25px;
    opacity: 1;
}

.fotg-tab-content .text {
    font-size: 0.85em;
    line-height: 1.4;
    padding-left: 20px;
    color: var(--text-color);
    border-left: 1px solid var(--gold);
}

/* Wide Hero Card Base Styles */
.fotg-wide-hero {
    grid-template-rows: 240px auto;
}

.fotg-wide-hero .preview-container {
    height: 230px;
}

.fotg-wide-title {
    display: block;
    font-size: 20px;
    margin: 0;
}

@media (max-width: 768px) {
    .fotg-tabs {
        gap: 12px;
        padding: 0;
        background-color: transparent;
    }
    .fotg-tab {
        flex-direction: column;
        min-height: 145px;
        padding: 0;
        border-radius: 8px;
        box-shadow: var(--shadow-small-container); 
        border: 1px solid var(--border-container-small);
    }

    .fotg-tab-image {
        width: 100% !important;
        min-width: 100% !important;
        height: 50px;
    }

    .fotg-tab-content .text {
        display: none;
    }

    .fotg-tab-image::after {
        background: linear-gradient(
                180deg,
                transparent 20%,
                var(--bg-container-small) 100%
        ) !important;
    }

    .fotg-tab-title {
        min-width: auto;
        padding: 10px 15px;
    }

    .fotg-tab-content {
        padding: 0 15px;
    }

    .fotg-tab:hover .fotg-tab-content {
        max-height: 500px;
        padding: 10px 15px 15px 15px;
    }

    .fotg-header h1 {
        font-size: 1.8em;
    }

    .fotg-header h2 {
        font-size: 1.15em;
        margin-bottom: 24px;
    }

    .fotg-intro {
        font-size: 1.05em;
        margin-bottom: 30px;
        padding: 0 15px;
    }

    /* Wide Card responsive scaling */
    .fotg-wide-hero {
        grid-template-rows: 170px auto !important;
    }

    .fotg-wide-hero .preview-container {
        height: 160px !important;
    }

    .fotg-wide-title {
        font-size: 18px;
    }

    .fotg-tab:hover::before {
        background: none;
    }
}

@media (max-width: 480px) {
    .fotg-header {
        margin-bottom: 30px;
    }

    .fotg-header h1 {
        font-size: 1.5em;
    }

    .fotg-header h2 {
        font-size: 1em;
        margin-bottom: 20px;
    }

    .fotg-intro {
        font-size: 0.95em;
        margin-bottom: 25px;
        padding: 0 10px;
    }

    .fotg-tab-image {
        height: 70px;
    }

    .fotg-tab-title .main {
        font-size: 0.95em;
    }

    .fotg-tab-title .sub {
        font-size: 0.85em;
    }

    .fotg-tab-content .text {
        font-size: 0.85em;
        padding-left: 14px;
    }

    /* Wide Card max compression */
    .fotg-wide-hero {
        grid-template-rows: 120px auto !important;
    }

    .fotg-wide-hero .preview-container {
        height: 110px !important;
    }

    .fotg-wide-title {
        font-size: 16px;
    }
}
