/* ===================================
   Template CSS - Alpin.work Style
   =================================== */

/* === 1. Глобальні змінні та базові налаштування === */
:root {
    --primary: #FD5D14;     /* Основний акцентний колір (оранжевий) */
    --secondary: #FDBE33;   /* Другорядний акцентний колір (жовтий) */
    --light: #F4F6F8;       /* Світлий фон */
    --dark: #040F28;        /* Темний фон та колір тексту */
}

/* === 2. Допоміжні класи (Utility Classes) === */
.pt-6 {
    padding-top: 90px;
}

.pb-6 {
    padding-bottom: 90px;
}

.py-6 {
    padding-top: 90px;
    padding-bottom: 90px;
}

/* === 3. Стилі для кнопок === */
.btn {
    position: relative;
    font-weight: 600;
    text-transform: uppercase;
    transition: all 0.5s ease;
}

/* Анімація підкреслення для кнопок */
.btn::after {
    position: absolute;
    content: "";
    width: 0;
    height: 5px;
    bottom: -1px;
    left: 50%;
    background: var(--primary);
    transition: all 0.5s ease;
}

.btn:hover::after,
.btn.active::after {
    width: 50%;
    left: 25%;
}

/* Стилі для основної (primary) кнопки */
.btn-primary {
    color: #FFFFFF;
    background-color: var(--primary); /* Додано для повноти стилю */
    border-color: var(--primary);     /* Додано для повноти стилю */
}

.btn.btn-primary::after {
    background: var(--dark); /* Колір підкреслення для primary кнопки */
}

/* Стилі для квадратних кнопок (для іконок) */
.btn-square,
.btn-sm-square,
.btn-lg-square {
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: normal;
}

.btn-square {
    width: 36px;
    height: 36px;
}

.btn-sm-square {
    width: 28px;
    height: 28px;
}

.btn-lg-square {
    width: 46px;
    height: 46px;
}

/* === 4. Загальні компоненти === */

/* Кнопка "Повернутись нагору" */
.back-to-top {
    position: fixed;
    display: none; /* Показується через JS */
    left: 50%;
    bottom: 0;
    transform: translateX(-50%); /* Кращий спосіб центрування */
    border-radius: 0;
    z-index: 99;
}

/* Радіальні фонові візерунки */
.bg-dark-radial {
    background-image: repeating-radial-gradient(center center, rgba(0, 0, 0, 0.3) 0, rgba(0, 0, 0, 0.3) 1px, transparent 1px, transparent 100%);
    background-size: 3px 3px;
}

.bg-light-radial {
    background-image: repeating-radial-gradient(center center, rgba(255, 255, 255, 0.2) 0, rgba(255, 255, 255, 0.2) 1px, transparent 1px, transparent 100%);
    background-size: 3px 3px;
}

/* === 5. Навігація (Navbar) === */
.navbar-dark .navbar-nav .nav-link {
    position: relative;
    padding: 35px 15px;
    font-size: 18px;
    text-transform: uppercase;
    color: var(--light);
    outline: none;
    transition: color 0.5s ease;
}

.navbar-dark .navbar-nav .nav-link:hover,
.navbar-dark .navbar-nav .nav-link.active {
    color: var(--primary);
}

/* Адаптивність для мобільного меню */
@media (max-width: 991.98px) {
    .navbar-dark .navbar-nav .nav-link {
        padding: 10px 0;
    }
}


/* === 7. Заголовок сторінки (Page Header) === */
.page-header {
    height: 300px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: linear-gradient(rgba(4, 15, 40, 0.7), rgba(4, 15, 40, 0.7)), url(../img/3.jpg) center center no-repeat;
    background-size: cover;
}

/* === 8. Блок "Сервіси" (Service Item) === */
.service-item .service-icon {
    margin-top: -50px;
    width: 100px;
    height: 100px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 100px;
    transition: transform 0.3s ease; /* Плавніша анімація */
}

.service-item .service-icon i {
    transition: font-size 0.3s ease; /* Плавніша анімація */
}

.service-item:hover .service-icon i {
    font-size: 60px; /* Ефект збільшення іконки при наведенні */
}


/* === 9. Блок "Портфоліо" (Portfolio Item) === */
.portfolio-item {
    margin-bottom: 60px;
    position: relative; /* Необхідно для позиціонування дочірніх елементів */
}

/* Контейнер з заголовком під зображенням */
.portfolio-title {
    position: absolute;
    display: flex;
    flex-direction: column;
    justify-content: center;
    height: 120px;
    padding: 0 30px;
    right: 30px;
    left: 30px;
    bottom: -60px; /* Створює ефект "висячого" блоку */
    background: #FFFFFF;
    z-index: 3;
    transition: bottom 0.5s ease; /* Додано для можливої анімації */
}

/* Кнопка/іконка, що з'являється при наведенні */
.portfolio-btn {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%); /* Правильне центрування */
    font-size: 120px;
    line-height: 0;
    transition: opacity 0.3s ease 0.3s; /* Плавна поява з затримкою */
    z-index: 2;
    opacity: 0;
}

.portfolio-item:hover .portfolio-btn {
    opacity: 1;
}

/* Ефект затемнення, що з'являється з боків */
.portfolio-box::before,
.portfolio-box::after {
    position: absolute;
    content: "";
    width: 0;
    height: 100%;
    top: 0;
    transition: width 0.5s ease;
    z-index: 1;
    background: rgba(4, 15, 40, 0.7);
}

.portfolio-box::before {
    left: 0;
}

.portfolio-box::after {
    right: 0;
}

.portfolio-item:hover .portfolio-box::before,
.portfolio-item:hover .portfolio-box::after {
    width: 50%;
}

/* === 10. Адаптивні відступи та елементи футера === */
@media (min-width: 992px) {
    .testimonial,
    .contact-form {
        margin-left: -90px; /* Створює асиметричний дизайн */
    }
    
    .footer::after {
        position: absolute;
        content: "";
        width: 1px;
        height: 100%;
        top: 0;
        left: 50%;
        background: var(--primary); /* Вертикальна лінія-розділювач */
    }
}

/* Декоративна скошена фігура у футері */
.footer-shape::before {
    position: absolute;
    content: "";
    width: 80px;
    height: 100%;
    top: 0;
    left: -40px;
    background: var(--primary);
    transform: skew(40deg);
}

/* === Стилі для статичної Hero Section === */
.hero-header {
    background: linear-gradient(rgba(4, 15, 40, 0.7), rgba(4, 15, 40, 0.7)), url('../img/toronto-gutter.jpg') center center no-repeat;
    background-size: cover;
    min-height: 80vh; /* Висота блоку, можете змінити за потреби */
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Анімації для тексту (якщо ви використовуєте animate.css або схожу бібліотеку) */
.animated {
    animation-duration: 1s;
}

.slideInDown {
    animation-name: slideInDown;
}

@keyframes slideInDown {
    from {
        transform: translate3d(0, -100%, 0);
        visibility: visible;
    }
    to {
        transform: translate3d(0, 0, 0);
    }
}
/* ====== BLOG GRID ====== */
.blog-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 20px;
  align-items: stretch; /* однакова висота карток у рядку */
}

/* ====== CARD ====== */
.blog-card {
  display: flex;
  flex-direction: column;
  background: #fff;
  border: 1px solid #e0e0e0;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 2px 6px rgba(0,0,0,0.08);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.blog-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 4px 12px rgba(0,0,0,0.12);
}

/* ====== IMAGE ====== */
.blog-card img,
.blog-card .card-img-top {
  width: 100%;
  height: 220px;        /* однакова висота для всіх фото */
  object-fit: cover;    /* обрізає зайве, але не спотворює */
  display: block;
}

/* ====== CARD BODY ====== */
.blog-card .card-body {
  display: flex;
  flex-direction: column;
  flex-grow: 1;
  padding: 16px;
}

/* Заголовок */
.blog-card .card-title {
  font-size: 1.2rem;
  font-weight: 600;
  margin-bottom: 10px;
}

/* Excerpt */
.blog-card .excerpt {
  flex-grow: 1;      /* займає весь вільний простір */
  margin-bottom: 16px;
  font-size: 0.95rem;
  line-height: 1.5;
  color: #555;
}

/* ====== BUTTON ====== */
.blog-card .read-more,
.blog-card .btn {
  margin-top: auto;      /* завжди внизу картки */
  align-self: flex-start; 
  background-color: #0077cc;
  color: #fff;
  padding: 8px 16px;
  border-radius: 6px;
  text-decoration: none;
  font-size: 0.9rem;
  transition: background 0.2s ease;
}

.blog-card .read-more:hover,
.blog-card .btn:hover {
  background-color: #005fa3;
  color: #fff;
}
