/* =====================================================
   ПЛАВНОСТЬ САЙТА
   ===================================================== */

html {
  scroll-behavior: smooth;
}


button,
a,
input,
textarea,
img {
  transition:
    color 0.25s ease,
    background-color 0.25s ease,
    border-color 0.25s ease,
    opacity 0.25s ease,
    transform 0.25s ease;
}


@media (prefers-reduced-motion: reduce) {

  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }

}


/* =====================================================
   STYLES.CSS — АДАПТИВ
   ===================================================== */


/* =====================================================
   Планшеты и небольшие ноутбуки
   ===================================================== */

@media (max-width: 1024px) {

  /* HERO */

  .section1 {
    padding-top: 150px;
    padding-left: 24px;
    padding-right: 24px;
  }

  .section1_info {
    width: min(900px, 100%);
  }

  .section1_info_content {
    gap: 40px;
  }

  .section1_info_content_img img {
    width: clamp(200px, 32vw, 340px);
  }


  /* ABOUT */

  .about-wrapper {
    gap: 30px;
  }

  .about-image {
    gap: 14px;
  }

  .about-image img {
    height: 240px;
  }


  /* MODAL */

  .modal-content {
    width: 90%;
    padding: 32px;
  }

}


/* =====================================================
   Телефоны
   ===================================================== */

@media (max-width: 768px) {

  /* HERO */

  .section1 {
    padding-top: 110px;
    padding-bottom: 50px;
    padding-left: 18px;
    padding-right: 18px;
  }

  .section1_info {
    width: 100%;
  }

  .section1_info_content {
    flex-direction: column;
    align-items: center;
    gap: 35px;
  }

  .section1_info_content_img {
    display: flex;
    justify-content: center;
    width: 100%;
  }

  .section1_info_content_img img {
    width: min(75vw, 320px);
  }

  .section1_info_content_text {
    width: 100%;
    gap: 24px;
    text-align: center;
  }

  .section1_info_content_text_glav {
    font-size: clamp(26px, 7vw, 36px);
  }

  #hero-description {
    font-size: clamp(18px, 4.8vw, 25px);
    text-align: center;
  }


  /* BUTTON */

  .button_text {
    font-size: 17px;
    padding: 0.8em 1.2em;
    border-radius: 14px;
  }


  /* ABOUT */

  .about-wrapper {
    flex-direction: column;
    gap: 35px;
  }

  .about-image {
    width: 100%;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
  }

  .about-image img {
    height: 220px;
  }

  .about-info {
    width: 100%;
  }

  .about-info h2 {
    margin-bottom: 20px;
    font-size: clamp(28px, 7vw, 38px);
  }

  .about-info p {
    font-size: 17px;
    line-height: 1.7;
    text-align: left;
  }


  /* MAIN MODAL */

  .modal-content {
    width: calc(100% - 24px);
    max-height: 92vh;
    padding: 25px 18px;
    border-radius: 16px;
  }

  .close {
    width: 42px;
    height: 42px;
    right: 15px;
    top: 15px;
    font-size: 26px;
  }


  /* CERTIFICATE MODAL */

  #certificateImage {
    max-width: 94%;
    max-height: 85%;
  }

  .certificate-close {
    width: 42px;
    height: 42px;
    right: 15px;
    top: 15px;
    font-size: 26px;
  }

}


/* =====================================================
   Маленькие телефоны
   ===================================================== */

@media (max-width: 480px) {

  /* HERO */

  .section1 {
    padding-top: 90px;
    padding-left: 14px;
    padding-right: 14px;
  }

  .section1_info_content {
    gap: 28px;
  }

  .section1_info_content_img img {
    width: min(82vw, 290px);
    border-radius: 14px;
  }

  .section1_info_content_text {
    gap: 18px;
  }

  .section1_info_content_text_glav {
    font-size: clamp(24px, 8vw, 31px);
  }

  #hero-description {
    font-size: 18px;
  }


  /* BUTTON */

  .button_text {
    max-width: 280px;
    font-size: 16px;
  }


  /* ABOUT */

  .about-wrapper {
    gap: 25px;
  }

  .about-image {
    gap: 8px;
  }

  .about-image img {
    height: 170px;
    border-radius: 8px;
  }

  .about-info h2 {
    font-size: 29px;
  }

  .about-info p {
    font-size: 16px;
    line-height: 1.6;
  }


  /* MODALS */

  .modal-content {
    width: calc(100% - 16px);
    padding: 20px 14px;
    border-radius: 14px;
  }

  .close,
  .certificate-close {
    width: 40px;
    height: 40px;
    right: 12px;
    top: 12px;
    font-size: 24px;
  }

}

/* =====================================================
   SERVICES — АДАПТИВ
   ===================================================== */


/* =====================================================
   Планшеты
   ===================================================== */

@media (max-width: 1024px) {

  .services-section {
    padding: 40px 24px;
  }

  .services-container {
    width: min(900px, 100%);
  }

  .services-header {
    margin-bottom: 55px;
  }

  .services-header h2 {
    font-size: clamp(42px, 6vw, 54px);
  }

  .service-card {
    gap: 40px;
  }

  .service-content h3 {
    font-size: clamp(32px, 4vw, 40px);
    margin-bottom: 18px;
  }

  .service-content p {
    font-size: 17px;
    line-height: 1.7;
    margin-bottom: 25px;
  }

  .service-price {
    font-size: 27px;
    margin-bottom: 24px;
  }

}


/* =====================================================
   Телефоны
   ===================================================== */

@media (max-width: 768px) {

  .services-section {
    padding: 40px 18px;
  }

  .services-container {
    width: 100%;
  }

  .services-header {
    margin-bottom: 40px;
  }

  .services-header h2 {
    font-size: clamp(34px, 9vw, 46px);
  }

  .services-header p {
    font-size: 16px;
    line-height: 1.6;
    margin-top: 10px;
  }


  .service-card {
    grid-template-columns: 1fr;
    gap: 25px;
    margin-bottom: 60px;
  }


  /*
    На мобильном не нужно менять порядок
    через reverse — изображение всегда сверху.
  */

  .service-card.reverse .service-image,
  .service-card.reverse .service-content {
    order: initial;
  }


  .service-image {
    width: 100%;
    border-radius: 14px;
  }


  .service-image img {
    width: 100%;
    aspect-ratio: 3 / 2;
  }


  .service-content {
    text-align: center;
  }


  .service-content h3 {
    font-size: clamp(28px, 7vw, 36px);
    margin-bottom: 15px;
  }


  .service-content p {
    font-size: 16px;
    line-height: 1.65;
    margin-bottom: 22px;
  }


  .service-price {
    font-size: 25px;
    margin-bottom: 20px;
  }

}


/* =====================================================
   Маленькие телефоны
   ===================================================== */

@media (max-width: 480px) {

  .services-section {
    padding: 30px 14px;
  }


  .services-header {
    margin-bottom: 32px;
  }


  .services-header h2 {
    font-size: 34px;
  }


  .services-header p {
    font-size: 15px;
  }


  .service-card {
    gap: 20px;
    margin-bottom: 50px;
  }


  .service-image {
    border-radius: 11px;
  }


  .service-content h3 {
    font-size: 28px;
  }


  .service-content p {
    font-size: 15.5px;
    line-height: 1.6;
  }


  .service-price {
    font-size: 23px;
  }

}

/* =====================================================
   PORTFOLIO — АДАПТИВ
   ===================================================== */


/* =====================================================
   Планшеты и небольшие ноутбуки
   ===================================================== */

@media (max-width: 1024px) {

  .portfolio-section {
    padding: 30px 24px;
  }


  /* Обложка */

  .portfolio-cover {
    width: min(900px, 100%);
    height: 520px;
    border-radius: 16px;
  }


  .portfolio-overlay h2 {
    font-size: clamp(44px, 6vw, 56px);
  }


  .portfolio-overlay p {
    font-size: 18px;
    margin-top: 10px;
  }


  /* Галерея */

  .portfolio-item {
    width: calc(33.333% - 12px);
  }


  /* Модальное окно */

  .portfolio-modal-content {
    width: 90vw;
    max-height: 82vh;
    padding: 20px;
    border-radius: 16px;
  }


  .portfolio-close {
    right: 20px;
    top: 20px;
  }


  /* Viewer */

  .viewer-image {
    max-width: 88vw;
    max-height: 82vh;
  }


  .viewer-btn {
    width: 58px;
    height: 58px;
    font-size: 28px;
  }


  .viewer-prev {
    left: 20px;
  }


  .viewer-next {
    right: 20px;
  }


  .viewer-close {
    right: 20px;
    top: 20px;
  }

}


/* =====================================================
   Телефоны
   ===================================================== */

@media (max-width: 768px) {

  .portfolio-section {
    padding: 24px 18px;
  }


  /* Обложка */

  .portfolio-cover {
    width: 100%;
    height: 420px;
    border-radius: 14px;
  }


  .portfolio-cover img {
    filter: blur(1.5px);
  }


  .portfolio-overlay {
    padding: 20px;
    text-align: center;
  }


  .portfolio-overlay h2 {
    font-size: clamp(36px, 9vw, 48px);
    line-height: 1.1;
  }


  .portfolio-overlay p {
    font-size: 16px;
    line-height: 1.5;
  }


  /* Галерея */

  #portfolioGrid {
    width: 100%;
  }


  .portfolio-item {
    width: calc(50% - 9px);
    margin-bottom: 12px;
    border-radius: 12px;
  }


  .portfolio-item img {
    border-radius: 12px;
  }


  /*
    На телефонах hover практически отсутствует,
    поэтому админские кнопки должны быть доступны
    без наведения.
  */

  .portfolio-controls {
    opacity: 1;
    top: 7px;
    right: 7px;
    gap: 5px;
  }


  .portfolio-controls button {
    width: 34px;
    height: 34px;
    font-size: 14px;
  }


  /* Кнопка добавления */

  #addPortfolioPhoto {
    padding: 12px 18px;
    font-size: 15px;
    border-radius: 10px;
  }


  /* Панель администратора */

  .portfolio-admin-bar {
    margin-bottom: 20px;
  }


  /* Модальное окно */

  .portfolio-modal {
    padding: 10px;
  }


  .portfolio-modal-content {
    width: 100%;
    max-height: 88vh;
    padding: 12px;
    border-radius: 14px;
    border-right: 5px solid transparent;
  }


  .portfolio-close {
    width: 42px;
    height: 42px;
    right: 12px;
    top: 12px;
    font-size: 26px;
  }


  /* Viewer */

  .viewer-image {
    max-width: 94vw;
    max-height: 78vh;
    border-radius: 10px;
  }


  .viewer-btn {
    width: 46px;
    height: 46px;
    font-size: 24px;
    background: rgba(255, 255, 255, 0.12);
  }


  .viewer-prev {
    left: 10px;
  }


  .viewer-next {
    right: 10px;
  }


  .viewer-close {
    width: 42px;
    height: 42px;
    right: 12px;
    top: 12px;
    font-size: 26px;
  }


  .viewer-counter {
    bottom: 18px;
    font-size: 16px;
  }


  /* Undo */

  .undo-notification {
    width: calc(100% - 28px);
    bottom: 18px;
    padding: 12px 16px;
    gap: 12px;
    border-radius: 12px;
  }

}


/* =====================================================
   Маленькие телефоны
   ===================================================== */

@media (max-width: 480px) {

  .portfolio-section {
    padding: 18px 12px;
  }


  /* Обложка */

  .portfolio-cover {
    height: 330px;
    border-radius: 12px;
  }


  .portfolio-overlay {
    padding: 15px;
  }


  .portfolio-overlay h2 {
    font-size: 34px;
  }


  .portfolio-overlay p {
    font-size: 15px;
  }


  /* Галерея */

  .portfolio-item {
    width: 100%;
    margin-bottom: 10px;
    border-radius: 10px;
  }


  .portfolio-item img {
    border-radius: 10px;
  }


  /* Контролы */

  .portfolio-controls {
    top: 6px;
    right: 6px;
  }


  .portfolio-controls button {
    width: 32px;
    height: 32px;
  }


  /* Модальное окно */

  .portfolio-modal {
    padding: 6px;
  }


  .portfolio-modal-content {
    padding: 8px;
    max-height: 90vh;
    border-radius: 10px;
  }


  /* Viewer */

  .viewer-image {
    max-width: 96vw;
    max-height: 76vh;
  }


  .viewer-btn {
    width: 40px;
    height: 40px;
    font-size: 20px;
  }


  .viewer-prev {
    left: 6px;
  }


  .viewer-next {
    right: 6px;
  }


  .viewer-close {
    width: 40px;
    height: 40px;
    right: 10px;
    top: 10px;
    font-size: 24px;
  }


  .viewer-counter {
    bottom: 12px;
    font-size: 15px;
  }


  /* Уведомление */

  .undo-notification {
    width: calc(100% - 20px);
    flex-wrap: wrap;
    justify-content: center;
    text-align: center;
    gap: 10px;
  }

}

/* =====================================================
   HEADER — МОБИЛЬНАЯ ВЕРСИЯ
   ===================================================== */

@media (max-width: 768px) {

  .header {
    width: 100%;
    padding: 10px 14px;

    display: grid;

    grid-template-columns: 1fr auto;

    grid-template-areas:
      "logo icons"
      "nav nav";

    gap: 8px 12px;

    align-items: center;
  }


  /* =========================
     ЛОГОТИП
     ========================= */

  .logo {
    grid-area: logo;
    justify-self: start;
  }


  .logo a {
    font-size: clamp(25px, 7vw, 32px);
    line-height: 0.95;
  }


  .logo a b {
    font-size: 10px;
    margin-top: 4px;
  }


  /* =========================
     ИКОНКИ
     ========================= */

  .header_icon {
    grid-area: icons;

    justify-self: end;

    display: flex;
    align-items: center;

    gap: 8px;
  }


  .header_icon img {
    width: 25px;
    height: 25px;
  }


  /* =========================
     НАВИГАЦИЯ
     ========================= */

  .div_nav_header {
    grid-area: nav;

    width: 100%;
  }


  .nav_header {
    width: 100%;

    display: flex;

    justify-content: center;
    align-items: center;

    flex-wrap: wrap;

    gap: 5px 15px;

    font-size: 17px;

    line-height: 1.2;

    padding-bottom: 4px;
  }


  .nav_header a {
    white-space: nowrap;
  }


  /* =========================
     HEADER ПОСЛЕ SCROLL
     ========================= */

  .header.scrolled {

    top: 8px;

    width: calc(100% - 16px);

    padding: 10px 13px;

    border-radius: 13px;

    grid-template-columns: 1fr auto;

    grid-template-areas:
      "logo icons"
      "nav nav";

    gap: 6px 10px;
  }


  .header.scrolled .logo a {
    font-size: clamp(23px, 6vw, 29px);
  }


  .header.scrolled .logo b {
    font-size: 9px;
  }


  .header.scrolled .nav_header {
    font-size: 16px;
    gap: 4px 13px;
  }


  .header.scrolled .header_icon img {
    width: 23px;
    height: 23px;
  }

}


/* =====================================================
   ОЧЕНЬ МАЛЕНЬКИЕ ТЕЛЕФОНЫ
   ===================================================== */

@media (max-width: 480px) {

  .header {
    padding: 9px 11px;

    gap: 6px 8px;
  }


  .logo a {
    font-size: 24px;
  }


  .logo a b {
    font-size: 9px;
  }


  .header_icon {
    gap: 6px;
  }


  .header_icon img {
    width: 22px;
    height: 22px;
  }


  .nav_header {
    gap: 4px 10px;
    font-size: 15px;
  }


  /* После прокрутки */

  .header.scrolled {
    top: 6px;

    width: calc(100% - 12px);

    padding: 8px 10px;
  }


  .header.scrolled .logo a {
    font-size: 22px;
  }


  .header.scrolled .logo b {
    font-size: 8px;
  }


  .header.scrolled .nav_header {
    font-size: 14px;
    gap: 3px 9px;
  }


  .header.scrolled .header_icon img {
    width: 21px;
    height: 21px;
  }

}

/* =====================================================
   FOOTER — АДАПТИВ
   ===================================================== */


/* =====================================================
   Планшеты
   ===================================================== */

@media (max-width: 1024px) {

  .footer-container {
    width: min(900px, calc(100% - 48px));
    padding: 55px 0;
    grid-template-columns: repeat(2, 1fr);
    gap: 40px;
  }

  .footer-logo {
    justify-self: start;
  }

  .footer-logo a {
    font-size: 2.2rem;
  }

  .footer-social {
    justify-content: end;
  }

}


/* =====================================================
   Телефоны
   ===================================================== */

@media (max-width: 768px) {

  .footer-container {
    width: calc(100% - 36px);
    padding: 45px 0;
    grid-template-columns: 1fr;
    gap: 35px;
    text-align: center;
  }


  .footer-logo {
    justify-self: center;
  }

  .footer-logo a {
    font-size: 2.1rem;
    align-items: center;
  }


  .footer-logo span {
    font-size: 0.75rem;
    letter-spacing: 2.5px;
  }


  .footer-container-nav-contacts {
    gap: 18px;
  }


  .footer-nav,
  .footer-contacts {
    justify-content: center;
    flex-wrap: wrap;
    gap: 10px 18px;
  }


  .footer-nav a,
  .footer-contacts p {
    font-size: 16px;
  }


  .footer-social {
    justify-content: center;
    gap: 16px;
  }


  .footer-social img {
    width: 30px;
  }


  .footer-bottom {
    padding: 20px 14px;
    font-size: 14px;
  }

}


/* =====================================================
   Маленькие телефоны
   ===================================================== */

@media (max-width: 480px) {

  .footer-container {
    width: calc(100% - 28px);
    padding: 35px 0;
    gap: 28px;
  }


  .footer-logo a {
    font-size: 1.9rem;
  }


  .footer-logo span {
    font-size: 0.7rem;
    letter-spacing: 2px;
  }


  .footer-container-nav-contacts {
    gap: 14px;
  }


  .footer-nav,
  .footer-contacts {
    gap: 8px 14px;
  }


  .footer-nav a,
  .footer-contacts p {
    font-size: 15px;
  }


  .footer-social {
    gap: 14px;
  }


  .footer-social img {
    width: 28px;
  }


  .footer-bottom {
    padding: 18px 10px;
    font-size: 13px;
    line-height: 1.5;
  }

}

/* =====================================================
   CONTACTS — АДАПТИВ
   ===================================================== */


/* =====================================================
   Планшеты
   ===================================================== */

@media (max-width: 1024px) {

  .contacts-section {
    padding: 75px 0;
  }

  .contacts-container {
    width: min(900px, calc(100% - 48px));
    gap: 45px;
  }

  .contacts-info h2 {
    font-size: clamp(42px, 6vw, 54px);
    margin-bottom: 22px;
  }

  .contacts-info p {
    font-size: 17px;
    line-height: 1.7;
    margin-bottom: 30px;
  }

  .contact-item {
    font-size: 20px;
    margin-bottom: 16px;
  }

  .contacts-social {
    gap: 18px;
    margin-top: 30px;
  }

  .contacts-form {
    gap: 16px;
  }

  .contacts-form input,
  .contacts-form textarea {
    padding: 16px;
    font-size: 17px;
  }

}


/* =====================================================
   Телефоны
   ===================================================== */

@media (max-width: 768px) {

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

  .contacts-container {
    width: calc(100% - 36px);
    grid-template-columns: 1fr;
    gap: 45px;
  }


  /* Информация */

  .contacts-info {
    text-align: center;
  }

  .contacts-info h2 {
    font-size: clamp(36px, 9vw, 48px);
    margin-bottom: 18px;
  }

  .contacts-info p {
    font-size: 16px;
    line-height: 1.65;
    margin-bottom: 28px;
  }


  /* Контакты */

  .contact-item {
    font-size: 18px;
    margin-bottom: 13px;
  }


  /* Социальные сети */

  .contacts-social {
    justify-content: center;
    flex-wrap: wrap;
    gap: 12px 20px;
    margin-top: 25px;
  }

  .contacts-social a {
    font-size: 17px;
  }


  /* Форма */

  .contacts-form {
    width: 100%;
    gap: 14px;
  }

  .contacts-form input,
  .contacts-form textarea {
    padding: 15px;
    font-size: 16px;
    border-radius: 11px;
  }

  .contacts-form textarea {
    min-height: 150px;
  }


  .contacts-form .button_text {
    align-self: center;
  }


  /* =================================================
     Сообщения администратора
     ================================================= */

  .messages-list {
    gap: 12px;
    margin-top: 16px;
  }

  .message-card {
    padding: 15px;
    border-radius: 12px;
  }

  .message-card h4 {
    font-size: 17px;
    margin-right: 42px;
  }

  .message-contact {
    font-size: 13px;
    margin-bottom: 11px;
  }

  .message-text {
    font-size: 15px;
    line-height: 1.5;
  }

  .message-date {
    font-size: 11px;
  }

  .delete-message {
    top: 11px;
    right: 11px;
    width: 32px;
    height: 32px;
  }

  .messages-title {
    font-size: 22px;
  }

}


/* =====================================================
   Маленькие телефоны
   ===================================================== */

@media (max-width: 480px) {

  .contacts-section {
    padding: 45px 0;
  }

  .contacts-container {
    width: calc(100% - 28px);
    gap: 35px;
  }


  /* Информация */

  .contacts-info h2 {
    font-size: 34px;
  }

  .contacts-info p {
    font-size: 15px;
    line-height: 1.6;
  }

  .contact-item {
    font-size: 17px;
  }


  .contacts-social {
    gap: 10px 16px;
  }

  .contacts-social a {
    font-size: 16px;
  }


  /* Форма */

  .contacts-form {
    gap: 12px;
  }

  .contacts-form input,
  .contacts-form textarea {
    padding: 14px;
    font-size: 15px;
    border-radius: 10px;
  }

  .contacts-form textarea {
    min-height: 130px;
  }


  /* Сообщения */

  .message-card {
    padding: 13px;
  }

  .message-card h4 {
    font-size: 16px;
  }

  .message-contact {
    font-size: 12px;
  }

  .message-text {
    font-size: 14px;
  }

  .delete-message {
    width: 30px;
    height: 30px;
    top: 9px;
    right: 9px;
  }

  .messages-title {
    font-size: 21px;
  }

}

/* =====================================================
   ADMIN — АДАПТИВ
   ===================================================== */


/* =====================================================
   Планшеты
   ===================================================== */

@media (max-width: 1024px) {

  /* Окно входа */

  .admin-login-content {
    width: min(380px, calc(100% - 40px));
    padding: 28px;
  }


  /* Кнопка редактирования */

  .edit-button {
    width: 40px;
    height: 40px;
    top: 16px;
    right: 16px;
  }


  .section1 .edit-button {
    top: 150px;
  }


  /* Боковой редактор */

  .editor-panel {
    width: min(400px, 85vw);
    right: -85vw;
  }

  .editor-panel.active {
    right: 0;
  }


  .editor-header {
    padding: 18px;
  }


  .editor-body {
    padding: 18px;
  }


  /* Сертификаты */

  .certificates-editor {
    gap: 14px;
  }

  .certificate-item img {
    height: 160px;
  }

}


/* =====================================================
   Телефоны
   ===================================================== */

@media (max-width: 768px) {

  /* =================================================
     Вход администратора
     ================================================= */

  .admin-login-content {
    width: calc(100% - 30px);
    max-width: 380px;
    padding: 24px 18px;
    border-radius: 14px;
    gap: 15px;
  }


  .admin-login-content h2 {
    font-size: 25px;
    padding-right: 20px;
  }


  .admin-login-content input {
    width: 100%;
    height: 46px;
    font-size: 16px;
  }


  .admin-login-content button {
    height: 46px;
  }


  .admin-close-btn {
    right: 12px;
    top: 8px;
    font-size: 25px;
  }


  /* =================================================
     Кнопки редактирования
     ================================================= */

  .edit-button {
    width: 38px;
    height: 38px;
    top: 12px;
    right: 12px;
    font-size: 16px;

    /*
      На телефоне hover отсутствует,
      поэтому кнопка должна быть видна
      в режиме администратора постоянно.
    */
  }


  .admin-mode .edit-button {
    opacity: 1;
  }


  .section1 .edit-button {
    top: 110px;
  }


  /* =================================================
     Боковая панель редактора
     ================================================= */

  .editor-panel {
    width: 100%;
    right: -100%;
    height: 100dvh;
    border-radius: 0;
  }


  .editor-panel.active {
    right: 0;
  }


  .editor-header {
    min-height: 58px;
    padding: 15px 16px;
  }


  .editor-header h2,
  .editor-header h3 {
    font-size: 21px;
  }


  .editor-header button {
    font-size: 24px;
    padding: 5px;
  }


  .editor-body {
    padding: 16px;
    gap: 13px;
    overflow-x: hidden;
  }


  .editor-body input,
  .editor-body textarea {
    width: 100%;
    padding: 12px;
    font-size: 16px;
    border-radius: 8px;
  }


  .editor-body textarea {
    min-height: 130px;
  }


  .editor-body label {
    font-size: 15px;
  }


  /* =================================================
     Услуги в админке
     ================================================= */

  .service-admin-item {
    padding: 11px 0;
    gap: 8px;
  }


  .service-admin-left {
    min-width: 0;
    gap: 9px;
  }


  .service-admin-left span {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }


  .drag-handle {
    flex-shrink: 0;
    font-size: 18px;
  }


  .service-admin-item button {
    margin-left: 5px;
    flex-shrink: 0;
  }


  /* =================================================
     Превью услуги
     ================================================= */

  .service-preview {
    margin-bottom: 20px;
  }


  .service-preview img {
    max-height: 260px;
    border-radius: 14px;
  }


  /*
    На мобильном нет нормального hover,
    поэтому кнопку смены фотографии показываем
    в режиме администратора.
  */

  .service-preview-overlay {
    opacity: 1;
  }


  #changeServiceImage {
    padding: 10px 16px;
    font-size: 15px;
    border-radius: 10px;
  }


  /* =================================================
     Сертификаты
     ================================================= */

  .certificates-editor {
    grid-template-columns: 1fr 1fr;
    gap: 10px;
  }


  .certificate-item img {
    height: 140px;
    border-radius: 9px;
  }


  .certificate-item button {
    opacity: 1;
    font-size: 18px;
  }

}


/* =====================================================
   Маленькие телефоны
   ===================================================== */

@media (max-width: 480px) {

  /* Вход */

  .admin-login-content {
    width: calc(100% - 20px);
    padding: 22px 15px;
  }


  .admin-login-content h2 {
    font-size: 23px;
  }


  /* Кнопки */

  .edit-button {
    width: 36px;
    height: 36px;
    right: 9px;
    top: 9px;
    font-size: 15px;
  }


  .section1 .edit-button {
    top: 90px;
  }


  /* Панель */

  .editor-body {
    padding: 13px;
    gap: 11px;
  }


  .editor-header {
    padding: 13px;
  }


  .editor-header h2,
  .editor-header h3 {
    font-size: 19px;
  }


  /* Услуги */

  .service-admin-item {
    padding: 9px 0;
  }


  .service-admin-item button {
    padding: 4px;
  }


  .drag-handle {
    font-size: 17px;
  }


  .service-preview img {
    max-height: 220px;
    border-radius: 11px;
  }


  #changeServiceImage {
    padding: 9px 13px;
    font-size: 14px;
  }


  /* Сертификаты */

  .certificates-editor {
    gap: 8px;
  }


  .certificate-item img {
    height: 115px;
  }


  .certificate-item button {
    font-size: 16px;
  }

}