/* 
Premium Startup Theme CSS for Home Battery Compare
*/

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&display=swap');

:root {
	--tb-shadow-sm: 0 2px 4px rgba(10, 17, 40, 0.04);
	--tb-shadow-md: 0 8px 16px rgba(10, 17, 40, 0.08);
	--tb-shadow-lg: 0 20px 40px rgba(10, 17, 40, 0.12);
	--tb-shadow-float: 0 30px 60px rgba(2, 132, 199, 0.15);
	
	--tb-radius-sm: 12px;
	--tb-radius: 20px;
	--tb-radius-lg: 32px;

	--tb-transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

body {
	font-family: 'Inter', system-ui, sans-serif;
	background-color: #f1f5f9;
	color: #0a1128;
	-webkit-font-smoothing: antialiased;
	word-break: normal;
	overflow-wrap: normal;
	hyphens: none;
}

h1, h2, h3, h4, h5, h6, .wp-block-heading {
	word-break: normal;
	overflow-wrap: normal;
	hyphens: none;
}

/* =========================================
   HEADER STYLING
   ========================================= */
.premium-header {
	position: sticky;
	top: 0;
	z-index: 1000;
	background: rgba(255, 255, 255, 0.85);
	backdrop-filter: blur(12px);
	-webkit-backdrop-filter: blur(12px);
	border-bottom: 1px solid rgba(255, 255, 255, 0.3);
	box-shadow: 0 4px 30px rgba(0, 0, 0, 0.03);
	transition: var(--tb-transition);
}

.premium-header .wp-block-navigation__container {
	gap: 2rem;
}

@media(min-width: 768px) {
	.premium-header {
		position: sticky;
		top: 0;
		z-index: 1000;
		background: rgba(255, 255, 255, 0.85);
		backdrop-filter: blur(12px);
		-webkit-backdrop-filter: blur(12px);
		border-bottom: 1px solid rgba(255, 255, 255, 0.3);
		box-shadow: 0 4px 30px rgba(0, 0, 0, 0.03);
		transition: var(--tb-transition);
		display: flex !important;
		justify-content: center !important;
		align-items: center !important;
		padding-top: 1.75rem !important;
		padding-bottom: 1.75rem !important;
	}

	.premium-header > div:first-child {
		position: absolute;
		left: var(--wp--preset--spacing--40);
	}

	.premium-header .wp-block-navigation {
		margin: 0 auto;
	}
}

.premium-header .wp-block-navigation-item__label {
	font-weight: 500;
	color: #475569;
	transition: var(--tb-transition);
}

.premium-header .wp-block-navigation-item:hover .wp-block-navigation-item__label,
.premium-header .wp-block-navigation-item.current-menu-item .wp-block-navigation-item__label,
.premium-header .wp-block-navigation-item.current-menu-ancestor .wp-block-navigation-item__label,
.premium-header .wp-block-navigation-item.current_page_item .wp-block-navigation-item__label {
	color: #fbbf24 !important;
}

/* =========================================
   HERO SECTIONS
   ========================================= */
.premium-hero-section {
	position: relative;
	background: linear-gradient(135deg, #0a1128 0%, #1e293b 100%);
	overflow: hidden;
	color: white;
	margin-bottom: 0 !important;
}

.premium-hero-section h1, .premium-hero-section h2, .premium-hero-section p {
	color: #ffffff; /* Ensure contrast */
}

/* Decorative background blur objects */
.premium-hero-section::before,
.premium-hero-section::after {
	content: '';
	position: absolute;
	border-radius: 50%;
	filter: blur(100px);
	z-index: 0;
	pointer-events: none;
}

.premium-hero-section::before {
	top: -20%;
	left: -10%;
	width: 50vw;
	height: 50vw;
	background: rgba(2, 132, 199, 0.3); /* Energy blue glow */
}

.premium-hero-section::after {
	bottom: -20%;
	right: -10%;
	width: 40vw;
	height: 40vw;
	background: rgba(16, 185, 129, 0.2); /* Soft green glow */
}

.premium-hero-section > * {
	position: relative;
	z-index: 1;
}

/* =========================================
   CARDS & CONTAINERS
   ========================================= */
.premium-card {
	background: #ffffff;
	border-radius: var(--tb-radius);
	padding: 2.5rem;
	box-shadow: var(--tb-shadow-sm);
	transition: var(--tb-transition);
	border: 1px solid rgba(0,0,0,0.03);
	position: relative;
	overflow: hidden;
	height: 100%;
	word-break: normal;
	overflow-wrap: normal;
	hyphens: none;
}

.premium-card:hover {
	transform: translateY(-8px);
	box-shadow: var(--tb-shadow-md);
	border-color: rgba(2, 132, 199, 0.15);
}

.glass-card {
	background: rgba(255, 255, 255, 0.05);
	backdrop-filter: blur(16px);
	-webkit-backdrop-filter: blur(16px);
	border: 1px solid rgba(255, 255, 255, 0.1);
	border-radius: var(--tb-radius);
	padding: 2rem;
	color: white;
}

.stat-badge {
	display: inline-flex;
	align-items: center;
	gap: 0.5rem;
	background: rgba(255, 255, 255, 0.1);
	border: 1px solid rgba(255, 255, 255, 0.2);
	color: #ffffff;
	padding: 0.6rem 1.2rem;
	border-radius: 100px;
	font-weight: 600;
	font-size: 0.85rem;
	margin: 0;
	white-space: nowrap;
	flex: 1 1 auto;
	justify-content: center;
	backdrop-filter: blur(4px);
}

.hero-badges-wrapper {
	display: flex;
	flex-wrap: wrap;
	gap: 1rem;
	width: 100%;
}

.brand-badge {
	position: absolute;
	top: 1.5rem;
	right: 1.5rem;
	background: var(--wp--preset--color--accent);
	color: var(--wp--preset--color--navy);
	font-size: 0.75rem;
	font-weight: 700;
	padding: 0.25rem 0.75rem;
	border-radius: 100px;
	text-transform: uppercase;
	letter-spacing: 0.5px;
}

/* =========================================
   COMPARISON TABLE SAAS STYLE
   ========================================= */
.premium-table {
	background: #fff;
	border-radius: var(--tb-radius);
	box-shadow: var(--tb-shadow-md);
	overflow: hidden;
	border: 1px solid rgba(0,0,0,0.05);
}

.premium-table table {
	border-collapse: collapse;
	width: 100%;
}

.premium-table th {
	background: #f8fafc;
	padding: 1.5rem;
	text-align: left;
	font-weight: 600;
	color: var(--wp--preset--color--navy);
	border-bottom: 2px solid #e2e8f0;
}

.premium-table td {
	padding: 1.5rem;
	border-bottom: 1px solid #f1f5f9;
	color: #475569;
}

.premium-table tr:last-child td {
	border-bottom: none;
}

.premium-table tr:hover td {
	background: #f8fafc;
}

/* =========================================
   BUTTONS
   ========================================= */
.wp-block-button__link {
	transition: var(--tb-transition) !important;
	box-shadow: var(--tb-shadow-sm);
}

.wp-block-button__link:hover {
	transform: translateY(-2px);
	box-shadow: var(--tb-shadow-md);
}

.is-style-outline .wp-block-button__link {
	background: transparent !important;
	backdrop-filter: blur(8px);
}

.is-style-outline .wp-block-button__link:hover {
	background: rgba(255,255,255,0.1) !important;
}

/* =========================================
   FORM STYLING
   ========================================= */
.tb-form-wrapper {
	background: #ffffff;
	padding: 3rem;
	border-radius: var(--tb-radius-lg);
	box-shadow: var(--tb-shadow-lg);
	border: 1px solid rgba(0,0,0,0.03);
}

.tb-form-group {
	margin-bottom: 1.5rem;
}

.tb-form-group label {
	display: block;
	margin-bottom: 0.5rem;
	font-weight: 600;
	color: var(--wp--preset--color--navy);
	font-size: 0.9rem;
}

.tb-form-control {
	width: 100%;
	padding: 1rem 1.25rem;
	border: 2px solid #e2e8f0;
	border-radius: var(--tb-radius-sm);
	background-color: #f8fafc;
	transition: var(--tb-transition);
	font-family: inherit;
	font-size: 1rem;
}

.tb-form-control:focus {
	outline: none;
	border-color: var(--wp--preset--color--blue);
	box-shadow: 0 0 0 4px rgba(2, 132, 199, 0.1);
	background-color: #ffffff;
}

.tb-submit-btn {
	display: inline-block;
	width: 100%;
	padding: 1.25rem 2rem;
	background-color: var(--wp--preset--color--accent);
	color: var(--wp--preset--color--navy);
	border: none;
	border-radius: var(--tb-radius-sm);
	font-size: 1.1rem;
	font-weight: 700;
	cursor: pointer;
	transition: var(--tb-transition);
	box-shadow: var(--tb-shadow-sm);
}

.tb-submit-btn:hover {
	transform: translateY(-2px);
	box-shadow: var(--tb-shadow-md);
	background-color: #f59e0b;
}

/* =========================================
   MINI HERO FORM
   ========================================= */
.tb-mini-form-wrapper {
	background: rgba(255, 255, 255, 0.05);
	backdrop-filter: blur(20px);
	-webkit-backdrop-filter: blur(20px);
	border: 1px solid rgba(255, 255, 255, 0.15);
	border-radius: var(--tb-radius);
	padding: 2rem;
	box-shadow: var(--tb-shadow-lg);
}

.tb-mini-group {
	margin-bottom: 1rem;
}

.tb-mini-control {
	width: 100%;
	padding: 1rem 1.25rem;
	border: 1px solid rgba(255, 255, 255, 0.2);
	border-radius: var(--tb-radius-sm);
	background-color: rgba(0, 0, 0, 0.2);
	color: white;
	font-family: inherit;
	font-size: 1rem;
	transition: var(--tb-transition);
}

.tb-mini-control::placeholder {
	color: rgba(255, 255, 255, 0.5);
}

.tb-mini-control:focus {
	outline: none;
	border-color: var(--wp--preset--color--accent);
	background-color: rgba(0, 0, 0, 0.4);
	box-shadow: 0 0 0 4px rgba(251, 191, 36, 0.15);
}

/* =========================================
   STEPS / HOW IT WORKS (Horizontal Timeline)
   ========================================= */
.timeline-steps {
	display: flex;
	flex-direction: column;
	gap: 2rem;
}

.step-item {
	display: flex;
	align-items: center;
	gap: 1.5rem;
	background: #fff;
	padding: 1.5rem;
	border-radius: var(--tb-radius);
	box-shadow: var(--tb-shadow-sm);
}

.step-number {
	width: 50px;
	height: 50px;
	flex-shrink: 0;
	background: linear-gradient(135deg, var(--wp--preset--color--blue), #0284c7);
	color: white;
	border-radius: 50%;
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 1.25rem;
	font-weight: 800;
	box-shadow: var(--tb-shadow-md);
}

@media(min-width: 768px) {
	.timeline-steps {
		flex-direction: row;
		align-items: flex-start;
		gap: 1.5rem;
	}
	.step-item {
		flex-direction: column;
		text-align: center;
		flex: 1;
		position: relative;
	}
	/* Add connecting lines between steps on desktop */
	.step-item:not(:last-child)::after {
		content: '';
		position: absolute;
		top: 40px; /* Align with center of step number */
		right: -50%;
		width: 100%;
		height: 2px;
		background: #cbd5e1;
		z-index: 0;
	}
	.step-number {
		margin: 0 auto;
		z-index: 1;
	}
}

/* =========================================
   FOOTER
   ========================================= */
.premium-footer {
	background-color: #0a1128;
	color: #94a3b8;
	border: none; /* Removed weird border */
	outline: none;
}

.premium-footer .wp-block-heading {
	color: white;
	font-size: 1.125rem;
	margin-bottom: 1.5rem;
}

.footer-link {
	color: #94a3b8;
	text-decoration: none;
	transition: var(--tb-transition);
}

.footer-link:hover {
	color: var(--wp--preset--color--accent);
}

/* Hide weird WordPress default separators if they leak */
.premium-footer hr {
	border-top: 1px solid #1e293b !important;
	border-bottom: none !important;
}

/* Premium Comparison Table */
.premium-compare-header {
	display: flex;
	justify-content: space-between;
	align-items: center;
	margin-bottom: 2rem;
	flex-wrap: wrap;
	gap: 1rem;
}

.premium-compare-btn {
	background: #fbbf24;
	color: #ffffff !important;
	padding: 0.8rem 1.5rem;
	border-radius: 8px;
	text-decoration: none;
	font-weight: 700;
	transition: background 0.3s;
}

.premium-compare-btn:hover {
	background: #f59e0b;
}

.premium-comparison-table {
	background: #ffffff;
	border-radius: 12px;
	box-shadow: 0 4px 20px rgba(0,0,0,0.05);
	overflow: hidden;
	border: 1px solid #f1f5f9;
}

.premium-comparison-table table {
	width: 100%;
	border-collapse: collapse;
}

.premium-comparison-table th, .premium-comparison-table td {
	padding: 1.5rem 1rem;
	text-align: left;
	border-bottom: 1px solid #f1f5f9;
}

.premium-comparison-table th {
	font-weight: 700;
	color: #0f172a;
	background: #ffffff;
}

.premium-comparison-table td {
	color: #475569;
	font-size: 0.95rem;
}

.premium-comparison-table tbody tr:last-child td {
	border-bottom: none;
}

.premium-comparison-table .compare-yes {
	color: #15803d;
	font-weight: 600;
}

.premium-comparison-table .compare-no {
	color: #ef4444;
	font-weight: 600;
}

.premium-comparison-table .compare-price {
	color: #fbbf24;
	font-weight: 700;
}

.premium-comparison-table .compare-link {
	color: #15803d;
	font-weight: 600;
	text-decoration: none;
}

.premium-comparison-table .compare-link:hover {
	text-decoration: underline;
}

/* Premium Mini Hero Form */
.tb-mini-form-wrapper {
	background: #ffffff;
	padding: 2.5rem;
	border-radius: 16px;
	box-shadow: 0 20px 50px rgba(0,0,0,0.25);
	position: relative;
	z-index: 10;
}

.tb-mini-heading {
	color: #0f172a;
	font-size: 1.75rem;
	font-weight: 800;
	margin-top: 0;
	margin-bottom: 0.5rem;
}

.tb-mini-subheading {
	color: #334155 !important;
	font-size: 1rem;
	margin-bottom: 2rem;
}

.tb-mini-form {
	display: flex;
	flex-direction: column;
	gap: 1.2rem;
}

.tb-mini-control {
	width: 100%;
	box-sizing: border-box;
	padding: 1.2rem;
	border: 2px solid #e2e8f0;
	border-radius: 8px;
	font-size: 1.1rem;
	color: #0f172a;
	background: #f8fafc;
	transition: all 0.3s;
}

.tb-mini-control:focus {
	outline: none;
	border-color: #fbbf24;
	background: #ffffff;
	box-shadow: 0 0 0 4px rgba(132, 204, 22, 0.1);
}

.tb-mini-form .tb-submit-btn {
	width: 100%;
	box-sizing: border-box;
	padding: 1.2rem;
	background: #fbbf24;
	color: #ffffff;
	border: none;
	border-radius: 8px;
	font-size: 1.2rem;
	font-weight: 800;
	cursor: pointer;
	transition: all 0.3s;
}

.tb-mini-form .tb-submit-btn:hover {
	background: #f59e0b;
	transform: translateY(-2px);
	box-shadow: 0 10px 20px rgba(132, 204, 22, 0.2);
}

/* Fix placeholder color for mini form */
.tb-mini-control::placeholder {
	color: #64748b !important;
	opacity: 1 !important;
}

/* Force removal of WordPress default block gaps */
body .is-layout-flow > .premium-hero-section,
body .is-layout-constrained > .premium-hero-section {
    margin-block-start: 0 !important;
    margin-top: 0 !important;
    margin-bottom: 0 !important;
    margin-block-end: 0 !important;
}

body .is-layout-flow > .premium-hero-section + .alignfull,
body .is-layout-constrained > .premium-hero-section + .alignfull {
    margin-block-start: 0 !important;
    margin-top: 0 !important;
}

/* Ensure the very first element in main has no top margin */
main > *:first-child,
.wp-site-blocks > *:first-child {
    margin-block-start: 0 !important;
    margin-top: 0 !important;
}

/* Absolute removal of header-to-hero spacing */
.wp-site-blocks > header,
.wp-site-blocks > main {
    margin-bottom: 0 !important;
    padding-bottom: 0 !important;
    margin-top: 0 !important;
    padding-top: 0 !important;
}

/* Ensure the last element in main has no bottom margin */
main > *:last-child,
.wp-site-blocks > *:last-child {
    margin-block-end: 0 !important;
    margin-bottom: 0 !important;
}

/* Also nuke any gap applied to the site wrapper */
.wp-site-blocks {
    gap: 0 !important;
}

/* Remove gap before footer */
footer, .wp-block-template-part {
    margin-top: 0 !important;
}

header {
    margin-bottom: 0 !important;
}

/* Force hide the Request a quote button in the header */
.premium-header .wp-block-buttons {
    display: none !important;
}

/* Fix alignment of Trusted Brands columns */
.wp-block-group.alignwide > .wp-block-columns {
    margin-left: auto !important;
    margin-right: auto !important;
    justify-content: center !important;
    display: flex;
    flex-wrap: wrap;
    gap: 2rem;
}

.wp-block-group.alignwide > .wp-block-columns > .wp-block-column {
    flex-grow: 0 !important;
    flex-basis: auto !important;
    min-width: 200px;
}

/* Perfect Vertical Spacing Balance for Brands Section */
.premium-brands-section {
    padding-top: 5rem !important;
    padding-bottom: 0 !important;
}

.premium-brands-section p {
    margin-bottom: 0 !important;
}

.wp-block-group.alignfull:has(.tb-calc-container) {
    padding-top: 2rem !important;
    margin-top: 0 !important;
}

/* Forcefully destroy the "How it works" section everywhere */
.timeline-steps {
    display: none !important;
}
h2:has(+ .timeline-steps) {
    display: none !important;
}
.wp-block-group:has(> .timeline-steps) {
    display: none !important;
    margin: 0 !important;
    padding: 0 !important;
}
