/*
Theme Name: IncomeHub Elegant
Theme URI: https://hopvault.com/incomehub.blog
Author: Arturas
Author URI: https://hopvault.com/incomehub.blog
Description: Elegantiška, švari WordPress tema blogui IncomeHub. Pagrindiniame puslapyje straipsniai rodomi blokais (kortelėmis), su dešinėje pusėje esančia šoninę juosta (sidebar). Tinka pajamų / finansų / passive income tematikos turiniui.
Version: 1.0
Requires at least: 5.8
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: incomehub-elegant
*/

:root{
  --ih-bg: #faf8f5;
  --ih-surface: #ffffff;
  --ih-text: #2b2620;
  --ih-text-light: #6b6258;
  --ih-primary: #1f6f5c;     /* deep emerald green - "growth/money" feel */
  --ih-primary-dark: #154f41;
  --ih-accent: #d9a441;      /* warm gold accent */
  --ih-border: #e8e2d8;
  --ih-shadow: 0 2px 10px rgba(43,38,32,0.06);
  --ih-shadow-hover: 0 8px 24px rgba(43,38,32,0.12);
  --ih-radius: 10px;
  --ih-maxwidth: 1180px;
}

*{box-sizing:border-box;}

body{
  margin:0;
  background:var(--ih-bg);
  color:var(--ih-text);
  font-family: "Georgia", "Iowan Old Style", serif;
  line-height:1.7;
  font-size:17px;
}

h1,h2,h3,h4,h5,h6{
  font-family: "Helvetica Neue", Arial, sans-serif;
  color:var(--ih-text);
  font-weight:700;
  line-height:1.25;
  margin:0 0 0.5em;
}

a{ color:var(--ih-primary); text-decoration:none; }
a:hover{ color:var(--ih-accent); }

img{ max-width:100%; display:block; border-radius:var(--ih-radius); }

.ih-container{
  max-width:var(--ih-maxwidth);
  margin:0 auto;
  padding:0 24px;
}

/* ===== HEADER ===== */
.ih-site-header{
  background:var(--ih-surface);
  border-bottom:1px solid var(--ih-border);
  position:sticky;
  top:0;
  z-index:50;
}
.ih-header-top{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:20px;
  flex-wrap:nowrap;
  padding:18px 24px;
}
.ih-header-bottom{
  background:var(--ih-bg);
  border-top:1px solid var(--ih-border);
}
.ih-header-bottom .ih-container{
  display:flex;
  justify-content:center;
}

.ih-header-banner{
  flex:1 1 auto;
  display:flex;
  justify-content:flex-end;
  min-width:120px;
  overflow:hidden;
}
.ih-header-banner-widget{
  max-width:728px;
  width:100%;
  display:flex;
  justify-content:flex-end;
}
.ih-header-banner-widget img{ margin:0 0 0 auto; border-radius:6px; max-width:100%; height:auto; }
.ih-logo{
  font-family:"Helvetica Neue", Arial, sans-serif;
  font-size:26px;
  font-weight:800;
  letter-spacing:-0.5px;
  color:var(--ih-text);
  line-height:0;
}
.ih-logo a{ color:inherit; display:inline-block; }
.ih-logo img,
.ih-logo .custom-logo{
  max-height:50px;
  width:auto;
  display:block;
}
.ih-logo span{ color:var(--ih-primary); }
.ih-tagline{
  font-size:13px;
  color:var(--ih-text-light);
  font-family:"Helvetica Neue", Arial, sans-serif;
  margin-top:2px;
}

.ih-main-nav{
  padding:14px 0;
}
.ih-main-nav ul{
  list-style:none;
  display:flex;
  gap:28px;
  margin:0;
  padding:0;
  font-family:"Helvetica Neue", Arial, sans-serif;
}
.ih-main-nav a{
  color:var(--ih-text);
  font-size:15px;
  font-weight:600;
  text-transform:uppercase;
  letter-spacing:0.4px;
}
.ih-main-nav a:hover{ color:var(--ih-primary); }

.ih-menu-toggle{
  display:none;
  background:none;
  border:1px solid var(--ih-border);
  border-radius:6px;
  padding:8px 12px;
  font-size:16px;
  cursor:pointer;
}
.ih-logo-block{ flex-shrink:0; }

/* ===== LAYOUT: content + right sidebar ===== */
.ih-layout{
  display:grid;
  grid-template-columns: 1fr 320px;
  gap:48px;
  padding:48px 0 64px;
  align-items:start;
}
.ih-content{ min-width:0; }

/* ===== POST CARDS GRID (front page) ===== */
.ih-archive-title{
  font-size:30px;
  margin-bottom:28px;
  border-left:5px solid var(--ih-primary);
  padding-left:14px;
}
.ih-post-grid{
  display:grid;
  grid-template-columns: repeat(3, 1fr);
  gap:28px;
}
/* Column count controlled via Customizer -> body class ih-cols-2 / ih-cols-3 / ih-cols-4 */
body.ih-cols-2 .ih-post-grid{ grid-template-columns: repeat(2, 1fr); }
body.ih-cols-3 .ih-post-grid{ grid-template-columns: repeat(3, 1fr); }
body.ih-cols-4 .ih-post-grid{ grid-template-columns: repeat(4, 1fr); gap:20px; }

.ih-post-card{
  background:var(--ih-surface);
  border:1px solid var(--ih-border);
  border-radius:var(--ih-radius);
  overflow:hidden;
  box-shadow:var(--ih-shadow);
  transition:transform .2s ease, box-shadow .2s ease;
  display:flex;
  flex-direction:column;
}
.ih-post-card:hover{
  transform:translateY(-4px);
  box-shadow:var(--ih-shadow-hover);
}

/* Featured card: full width, photo on top, title/text BELOW the photo (never beside it) */
.ih-post-card.ih-featured{
  grid-column: 1 / -1;
  flex-direction:column;
}
.ih-post-card.ih-featured .ih-card-thumb{
  width:100%;
  aspect-ratio: 21 / 9;
  height:auto;
}
.ih-post-card.ih-featured .ih-card-body{ padding:32px; }
.ih-post-card.ih-featured .ih-card-title{ font-size:26px; }

.ih-card-thumb{
  position:relative;
  overflow:hidden;
  background:var(--ih-border);
  width:100%;
  aspect-ratio: 4 / 3; /* default = 3-column layout */
}
/* Photo aspect ratio adapts to the chosen column count */
body.ih-cols-2 .ih-card-thumb{ aspect-ratio: 16 / 9; }   /* 2 cols = wide cards, wide photos */
body.ih-cols-3 .ih-card-thumb{ aspect-ratio: 4 / 3; }    /* 3 cols = standard photos */
body.ih-cols-4 .ih-card-thumb{ aspect-ratio: 1 / 1; }    /* 4 cols = compact, square photos */

.ih-card-thumb img{
  width:100%; height:100%; object-fit:cover; border-radius:0;
  transition:transform .35s ease;
}
.ih-post-card:hover .ih-card-thumb img{ transform:scale(1.06); }
.ih-card-thumb .ih-cat-badge{
  position:absolute; top:12px; left:12px;
  background:var(--ih-primary);
  color:#fff;
  font-family:"Helvetica Neue", Arial, sans-serif;
  font-size:11px;
  font-weight:700;
  text-transform:uppercase;
  letter-spacing:0.5px;
  padding:5px 10px;
  border-radius:20px;
}
.ih-card-body{ padding:20px; display:flex; flex-direction:column; gap:10px; flex:1; }
.ih-card-title{ font-size:19px; margin:0; }
.ih-card-title a{ color:var(--ih-text); }
.ih-card-title a:hover{ color:var(--ih-primary); }
.ih-card-meta{
  font-family:"Helvetica Neue", Arial, sans-serif;
  font-size:12.5px;
  color:var(--ih-text-light);
  text-transform:uppercase;
  letter-spacing:0.4px;
}
.ih-card-excerpt{
  font-size:15px;
  color:var(--ih-text-light);
  flex:1;
}
.ih-card-readmore{
  font-family:"Helvetica Neue", Arial, sans-serif;
  font-size:13px;
  font-weight:700;
  text-transform:uppercase;
  color:var(--ih-primary);
  margin-top:auto;
}
.ih-card-readmore:after{ content:" →"; }

/* ===== Pagination ===== */
.ih-pagination{
  display:flex;
  justify-content:center;
  gap:8px;
  margin-top:44px;
  font-family:"Helvetica Neue", Arial, sans-serif;
}
.ih-pagination a, .ih-pagination span{
  display:inline-block;
  padding:8px 14px;
  border:1px solid var(--ih-border);
  border-radius:6px;
  color:var(--ih-text);
  font-size:14px;
}
.ih-pagination .current{ background:var(--ih-primary); color:#fff; border-color:var(--ih-primary); }
.ih-pagination a:hover{ border-color:var(--ih-primary); color:var(--ih-primary); }

/* ===== SIDEBAR ===== */
.ih-sidebar{ display:flex; flex-direction:column; gap:32px; }
.ih-widget{
  background:var(--ih-surface);
  border:1px solid var(--ih-border);
  border-radius:var(--ih-radius);
  padding:22px;
  box-shadow:var(--ih-shadow);
}
.ih-widget-title{
  font-family:"Helvetica Neue", Arial, sans-serif;
  font-size:15px;
  text-transform:uppercase;
  letter-spacing:0.6px;
  color:var(--ih-primary);
  border-bottom:2px solid var(--ih-border);
  padding-bottom:10px;
  margin-bottom:16px;
}
.ih-widget ul{ list-style:none; margin:0; padding:0; }
.ih-widget li{ margin-bottom:10px; font-size:15px; }
.ih-widget select, .ih-widget input[type=text], .ih-widget input[type=search]{
  width:100%; padding:9px; border:1px solid var(--ih-border); border-radius:6px; font-family:inherit;
}
.ih-widget input[type=submit], .ih-widget button{
  background:var(--ih-primary); color:#fff; border:none; padding:9px 14px; border-radius:6px; cursor:pointer; font-family:"Helvetica Neue", Arial, sans-serif; font-weight:600;
}
.ih-widget input[type=submit]:hover, .ih-widget button:hover{ background:var(--ih-primary-dark); }
.ih-search-form{ display:flex; gap:8px; }
.ih-search-form input[type=search]{ flex:1; }

/* ===== SINGLE POST ===== */
.ih-single-title{ font-size:34px; margin-bottom:12px; }
.ih-single-meta{
  font-family:"Helvetica Neue", Arial, sans-serif;
  font-size:13px;
  color:var(--ih-text-light);
  text-transform:uppercase;
  letter-spacing:0.5px;
  margin-bottom:24px;
  padding-bottom:18px;
  border-bottom:1px solid var(--ih-border);
}
.ih-single-thumb{ margin-bottom:28px; }
.ih-entry-content{ font-size:18px; }
.ih-entry-content h2{ margin-top:1.6em; font-size:26px; }
.ih-entry-content h3{ margin-top:1.4em; font-size:21px; }
.ih-entry-content blockquote{
  border-left:4px solid var(--ih-accent);
  margin:24px 0; padding:6px 20px; color:var(--ih-text-light); font-style:italic;
}
.ih-entry-content a{ text-decoration:underline; }
.ih-tags{ margin-top:30px; font-family:"Helvetica Neue", Arial, sans-serif; font-size:13px; }
.ih-tags a{
  display:inline-block; background:var(--ih-bg); border:1px solid var(--ih-border);
  padding:5px 12px; border-radius:16px; margin:0 6px 6px 0; color:var(--ih-text-light);
}
.ih-tags a:hover{ border-color:var(--ih-primary); color:var(--ih-primary); }

.ih-related-posts{
  margin-top:48px;
  padding-top:36px;
  border-top:1px solid var(--ih-border);
}
.ih-related-title{
  font-size:24px;
  margin-bottom:24px;
  border-left:5px solid var(--ih-primary);
  padding-left:14px;
}

/* ===== FOOTER ===== */
.ih-site-footer{
  background:var(--ih-primary-dark);
  color:#e7e3da;
  margin-top:40px;
  padding:48px 0 28px;
  font-family:"Helvetica Neue", Arial, sans-serif;
}
.ih-footer-inner{ display:flex; justify-content:space-between; flex-wrap:wrap; gap:20px; }
.ih-footer-widgets{ display:grid; grid-template-columns:repeat(3,1fr); gap:30px; margin-bottom:30px; }
.ih-site-footer a{ color:#f3e6c2; }
.ih-footer-bottom{
  text-align:center; font-size:13px; color:#c7c2b6;
  border-top:1px solid rgba(255,255,255,0.12); padding-top:20px; margin-top:10px;
}
.ih-footer-bottom a{
  color:#f3e6c2;
  text-decoration:underline;
}
.ih-footer-bottom a:hover{ color:var(--ih-accent); }

/* ===== RESPONSIVE ===== */
@media (max-width: 1000px){
  body.ih-cols-3 .ih-post-grid,
  body.ih-cols-4 .ih-post-grid{ grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 900px){
  .ih-layout{ grid-template-columns:1fr; }
  body.ih-cols-2 .ih-post-grid,
  body.ih-cols-3 .ih-post-grid,
  body.ih-cols-4 .ih-post-grid{ grid-template-columns:1fr; }
  .ih-footer-widgets{ grid-template-columns:1fr; }
  .ih-header-banner{ display:none; }
}
@media (max-width: 700px){
  .ih-header-bottom{ display:none; }
  .ih-header-bottom.ih-open{ display:block; }
  .ih-main-nav ul{ flex-direction:column; gap:4px; align-items:center; padding:10px 0; }
  .ih-menu-toggle{ display:inline-block; }
}
