/* Base styles */
html {
  scroll-behavior: smooth;
}

body {
  font-family: Arial, sans-serif;
  margin: 0;
  padding: 0;
  background-image: url("Miestas.jpg");
}

/* Navigation styles */
nav {
  background: linear-gradient(135deg, #2c3e50, #3498db);
  padding: 0;
  text-align: center;
  box-shadow: 0 2px 10px rgba(0,0,0,0.1);
  position: sticky;
  top: 0;
  z-index: 100;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

nav:hover {
  box-shadow: 0 4px 20px rgba(0,0,0,0.15);
}

nav ul {
  list-style-type: none;
  margin: 0;
  padding: 0;
  display: flex;
  justify-content: center;
  align-items: center;
  max-width: 1200px;
  margin: 0 auto;
}

nav ul li {
  position: relative;
  flex: 0 1 auto;
}

nav ul li a {
  display: block;
  color: white;
  text-align: center;
  padding: 20px 30px;
  text-decoration: none;
  font-size: 16px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
}

nav ul li a::before {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 3px;
  background-color: #fff;
  transform: scaleX(0);
  transform-origin: right;
  transition: transform 0.3s ease-in-out;
}

nav ul li a:hover {
  color: #fff;
  background-color: rgba(255, 255, 255, 0.1);
  transform: translateY(-2px);
}

nav ul li a:hover::before {
  transform: scaleX(1);
  transform-origin: left;
}

nav ul li a.active {
  background-color: rgba(255, 255, 255, 0.2);
  color: #fff;
  font-weight: 600;
  transform: translateY(-2px);
}

nav ul li a.active::before {
  transform: scaleX(1);
}

/* Header and Footer with smooth transitions */
header, footer {
  background-color: #f4f4f4;
  padding: 20px;
  text-align: center;
  transition: background-color 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

header:hover, footer:hover {
  background-color: #e8e8e8;
}

.copyright {
  margin-top: 10px;
  padding: 15px;
  border-top: 1px solid #ddd;
}

.copyright p {
  margin: 5px 0;
  font-size: 14px;
  color: #666;
}

.copyright p:first-child {
  font-weight: 500;
  letter-spacing: 0.5px;
}

.copyright .rights {
  font-size: 12px;
  color: #888;
  font-style: italic;
}

/* Common section styles */
.section {
  width: 100%;
  max-width: 1200px;
  margin: 40px auto;
  padding: 40px 20px;
  background-color: #fff;
  border-radius: 8px;
  box-shadow: 0 2px 10px rgba(0,0,0,0.1);
  box-sizing: border-box;
}

.section h2 {
  font-size: 2.5em;
  color: #2c3e50;
  margin-bottom: 20px;
  text-align: center;
  font-weight: 600;
}

.section h3 {
  font-size: 1.5em;
  color: #2c3e50;
  margin-bottom: 15px;
  text-align: center;
}

.section-intro {
  color: #555;
  font-size: 18px;
  line-height: 1.6;
  max-width: 800px;
  margin: 0 auto 30px;
  text-align: center;
}

/* Grid layout */
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 30px;
  margin-top: 40px;
}

/* Content items */
.item {
  background: #fff;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 2px 10px rgba(0,0,0,0.1);
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  padding: 20px;
}

.item:hover {
  transform: translateY(-5px);
  box-shadow: 0 5px 20px rgba(0,0,0,0.15);
}

.item-text {
  color: #555;
  font-size: 16px;
  line-height: 1.6;
  margin-bottom: 15px;
}

.item-list {
  list-style: none;
  padding: 0;
  margin: 20px 0;
}

.item-list li {
  color: #666;
  font-size: 14px;
  padding: 8px 0;
  border-bottom: 1px solid #eee;
}

.item-list li:last-child {
  border-bottom: none;
}

/* Contact form styles */
.contact-form-wrapper {
  width: 800px;
  margin: 0 auto;
  padding: 20px;
}


.form-group {
  margin-bottom: 20px;
  position: relative;
}

.form-group label {
  display: block;
  margin-bottom: 8px;
  color: #333;
  font-weight: 500;
}

.form-group .required {
  color: #e74c3c;
  margin-left: 4px;
}

.form-group input,
.form-group textarea {
  width: 100%;
  padding: 12px;
  border: 1px solid #ddd;
  border-radius: 4px;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  font-size: 14px;
}

.form-group textarea {
  min-height: 120px;
  resize: vertical;
}

.form-group input:focus,
.form-group textarea:focus {
  border-color: #3498db;
  box-shadow: 0 0 5px rgba(52, 152, 219, 0.3);
  outline: none;
}

.form-group .error-message {
  display: block;
  color: #e74c3c;
  font-size: 12px;
  margin-top: 5px;
  min-height: 20px;
}

.form-group input.error,
.form-group textarea.error {
  border-color: #e74c3c;
}

.success-message {
  background-color: #2ecc71;
  color: white;
  padding: 15px;
  border-radius: 4px;
  margin-top: 20px;
  text-align: center;
  transition: all 0.3s ease;
}

.success-message.hidden {
  display: none;
}

hr {
  border-style: dashed;
  color: black;
}

h1, h2, h3, p {
  text-align: center;
}

img {
  display: block;
  margin-left: auto;
  margin-right: auto;
  transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
  backface-visibility: hidden;
}

img:hover {
  transform: scale(1.05);
}

/* Gallery */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 20px;
  padding: 20px 0;
}

.gallery-item {
  position: relative;
  overflow: hidden;
  border-radius: 8px;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
  transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
  cursor: pointer;
}

.gallery-item:hover {
  transform: translateY(-5px) scale(1.02);
  box-shadow: 0 8px 20px rgba(0,0,0,0.15);
}

.gallery-item img {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 8px;
  transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.gallery-item:hover img {
  transform: scale(1.1);
}

.gallery-caption {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: rgba(0, 0, 0, 0.7);
  color: white;
  padding: 10px;
  text-align: center;
  font-size: 14px;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.gallery-item:hover .gallery-caption {
  opacity: 1;
}

/* Button styles with improved interactions */
button {
  padding: 10px 20px;
  background-color: #3498db;
  color: white;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  font-weight: 500;
  position: relative;
  overflow: hidden;
}

button:hover {
  background-color: #2980b9;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

button:active {
  transform: translateY(1px);
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
  transition: all 0.1s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Main content */
/* Responsiveness */
@media screen and (max-width: 768px) {
  .section {
    padding: 20px;
    margin: 20px auto;
  }

  .section h2 {
    font-size: 2em;
  }

  .section h3 {
    font-size: 1.3em;
  }

  .contact-form-wrapper {
    width: 100%;
    padding: 10px;
  }

  .grid {
    grid-template-columns: 1fr;
  }

  .gallery-grid {
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  }
}

main {
  color: #333;
  margin: 20px 0;
  padding: 20px;
}

.intro {
  text-align: center;
  margin-bottom: 40px;
}

.intro h2 {
  font-size: 2.5em;
  color: #2c3e50;
  margin-bottom: 20px;
}

.intro p {
  color: #555;
  font-size: 18px;
  line-height: 1.6;
  max-width: 800px;
  margin: 0 auto;
}
