/**
 * CustomBase Custom Styles
 *
 * This file contains custom CSS styling for the CustomBase theme.
 * It works alongside Tailwind CSS utility classes and uses CSS variables
 * from the Customizer API for brand colors and typography.
 *
 * @package CustomBase
 * @since 1.0.0
 */

/* ====================================
   CSS Variables from Customizer
   ==================================== */
:root {
	--wp-primary-color: #0066cc;
	--wp-accent-color: #ff6b6b;
	--wp-font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
	--wp-heading-color: #1a1a1a;
}

/* ====================================
   Global Styles
   ==================================== */

html {
	scroll-behavior: smooth;
}

body {
	font-family: var(--wp-font-family);
	color: #333;
	line-height: 1.6;
	-webkit-font-smoothing: antialiased;
	-moz-osx-font-smoothing: grayscale;
}

/* ====================================
   Typography
   ==================================== */

h1, h2, h3, h4, h5, h6 {
	color: var(--wp-heading-color);
	font-weight: 600;
	line-height: 1.2;
	margin-bottom: 1rem;
}

h1 {
	font-size: 2.25rem;
}

h2 {
	font-size: 1.875rem;
}

h3 {
	font-size: 1.5rem;
}

h4 {
	font-size: 1.25rem;
}

h5 {
	font-size: 1.125rem;
}

h6 {
	font-size: 1rem;
}

p {
	margin-bottom: 1rem;
}

a {
	color: var(--wp-primary-color);
	text-decoration: none;
	transition: color 0.3s ease;
}

a:hover {
	color: var(--wp-accent-color);
	text-decoration: underline;
}

/* ====================================
   Block Editor (Gutenberg) Styling
   ==================================== */

/* Button Block */
.wp-block-button__link {
	background-color: var(--wp-primary-color);
	color: white;
	padding: 0.75rem 1.5rem;
	border-radius: 0.375rem;
	transition: background-color 0.3s ease;
	display: inline-block;
	text-decoration: none;
}

.wp-block-button__link:hover {
	background-color: var(--wp-accent-color);
	color: white;
	text-decoration: none;
}

.wp-block-button__link.is-style-outline {
	background-color: transparent;
	color: var(--wp-primary-color);
	border: 2px solid var(--wp-primary-color);
}

.wp-block-button__link.is-style-outline:hover {
	background-color: var(--wp-primary-color);
	color: white;
}

/* Heading Block */
.wp-block-heading {
	color: var(--wp-heading-color);
}

/* Paragraph Block */
.wp-block-paragraph {
	margin-bottom: 1rem;
}

/* Image Block */
.wp-block-image {
	margin-bottom: 1.5rem;
}

.wp-block-image img {
	max-width: 100%;
	height: auto;
}

/* List Block */
.wp-block-list {
	margin-bottom: 1rem;
	padding-left: 2rem;
}

.wp-block-list li {
	margin-bottom: 0.5rem;
}

/* Quote Block */
.wp-block-quote {
	border-left: 4px solid var(--wp-primary-color);
	padding-left: 1.5rem;
	margin-left: 0;
	margin-bottom: 1.5rem;
	font-style: italic;
	color: #666;
}

.wp-block-quote cite {
	display: block;
	margin-top: 1rem;
	font-style: normal;
	color: #999;
}

/* Code Block */
.wp-block-code {
	background-color: #f5f5f5;
	border: 1px solid #ddd;
	border-radius: 0.375rem;
	padding: 1.5rem;
	overflow-x: auto;
	margin-bottom: 1.5rem;
}

.wp-block-code code {
	font-family: 'Courier New', monospace;
	font-size: 0.875rem;
	color: #333;
}

/* Separator Block */
.wp-block-separator {
	border: none;
	border-top: 2px solid #ddd;
	margin: 2rem 0;
}

/* Table Block */
.wp-block-table {
	margin-bottom: 1.5rem;
	overflow-x: auto;
}

.wp-block-table table {
	width: 100%;
	border-collapse: collapse;
}

.wp-block-table th {
	background-color: var(--wp-primary-color);
	color: white;
	padding: 0.75rem;
	text-align: left;
	font-weight: 600;
}

.wp-block-table td {
	border: 1px solid #ddd;
	padding: 0.75rem;
}

.wp-block-table tr:nth-child(even) {
	background-color: #f9f9f9;
}

/* Columns Block */
.wp-block-columns {
	margin-bottom: 1.5rem;
}

/* Cover Block */
.wp-block-cover {
	min-height: 300px;
	background-size: cover;
	background-position: center;
	display: flex;
	align-items: center;
	justify-content: center;
	margin-bottom: 1.5rem;
	border-radius: 0.375rem;
}

/* Gallery Block */
.wp-block-gallery {
	margin-bottom: 1.5rem;
}

/* Media & Text Block */
.wp-block-media-text {
	margin-bottom: 1.5rem;
}

/* ====================================
   Navigation Styles
   ==================================== */

.main-navigation ul {
	list-style: none;
}

.main-navigation a {
	display: block;
	padding: 0.5rem 1rem;
	text-decoration: none;
	transition: color 0.3s ease;
}

.main-navigation a:hover {
	color: var(--wp-accent-color);
}

/* ====================================
   Post Styles
   ==================================== */

.post-card {
	transition: all 0.3s ease;
}

.post-card:hover {
	box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
	transform: translateY(-4px);
}

.entry-title a {
	color: var(--wp-heading-color);
	text-decoration: none;
}

.entry-title a:hover {
	color: var(--wp-primary-color);
}

.entry-meta {
	font-size: 0.875rem;
	color: #999;
	margin-bottom: 1rem;
}

.entry-excerpt {
	color: #666;
	margin-bottom: 1rem;
}

/* ====================================
   Widget Styles
   ==================================== */

.widget {
	margin-bottom: 2rem;
	padding-bottom: 2rem;
	border-bottom: 1px solid #eee;
}

.widget-title {
	color: var(--wp-heading-color);
	font-size: 1.125rem;
	font-weight: 600;
	margin-bottom: 1rem;
	padding-bottom: 0.5rem;
	border-bottom: 2px solid var(--wp-primary-color);
}

.widget ul {
	list-style: none;
	padding: 0;
}

.widget ul li {
	margin-bottom: 0.5rem;
}

.widget ul li a {
	display: block;
	padding: 0.25rem 0;
	color: var(--wp-primary-color);
	text-decoration: none;
	transition: color 0.3s ease;
}

.widget ul li a:hover {
	color: var(--wp-accent-color);
	padding-left: 0.25rem;
}

/* ====================================
   Form Styles
   ==================================== */

input[type='text'],
input[type='email'],
input[type='url'],
input[type='password'],
input[type='search'],
input[type='number'],
input[type='tel'],
textarea,
select {
	width: 100%;
	max-width: 100%;
	padding: 0.75rem;
	margin-bottom: 1rem;
	border: 1px solid #ddd;
	border-radius: 0.375rem;
	font-family: var(--wp-font-family);
	font-size: 1rem;
	transition: border-color 0.3s ease;
}

input[type='text']:focus,
input[type='email']:focus,
input[type='url']:focus,
input[type='password']:focus,
input[type='search']:focus,
input[type='number']:focus,
input[type='tel']:focus,
textarea:focus,
select:focus {
	outline: none;
	border-color: var(--wp-primary-color);
	box-shadow: 0 0 0 3px rgba(0, 102, 204, 0.1);
}

label {
	display: block;
	margin-bottom: 0.5rem;
	font-weight: 500;
	color: var(--wp-heading-color);
}

/* ====================================
   Footer Styles
   ==================================== */

.site-footer {
	background-color: #1a1a1a;
	color: #fff;
	font-size: 0.875rem;
}

.site-footer a {
	color: #fff;
	text-decoration: none;
	transition: color 0.3s ease;
}

.site-footer a:hover {
	color: var(--wp-primary-color);
}

.site-footer .widget-title {
	color: white;
}

/* ====================================
   Responsive Design
   ==================================== */

@media (max-width: 768px) {
	h1 {
		font-size: 1.875rem;
	}

	h2 {
		font-size: 1.5rem;
	}

	h3 {
		font-size: 1.25rem;
	}

	.main-navigation {
		display: none;
	}

	.site-header .flex {
		flex-direction: column;
	}

	.post-card {
		margin-bottom: 1.5rem;
	}
}

/* ====================================
   Accessibility
   ==================================== */

.screen-reader-text {
	border: 0;
	clip: rect(1px, 1px, 1px, 1px);
	clip-path: inset(50%);
	height: 1px;
	margin: -1px;
	overflow: hidden;
	padding: 0;
	position: absolute;
	width: 1px;
	word-wrap: normal !important;
}

.skip-link {
	position: absolute;
	top: -9999px;
	z-index: 9999;
}

.skip-link:focus {
	top: 0;
	left: 0;
	background: var(--wp-primary-color);
	color: white;
	padding: 0.5rem 1rem;
	text-decoration: none;
	z-index: 9999;
}

/* ====================================
   Utility Classes
   ==================================== */

.container {
	width: 100%;
	margin: 0 auto;
	padding: 0 1rem;
}

@media (min-width: 640px) {
	.container {
		max-width: 640px;
	}
}

@media (min-width: 768px) {
	.container {
		max-width: 768px;
	}
}

@media (min-width: 1024px) {
	.container {
		max-width: 1024px;
	}
}

@media (min-width: 1280px) {
	.container {
		max-width: 1280px;
	}
}

/* Print Styles */
@media print {
	body {
		background-color: white;
	}

	a {
		text-decoration: underline;
	}

	.no-print {
		display: none;
	}
}
