/* ========================================
   DISEÑO MODERNO - BANDITS SQUAD INDEX
   ======================================== */

:root {
	--bandits-bg-1: #0f172e;
	--bandits-bg-2: #1a1f3a;
}

/* ========================================
   SECCIÓN SOBRE NOSOTROS MODERNA
   ======================================== */
.about-modern {
	padding: 70px 0;
	background: linear-gradient(135deg, var(--bandits-bg-1) 0%, var(--bandits-bg-2) 100%);
	position: relative;
}

.about-wrapper {
	display: grid;
	grid-template-columns: 1fr 1.5fr;
	gap: 50px;
	align-items: center;
}

.about-image-side {
	position: relative;
	pointer-events: none;
}

.floating-emblem {
	position: relative;
	pointer-events: auto;
}

.emblem-3d {
	width: 100%;
	max-width: 380px;
	filter: drop-shadow(0 25px 50px rgba(0, 0, 0, 0.25));
	transform: none !important;
	box-shadow: 0 0 60px rgba(102, 126, 234, 0.5), 0 0 120px rgba(118, 75, 162, 0.3);
	border-radius: 50%;
	padding: 15px;
}

.emblem-glow {
	display: none;
}

.about-content-side {
	opacity: 0;
	transform: translateX(50px);
}

.about-content-side[data-aos="fade-left"].aos-animate {
	opacity: 1;
	transform: translateX(0);
}

.section-tag {
	display: inline-block;
	background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
	color: #fff;
	padding: 8px 20px;
	border-radius: 30px;
	font-family: 'Horizon', sans-serif;
	font-size: 13px;
	text-transform: uppercase;
	letter-spacing: 2px;
	margin-bottom: 20px;
	font-weight: 600;
}

.section-title-modern {
	font-family: 'krinkes decor', cursive;
	font-size: 38px;
	color: #e5e7eb;
	margin-bottom: 20px;
	line-height: 1.2;
}

.lead-text {
	font-family: 'Oswald', sans-serif;
	font-size: 17px;
	color: #cbd5e1;
	line-height: 1.7;
	margin-bottom: 35px;
}

.feature-list-modern {
	display: flex;
	flex-direction: column;
	gap: 15px;
	margin-bottom: 30px;
}

.feature-item {
	display: flex;
	gap: 15px;
	align-items: start;
	background: #fff;
	padding: 16px;
	border-radius: 12px;
	border: 2px solid #e2e8f0;
	transition: all 0.3s ease;
}

.feature-item:hover {
	border-color: #667eea;
	transform: translateX(10px);
	box-shadow: 0 10px 30px rgba(102, 126, 234, 0.1);
}

.feature-check {
	width: 32px;
	height: 32px;
	background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
	color: #fff;
	border-radius: 50%;
	display: flex;
	align-items: center;
	justify-content: center;
	font-weight: 700;
	flex-shrink: 0;
}

.feature-text {
	display: flex;
	flex-direction: column;
	gap: 5px;
}

.feature-text strong {
	font-family: 'Horizon', sans-serif;
	font-size: 16px;
	color: #0b1220;
}

.feature-text span {
	font-family: 'Oswald', sans-serif;
	font-size: 14px;
	color: #64748b;
}

.cta-group {
	display: flex;
	gap: 15px;
	flex-wrap: wrap;
}

.btn-modern {
	font-family: 'Horizon', sans-serif;
	padding: 15px 35px;
	border-radius: 12px;
	font-size: 16px;
	font-weight: 600;
	text-decoration: none;
	transition: all 0.3s ease;
	display: inline-flex;
	align-items: center;
	gap: 10px;
}

.btn-modern.primary {
	background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
	color: #fff;
	box-shadow: 0 10px 30px rgba(102, 126, 234, 0.3);
}

.btn-modern.primary:hover {
	transform: translateY(-3px);
	box-shadow: 0 15px 40px rgba(102, 126, 234, 0.4);
}

.btn-modern.secondary {
	background: transparent;
	color: #667eea;
	border: 2px solid #667eea;
}

.btn-modern.secondary:hover {
	background: #667eea;
	color: #fff;
	transform: translateY(-3px);
}

/* DISCORD BUTTON CON ICONO SVG */
.btn-modern.discord-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
}

.discord-icon {
	width: 24px;
	height: 24px;
	flex-shrink: 0;
	box-sizing: border-box;
}

.btn-modern.discord-btn:hover .discord-icon {
	background: #fff;
	border-radius: 50%;
	padding: 4px;
}

.btn-text {
	transition: all 0.3s ease;
}

/* ========================================
   ROLES SHOWCASE
   ======================================== */
.roles-showcase {
	padding: 60px 0;
	background: linear-gradient(135deg, var(--bandits-bg-1) 0%, var(--bandits-bg-2) 100%);
	color: #fff;
	position: relative;
	overflow: hidden;
}

/* EXCEPCIÓN DE ANCHURA PARA ROLES */
.roles-showcase .container {
	max-width: 1600px;
	width: 95%;
}

.roles-showcase::before {
	content: '';
	position: absolute;
	top: 0;
	left: 0;
	right: 0;
	bottom: 0;
	background: radial-gradient(circle at 20% 50%, rgba(102, 126, 234, 0.1) 0%, transparent 50%),
	            radial-gradient(circle at 80% 80%, rgba(118, 75, 162, 0.1) 0%, transparent 50%);
}

.section-header-center {
	text-align: center;
	margin-bottom: 45px;
	position: relative;
	z-index: 1;
}

.section-header-center .section-tag {
	background: rgba(255, 255, 255, 0.1);
	backdrop-filter: blur(10px);
}

.section-header-center .section-title-modern {
	color: #fff;
}

.section-subtitle {
	font-family: 'Oswald', sans-serif;
	font-size: 16px;
	color: rgba(255, 255, 255, 0.7);
	margin-top: 12px;
}

.roles-grid {
	display: grid;
	grid-template-columns: repeat(4, 1fr);
	gap: 20px;
	position: relative;
	z-index: 1;
}

@media (max-width: 1024px) {
	.roles-grid {
		grid-template-columns: repeat(2, 1fr);
	}
}

@media (max-width: 600px) {
	.roles-grid {
		grid-template-columns: 1fr;
	}
}

.role-card {
	background: rgba(255, 255, 255, 0.05);
	backdrop-filter: blur(10px);
	border: 1px solid rgba(255, 255, 255, 0.1);
	border-radius: 24px;
	/* Padding shorthand: Top, Right, Bottom, Left */
	/* Padding inferior grande en estado inicial para empujar el contenido hacia arriba */
	padding: 40px 20px 230px 20px; 
	text-align: center;
	/* VELOCIDAD RÁPIDA (0.35s) para el contenido (texto/icono), respuesta inmediata */
	transition: all 0.35s cubic-bezier(0.2, 0.8, 0.2, 1);
	cursor: pointer;
	opacity: 0;
	transform: rotateY(90deg);
	position: relative; 
	overflow: hidden;
	min-height: 520px;
	display: flex;
	flex-direction: column;
	justify-content: flex-end; /* Alineamos al fondo para controlar la distancia con el badge */
	align-items: center;
	/* Hardware acceleration to prevent shaking */
	transform-style: preserve-3d;
	will-change: transform;
}

.role-card:hover {
	background: rgba(0, 0, 0, 0.2); /* Oscurecemos un poco el fondo base en hover */
	/* Reducimos el zoom en hover (de 1.05 a 1.02) para mejorar calidad visual y evitar pixelado */
	transform: translateY(-10px) scale(1.02); 
	/* Sombra NEGRA (no luminosa) y contraída (-5px) para que no invada las tarjetas vecinas */
	box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.5);
	border-color: #667eea;
	z-index: 50; /* Ensure hovered card is above siblings */
	/* Al hacer hover, reducimos el padding inferior para que el contenido baje cerca del badge */
	padding-bottom: 75px; 
}

/* VIDEO BACKGROUND FOR ROLE CARDS */
.role-video-bg {
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	z-index: 0;
	opacity: 0;
	transition: opacity 0.5s ease;
	pointer-events: none;
}

/* GRADIENT OVERLAY FOR VIDEO */
.role-video-bg::after {
	content: '';
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	/* Gradiente de negro en la parte inferior a transparente arriba */
	background: linear-gradient(to bottom, rgba(0,0,0,0) 0%, rgba(0,0,0,0.4) 60%, rgba(0,0,0,0.9) 100%);
	z-index: 1;
}

.role-video-bg video {
	width: 100%;
	height: 100%;
	object-fit: cover;
	z-index: 0;
	/* Optimizaciones de renderizado para vídeo */
	transform: translateZ(0); 
	backface-visibility: hidden;
	-webkit-font-smoothing: antialiased;
}

.role-card:hover .role-video-bg {
	opacity: 1;
}

/* Ensure content is above video and animate it */
.role-card > *:not(.role-video-bg):not(.role-badge) {
	position: relative;
	z-index: 5; /* AUMENTADO: Texto encima del badge para evitar que sea ocultado durante la animación */
	transition: transform 0.5s cubic-bezier(0.2, 0.8, 0.2, 1);
}

/* Move content down on hover (EXCEPT BADGE) */
/* ELIMINADO: Ya no usamos transform para mover el contenido, sino padding-bottom */
/* .role-card:hover > *:not(.role-video-bg):not(.role-badge) { ... } */

.role-card[data-aos="flip-left"].aos-animate {
	opacity: 1;
	transform: rotateY(0);
}

.role-icon {
	font-size: 64px;
	margin-bottom: 6px; /* Compactamos más */
	filter: drop-shadow(0 5px 15px rgba(0,0,0,0.3));
}

.role-card h3 {
	font-family: 'Horizon', sans-serif;
	font-size: 24px; /* Un pelín más pequeño para acomodar títulos largos */
	margin-bottom: 6px; /* Compactamos más */
	color: #fff;
	text-transform: uppercase;
	letter-spacing: 1px;
	text-shadow: 0 2px 10px rgba(0,0,0,0.5);
}

.role-card p {
	font-family: 'Oswald', sans-serif;
	font-size: 14px; /* Reducimos para evitar desbordes */
	color: rgba(255, 255, 255, 0.9);
	line-height: 1.4; /* Línea más compacta */
	margin-bottom: 0;
	max-width: 95%; /* Aprovechamos más ancho */
}

.role-badge {
	position: absolute;
	/* Posición inicial elevada para estar justo debajo del texto (que acaba en padding-bottom 230px) */
	bottom: 175px;
	left: 0; 
	right: 0;
	margin: 0 16px; /* Márgenes fijos pequeños para maximizar el espacio horizontal disponible */
	width: auto;
	background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
	color: #fff;
	padding: 12px 0;
	border-radius: 50px;
	font-family: 'Horizon', sans-serif;
	font-size: 12px; /* Ajuste fino para asegurar que todo quepa en una línea */
	text-transform: uppercase;
	letter-spacing: 1px;
	display: block;
	box-shadow: 0 5px 20px rgba(0,0,0,0.3);
	/* VELOCIDAD LENTA (0.8s) y curva 'ease-out' suave.
	   Eliminamos el 'cubic-bezier' agresivo para que el badge no salte al inicio. */
	transition: all 0.8s ease-out;
	white-space: nowrap;
	z-index: 2; /* BAJADO: Menor que el texto (z-index 5) */
	text-align: center;
	overflow: hidden;
	text-overflow: ellipsis;
}

/* ESTADO HOVER DEL BADGE - MÁS ESPECÍFICO */
.role-card:hover .role-badge {
	bottom: 0;
	margin: 0; 
	border-radius: 0 0 24px 24px;
	padding: 15px 0; /* Un poco menos de padding para dar aire al texto superior */
	box-shadow: 0 -10px 30px rgba(0,0,0,0.3);
	/* Al expandirse, recuperamos espacio */
	letter-spacing: 1.5px; 
}

/* ========================================
   GALERÍA MODERNA
   ======================================== */
.gallery-modern {
	padding: 60px 0;
	background: linear-gradient(135deg, var(--bandits-bg-1) 0%, var(--bandits-bg-2) 100%);
}

.gallery-grid {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
	gap: 20px;
	margin-bottom: 40px;
}

.gallery-item {
	position: relative;
	border-radius: 15px;
	overflow: hidden;
	aspect-ratio: 16/10;
	cursor: pointer;
	opacity: 0;
	transform: scale(0.8);
}

.gallery-item[data-aos="zoom-in"].aos-animate {
	opacity: 1;
	transform: scale(1);
}

.gallery-item.large {
	grid-column: span 2;
}

.gallery-item img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	transition: transform 0.5s ease;
}

.gallery-item:hover img {
	transform: scale(1.15);
}

.gallery-overlay {
	position: absolute;
	bottom: 0;
	left: 0;
	right: 0;
	background: linear-gradient(to top, rgba(0,0,0,0.9) 0%, transparent 100%);
	padding: 30px 25px;
	transform: translateY(100%);
	transition: transform 0.4s ease;
}

.gallery-item:hover .gallery-overlay {
	transform: translateY(0);
}

.gallery-title {
	font-family: 'Horizon', sans-serif;
	font-size: 17px;
	color: #fff;
	margin-bottom: 4px;
}

.gallery-desc {
	font-family: 'Oswald', sans-serif;
	font-size: 13px;
	color: rgba(255, 255, 255, 0.7);
}

.gallery-cta {
	text-align: center;
}

/* ========================================
   FAQ MODERNO
   ======================================== */
.faq-modern {
	padding: 60px 0;
	background: linear-gradient(135deg, var(--bandits-bg-1) 0%, var(--bandits-bg-2) 100%);
}

.faq-timeline {
	max-width: 1000px;
	margin: 0 auto;
	position: relative;
}

.faq-timeline::before {
	content: '';
	position: absolute;
	left: 50%;
	top: 0;
	bottom: 0;
	width: 3px;
	background: linear-gradient(to bottom, #667eea, #764ba2);
	transform: translateX(-50%);
	opacity: 0.8;
}

.faq-item {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 40px;
	margin-bottom: 45px;
	position: relative;
	opacity: 0;
	transform: translateY(20px);
}

.faq-item[data-aos].aos-animate {
	opacity: 1;
	transform: translateY(0);
}

.faq-item::before {
	content: '';
	position: absolute;
	left: 50%;
	top: 20px;
	width: 18px;
	height: 18px;
	background: #667eea;
	border: 4px solid rgba(255,255,255,0.12);
	border-radius: 50%;
	transform: translateX(-50%);
	box-shadow: 0 0 0 6px rgba(102, 126, 234, 0.2);
}

.faq-item:nth-child(even) .faq-question-side {
	order: 2;
	text-align: left;
	padding-right: 0;
	padding-left: 40px;
}

.faq-item:nth-child(even) .faq-answer-card {
	order: 1;
	margin-left: 0;
	margin-right: 40px;
}

.faq-question-side {
	text-align: right;
	display: flex;
	flex-direction: column;
	justify-content: center;
	gap: 10px;
	padding-right: 40px;
}

.faq-question-side h3 {
	font-family: 'Horizon', sans-serif;
	font-size: 18px;
	color: #e5e7eb;
	margin: 0;
}

.faq-answer-card {
	background: rgba(255,255,255,0.06);
	border: 1px solid rgba(255,255,255,0.08);
	border-radius: 14px;
	padding: 22px;
	margin-left: 40px;
	box-shadow: 0 10px 30px rgba(0, 0, 0, 0.25);
	backdrop-filter: blur(4px);
}

.faq-answer-card p {
	font-family: 'Oswald', sans-serif;
	font-size: 15px;
	color: #cbd5e1;
	line-height: 1.7;
	margin: 0;
}

/* ========================================
   CTA ÉPICO
   ======================================== */
.cta-epic {
	padding: 80px 0;
	position: relative;
	overflow: hidden;
	background: linear-gradient(135deg, var(--bandits-bg-1) 0%, var(--bandits-bg-2) 100%);
}

.cta-background {
	position: absolute;
	top: 0;
	left: 0;
	right: 0;
	bottom: 0;
	/* Usamos webp que es el formato actual y mantenemos el gradiente fuerte (0.9) para el efecto "difuminado" */
	background: linear-gradient(135deg, rgba(102, 126, 234, 0.9) 0%, rgba(118, 75, 162, 0.9) 100%),
	            url('../images/bandits_21.webp');
	background-size: cover;
	background-position: center;
	z-index: 0;
}

/* FLEX CONTAINER INTRODUCIDO */
.cta-inner-flex {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 50px; /* Separación entre mapache y texto */
	position: relative;
	z-index: 1;
	opacity: 0;
	transform: scale(0.9);
}

.cta-inner-flex[data-aos="zoom-in"].aos-animate {
	opacity: 1;
	transform: scale(1);
}

/* LADO IMAGEN (MASCOTA) */
.cta-mascot-side {
	flex: 0 0 auto;
}

.cta-mascot-img {
	max-width: 280px; /* Reducido de 350px a 280px */
	height: auto;
	display: block;
	filter: drop-shadow(0 15px 30px rgba(0,0,0,0.4));
	transform: rotate(-3deg); /* Mantenemos el toque dinámico estático */
	/* Eliminada la transición de movimiento en hover */
}

/* LADO TEXTO */
.cta-text-side {
	text-align: center; /* Alineación centrada del texto */
	color: #fff;
	max-width: 600px;
}

.cta-text-side h2 {
	font-family: 'krinkes decor', cursive;
	font-size: 52px; /* Un poco más grande para equilibrar */
	margin-bottom: 15px;
	text-shadow: 0 5px 20px rgba(0, 0, 0, 0.3);
	line-height: 1.1;
}

.cta-text-side p {
	font-family: 'Oswald', sans-serif;
	font-size: 22px;
	margin-bottom: 35px;
	opacity: 0.95;
	font-weight: 300;
}

.btn-epic {
	display: inline-flex;
	align-items: center;
	gap: 12px;
	background: #fff;
	color: #667eea;
	padding: 16px 40px;
	border-radius: 50px;
	font-family: 'Horizon', sans-serif;
	font-size: 17px;
	font-weight: 700;
	text-decoration: none;
	transition: all 0.4s ease;
	box-shadow: 0 15px 50px rgba(0, 0, 0, 0.3);
}

.btn-epic:hover {
	transform: translateY(-5px) scale(1.05);
	box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4);
	background: #f8fafc;
}

.btn-epic svg {
	transition: transform 0.3s ease;
}

.btn-epic:hover svg {
	transform: translateX(5px);
}

/* RESPONSIVE CTA */
@media (max-width: 900px) {
	.cta-inner-flex {
		flex-direction: column;
		text-align: center;
		gap: 30px;
	}

	.cta-text-side {
		text-align: center;
	}

	.cta-mascot-img {
		max-width: 250px;
	}
	
	.cta-text-side h2 {
		font-size: 42px;
	}
}

/* ========================================
   ANIMACIONES AOS (SCROLL ANIMATIONS)
   ======================================== */
[data-aos] {
	transition-duration: 0.8s;
	transition-timing-function: ease-out;
}

/* ========================================
   RESPONSIVE
   ======================================== */
@media (max-width: 992px) {
	.about-wrapper {
		grid-template-columns: 1fr;
		gap: 50px;
	}

	.emblem-3d {
		max-width: 300px;
		margin: 0 auto;
		display: block;
	}

	.section-title-modern {
		font-size: 38px;
	}

	.gallery-item.large {
		grid-column: span 1;
	}
}

@media (max-width: 768px) {
	.section-title-modern {
		font-size: 32px;
	}

	.lead-text {
		font-size: 18px;
	}

	.roles-grid {
		grid-template-columns: 1fr;
	}

	.gallery-grid {
		grid-template-columns: 1fr;
	}

	.cta-content h2 {
		font-size: 38px;
	}

	.cta-content p {
		font-size: 18px;
	}

	.btn-epic {
		padding: 16px 35px;
		font-size: 18px;
	}

	/* FAQ timeline responsive */
	.faq-item {
		grid-template-columns: 1fr;
		gap: 20px;
		margin-bottom: 35px;
	}

	.faq-item::before {
		left: 12px;
		top: 12px;
		width: 14px;
		height: 14px;
		border: 3px solid rgba(255,255,255,0.12);
		box-shadow: 0 0 0 4px rgba(102, 126, 234, 0.15);
	}

	.faq-timeline::before {
		left: 12px;
	}

	.faq-question-side {
		text-align: left;
		padding-right: 0;
		padding-left: 36px;
	}

	.faq-question-side h3 {
		font-size: 16px;
		line-height: 1.3;
	}

	.faq-answer-card {
		margin-left: 36px;
		margin-right: 0;
		padding: 18px;
		border-radius: 12px;
	}

	.faq-answer-card p {
		font-size: 14px;
		line-height: 1.6;
	}

	.faq-item:nth-child(even) .faq-question-side {
		order: 0;
		text-align: left;
		padding-left: 36px;
		padding-right: 0;
	}

	.faq-item:nth-child(even) .faq-answer-card {
		order: 0;
		margin-left: 36px;
		margin-right: 0;
	}
}

@media (max-width: 480px) {
	.section-title-modern {
		font-size: 28px;
	}

	.section-tag {
		font-size: 12px;
		padding: 6px 14px;
	}

	.feature-item {
		flex-direction: column;
		text-align: center;
	}

	.cta-group {
		flex-direction: column;
	}

	.btn-modern {
		width: 100%;
		justify-content: center;
	}

	/* FAQ más compacto en móviles pequeños */
	.faq-modern {
		padding: 40px 0;
	}

	.faq-item {
		margin-bottom: 28px;
	}

	.faq-question-side {
		padding-left: 32px;
	}

	.faq-question-side h3 {
		font-size: 15px;
	}

	.faq-answer-card {
		margin-left: 32px;
		padding: 16px;
	}

	.faq-answer-card p {
		font-size: 13px;
	}

	.faq-timeline::before {
		width: 2px;
	}
}

/* ========================================
   MOBILE ULTRA-NARROW FIXES (iPhone SE etc)
   ======================================== */
@media (max-width: 480px) {
    /* Prevent overflow */
    html, body {
        overflow-x: hidden;
        width: 100%;
    }

    /* CTA Section Fixes */
    .cta-epic {
        padding: 50px 0;
    }

    .cta-mascot-img {
        max-width: 180px; /* Smaller mascot */
        margin: 0 auto;
    }

    .cta-text-side {
        width: 100%;
        padding: 0 10px;
    }

    .cta-text-side h2 {
        font-size: 32px; /* Smaller title */
        word-wrap: break-word;
    }

    .cta-text-side p {
        font-size: 18px;
    }

    .btn-epic {
        width: 100%;
        padding: 14px 20px; /* Reduced side padding */
        font-size: 14px;
        flex-wrap: wrap; /* Allow wrapping if needed */
        justify-content: center;
        text-align: center;
    }
    
    .btn-epic span {
        white-space: normal; /* Allow text to wrap naturally */
    }

    /* Footer Fixes */
    .footer-inner {
        padding: 0 15px;
        overflow: hidden; /* Contain footer */
    }
    
    .footer-social-wrapper {
        width: 100%;
    }
}
