/*
Theme Name: Security2You
Theme URI: https://security2you-dke7g5bya5cwgge8.brazilsouth-01.azurewebsites.net/
Author: Gisele Lima
Description: Tema dark para o blog Security2You. Layout de revista tech com grid de cards, sidebar de widgets e paleta azul-marinho.
Version: 1.1.0
Requires at least: 5.9
Tested up to: 6.7
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: security2you
Tags: blog, dark, two-columns, right-sidebar, custom-logo, custom-menu, featured-images, threaded-comments
*/

:root {
	--s2y-darkest: #2D3446;
	--s2y-dark: #434E6C;
	--s2y-mid: #6F80AA;
	--s2y-light: #A6ADBD;
	--s2y-white: #FFFFFF;
	--s2y-bg: #242A3A;
	--s2y-card: #2D3446;
	--s2y-card-hover: #38415A;
	--s2y-border: #434E6C;
	--s2y-radius: 10px;
	--s2y-font: 'Exo 2', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

/* ---------- Reset básico ---------- */
* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
	font-family: var(--s2y-font);
	background: var(--s2y-bg);
	color: var(--s2y-light);
	font-size: 17px;
	line-height: 1.7;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--s2y-mid); text-decoration: none; transition: color .2s; }
a:hover { color: var(--s2y-white); }
h1, h2, h3, h4, h5, h6 { color: var(--s2y-white); line-height: 1.3; font-weight: 700; }

.s2y-container { max-width: 1180px; margin: 0 auto; padding: 0 20px; }
.screen-reader-text {
	position: absolute; width: 1px; height: 1px;
	overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap;
}

/* ---------- Topbar ---------- */
.s2y-topbar { background: #1E2430; border-bottom: 1px solid var(--s2y-border); }
.s2y-topbar-inner {
	display: flex; justify-content: space-between; align-items: center;
	min-height: 40px; font-size: 13px;
}
.s2y-topbar a { color: var(--s2y-light); margin-left: 14px; }
.s2y-topbar a:hover { color: var(--s2y-white); }
.s2y-topbar .s2y-tagline { color: var(--s2y-mid); letter-spacing: .5px; text-transform: uppercase; font-size: 12px; }

/* ---------- Header / Logo ---------- */
.s2y-header { background: var(--s2y-darkest); padding: 34px 0; text-align: center; }
.s2y-logo { line-height: 0; }
.s2y-logo a { display: inline-block; }
.s2y-logo img { max-height: 74px; width: auto; margin: 0 auto; }
.site-description { color: var(--s2y-mid); font-size: 14px; margin-top: 12px; letter-spacing: 1px; }
.custom-logo-link img { max-height: 90px; width: auto; margin: 0 auto; }

/* ---------- Navegação ---------- */
.s2y-navbar {
	background: var(--s2y-dark);
	position: sticky; top: 0; z-index: 100;
	box-shadow: 0 2px 12px rgba(0,0,0,.35);
}
.s2y-navbar-inner { display: flex; align-items: center; justify-content: space-between; }
.s2y-nav ul { list-style: none; display: flex; flex-wrap: wrap; }
.s2y-nav li { position: relative; }
.s2y-nav a {
	display: block; padding: 15px 18px;
	color: var(--s2y-white); font-weight: 600;
	font-size: 14px; text-transform: uppercase; letter-spacing: 1px;
}
.s2y-nav a:hover { background: var(--s2y-mid); color: var(--s2y-white); }
.s2y-nav .sub-menu {
	display: none; position: absolute; top: 100%; left: 0;
	background: var(--s2y-dark); min-width: 220px;
	box-shadow: 0 8px 20px rgba(0,0,0,.4);
}
.s2y-nav li:hover > .sub-menu { display: block; }
.s2y-nav .sub-menu a { text-transform: none; letter-spacing: 0; }
.s2y-menu-toggle {
	display: none; background: none; border: 0;
	color: var(--s2y-white); font-size: 26px; padding: 10px 16px; cursor: pointer;
}

/* Busca no navbar */
.s2y-nav-search { padding: 8px 0; }
.s2y-nav-search .search-form { display: flex; }
.s2y-nav-search .search-field {
	background: var(--s2y-darkest); border: 1px solid var(--s2y-mid);
	border-radius: 4px 0 0 4px; color: var(--s2y-white);
	padding: 7px 12px; font-family: var(--s2y-font); font-size: 14px; width: 180px;
}
.s2y-nav-search .search-field::placeholder { color: var(--s2y-light); }
.s2y-nav-search .search-submit {
	background: var(--s2y-mid); border: 0; color: var(--s2y-white);
	padding: 7px 14px; border-radius: 0 4px 4px 0; cursor: pointer; font-weight: 700;
}
.s2y-nav-search .search-submit:hover { background: var(--s2y-light); color: var(--s2y-darkest); }

/* ---------- Layout principal ---------- */
/* flexbox em vez de grid: mais robusto contra minificação/CDN */
.s2y-container.s2y-main {
	display: flex; flex-wrap: wrap; align-items: flex-start;
	gap: 34px; padding: 44px 0 60px;
}
.s2y-main > .s2y-content { flex: 1 1 0; min-width: 0; }
.s2y-main > .s2y-sidebar { flex: 0 0 320px; max-width: 320px; }
.s2y-section-title {
	font-size: 20px; text-transform: uppercase; letter-spacing: 1.5px;
	border-left: 4px solid var(--s2y-mid); padding-left: 12px; margin-bottom: 26px;
}

/* ---------- Grid de cards ---------- */
.s2y-grid { display: flex; flex-wrap: wrap; gap: 26px; }
.s2y-grid > .s2y-card { flex: 1 1 calc(50% - 13px); min-width: 0; }
.s2y-grid > .s2y-card--featured { flex-basis: 100%; }
.s2y-card {
	background: var(--s2y-card); border-radius: var(--s2y-radius);
	overflow: hidden; border: 1px solid var(--s2y-border);
	transition: transform .2s, background .2s, box-shadow .2s;
	display: flex; flex-direction: column;
}
.s2y-card:hover {
	transform: translateY(-4px); background: var(--s2y-card-hover);
	box-shadow: 0 10px 26px rgba(0,0,0,.4);
}
.s2y-card-thumb { position: relative; aspect-ratio: 16/9; overflow: hidden; background: var(--s2y-dark); }
.s2y-card-thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform .35s; }
.s2y-card:hover .s2y-card-thumb img { transform: scale(1.06); }
.s2y-card-cat {
	position: absolute; top: 12px; left: 12px;
	background: var(--s2y-mid); color: var(--s2y-white);
	font-size: 11px; font-weight: 700; text-transform: uppercase;
	letter-spacing: 1px; padding: 4px 10px; border-radius: 3px;
}
.s2y-card-body { padding: 20px 22px 22px; display: flex; flex-direction: column; flex: 1; }
.s2y-card-title { font-size: 18px; margin-bottom: 10px; }
.s2y-card-title a { color: var(--s2y-white); }
.s2y-card-title a:hover { color: var(--s2y-mid); }
.s2y-card-excerpt { font-size: 14.5px; color: var(--s2y-light); flex: 1; }
.s2y-card-meta {
	margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--s2y-border);
	font-size: 12.5px; color: var(--s2y-mid);
	display: flex; gap: 14px; flex-wrap: wrap;
}
.s2y-card-meta a { color: var(--s2y-mid); }

/* Card destaque (primeiro post da home) */
.s2y-card--featured { grid-column: 1 / -1; }
.s2y-card--featured .s2y-card-title { font-size: 26px; }

/* ---------- Paginação ---------- */
.s2y-pagination { margin-top: 40px; text-align: center; }
.s2y-pagination .nav-links { display: inline-flex; gap: 8px; flex-wrap: wrap; justify-content: center; }
.s2y-pagination .page-numbers {
	display: inline-block; padding: 9px 16px;
	background: var(--s2y-card); color: var(--s2y-white);
	border: 1px solid var(--s2y-border); border-radius: 5px; font-weight: 600;
}
.s2y-pagination .page-numbers.current,
.s2y-pagination .page-numbers:hover { background: var(--s2y-mid); border-color: var(--s2y-mid); }

/* ---------- Sidebar ---------- */
.s2y-sidebar .widget {
	background: var(--s2y-card); border: 1px solid var(--s2y-border);
	border-radius: var(--s2y-radius); padding: 22px; margin-bottom: 26px;
}
.s2y-sidebar .widget-title, .s2y-sidebar .wp-block-heading {
	font-size: 15px; text-transform: uppercase; letter-spacing: 1.5px;
	padding-bottom: 12px; margin-bottom: 16px;
	border-bottom: 2px solid var(--s2y-mid);
}
.s2y-sidebar ul { list-style: none; }
.s2y-sidebar li { padding: 8px 0; border-bottom: 1px solid rgba(111,128,170,.2); font-size: 14.5px; }
.s2y-sidebar li:last-child { border-bottom: 0; }
.s2y-sidebar a { color: var(--s2y-light); }
.s2y-sidebar a:hover { color: var(--s2y-white); }
.widget .tag-cloud-link, .wp-block-tag-cloud a {
	display: inline-block; background: var(--s2y-dark);
	color: var(--s2y-light) !important; font-size: 12px !important;
	padding: 4px 11px; border-radius: 20px; margin: 0 5px 8px 0;
}
.widget .tag-cloud-link:hover, .wp-block-tag-cloud a:hover { background: var(--s2y-mid); color: var(--s2y-white) !important; }

/* ---------- Post single / página ---------- */
.s2y-article {
	background: var(--s2y-card); border: 1px solid var(--s2y-border);
	border-radius: var(--s2y-radius); padding: 36px; overflow: hidden;
}
.s2y-article .entry-title { font-size: clamp(24px, 4vw, 34px); margin-bottom: 14px; }
.s2y-entry-meta { font-size: 13.5px; color: var(--s2y-mid); margin-bottom: 24px; display: flex; gap: 16px; flex-wrap: wrap; }
.s2y-article .post-thumbnail img { border-radius: 8px; margin-bottom: 26px; width: 100%; }
.entry-content { color: #D7DAE3; }
.entry-content > * + * { margin-top: 1.2em; }
.entry-content h2, .entry-content h3 { margin-top: 1.6em; }
.entry-content ul, .entry-content ol { padding-left: 1.4em; }
.entry-content blockquote {
	border-left: 4px solid var(--s2y-mid); background: var(--s2y-bg);
	padding: 16px 20px; border-radius: 0 8px 8px 0; font-style: italic;
}
.entry-content code {
	background: #1E2430; padding: 2px 7px; border-radius: 4px;
	font-size: .9em; color: var(--s2y-light);
}
.entry-content pre {
	background: #1E2430; border: 1px solid var(--s2y-border);
	padding: 18px; border-radius: 8px; overflow-x: auto;
}
.entry-content pre code { background: none; padding: 0; }
.entry-content a { text-decoration: underline; }
.entry-content img { border-radius: 8px; }
.s2y-entry-tags { margin-top: 30px; }
.s2y-entry-tags a {
	display: inline-block; background: var(--s2y-dark); color: var(--s2y-light);
	font-size: 12px; padding: 5px 12px; border-radius: 20px; margin: 0 6px 8px 0;
}
.s2y-entry-tags a:hover { background: var(--s2y-mid); color: var(--s2y-white); }

/* Navegação entre posts */
.s2y-post-nav {
	display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-top: 26px;
}
.s2y-post-nav a {
	background: var(--s2y-card); border: 1px solid var(--s2y-border);
	border-radius: 8px; padding: 16px 18px; font-size: 14px; color: var(--s2y-light);
	display: block;
}
.s2y-post-nav a:hover { border-color: var(--s2y-mid); color: var(--s2y-white); }
.s2y-post-nav span { display: block; font-size: 11px; text-transform: uppercase; letter-spacing: 1px; color: var(--s2y-mid); margin-bottom: 4px; }

/* ---------- Comentários ---------- */
.s2y-comments { margin-top: 30px; background: var(--s2y-card); border: 1px solid var(--s2y-border); border-radius: var(--s2y-radius); padding: 30px; }
.s2y-comments ol { list-style: none; }
.s2y-comments .comment { padding: 16px 0; border-bottom: 1px solid rgba(111,128,170,.2); }
.comment-form input[type="text"], .comment-form input[type="email"],
.comment-form input[type="url"], .comment-form textarea {
	width: 100%; background: var(--s2y-bg); border: 1px solid var(--s2y-border);
	border-radius: 6px; color: var(--s2y-white); padding: 10px 14px;
	font-family: var(--s2y-font); margin-top: 6px;
}
.comment-form .submit, .wp-block-search__button {
	background: var(--s2y-mid); color: var(--s2y-white); border: 0;
	padding: 11px 26px; border-radius: 6px; font-weight: 700; cursor: pointer;
	font-family: var(--s2y-font); text-transform: uppercase; letter-spacing: 1px;
}
.comment-form .submit:hover { background: var(--s2y-light); color: var(--s2y-darkest); }

/* ---------- Footer ---------- */
.s2y-footer { background: #1E2430; border-top: 3px solid var(--s2y-mid); margin-top: 20px; }
.s2y-footer-widgets {
	display: grid; grid-template-columns: repeat(3, 1fr);
	gap: 34px; padding: 44px 0;
}
.s2y-footer .widget-title { font-size: 14px; text-transform: uppercase; letter-spacing: 1.5px; margin-bottom: 14px; border-bottom: 2px solid var(--s2y-mid); padding-bottom: 10px; display: inline-block; }
.s2y-footer ul { list-style: none; }
.s2y-footer li { padding: 5px 0; font-size: 14px; }
.s2y-footer-bottom {
	border-top: 1px solid var(--s2y-border); padding: 18px 0;
	text-align: center; font-size: 13px; color: var(--s2y-mid);
}
.s2y-footer-bottom a { color: var(--s2y-light); }

/* ---------- Responsivo ---------- */
@media (max-width: 980px) {
	.s2y-main > .s2y-sidebar { flex: 1 1 100%; max-width: none; }
	.s2y-footer-widgets { grid-template-columns: 1fr; }
}
@media (max-width: 720px) {
	.s2y-grid > .s2y-card { flex: 1 1 100%; }
	.s2y-menu-toggle { display: block; }
	.s2y-navbar-inner { flex-wrap: wrap; }
	.s2y-nav { display: none; width: 100%; }
	.s2y-nav.is-open { display: block; }
	.s2y-nav ul { flex-direction: column; }
	.s2y-nav .sub-menu { position: static; display: block; padding-left: 18px; box-shadow: none; }
	.s2y-nav-search { width: 100%; padding-bottom: 14px; }
	.s2y-nav-search .search-field { width: 100%; }
	.s2y-nav-search .search-form { width: 100%; }
	.s2y-article { padding: 24px 18px; }
	.s2y-post-nav { grid-template-columns: 1fr; }
}
