/* ==========================================================================
   Thailand 5S Award - History & Objectives Page Styles (styleHistory.css)
   Designed to match the Royal Gold theme with modern, interactive aesthetics
   ========================================================================== */

:root {
    --his-gold-primary: #b87900;
    --his-gold-dark: #8c5d00;
    --his-gold-light: #df9e08;
    --his-gold-soft: #fbf5e6;
    --his-gold-border: rgba(196, 149, 45, 0.22);
    --his-text-main: #2b210e;
    --his-text-sub: #594726;
    --his-text-muted: #7d6844;
    --his-card-bg: #ffffff;
    --his-shadow: 0 10px 35px rgba(125, 100, 46, 0.08);
    --his-shadow-hover: 0 18px 45px rgba(125, 100, 46, 0.15);
    --his-radius-lg: 24px;
    --his-radius-md: 16px;
    --his-radius-sm: 10px;
}

/* History Page Main Container */
.history-page-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 40px 20px 90px;
}

/* ==================== Hero Header ==================== */
.history-hero {
    text-align: center;
    margin-bottom: 45px;
    position: relative;
}

.history-badge-pill {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 7px 18px;
    background: linear-gradient(135deg, #fff7e4 0%, #faecd0 100%);
    border: 1px solid rgba(196, 149, 45, 0.35);
    border-radius: 50px;
    color: var(--his-gold-dark);
    font-size: 0.92rem;
    font-weight: 600;
    margin-bottom: 16px;
    box-shadow: 0 3px 12px rgba(184, 121, 0, 0.08);
}

.history-badge-pill svg {
    color: var(--his-gold-primary);
    flex-shrink: 0;
}

.history-hero-title {
    font-size: 2.6rem;
    font-weight: 700;
    color: var(--his-text-main);
    line-height: 1.25;
    margin-bottom: 14px;
    letter-spacing: -0.3px;
}

.history-hero-title span {
    background: linear-gradient(135deg, #a46c00 0%, #df9e08 50%, #8c5d00 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.history-hero-subtitle {
    font-size: 1.15rem;
    color: var(--his-text-sub);
    max-width: 780px;
    margin: 0 auto 28px;
    line-height: 1.7;
    font-weight: 400;
}

/* Anchor Navigation Bar */
.history-nav-pills {
    display: inline-flex;
    flex-wrap: wrap;
    gap: 12px;
    justify-content: center;
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(8px);
    padding: 8px;
    border-radius: 50px;
    border: 1px solid var(--his-gold-border);
    box-shadow: 0 6px 20px rgba(125, 100, 46, 0.06);
}

.history-nav-pill-item {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 22px;
    border-radius: 40px;
    font-size: 0.96rem;
    font-weight: 500;
    color: var(--his-text-sub);
    text-decoration: none;
    transition: all 0.25s ease;
    background: transparent;
}

.history-nav-pill-item:hover {
    background: linear-gradient(135deg, #df9e08, #b87900);
    color: #ffffff;
    box-shadow: 0 4px 14px rgba(184, 121, 0, 0.25);
    transform: translateY(-2px);
}

.history-nav-pill-item svg {
    transition: transform 0.25s ease;
}

.history-nav-pill-item:hover svg {
    transform: scale(1.1);
}

/* ==================== General Card Styles ==================== */
.history-card {
    scroll-margin-top: 100px;
    background: var(--his-card-bg);
    border-radius: var(--his-radius-lg);
    box-shadow: var(--his-shadow);
    border: 1px solid var(--his-gold-border);
    padding: 42px 46px;
    margin-bottom: 40px;
    position: relative;
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.history-card:hover {
    box-shadow: var(--his-shadow-hover);
}

/* Decorative Gold Top Accent Bar */
.history-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #9f6900 0%, #df9e08 35%, #ffd470 50%, #df9e08 65%, #9f6900 100%);
}

/* Card Header Component */
.history-card-header {
    display: flex;
    align-items: center;
    gap: 18px;
    padding-bottom: 22px;
    margin-bottom: 30px;
    border-bottom: 2px solid #f5ede0;
}

.history-card-icon {
    width: 56px;
    height: 56px;
    border-radius: 16px;
    background: linear-gradient(135deg, #df9e08 0%, #b87900 100%);
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    box-shadow: 0 6px 16px rgba(184, 121, 0, 0.28);
}

.history-card-title-group h2 {
    font-size: 1.6rem;
    font-weight: 700;
    color: var(--his-text-main);
    margin: 0 0 4px;
    line-height: 1.3;
}

.history-card-title-group p {
    font-size: 0.95rem;
    color: var(--his-text-muted);
    margin: 0;
    font-weight: 400;
}

/* ==================== History Narrative Content ==================== */
.history-lead-box {
    background: linear-gradient(135deg, #fffbf2 0%, #fef7e6 100%);
    border-left: 4px solid var(--his-gold-primary);
    padding: 22px 26px;
    border-radius: 0 var(--his-radius-md) var(--his-radius-md) 0;
    margin-bottom: 28px;
    box-shadow: 0 4px 14px rgba(184, 121, 0, 0.05);
}

.history-lead-text {
    font-size: 1.15rem;
    font-weight: 500;
    color: #433214;
    line-height: 1.8;
    margin: 0;
}

.history-body-paragraphs {
    display: flex;
    flex-direction: column;
    gap: 18px;
    margin-bottom: 35px;
}

.history-p {
    font-size: 1.05rem;
    color: var(--his-text-sub);
    line-height: 1.9;
    margin: 0;
    text-align: justify;
}

.history-p strong {
    color: var(--his-text-main);
    font-weight: 600;
}

/* 4 Pillars Grid in History */
.history-pillars-title {
    font-size: 1.18rem;
    font-weight: 700;
    color: var(--his-text-main);
    margin-bottom: 18px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.history-pillars-title svg {
    color: var(--his-gold-primary);
}

.history-pillars-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 18px;
}

.pillar-item {
    background: #fdfaf3;
    border: 1px solid #f0e3cc;
    border-radius: var(--his-radius-md);
    padding: 22px 18px;
    text-align: center;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.pillar-item:hover {
    background: #ffffff;
    border-color: var(--his-gold-light);
    transform: translateY(-4px);
    box-shadow: 0 8px 22px rgba(184, 121, 0, 0.12);
}

.pillar-icon-box {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    background: linear-gradient(135deg, #f8edcf, #ebd59e);
    color: var(--his-gold-dark);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 12px;
    transition: transform 0.3s ease;
}

.pillar-item:hover .pillar-icon-box {
    transform: scale(1.1);
    background: linear-gradient(135deg, #df9e08, #b87900);
    color: #ffffff;
}

.pillar-title {
    font-size: 1.02rem;
    font-weight: 700;
    color: var(--his-text-main);
    margin-bottom: 6px;
    line-height: 1.35;
}

.pillar-desc {
    font-size: 0.88rem;
    color: var(--his-text-muted);
    line-height: 1.55;
    margin: 0;
}

/* ==================== Objectives Section ==================== */
.objectives-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 22px;
    margin-top: 10px;
}

.objective-card {
    background: linear-gradient(180deg, #ffffff 0%, #fdfbf7 100%);
    border: 1px solid #ebdcc4;
    border-radius: var(--his-radius-md);
    padding: 28px 24px 26px;
    position: relative;
    display: flex;
    flex-direction: column;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 14px rgba(125, 100, 46, 0.04);
}

.objective-card:hover {
    border-color: var(--his-gold-light);
    transform: translateY(-5px);
    box-shadow: 0 12px 28px rgba(184, 121, 0, 0.12);
    background: #ffffff;
}

/* Span across two columns for balance if needed, or 3 on top 2 below */
.objective-card.card-wide {
    grid-column: span 1;
}

.objective-top-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
}

.objective-num-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: linear-gradient(135deg, #df9e08 0%, #b87900 100%);
    color: #ffffff;
    font-size: 1.05rem;
    font-weight: 700;
    box-shadow: 0 3px 10px rgba(184, 121, 0, 0.28);
    letter-spacing: 0.5px;
}

.objective-icon-badge {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    background: #fbf4e4;
    color: var(--his-gold-dark);
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid #ebd8b0;
    transition: all 0.3s ease;
}

.objective-card:hover .objective-icon-badge {
    background: var(--his-gold-primary);
    color: #ffffff;
    border-color: var(--his-gold-primary);
}

.objective-card-title {
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--his-text-main);
    line-height: 1.4;
    margin-bottom: 10px;
}

.objective-card-desc {
    font-size: 0.95rem;
    color: var(--his-text-sub);
    line-height: 1.7;
    margin: 0 0 16px;
    flex-grow: 1;
}

.objective-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: auto;
    padding-top: 14px;
    border-top: 1px dashed #eedfc4;
}

.objective-tag-chip {
    font-size: 0.78rem;
    font-weight: 600;
    padding: 3px 10px;
    background: #f7efe1;
    color: #7d5917;
    border-radius: 20px;
    border: 1px solid #ebd9b8;
    white-space: nowrap;
}

/* ==================== Official Logo Section ==================== */
.logo-showcase-container {
    display: grid;
    grid-template-columns: 380px 1fr;
    gap: 40px;
    align-items: center;
    margin-top: 10px;
}

.logo-display-card {
    background: linear-gradient(135deg, #ffffff 0%, #fdfcf9 100%);
    border: 1px solid #eedec3;
    border-radius: var(--his-radius-md);
    padding: 36px 28px;
    text-align: center;
    position: relative;
    box-shadow: 0 6px 24px rgba(125, 100, 46, 0.06);
    display: flex;
    flex-direction: column;
    align-items: center;
}

.logo-display-card::after {
    content: '';
    position: absolute;
    inset: 12px;
    border: 1px dashed rgba(196, 149, 45, 0.35);
    border-radius: calc(var(--his-radius-md) - 6px);
    pointer-events: none;
}

.logo-img-wrapper {
    position: relative;
    z-index: 1;
    max-width: 250px;
    width: 100%;
    margin-bottom: 20px;
    transition: transform 0.35s ease;
}

.logo-img-wrapper:hover {
    transform: scale(1.04);
}

.logo-img-wrapper img {
    width: 100%;
    height: auto;
    display: block;
    filter: drop-shadow(0 8px 16px rgba(120, 90, 20, 0.12));
}

.logo-badge-official {
    position: relative;
    z-index: 1;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 5px 14px;
    background: linear-gradient(135deg, #df9e08, #b87900);
    color: #ffffff;
    font-size: 0.85rem;
    font-weight: 600;
    border-radius: 30px;
    margin-bottom: 18px;
    box-shadow: 0 3px 8px rgba(184, 121, 0, 0.25);
}

.logo-actions {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    gap: 10px;
    width: 100%;
}

.btn-download-logo {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 11px 20px;
    border-radius: 40px;
    background: linear-gradient(135deg, #df9e08 0%, #b87900 100%);
    color: #ffffff;
    font-size: 0.95rem;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.25s ease;
    box-shadow: 0 4px 14px rgba(184, 121, 0, 0.24);
}

.btn-download-logo:hover {
    background: linear-gradient(135deg, #e8a917 0%, #9f6600 100%);
    box-shadow: 0 6px 18px rgba(184, 121, 0, 0.32);
    transform: translateY(-2px);
    color: #ffffff;
}

.btn-criteria-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 20px;
    border-radius: 40px;
    background: #ffffff;
    color: var(--his-gold-dark);
    font-size: 0.92rem;
    font-weight: 600;
    text-decoration: none;
    border: 1px solid #e2cb9d;
    transition: all 0.25s ease;
}

.btn-criteria-link:hover {
    background: #fbf5e6;
    border-color: var(--his-gold-primary);
    transform: translateY(-2px);
    color: var(--his-gold-dark);
}

/* Logo Details Column */
.logo-details-column {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.logo-description-text {
    font-size: 1.05rem;
    color: var(--his-text-sub);
    line-height: 1.85;
    margin: 0;
}

.logo-values-list {
    display: flex;
    flex-direction: column;
    gap: 14px;
    margin-top: 5px;
}

.logo-value-item {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    background: #fdfaf3;
    border: 1px solid #f1e4ce;
    border-radius: var(--his-radius-md);
    padding: 16px 20px;
    transition: all 0.25s ease;
}

.logo-value-item:hover {
    background: #ffffff;
    border-color: var(--his-gold-light);
    box-shadow: 0 6px 18px rgba(184, 121, 0, 0.08);
    transform: translateX(4px);
}

.logo-value-icon {
    width: 38px;
    height: 38px;
    border-radius: 10px;
    background: linear-gradient(135deg, #f8edcf, #ebd59e);
    color: var(--his-gold-dark);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.logo-value-item:hover .logo-value-icon {
    background: linear-gradient(135deg, #df9e08, #b87900);
    color: #ffffff;
}

.logo-value-content h4 {
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--his-text-main);
    margin: 0 0 4px;
    line-height: 1.35;
}

.logo-value-content p {
    font-size: 0.92rem;
    color: var(--his-text-muted);
    line-height: 1.6;
    margin: 0;
}

.logo-usage-notice {
    display: flex;
    align-items: center;
    gap: 12px;
    background: #fbf5e6;
    border-radius: var(--his-radius-sm);
    padding: 12px 16px;
    font-size: 0.88rem;
    color: var(--his-gold-dark);
    border: 1px solid #ebd7af;
}

.logo-usage-notice svg {
    flex-shrink: 0;
    color: var(--his-gold-primary);
}

/* ==================== Responsive Design ==================== */
@media (max-width: 1024px) {
    .history-card {
        padding: 34px 30px;
    }

    .history-pillars-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .objectives-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .logo-showcase-container {
        grid-template-columns: 1fr;
        gap: 32px;
    }

    .logo-display-card {
        max-width: 440px;
        margin: 0 auto;
        width: 100%;
    }
}

@media (max-width: 768px) {
    .history-page-container {
        padding: 24px 16px 60px;
    }

    .history-hero-title {
        font-size: 2rem;
    }

    .history-hero-subtitle {
        font-size: 1rem;
    }

    .history-nav-pills {
        border-radius: 20px;
        width: 100%;
    }

    .history-nav-pill-item {
        padding: 8px 14px;
        font-size: 0.88rem;
        flex: 1 1 calc(50% - 12px);
        justify-content: center;
    }

    .history-card {
        padding: 26px 20px;
        border-radius: 18px;
        margin-bottom: 28px;
    }

    .history-card-header {
        gap: 14px;
        margin-bottom: 22px;
        padding-bottom: 18px;
    }

    .history-card-icon {
        width: 46px;
        height: 46px;
        border-radius: 12px;
    }

    .history-card-icon svg {
        width: 24px;
        height: 24px;
    }

    .history-card-title-group h2 {
        font-size: 1.35rem;
    }

    .history-lead-box {
        padding: 16px 18px;
    }

    .history-lead-text {
        font-size: 1.02rem;
    }

    .history-p {
        font-size: 0.98rem;
        line-height: 1.75;
    }

    .history-pillars-grid {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    .pillar-item {
        flex-direction: row;
        text-align: left;
        gap: 14px;
        padding: 16px;
    }

    .pillar-icon-box {
        margin-bottom: 0;
        flex-shrink: 0;
    }

    .objectives-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    .objective-card {
        padding: 22px 18px;
    }

    .logo-value-item {
        padding: 14px 16px;
        gap: 12px;
    }
}
