/*
Theme Name: Casino Portal
Theme URI: https://example.com/casino-portal
Author: Placeholder
Author URI: https://example.com
Description: A portal-style block theme for multi-vertical casino, poker and sports comparison sites. Two-column homepage with toplists, twin news feeds and a sidebar; category archives with filters, card grids and below-the-fold editorial. Designed to be used with the Casino Guides & Comparison plugin, which supplies the operator, game and guide records. All copy and imagery are placeholders.
Requires at least: 6.6
Tested up to: 6.9
Requires PHP: 7.4
Version: 1.4.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: casino-portal
Tags: full-site-editing, block-patterns, two-columns, right-sidebar, wide-blocks, custom-colors, custom-logo, custom-menu, editor-style, block-styles
*/

/* Structural CSS only. Colour, type and spacing live in theme.json. */

/* --- Ambient depth --- */
body {
	background-image:
		radial-gradient(900px 500px at 82% -6%, rgba(124, 58, 237, 0.26), transparent 60%),
		radial-gradient(700px 420px at 6% 30%, rgba(192, 38, 211, 0.13), transparent 58%);
	background-attachment: fixed;
	background-repeat: no-repeat;
}

/* --- Header ---------------------------------------------------------------

   One row, not two. The logo, navigation and tools share a single line, which
   roughly halves the header height and stops the nav row from looking like an
   empty shelf. --------------------------------------------------------------- */

.site-header {
	position: sticky;
	top: 0;
	z-index: 100;
	backdrop-filter: blur(14px);
	background: linear-gradient(180deg,
		color-mix(in srgb, var(--wp--preset--color--surface) 96%, transparent),
		color-mix(in srgb, var(--wp--preset--color--base) 94%, transparent));
}

.header-bar {
	gap: var(--wp--preset--spacing--30);
	flex-wrap: nowrap;
}

/* Cap the logo. Uploaded logos are often 2–3x the intended size and a tall one
   drags the whole header down with it. */
.site-header .wp-block-site-logo {
	flex: none;
}

.site-header .wp-block-site-logo img {
	max-height: 40px;
	width: auto;
	border-radius: 6px;
	display: block;
}

/* The nav takes the free space; tools sit hard right. */
.site-header .main-nav {
	flex: 1 1 auto;
	min-width: 0;
}

.header-tools {
	flex: none;
	gap: var(--wp--preset--spacing--20);
	margin-left: auto;
}

/* Navigation ---------------------------------------------------------------- */

.main-nav .wp-block-navigation-item__content {
	position: relative;
	padding: 0.55rem 0.85rem;
	font-weight: 700;
	font-size: 0.85rem;
	border-radius: 8px;
	text-decoration: none;
	transition: background 0.15s ease, color 0.15s ease;
}

.main-nav .wp-block-navigation-item__content:hover {
	background: rgba(255, 255, 255, 0.07);
	color: var(--wp--preset--color--accent);
}

.main-nav .current-menu-item > .wp-block-navigation-item__content {
	color: var(--wp--preset--color--accent);
}

/* Gradient underline on the active item — the one flourish that makes the bar
   read as designed rather than default. */
.main-nav .current-menu-item > .wp-block-navigation-item__content::after {
	content: "";
	position: absolute;
	left: 0.85rem;
	right: 0.85rem;
	bottom: 0.15rem;
	height: 2px;
	border-radius: 2px;
	background: linear-gradient(90deg, var(--wp--preset--color--accent), #C026D3);
}

/* Search --------------------------------------------------------------------
   Compact pill, no submit button. A full-size gold button in the header
   competes with the actual call to action. */

.header-tools .wp-block-search__inside-wrapper {
	border: 1px solid var(--wp--preset--color--hairline);
	background: rgba(255, 255, 255, 0.06);
	border-radius: var(--wp--custom--radius--pill);
	padding: 0.15rem 0.5rem;
}

.header-tools .wp-block-search__input {
	background: none;
	border: 0;
	color: var(--wp--preset--color--contrast);
	font-size: 0.82rem;
	padding: 0.35rem 0.4rem;
}

.header-tools .wp-block-search__input::placeholder {
	color: var(--wp--preset--color--muted);
}

.header-tools .wp-block-search__input:focus {
	outline: none;
}

.header-tools .wp-block-search__inside-wrapper:focus-within {
	border-color: var(--wp--preset--color--accent);
}

.header-cta .wp-block-button__link {
	white-space: nowrap;
	font-size: 0.82rem;
	padding: 0.5rem 1.1rem;
	box-shadow: 0 2px 0 rgba(170, 105, 0, 0.45);
}

@media (max-width: 1100px) {
	.header-tools .wp-block-search { display: none; }
}

@media (max-width: 900px) {
	.header-bar { flex-wrap: wrap; }
	.header-tools { margin-left: auto; }
}

/* --- Panels: the portal's basic container --- */
.panel {
	background: var(--wp--preset--gradient--card);
	border: 1px solid var(--wp--preset--color--hairline);
	border-radius: var(--wp--custom--radius--medium);
	box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05), 0 10px 26px rgba(0, 0, 0, 0.4);
	overflow: hidden;
}

.panel__head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 1rem;
	padding: 0.9rem var(--wp--preset--spacing--30);
	border-bottom: 1px solid var(--wp--preset--color--hairline);
}

.panel__head h2,
.panel__head h3 {
	margin: 0;
	font-size: 1.05rem;
}

.panel__head a {
	font-size: 0.8rem;
	font-weight: 700;
	white-space: nowrap;
}

.panel__body { padding: var(--wp--preset--spacing--30); }
.panel__body.is-flush { padding: 0; }

/* --- Sidebar column --- */
@media (min-width: 900px) {
	.portal-grid > .wp-block-column:last-child { max-width: 330px; }
}

.side-links { list-style: none; margin: 0; padding: 0; }
.side-links li { border-bottom: 1px solid var(--wp--preset--color--hairline); }
.side-links li:last-child { border-bottom: 0; }

.side-links a {
	display: block;
	padding: 0.55rem var(--wp--preset--spacing--30);
	font-size: 0.88rem;
	font-weight: 600;
	color: var(--wp--preset--color--contrast);
	text-decoration: none;
}

.side-links a:hover {
	background: rgba(255, 255, 255, 0.04);
	color: var(--wp--preset--color--accent);
}

/* --- News feed (core Query Loop, restyled) --- */
.news-feed .wp-block-post {
	padding: 0.8rem var(--wp--preset--spacing--30);
	border-bottom: 1px solid var(--wp--preset--color--hairline);
}

.news-feed .wp-block-post:last-child { border-bottom: 0; }
.news-feed .wp-block-post-title { font-size: 0.92rem; margin: 0.15rem 0 0.2rem; }
.news-feed .wp-block-post-title a { text-decoration: none; }
.news-feed .wp-block-post-date { font-size: 0.72rem; }
.news-feed .wp-block-post-excerpt { margin: 0; font-size: 0.82rem; }
.news-feed .wp-block-post-excerpt__more-text { display: none; }

/* --- Archive cards --- */
.card-grid .wp-block-post {
	border: 1px solid var(--wp--preset--color--hairline);
	border-radius: var(--wp--custom--radius--medium);
    background: var(--wp--preset--gradient--card);
	overflow: hidden;
	box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05), 0 10px 26px rgba(0, 0, 0, 0.4);
	transition: transform 0.16s ease;
}

.card-grid .wp-block-post:hover { transform: translateY(-3px); }
.card-grid .wp-block-post-featured-image { margin: 0; }

.card-grid .wp-block-post-featured-image img {
	width: 100%;
	aspect-ratio: 16 / 9;
	object-fit: cover;
	display: block;
}

.card-grid .wp-block-post-title {
	font-size: 1rem;
	margin: 0.3rem var(--wp--preset--spacing--20) 0.3rem;
}

.card-grid .wp-block-post-title a { text-decoration: none; }

.card-grid .wp-block-post-excerpt {
	margin: 0 var(--wp--preset--spacing--20) var(--wp--preset--spacing--20);
	font-size: 0.84rem;
}

.card-grid .taxonomy-guide_type,
.card-grid .taxonomy-vertical {
	margin: var(--wp--preset--spacing--20) var(--wp--preset--spacing--20) 0;
	font-size: 0.7rem;
	text-transform: uppercase;
	letter-spacing: 0.1em;
	font-weight: 700;
}

/* --- Filter pills --- */
.filter-pills a {
	display: inline-block;
	padding: 0.4rem 0.85rem;
	border: 1px solid var(--wp--preset--color--hairline);
	border-radius: var(--wp--custom--radius--pill);
	font-size: 0.8rem;
	font-weight: 600;
	color: var(--wp--preset--color--muted);
	text-decoration: none;
}

.filter-pills a:hover,
.filter-pills a[aria-current] {
	color: var(--wp--preset--color--accent);
	border-color: var(--wp--preset--color--accent);
}

/* --- Breadcrumbs --- */
.crumbs { font-size: 0.78rem; color: var(--wp--preset--color--muted); }
.crumbs a { color: var(--wp--preset--color--muted); }

/* --- Tables --- */
.wp-block-table { overflow-x: auto; }
.wp-block-table table { border-collapse: collapse; width: 100%; }

.wp-block-table th,
.wp-block-table td {
	border: 1px solid var(--wp--preset--color--hairline);
	padding: 0.7rem 0.9rem;
	text-align: left;
}

.wp-block-table thead th { background: rgba(124, 58, 237, 0.22); }

/* --- FAQ --- */
.wp-block-details {
	background: var(--wp--preset--color--surface);
	border: 1px solid var(--wp--preset--color--hairline);
	border-radius: var(--wp--custom--radius--medium);
	margin-bottom: 0.7rem;
}

.wp-block-details summary {
	cursor: pointer;
	font-weight: 700;
	list-style: none;
	display: flex;
	justify-content: space-between;
	align-items: center;
	gap: 1rem;
	padding: 1rem var(--wp--preset--spacing--30);
}

.wp-block-details summary::-webkit-details-marker { display: none; }

.wp-block-details summary::after {
	content: "+";
	font-size: 1.4em;
	line-height: 1;
	color: var(--wp--preset--color--accent);
	transition: transform 0.2s ease;
	flex: none;
}

.wp-block-details[open] summary::after { transform: rotate(45deg); }
.wp-block-details > *:not(summary) { padding-inline: var(--wp--preset--spacing--30); }
.wp-block-details > *:last-child { padding-bottom: var(--wp--preset--spacing--30); }

/* --- Footer --- */
.site-footer { background: color-mix(in srgb, var(--wp--preset--color--base) 60%, transparent); }
.site-footer .wp-block-list a { text-decoration: none; }

.badge-strip img { max-height: 26px; width: auto; opacity: 0.75; }

/* --- Quality floor --- */
:where(a:focus-visible),
:where(button:focus-visible),
:where(summary:focus-visible) {
	outline: 2px solid var(--wp--preset--color--accent);
	outline-offset: 3px;
}

@media (prefers-reduced-motion: reduce) {
	*, *::before, *::after {
		animation-duration: 0.01ms !important;
		transition-duration: 0.01ms !important;
		scroll-behavior: auto !important;
	}
}
