/* Ashkara Civilization Styling */

/* Text brightness breathing animation */
@keyframes textBrightnessBreath {
    0% {
        filter: brightness(0.9);
    }
    50% {
        filter: brightness(1.4);
    }
    100% {
        filter: brightness(0.9);
    }
}

.ashkara-body {
    background: linear-gradient(135deg, #1f0f0f 0%, #0a0505 50%, #1f0f0f 100%);
    background-attachment: fixed;
}

.ashkara-body::before {
    animation: breathing 6s ease-in-out infinite;
}

/* Ashkara Theme Colors */
.ashkara-body .navbar {
    background: rgba(25, 10, 10, 0.95);
    border-bottom-color: #d4af37;
}

.ashkara-body footer {
    background: rgba(25, 10, 10, 0.98);
    border-top-color: #d4af37;
}

.ashkara-body footer a {
    color: #d4af37;
}

.ashkara-body footer a:hover {
    color: #f5c547;
}

/* Ember Particle System */
@keyframes float-up {
    0% {
        transform: translateY(0) translateX(0) rotate(0deg) scale(1);
        opacity: 0;
    }
    2% {
        opacity: 1;
        transform: translateY(-2vh) translateX(2px) rotate(15deg) scale(0.9);
    }
    5% {
        transform: translateY(-5vh) translateX(-3px) rotate(35deg) scale(0.95);
        opacity: 1;
    }
    10% {
        transform: translateY(-10vh) translateX(3px) rotate(55deg) scale(1);
        opacity: 1;
    }
    20% {
        transform: translateY(-20vh) translateX(-2px) rotate(110deg) scale(0.92);
        opacity: 1;
    }
    30% {
        transform: translateY(-30vh) translateX(2px) rotate(140deg) scale(0.98);
        opacity: 1;
    }
    40% {
        transform: translateY(-40vh) translateX(-1px) rotate(170deg) scale(1.05);
        opacity: 1;
    }
    50% {
        transform: translateY(-50vh) translateX(3px) rotate(200deg) scale(0.9);
        opacity: 1;
    }
    60% {
        transform: translateY(-60vh) translateX(-3px) rotate(270deg) scale(0.95);
        opacity: 0.7;
    }
    70% {
        transform: translateY(-70vh) translateX(-2px) rotate(340deg) scale(1.03);
        opacity: 0.4;
    }
    85% {
        transform: translateY(-85vh) translateX(-1px) rotate(410deg) scale(0.98);
        opacity: 0;
    }
    80% {
        transform: translateY(-80vh) translateX(-1px) rotate(550deg) scale(0.99);
        opacity: 0.1;
    }
    100% {
        transform: translateY(-100vh) translateX(0px) rotate(660deg) scale(0);
        opacity: 0;
    }
}

@keyframes flicker {
    0%, 100% { box-shadow: 0 0 8px #ff6b1a, 0 0 16px rgba(255, 107, 26, 0.5); }
    25% { box-shadow: 0 0 12px #ff8c1a, 0 0 20px rgba(255, 140, 26, 0.6); }
    50% { box-shadow: 0 0 4px #ff4b1a, 0 0 8px rgba(255, 75, 26, 0.3); }
    75% { box-shadow: 0 0 10px #ff6b1a, 0 0 18px rgba(255, 107, 26, 0.55); }
}

#ember-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    pointer-events: none;
    z-index: 1;
    overflow: hidden;
    margin: 0;
    padding: 0;
}

.ember {
    position: absolute;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: radial-gradient(circle at 30% 30%, #ff6b1a, #d84a1a);
    box-shadow: 0 0 8px #ff6b1a, 0 0 16px rgba(255, 107, 26, 0.5);
    pointer-events: none;
    z-index: 0;
    will-change: transform;
    filter: blur(0.5px);
    clip-path: polygon(50% 0%, 61% 35%, 98% 35%, 68% 57%, 79% 91%, 50% 70%, 21% 91%, 32% 57%, 2% 35%, 39% 35%);
    animation: flicker 0.3s ease-in-out infinite;
}

/* Ashkara Header */
.ashkara-header {
    position: relative;
    overflow: hidden;
}

.ashkara-header .container {
    max-width: 55%;
    margin-left: 0;
    text-align: left;
}

.ashkara-header h1 {
    color: #d84a4a;
    text-shadow: 2px 2px 8px rgba(0, 0, 0, 0.8), 0 0 10px rgba(216, 74, 74, 0.6), 0 0 20px rgba(216, 74, 74, 0.4), 0 0 30px rgba(216, 74, 74, 0.2);
}

.ashkara-header p {
    color: #ff6b6b;
}

/* Intro Section */
.ashkara-intro {
    background: #190a0a;
    background-image:
        url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="100" height="100"><filter id="noise"><feTurbulence baseFrequency="0.9" numOctaves="4" result="noise" seed="2" /></filter><rect width="100" height="100" fill="%23190a0a" filter="url(%23noise)" opacity="0.08"/></svg>');
    border-bottom: 2px solid rgba(139, 46, 46, 0.3);
}

.ashkara-intro .container {
    max-width: 55%;
    margin-left: 0;
    text-align: left;
}

.ashkara-intro h2 {
    color: #d84a4a;
}

.ashkara-intro p {
    color: #f5d0d0;
}

/* Staggered Image Layout */
.staggered-image-left,
.staggered-image-right {
    width: 100%;
    padding: 3rem 2rem;
    display: flex;
    align-items: center;
    gap: 2rem;
    background: transparent;
}

.staggered-image-left {
    justify-content: flex-start;
}

.staggered-image-left img {
    width: 45%;
    height: auto;
    border-radius: 8px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    flex-shrink: 0;
    transition: transform 0.3s ease;
}

.staggered-image-left img:hover {
    transform: perspective(1000px) rotateX(5deg) rotateY(5deg);
}

.staggered-image-right {
    justify-content: flex-end;
}

.staggered-image-right img {
    width: 45%;
    height: auto;
    border-radius: 8px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    flex-shrink: 0;
    transition: transform 0.3s ease;
}

.staggered-image-right img:hover {
    transform: perspective(1000px) rotateX(5deg) rotateY(5deg);
}

.image-text {
    flex: 1;
    padding: 1rem;
    text-align: center;
}

.image-text h3 {
    color: #d84a4a;
    font-size: 2.2rem;
    margin-bottom: 1rem;
    text-shadow: 0 0 10px rgba(216, 74, 74, 0.5), 0 0 20px rgba(216, 74, 74, 0.3);
    animation: textBrightnessBreath 6s ease-in-out infinite;
}

.image-text p {
    color: #d0d0d0;
    font-size: 1.1rem;
    line-height: 1.6;
}

/* Features Section */
.ashkara-features {
    background: #190a0a;
    background-image:
        url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="100" height="100"><filter id="noise"><feTurbulence baseFrequency="0.9" numOctaves="4" result="noise" seed="2" /></filter><rect width="100" height="100" fill="%23190a0a" filter="url(%23noise)" opacity="0.08"/></svg>');
    border-top: 2px solid rgba(139, 46, 46, 0.3);
    border-bottom: 2px solid rgba(139, 46, 46, 0.3);
}

.ashkara-features h2 {
    color: #d84a4a;
}

.ashkara-features .feature-box {
    background: linear-gradient(135deg, rgba(139, 46, 46, 0.15) 0%, rgba(58, 24, 24, 0.8) 100%);
    border-left: 4px solid #d84a4a;
    border-radius: 4px;
    padding: 2rem;
    transition: all 0.3s ease;
}

.ashkara-features .feature-box:hover {
    background: linear-gradient(135deg, rgba(139, 46, 46, 0.25) 0%, rgba(58, 24, 24, 0.9) 100%);
    box-shadow: 0 8px 20px rgba(139, 46, 46, 0.2);
    transform: translateY(-3px);
}

.ashkara-features .feature-box h3 {
    color: #ff6b6b;
}

.ashkara-features .feature-box p {
    color: #f5d0d0;
}

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

/* Magic Section */
.ashkara-magic {
    background: #190a0a;
    padding: 4rem 2rem;
    position: relative;
    z-index: 1;
}

.ashkara-magic h2 {
    color: #d84a4a;
    text-align: center;
    margin-bottom: 1rem;
}

.ashkara-magic > .container > p {
    text-align: center;
    color: #f5d0d0;
    margin-bottom: 2rem;
}

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

.magic-spell {
    background: rgba(139, 46, 46, 0.1);
    border: 2px solid rgba(139, 46, 46, 0.3);
    border-radius: 8px;
    padding: 1.5rem;
    text-align: center;
    transition: all 0.3s ease;
}

.magic-spell:hover {
    background: rgba(139, 46, 46, 0.2);
    border-color: #d84a4a;
    box-shadow: 0 4px 15px rgba(139, 46, 46, 0.2);
}

.magic-spell h3 {
    color: #ff6b6b;
    margin-bottom: 0.5rem;
}

.magic-spell p {
    color: #f5d0d0;
    font-size: 0.95rem;
}

/* Territory Section */
.ashkara-territory {
    background: #190a0a;
    background-image:
        url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="100" height="100"><filter id="noise"><feTurbulence baseFrequency="0.9" numOctaves="4" result="noise" seed="2" /></filter><rect width="100" height="100" fill="%23190a0a" filter="url(%23noise)" opacity="0.08"/></svg>');
    border-top: 2px solid rgba(139, 46, 46, 0.3);
    border-bottom: 2px solid rgba(139, 46, 46, 0.3);
    padding: 4rem 2rem;
    position: relative;
    z-index: 1;
}

.ashkara-territory h2 {
    color: #d84a4a;
    text-align: center;
    margin-bottom: 1rem;
}

.ashkara-territory > .container > p {
    text-align: center;
    color: #f5d0d0;
    max-width: 800px;
    margin: 0 auto 2rem;
}

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

.territory-item {
    background: rgba(139, 46, 46, 0.08);
    border: 1px solid rgba(139, 46, 46, 0.3);
    border-radius: 8px;
    padding: 1.5rem;
    transition: all 0.3s ease;
}

.territory-item:hover {
    background: rgba(139, 46, 46, 0.15);
    border-color: #d84a4a;
}

.territory-item h3 {
    color: #ff6b6b;
    margin-bottom: 0.5rem;
}

.territory-item p {
    color: #f5d0d0;
    font-size: 0.95rem;
}

/* Roles Section */
.ashkara-roles {
    padding: 4rem 2rem;
    position: relative;
    z-index: 1;
    background: linear-gradient(90deg, rgba(0, 0, 0, 0.2) 0%, rgba(0, 0, 0, 0.6) 100%);
}

.ashkara-roles h2 {
    color: #d84a4a;
    text-align: center;
    margin-bottom: 1rem;
    text-shadow: 0 0 10px rgba(216, 74, 74, 0.5), 0 0 20px rgba(216, 74, 74, 0.3);
    animation: textBrightnessBreath 6s ease-in-out infinite;
}

.ashkara-roles > .container > p {
    text-align: center;
    color: #f5d0d0;
    max-width: 700px;
    margin: 0 auto 2rem;
}

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

.role {
    background: rgba(139, 46, 46, 0.1);
    border: 2px solid rgba(139, 46, 46, 0.3);
    border-radius: 8px;
    padding: 1.5rem;
    text-align: center;
    transition: all 0.3s ease;
}

.role:hover {
    background: rgba(139, 46, 46, 0.2);
    border-color: #d84a4a;
    box-shadow: 0 6px 20px rgba(139, 46, 46, 0.2);
}

.role h3 {
    color: #ff6b6b;
    margin-bottom: 0.5rem;
    white-space: nowrap;
    display: inline;
}

.role p {
    color: #f5d0d0;
    font-size: 0.95rem;
}

.cta-section {
    text-align: center;
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 2px solid rgba(139, 46, 46, 0.3);
}

.cta-section .cta-button {
    background: linear-gradient(135deg, #d84a4a 0%, #8b2e2e 100%);
    border-color: #d84a4a;
    color: #fff;
}

.cta-section .cta-button:hover {
    background: linear-gradient(135deg, #ff6b6b 0%, #d84a4a 100%);
    box-shadow: 0 6px 20px rgba(139, 46, 46, 0.4);
}

@media (max-width: 768px) {
    .ashkara-header h1 {
        font-size: 2.5rem;
    }

    .features-grid {
        grid-template-columns: 1fr;
    }

    .magic-types {
        grid-template-columns: 1fr;
    }

    .territory-list {
        grid-template-columns: 1fr;
    }

    .roles-grid {
        grid-template-columns: 1fr;
    }
}

/* Flip Card Animation */
@keyframes flipCard {
    from {
        transform: rotateY(0deg);
    }
    to {
        transform: rotateY(180deg);
    }
}

.flip-card {
    perspective: 1000px;
    margin: 1rem auto 0;
    cursor: pointer;
    display: inline-block;
}

.flip-card-inner {
    position: relative;
    transition: transform 0.6s;
    transform-style: preserve-3d;
}

.flip-card.flipped .flip-card-inner {
    transform: rotateX(180deg);
}

.flip-card-front, .flip-card-back {
    backface-visibility: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

.flip-card-front {
    color: #fff;
    padding: 1rem 5rem;
    background: linear-gradient(135deg, #d84a4a 0%, #8b2e2e 100%);
    border: 2px solid #d84a4a;
    border-radius: 4px;
    box-shadow: 0 4px 15px rgba(216, 74, 74, 0.3);
    font-weight: bold;
    font-family: 'Georgia', serif;
    font-size: 0.9rem;
    line-height: 1;
    text-transform: uppercase;
    letter-spacing: 1px;
    z-index: 2;
}

.flip-card-back {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.15) 0%, transparent 30%),
                linear-gradient(225deg, rgba(255, 255, 255, 0.1) 0%, transparent 40%),
                linear-gradient(135deg, #190a0a 0%, #0f0505 20%, #050202 50%, #0f0505 80%, #190a0a 100%);
    color: #d84a4a;
    transform: rotateX(180deg);
    padding: 1rem 5rem;
    border: 2px solid rgba(216, 74, 74, 0.5);
    border-radius: 4px;
    font-weight: bold;
    font-family: 'Georgia', serif;
    font-size: 0.9rem;
    line-height: 1;
    text-transform: uppercase;
    letter-spacing: 1px;

    .roles-grid {
        grid-template-columns: 1fr;
    }
}
