/* ============================================= */
/* ESTILOS RAVENCLAW V2 - EDICIÓN ESTELAR        */
/* ============================================= */

.ravenclaw-section-v2 {
    position: relative;
    padding: 4rem 2rem;
    margin: 3rem 0;
    overflow: hidden;
    isolation: isolate;
    background: linear-gradient(145deg, rgba(16, 29, 46, 0.95), rgba(26, 43, 62, 0.93));
    border-radius: 25px;
    border: 3px solid #8a6d3b;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.7), inset 0 0 50px rgba(138, 109, 59, 0.1);
}

/* Canvas de Estrellas Animadas */
.stars-canvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    background: radial-gradient(circle at 20% 30%, #0a1620 0%, #03070a 100%);
    opacity: 0.5;
    pointer-events: none;
}

/* Wrapper Principal */
.ravenclaw-wrapper {
    max-width: 1400px;
    margin: 0 auto;
    position: relative;
    z-index: 2;
}

/* Encabezado Animado */
.ravenclaw-header-v2 {
    text-align: center;
    margin-bottom: 4rem;
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.header-glow {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 400px;
    height: 200px;
    background: radial-gradient(circle, rgba(30, 80, 150, 0.3) 0%, transparent 70%);
    border-radius: 50%;
    filter: blur(30px);
    z-index: 0;
    animation: pulseGlow 4s infinite alternate;
    pointer-events: none;
}

@keyframes pulseGlow {
    0% { opacity: 0.4; transform: translate(-50%, -50%) scale(0.9); }
    100% { opacity: 0.8; transform: translate(-50%, -50%) scale(1.1); }
}

/* Contenedor de la imagen del águila */
.eagle-image-container {
    position: relative;
    display: inline-block;
    margin-bottom: 10px;
    z-index: 2;
    animation: eagleFloat 4s ease-in-out infinite;
}

/* Imagen PNG del águila */
.eagle-png {
    width: 120px;
    height: auto;
    filter: drop-shadow(0 0 20px rgba(58, 123, 213, 0.6))
            drop-shadow(0 0 40px rgba(184, 115, 51, 0.3))
            brightness(1.1) contrast(1.2);
    transition: all 0.3s ease;
    animation: eagleGlow 3s infinite alternate;
}

/* Efecto de brillo detrás del águila */
.eagle-glow-effect {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 150px;
    height: 150px;
    background: radial-gradient(circle, 
        rgba(58, 123, 213, 0.4) 0%, 
        rgba(184, 115, 51, 0.2) 40%, 
        transparent 70%);
    border-radius: 50%;
    filter: blur(20px);
    z-index: -1;
    animation: glowPulseRaven 3s infinite alternate;
    pointer-events: none;
}

@keyframes eagleFloat {
    0%, 100% { transform: translateY(0) rotate(0deg); }
    25% { transform: translateY(-8px) rotate(-2deg); }
    75% { transform: translateY(5px) rotate(1deg); }
}

@keyframes eagleGlow {
    0% { 
        filter: drop-shadow(0 0 15px rgba(58, 123, 213, 0.5))
                drop-shadow(0 0 30px rgba(184, 115, 51, 0.2))
                brightness(1);
    }
    50% { 
        filter: drop-shadow(0 0 25px rgba(58, 123, 213, 0.8))
                drop-shadow(0 0 50px rgba(184, 115, 51, 0.4))
                brightness(1.2);
    }
    100% { 
        filter: drop-shadow(0 0 20px rgba(58, 123, 213, 0.6))
                drop-shadow(0 0 40px rgba(184, 115, 51, 0.3))
                brightness(1.1);
    }
}

@keyframes glowPulseRaven {
    0% { opacity: 0.6; transform: translate(-50%, -50%) scale(0.9); }
    100% { opacity: 1; transform: translate(-50%, -50%) scale(1.2); }
}

.eagle-png:hover {
    transform: scale(1.05);
    filter: drop-shadow(0 0 30px rgba(58, 123, 213, 0.9))
            drop-shadow(0 0 60px rgba(184, 115, 51, 0.5))
            brightness(1.3);
}

/* Título de la casa - MANTENIENDO EL ESTILO ORIGINAL QUE TE GUSTÓ */
.house-title-v2 {
    font-family: 'Cinzel', serif;
    margin: 0.5rem 0;
    position: relative;
    z-index: 2;
}

.title-line {
    display: block;
    font-size: 1.2rem;
    letter-spacing: 8px;
    color: #b87333;
    text-transform: uppercase;
    font-weight: 400;
    opacity: 0.9;
    animation: fadeInDown 0.8s ease-out;
}

.title-main {
    display: block;
    font-size: 5.5rem;
    font-weight: 900;
    background: linear-gradient(135deg, #1e5a9e 0%, #b87333 40%, #d4af37 60%, #1e5a9e 100%);
    background-size: 200% auto;
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    text-shadow: 0 0 30px rgba(30, 90, 158, 0.5);
    letter-spacing: 6px;
    animation: shimmerText 4s linear infinite, fadeInUp 0.8s ease-out;
}

@keyframes shimmerText {
    0% { background-position: 0% center; }
    100% { background-position: 200% center; }
}

.subtitle-v2 {
    font-family: 'Playfair Display', serif;
    font-size: 1.2rem;
    color: #c0d4f0;
    font-style: italic;
    margin-top: 0.5rem;
    animation: fadeIn 1.2s ease-out;
    position: relative;
    z-index: 2;
}

/* Badge de Ximena */
.ximena-badge-v2 {
    display: inline-flex;
    align-items: center;
    gap: 15px;
    margin-top: 1.5rem;
    padding: 0.8rem 2.5rem;
    background: rgba(15, 35, 60, 0.6);
    backdrop-filter: blur(8px);
    border: 1.5px solid #b87333;
    border-radius: 60px;
    box-shadow: 0 0 25px rgba(184, 115, 51, 0.3), inset 0 0 10px rgba(255, 255, 255, 0.1);
    animation: badgePulse 3s infinite;
    position: relative;
    z-index: 2;
}

@keyframes badgePulse {
    0%, 100% { box-shadow: 0 0 15px rgba(184, 115, 51, 0.3), inset 0 0 10px rgba(255, 255, 255, 0.1); }
    50% { box-shadow: 0 0 30px rgba(184, 115, 51, 0.6), inset 0 0 15px rgba(255, 255, 255, 0.2); }
}

.badge-icon {
    font-size: 1.4rem;
    animation: spinStar 4s linear infinite;
    display: inline-block;
}

@keyframes spinStar {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.badge-text {
    font-family: 'Cinzel', serif;
    font-size: 1.4rem;
    font-weight: bold;
    color: #f0e6d2;
    letter-spacing: 3px;
    text-shadow: 0 0 15px #1e5a9e;
}

/* Grid de Tarjetas Animadas */
.ravenclaw-grid-v2 {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
    margin-bottom: 4rem;
    position: relative;
    z-index: 2;
}

.raven-card-v2 {
    height: 280px;
    perspective: 1500px;
    position: relative;
    cursor: pointer;
}

.card-inner {
    position: relative;
    width: 100%;
    height: 100%;
    text-align: center;
    transition: transform 0.8s cubic-bezier(0.23, 1, 0.32, 1);
    transform-style: preserve-3d;
    border-radius: 20px;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.5);
}

.raven-card-v2:hover .card-inner {
    transform: rotateY(180deg);
}

.card-front, .card-back {
    position: absolute;
    width: 100%;
    height: 100%;
    backface-visibility: hidden;
    border-radius: 20px;
    padding: 2rem 1.5rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
    background: rgba(12, 25, 45, 0.75);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(184, 115, 51, 0.5);
    box-shadow: inset 0 0 30px rgba(0, 0, 0, 0.3);
}

.card-front {
    background: linear-gradient(145deg, rgba(20, 40, 70, 0.8) 0%, rgba(10, 20, 40, 0.9) 100%);
    border-top: 2px solid #b87333;
    border-bottom: 2px solid #1e5a9e;
    transform: rotateY(0deg);
}

.card-back {
    background: linear-gradient(145deg, rgba(10, 20, 40, 0.95) 0%, rgba(5, 15, 30, 0.95) 100%);
    border: 2px solid #d4af37;
    transform: rotateY(180deg);
    color: #e0e6f0;
    justify-content: flex-start;
    overflow-y: auto;
}

.card-icon-v2 {
    font-size: 3.5rem;
    margin-bottom: 1rem;
    filter: drop-shadow(0 0 15px #3a7bd5);
    animation: iconFloat 2.5s infinite alternate ease-in-out;
}

@keyframes iconFloat {
    0% { transform: translateY(0); }
    100% { transform: translateY(-8px); }
}

.raven-card-v2:nth-child(2) .card-icon-v2 { animation-delay: 0.2s; }
.raven-card-v2:nth-child(3) .card-icon-v2 { animation-delay: 0.4s; }
.raven-card-v2:nth-child(4) .card-icon-v2 { animation-delay: 0.6s; }
.raven-card-v2:nth-child(5) .card-icon-v2 { animation-delay: 0.8s; }
.raven-card-v2:nth-child(6) .card-icon-v2 { animation-delay: 1.0s; }

.card-front h3 {
    font-family: 'Cinzel', serif;
    color: #f0e6d2;
    font-size: 1.5rem;
    margin-bottom: 0.3rem;
}

.card-front p {
    color: #b0c8e8;
    font-size: 1rem;
}

.hover-hint {
    display: inline-block;
    margin-top: 1.5rem;
    font-size: 0.8rem;
    color: #b87333;
    border-bottom: 1px dashed #b87333;
    padding-bottom: 2px;
    opacity: 0.7;
    transition: opacity 0.3s;
}

.raven-card-v2:hover .hover-hint {
    opacity: 1;
    animation: blinkHint 1.5s infinite;
}

@keyframes blinkHint {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.4; }
}

.card-back h4 {
    font-family: 'Cinzel', serif;
    color: #d4af37;
    font-size: 1.3rem;
    margin-bottom: 1rem;
    border-bottom: 1px solid #3a5a8c;
    padding-bottom: 0.5rem;
}

.card-list {
    list-style: none;
    padding: 0;
    text-align: left;
}

.card-list li {
    margin-bottom: 0.6rem;
    font-size: 0.95rem;
    border-left: 2px solid #b87333;
    padding-left: 10px;
    color: #d4e4ff;
}

.mini-icon {
    width: 20px;
    height: 20px;
    margin-right: 8px;
    vertical-align: middle;
    filter: drop-shadow(0 0 5px #b87333);
}

.traits-cloud {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: center;
    margin-top: 1rem;
}

.traits-cloud span {
    background: rgba(30, 90, 158, 0.3);
    border: 1px solid #5a8ab5;
    color: #d4e4ff;
    padding: 4px 12px;
    border-radius: 30px;
    font-size: 0.85rem;
    animation: traitPulse 2s infinite alternate;
}

@keyframes traitPulse {
    0% { border-color: #5a8ab5; box-shadow: 0 0 2px #1e5a9e; }
    100% { border-color: #b87333; box-shadow: 0 0 8px #b87333; }
}

.card-stat {
    margin-top: 1.5rem;
    font-size: 1.2rem;
    color: #d4af37;
    font-weight: bold;
}

.view-note {
    margin-top: 1rem;
    color: #b87333;
    font-style: italic;
}

.card-aura {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border-radius: 20px;
    background: radial-gradient(circle at var(--mouse-x, 50%) var(--mouse-y, 50%), rgba(184, 115, 51, 0.3) 0%, transparent 60%);
    opacity: 0;
    transition: opacity 0.4s;
    pointer-events: none;
    z-index: 5;
}

.raven-card-v2:hover .card-aura {
    opacity: 1;
}

/* Mensaje Estelar */
.stellar-message {
    margin: 4rem 0;
    position: relative;
    z-index: 2;
}

.message-container-v2 {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1.5rem;
    background: rgba(8, 20, 40, 0.5);
    backdrop-filter: blur(12px);
    border-radius: 40px;
    padding: 2.5rem 2rem;
    border: 1px solid rgba(184, 115, 51, 0.4);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4), inset 0 0 30px rgba(30, 90, 158, 0.2);
    position: relative;
    overflow: hidden;
}

.message-stars {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.star {
    width: 4px;
    height: 4px;
    background: white;
    border-radius: 50%;
    box-shadow: 0 0 10px #fff, 0 0 20px #3a7bd5;
    animation: twinkle 2s infinite alternate;
}

.star1 { animation-delay: 0s; }
.star2 { animation-delay: 0.4s; }
.star3 { animation-delay: 0.8s; }
.star4 { animation-delay: 0.2s; }
.star5 { animation-delay: 0.6s; }
.star6 { animation-delay: 1.0s; }

@keyframes twinkle {
    0% { opacity: 0.3; transform: scale(0.8); }
    100% { opacity: 1; transform: scale(1.5); }
}

.message-content-v2 {
    flex: 1;
    text-align: center;
    padding: 0 1rem;
}

.quill-icon {
    font-size: 2rem;
    margin-bottom: 0.5rem;
    animation: writeQuill 4s infinite ease-in-out;
    display: inline-block;
}

@keyframes writeQuill {
    0%, 100% { transform: rotate(-5deg); }
    50% { transform: rotate(15deg) translateX(5px); }
}

.message-content-v2 h3 {
    font-family: 'Cinzel', serif;
    color: #d4af37;
    font-size: 2rem;
    margin-bottom: 1.5rem;
}

.message-body-v2 p {
    font-family: 'Playfair Display', serif;
    color: #dce4f0;
    font-size: 1.1rem;
    line-height: 1.8;
    margin-bottom: 1rem;
}

.message-body-v2 strong {
    color: #e0c068;
    font-weight: 700;
}

.signature-v2 {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
    margin-top: 1.5rem;
}

.sig-line {
    width: 60px;
    height: 1px;
    background: linear-gradient(90deg, transparent, #b87333, transparent);
}

.sig-name {
    font-family: 'Cinzel', serif;
    color: #b87333;
    font-size: 1.1rem;
    letter-spacing: 2px;
}

/* Barra de Sabiduría */
.wisdom-bar-container {
    margin-top: 2rem;
    padding: 1.5rem 2rem;
    background: rgba(10, 25, 45, 0.6);
    backdrop-filter: blur(5px);
    border-radius: 60px;
    border: 1px solid #1e5a9e;
    position: relative;
    z-index: 2;
}

.wisdom-label {
    display: flex;
    justify-content: space-between;
    color: #d4e4ff;
    font-family: 'Cinzel', serif;
    margin-bottom: 0.8rem;
}

.wisdom-value {
    color: #d4af37;
    font-weight: bold;
}

.wisdom-bar-bg {
    height: 20px;
    background: rgba(0, 0, 0, 0.5);
    border-radius: 30px;
    overflow: hidden;
    position: relative;
    box-shadow: inset 0 2px 5px black;
}

.wisdom-bar-fill {
    width: 98%;
    height: 100%;
    background: linear-gradient(90deg, #1e5a9e, #b87333, #d4af37);
    background-size: 200% 100%;
    border-radius: 30px;
    box-shadow: 0 0 15px #3a7bd5;
    animation: fillShimmer 3s infinite alternate;
    position: relative;
}

@keyframes fillShimmer {
    0% { background-position: 0% 0%; }
    100% { background-position: 100% 0%; }
}

.wisdom-sparkles {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at 30% 50%, rgba(255, 255, 255, 0.8) 0%, transparent 10%);
    background-size: 20px 20px;
    mix-blend-mode: overlay;
    animation: sparkleMove 2s linear infinite;
}

@keyframes sparkleMove {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

.wisdom-note {
    text-align: right;
    color: #b0c8e8;
    font-size: 0.9rem;
    margin-top: 0.5rem;
    font-style: italic;
}

/* Animaciones de entrada */
@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); }
}

/* Responsive para Ravenclaw V2 */
@media (max-width: 1200px) {
    .title-main {
        font-size: 4.5rem;
    }
    
    .ravenclaw-grid-v2 {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 992px) {
    .ravenclaw-grid-v2 {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .title-main {
        font-size: 3.8rem;
    }
    
    .message-container-v2 {
        flex-direction: column;
    }
    
    .message-stars {
        flex-direction: row;
    }
}

@media (max-width: 768px) {
    .ravenclaw-section-v2 {
        padding: 3rem 1.5rem;
    }
    
    .title-main {
        font-size: 3rem;
        letter-spacing: 4px;
    }
    
    .title-line {
        font-size: 1rem;
        letter-spacing: 6px;
    }
    
    .eagle-png {
        width: 90px;
    }
    
    .eagle-glow-effect {
        width: 120px;
        height: 120px;
    }
    
    .ravenclaw-grid-v2 {
        grid-template-columns: 1fr;
        max-width: 400px;
        margin-left: auto;
        margin-right: auto;
    }
    
    .ximena-badge-v2 {
        padding: 0.6rem 1.5rem;
    }
    
    .badge-text {
        font-size: 1.1rem;
    }
    
    .message-content-v2 h3 {
        font-size: 1.6rem;
    }
    
    .message-body-v2 p {
        font-size: 1rem;
    }
}

@media (max-width: 480px) {
    .title-main {
        font-size: 2.2rem;
        letter-spacing: 3px;
    }
    
    .title-line {
        font-size: 0.8rem;
        letter-spacing: 4px;
    }
    
    .eagle-png {
        width: 70px;
    }
    
    .eagle-glow-effect {
        width: 100px;
        height: 100px;
    }
    
    .ximena-badge-v2 {
        padding: 0.5rem 1.2rem;
        gap: 8px;
    }
    
    .badge-icon {
        font-size: 1rem;
    }
    
    .badge-text {
        font-size: 0.9rem;
        letter-spacing: 2px;
    }
    
    .raven-card-v2 {
        height: 260px;
    }
    
    .card-front, .card-back {
        padding: 1.5rem 1rem;
    }
    
    .message-container-v2 {
        padding: 1.5rem 1rem;
    }
    
    .wisdom-bar-container {
        padding: 1rem 1.2rem;
    }
}