@charset "utf-8";
/* CSS Document */
		#scrollToTopBtn {
  			position: fixed; /* Фиксированное позиционирование */
  			bottom: 20px; /* Отступ снизу */
  			right: 100px; /* Отступ справа */
  			z-index: 99; /* Поверх других элементов */
  			border: none;
  			outline: none;
  			background-color: lightpink;
  			color: white;
  			cursor: pointer;
  			padding: 15px;
  			border-radius: 10px;
  			font-size: 18px;
			border: 2px solid white;
  
  			/* Начальное состояние: кнопка полностью прозрачна и некликабельна */
  			opacity: 0;
  			visibility: hidden;
  
  			/* Настройка плавной анимации для прозрачности и видимости */
  			transition: opacity 0.4s ease, visibility 0.4s ease; 
		}

		/* Класс, который будет добавляться через JavaScript при прокрутке */
		#scrollToTopBtn.show {
  			opacity: 1;
  			visibility: visible;
		}

		#scrollToTopBtn:hover {
  			background-color: hotpink;
		}

		* {
            margin: 0;
            padding: 0;
            box-sizing: border-box;
        }

        body {
            font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
            background: linear-gradient(135deg, #667eea 0%, pink 100%);
            min-height: 100vh;
            padding: 20px;
        }

        .container {
            max-width: 1200px;
            margin: 0 auto;
        }

        header {
            text-align: center;
            padding: 40px 20px;
            color: white;
        }

        h1 {
            font-size: 3rem;
            margin-bottom: 10px;
            text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
        }

        .subtitle {
            font-size: 1.2rem;
            opacity: 0.9;
        }

        .gallery {
            display: grid;
            grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
            gap: 20px;
            padding: 20px 0;
        }

        .tile {
            background: white;
            border-radius: 15px;
            overflow: hidden;
            box-shadow: 0 10px 30px rgba(0,0,0,0.2);
            transition: all 0.3s ease;
            aspect-ratio: 0.8;
            position: relative;
        }

        .tile:hover {
            transform: translateY(-10px);
            box-shadow: 0 20px 40px rgba(0,0,0,0.3);
        }

        .tile img {
            width: 100%;
            height: 100%;
            object-fit: cover;
            transition: transform 0.3s ease;
        }

        .tile:hover img {
            transform: scale(1.1);
        }

        .tile-content {
            position: absolute;
            bottom: 0;
            left: 0;
            right: 0;
            background: linear-gradient(transparent, rgba(0,0,0,0.8));
            color: white;
            padding: 20px;
            transform: translateY(100%);
            transition: transform 0.3s ease;
        }

        .tile:hover .tile-content {
            transform: translateY(0);
        }

        .tile h3 {
            font-size: 1.2rem;
            margin-bottom: 5px;
        }

        .tile p {
            font-size: 0.9rem;
            opacity: 0.8;
        }

        footer {
            text-align: center;
            padding: 30px;
            color: white;
            margin-top: 20px;
        }

        @media (max-width: 768px) {
            .gallery {
                grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
                gap: 15px;
            }
            
            h1 {
                font-size: 2rem;
            }
        }
		
		/* Всплывающая форма */
		.popup-form {
  			display: none;
  			position: fixed;
  			bottom: 20px;
  			right: 20px;
  			width: 300px;
  			background-color: #667eea;
  			border-radius: 10px;
  			box-shadow: 0 4px 15px rgba(0,0,0,0.4);
  			z-index: 1000;
		}

		.form-container {
  			padding: 20px;
  			position: relative;
		}

		.close-btn {
  			position: absolute;
  			top: 10px;
  			right: 15px;
  			font-size: 24px;
  			cursor: pointer;
  			color: white;
		}

		.form-container h2 {
  			margin-bottom: 15px;
  			text-align: center;
		}

		.form-container label {
  			display: block;
  			margin-top: 10px;
  			font-weight: bold;
		}

		.form-container input {
  			width: 100%;
  			padding: 8px;
  			margin-top: 5px;
  			border: 1px solid #ccc;
  			border-radius: 5px;
  			box-sizing: border-box;
		}

		.form-container button {
  			width: 100%;
  			padding: 10px;
  			margin-top: 15px;
  			background-color: #4CAF50;
  			color: white;
  			border: none;
  			border-radius: 5px;
  			cursor: pointer;
  			font-size: 16px;
		}

		.form-container button:hover {
  			background-color: #45a049;
		}

		/* Плавающая кнопка */
		.floating-btn {
  			position: fixed;
  			bottom: 20px;
  			right: 20px;
  			width: 60px;
  			height: 60px;
  			border-radius: 50%;
  			background-color: lightpink;
  			color: white;
  			font-size: 24px;
  			cursor: pointer;
  			box-shadow: 0 4px 10px rgba(0,0,0,0.2);
  			border: 2px solid white;
  			z-index: 999;
  			transition: transform 0.3s ease;
		}

		.floating-btn:hover {
  			transform: scale(1.1);
		} 
		
		/* Стили плитки */
		.tile {
    		overflow: hidden;
    		border-radius: 8px;
    		box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    		cursor: pointer;
    		transition: transform 0.2s ease;
    		background: #fff;
    		aspect-ratio: 0.8; /* Делает плитку квадратной */
		}

		.tile:hover {
    		transform: scale(1.03);
		}

		.tile-img {
    		width: 100%;
    		height: 100%;
    		object-fit: cover; /* Заполняет плитку без искажений */
		}

		/* Модальное окно (задний фон) */
		.modal {
    		display: none; 
    		position: fixed;
    		z-index: 1000;
    		left: 0;
    		top: 0;
    		width: 100%;
    		height: 100%;
   			background-color: rgba(0, 0, 0, 0.85);
    		justify-content: center;
    		align-items: center;
    		opacity: 0;
    		transition: opacity 0.3s ease;
		}

		/* Активное состояние модального окна */
		.modal.show {
    		display: flex;
    		opacity: 1;
		}

		/* Увеличенное изображение */
		.modal-content {
    		max-width: 90%;
    		max-height: 90%;
    		object-fit: contain;
    		border-radius: 4px;
    		transform: scale(0.7);
    		transition: transform 0.3s ease;
		}

		.modal.show .modal-content {
    		transform: scale(1);
		}

		/* Кнопка закрытия */
		.close-btn-2 {
    		position: absolute;
    		top: 20px;
    		right: 30px;
    		color: #fff;
    		font-size: 40px;
    		font-weight: bold;
    		cursor: pointer;
    		user-select: none;
		}
		
		/* Задний фон: темный и полупрозрачный на весь экран */
  .modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    display: flex;
    justify-content: center; /* Центрирование по горизонтали */
    align-items: center;     /* Центрирование по вертикали */
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease; /* Плавное появление */
    z-index: 1000;
  }

  /* Активное состояние окна (когда добавим класс 'active') */
  .modal-overlay.active {
    opacity: 1;
    pointer-events: all;
  }

  /* Белое аккуратное окошко в центре */
  .modal-box {
    background-color: white;
    padding: 30px;
    border-radius: 12px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
    text-align: center;
    max-width: 400px;
    width: 90%;
    font-family: Arial, sans-serif;
    transform: scale(0.8);
    transition: transform 0.3s ease;
  }

  /* Анимация увеличения окошка */
  .modal-overlay.active .modal-box {
    transform: scale(1);
  }

  		