/* Eryndor Kingdom CSS Styles */

/* Custom CSS Variables */
:root {
    --custom-purple: #4f3a8f;
    --custom-dark-purple: #1a143b;
    --custom-light-purple: #3e2f75;
    --custom-gold: #f6c85f;
    --custom-gold-hover: #f4d07a;
}

/* Animations */
@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes scroll {
    0% {
        transform: translateX(0);
    }
    100% {
        transform: translateX(-100%);
    }
}

@keyframes float {
    0% {
        transform: translateY(0px);
    }
    50% {
        transform: translateY(-12px);
    }
    100% {
        transform: translateY(0px);
    }
}

@keyframes subtle-pulse {
    0% { 
        box-shadow: 0 0 10px 0 rgba(246, 200, 95, 0.4); 
    }
    50% { 
        box-shadow: 0 0 20px 5px rgba(246, 200, 95, 0.7); 
    }
    100% { 
        box-shadow: 0 0 10px 0 rgba(246, 200, 95, 0.4); 
    }
}

@keyframes countUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Base Styles */
* {
    scroll-behavior: smooth;
}

body {
    font-family: 'Roboto', sans-serif;
    overflow-x: hidden;
    line-height: 1.6;
}

h1, h2, h3, h4, h5, h6, .medieval-font {
    font-family: 'MedievalSharp', cursive;
}

/* Custom Color Classes */
.bg-custom-purple {
    background-color: var(--custom-purple);
}

.text-custom-gold {
    color: var(--custom-gold);
}

.border-custom-gold {
    border-color: var(--custom-gold);
}

.bg-custom-dark-purple {
    background-color: var(--custom-dark-purple);
}

.bg-custom-light-purple {
    background-color: var(--custom-light-purple);
}

/* Animation Classes */
.animate-fade-in-down {
    animation: fadeInDown 1s ease-out forwards;
}

.animate-fade-in-up {
    animation: fadeInUp 1s ease-out forwards;
}

.animate-scroll {
    display: inline-block;
    animation: scroll 40s linear infinite;
}

.animate-float {
    animation: float 4s ease-in-out infinite;
}

.animate-subtle-pulse {
    animation: subtle-pulse 3s infinite ease-in-out;
}

/* Section Reveal Animation */
.section-reveal {
    opacity: 0;
    transform: translateY(50px);
    transition: opacity 1s ease-out, transform 1s ease-out;
}

.section-reveal.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Navigation Styles */
.nav-link {
    color: white;
    font-weight: 500;
    letter-spacing: 0.05em;
    transition: color 0.3s ease;
}

.nav-link:hover {
    color: var(--custom-gold);
}

.btn-primary {
    background-color: var(--custom-gold);
    color: var(--custom-dark-purple);
    font-weight: bold;
    padding: 0.5rem 1.5rem;
    border-radius: 0.375rem;
    transition: all 0.3s ease;
    transform: scale(1);
    box-shadow: 0 4px 15px rgba(246, 200, 95, 0.3);
    border: none;
    cursor: pointer;
    text-decoration: none;
    display: inline-block;
}

.btn-primary:hover {
    background-color: var(--custom-gold-hover);
    box-shadow: 0 8px 25px rgba(246, 200, 95, 0.5);
    transform: scale(1.1);
}

.btn-secondary {
    border: 2px solid var(--custom-gold);
    color: var(--custom-gold);
    background: transparent;
    font-weight: bold;
    padding: 0.5rem 1.5rem;
    border-radius: 0.375rem;
    transition: all 0.3s ease;
    transform: scale(1);
    cursor: pointer;
    text-decoration: none;
    display: inline-block;
}

.btn-secondary:hover {
    background-color: var(--custom-gold);
    color: var(--custom-dark-purple);
    transform: scale(1.1);
}

/* Parchment Style */
.parchment {
    background-image: url('https://www.transparenttextures.com/patterns/old-paper.png');
    background-color: #f5e8c7;
    color: #4a2c2a;
    border-style: solid;
    border-width: 10px;
    border-image: url('data:image/svg+xml;charset=utf-8,%3Csvg width="100" height="100" viewBox="0 0 100 100" fill="none" xmlns="http://www.w3.org/2000/svg"%3E%3Cstyle%3Epath%7Bstroke:%238d6e63%7D%3C/style%3E%3Cpath d="M0 50V0h50zM50 0h50v50zM100 50v50H50zM50 100H0V50z" stroke-width="2"/%3E%3C/svg%3E') 30 round;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
    transition: transform 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94), box-shadow 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.parchment:hover {
    box-shadow: 0 20px 40px rgba(0,0,0,0.5);
}

/* Stats Section */
.stat-card {
    padding: 1.5rem;
    border-radius: 0.5rem;
    transition: transform 0.3s ease;
    background: linear-gradient(135deg, rgba(79, 58, 143, 0.3), rgba(62, 47, 117, 0.6));
    border: 1px solid rgba(246, 200, 95, 0.2);
}

.stat-card:hover {
    transform: scale(1.05);
}

.counter {
    animation: countUp 2s ease-out forwards;
}

/* Event Cards */
.event-card {
    background-color: var(--custom-light-purple);
    padding: 1.5rem;
    border-radius: 0.5rem;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.5rem;
    border-left: 8px solid var(--custom-gold);
    opacity: 0.9;
    transition: all 0.4s ease;
    transform: translateX(0);
}

.event-card:hover {
    opacity: 1;
    transform: translateX(0.5rem);
    box-shadow: 0 8px 30px rgba(246, 200, 95, 0.2);
}

@media (min-width: 768px) {
    .event-card {
        flex-direction: row;
    }
}

.event-date {
    text-align: center;
    border-right: 2px solid var(--custom-gold);
    padding-right: 1.5rem;
}

@media (min-width: 768px) {
    .event-date {
        text-align: left;
    }
}

/* Join Section */
.join-info {
    padding: 1.5rem;
    border-radius: 0.5rem;
    border: 1px solid rgba(246, 200, 95, 0.3);
    transition: all 0.3s ease;
    background: linear-gradient(135deg, rgba(79, 58, 143, 0.2), rgba(26, 20, 59, 0.8));
}

.join-info:hover {
    border-color: rgba(246, 200, 95, 0.6);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
}

/* Responsive Design */
@media (max-width: 768px) {
    .text-6xl {
        font-size: 3rem;
    }
    
    .text-8xl {
        font-size: 4rem;
    }
    
    .parchment {
        margin-bottom: 1rem;
        transform: none !important;
    }
    
    .parchment:hover {
        transform: none !important;
    }
}

/* Scroll Improvements */
html {
    scroll-padding-top: 80px;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: var(--custom-dark-purple);
}

::-webkit-scrollbar-thumb {
    background: var(--custom-gold);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--custom-gold-hover);
}

/* Loading Animation */
.loading {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.loading.loaded {
    opacity: 1;
    transform: translateY(0);
}

/* Hover Effects */
.hover-glow:hover {
    text-shadow: 0 0 20px rgba(246, 200, 95, 0.8);
}

/* Form Styles (voor toekomstige contact forms) */
.form-input {
    background-color: var(--custom-light-purple);
    border: 1px solid rgba(246, 200, 95, 0.3);
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 0.375rem;
    transition: all 0.3s ease;
}

.form-input::placeholder {
    color: #9ca3af;
}

.form-input:focus {
    border-color: var(--custom-gold);
    outline: none;
    box-shadow: 0 0 0 2px rgba(246, 200, 95, 0.2);
}

.form-textarea {
    background-color: var(--custom-light-purple);
    border: 1px solid rgba(246, 200, 95, 0.3);
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 0.375rem;
    transition: all 0.3s ease;
    resize: none;
}

.form-textarea::placeholder {
    color: #9ca3af;
}

.form-textarea:focus {
    border-color: var(--custom-gold);
    outline: none;
    box-shadow: 0 0 0 2px rgba(246, 200, 95, 0.2);
}

/* Special Effects */
.text-glow {
    text-shadow: 0 0 10px rgba(246, 200, 95, 0.5);
}

.border-glow {
    box-shadow: 0 0 15px rgba(246, 200, 95, 0.3);
}

.border-glow:hover {
    box-shadow: 0 0 25px rgba(246, 200, 95, 0.6);
}

/* Kingdoms Page Styles */
.kingdom-card {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.kingdom-card:hover {
    transform: translateY(-10px) scale(1.02);
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.5);
}

.kingdom-banner {
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
}

.kingdom-banner::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;
    z-index: 5;
}

.kingdom-card:hover .kingdom-banner::before {
    left: 100%;
}

.kingdom-card:hover .kingdom-banner {
    filter: brightness(1.1) contrast(1.1);
}

.text-shadow {
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.8);
}

/* Fallback colors for missing images */
.kingdom-banner[style*="valoria-banner"] {
    background: linear-gradient(135deg, #2563eb, #1e40af) !important;
}

.kingdom-banner[style*="drakenhof-banner"] {
    background: linear-gradient(135deg, #dc2626, #991b1b) !important;
}

.kingdom-banner[style*="silvermoon-banner"] {
    background: linear-gradient(135deg, #059669, #047857) !important;
}

.kingdom-banner[style*="ironhold-banner"] {
    background: linear-gradient(135deg, #ea580c, #c2410c) !important;
}

.kingdom-banner[style*="shadow-banner"] {
    background: linear-gradient(135deg, #7c3aed, #5b21b6) !important;
}

.kingdom-banner[style*="traders-banner"] {
    background: linear-gradient(135deg, #ca8a04, #a16207) !important;
}

#kingdom-modal .bg-custom-dark-purple {
    transform: scale(0.9);
    opacity: 0;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes modalSlideIn {
    from {
        transform: scale(0.9) translateY(-20px);
        opacity: 0;
    }
    to {
        transform: scale(1) translateY(0);
        opacity: 1;
    }
}

/* Active Navigation Link */
.nav-link.active {
    color: var(--custom-gold) !important;
    font-weight: 600;
    position: relative;
}

.nav-link.active:after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 100%;
    height: 2px;
    background-color: var(--custom-gold);
    border-radius: 1px;
}

/* Event Modal Styles */
#event-modal {
    backdrop-filter: blur(8px);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

#event-modal > div {
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
    border: 1px solid rgba(246, 200, 95, 0.2);
}

#event-modal h4 {
    border-bottom: 1px solid rgba(246, 200, 95, 0.3);
    padding-bottom: 0.5rem;
    margin-bottom: 1rem;
}

/* Event Cards Enhanced */
.event-card {
    position: relative;
    overflow: hidden;
}

.event-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(246, 200, 95, 0.1), transparent);
    transition: left 0.5s;
}

.event-card:hover::before {
    left: 100%;
}

/* Event Tags */
.event-card span {
    font-family: 'Roboto', sans-serif;
    font-size: 0.75rem;
    letter-spacing: 0.025em;
    text-transform: uppercase;
}

/* Responsive Modal */
@media (max-width: 768px) {
    #event-modal > div {
        margin: 1rem;
        max-height: calc(100vh - 2rem);
    }
    
    .event-card {
        text-align: center;
    }
    
    .event-date {
        border-right: none;
        border-bottom: 2px solid var(--custom-gold);
        padding-right: 0;
        padding-bottom: 1rem;
        margin-bottom: 1rem;
    }
}
