/* ==============================================
   HAT XAM WEBSITE - COMPLETE STYLESHEET
   ============================================== */

/* Font Typography System */
body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    font-weight: 400;
    line-height: 1.6;
}

h1, h2, h3, h4, h5, h6 {
    font-family: 'EB Garamond', 'Times New Roman', serif;
    font-weight: 600;
    line-height: 1.3;
}

.hero-title {
    font-family: 'EB Garamond', serif;
    font-weight: 700;
    line-height: 1.2;
}

/* ==============================================
   NAVBAR STYLES
   ============================================== */
.nav-link {
    font-family: 'Inter', sans-serif;
    font-weight: 500;
    position: relative;
    overflow: hidden;
}

.nav-link.active-page {
    box-shadow: 0 4px 15px rgba(255, 255, 255, 0.3);
}

.nav-link::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s;
}

.nav-link:hover::before {
    left: 100%;
}

/* ==============================================
   HOME PAGE - HERO SECTION
   ============================================== */
.hero-section {
    background: linear-gradient(135deg, #2d1b1b 0%, #1a0f0f 20%, #0d0707 100%);
    position: relative;
}

.hero-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle at 30% 50%, rgba(174, 90, 58, 0.15) 0%, transparent 50%),
        radial-gradient(circle at 70% 20%, rgba(110, 47, 26, 0.1) 0%, transparent 50%);
}

.hero-section .container {
    position: relative;
    z-index: 1;
}

/* ==============================================
   CARDS
   ============================================== */
.card-hover {
    transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.card-hover:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: 0 20px 40px rgba(110, 47, 26, 0.2);
    background: rgba(255, 255, 255, 1);
}

/* ==============================================
   BUTTONS
   ============================================== */
.btn-primary {
    background: linear-gradient(135deg, #6e2f1a 0%, #a65a3a 100%);
    transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    position: relative;
    overflow: hidden;
}

.btn-primary::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.6s;
}

.btn-primary:hover::before {
    left: 100%;
}

.btn-primary:hover {
    transform: translateY(-2px) scale(1.05);
    box-shadow: 0 8px 25px rgba(110, 47, 26, 0.4);
}

/* Feature Cards Background */
.feature-card-bg {
    background: linear-gradient(135deg, #ffffff 0%, #f8f5f0 100%);
    border: 1px solid rgba(110, 47, 26, 0.1);
}

/* ==============================================
   HERITAGE PAGE - EXPANDABLE CATEGORIES
   ============================================== */
.category-header {
    transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    cursor: pointer;
    background: linear-gradient(135deg, #ffffff 0%, #f8f5f0 100%);
    border: 1px solid rgba(110, 47, 26, 0.1);
}

.category-header:hover {
    background: linear-gradient(135deg, #f8f5f0 0%, #f0e8d8 100%);
    transform: translateX(2px);
    box-shadow: 0 4px 15px rgba(110, 47, 26, 0.15);
}

.category-header.active {
    background: linear-gradient(135deg, #6e2f1a 0%, #a65a3a 100%);
    color: white;
    box-shadow: 0 6px 20px rgba(110, 47, 26, 0.3);
}

.category-header.active .category-icon {
    transform: rotate(180deg);
}

.category-content {
    max-height: 0;
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.category-content.expanded {
    max-height: 1000px;
}

.category-item {
    transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    cursor: pointer;
    background: rgba(255, 255, 255, 0.8);
    border: 1px solid rgba(110, 47, 26, 0.08);
    overflow: hidden;
    word-wrap: break-word;
    word-break: break-word;
    hyphens: auto;
}

.category-item:hover {
    transform: translateX(4px) scale(1.02);
    background: rgba(255, 255, 255, 1);
    box-shadow: 0 6px 20px rgba(110, 47, 26, 0.15);
    border-color: rgba(110, 47, 26, 0.2);
}

.category-item.active {
    background: linear-gradient(135deg, #6e2f1a 0%, #a65a3a 100%);
    color: white;
    transform: translateX(6px) scale(1.03);
    box-shadow: 0 8px 25px rgba(110, 47, 26, 0.3);
}

.category-item.active * {
    color: white !important;
}

/* Responsive sidebar */
.sidebar-container {
    min-width: 0;
    overflow: hidden;
}

@media (max-width: 1023px) {
    .category-item {
        transform: none !important;
        scale: 1 !important;
    }
    .category-item:hover {
        transform: none !important;
        scale: 1 !important;
    }
    .category-item.active {
        transform: none !important;
        scale: 1 !important;
    }
}

.category-icon {
    transition: transform 0.3s ease;
}

/* Detail panel animations */
.detail-panel {
    transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.detail-panel.loading {
    opacity: 0.7;
    transform: translateY(10px);
}

/* ==============================================
   AI PAGE - UPLOAD AREA
   ============================================== */
.upload-area {
    border: 2px dashed #a65a3a;
    transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
}

.upload-area:hover {
    border-color: #6e2f1a;
    background: rgba(255, 255, 255, 1);
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(110, 47, 26, 0.1);
}

/* AI Button */
.btn-ai {
    background: linear-gradient(135deg, #6e2f1a 0%, #a65a3a 100%);
    transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    position: relative;
    overflow: hidden;
}

.btn-ai::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    transition: left 0.6s;
}

.btn-ai:hover::before {
    left: 100%;
}

.btn-ai:hover {
    transform: translateY(-3px) scale(1.05);
    box-shadow: 0 10px 30px rgba(110, 47, 26, 0.4);
}

/* Result Cards */
.result-card {
    animation: fadeInUp 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

/* ==============================================
   ANIMATIONS
   ============================================== */
.animate-fade-in {
    animation: fadeInUp 1s ease-out;
}

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

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes fadeInScale {
    from {
        opacity: 0;
        transform: scale(0.95);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.animate-slide-in {
    animation: slideInRight 0.5s ease-out;
}

.animate-fade-scale {
    animation: fadeInScale 0.4s ease-out;
}

@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: .5;
    }
}

.animate-pulse {
    animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

/* ==============================================
   ADVANCED ANIMATIONS FOR HOME PAGE
   ============================================== */

/* Float Animation */
@keyframes float {
    0%, 100% {
        transform: translateY(0px);
    }
    50% {
        transform: translateY(-20px);
    }
}

.animate-float {
    animation: float 6s ease-in-out infinite;
}

/* Gradient Animation */
@keyframes gradientShift {
    0% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
    100% {
        background-position: 0% 50%;
    }
}

.animate-gradient {
    background-size: 200% 200%;
    animation: gradientShift 8s ease infinite;
}

/* Slide Up Stagger */
@keyframes slideUpStagger {
    from {
        opacity: 0;
        transform: translateY(50px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.animate-slide-up {
    animation: slideUpStagger 0.8s ease-out forwards;
}

.delay-100 { animation-delay: 0.1s; }
.delay-200 { animation-delay: 0.2s; }
.delay-300 { animation-delay: 0.3s; }
.delay-400 { animation-delay: 0.4s; }
.delay-500 { animation-delay: 0.5s; }
.delay-600 { animation-delay: 0.6s; }
.delay-700 { animation-delay: 0.7s; }
.delay-800 { animation-delay: 0.8s; }

/* Rotate In */
@keyframes rotateIn {
    from {
        opacity: 0;
        transform: rotate(-200deg) scale(0.5);
    }
    to {
        opacity: 1;
        transform: rotate(0) scale(1);
    }
}

.animate-rotate-in {
    animation: rotateIn 1s ease-out;
}

/* Bounce In */
@keyframes bounceIn {
    0% {
        opacity: 0;
        transform: scale(0.3);
    }
    50% {
        opacity: 1;
        transform: scale(1.05);
    }
    70% {
        transform: scale(0.9);
    }
    100% {
        transform: scale(1);
    }
}

.animate-bounce-in {
    animation: bounceIn 0.8s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

/* Shimmer Effect */
@keyframes shimmer {
    0% {
        background-position: -1000px 0;
    }
    100% {
        background-position: 1000px 0;
    }
}

.shimmer-effect {
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    background-size: 1000px 100%;
    animation: shimmer 3s infinite;
}

/* Glow Pulse */
@keyframes glowPulse {
    0%, 100% {
        box-shadow: 0 0 20px rgba(110, 47, 26, 0.3);
    }
    50% {
        box-shadow: 0 0 40px rgba(110, 47, 26, 0.6);
    }
}

.animate-glow {
    animation: glowPulse 2s ease-in-out infinite;
}

/* Scale Pulse */
@keyframes scalePulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
}

.animate-scale-pulse {
    animation: scalePulse 3s ease-in-out infinite;
}

/* Swing Animation */
@keyframes swing {
    0%, 100% {
        transform: rotate(0deg);
    }
    25% {
        transform: rotate(5deg);
    }
    75% {
        transform: rotate(-5deg);
    }
}

.animate-swing {
    animation: swing 2s ease-in-out infinite;
    transform-origin: top center;
}

/* Fade In Left */
@keyframes fadeInLeft {
    from {
        opacity: 0;
        transform: translateX(-50px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.animate-fade-in-left {
    animation: fadeInLeft 1s ease-out;
}

/* Fade In Right */
@keyframes fadeInRight {
    from {
        opacity: 0;
        transform: translateX(50px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.animate-fade-in-right {
    animation: fadeInRight 1s ease-out;
}

/* Zoom In Out */
@keyframes zoomInOut {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.1);
    }
}

.animate-zoom {
    animation: zoomInOut 4s ease-in-out infinite;
}

/* ==============================================
   ENHANCED CARD EFFECTS
   ============================================== */

.card-3d-hover {
    transition: all 0.5s cubic-bezier(0.23, 1, 0.32, 1);
    transform-style: preserve-3d;
}

.card-3d-hover:hover {
    transform: translateY(-10px) rotateX(5deg) rotateY(5deg);
    box-shadow: 0 25px 50px rgba(110, 47, 26, 0.3);
}

.gradient-border {
    position: relative;
    background: linear-gradient(white, white) padding-box,
                linear-gradient(135deg, #6e2f1a, #a65a3a, #d4845a) border-box;
    border: 2px solid transparent;
}

.gradient-border-animated {
    position: relative;
    background: linear-gradient(white, white) padding-box,
                linear-gradient(135deg, #6e2f1a, #a65a3a, #d4845a, #6e2f1a) border-box;
    border: 2px solid transparent;
    background-size: 300% 300%;
    animation: gradientShift 4s ease infinite;
}

/* Glass Morphism Effect */
.glass-effect {
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(10px) saturate(180%);
    border: 1px solid rgba(255, 255, 255, 0.3);
    box-shadow: 0 8px 32px rgba(110, 47, 26, 0.1);
}

.glass-effect:hover {
    background: rgba(255, 255, 255, 0.85);
    border-color: rgba(255, 255, 255, 0.5);
    box-shadow: 0 12px 40px rgba(110, 47, 26, 0.2);
}

/* Particle Background Effect */
@keyframes particleFloat {
    0%, 100% {
        transform: translate(0, 0);
        opacity: 0.3;
    }
    25% {
        transform: translate(10px, -10px);
        opacity: 0.6;
    }
    50% {
        transform: translate(-5px, -20px);
        opacity: 0.4;
    }
    75% {
        transform: translate(-10px, -10px);
        opacity: 0.5;
    }
}

.particle {
    animation: particleFloat 8s ease-in-out infinite;
}

/* Text Gradient Animation */
.text-gradient-animate {
    background: linear-gradient(90deg, #6e2f1a, #a65a3a, #d4845a, #6e2f1a);
    background-size: 300% 100%;
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: gradientShift 4s linear infinite;
}

/* Icon Bounce on Hover */
.icon-bounce:hover {
    animation: iconBounce 0.5s ease;
}

@keyframes iconBounce {
    0%, 100% {
        transform: translateY(0);
    }
    25% {
        transform: translateY(-10px);
    }
    75% {
        transform: translateY(-5px);
    }
}

/* Progress Bar Animation */
@keyframes progressBar {
    from {
        width: 0%;
    }
    to {
        width: 100%;
    }
}

.animate-progress {
    animation: progressBar 2s ease-out forwards;
}

/* Ripple Effect */
@keyframes ripple {
    0% {
        transform: scale(0);
        opacity: 1;
    }
    100% {
        transform: scale(4);
        opacity: 0;
    }
}

.ripple-effect::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 100px;
    height: 100px;
    background: rgba(110, 47, 26, 0.3);
    border-radius: 50%;
    transform: translate(-50%, -50%) scale(0);
}

.ripple-effect:hover::after {
    animation: ripple 1s ease-out;
}

/* ==============================================
   REDESIGNED HOMEPAGE SECTIONS - 2024
   ============================================== */

/* Enhanced Timeline Visual */
.timeline-line {
    position: relative;
    background: linear-gradient(180deg, #fbbf24, #f97316, #ef4444);
}

.timeline-line::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, transparent, rgba(255,255,255,0.2), transparent);
    animation: shimmer 3s infinite;
}

/* Modern Card Hover Effects */
.modern-card {
    position: relative;
    background: white;
    border-radius: 1.5rem;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.modern-card::before {
    content: '';
    position: absolute;
    inset: -2px;
    border-radius: 1.5rem;
    padding: 2px;
    background: linear-gradient(135deg, #6e2f1a, #a65a3a, transparent);
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    opacity: 0;
    transition: opacity 0.4s;
}

.modern-card:hover::before {
    opacity: 1;
}

.modern-card:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: 0 20px 60px rgba(110, 47, 26, 0.25);
}

/* Gradient Text Animation */
.gradient-text-flow {
    background: linear-gradient(90deg, #6e2f1a, #a65a3a, #d4845a, #fbbf24, #6e2f1a);
    background-size: 200% auto;
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: textFlow 5s linear infinite;
}

@keyframes textFlow {
    to {
        background-position: 200% center;
    }
}

/* Floating Badge Effect */
@keyframes floatBadge {
    0%, 100% {
        transform: translateY(0) rotate(0deg);
    }
    25% {
        transform: translateY(-10px) rotate(2deg);
    }
    75% {
        transform: translateY(-5px) rotate(-2deg);
    }
}

.float-badge {
    animation: floatBadge 4s ease-in-out infinite;
}

/* Enhanced Shadow Glow */
.shadow-glow {
    box-shadow: 0 0 20px rgba(110, 47, 26, 0.15),
                0 0 40px rgba(110, 47, 26, 0.1),
                0 0 60px rgba(110, 47, 26, 0.05);
}

.shadow-glow:hover {
    box-shadow: 0 0 30px rgba(110, 47, 26, 0.25),
                0 0 60px rgba(110, 47, 26, 0.15),
                0 0 90px rgba(110, 47, 26, 0.1);
}

/* Stagger Fade In */
@keyframes staggerFadeIn {
    from {
        opacity: 0;
        transform: translateY(30px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.stagger-item {
    animation: staggerFadeIn 0.6s ease-out forwards;
}

.stagger-item:nth-child(1) { animation-delay: 0.1s; }
.stagger-item:nth-child(2) { animation-delay: 0.2s; }
.stagger-item:nth-child(3) { animation-delay: 0.3s; }
.stagger-item:nth-child(4) { animation-delay: 0.4s; }
.stagger-item:nth-child(5) { animation-delay: 0.5s; }
.stagger-item:nth-child(6) { animation-delay: 0.6s; }

/* Modern Timeline Marker */
.timeline-marker {
    position: relative;
    z-index: 10;
}

.timeline-marker::before {
    content: '';
    position: absolute;
    inset: -8px;
    border-radius: 50%;
    background: inherit;
    opacity: 0.3;
    animation: pulse 2s ease-in-out infinite;
}

/* Reveal on Scroll */
.reveal {
    opacity: 0;
    transform: translateY(50px);
    transition: all 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.reveal.active {
    opacity: 1;
    transform: translateY(0);
}

/* Enhanced Button Styles */
.btn-modern {
    position: relative;
    overflow: hidden;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.btn-modern::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.btn-modern:hover::before {
    width: 300px;
    height: 300px;
}

.btn-modern:active {
    transform: scale(0.95);
}

/* Magnetic Cards */
@media (hover: hover) {
    .magnetic-card {
        transition: transform 0.2s ease-out;
    }
    
    .magnetic-card:hover {
        transform: perspective(1000px) rotateX(5deg) rotateY(5deg);
    }
}

/* Icon Pulse Animation */
@keyframes iconPulse {
    0%, 100% {
        transform: scale(1);
        opacity: 1;
    }
    50% {
        transform: scale(1.1);
        opacity: 0.8;
    }
}

.icon-pulse {
    animation: iconPulse 2s ease-in-out infinite;
}

/* Content Fade Slide */
@keyframes contentFadeSlide {
    from {
        opacity: 0;
        transform: translateX(-30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.fade-slide {
    animation: contentFadeSlide 0.8s ease-out;
}

/* Decorative Border Animation */
@keyframes borderFlow {
    0% {
        border-image-source: linear-gradient(90deg, #6e2f1a, #a65a3a, #d4845a);
    }
    50% {
        border-image-source: linear-gradient(90deg, #d4845a, #6e2f1a, #a65a3a);
    }
    100% {
        border-image-source: linear-gradient(90deg, #6e2f1a, #a65a3a, #d4845a);
    }
}

.border-flow {
    border-image-slice: 1;
    animation: borderFlow 3s linear infinite;
}


