/* =========================================================
   HOME.CSS – CLEAN & FINAL
   Scope: Home page only
   ========================================================= */

/* ===============================
   SECTION SPACING (GLOBAL HOME)
   =============================== */

.intro-section {
    padding: 60px 0;
}

/* ===============================
   INTRO TEXT
   =============================== */

.intro-section .intro-title {
    max-width: 600px;
    margin: 0 auto 24px;
    text-align: center;
    font-size: 44px;
    font-weight: 700;
    line-height: 1.2;
}

.intro-section .intro-text {
    max-width: 980px;
    margin: 0 auto 40px;
    text-align: center;

    font-size: 20px;
    line-height: 1.7;
    color: #5a5a5a;
}

/* ===============================
   CARDS
   =============================== */

.intro-cards {
    margin-bottom: 80px;
}

.intro-card {
    height: 100%;
    padding: 14px 25px;
    border-radius: 26px;
    border: 2px solid #ececec;
    background: #ffffff;

    transition:
        transform 0.35s ease,
        box-shadow 0.35s ease,
        border-color 0.35s ease;
}

.intro-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 26px 60px rgba(0,0,0,0.08);
    border-color: var(--main-color);
}

/* Icons */

.intro-icon {
    margin: 0 auto 32px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.intro-icon img {
    width: 230px;
    max-width: 100%;
    height: auto;
}

/* Card text */

.intro-card h3 {
    font-size: 22px;
    font-weight: 700;
    margin-bottom: 16px;
    color: #2f2f2f;
}

.intro-card p {
    font-size: 16px;
    line-height: 1.6;
    color: #6a6a6a;
}

/* Card link */

.intro-link {
    display: inline-block;
    margin-top: 22px;
    font-size: 16px;
    font-weight: 600;
    color: #41c127;
    text-decoration: none;
    position: relative;
}

.intro-link::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: -4px;
    width: 0;
    height: 2px;
    background: #41c127;
    transition: width 0.3s ease;
}

.intro-link:hover::after {
    width: 100%;
}

/* ===============================
   MODULE: Clickable cards (SAFE)
   =============================== */

   .intro-card {
    position: relative;
}

.card-overlay-link {
    position: absolute;
    inset: 0;
    z-index: 5;
    text-indent: -9999px;
}

/* Запазваме hover поведението */
.intro-card:hover {
    cursor: pointer;
}

/* ===============================
   HOME ACTION BUTTONS (FIXED)
   =============================== */

.home-actions {
    margin-top: 90px;
    display: flex;
    gap: 24px;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
}


/* ===============================
   RESPONSIVE
   =============================== */

@media (max-width: 768px) {
    .intro-section {
        padding: 90px 0;
    }

    .intro-section .intro-title {
        font-size: 34px;
    }

    .intro-section .intro-text {
        font-size: 14px;
    }

    /* Center text inside cards – mobile only */
    .intro-card {
        text-align: center;
    }
}

/* ===============================
   HOME CARDS – MOBILE TUNING
   =============================== */

   @media (max-width: 768px) {
    /* намаляме разстоянието между картите (понeже имаш row g-4) */
    .intro-cards{
      --bs-gutter-x: 16px;
      --bs-gutter-y: 16px;
      margin-top: 24px;
    }
  
    /* малко по-стегната карта */
    .intro-card{
      padding: 12px;
      border-radius: 22px;
      text-align: center;
    }
  
    /* махаме огромната иконка и я правим по-малка */
    .intro-icon{
      margin-bottom: 14px;
    }
  
    .intro-icon img{
      width: 180px;      /* <= тук си играй: 180-260 */
      max-width: 100%;
      height: auto;
      display: block;
    }
  
    /* по-компактни текстове */
    .intro-card h3{
      font-size: 18px;
      margin: 10px 0 8px;
    }
  
    .intro-card p{
      font-size: 14px;
      line-height: 1.45;
      margin-bottom: 0;
    }

    .intro-cards > [class*="col-"] {
        margin-bottom: 20px;
    }

    /* последната карта да няма излишен margin */
    .intro-cards > [class*="col-"]:last-child {
        margin-bottom: 0;
    }
  }

/* ===============================
HOME BLOG SECTION
=============================== */

.home-blog {
    padding: 80px 0;
    background: #f6f7f8;
}


/* GRID */

.blog-grid {
    row-gap: 40px;
}

/* CARD */

.blog-card {
    height: 100%;
    background: #fff;
    border-radius: 22px;
    overflow: hidden;
    box-shadow: 0 18px 40px rgba(0,0,0,.08);
    transition: transform .3s ease, box-shadow .3s ease;
}

.blog-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 28px 60px rgba(0,0,0,.12);
}

/* IMAGE */

.blog-card-image img {
    width: 100%;
    height: 230px;
    object-fit: cover;
    display: block;
}

/* BODY */

.blog-card-body {
    padding: 22px;
}

.blog-badge {
    display: inline-block;
    background: #9aa0a6;
    color: #fff;
    font-size: 13px;
    padding: 6px 14px;
    border-radius: 20px;
    margin-bottom: 14px;
}

.blog-card h3 {
    font-size: 18px;
    font-weight: 700;
    line-height: 1.35;
    margin-bottom: 14px;
    color: #222;
}

.blog-card p {
    font-size: 15px;
    line-height: 1.6;
    color: #666;
    margin-bottom: 20px;
}



@media (max-width: 768px) {
    .home-blog {
        padding: 60px 0;
    }

    .blog-grid {
        row-gap: 10px;
    }

    .blog-card-image img {
        height: 180px;
    }

    .blog-card-body {
        text-align: center;
    }
}

/* ===============================
   MOST VIEWED CAROUSEL – MOBILE
   =============================== */

   @media (max-width: 768px) {

    .carousel-track {
        gap: 16px;
        padding-left: 12px;
        padding-right: 12px;
    }

    .carousel-card {
        min-width: 240px;
        max-width: 240px;
        border-radius: 18px;
    }

    .carousel-card h3 {
        font-size: 16px;
        line-height: 1.35;
    }

    .card-image {
        height: 140px;
    }

    .card-body {
        padding: 16px;
    }
}

/* ===============================
   BLOG SECTION TITLES – MOBILE
   =============================== */

   @media (max-width: 768px) {
    .home-blog .section-title,
    .home-popular .section-title {
        font-size: 30px;
        margin-bottom: 42px;
    }
}

/* =========================
   HOME STATS SECTION
========================= */

.home-stats {
    background: #F6F7F8;
    text-align: center;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 40px;
}

.stat-item {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.stat-number {
    font-size: 48px;
    font-weight: 800;
    color: #7BC043; /* зеленото от бранда */
    line-height: 1;
}

.stat-label {
    margin-top: 10px;
    font-size: 14px;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    color: #222;
}

/* Responsive */
@media (max-width: 992px) {
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 30px;
    }
}

@media (max-width: 768px) {
    .stats-grid {
        grid-template-columns: 1fr;
        gap: 28px;
    }

    .stat-number {
        font-size: 42px;
    }

    .stat-label {
        font-size: 13px;
        letter-spacing: 1.2px;
    }
}

@media (max-width: 480px) {
    .stat-number {
        font-size: 40px;
    }

    .stat-label {
        font-size: 13px;
    }
}


   


/* BANNER FOOTER */
.home-full-banner {
    width: 100%;
    margin: 0;
    padding: 0;
}

.home-full-banner img {
    width: 100%;
    height: auto;
    display: block;
}

/* ===============================
   HOME – LATEST BLOG POSTS
   =============================== */

.home-blog-preview {
    padding: 88px 0 96px;
    background: #f7f6fb;
}

.home-blog-heading {
    margin-bottom: 44px;
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 32px;
}

.home-blog-eyebrow {
    display: block;
    margin-bottom: 9px;
    color: var(--main-color);
    font-size: 14px;
    font-weight: 700;
    letter-spacing: 0.13em;
    text-transform: uppercase;
}

.home-blog-heading h2 {
    margin: 0 0 12px;
    color: #2f3038 !important;
    font-size: clamp(34px, 4vw, 48px);
    font-weight: 700;
    line-height: 1.15;
}

.home-blog-heading p {
    max-width: 680px;
    margin: 0;
    color: #686973;
    font-size: 17px;
    line-height: 1.65;
}

.home-blog-all {
    flex: 0 0 auto;
    padding: 13px 20px;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    color: var(--main-color);
    font-size: 15px;
    font-weight: 700;
    text-decoration: none;
    background: #ffffff;
    border: 1px solid rgba(40, 3, 150, 0.18);
    border-radius: 10px;
    transition: color 0.25s ease, background-color 0.25s ease,
                border-color 0.25s ease, transform 0.25s ease;
}

.home-blog-all:hover {
    color: #ffffff;
    background: var(--main-color);
    border-color: var(--main-color);
    transform: translateY(-2px);
}

.home-blog-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 30px;
}

.home-blog-card {
    min-width: 0;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    background: #ffffff;
    border: 1px solid rgba(31, 25, 48, 0.08);
    border-radius: 20px;
    box-shadow: 0 14px 36px rgba(31, 25, 48, 0.08);
    transition: border-color 0.3s ease, box-shadow 0.3s ease, transform 0.3s ease;
}

.home-blog-card:hover {
    border-color: rgba(40, 3, 150, 0.2);
    box-shadow: 0 22px 48px rgba(40, 3, 150, 0.14);
    transform: translateY(-7px);
}

.home-blog-card-image {
    position: relative;
    aspect-ratio: 16 / 9;
    display: block;
    overflow: hidden;
    background: #ece9f7;
}

.home-blog-card-image img {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
    transition: transform 0.45s ease;
}

.home-blog-card:hover .home-blog-card-image img {
    transform: scale(1.045);
}

.home-blog-image-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: rgba(40, 3, 150, 0.45);
    font-size: 54px;
    background: linear-gradient(145deg, #f1eefb, #e3dcf8);
}

.home-blog-card-body {
    min-height: 0;
    padding: 24px;
    display: flex;
    flex: 1;
    flex-direction: column;
}

.home-blog-meta {
    margin-bottom: 13px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    color: #8a8791;
    font-size: 13px;
}

.home-blog-meta span {
    padding: 5px 10px;
    color: var(--main-color);
    font-weight: 700;
    background: rgba(40, 3, 150, 0.08);
    border-radius: 999px;
}

.home-blog-card h3 {
    margin: 0 0 13px;
    display: -webkit-box;
    overflow: hidden;
    color: #2f3038 !important;
    font-size: 20px;
    font-weight: 700;
    line-height: 1.35;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
}

.home-blog-card h3 a {
    color: inherit;
    text-decoration: none;
}

.home-blog-card h3 a:hover {
    color: var(--main-color);
}

.home-blog-card-body > p {
    margin: 0 0 22px;
    display: -webkit-box;
    overflow: hidden;
    color: #6b6b74;
    font-size: 15px;
    line-height: 1.65;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 3;
}

.home-blog-read {
    margin-top: auto;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    align-self: flex-start;
    color: var(--main-color);
    font-size: 15px;
    font-weight: 700;
    text-decoration: none;
}

.home-blog-read span {
    transition: transform 0.25s ease;
}

.home-blog-read:hover span {
    transform: translateX(4px);
}

.home-blog-all:focus-visible,
.home-blog-card h3 a:focus-visible,
.home-blog-read:focus-visible {
    outline: 3px solid rgba(40, 3, 150, 0.3);
    outline-offset: 4px;
    border-radius: 4px;
}

.home-blog-empty {
    padding: 56px 24px;
    color: #6b6b74;
    text-align: center;
    background: #ffffff;
    border: 1px solid rgba(31, 25, 48, 0.08);
    border-radius: 20px;
}

.home-blog-empty i {
    margin-bottom: 14px;
    color: var(--main-color);
    font-size: 44px;
}

.home-blog-empty p {
    margin: 0;
}

@media (max-width: 992px) {
    .home-blog-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 680px) {
    .home-blog-preview {
        padding: 62px 0 70px;
    }

    .home-blog-heading {
        margin-bottom: 32px;
        align-items: flex-start;
        flex-direction: column;
        gap: 20px;
    }

    .home-blog-heading h2 {
        font-size: 34px;
    }

    .home-blog-heading p {
        font-size: 16px;
    }

    .home-blog-grid {
        grid-template-columns: 1fr;
        gap: 22px;
    }

    .home-blog-all {
        width: 100%;
        justify-content: center;
        box-sizing: border-box;
    }

    .home-blog-card-body {
        padding: 21px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .home-blog-card,
    .home-blog-card-image img,
    .home-blog-all,
    .home-blog-read span {
        transition: none;
    }
}
