/* ==========================================================================
   Переменные (Custom Properties)
   ========================================================================== */
   :root {
    /* Цвета */
    --color-primary: #66b1f1;
    --color-primary-dark: #004080;
    --color-secondary: #f7ca18;
    --color-text: #333;
    --color-text-light: #555;
    --color-background: #eee;
    --color-surface: #ffffff;
    --color-dark-bg: #1b1b1b;
    --color-dark-text: #efefef;
  
    /* Шрифты */
    --font-main: "Lato", "Century Gothic", sans-serif;
    --font-special: 'Poppins', sans-serif;
  
    /* Тени */
    --shadow-small: 0 2px 4px rgba(0, 0, 0, 0.1), 0 1px 2px rgba(0, 0, 0, 0.22);
    --shadow-medium: 0 5px 15px rgba(0, 0, 0, 0.25);
    --shadow-large: 0 10px 20px rgba(0, 0, 0, 0.35);
    
    /* Прочее */
    --nav-height: 70px;
    --border-radius: 10px;
    --transition-speed: 0.3s;
  }
  
  /* ==========================================================================
     Базовые стили и сброс
     ========================================================================== */
  * {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
  }
  
  html {
    scroll-behavior: smooth;
  }
  
  body {
    font-family: var(--font-main);
    background-color: var(--color-background);
    color: var(--color-text);
    line-height: 1.6;
  }
  
  a {
    text-decoration: none;
    color: inherit;
    transition: color var(--transition-speed) ease, background-color var(--transition-speed) ease;
  }
  
  /* ==========================================================================
     Общие стили секций
     ========================================================================== */
  .et-hero-tabs,
  .et-slide {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    position: relative;
    text-align: center;
    padding: 0 2em;
  }
  
  .et-hero-tabs h1,
  .et-slide h2 {
    font-size: 2.2rem;
    margin-bottom: 1rem;
    letter-spacing: 0.1rem;
  }
  
  .et-hero-tabs h3,
  .et-slide p {
    font-size: 1rem;
    letter-spacing: 0.05rem;
    opacity: 0.8;
    max-width: 600px;
    margin-bottom: 1rem;
  }
  
  /* ==========================================================================
     Навигация (Sticky Tabs)
     ========================================================================== */
  .et-hero-tabs-container {
    display: flex;
    position: absolute;
    bottom: 0;
    width: 100%;
    height: var(--nav-height);
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.1);
    background: var(--color-surface);
    z-index: 10;
  }
  
  .et-hero-tabs-container--top {
    position: fixed;
    top: 0;
  }
  
  .et-hero-tab {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
    color: var(--color-text);
    font-size: 0.85rem;
    letter-spacing: 0.1rem;
    text-transform: uppercase;
    font-weight: bold;
  }
  
  .et-hero-tab:hover,
  .et-hero-tab:focus {
    color: var(--color-surface);
    background: rgba(102, 177, 241, 0.8); /* var(--color-primary) с прозрачностью */
  }
  
  .et-hero-tab-slider {
    position: absolute;
    bottom: 0;
    width: 0;
    height: 6px;
    background: var(--color-primary);
    transition: left var(--transition-speed) ease, width var(--transition-speed) ease;
  }
  
  /* ==========================================================================
     Секция "Обо мне" (#tab-about)
     ========================================================================== */
  #tab-about {
    background-color: var(--color-dark-bg);
  }
  
  #tab-about .about-title {
    max-width: 60%;
    width: 100%;
    transform: translateY(-50px);
    overflow: hidden;
    padding-bottom: 10px;
    text-align: left;
  }
  
  #tab-about .about-title span {
    display: inline-block;
    font-size: 5vw;
    color: var(--color-dark-text);
    width: 100%;
    text-transform: uppercase;
    transform: translateY(150%);
    animation: byBottom 1s ease both;
    font-weight: 600;
    letter-spacing: 0.25vw;
  }
  
  #tab-about .about-title span:last-child {
    font-size: 1rem;
    animation: byBottom 1s 0.25s ease both;
  }
  
  #tab-about .about-title span a {
    position: relative;
    display: inline-block;
    margin-left: 0.5rem;
    color: var(--color-secondary);
  }
  
  #tab-about .about-title span a::after {
    content: "";
    height: 2px;
    background-color: var(--color-secondary);
    position: absolute;
    bottom: -10px;
    left: 0;
    width: 0;
    animation: linkAfter 0.5s 1s ease both;
  }
  
  #tab-about .about-title h3 {
    color: #ddd;
    font-size: 1rem;
    font-weight: normal;
    margin-top: 1rem;
    line-height: 1.5;
  }
  
  @keyframes byBottom {
    to { transform: translateY(0); }
  }
  @keyframes linkAfter {
    to { width: 30px; }
  }
  
  /* ==========================================================================
     Компонент карточки (для проектов и статей)
     ========================================================================== */
  .card {
    width: 300px;
    background-color: var(--color-surface);
    border-radius: var(--border-radius);
    overflow: hidden;
    font-family: var(--font-special);
    box-shadow: var(--shadow-medium);
    transition: transform var(--transition-speed) ease, box-shadow var(--transition-speed) ease;
    display: flex;
    flex-direction: column;
  }
  
  .card:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-large);
  }
  
  .card img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    display: block;
  }
  
  .card .content {
    padding: 15px;
    text-align: center;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
  }
  
  .card .content h3 {
    margin-bottom: 10px;
    font-size: 1.2rem;
    color: var(--color-text);
  }
  
  .card .content .description {
    min-height: 50px;
    color: var(--color-text-light);
    text-align: justify;
    margin-bottom: auto; /* Прижимает блок ссылок вниз */
  }
  
  .card .linkDiv {
    display: flex;
    justify-content: space-around;
    padding-top: 1rem;
  }
  
  .card .linkDiv a {
    display: flex;
    align-items: center;
    color: var(--color-primary);
    font-weight: bold;
  }
  
  .card .linkDiv a:hover {
    color: var(--color-primary-dark);
  }
  
  .card .icon {
    margin-left: 5px;
  }
  
  /* ==========================================================================
     Секция "Проекты" (#tab-projects)
     ========================================================================== */
  .projects-container {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 20px;
    padding: 40px 20px;
  }
  
  /* ==========================================================================
     Секция "Статьи" (#tab-articles)
     ========================================================================== */
  .posts-box {
    max-width: 1024px;
    margin: 0 auto;
    padding: 40px 10px;
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 20px;
  }
  
  /* Стили для кнопок внутри карточек статей */
  #tab-articles .card div:last-child {
    padding: 16px 20px;
    border-top: 1px solid var(--color-background);
    display: flex;
    justify-content: space-between;
  }
  
  #tab-articles .button {
    color: var(--color-secondary);
    text-transform: uppercase;
    font-size: .8em;
    font-weight: bold;
  }
  
  #tab-articles .button:hover {
    opacity: .7;
  }
  
  /* ==========================================================================
     Модальное окно
     ========================================================================== */
  .modal {
    display: none;
    position: fixed;
    z-index: 900;
    width: 100%;
    height: 100%;
    left: 0;
    top: 0;
    background: rgba(0, 0, 0, 0.8);
    overflow-y: auto;
  }
  
  .modal-sandbox {
    position: fixed;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    background: transparent;
  }
  
  .modal-box {
    position: relative;
    width: 80%;
    max-width: 920px;
    margin: 100px auto;
    background: var(--color-surface);
    animation: modalbox .3s ease-out;
  }
  
  .modal-header img {
    width: 100%;
    display: block;
  }
  
  .modal-body {
    padding: 40px 8%;
  }
  
  .modal-body h2 {
    margin-bottom: 30px;
    letter-spacing: .06em;
  }
  
  @keyframes modalbox {
    from { top: -250px; opacity: 0; }
    to { top: 0; opacity: 1; }
  }
  
  /* Стили для кнопок в модальном окне */
  .modal-body button {
    min-width: 120px;
    padding: 16px 32px;
    margin: 24px 8px 0 0;
    background: transparent;
    border: 1px solid var(--color-secondary);
    outline: none;
    color: var(--color-secondary);
    cursor: pointer;
    font-weight: 600;
    font-size: 0.9rem;
    transition: all var(--transition-speed) ease;
  }
  
  .modal-body button:hover:not(:disabled) {
    background-color: var(--color-secondary);
    color: var(--color-surface);
  }
  
  .modal-body button:disabled {
    opacity: .4;
    cursor: default;
  }
  
  /* ==========================================================================
     Секция "Планы" (#tab-plans)
     ========================================================================== */
  #tab-plans {
    background-color: var(--color-dark-bg);
    color: var(--color-dark-text);
  }
  
  #tab-plans .statiepod {
    color: var(--color-dark-text);
  }
  
  /* ==========================================================================
     Секция "Контакты" (#tab-contacts)
     ========================================================================== */
  .social {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-top: 20px;
    font-size: 24px;
  }
  
  .social a {
    margin: 0 15px;
    color: #2D1F28;
  }
  
  .social a:hover {
    opacity: 0.7;
  }
  
  /* ==========================================================================
     Адаптивность (Media Queries)
     ========================================================================== */
  @media (max-width: 992px) {
    .card {
      width: calc(50% - 20px); /* По две карточки в ряд */
    }
    
    #tab-about .about-title span {
      font-size: 7vw;
    }
  }
  
  @media (max-width: 768px) {
    .projects-container,
    .posts-box {
      flex-direction: column;
      align-items: center;
    }
    
    .card {
      width: 90%;
      max-width: 400px;
    }
    
    .et-hero-tabs h1 { font-size: 1.8rem; }
    .et-hero-tabs h3 { font-size: 0.9rem; }
    
    #tab-about .about-title {
      max-width: 85%;
      transform: none;
      margin-top: 40px;
      text-align: center;
    }
    
    #tab-about .about-title span { font-size: 8vw; }
    #tab-about .about-title h3 { font-size: 0.9rem; }
  }
  
  @media (max-width: 480px) {
    .et-hero-tabs h1 { font-size: 1.6rem; }
    .et-hero-tabs h3 { font-size: 0.85rem; }
    
    .et-hero-tab {
      font-size: 0.7rem;
      padding: 0 5px;
    }
    
    .modal-body { padding: 20px; }
    .modal-body button {
      width: 100%;
      margin: 10px 0;
      padding: 12px 16px;
    }
  }