/*
Theme Name: Twenty Twenty-Five FlexiBlog (Child)
Template: twentytwentyfive
Version: 1.0.3
Text Domain: twentytwentyfive-flexiblog
*/

/* Full width */
.wp-site-blocks{
  max-width:none;
  padding-left: clamp(14px, 2.6vw, 34px);
  padding-right: clamp(14px, 2.6vw, 34px);
}
.is-layout-constrained > :where(:not(.alignleft):not(.alignright):not(.alignfull)){
  max-width: 1280px;
  margin-left:auto;
  margin-right:auto;
}

body{
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Make Query lists a proper grid (avoid weird flex wrap) */
.saas-home .wp-block-post-template{
  list-style:none;
  padding:0;
  margin:0;
  display:grid !important;
  grid-template-columns: repeat(5, minmax(0,1fr));
  gap: 16px;
}
@media (max-width: 1100px){
  .saas-home .wp-block-post-template{ grid-template-columns: repeat(3, minmax(0,1fr)); }
}
@media (max-width: 700px){
  .saas-home .wp-block-post-template{ grid-template-columns: repeat(2, minmax(0,1fr)); }
}
@media (max-width: 420px){
  .saas-home .wp-block-post-template{ grid-template-columns: 1fr; }
}

/* Hero */
.home-hero{ padding: 34px 0 16px; }
.home-hero h1{
  font-size: clamp(30px, 3.4vw, 52px);
  line-height: 1.08;
  letter-spacing: -0.03em;
  margin: 0 0 10px;
}
.home-hero p{
  color: rgba(15,23,42,.78);
  line-height: 1.7;
  margin: 0 0 14px;
  max-width: 72ch;
}

/* Sections */
.saas-home-section{
  padding: 22px 0 6px;
  margin-top: 18px;
  border-top: 1px solid rgba(0,0,0,.06);
}
.saas-home-section h2{
  font-size: 1.35rem;
  letter-spacing: -0.01em;
  margin: 0 0 6px;
}
.saas-home-section p{ margin: 0; }

/* Cards */
.saas-card{
  border: 1px solid rgba(0,0,0,.08);
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 10px 24px rgba(0,0,0,.04);
  overflow: hidden;
}
.saas-pad{ padding: 14px 14px 12px; }
.saas-meta{ opacity: .72; font-size: .9rem; margin-top: 6px; }

/* Tool icon cards */
.tool-icons-row{ gap: 12px; }
.tool-icon-card{
  border: 1px solid rgba(0,0,0,.08);
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 10px 22px rgba(0,0,0,.04);
  padding: 16px 14px;
  text-align:center;
  transition: transform .15s ease, box-shadow .15s ease;
}
.tool-icon-card:hover{
  transform: translateY(-2px);
  box-shadow: 0 16px 34px rgba(0,0,0,.06);
}
.tool-icon{ font-size: 24px; margin: 0 0 8px; }
.tool-sub{ margin: 6px 0 0; font-size: .92rem; opacity: .72; }
.tool-icon-card a{ text-decoration:none; font-weight:800; color:inherit; }
.tool-icon-card a:hover{ text-decoration: underline; text-underline-offset: .18em; }

/* Software cards */
.software-row{ gap: 12px; }
.software-card{
  border: 1px solid rgba(0,0,0,.08);
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 10px 22px rgba(0,0,0,.04);
  padding: 18px 14px;
  text-align:center;
}
.software-dot{ font-size: 22px; margin: 0 0 8px; }
.software-name{ margin: 0; font-weight: 800; }
.software-name a{ text-decoration:none; color:inherit; }
.software-name a:hover{ text-decoration: underline; text-underline-offset: .18em; }

/* =========================
   ICON SLOTS (SVG-ready)
   ========================= */
.brand-svg{
  width: 34px;
  height: 34px;
  display:flex;
  align-items:center;
  justify-content:center;
  margin: 0 auto 10px;
  border-radius: 10px;
  background: rgba(0,0,0,.04);
  border: 1px solid rgba(0,0,0,.06);
}
.brand-svg svg{
  width: 22px;
  height: 22px;
  display:block;
}

.tool-svg{
  width: 34px;
  height: 34px;
  display:flex;
  align-items:center;
  justify-content:center;
  margin: 0 auto 10px;
  border-radius: 10px;
  background: rgba(0,0,0,.04);
  border: 1px solid rgba(0,0,0,.06);
}
.tool-svg svg{
  width: 20px;
  height: 20px;
  display:block;
}

/* =========================
   POST THUMBNAILS: clean inside frame
   ========================= */
.saas-home-section .wp-block-post-featured-image,
.saas-home-section .wp-block-post-featured-image a,
.saas-home-section .wp-block-post-featured-image figure{
  display:block !important;
  margin:0 !important;
  overflow:hidden !important;
  border-radius: 16px 16px 0 0 !important;
}

.saas-home-section .wp-block-post-featured-image img{
  width:100% !important;
  height: 135px !important;     /* tweak: 120-160 */
  object-fit: cover !important;
  object-position: center !important;
  display:block !important;
}

/* Titles & links inside cards */
.saas-home-section .wp-block-post-title a,
.saas-home-section .software-name a,
.saas-home-section .wp-block-post-title a:visited,
.tool-icon-card a,
.software-name a{
  color: inherit;
  text-decoration: none;
}

.saas-home-section .wp-block-post-title a:hover,
.tool-icon-card a:hover,
.software-name a:hover{
  text-decoration: underline;
  text-underline-offset: .18em;
}

/* Clamp post titles to keep grid tidy */
.saas-home-section .wp-block-post-title{
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  min-height: 2.6em;
}

/* =========================
   FIX: Section header alignment (H2 + View more)
   ========================= */
.saas-home-section > .wp-block-columns{
  align-items: center !important;
  margin-bottom: 14px !important;
}

.saas-home-section > .wp-block-columns > .wp-block-column:last-child{
  display: flex !important;
  justify-content: flex-end !important;
  align-items: center !important;
}

.saas-home-section > .wp-block-columns .wp-block-buttons{
  justify-content: flex-end !important;
  width: 100%;
}

.saas-home-section > .wp-block-columns .wp-block-button__link{
  padding: 12px 18px !important;
  border-radius: 999px !important;
  line-height: 1 !important;
}


/* =========================
   FIX: Post thumbnail frame too big
   ========================= */

/* خليه card بلا padding فالفوق */
.saas-home-section .saas-card{
  padding: 0 !important;
  overflow: hidden !important;
  border-radius: 18px !important;
}

/* wrapper ديال الصورة بلا margins ولا فراغ */
.saas-home-section .wp-block-post-featured-image,
.saas-home-section .wp-block-post-featured-image figure,
.saas-home-section .wp-block-post-featured-image a{
  margin: 0 !important;
  padding: 0 !important;
  display: block !important;
  overflow: hidden !important;
}

/* الصورة ثابتة فـ height و cover */
.saas-home-section .wp-block-post-featured-image img{
  width: 100% !important;
  height: 150px !important;   /* بدّلها 140/160 حسب ذوقك */
  object-fit: cover !important;
  object-position: center !important;
  display: block !important;
}

/* padding غير للتحت (النص) */
.saas-home-section .saas-pad{
  padding: 12px 14px !important;
}