/*
Theme Name: League Projector
Theme URI: https://example.com/league-projector
Author: Antigravity Agent
Author URI: https://github.com/google-deepmind
Description: Tema FSE de alto rendimiento para estadísticas deportivas, marcadores y simulación.
Version: 1.0.1
Requires at least: 6.2
Tested up to: 7.0
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: league-projector
*/

/* ==========================================================================
   Global Variables & Base Styling
   ========================================================================== */

:root {
	--lp-color-bg: var(--wp--preset--color--background);
	--lp-color-primary: var(--wp--preset--color--primary);
	--lp-color-primary-container: var(--wp--preset--color--primary-container);
	--lp-color-secondary: var(--wp--preset--color--secondary);
	--lp-color-secondary-container: var(--wp--preset--color--secondary-container);
	--lp-color-surface: var(--wp--preset--color--surface);
	--lp-color-surface-container: var(--wp--preset--color--surface-container);
	--lp-color-surface-lowest: var(--wp--preset--color--surface-container-lowest);
	--lp-color-on-background: var(--wp--preset--color--on-background);
	--lp-color-on-surface: var(--wp--preset--color--on-surface);
	--lp-color-on-surface-variant: var(--wp--preset--color--on-surface-variant);
	--lp-color-outline: var(--wp--preset--color--outline);
	--lp-color-outline-variant: var(--wp--preset--color--outline-variant);

	--lp-font-headline: var(--wp--preset--font-family--archivo-narrow);
	--lp-font-body: var(--wp--preset--font-family--inter);
}

body {
	background-color: var(--lp-color-bg);
	color: var(--lp-color-on-background);
	font-family: var(--lp-font-body);
	margin: 0;
	padding: 0;
	box-sizing: border-box;
}

/* Material Icons utility */
.material-symbols-outlined {
	font-variation-settings: 'FILL' 0, 'wght' 400, 'GRAD' 0, 'opsz' 24;
	display: inline-block;
	vertical-align: middle;
}

/* Button & Card resets */
button, .wp-element-button, a.lp-btn-secondary, a.lp-btn-primary, a.lp-btn-outline {
	border: 1px solid transparent;
	background: none;
	cursor: pointer;
	font-family: var(--lp-font-body);
	transition: all 0.2s ease;
	border-radius: 0px !important;
	text-decoration: none;
	display: inline-block;
}

img {
	max-width: 100%;
	height: auto;
}

/* ==========================================================================
   Layout Structures (Header, Sidebar, Main, Footer)
   ========================================================================== */

/* Header */
.lp-header {
	width: 100%;
	height: 64px;
	position: sticky;
	top: 0;
	z-index: 100;
	background-color: var(--lp-color-surface);
	border-bottom: 1px solid var(--lp-color-outline-variant);
	padding: 0 24px;
	display: flex;
	justify-content: space-between;
	align-items: center;
	box-sizing: border-box;
}

.lp-header-left, .lp-header-right {
	display: flex;
	align-items: center;
}

.lp-site-title a {
	font-family: var(--lp-font-headline);
	font-size: 24px;
	font-weight: 700;
	letter-spacing: -0.02em;
	color: var(--lp-color-primary) !important;
	text-decoration: none;
	text-transform: uppercase;
}

.lp-navigation {
	display: flex;
	align-items: center;
	margin-left: 40px;
}

.lp-navigation ul {
	display: flex;
	list-style: none;
	margin: 0;
	padding: 0;
	gap: 24px;
	align-items: center;
}

.lp-navigation li {
	position: relative;
}

.lp-navigation li a {
	color: var(--lp-color-on-surface-variant);
	font-family: var(--lp-font-body);
	font-weight: 600;
	font-size: 14px;
	letter-spacing: 0.05em;
	text-decoration: none;
	text-transform: uppercase;
	transition: color 0.15s ease;
	display: flex;
	align-items: center;
	gap: 4px;
}

.lp-navigation li a:hover {
	color: var(--lp-color-secondary);
}

/* Dropdown Menu styling */
.lp-nav-dropdown .lp-dropdown-menu {
	display: none;
	position: absolute;
	top: 100%;
	left: 0;
	background-color: var(--lp-color-surface-lowest);
	border: 1px solid var(--lp-color-outline-variant);
	list-style: none;
	padding: 8px 0;
	margin: 0;
	min-width: 180px;
	box-shadow: 0 4px 6px rgba(0,0,0,0.05);
	flex-direction: column;
	align-items: flex-start;
	gap: 0;
	z-index: 110;
}

.lp-nav-dropdown .lp-dropdown-menu li {
	width: 100%;
}

.lp-nav-dropdown .lp-dropdown-menu li a {
	display: block;
	padding: 8px 16px;
	font-weight: 600;
	font-size: 12px;
	width: 100%;
	box-sizing: border-box;
}

.lp-nav-dropdown .lp-dropdown-menu li a:hover {
	background-color: var(--lp-color-surface-container);
	color: var(--lp-color-secondary);
}

.lp-nav-dropdown:hover .lp-dropdown-menu {
	display: flex;
}

/* Search Box style */
.lp-search-box input[type="search"] {
	background-color: var(--lp-color-surface-lowest);
	border: 1px solid var(--lp-color-outline-variant);
	padding: 6px 12px;
	font-family: var(--lp-font-body);
	font-size: 14px;
	border-radius: 0px !important;
	outline: none;
	width: 250px;
}

.lp-search-box input[type="search"]:focus {
	border-color: var(--lp-color-primary);
}

/* Language Switcher */
.lp-language-switcher {
	display: flex;
	align-items: center;
	font-family: var(--lp-font-body);
	font-weight: 600;
	font-size: 12px;
	margin: 0 16px;
}

.lp-lang-btn {
	background: none;
	border: none;
	padding: 4px 6px;
	color: var(--lp-color-on-surface-variant);
	font-weight: 600;
}

.lp-lang-btn.active, .lp-lang-btn:hover {
	color: var(--lp-color-primary);
	text-decoration: underline;
}

.lp-lang-separator {
	color: var(--lp-color-outline-variant);
}

/* Profile button */
.lp-profile-btn {
	background: none;
	border: none;
	color: var(--lp-color-primary);
	display: flex;
	align-items: center;
	padding: 4px;
}

.lp-profile-btn span {
	font-size: 28px;
}

/* Main Layout Grid */
.lp-main-layout {
	max-width: 1280px;
	margin: 0 auto;
	display: flex;
	flex-wrap: nowrap;
	min-height: calc(100vh - 128px);
	width: 100%;
}

.lp-sidebar-container {
	width: 256px;
	flex-shrink: 0;
	border-right: 1px solid var(--lp-color-outline-variant);
	background-color: var(--lp-color-surface-container);
}

.lp-main-content {
	flex-grow: 1;
	padding: 24px;
	box-sizing: border-box;
	overflow: hidden;
}

.lp-content-columns {
	display: flex;
	gap: 24px;
	margin-bottom: 40px;
}

.lp-col-left {
	flex: 2;
}

.lp-col-right {
	flex: 1;
}

/* Sidebar panel */
.lp-sidebar {
	padding: 24px 16px;
	display: flex;
	flex-direction: column;
	gap: 32px;
}

.lp-sidebar-profile {
	display: flex;
	flex-direction: column;
	gap: 16px;
	border-bottom: 1px solid var(--lp-color-outline-variant);
	padding-bottom: 24px;
}

.lp-profile-flex {
	display: flex;
	align-items: center;
	gap: 12px;
}

.lp-profile-text {
	display: flex;
	flex-direction: column;
}

.lp-profile-image img {
	width: 40px;
	height: 40px;
	border-radius: 50%;
	object-fit: cover;
	border: 2px solid var(--lp-color-primary);
	display: block;
}

.lp-profile-name {
	margin: 0;
	font-size: 16px;
	font-weight: 600;
	color: var(--lp-color-on-background);
}

.lp-profile-subtitle {
	margin: 0;
	font-size: 12px;
	color: var(--lp-color-on-surface-variant);
}

.lp-sidebar-button {
	margin-top: 12px;
}

a.lp-btn-secondary {
	display: block;
	width: 100%;
	text-align: center;
	background-color: var(--lp-color-secondary);
	color: #ffffff !important;
	padding: 10px 16px;
	font-weight: 600;
	text-decoration: none;
	box-sizing: border-box;
}

a.lp-btn-secondary:hover {
	filter: brightness(1.1);
}

.lp-sidebar-nav ul {
	display: flex;
	flex-direction: column;
	list-style: none;
	padding: 0;
	margin: 0;
	gap: 4px;
}

.lp-sidebar-nav li a {
	display: flex;
	align-items: center;
	gap: 12px;
	padding: 12px 16px;
	font-weight: 600;
	color: var(--lp-color-on-surface-variant);
	text-decoration: none;
	text-transform: uppercase;
	font-size: 14px;
	transition: background-color 0.2s ease;
}

.lp-sidebar-nav li a:hover {
	background-color: var(--lp-color-outline-variant);
	color: var(--lp-color-primary);
}

.lp-sidebar-nav li.active a {
	background-color: var(--lp-color-secondary);
	color: #ffffff;
}

/* Footer styling */
.lp-footer {
	width: 100%;
	background-color: var(--lp-color-primary-container);
	color: #ffffff;
	padding: 40px 24px;
	display: flex;
	justify-content: space-between;
	align-items: center;
	box-sizing: border-box;
	border-top: 1px solid rgba(255,255,255,0.1);
}

.lp-footer-copyright {
	font-size: 12px;
	font-weight: 600;
	letter-spacing: 0.05em;
	margin: 0;
}

.lp-footer-navigation ul {
	display: flex;
	list-style: none;
	padding: 0;
	margin: 0;
	gap: 24px;
}

.lp-footer-navigation li a {
	color: rgba(255, 255, 255, 0.8) !important;
	font-size: 12px;
	text-decoration: none;
}

.lp-footer-navigation li a:hover {
	color: var(--lp-color-secondary) !important;
}

.lp-footer-socials {
	display: flex;
	gap: 16px;
	color: rgba(255, 255, 255, 0.6);
}

.lp-social-icon {
	cursor: pointer;
}

.lp-social-icon:hover {
	color: #ffffff;
}

/* ==========================================================================
   Block Patterns & Custom Components
   ========================================================================== */

/* News Hero Pattern */
.lp-news-hero {
	position: relative;
	height: 480px;
	margin-bottom: 40px;
	overflow: hidden;
	background-color: var(--lp-color-primary-container);
}

.lp-news-hero-bg {
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	object-fit: cover;
	opacity: 0.7;
	z-index: 1;
	transition: transform 0.5s ease;
}

.lp-news-hero:hover .lp-news-hero-bg {
	transform: scale(1.05);
}

.lp-news-hero-overlay {
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	background: linear-gradient(to top, rgba(19, 27, 46, 0.95) 0%, rgba(19, 27, 46, 0.4) 50%, rgba(19, 27, 46, 0.1) 100%);
	z-index: 2;
}

.lp-news-hero-content {
	position: absolute;
	bottom: 0;
	left: 0;
	width: 100%;
	padding: 40px;
	box-sizing: border-box;
	z-index: 3;
}

.lp-badge {
	display: inline-block;
	font-size: 12px;
	font-weight: 600;
	padding: 4px 8px;
	margin-bottom: 12px;
	text-transform: uppercase;
	background-color: var(--lp-color-secondary);
	color: #ffffff;
}

.lp-news-hero-title {
	font-family: var(--lp-font-headline);
	font-size: 48px;
	line-height: 1.1;
	margin: 0 0 16px 0;
	color: #ffffff;
	text-transform: uppercase;
}

.lp-news-hero-excerpt {
	color: rgba(255, 255, 255, 0.8);
	font-size: 18px;
	margin-bottom: 24px;
	max-width: 650px;
}

.lp-news-hero-buttons {
	display: flex;
	gap: 16px;
}

a.lp-btn-primary {
	background-color: #ffffff;
	color: var(--lp-color-primary) !important;
	padding: 12px 24px;
	font-weight: 600;
	text-decoration: none;
}

a.lp-btn-primary:hover {
	background-color: var(--lp-color-secondary);
	color: #ffffff !important;
}

a.lp-btn-outline {
	border: 1px solid #ffffff;
	color: #ffffff !important;
	padding: 12px 24px;
	font-weight: 600;
	text-decoration: none;
}

a.lp-btn-outline:hover {
	background-color: rgba(255, 255, 255, 0.1);
}

/* Scoreboard Pattern */
.lp-scoreboard-widget {
	border: 1px solid var(--lp-color-outline-variant);
	background-color: var(--lp-color-surface-lowest);
	display: flex;
	flex-direction: column;
}

.lp-scoreboard-header {
	background-color: var(--lp-color-surface-container);
	padding: 16px;
	border-bottom: 1px solid var(--lp-color-outline-variant);
	display: flex;
	justify-content: space-between;
	align-items: center;
}

.lp-scoreboard-title {
	margin: 0;
	font-size: 20px;
	font-family: var(--lp-font-headline);
}

.lp-scoreboard-live-badge {
	background-color: var(--lp-color-secondary);
	color: #ffffff;
	font-size: 10px;
	font-weight: 700;
	padding: 4px 8px;
	margin: 0;
}

.lp-scoreboard-list {
	display: flex;
	flex-direction: column;
}

.lp-score-item {
	padding: 16px;
	border-bottom: 1px solid var(--lp-color-outline-variant);
}

.lp-score-meta {
	display: flex;
	justify-content: space-between;
	color: var(--lp-color-on-surface-variant);
	margin-bottom: 8px;
	font-weight: 600;
	font-size: 12px;
}

.lp-live-dot {
	color: var(--lp-color-secondary);
	font-size: 14px !important;
}

.lp-schedule-icon {
	color: var(--lp-color-outline);
	font-size: 14px !important;
}

.lp-score-team {
	display: flex;
	justify-content: space-between;
	align-items: center;
	margin-bottom: 4px;
}

.lp-team-name {
	font-weight: 600;
	margin: 0;
}

.lp-team-score {
	font-family: var(--lp-font-headline);
	font-size: 20px;
	font-weight: 600;
	margin: 0;
}

.lp-scoreboard-footer {
	padding: 0;
}

.lp-scoreboard-footer a.lp-btn-primary {
	display: block;
	background-color: var(--lp-color-primary-container);
	color: #ffffff !important;
	text-align: center;
	padding: 12px;
	font-size: 12px;
	font-weight: 600;
}

.lp-scoreboard-footer a.lp-btn-primary:hover {
	background-color: var(--lp-color-primary);
}

/* Recent Analysis Pattern */
.lp-recent-analysis-section {
	margin-bottom: 40px;
}

.lp-section-header {
	border-bottom: 2px solid var(--lp-color-primary);
	padding-bottom: 8px;
	margin-bottom: 24px;
	display: flex;
	justify-content: space-between;
	align-items: flex-end;
}

.lp-section-title {
	margin: 0;
	font-size: 32px;
}

.lp-section-tabs {
	display: flex;
	gap: 16px;
}

.lp-tab-link {
	font-weight: 600;
	font-size: 14px;
	color: var(--lp-color-on-surface-variant);
	text-decoration: none;
}

.lp-tab-link.active, .lp-tab-link:hover {
	color: var(--lp-color-primary);
	text-decoration: underline;
}

.lp-cards-grid {
	display: flex;
	gap: 24px;
}

.lp-news-card {
	flex: 1;
	background-color: var(--lp-color-surface-lowest);
	border: 1px solid var(--lp-color-outline-variant);
	transition: border-color 0.3s ease;
	display: flex;
	flex-direction: column;
}

.lp-news-card:hover {
	border-color: var(--lp-color-primary);
}

.lp-card-image-wrapper {
	position: relative;
	height: 192px;
	overflow: hidden;
}

.lp-card-image {
	width: 100%;
	height: 100%;
	object-fit: cover;
	transition: transform 0.5s ease;
	display: block;
}

.lp-news-card:hover .lp-card-image {
	transform: scale(1.05);
}

.lp-card-badge {
	position: absolute;
	top: 8px;
	left: 8px;
	background-color: var(--lp-color-primary);
	color: #ffffff;
	font-size: 10px;
	font-weight: 700;
	padding: 4px 8px;
	text-transform: uppercase;
}

.lp-badge-secondary {
	background-color: var(--lp-color-secondary);
}

.lp-card-body {
	padding: 16px;
	display: flex;
	flex-direction: column;
	flex-grow: 1;
}

.lp-card-meta {
	font-size: 12px;
	color: var(--lp-color-on-surface-variant);
	margin: 0 0 8px 0;
}

.lp-card-title {
	font-family: var(--lp-font-headline);
	font-size: 20px;
	font-weight: 600;
	line-height: 1.2;
	margin: 0 0 12px 0;
	text-transform: uppercase;
	color: var(--lp-color-primary);
}

.lp-news-card:hover .lp-card-title {
	color: var(--lp-color-secondary);
}

.lp-card-excerpt {
	color: var(--lp-color-on-surface-variant);
	font-size: 14px;
	line-height: 1.5;
	margin-bottom: 24px;
	flex-grow: 1;
}

.lp-card-link {
	display: inline-flex;
	align-items: center;
	gap: 4px;
	font-weight: 600;
	font-size: 14px;
	color: var(--lp-color-primary);
	text-decoration: none;
}

.lp-card-link span {
	font-size: 16px;
}

/* Simulator Teaser */
.lp-simulator-teaser-section {
	display: flex;
	gap: 24px;
	margin-bottom: 40px;
}

.lp-teaser-main {
	flex: 2;
	background-color: var(--lp-color-primary-container);
	color: #ffffff;
	padding: 40px;
	position: relative;
	overflow: hidden;
	display: flex;
	align-items: center;
	box-sizing: border-box;
}

.lp-teaser-main::after {
	content: "";
	position: absolute;
	top: -50px;
	right: -50px;
	width: 200px;
	height: 200px;
	border: 20px solid var(--lp-color-secondary);
	transform: rotate(45deg);
	opacity: 0.2;
	pointer-events: none;
}

.lp-teaser-inner {
	position: relative;
	z-index: 2;
}

.lp-teaser-title {
	font-size: 40px;
	margin: 0 0 16px 0;
	color: #ffffff;
	font-family: var(--lp-font-headline);
}

.lp-teaser-desc {
	color: rgba(255, 255, 255, 0.7);
	font-size: 16px;
	margin-bottom: 24px;
	max-width: 500px;
}

.lp-teaser-buttons a.lp-btn-secondary {
	display: inline-block;
	width: auto;
}

.lp-teaser-stats {
	flex: 1;
	background-color: var(--lp-color-surface-container);
	border: 1px solid var(--lp-color-outline-variant);
	padding: 24px;
	display: flex;
	flex-direction: column;
	justify-content: space-between;
	box-sizing: border-box;
}

.lp-stats-label {
	font-weight: 600;
	color: var(--lp-color-primary);
	margin: 0 0 8px 0;
}

.lp-stats-value-row {
	display: flex;
	align-items: center;
	gap: 8px;
	margin-bottom: 16px;
}

.lp-stats-value {
	margin: 0;
	font-size: 48px;
	font-weight: 700;
	font-family: var(--lp-font-headline);
}

.lp-stats-trend {
	color: var(--lp-color-secondary);
	font-weight: 700;
	font-size: 14px;
}

.lp-stats-desc {
	margin: 0 0 24px 0;
	color: var(--lp-color-on-surface-variant);
}

.lp-server-load-container {
	display: flex;
	flex-direction: column;
	gap: 8px;
}

.lp-server-load-label-row {
	display: flex;
	justify-content: space-between;
	font-size: 12px;
	font-weight: 600;
}

.lp-progress-bar {
	background-color: var(--lp-color-outline-variant);
	height: 8px;
	width: 100%;
}

.lp-progress-fill {
	background-color: var(--lp-color-secondary);
	height: 100%;
}

/* Standings table pattern */
.lp-example-stats-widget {
	border: 1px solid var(--lp-color-outline-variant);
	background-color: var(--lp-color-surface-lowest);
	padding: 24px;
}

.lp-widget-title {
	margin: 0 0 16px 0;
	font-family: var(--lp-font-headline);
}

.lp-stats-table table {
	width: 100%;
	border-collapse: collapse;
	font-family: var(--lp-font-body);
}

.lp-stats-table th, .lp-stats-table td {
	padding: 12px 16px;
	text-align: left;
	border-bottom: 1px solid var(--lp-color-outline-variant);
}

.lp-stats-table th {
	font-family: var(--lp-font-headline);
	font-weight: 700;
	font-size: 14px;
	text-transform: uppercase;
	background-color: var(--lp-color-surface-container);
}

.lp-stats-table tbody tr:hover {
	background-color: var(--lp-color-bg);
}

/* Singular / Post Detail */
.lp-singular-content {
	max-width: 800px;
	margin: 0 auto;
}

.lp-post-title {
	font-size: 40px;
	margin-top: 0;
	font-family: var(--lp-font-headline);
}

.lp-post-meta {
	display: flex;
	gap: 8px;
	color: var(--lp-color-on-surface-variant);
	font-size: 14px;
	margin-bottom: 24px;
}

.lp-post-featured-image {
	margin-bottom: 32px;
}

.lp-post-entry-content p {
	font-size: 16px;
	line-height: 1.6;
	margin-bottom: 24px;
}

/* Pulse animation */
.animate-pulse {
	animation: lp-pulse 2s infinite;
}

@keyframes lp-pulse {
	0% { opacity: 1; }
	50% { opacity: 0.4; }
	100% { opacity: 1; }
}

/* Responsive adjustments */
@media (max-width: 1024px) {
	.lp-main-layout {
		flex-direction: column;
	}
	.lp-sidebar-container {
		width: 100%;
		border-right: none;
		border-bottom: 1px solid var(--lp-color-outline-variant);
	}
	.lp-content-columns {
		flex-direction: column;
	}
}

@media (max-width: 768px) {
	.lp-header {
		flex-direction: column;
		height: auto;
		padding: 16px;
		gap: 16px;
	}
	.lp-navigation {
		margin-left: 0;
	}
	.lp-cards-grid {
		flex-direction: column;
	}
	.lp-simulator-teaser-section {
		flex-direction: column;
	}
	.lp-news-hero-title {
		font-size: 32px;
	}
}
