/*
Theme Name:   EduPlix (Enfold Child)
Theme URI:    https://example.com/
Description:  Enfold child theme for a tech tutorials / interview-prep portal:
              logo + nav + search header, a tagline hero with CTAs, a 22/53/25
              three-column body (category accordion / featured + article grid /
              popular posts + newsletter + ad), and a tag-cloud footer band.
Author:       Your Name
Author URI:   https://example.com/
Template:     enfold
Version:      1.0.0
Text Domain:  eduplix-child
*/

/* =========================================================
   1. CSS VARIABLES
   ========================================================= */
:root{
	--edx-primary:      #1c6dd0;   /* brand blue */
	--edx-primary-dark: #124a91;
	--edx-accent:       #f2994a;   /* CTA orange */
	--edx-text:         #232323;
	--edx-muted:        #6b6f76;
	--edx-border:       #e5e7eb;
	--edx-bg-light:     #f5f7fa;
	--edx-link:         #1c6dd0;
}

/* =========================================================
   2. HEADER — logo / nav / search
   ========================================================= */
#top #header{ border-bottom: 1px solid var(--edx-border); }
#top #header .logo img{ max-height: 42px; width: auto; }

#top #header .av-main-nav > li > a{
	font-weight: 600;
	font-size: 14.5px;
	color: var(--edx-text);
}
#top #header .av-main-nav > li > a:hover,
#top #header .av-main-nav > li.current-menu-item > a{
	color: var(--edx-primary);
}

.edx-header-search{
	display: flex;
	align-items: center;
	gap: 6px;
}
.edx-header-search input[type="search"]{
	border: 1px solid var(--edx-border);
	border-radius: 20px;
	padding: 6px 14px;
	font-size: 13px;
	width: 170px;
	transition: width .2s ease, border-color .2s ease;
}
.edx-header-search input[type="search"]:focus{
	width: 220px;
	border-color: var(--edx-primary);
	outline: none;
}
.edx-header-search button{
	background: none;
	border: none;
	cursor: pointer;
	color: var(--edx-muted);
	font-size: 16px;
}
.edx-header-search button:hover{ color: var(--edx-primary); }

/* =========================================================
   3. HERO SECTION (homepage tagline + CTAs)
   ========================================================= */
.edx-hero{
	background: linear-gradient(135deg, var(--edx-primary) 0%, var(--edx-primary-dark) 100%);
	color: #fff;
	text-align: center;
	padding: 56px 20px 48px;
}
.edx-hero h1{
	font-size: 32px;
	font-weight: 700;
	margin: 0 0 12px;
	color: #fff;
}
.edx-hero .edx-hero-subtitle{
	font-size: 15px;
	opacity: .92;
	margin: 0 0 26px;
	letter-spacing: .02em;
}
.edx-hero .edx-hero-subtitle span{ margin: 0 6px; opacity: .6; }
.edx-hero-ctas{ display: flex; justify-content: center; gap: 14px; flex-wrap: wrap; }
.edx-hero-ctas a{
	display: inline-block;
	padding: 12px 26px;
	border-radius: 6px;
	font-weight: 600;
	font-size: 14px;
	text-decoration: none;
	transition: transform .15s ease, box-shadow .15s ease;
}
.edx-hero-ctas a:hover{ transform: translateY(-2px); }
.edx-cta-primary{ background: var(--edx-accent); color: #fff; }
.edx-cta-primary:hover{ box-shadow: 0 6px 16px rgba(0,0,0,.25); color:#fff; }
.edx-cta-secondary{ background: rgba(255,255,255,.12); color: #fff; border: 1px solid rgba(255,255,255,.5); }
.edx-cta-secondary:hover{ background: rgba(255,255,255,.22); color:#fff; }

/* =========================================================
   4. THREE-COLUMN LAYOUT — 22% / 53% / 25%
   ========================================================= */
.edx-layout{
	display: grid;
	grid-template-columns: 22% 1fr 25%;
	gap: 30px;
	align-items: start;
	max-width: 1320px;
	padding: 36px 0 48px;
}
.edx-col-left .edx-sticky-wrap,
.edx-col-right .edx-sticky-wrap{
	position: sticky;
	top: 90px;
	max-height: calc(100vh - 110px);
	overflow-y: auto;
}
.edx-col-center{ min-width: 0; }

/* =========================================================
   5. LEFT COLUMN — accordion category / prep nav
   ========================================================= */
.edx-col-left .widget{
	margin-bottom: 20px;
	border: 1px solid var(--edx-border);
	border-radius: 8px;
	overflow: hidden;
}
.edx-accordion-head{
	cursor: pointer;
	display: flex;
	justify-content: space-between;
	align-items: center;
	font-weight: 700;
	font-size: 13.5px;
	text-transform: uppercase;
	letter-spacing: .03em;
	padding: 12px 14px;
	background: var(--edx-bg-light);
	color: var(--edx-text);
}
.edx-accordion-head:after{
	content: "+";
	font-size: 16px;
	color: var(--edx-primary);
}
.edx-accordion-head.active:after{ content: "−"; }
.edx-accordion-body{ display: none; padding: 4px 0; }
.edx-accordion-body.open{ display: block; }
.edx-accordion-body ul{ list-style: none; margin: 0; padding: 0; }
.edx-accordion-body ul li a{
	display: flex;
	align-items: center;
	gap: 8px;
	padding: 8px 16px;
	font-size: 13.5px;
	color: var(--edx-link);
	text-decoration: none;
	border-bottom: 1px dashed var(--edx-border);
}
.edx-accordion-body ul li:last-child a{ border-bottom: none; }
.edx-accordion-body ul li a:before{ content: "›"; color: var(--edx-accent); font-weight: 700; }
.edx-accordion-body ul li a:hover{ background: var(--edx-bg-light); color: var(--edx-accent); padding-left: 20px; }

/* =========================================================
   6. CENTER COLUMN — Featured article + article grid
   ========================================================= */
.edx-section-heading{
	font-size: 13px;
	text-transform: uppercase;
	letter-spacing: .06em;
	color: var(--edx-muted);
	font-weight: 700;
	margin: 0 0 14px;
	padding-bottom: 8px;
	border-bottom: 2px solid var(--edx-border);
}

.edx-featured{
	position: relative;
	display: block;
	border-radius: 10px;
	overflow: hidden;
	margin-bottom: 34px;
	text-decoration: none;
	box-shadow: 0 4px 18px rgba(0,0,0,.08);
}
.edx-featured img{
	width: 100%;
	height: 340px;
	object-fit: cover;
	display: block;
	transition: transform .4s ease;
}
.edx-featured:hover img{ transform: scale(1.03); }
.edx-featured-overlay{
	position: absolute;
	left: 0; right: 0; bottom: 0;
	padding: 24px 26px;
	background: linear-gradient(to top, rgba(0,0,0,.82), rgba(0,0,0,0));
	color: #fff;
}
.edx-featured-tag{
	display: inline-block;
	background: var(--edx-accent);
	color: #fff;
	font-size: 11px;
	font-weight: 700;
	text-transform: uppercase;
	padding: 3px 10px;
	border-radius: 3px;
	margin-bottom: 10px;
}
.edx-featured-overlay h2{ font-size: 22px; margin: 0 0 8px; color: #fff; line-height: 1.3; }
.edx-featured-overlay p{ font-size: 13.5px; opacity: .9; margin: 0; max-width: 560px; }

.edx-article-grid{
	display: grid;
	grid-template-columns: repeat(2, 1fr);
	gap: 22px;
}
.edx-article-card{
	display: block;
	text-decoration: none;
	border: 1px solid var(--edx-border);
	border-radius: 8px;
	overflow: hidden;
	background: #fff;
	transition: box-shadow .2s ease, transform .2s ease;
}
.edx-article-card:hover{ box-shadow: 0 6px 16px rgba(0,0,0,.08); transform: translateY(-2px); }
.edx-article-card .edx-thumb{ width: 100%; height: 150px; overflow: hidden; }
.edx-article-card .edx-thumb img{ width: 100%; height: 100%; object-fit: cover; }
.edx-article-card .edx-card-body{ padding: 14px 16px; }
.edx-article-card .edx-card-cat{
	font-size: 11px;
	font-weight: 700;
	text-transform: uppercase;
	color: var(--edx-primary);
	margin-bottom: 6px;
	display: block;
}
.edx-article-card h3{
	font-size: 15px;
	line-height: 1.35;
	margin: 0 0 6px;
	color: var(--edx-text);
}
.edx-article-card .edx-card-excerpt{
	font-size: 12.5px;
	color: var(--edx-muted);
	line-height: 1.5;
	margin: 0;
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
	overflow: hidden;
}

/* =========================================================
   7. RIGHT COLUMN — popular posts / newsletter / ad
   ========================================================= */
.edx-col-right .widget{
	border: 1px solid var(--edx-border);
	border-radius: 8px;
	overflow: hidden;
	margin-bottom: 22px;
}
.edx-col-right .widgettitle{
	background: var(--edx-primary);
	color: #fff;
	margin: 0;
	padding: 11px 14px;
	font-size: 13px;
	text-transform: uppercase;
	letter-spacing: .03em;
}
.edx-popular-list{ list-style: none; margin: 0; padding: 6px 0; }
.edx-popular-list li{
	display: flex;
	align-items: flex-start;
	gap: 10px;
	padding: 9px 14px;
	border-bottom: 1px dashed var(--edx-border);
}
.edx-popular-list li:last-child{ border-bottom: none; }
.edx-popular-rank{
	flex: 0 0 22px;
	height: 22px;
	line-height: 22px;
	text-align: center;
	background: var(--edx-accent);
	color: #fff;
	border-radius: 50%;
	font-size: 11px;
	font-weight: 700;
}
.edx-popular-list a{ font-size: 13px; color: var(--edx-text); text-decoration: none; line-height: 1.4; }
.edx-popular-list a:hover{ color: var(--edx-primary); }

.edx-newsletter{ background: var(--edx-bg-light); padding: 16px; border: 1px solid var(--edx-border); border-radius: 8px; margin-bottom: 22px; }
.edx-newsletter h3{ margin: 0 0 6px; font-size: 14px; color: var(--edx-primary-dark); }
.edx-newsletter p{ font-size: 12.5px; color: var(--edx-muted); margin: 0 0 10px; }
.edx-newsletter-form{ display: flex; gap: 6px; }
.edx-newsletter-form input[type=email]{ flex:1; min-width:0; padding: 8px 10px; border: 1px solid var(--edx-border); border-radius: 4px; font-size: 13px; }
.edx-newsletter-form button{ background: var(--edx-accent); color:#fff; border:none; padding: 8px 14px; border-radius: 4px; font-size: 13px; font-weight: 600; cursor: pointer; }
.edx-newsletter-form button:hover{ background: var(--edx-primary-dark); }

.edx-ad-slot{
	display: flex; align-items: center; justify-content: center;
	height: 250px;
	background: repeating-linear-gradient(45deg,var(--edx-bg-light),var(--edx-bg-light) 10px,#ececec 10px,#ececec 20px);
	border: 1px dashed var(--edx-border);
	border-radius: 8px;
	color: var(--edx-muted);
	font-size: 12px;
	text-transform: uppercase;
	letter-spacing: .05em;
	margin-bottom: 22px;
}

/* =========================================================
   8. FOOTER — "Popular Interview Topics" tag band + link row
   ========================================================= */
.edx-footer-tags{
	background: var(--edx-bg-light);
	border-top: 1px solid var(--edx-border);
	border-bottom: 1px solid var(--edx-border);
	text-align: center;
	padding: 26px 20px;
}
.edx-footer-tags h4{
	font-size: 12px;
	text-transform: uppercase;
	letter-spacing: .06em;
	color: var(--edx-muted);
	margin: 0 0 14px;
}
.edx-tag-cloud{ display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; }
.edx-tag-cloud a{
	font-size: 13px !important;
	padding: 6px 14px;
	border: 1px solid var(--edx-border);
	border-radius: 20px;
	color: var(--edx-text);
	text-decoration: none;
	background: #fff;
	transition: all .15s ease;
}
.edx-tag-cloud a:hover{ background: var(--edx-primary); border-color: var(--edx-primary); color: #fff; }

.edx-footer-links{
	background: var(--edx-primary-dark);
	color: #cfe0f7;
	text-align: center;
	font-size: 12.5px;
	padding: 14px 20px;
}
.edx-footer-links a{ color: #fff; text-decoration: none; margin: 0 10px; }
.edx-footer-links a:hover{ text-decoration: underline; }

/* =========================================================
   9. PAGINATION, SKIP LINK, BACK TO TOP (shared UX helpers)
   ========================================================= */
.edx-pagination{ margin-top: 26px; display:flex; justify-content:center; gap:6px; flex-wrap:wrap; }
.edx-pagination .page-numbers{ display:inline-block; padding:7px 13px; border:1px solid var(--edx-border); border-radius:4px; font-size:13px; color:var(--edx-text); text-decoration:none; }
.edx-pagination .page-numbers.current{ background: var(--edx-primary); border-color: var(--edx-primary); color:#fff; }
.edx-pagination .page-numbers:hover:not(.current){ border-color: var(--edx-primary); color: var(--edx-primary); }

.edx-skip-link{
	position: absolute; left: -999px; top: auto;
	background: var(--edx-primary-dark); color: #fff;
	padding: 10px 16px; z-index: 10000; border-radius: 0 0 4px 0; text-decoration: none;
}
.edx-skip-link:focus{ left: 0; top: 0; }

.edx-article-card:focus-visible,
.edx-featured:focus-visible,
.edx-accordion-head:focus-visible,
.edx-popular-list a:focus-visible,
.edx-pagination a:focus-visible{
	outline: 2px solid var(--edx-accent);
	outline-offset: 2px;
}

#edx-back-to-top{
	position: fixed; right: 22px; bottom: 22px;
	width: 42px; height: 42px; border-radius: 50%;
	background: var(--edx-primary); color:#fff; border:none;
	font-size: 18px; cursor: pointer;
	box-shadow: 0 2px 8px rgba(0,0,0,.25);
	opacity: 0; visibility: hidden; transform: translateY(10px);
	transition: opacity .2s ease, transform .2s ease, background .2s ease;
	z-index: 999;
}
#edx-back-to-top.edx-visible{ opacity:1; visibility:visible; transform:translateY(0); }
#edx-back-to-top:hover{ background: var(--edx-primary-dark); }

/* =========================================================
   10. RESPONSIVE
   ========================================================= */
@media only screen and (max-width: 1100px){
	.edx-layout{ grid-template-columns: 220px 1fr; }
	.edx-col-right{ grid-column: 1 / -1; }
	.edx-col-right .edx-sticky-wrap{ position: static; max-height: none; }
	.edx-article-grid{ grid-template-columns: repeat(2, 1fr); }
}
@media only screen and (max-width: 900px){
	.edx-layout{ grid-template-columns: 1fr; }
	.edx-col-center{ order: 1; }
	.edx-col-left{ order: 2; }
	.edx-col-right{ order: 3; }
	.edx-col-left .edx-sticky-wrap{ position: static; max-height: none; }
	.edx-hero h1{ font-size: 24px; }
}
@media only screen and (max-width: 640px){
	.edx-article-grid{ grid-template-columns: 1fr; }
	.edx-featured img{ height: 220px; }
	.edx-header-search input[type=search]{ width: 120px; }
	#edx-back-to-top{ right: 14px; bottom: 14px; width: 38px; height: 38px; }
}
