/* History Page CSS - ISKCON Imphal Sacred Heritage */

:root {
    /* Divine Color Palette */
    --saffron: #FF9933;
    --deep-saffron: #E8840A;
    --gold: #FFD700;
    --maroon: #8B0000;
    --deep-maroon: #660000;
    --holy-cream: #FFF8DC;
    --sacred-white: #FFFFFF;
    --temple-brown: #8B4513;
    --heritage-bronze: #CD7F32;
    --wisdom-blue: #4682B4;
    --peaceful-green: #228B22;
    
    /* Typography */
    --font-primary: 'Merriweather', serif;
    --font-secondary: 'Poppins', sans-serif;
    --font-decorative: 'Dancing Script', cursive;
    --font-elegant: 'Cinzel', serif;
    
    /* Spacing & Shadows */
    --shadow-divine: 0 8px 32px rgba(255, 153, 51, 0.15);
    --shadow-deep: 0 12px 48px rgba(139, 0, 0, 0.2);
    --shadow-light: 0 4px 16px rgba(0, 0, 0, 0.1);
    --border-radius: 15px;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Global Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: var(--font-secondary);
    line-height: 1.6;
    color: #333;
    background: linear-gradient(135deg, var(--holy-cream) 0%, #FAF5E6 100%);
    overflow-x: hidden;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Loading Overlay */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, var(--maroon) 0%, var(--deep-maroon) 100%);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 10000;
    opacity: 0;
    visibility: hidden;
    transition: var(--transition);
}

.loading-overlay.active {
    opacity: 1;
    visibility: visible;
}

.loading-spinner {
    text-align: center;
    color: var(--sacred-white);
}

.spinner-ring {
    width: 60px;
    height: 60px;
    border: 4px solid rgba(255, 255, 255, 0.3);
    border-top: 4px solid var(--gold);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 20px;
}

.loading-text {
    font-size: 1.2rem;
    font-weight: 600;
    font-family: var(--font-primary);
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Hero Section */
.hero-section {
    position: relative;
    height: 50vh;
    background: linear-gradient(135deg, var(--maroon) 0%, var(--deep-maroon) 50%, var(--heritage-bronze) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-top: 70px;
    overflow: hidden;
}

.hero-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="heritage-pattern" x="0" y="0" width="15" height="15" patternUnits="userSpaceOnUse"><circle cx="7.5" cy="7.5" r="1" fill="rgba(255,215,0,0.1)"/><rect x="6" y="6" width="3" height="3" fill="rgba(255,255,255,0.05)"/></pattern></defs><rect width="100" height="100" fill="url(%23heritage-pattern)"/></svg>');
    opacity: 0.4;
}

.hero-content {
    position: relative;
    z-index: 2;
    text-align: center;
    color: var(--sacred-white);
    width: 100%;
}

.hero-text {
    max-width: 800px;
    margin: 0 auto;
    padding: 2rem;
}

.hero-title {
    font-family: var(--font-elegant);
    font-size: 3rem;
    margin-bottom: 0.5rem;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
    animation: fadeInUp 1s ease;
}

.hero-subtitle {
    font-family: var(--font-decorative);
    font-size: 1.8rem;
    margin-bottom: 1rem;
    color: var(--gold);
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.5);
    animation: fadeInUp 1s ease 0.2s both;
}

.hero-description {
    font-size: 1.1rem;
    opacity: 0.9;
    animation: fadeInUp 1s ease 0.4s both;
}

/* Timeline Navigation */
.timeline-nav {
    padding: 2rem 0;
    background: var(--sacred-white);
    border-bottom: 2px solid var(--holy-cream);
    position: relative;
    /* top: 70px; */
    z-index: 100;
}

.timeline-pills {
    display: flex;
    justify-content: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.timeline-pill {
    background: transparent;
    border: 2px solid var(--saffron);
    color: var(--saffron);
    padding: 0.8rem 1.5rem;
    border-radius: 30px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    font-family: var(--font-secondary);
}

.timeline-pill:hover,
.timeline-pill.active {
    background: var(--saffron);
    color: var(--sacred-white);
    transform: translateY(-2px);
    box-shadow: var(--shadow-divine);
}

/* History Content */
.history-content {
    padding: 3rem 0;
}

.history-period {
    display: none;
    margin-bottom: 4rem;
}

.history-period.active {
    display: block;
    animation: fadeInUp 0.6s ease;
}

.period-header {
    text-align: center;
    margin-bottom: 3rem;
    padding: 2rem;
    background: linear-gradient(135deg, rgba(255, 153, 51, 0.1) 0%, rgba(255, 215, 0, 0.1) 100%);
    border-radius: var(--border-radius);
    border-left: 4px solid var(--saffron);
}

.period-title {
    font-family: var(--font-elegant);
    font-size: 2.2rem;
    color: var(--maroon);
    margin-bottom: 0.5rem;
}

.period-dates {
    font-size: 1.1rem;
    color: var(--heritage-bronze);
    font-weight: 600;
    font-family: var(--font-primary);
}

/* Content Grid */
.content-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    align-items: start;
}

.content-text {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.highlight-box {
    background: linear-gradient(135deg, var(--gold) 0%, #FFE55C 100%);
    padding: 2rem;
    border-radius: var(--border-radius);
    margin-bottom: 2rem;
    box-shadow: var(--shadow-light);
}

.highlight-box h3 {
    font-family: var(--font-elegant);
    color: var(--maroon);
    margin-bottom: 1rem;
    font-size: 1.3rem;
}

.highlight-box p {
    color: #444;
    line-height: 1.7;
}

.feature-list {
    margin: 2rem 0;
}

.feature-item {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    margin-bottom: 1.5rem;
    padding: 1rem;
    background: var(--sacred-white);
    border-radius: 10px;
    box-shadow: var(--shadow-light);
    transition: var(--transition);
}

.feature-item:hover {
    transform: translateX(10px);
    box-shadow: var(--shadow-divine);
}

.feature-item i {
    color: var(--saffron);
    font-size: 1.5rem;
    margin-top: 0.2rem;
}

.feature-item h4 {
    color: var(--maroon);
    margin-bottom: 0.5rem;
    font-family: var(--font-elegant);
}

.feature-item p {
    color: #666;
    line-height: 1.6;
}

.historical-note {
    background: rgba(139, 0, 0, 0.1);
    padding: 1.5rem;
    border-radius: 10px;
    border-left: 4px solid var(--maroon);
    margin-top: 2rem;
}

.historical-note p {
    color: #555;
    line-height: 1.7;
    font-style: italic;
}

/* Content Visual */
.content-visual {
    display: flex;
    justify-content: center;
}

.image-container {
    position: relative;
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--shadow-deep);
    transition: var(--transition);
}

.image-container:hover {
    transform: scale(1.03);
}

.period-image {
    width: 100%;
    height: 400px;
    object-fit: cover;
    filter: sepia(10%) brightness(1.1);
}

.image-caption {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(transparent, rgba(0, 0, 0, 0.8));
    color: var(--sacred-white);
    padding: 2rem 1rem 1rem;
    font-weight: 600;
    text-align: center;
}

/* Founder Biography */
.founder-bio {
    background: rgba(70, 130, 180, 0.1);
    padding: 1.5rem;
    border-radius: 10px;
    margin-bottom: 2rem;
    border-left: 4px solid var(--wisdom-blue);
}

.founder-bio h3 {
    color: var(--wisdom-blue);
    margin-bottom: 1rem;
    font-family: var(--font-elegant);
}

.education-timeline {
    background: var(--sacred-white);
    padding: 2rem;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-light);
    margin-bottom: 2rem;
}

.education-timeline h3 {
    color: var(--maroon);
    margin-bottom: 1.5rem;
    font-family: var(--font-elegant);
    text-align: center;
}

.timeline-item {
    display: flex;
    align-items: center;
    gap: 2rem;
    padding: 1rem 0;
    border-bottom: 1px solid #eee;
}

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

.timeline-year {
    background: var(--saffron);
    color: var(--sacred-white);
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-weight: 600;
    min-width: 80px;
    text-align: center;
}

.timeline-detail {
    flex: 1;
    color: #555;
    font-weight: 500;
}

.spiritual-journey {
    background: rgba(255, 153, 51, 0.1);
    padding: 2rem;
    border-radius: var(--border-radius);
    border-left: 4px solid var(--saffron);
}

.spiritual-journey h3 {
    color: var(--saffron);
    margin-bottom: 1rem;
    font-family: var(--font-elegant);
}

.quote-box {
    background: var(--sacred-white);
    padding: 1.5rem;
    border-radius: 10px;
    margin-top: 1rem;
    box-shadow: var(--shadow-light);
    position: relative;
}

.quote-box::before {
    content: '"';
    font-size: 4rem;
    color: var(--saffron);
    position: absolute;
    top: -1rem;
    left: 1rem;
    font-family: var(--font-decorative);
}

.quote-box p {
    font-style: italic;
    color: var(--maroon);
    font-weight: 500;
    margin-left: 2rem;
}

/* Establishment Grid */
.establishment-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.milestone-card {
    background: var(--sacred-white);
    padding: 2rem;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-light);
    text-align: center;
    transition: var(--transition);
    border-top: 4px solid var(--saffron);
}

.milestone-card:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-divine);
}

.milestone-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.milestone-card h3 {
    font-family: var(--font-elegant);
    color: var(--maroon);
    margin-bottom: 1rem;
    font-size: 1.3rem;
}

.milestone-card p {
    color: #666;
    line-height: 1.6;
}

/* Temple Construction */
.temple-construction {
    display: flex;
    flex-direction: column;
    gap: 3rem;
}

.construction-timeline {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-bottom: 3rem;
}

.construction-phase {
    background: linear-gradient(135deg, rgba(255, 153, 51, 0.1) 0%, rgba(255, 215, 0, 0.1) 100%);
    padding: 2rem;
    border-radius: var(--border-radius);
    text-align: center;
    border-left: 4px solid var(--saffron);
}

.construction-phase h3 {
    color: var(--saffron);
    margin-bottom: 1rem;
    font-family: var(--font-elegant);
}

.construction-phase p {
    color: #555;
    line-height: 1.6;
}

.architectural-features {
    background: var(--sacred-white);
    padding: 2rem;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-light);
}

.architectural-features h3 {
    color: var(--maroon);
    margin-bottom: 2rem;
    font-family: var(--font-elegant);
    text-align: center;
    font-size: 1.5rem;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 2rem;
}

.arch-feature {
    text-align: center;
    padding: 1.5rem;
    background: rgba(255, 153, 51, 0.05);
    border-radius: 10px;
    transition: var(--transition);
}

.arch-feature:hover {
    background: rgba(255, 153, 51, 0.1);
    transform: translateY(-5px);
}

.arch-feature i {
    font-size: 2rem;
    color: var(--saffron);
    margin-bottom: 1rem;
}

.arch-feature h4 {
    color: var(--maroon);
    margin-bottom: 0.5rem;
    font-family: var(--font-elegant);
}

.arch-feature p {
    color: #666;
    font-size: 0.9rem;
}

/* Legacy Content */
.legacy-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
}

.memorial-note {
    background: rgba(139, 0, 0, 0.1);
    padding: 2rem;
    border-radius: var(--border-radius);
    border-left: 4px solid var(--maroon);
    margin-bottom: 2rem;
}

.memorial-note h3 {
    color: var(--maroon);
    margin-bottom: 1rem;
    font-family: var(--font-elegant);
}

.memorial-note p {
    color: #555;
    line-height: 1.7;
    font-style: italic;
}

.key-contributions,
.academic-legacy {
    margin-bottom: 2rem;
}

.key-contributions h3,
.academic-legacy h3 {
    color: var(--saffron);
    margin-bottom: 1.5rem;
    font-family: var(--font-elegant);
    font-size: 1.3rem;
}

.contribution-item {
    background: var(--sacred-white);
    padding: 1rem;
    margin-bottom: 1rem;
    border-radius: 8px;
    box-shadow: var(--shadow-light);
    line-height: 1.6;
    color: #555;
}

.contribution-item strong {
    color: var(--maroon);
}

.current-impact h3 {
    color: var(--maroon);
    margin-bottom: 2rem;
    font-family: var(--font-elegant);
    text-align: center;
    font-size: 1.5rem;
}

.impact-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
    margin-bottom: 2rem;
}

.stat-item {
    text-align: center;
    background: linear-gradient(135deg, var(--saffron) 0%, var(--deep-saffron) 100%);
    color: var(--sacred-white);
    padding: 2rem 1rem;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-divine);
}

.stat-number {
    font-size: 2.5rem;
    font-weight: 700;
    font-family: var(--font-elegant);
    margin-bottom: 0.5rem;
}

.stat-label {
    font-size: 0.9rem;
    opacity: 0.9;
    font-weight: 600;
}

.milestone-celebration {
    background: rgba(255, 215, 0, 0.1);
    padding: 2rem;
    border-radius: var(--border-radius);
    border-left: 4px solid var(--gold);
}

.milestone-celebration h4 {
    color: var(--gold);
    margin-bottom: 1rem;
    font-family: var(--font-elegant);
}

.milestone-celebration p {
    color: #555;
    line-height: 1.6;
}

/* Takeaways Section */
.takeaways-section {
    padding: 4rem 0;
    background: linear-gradient(135deg, var(--sacred-white) 0%, var(--holy-cream) 100%);
}

.section-title {
    font-family: var(--font-elegant);
    font-size: 2.5rem;
    color: var(--maroon);
    text-align: center;
    margin-bottom: 3rem;
}

.takeaways-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
}

.takeaway-card {
    background: var(--sacred-white);
    padding: 2rem;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-light);
    text-align: center;
    transition: var(--transition);
    border-top: 4px solid var(--saffron);
}

.takeaway-card:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-divine);
}

.takeaway-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.takeaway-card h3 {
    font-family: var(--font-elegant);
    color: var(--maroon);
    margin-bottom: 1rem;
    font-size: 1.3rem;
}

.takeaway-card p {
    color: #666;
    line-height: 1.6;
}

/* Conclusion Section */
.conclusion-section {
    padding: 4rem 0;
    background: linear-gradient(135deg, var(--maroon) 0%, var(--deep-maroon) 100%);
    color: var(--sacred-white);
}

.conclusion-content {
    text-align: center;
    max-width: 800px;
    margin: 0 auto;
}

.conclusion-title {
    font-family: var(--font-elegant);
    font-size: 2.5rem;
    color: var(--gold);
    margin-bottom: 2rem;
}

.conclusion-text {
    font-size: 1.1rem;
    line-height: 1.8;
    margin-bottom: 3rem;
    opacity: 0.95;
}

.conclusion-cta {
    display: flex;
    gap: 2rem;
    justify-content: center;
    flex-wrap: wrap;
}

.cta-btn {
    padding: 1rem 2rem;
    border-radius: 30px;
    text-decoration: none;
    font-weight: 600;
    transition: var(--transition);
    display: inline-block;
}

.cta-btn.primary {
    background: var(--saffron);
    color: var(--sacred-white);
}

.cta-btn.secondary {
    background: transparent;
    color: var(--sacred-white);
    border: 2px solid var(--sacred-white);
}

.cta-btn:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-divine);
}

.heritage-quote {
    font-family: var(--font-decorative);
    font-size: 1.1rem;
    color: var(--gold);
    font-style: italic;
    margin-bottom: 1rem;
}

/* Responsive Design */
@media (max-width: 768px) {
    .hero-title {
        font-size: 2.2rem;
    }

    .hero-subtitle {
        font-size: 1.4rem;
    }

    .timeline-pills {
        gap: 0.5rem;
    }

    .timeline-pill {
        padding: 0.6rem 1rem;
        font-size: 0.9rem;
    }

    .content-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .legacy-content {
        grid-template-columns: 1fr;
    }

    .impact-stats {
        grid-template-columns: 1fr;
    }

    .conclusion-cta {
        flex-direction: column;
        align-items: center;
    }

    .cta-btn {
        width: 100%;
        max-width: 300px;
        text-align: center;
    }
}

@media (max-width: 480px) {
    .hero-section {
        height: 40vh;
    }

    .hero-title {
        font-size: 1.8rem;
    }

    .hero-subtitle {
        font-size: 1.2rem;
    }

    .period-title {
        font-size: 1.8rem;
    }

    .section-title {
        font-size: 2rem;
    }

    .milestone-card,
    .takeaway-card {
        padding: 1.5rem;
    }

    .stat-number {
        font-size: 2rem;
    }
}

/* Animation Classes */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Accessibility */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* Print styles */
@media print {
    .timeline-nav,
    .cta-btn {
        display: none;
    }
    
    .hero-section {
        height: auto;
        margin-top: 0;
    }
    
    body {
        background: white;
        color: black;
    }
    
    .history-period {
        display: block !important;
        page-break-after: always;
    }
}
