/* Основные стили */
body {
    font-family: 'Pacifico', sans-serif;
    margin: 0;
    padding: 0;
    background-color: #F7E7C3; /* песочный беж */
    color: #333;

h2 {
    text-align: center; /* Центрируем все заголовки h2 */
    margin: 20px 0; /* Добавляем отступы сверху и снизу */
    padding: 0; /* Убираем возможные внутренние отступы */
}


/* Ссылка-заголовок без изменения цвета */
.section-link {
  color: inherit;
  text-decoration: none;
  position: relative;
}

/* Эффект золотистого подчёркивания */
.section-link::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -4px;
  width: 0;
  height: 3px;
  background: #D8B26E; /* золотистый блонд */
  transition: width 0.4s ease;
  border-radius: 2px;
}

/* Наведение без изменения цвета текста */
.section-link:hover::after {
  width: 100%;
}

/* Чтобы курсор показывал, что это кликабельно */
.section-link:hover,
.section-link:focus {
  cursor: pointer;
}

html {
  scroll-behavior: smooth;
}


/* Шапка сайта */
header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background-color: #F4C27F; /* золотистый блонд */
    padding: 20px;
    color: #fff;
}

header p {
    font-size: 1.5em;
    margin: 10px 0;
}


/* Заголовок с анимацией */
h1 {
    font-family: 'Pacifico', cursive;
    font-size: 3rem;
    color: white; /* Золотистый блонд */
   
}


/* Логотип */
.logo img {
    width: 150px; /* Устанавливаем исходный размер */
    height: auto; /* Сохраняем пропорции */
    transition: transform 0.3s ease-in-out; /* Плавная анимация */
margin-left: 20px; /* Отступ слева */
  padding-left: 10px; /* Внутренний отступ слева */
}

/* Анимация при наведении */
.logo img:hover {
    transform: scale(1.2); /* Увеличиваем логотип до 120% */
}



/* Кнопки навигации */
nav {
    display: flex;
    justify-content: center;
    margin-top: 10px;
}

nav a {
    text-decoration: none;
    background-color: #FF6B6B; /* коралловый закат */
    color: #fff;
    padding: 10px 20px;
    border-radius: 5px;
    margin: 5px;
    font-size: 1.2em;
    transition: all 0.3s ease;
}

nav a:hover {
    background-color: #00A7C2; /* лазурный океан */
    transform: scale(1.1);
}

/* Секция "Главная" */
.section {
    padding: 40px;
    text-align: center;
}

.section h2 {
    font-size: 2em;
    margin-bottom: 20px;
 text-align: center;
}

.section p {
    font-size: 1.2em;
    margin-bottom: 30px;
}

body {
    background-color: #f7e7c3;
    font-family: "Pacifico", cursive;
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100vh;
    margin: 0;
    flex-direction: column;

}

.gallery {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
    justify-content: center;
    max-width: 90%;
}

/* Стили для кнопки возврата к навигации */
.back-to-nav {
  position: fixed;      /* Фиксируем кнопку относительно экрана */
  bottom: 20px;         /* Отступ снизу */
  right: 40px;          /* Увеличиваем отступ от правого края */
  z-index: 1000;        /* Ставим кнопку поверх других элементов */
  display: block;       /* Ссылка как блочный элемент */
  width: 75px;          /* Устанавливаем ширину кнопки */
  height: 75px;         /* Устанавливаем высоту кнопки */
  background: none;     /* Без фона */
  border: none;         /* Без обводки */
  padding: 0;           /* Без отступов */
  transform: rotate(15deg); /* Поворачиваем кнопку на 15 градусов */
  transition: transform 0.3s ease-in-out, box-shadow 0.3s ease-in-out; /* Плавная анимация для поворота и тени */
}

/* Логотип в кнопке */
.logo-back-to-nav {
  width: 100%;          /* Ширина изображения равна ширине кнопки */
  height: 100%;         /* Высота изображения равна высоте кнопки */
  object-fit: contain;  /* Сохраняем пропорции изображения */
  transition: transform 0.3s ease-in-out; /* Плавная анимация для логотипа */
}

/* Эффект увеличения логотипа при наведении */
.back-to-nav:hover .logo-back-to-nav {
  transform: scale(1.2);   /* Увеличиваем изображение на 20% */
}

/* Эффект на саму кнопку при наведении */
.back-to-nav:hover {
  transform: rotate(45deg) scale(1.1);  /* Поворот остаётся, добавляется увеличение */
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2); /* Добавляем тень при наведении */
}



/* Контейнер для полароидов */
.polaroid-container {
    display: flex;
    flex-wrap: wrap;
    justify-content: center; /* Центрируем по горизонтали */
    gap: 20px; /* Расстояние между фото */
    padding: 5px;
    max-width: 1200px;
    margin: 0 ;
}

.polaroid {
    width: 200px;
    background: white;
    padding: 10px;
    box-shadow: 5px 5px 15px rgba(0, 0, 0, 0.2);
    text-align: center;
    font-family: "Pacifico", cursive;
    font-size: 14px;
    color: #555;
    display: inline-block;
    transition: transform 0.3s ease-in-out;
    position: relative;
    margin: 20px;
    border-radius: 5px;
    
    /* Случайные повороты для эффекта хаотичного разбрасывания */
    transform: rotate(calc(-5deg + 10deg * var(--random-rotation, 0)));
}

/* Делаем фото квадратным */
.polaroid img {
    width: 100%;
    aspect-ratio: 1 / 1; 
    object-fit: cover;
    border-radius: 3px;
}

/* Подпись к фото */
.polaroid p {
    margin-top: 8px;
}

/* Добавляем эффект наклона при наведении */
.polaroid:hover {
    transform: scale(1.1) rotate(0deg);
    box-shadow: 10px 10px 20px rgba(0, 0, 0, 0.3);
}


/* Контейнер для карточек */
.lessons-container {
    width: 100%;
    padding: 20px;
    background-color: #f7e7c3; /* Цвет контейнера соответствует фону */
    display: flex;
    justify-content: center;
    align-items: center;
}

/* Секция "Уроки" */

.lesson-info {
  display: flex;
  justify-content: center;
  align-items: stretch;
  gap:40px; /* увеличили отступ между карточками */
  margin-top: 40px;
  flex-wrap: wrap;
  animation: fadeInUp 1s ease forwards;
}

.lesson-card {
  background-color: rgba(255, 255, 255, 0.7);
  border-radius: 16px;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
  padding: 15px;
  transition: transform 0.3s ease, background-color 0.3s ease;
  font-size: 1em;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  overflow: hidden;
  font-family: 'Pacifico', cursive;
 
  max-height: 250px;
  box-sizing: border-box;
}

.lesson-card.left {
  width: 45%;
  animation-delay: 0.5s;
}

.lesson-card.right {
  width: 45%;
  animation-delay: 0.5s;
}

.lesson-card:hover {
  transform: scale(1.02);
  background-color: rgba(255, 255, 255, 0.85);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.15);
}

.lesson-card h3,
.lesson-card ul,
.lesson-card li {
  font-family: 'Pacifico', cursive;
  font-size: 1em;
  color: #333;
}

.lesson-card h3 {
  margin-bottom: 5px;
  text-align: center;
}

.lesson-card ul {
  margin-top: 8px;
  padding-left: 1.2em;
  list-style-type: disc;
  text-align: left;
  overflow-y: auto;
  max-height: 150px;
  line-height: 1.2;
}

.lesson-card li {
  margin-bottom: 4px;
  line-height: 1.2;
}

@keyframes fadeInUp {
  from {
    transform: translateY(20px);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

/* Адаптивность */
@media (max-width: 1024px) {
  .lesson-card.left {
    width: 45%;
  }
  .lesson-card.right {
    width: 50%;
  }
}

@media (max-width: 768px) {
  .lesson-info {
    flex-direction: column;
    align-items: center;
    gap: 20px;
  }

  .lesson-card {
    width: 85%;
  }
}

@media (max-width: 480px) {
  .lesson-card {
    width: 95%;
  }
}

/* Карточки "Уроков" */

.packages {
    display: flex;
    justify-content: center; /* Центрируем карточки */
    gap: 40px;               /* Расстояние между карточками */
    flex-wrap: wrap;
    width: 100%;
    padding: 20px;
    box-sizing: border-box;
}

/* Карточка */
.package-card {
    width: 270px;
    height: 350px;
    perspective: 1000px;
    position: relative;
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
}

/* Внутренний контейнер карточки */
.card-inner {
    width: 100%;
    height: 100%;
    transform-style: preserve-3d;
    transition: transform 1s ease; /* Плавный эффект переворота */
    display: flex;
}

/* Класс для переворота */
.flipped {
    transform: rotateY(180deg); /* Плавный переворот по оси Y */
}

/* Стороны карточки */
.card-front, .card-back {
    position: absolute;
    width: 100%;
    height: 100%;
    border-radius: 10px;
    backface-visibility: hidden;
    display: flex;
    flex-direction: column;
    padding: 20px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    box-sizing: border-box;
    transform-origin: center; /* Обеспечивает правильную точку вращения */
}

/* Лицевая сторона карточки */
.card-front {
    background-size: cover;
    background-position: center;
    color: white;
    justify-content: flex-end;
    align-items: center;
    text-align: left;
    padding: 0;
    box-sizing: border-box;
    position: relative;
    overflow: hidden;
}

/* Контейнер для заголовка с градиентом */
.card-front::after {
    content: '';
    position: absolute;
    bottom: 0;
    height: 40%;
    width: 100%;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.6), transparent);
    z-index: 1;
}

/* Заголовок карточки */
.card-front h3 {
    position: relative;
    z-index: 2;
    font-size: 1.3em;
    margin: 0;
    padding: 16px;
    line-height: 1.3;
    color: white;
    text-align: left;
    width: 100%;
    word-break: break-word;
    box-sizing: border-box;
}

/* Оборот: белый фон + детали пакета */
.card-back {
    transform: rotateY(180deg);
    background-color: white;
    color: #333;
    justify-content: center;
    align-items: flex-start;
    overflow-y: auto;
}
.card-back ul {
    list-style-type: disc;
    padding-left: 1.2em;
    margin-bottom: 15px;
    font-size: 0.9em;
    text-align: left;
}

.card-back li {
    margin-bottom: 6px;
   
}

.card-back .price {
    font-size: 1em;
    font-weight: bold;
    text-align: center;
    margin-top: 20px;
}
/* Подключаем шрифты из Google Fonts */
@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:wght@700&family=Roboto:wght@400;500&display=swap');

/* О Шри-Ланке */

/* Грид для карточек серф-спотов */
.surf-spots-container {
    display: grid;
    grid-template-columns: repeat(2, 1fr); /* Группируем по две карточки */
    gap: 20px; /* Увеличиваем расстояние между карточками */
    justify-content: center;
}

/* Карточки серф-спотов */
.surf-spot-card {
    background-size: cover;
    background-position: center;
    color: white;
    padding: 20px;
    border-radius: 20px;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    height: auto; /* Убираем фиксированную высоту */
    width: 90%; /* Ширина карточек, будет адаптироваться */
    max-width: 400px; /* Ограничиваем максимальную ширину для больших экранов */
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
    transition: transform 0.3s ease-in-out;
    position: relative;
    overflow: hidden;
    margin: 10px auto; /* Центрируем карточки с отступом */
}
/* Затемнение фона карточек для читабельности текста */
.surf-spot-card::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.3); /* Сделать фон прозрачным */
    border-radius: 20px;
    transition: background 0.3s;
}

/* Стиль текста внутри карточки */
.surf-spot-card h3 {
    font-family: 'Playfair Display', serif;
    font-size: 26px; /* Увеличиваем размер заголовка */
    font-weight: bold;
    z-index: 2;
    position: relative;
    margin-bottom: 10px;
    text-align: center; /* Центрируем заголовок */
overflow: hidden;
    text-shadow: 2px 2px 5px rgba(0, 0, 0, 0.7); /* Тень для улучшения читаемости */
}

.surf-spot-card p {
    font-family: 'Roboto', sans-serif;
    font-size: 18px; /* Увеличиваем шрифт текста */
    line-height: 1.4; /* Уменьшаем отступы между строками */
    z-index: 2;
    position: relative;
    text-align: left; /* Текст по левому краю */
    word-wrap: break-word; /* Позволяет переносить текст, чтобы он помещался */
    text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.6); /* Тень для улучшения читаемости */
}

/* Эффект при наведении */
.surf-spot-card:hover {
    transform: scale(1.05);
}

.surf-spot-card:hover::before {
    background: rgba(0, 0, 0, 0.15); /* Уменьшаем затемнение при наведении */
}

/* Фоновые изображения для карточек */
.spot-weligama {
    background-image: url('images/fon1.jpg');
}
.spot-mirissa {
    background-image: url('images/fon2.jpg');
}
.spot-dewota {
    background-image: url('images/fon3.jpg');
}
.spot-arugam {
    background-image: url('images/fon4.jpg');
}

/* Адаптивность для маленьких экранов */
@media (max-width: 1024px) {
    /* При экранах меньше 1024px, карточки становятся немного уже */
    .surf-spot-card {
        width: 300px; /* Уменьшаем ширину карточек */
        height: 400px; /* Уменьшаем высоту карточек */
    }

    .surf-spots-container {
        grid-template-columns: repeat(2, 1fr); /* Оставляем две карточки в ряду */
    }
}

/* Адаптивность для мобильных экранов */
@media (max-width: 768px) {
    /* На мобильных экранах карточки становятся ещё уже */
    .surf-spot-card {
        width: 280px; /* Еще меньше ширина */
        height: 350px; /* Пропорционально уменьшаем высоту */
    }

    .surf-spots-container {
        grid-template-columns: 1fr; /* На мобильных — одна карточка в ряд */
    }

    .sri-lanka-section {
        padding: 20px 10px; /* Меньше отступов по бокам */
    }
}





/* Контейнер для карусели */
.carousel-container {
    display: flex;
    align-items: center;
    gap: 10px;
    overflow: hidden;
    width: 100%;
    max-width: 1200px; /* Ограничиваем ширину контейнера */
    margin: 0 auto;
    position: relative;
    padding: 20px 0;
    justify-content: center;  /* Центрируем контейнер на странице */
}

/* Контейнер для всех элементов карусели */
.carousel-track {
    display: flex;
    gap: 15px; /* Расстояние между фотографиями */
    width: auto;
    transition: transform 0.5s ease-in-out; /* Плавное движение */
}

/* Элемент карусели (каждое изображение) */
.carousel-item {
    flex: 0 0 auto;
    width: 200px;  /* фиксированная ширина для каждого изображения */
    height: 200px; /* Высота фото */
    border-radius: 15px; /* Закругленные углы */
    box-shadow: 0px 4px 10px rgba(0, 0, 0, 0.2); /* Тень для глубины */
}

/* Настройки для изображений */
.carousel-item img {
    width: 100%;
    height: 100%;
    display: block;
    border-radius: 15px; /* Закругление картинок */
    object-fit: cover; /* Обрезка без искажений */
    transition: transform 0.3s ease-in-out;
}

/* Эффект при наведении на изображение */
.carousel-item img:hover {
    transform: scale(1.05);
}

/* Кнопки прокрутки карусели */
button {
    cursor: pointer;
    padding: 10px;
    font-size: 20px;
    background: #ddd;
    border: none;
    border-radius: 5px;
    z-index: 10;
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
}

/* Позиционирование кнопок слева и справа */
button.prev {
    left: 10px;
}

button.next {
    right: 10px;
}



/* Секция "Контакты" */
/* Контакты как чат */
/* Центрируем весь блок */
.telegram-chat {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 15px;
  padding: 20px;
}

/* Общие стили чат‑бабла */
.chat-bubble {
  max-width: 80%;
  display: flex;
  align-items: flex-start;
}

/* Ссылка‑обёртка для аватарки */
.avatar-link {
  flex-shrink: 0;
  display: inline-block;
  margin-right: 12px;
  border-radius: 50%;
  overflow: hidden;
  cursor: pointer;
}

/* Увеличенный аватар */
.chat-bubble.bot .avatar {
  width: 64px;
  height: 64px;
  background: url('images/ava.jpg') no-repeat center/cover;
}

/* Сообщение */
.chat-bubble .message {
  background: #fff;
  padding: 10px 16px;
  border-radius: 20px;
  box-shadow: 0 4px 10px rgba(0,0,0,0.1);
  font-family: 'Pacifico', cursive;
  color: #333;
  line-height: 0,8; /* Минимальный межстрочный интервал */
  text-align: left;
  min-height:60px;
  max-height: 120px;
  overflow-y: auto;
  font-size: 0,9em;
}

/* Сообщение и аватар на одной линии по нижнему краю */
.chat-bubble {
  display: flex;
  align-items: flex-end; /* Выравнивание по нижнему краю */
  max-width: 80%;
}
/* Ссылка на Telegram */
.telegram-link {
  display: inline-flex;
  align-items: center;
  color: #00A7C2;
  text-decoration: none;
  font-weight: bold;
  margin-top: 8px;
}

.telegram-icon {
  width: 28px;
  height: 28px;
  margin-right: 8px;
  display: block;
}

.telegram-link:hover .telegram-icon {
  filter: brightness(0.8);
}



/* Подвал */

/* Настройка текста в подвале */
.footer-content p {
  margin: 5px 0;
  font-size: 1em; /* размер шрифта */
  color: #D8B26E; /* цвет текста */
}

/* Адаптивность для мобильных устройств */
@media (max-width: 768px) {
    header h1 {
        font-size: 2em;
    }
    header p {
        font-size: 1.2em;
    }
    .section h2 {
        font-size: 1.5em;
 text-align: center;
    }
    .package-card {
        padding: 15px;
   
    }
    .packages {
        grid-template-columns: 1fr;
    }

@media (max-width: 480px) {
    header {
        flex-direction: column;
        text-align: center;
    }
    header p {
        margin-top: 10px;
    }
    nav {
        flex-direction: column;
    }

.animated-title {
    font-size: 48px;
    font-family: "Pacifico", cursive;
    color: #FF6B6B;
    text-align: center;
    position: relative;
    z-index: 10;
    white-space: nowrap;
    overflow: hidden;
    display: inline-block;
}



}
