/**
 * Academy LMS - Single Course Page Tailwind Overrides
 *
 * Usa @apply do Tailwind para estilizar classes do Academy
 * Aplicando identidade visual da marca Águias do Brasil
 *
 * @package AguiasDoBrasil
 * @subpackage Academy
 * @since 1.0.0
 */

@layer components {
	/* =============================================================================
	   CONTAINER E LAYOUT
	   ========================================================================== */

	.academy-single-course {
		@apply w-full bg-white;
	}

	.academy-container {
		@apply max-w-7xl mx-auto px-4 py-8 md:px-8 md:py-12;
	}

	.academy-row {
		@apply grid grid-cols-1 gap-8 lg:grid-cols-[2fr_1fr] lg:gap-16;
	}

	.academy-col-lg-8 {
		@apply w-full lg:w-2/3;
	}

	.academy-col-lg-4 {
		@apply w-full lg:w-1/3;
	}

	/* =============================================================================
	   COURSE HEADER (Hero Section)
	   ========================================================================== */

	.academy-single-course__preview {
		@apply mb-8 rounded-2xl overflow-hidden bg-gradient-to-br from-azul-4 via-azul-2 to-azul-claro shadow-lg relative;
	}

	.academy-single-course__preview::before {
		content: '';
		@apply absolute inset-0 bg-gradient-to-br from-azul-primario/5 to-azul-profundo/10 z-10 pointer-events-none;
	}

	.academy-single-course__preview img,
	.academy-single-course__preview iframe,
	.academy-single-course__preview video {
		@apply w-full h-auto block relative z-20 rounded-2xl;
	}

	.academy-single-course__categroy {
		@apply inline-block px-4 py-2 text-xs font-semibold uppercase tracking-wide text-azul-primario bg-gradient-to-br from-azul-4 to-azul-2 rounded-lg no-underline mr-3 mb-4 transition-all duration-300 border border-azul-primario/10;
	}

	.academy-single-course__categroy:hover {
		@apply bg-gradient-to-br from-azul-primario to-azul-profundo text-white -translate-y-0.5 shadow-lg shadow-azul-primario/30;
	}

	.academy-single-course__title {
		@apply text-h1 font-semibold leading-tight text-azul-profundo my-6 tracking-tight;
	}

	@media (max-width: 767px) {
		.academy-single-course__title {
			@apply text-h2;
		}
	}

	/* =============================================================================
	   COURSE CONTENT SECTIONS
	   ========================================================================== */

	.academy-single-course__content-item {
		@apply bg-white border border-azul-4 rounded-2xl p-10 mb-8 shadow-sm transition-all duration-300;
	}

	.academy-single-course__content-item:hover {
		@apply shadow-md border-azul-2;
	}

	.academy-single-course__content-item h2 {
		@apply text-h2 font-semibold text-azul-profundo mt-0 mb-6 leading-tight;
	}

	.academy-single-course__content-item h3 {
		@apply text-h3 font-semibold text-azul-profundo mt-0 mb-6 leading-tight;
	}

	.academy-single-course__content-item h4 {
		@apply text-subtitle-1 font-semibold text-azul-profundo mt-0 mb-6 leading-tight;
	}

	.academy-single-course__content-item p {
		@apply text-body-1 leading-relaxed text-gray-800 mb-4;
	}

	/* Parágrafos da descrição do curso – margem confortável entre blocos */
	.academy-single-course__content-item--description p {
		@apply text-body-1 leading-relaxed text-gray-800;
		margin-bottom: 1.25rem !important;
	}

	.academy-single-course__content-item--description p:last-child {
		margin-bottom: 0 !important;
	}

	/* =============================================================================
	   ADDITIONAL INFO / TABS
	   ========================================================================== */

	.academy-single-course__content-item--additional-info {
		@apply relative overflow-visible p-0;
	}

	.academy-tabs-nav {
		@apply flex gap-0 border-b-2 border-azul-4 m-0 px-10 flex-wrap bg-gradient-to-br from-azul-4 to-azul-2 rounded-t-2xl overflow-visible;
	}

	.academy-tabs-nav li {
		@apply list-none m-0;
	}

	.academy-tabs-nav li a {
		@apply block py-4 px-7 text-body-1 font-semibold text-gray-600 no-underline border-b-4 border-transparent transition-all duration-300 bg-transparent relative z-10;
	}

	.academy-tabs-nav li.active a {
		@apply text-azul-primario border-amarelo-primario bg-white shadow-sm;
	}

	.academy-tabs-nav li a:hover {
		@apply text-azul-primario bg-white/50;
	}

	.academy-tabs-content {
		@apply p-10 relative z-0 overflow-visible;
	}

	.academy-tabs-content > div {
		@apply overflow-visible p-0 hidden;
	}

	.academy-tabs-content > div:first-child {
		@apply block;
	}

	.academy-lists {
		@apply list-none m-0 p-0;
	}

	.academy-lists li {
		@apply flex items-start gap-4 py-4 border-b border-azul-4 transition-all duration-200;
	}

	.academy-lists li:hover {
		@apply pl-2 bg-gradient-to-r from-amarelo-8 to-transparent;
	}

	.academy-lists li:last-child {
		@apply border-b-0;
	}

	.academy-lists li i {
		@apply text-amarelo-primario text-xl flex-shrink-0 mt-0.5;
	}

	.academy-lists li span {
		@apply text-body-1 leading-relaxed text-gray-800 flex-1;
	}

	.academy-single-course__content-item--instructors .instructor-title {margin-bottom: 0 !important;}

	/* =============================================================================
	   CURRICULUM ACCORDION
	   ========================================================================== */

	.academy-course-curriculum-header {
		@apply px-10 py-6 bg-gradient-to-r from-azul-primario via-azul-profundo to-azul-escuro rounded-t-2xl -mt-10 -mx-10 mb-8 shadow-lg;
		margin-top: 3rem !important;
	}

	.academy-curriculum-title {
		@apply text-h3 font-semibold text-white m-0 drop-shadow-sm;
	}

	.academy-accordion {
		@apply list-none m-0 p-0;
	}

	.academy-accordion > li {
		@apply border border-azul-4 rounded-xl mb-4 overflow-hidden bg-white shadow-sm transition-all duration-300;
	}

	.academy-accordion > li:hover {
		@apply shadow-md border-azul-2;
	}

	.academy-accordion > li.active {
		@apply border-azul-primario shadow-lg;
	}

	.academy-accordion__title {
		@apply flex items-center justify-between py-5 px-6 bg-gradient-to-br from-azul-4 to-azul-2 cursor-pointer text-subtitle-1 font-semibold text-azul-primario no-underline transition-all duration-300;
	}

	.academy-accordion__title:hover {
		@apply bg-gradient-to-br from-azul-2 to-azul-claro;
	}

	.academy-accordion > li.active .academy-accordion__title {
		@apply bg-gradient-to-r from-azul-primario to-azul-profundo text-white;
	}

	.academy-accordion__title::after {
		content: '+';
		@apply text-3xl font-light text-azul-primario transition-all duration-300 leading-none;
	}

	.academy-accordion > li.active .academy-accordion__title::after {
		content: '−';
		@apply text-white rotate-180;
	}

	.academy-accordion__body {
		@apply max-h-0 overflow-hidden transition-all duration-300 ease-in-out;
	}

	.academy-accordion > li.active .academy-accordion__body {
		@apply max-h-[2000px];
	}

	.academy-lesson-list {
		@apply list-none m-0 p-0;
	}

	.academy-lesson-list__item {
		@apply flex items-center justify-between py-5 px-6 border-t border-azul-4 transition-all duration-200;
	}

	.academy-lesson-list__item:first-child {
		@apply border-t-0;
	}

	.academy-lesson-list__item:hover {
		@apply bg-gradient-to-r from-amarelo-8 to-transparent pl-8;
	}

	.academy-entry-content {
		@apply flex items-center gap-4 flex-1;
	}

	.academy-entry-content i {
		@apply text-azul-claro text-xl w-7 text-center transition-all duration-200;
	}

	.academy-lesson-list__item:hover .academy-entry-content i {
		@apply text-azul-primario scale-110;
	}

	.academy-entry-title {
		@apply text-body-1 font-medium text-gray-800 m-0 flex-1 leading-normal;
	}

	.academy-entry-time {
		@apply text-body-2 text-gray-600 ml-auto px-3 py-1 bg-azul-4 rounded-md font-medium;
	}

	.academy-entry-control {
		@apply flex-shrink-0 ml-4;
	}

	.academy-btn-play {
		@apply inline-flex items-center justify-center w-11 h-11 rounded-full bg-gradient-to-br from-azul-primario to-azul-profundo text-white no-underline transition-all duration-300 shadow-md shadow-azul-primario/20;
	}

	.academy-btn-play:hover {
		@apply bg-gradient-to-br from-azul-profundo to-azul-escuro scale-110 -translate-y-0.5 shadow-lg shadow-azul-primario/40;
	}

	.academy-btn-play-lock {
		@apply bg-gradient-to-br from-azul-suave to-azul-claro cursor-not-allowed opacity-70;
	}

	/* =============================================================================
	   SIDEBAR WIDGETS
	   ========================================================================== */

	.academy-widget-enroll {
		@apply bg-white border border-azul-4 rounded-2xl p-10 mb-8 sticky top-8 shadow-lg transition-all duration-300;
	}

	.academy-widget-enroll:hover {
		@apply shadow-xl border-azul-2;
	}

	.academy-widget-enroll__title {
		@apply text-h3 font-semibold text-azul-profundo m-0 mb-6 leading-tight;
	}

	.academy-widget-enroll__price {
		@apply text-4xl font-bold mb-6 leading-tight;
		background: linear-gradient(135deg, #102047 0%, #1E4592 100%);
		-webkit-background-clip: text;
		-webkit-text-fill-color: transparent;
		background-clip: text;
	}

	.academy-widget-enroll__content {
		@apply mb-8 p-6 bg-gradient-to-br from-azul-4 to-amarelo-8 rounded-xl;
	}

	.academy-widget-enroll__content-lists {
		@apply list-none m-0 p-0;
	}

	.academy-widget-enroll__content-lists li {
		@apply flex items-center justify-between py-3.5 border-b border-azul-primario/10;
	}

	.academy-widget-enroll__content-lists li:last-child {
		@apply border-b-0;
	}

	.academy-widget-enroll__content-lists .label {
		@apply flex items-center gap-3 text-body-2 font-medium text-gray-600;
	}

	.academy-widget-enroll__content-lists .label i,
	.academy-widget-enroll__content-lists .label .academy-icon {
		@apply text-azul-primario text-lg;
	}

	.academy-widget-enroll__content-lists .data {
		@apply text-body-2 font-semibold text-azul-profundo;
	}

	.academy-widget-enroll__continue {
		@apply mt-0;
	}

	.academy-btn {
		@apply inline-block py-4 px-8 text-body-1 font-semibold text-center no-underline rounded-xl transition-all duration-300 cursor-pointer border-0 w-full shadow-md shadow-azul-primario/20;
	}

	.academy-btn--bg-purple {
		@apply bg-gradient-to-r from-azul-primario via-azul-profundo to-azul-escuro text-white;
	}

	.academy-btn--bg-purple:hover {
		@apply bg-gradient-to-r from-azul-profundo via-azul-escuro to-azul-3 -translate-y-1 shadow-lg shadow-azul-primario/40;
	}

	.academy-btn--bg-purple:active {
		@apply -translate-y-0.5 shadow-md shadow-azul-primario/30;
	}

	/* =============================================================================
	   INSTRUCTORS
	   ========================================================================== */

	.academy-single-course__instructors {
		@apply mb-8;
	}

	.academy-instructor {
		@apply flex items-center gap-5 p-6 bg-gradient-to-br from-azul-4 to-amarelo-8 rounded-xl mb-4 border border-azul-primario/10 transition-all duration-300;
	}

	.academy-instructor:hover {
		@apply shadow-md -translate-y-0.5;
	}

	.academy-instructor__avatar {
		@apply flex-shrink-0;
	}

	.academy-instructor__avatar img {
		@apply w-16 h-16 rounded-full object-cover border-4 border-white shadow-md;
	}

	.academy-instructor__name {
		@apply text-subtitle-1 font-semibold text-azul-profundo m-0 mb-2;
	}

	.academy-instructor__role {
		@apply text-body-2 text-gray-600 m-0 font-medium;
	}

	/* =============================================================================
	   REVIEWS
	   ========================================================================== */

	.academy-single-course__reviews {
		@apply mb-8;
	}

	.academy-review-summary {
		@apply grid grid-cols-[auto_1fr] gap-10 p-10 bg-gradient-to-br from-azul-4 to-amarelo-8 rounded-2xl mb-8 border border-azul-primario/10;
	}

	.academy-review-average {
		@apply text-center p-6 bg-white rounded-xl shadow-sm;
	}

	.academy-review-average-score {
		@apply text-5xl font-bold leading-none mb-3;
		background: linear-gradient(135deg, #102047 0%, #1E4592 100%);
		-webkit-background-clip: text;
		-webkit-text-fill-color: transparent;
		background-clip: text;
	}

	.academy-review-item {
		@apply p-8 bg-white border border-azul-4 rounded-xl mb-6 shadow-sm transition-all duration-300;
	}

	.academy-review-item:hover {
		@apply shadow-md border-azul-2 -translate-y-0.5;
	}

	.academy-review-header {
		@apply flex items-center gap-5 mb-5;
	}

	.academy-review-avatar img {
		@apply w-14 h-14 rounded-full object-cover border-2 border-azul-4 shadow-sm;
	}

	.academy-review-author {
		@apply text-body-1 font-semibold text-azul-profundo m-0 mb-1;
	}

	.academy-review-date {
		@apply text-body-2 text-gray-600 m-0;
	}

	/* =============================================================================
	   META INFO / STATS
	   ========================================================================== */

	.academy-single-course__meta {
		@apply flex flex-wrap gap-8 py-6 my-8 border-t-2 border-b-2 border-azul-4;
	}

	.academy-single-course__meta-item {
		@apply flex items-center gap-3 text-body-2 font-medium text-gray-600;
	}

	.academy-single-course__meta-item svg {
		@apply w-5 h-5 text-azul-primario flex-shrink-0;
	}

	/* =============================================================================
	   BENEFITS
	   ========================================================================== */

	.academy-single-course__benefits {
		@apply mb-8;
	}

	.academy-benefits-list {
		@apply list-none m-0 p-0 grid grid-cols-1 gap-4 md:grid-cols-2;
	}

	.academy-benefits-list li {
		@apply flex items-start gap-4 p-5 bg-gradient-to-br from-amarelo-8 to-azul-4 rounded-xl border border-amarelo-primario/20 transition-all duration-300;
	}

	.academy-benefits-list li:hover {
		@apply bg-gradient-to-br from-amarelo-6 to-azul-2 -translate-y-0.5 shadow-md shadow-amarelo-primario/20;
	}

	.academy-benefits-list li i {
		@apply text-amarelo-primario text-2xl flex-shrink-0 mt-0.5;
	}

	.academy-benefits-list li span {
		@apply text-body-1 leading-relaxed text-gray-800 font-medium;
	}

	/* =============================================================================
	   RESPONSIVE
	   ========================================================================== */

	@media (max-width: 1023px) {
		.academy-col-lg-4 {
			@apply order-first;
		}
		
		.academy-widget-enroll {
			@apply relative top-0 mb-12;
		}
		
		.academy-single-course__title {
			@apply text-h2;
		}
		
		.academy-single-course__content-item {
			@apply p-6;
		}
		
		.academy-course-curriculum-header {
			@apply -mt-6 -mx-6 mb-6 px-5 py-5;
		}
		
		.academy-tabs-nav {
			@apply px-6;
		}
		
		.academy-tabs-content {
			@apply p-6;
		}
		
		.academy-container {
			@apply px-4 py-8;
		}
	}

	@media (max-width: 767px) {
		.academy-single-course__title {
			@apply text-h3;
		}
		
		.academy-widget-enroll__price {
			@apply text-3xl;
		}
		
		.academy-benefits-list {
			@apply grid-cols-1;
		}
		
		.academy-review-summary {
			@apply grid-cols-1 gap-6;
		}
	}

	/* =============================================================================
	   REMOVER PREÇO SE FOR GRATUITO
	   ========================================================================== */
	
	/* Esconde preço se o curso for gratuito */
	.academy-widget-enroll__head .academy-course-price:empty,
	.academy-widget-enroll__head .academy-course-price:has-text("Free"),
	.academy-widget-enroll__head .academy-course-price:has-text("Gratuito") {
		@apply hidden;
	}

	/* =============================================================================
	   BOTÕES DE COMPARTILHAR E DESEJO - FONTES MENORES
	   ========================================================================== */
	
	.academy-widget-enroll__wishlist-and-share .academy-share-button,
	.academy-widget-enroll__wishlist-and-share .academy-course__wishlist,
	.academy-widget-enroll__wishlist-and-share .academy-add-wishlist-btn,
	.academy-widget-enroll__wishlist-and-share .academy-add-to-wishlist-btn {
		@apply text-caption !important;
		font-size: 11px !important;
		padding: 0.375rem 0.75rem !important;
		line-height: 1.2 !important;
	}

	.academy-widget-enroll__wishlist-and-share .academy-share-button i,
	.academy-widget-enroll__wishlist-and-share .academy-course__wishlist i,
	.academy-widget-enroll__wishlist-and-share .academy-add-wishlist-btn i,
	.academy-widget-enroll__wishlist-and-share .academy-add-to-wishlist-btn i {
		font-size: 12px !important;
		width: 14px !important;
		height: 14px !important;
	}

	/* =============================================================================
	   INSTRUTOR MAIS DISCRETO
	   ========================================================================== */
	
	.course-single-instructor .instructor-title {
		@apply text-caption text-gray-500;
	}

	.course-single-instructor .instructor-name {
		@apply text-body-2-bold;
	}

	/* Remove reviews do instrutor para ser mais discreto */
	.course-single-instructor .instructor-review {
		@apply hidden;
	}

	/* =============================================================================
	   OCULTAR CONTAGEM DE ESTUDANTES
	   ========================================================================== */
	
	/* Esconde item de enrolled/estudantes no widget de inscrição */
	/* Ocultando pelo ícone específico usado para estudantes */
	.academy-widget-enroll__content-lists li:has(.academy-icon--group-profile),
	.academy-widget-enroll__content-lists li:has(.academy-icon--user) {
		display: none !important;
	}
}

