/* 
   Historical Egypt - Khedival Cairo Digital Registry
   Visual DNA: Classical Archival / Khedival Heritage
   Typography: Cormorant Garamond & Inter
*/

@import url('https://fonts.googleapis.com/css2?family=Cormorant+Garamond:ital,wght@0,300;0,400;0,500;0,600;0,700;1,400&family=Inter:wght@300;400;500;600&display=swap');

:root {
    --he-bg: #F6F3EC;
    --he-bg-card: #FDFDFB;
    --he-accent: #781D2D;      /* Bordeaux Red */
    --he-accent-gold: #B89047; /* Archival Gold */
    --he-text: #222524;        /* Charcoal Ink */
    --he-text-muted: #6E6A5F;  /* Warm Muted Brown */
    --he-border: #DCD8CE;      /* Soft Line */
    --he-border-focus: #781D2D;
    --he-font-heading: 'Cormorant Garamond', serif;
    --he-font-body: 'Inter', sans-serif;
    --he-max-width: 1100px;
    --he-transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

/* Reset */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    background-color: var(--he-bg);
    color: var(--he-text);
    font-family: var(--he-font-body);
    line-height: 1.7;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}

a {
    color: inherit;
    text-decoration: none;
    transition: var(--he-transition);
}

img {
    max-width: 100%;
    height: auto;
    display: block;
    filter: sepia(15%) contrast(95%);
    transition: var(--he-transition);
}

img:hover {
    filter: sepia(0%) contrast(100%);
}

/* Layout */
.he-container {
    width: 100%;
    max-width: var(--he-max-width);
    margin: 0 auto;
    padding: 0 24px;
}

/* Header */
.he-header {
    border-bottom: 1px solid var(--he-border);
    position: sticky;
    top: 0;
    z-index: 100;
    background-color: rgba(246, 243, 236, 0.96);
    backdrop-filter: blur(8px);
}

.he-header-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 90px;
}

.he-logo {
    font-family: var(--he-font-heading);
    font-weight: 700;
    font-size: 26px;
    letter-spacing: -0.01em;
    color: var(--he-accent);
    display: flex;
    align-items: center;
    gap: 10px;
}

.he-logo::after {
    content: '';
    display: inline-block;
    width: 6px;
    height: 6px;
    background-color: var(--he-accent-gold);
    border-radius: 50%;
}

.he-nav-menu {
    display: flex;
    align-items: center;
    gap: 28px;
}

.he-nav-link {
    font-family: var(--he-font-body);
    font-weight: 500;
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--he-text-muted);
    padding: 8px 0;
    position: relative;
}

.he-nav-link:hover,
.he-nav-link.active {
    color: var(--he-accent);
}

.he-nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 1px;
    background-color: var(--he-accent-gold);
    transition: var(--he-transition);
}

.he-nav-link:hover::after,
.he-nav-link.active::after {
    width: 100%;
}

.he-menu-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
    z-index: 110;
}

.he-hamburger {
    width: 22px;
    height: 1px;
    background-color: var(--he-text);
    position: relative;
    display: block;
    transition: var(--he-transition);
}

.he-hamburger::before,
.he-hamburger::after {
    content: '';
    position: absolute;
    width: 22px;
    height: 1px;
    background-color: var(--he-text);
    left: 0;
    transition: var(--he-transition);
}

.he-hamburger::before {
    top: -6px;
}

.he-hamburger::after {
    bottom: -6px;
}

/* Hamburguer Active */
.he-menu-active .he-hamburger {
    background-color: transparent;
}

.he-menu-active .he-hamburger::before {
    transform: rotate(45deg);
    top: 0;
}

.he-menu-active .he-hamburger::after {
    transform: rotate(-45deg);
    bottom: 0;
}

/* Hero Section */
.he-hero {
    padding: 90px 0;
    border-bottom: 1px solid var(--he-border);
}

.he-hero-grid {
    display: grid;
    grid-template-columns: 1.15fr 0.85fr;
    gap: 60px;
    align-items: center;
}

.he-hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-family: var(--he-font-body);
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: var(--he-accent-gold);
    margin-bottom: 20px;
}

.he-hero-title {
    font-family: var(--he-font-heading);
    font-size: 58px;
    font-weight: 400;
    line-height: 1.15;
    margin-bottom: 24px;
    color: var(--he-text);
}

.he-hero-title em {
    font-family: var(--he-font-heading);
    font-style: italic;
    color: var(--he-accent);
}

.he-hero-desc {
    font-size: 16px;
    color: var(--he-text-muted);
    max-width: 540px;
    margin-bottom: 36px;
}

.he-hero-btn {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    background-color: var(--he-accent);
    color: #FFFFFF;
    font-family: var(--he-font-body);
    font-weight: 500;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    padding: 14px 28px;
    border: 1px solid var(--he-accent);
    transition: var(--he-transition);
}

.he-hero-btn:hover {
    background-color: transparent;
    color: var(--he-accent);
}

.he-hero-img-wrapper {
    position: relative;
    border: 1px solid var(--he-border);
    padding: 10px;
    background-color: var(--he-bg-card);
}

.he-hero-img-wrapper::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: -10px;
    width: 100%;
    height: 100%;
    border: 1px solid var(--he-accent-gold);
    z-index: -1;
    pointer-events: none;
}

/* Registry Section */
.he-registry {
    padding: 80px 0;
    border-bottom: 1px solid var(--he-border);
}

.he-section-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    margin-bottom: 50px;
}

.he-section-tag {
    font-family: var(--he-font-body);
    font-size: 11px;
    font-weight: 600;
    color: var(--he-accent-gold);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-bottom: 10px;
    display: block;
}

.he-section-title {
    font-family: var(--he-font-heading);
    font-size: 38px;
    font-weight: 400;
    color: var(--he-text);
}

.he-filter-list {
    display: flex;
    gap: 10px;
    list-style: none;
}

.he-filter-btn {
    background: none;
    border: 1px solid var(--he-border);
    color: var(--he-text-muted);
    font-family: var(--he-font-body);
    font-size: 11px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    padding: 6px 14px;
    cursor: pointer;
    transition: var(--he-transition);
}

.he-filter-btn:hover,
.he-filter-btn.active {
    color: var(--he-accent);
    border-color: var(--he-accent);
    background-color: var(--he-bg-card);
}

/* Grid & Cards */
.he-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
}

.he-card {
    background-color: var(--he-bg-card);
    border: 1px solid var(--he-border);
    display: flex;
    flex-direction: column;
    height: 100%;
    transition: var(--he-transition);
}

.he-card:hover {
    border-color: var(--he-accent-gold);
    box-shadow: 0 10px 30px rgba(110, 106, 95, 0.05);
}

.he-card-img-link {
    display: block;
    overflow: hidden;
    position: relative;
    aspect-ratio: 16 / 11;
    border-bottom: 1px solid var(--he-border);
}

.he-card-content {
    padding: 24px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.he-card-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
    font-family: var(--he-font-body);
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--he-text-muted);
}

.he-card-category {
    color: var(--he-accent);
}

.he-card-title {
    font-family: var(--he-font-heading);
    font-size: 24px;
    font-weight: 400;
    line-height: 1.25;
    margin-bottom: 12px;
}

.he-card-title a:hover {
    color: var(--he-accent);
}

.he-card-excerpt {
    font-size: 14px;
    color: var(--he-text-muted);
    margin-bottom: 20px;
    flex-grow: 1;
}

.he-card-link {
    font-family: var(--he-font-body);
    font-weight: 600;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--he-accent);
    margin-top: auto;
}

.he-card-link svg {
    transition: var(--he-transition);
}

.he-card-link:hover svg {
    transform: translateX(4px);
}

/* Featured Layout */
.he-grid-featured {
    grid-column: span 3;
    display: grid;
    grid-template-columns: 1.15fr 0.85fr;
    gap: 40px;
    align-items: center;
    border-bottom: 1px solid var(--he-border);
    padding-bottom: 40px;
    margin-bottom: 10px;
}

.he-grid-featured .he-card-img-link {
    aspect-ratio: 16 / 9;
    border: 1px solid var(--he-border);
}

.he-grid-featured .he-card-content {
    padding: 0;
}

.he-grid-featured .he-card-title {
    font-size: 32px;
    margin-bottom: 16px;
}

.he-grid-featured .he-card-excerpt {
    font-size: 15px;
    margin-bottom: 28px;
}

/* Editor Bio Section */
.he-editor-section {
    padding: 80px 0;
    border-bottom: 1px solid var(--he-border);
}

.he-editor-grid {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 50px;
    align-items: center;
}

.he-editor-img-wrap {
    border: 1px solid var(--he-border);
    padding: 6px;
    background-color: var(--he-bg-card);
}

.he-editor-title {
    font-family: var(--he-font-heading);
    font-size: 36px;
    font-weight: 400;
    margin-bottom: 4px;
}

.he-editor-role {
    font-family: var(--he-font-body);
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    color: var(--he-accent-gold);
    letter-spacing: 0.1em;
    margin-bottom: 20px;
    display: block;
}

.he-editor-text {
    font-size: 15px;
    color: var(--he-text-muted);
    margin-bottom: 20px;
}

.he-editor-signature {
    font-family: var(--he-font-heading);
    font-style: italic;
    font-size: 18px;
    color: var(--he-accent);
}

/* General Page Layouts */
.he-page-header {
    padding: 70px 0 35px;
    border-bottom: 1px solid var(--he-border);
    margin-bottom: 50px;
}

.he-page-title {
    font-family: var(--he-font-heading);
    font-size: 50px;
    font-weight: 400;
    margin-bottom: 12px;
}

.he-page-subtitle {
    font-size: 16px;
    color: var(--he-text-muted);
    max-width: 680px;
}

.he-split-layout {
    display: grid;
    grid-template-columns: 1.85fr 1.15fr;
    gap: 60px;
    padding-bottom: 80px;
}

.he-rich-content {
    font-size: 16px;
    color: var(--he-text-muted);
}

.he-rich-content p {
    margin-bottom: 20px;
}

.he-rich-content h2 {
    font-family: var(--he-font-heading);
    font-size: 28px;
    font-weight: 400;
    color: var(--he-text);
    margin: 36px 0 16px;
    border-bottom: 1px solid var(--he-border);
    padding-bottom: 8px;
}

.he-rich-content h3 {
    font-family: var(--he-font-heading);
    font-size: 22px;
    font-weight: 400;
    color: var(--he-text);
    margin: 28px 0 12px;
}

.he-rich-content ul, 
.he-rich-content ol {
    margin-bottom: 20px;
    padding-left: 20px;
}

.he-rich-content li {
    margin-bottom: 10px;
}

.he-rich-content blockquote {
    border-left: 2px solid var(--he-accent-gold);
    padding: 12px 24px;
    font-family: var(--he-font-heading);
    font-style: italic;
    font-size: 20px;
    color: var(--he-accent);
    margin: 28px 0;
}

.he-sidebar {
    position: sticky;
    top: 120px;
    align-self: start;
}

.he-sidebar-box {
    background-color: var(--he-bg-card);
    border: 1px solid var(--he-border);
    padding: 28px;
    margin-bottom: 28px;
}

.he-sidebar-title {
    font-family: var(--he-font-heading);
    font-size: 20px;
    font-weight: 400;
    border-bottom: 1px solid var(--he-border);
    padding-bottom: 12px;
    margin-bottom: 18px;
}

.he-sidebar-item {
    font-size: 13px;
    padding: 8px 0;
    border-bottom: 1px solid rgba(220, 216, 206, 0.4);
    display: flex;
    justify-content: space-between;
}

.he-sidebar-item:last-child {
    border-bottom: none;
}

.he-sidebar-value {
    color: var(--he-text);
    font-weight: 500;
}

/* Schedule / Info Table */
.he-table-wrap {
    margin: 28px 0;
    overflow-x: auto;
    border: 1px solid var(--he-border);
}

.he-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
    text-align: left;
}

.he-table th {
    background-color: var(--he-bg-card);
    border-bottom: 1px solid var(--he-border);
    padding: 14px 20px;
    font-weight: 600;
    text-transform: uppercase;
    font-size: 11px;
    letter-spacing: 0.05em;
}

.he-table td {
    padding: 14px 20px;
    border-bottom: 1px solid var(--he-border);
    color: var(--he-text-muted);
}

.he-table tr:last-child td {
    border-bottom: none;
}

.he-table tr:hover td {
    color: var(--he-text);
    background-color: var(--he-bg-card);
}

/* Forms */
.he-form-group {
    margin-bottom: 20px;
}

.he-label {
    display: block;
    font-family: var(--he-font-body);
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 6px;
}

.he-input,
.he-textarea {
    width: 100%;
    background-color: var(--he-bg-card);
    border: 1px solid var(--he-border);
    color: var(--he-text);
    font-family: var(--he-font-body);
    font-size: 13px;
    padding: 12px 16px;
    outline: none;
    transition: var(--he-transition);
}

.he-input:focus,
.he-textarea:focus {
    border-color: var(--he-border-focus);
}

.he-textarea {
    resize: vertical;
    min-height: 120px;
}

.he-submit-btn {
    background-color: var(--he-accent);
    color: #FFFFFF;
    border: 1px solid var(--he-accent);
    font-family: var(--he-font-body);
    font-weight: 500;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    padding: 12px 24px;
    cursor: pointer;
    transition: var(--he-transition);
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.he-submit-btn:hover {
    background-color: transparent;
    color: var(--he-accent);
}

.he-alert {
    padding: 14px;
    background-color: var(--he-bg-card);
    border: 1px solid var(--he-border);
    font-size: 13px;
    margin-bottom: 20px;
    display: none;
}

.he-alert-success {
    border-left: 3px solid var(--he-accent-gold);
    color: var(--he-accent);
}

/* Post Layout */
.he-post-meta-strip {
    display: flex;
    gap: 20px;
    align-items: center;
    margin-top: 14px;
    font-family: var(--he-font-body);
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--he-text-muted);
}

.he-post-category {
    color: var(--he-accent);
}

.he-post-featured-img-wrap {
    border: 1px solid var(--he-border);
    padding: 10px;
    background-color: var(--he-bg-card);
    margin-bottom: 40px;
}

/* Breadcrumbs */
.he-breadcrumbs {
    display: flex;
    align-items: center;
    gap: 6px;
    list-style: none;
    font-family: var(--he-font-body);
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    margin-bottom: 16px;
    color: var(--he-text-muted);
}

.he-breadcrumb-item::after {
    content: '/';
    margin-left: 6px;
}

.he-breadcrumb-item:last-child::after {
    content: none;
}

.he-breadcrumb-item a:hover {
    color: var(--he-accent);
}

.he-breadcrumb-active {
    color: var(--he-text);
}

/* Image Showcase Group */
.he-image-showcase {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
    margin: 30px 0;
}

.he-image-showcase-item {
    border: 1px solid var(--he-border);
    padding: 6px;
    background-color: var(--he-bg-card);
}

.he-image-showcase-caption {
    font-family: var(--he-font-heading);
    font-style: italic;
    font-size: 14px;
    color: var(--he-text-muted);
    margin-top: 6px;
    display: block;
    text-align: center;
}

/* Footer */
.he-footer {
    border-top: 1px solid var(--he-border);
    padding: 70px 0;
    background-color: #EFECE3;
}

.he-footer-grid {
    display: grid;
    grid-template-columns: 1.3fr 0.7fr;
    gap: 40px;
    margin-bottom: 40px;
}

.he-footer-logo {
    font-family: var(--he-font-heading);
    font-weight: 700;
    font-size: 24px;
    color: var(--he-accent);
    margin-bottom: 12px;
}

.he-footer-tagline {
    font-size: 14px;
    color: var(--he-text-muted);
    max-width: 440px;
}

.he-footer-nav-title {
    font-family: var(--he-font-body);
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--he-text);
    margin-bottom: 16px;
}

.he-footer-nav-links {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px 20px;
    list-style: none;
}

.he-footer-nav-link {
    font-size: 13px;
    color: var(--he-text-muted);
}

.he-footer-nav-link:hover {
    color: var(--he-accent);
}

.he-footer-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-top: 1px solid var(--he-border);
    padding-top: 24px;
    font-family: var(--he-font-body);
    font-size: 10px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--he-text-muted);
}

.he-footer-bottom-links {
    display: flex;
    gap: 20px;
    list-style: none;
}

.he-footer-bottom-link:hover {
    color: var(--he-accent);
}

/* Responsive */
@media (max-width: 991px) {
    .he-hero-grid {
        grid-template-columns: 1fr;
        gap: 40px;
    }
    
    .he-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .he-grid-featured {
        grid-column: span 2;
        grid-template-columns: 1fr;
        gap: 24px;
    }
    
    .he-editor-grid {
        grid-template-columns: 1fr;
        gap: 24px;
        text-align: center;
    }
    
    .he-editor-img-wrap {
        max-width: 240px;
        margin: 0 auto;
    }
    
    .he-split-layout {
        grid-template-columns: 1fr;
        gap: 40px;
    }
    
    .he-sidebar {
        position: static;
    }
}

@media (max-width: 768px) {
    .he-header-inner {
        height: 80px;
    }
    
    .he-menu-toggle {
        display: block;
    }
    
    .he-nav-menu {
        position: fixed;
        top: 80px;
        left: 0;
        width: 100%;
        height: calc(100vh - 80px);
        background-color: var(--he-bg);
        flex-direction: column;
        justify-content: center;
        gap: 30px;
        padding: 40px;
        transform: translateY(-100%);
        opacity: 0;
        pointer-events: none;
        transition: var(--he-transition);
        border-top: 1px solid var(--he-border);
    }
    
    .he-menu-active .he-nav-menu {
        transform: translateY(0);
        opacity: 1;
        pointer-events: all;
    }
    
    .he-nav-link {
        font-size: 18px;
    }
    
    .he-hero {
        padding: 50px 0;
    }
    
    .he-hero-title {
        font-size: 40px;
    }
    
    .he-section-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 20px;
        margin-bottom: 30px;
    }
    
    .he-filter-list {
        width: 100%;
        overflow-x: auto;
        padding-bottom: 6px;
    }
    
    .he-grid {
        grid-template-columns: 1fr;
    }
    
    .he-grid-featured {
        grid-column: span 1;
    }
    
    .he-image-showcase {
        grid-template-columns: 1fr;
    }
    
    .he-footer-grid {
        grid-template-columns: 1fr;
        gap: 24px;
    }
    
    .he-footer-bottom {
        flex-direction: column;
        gap: 12px;
        text-align: center;
    }
}
