/*
 * Custom styles for the Kazakhstan landing page
 * The design draws inspiration from the blue‑toned palette of the original mostopora.ru site.  
 * Sections are arranged with generous spacing, animated on scroll via AOS, and fully responsive.
 */

/* CSS variables for easy theming */
:root {
  --primary: #0d274d;      /* deep navy tone inspired by the original site */
  --secondary: #1e3a67;    /* darker blue for gradients */
  /* Updated accent color: replaced warm orange with a bright blue to harmonize with the deep blues of the site */
  --accent: #357ABD;
  --light: #f8f9fa;        /* very light background */
  --dark-text: #333333;    /* dark text for readability on light surfaces */
  --max-width: 1200px;
}

/* Global resets */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: 'Montserrat', sans-serif;
  line-height: 1.6;
  background: var(--light);
  color: var(--dark-text);
  overflow-x: hidden;
}

a {
  color: inherit;
  text-decoration: none;
  transition: color 0.2s ease;
}

img {
  max-width: 100%;
  display: block;
}

.container {
  width: 90%;
  max-width: var(--max-width);
  margin: 0 auto;
}

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: var(--primary);
  color: #ffffff;
  padding: 12px 0;
  transition: background 0.3s ease;
}

.header-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  position: relative; /* allow absolutely positioned nav menu */
}

.logo {
  font-weight: 700;
  font-size: 1.4rem;
  color: #ffffff;
  letter-spacing: 0.05em;
}

.nav {
  display: flex;
  gap: 20px;
  align-items: center;
}

.nav a {
  color: #ffffff;
  font-weight: 500;
  position: relative;
}

.nav a::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--accent);
  transition: width 0.3s ease;
}

.nav a:hover::after {
  width: 100%;
}

/* Language switcher */
.language-switch {
  display: flex;
  gap: 8px;
}

.lang-btn {
  background: transparent;
  border: none;
  color: #ffffff;
  font-weight: 600;
  padding: 4px 8px;
  cursor: pointer;
  opacity: 0.8;
  border-bottom: 2px solid transparent;
  transition: opacity 0.2s ease, border-color 0.2s ease;
}

.lang-btn:hover {
  opacity: 1;
}

.lang-btn.active {
  opacity: 1;
  border-color: var(--accent);
}

/* Hero section */
/* Hero background with gradient and photo from original site */
.hero {
  position: relative;
  /* combine gradient and image: gradient overlays the photo */
  background: linear-gradient(135deg, var(--primary), var(--secondary)), url('../img/hero-bg.jpg');
  background-size: cover;
  background-position: center;
  color: #ffffff;
  text-align: center;
  padding: 120px 20px 160px;
  overflow: hidden;
}

.hero-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(to bottom, rgba(0, 0, 0, 0.4), rgba(0, 0, 0, 0.7));
  z-index: 1;
}

.hero-content {
  position: relative;
  z-index: 2;
  max-width: 900px;
  margin: 0 auto;
}

.hero h1 {
  font-size: 2.4rem;
  margin-bottom: 20px;
  line-height: 1.3;
}

.hero p {
  font-size: 1.1rem;
  margin-bottom: 30px;
  opacity: 0.9;
}

.hero-buttons {
  display: flex;
  justify-content: center;
  gap: 15px;
  flex-wrap: wrap;
}

/* Buttons */
.btn {
  display: inline-block;
  padding: 12px 28px;
  border-radius: 4px;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  transition: transform 0.2s ease, background 0.2s ease, color 0.2s ease;
  border: 1px solid transparent;
}

.btn.primary {
  background: var(--accent);
  color: #ffffff;
  border-color: var(--accent);
}

.btn.primary:hover {
  /* slightly darker shade on hover */
  background: #2f6aa5;
  transform: translateY(-2px);
}

.btn.secondary {
  background: transparent;
  color: #ffffff;
  border-color: #ffffff;
}

.btn.secondary:hover {
  background: rgba(255, 255, 255, 0.1);
  transform: translateY(-2px);
}

.btn.tertiary {
  background: transparent;
  border-color: var(--primary);
  color: var(--primary);
  padding: 8px 20px;
  font-size: 0.9rem;
}

.btn.tertiary:hover {
  background: var(--primary);
  color: #ffffff;
}

/* Services section */
.services-section {
  padding: 60px 0;
  background: var(--light);
}

.services-section h2 {
  text-align: center;
  color: var(--primary);
  margin-bottom: 40px;
  font-size: 2rem;
}

.services-grid {
  display: grid;
  gap: 20px;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
}

.service-card {
  background: #ffffff;
  border-radius: 8px;
  padding: 25px 20px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.service-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
}

.service-card .icon {
  font-size: 40px;
  color: var(--accent);
  margin-bottom: 12px;
}

.service-card h3 {
  font-size: 1.2rem;
  color: var(--primary);
  margin-bottom: 10px;
}

.service-card p {
  font-size: 0.95rem;
  color: #555555;
  margin-bottom: 20px;
}

/* Image inside service cards */
.service-image {
  width: 100%;
  height: 160px;
  background-size: cover;
  background-position: center;
  border-radius: 6px;
  margin-bottom: 12px;
}

/* Highlight main services */
.services-grid .primary-service {
  border: 2px solid var(--accent);
}

@media (min-width: 768px) {
  .services-grid .primary-service {
    grid-column: span 2;
  }
}

/* Gallery section */
.gallery-section {
  padding: 60px 0;
  background: var(--light);
}

.gallery-section h2 {
  text-align: center;
  color: var(--primary);
  margin-bottom: 40px;
  font-size: 2rem;
}

.gallery-grid {
  display: grid;
  gap: 20px;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
}

.gallery-item {
  background: #ffffff;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  overflow: hidden;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.gallery-item:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
}

.gallery-item img {
  width: 100%;
  height: 160px;
  object-fit: cover;
}

.gallery-item h4 {
  font-size: 1.1rem;
  margin: 12px 15px 6px;
  color: var(--primary);
}

.gallery-item p {
  font-size: 0.9rem;
  margin: 0 15px 15px;
  color: #555555;
}

/* Advantages section */
.advantages-section {
  padding: 60px 0;
  background: var(--light);
}

.advantages-section h2 {
  text-align: center;
  color: var(--primary);
  margin-bottom: 40px;
  font-size: 2rem;
}

.advantages-grid {
  display: grid;
  gap: 20px;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.advantage-item {
  background: #ffffff;
  border-radius: 8px;
  padding: 20px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
  text-align: center;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.advantage-item:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 20px rgba(0,0,0,0.15);
}

.advantage-item .value {
  font-size: 2.4rem;
  font-weight: 700;
  color: var(--accent);
  margin-bottom: 10px;
}

.advantage-item p {
  font-size: 0.95rem;
  color: #555555;
}

/* Hero video */
.hero-video {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
}

.hero-video iframe {
  width: 100%;
  height: 100%;
  border: none;
}

/* Lightbox overlay for gallery */
.lightbox {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.8);
  display: none;
  justify-content: center;
  align-items: center;
  z-index: 3000;
}

.lightbox.show {
  display: flex;
}

.lightbox-content {
  position: relative;
  max-width: 90%;
  max-height: 90%;
}

.lightbox-image {
  max-width: 100%;
  max-height: 100%;
  border-radius: 6px;
}

.lightbox-close {
  position: absolute;
  top: -40px;
  right: 0;
  background: none;
  border: none;
  color: #ffffff;
  font-size: 32px;
  cursor: pointer;
}

@media (max-width: 480px) {
  .lightbox-close {
    top: -30px;
    font-size: 28px;
  }
}

/* Popup images */
.popup-image {
  width: 100%;
  max-height: 250px;
  object-fit: cover;
  border-radius: 6px;
  margin-bottom: 16px;
}

/* Hamburger menu */
.hamburger {
  display: none;
  flex-direction: column;
  gap: 4px;
  cursor: pointer;
  background: none;
  border: none;
}

.hamburger span {
  width: 25px;
  height: 3px;
  background: #ffffff;
  transition: transform 0.3s ease, opacity 0.3s ease;
}

@media (max-width: 768px) {
  .nav {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--primary);
    flex-direction: column;
    align-items: flex-start;
    padding: 10px 20px;
    gap: 10px;
    display: none;
  }
  .nav.active {
    display: flex;
  }
  .hamburger {
    display: flex;
  }
  /* hide language switcher inside collapsed nav on mobile? Keep visible next to hamburger */
}

.hamburger.active span:nth-child(1) {
  transform: rotate(45deg) translate(5px, 5px);
}
.hamburger.active span:nth-child(2) {
  opacity: 0;
}
.hamburger.active span:nth-child(3) {
  transform: rotate(-45deg) translate(5px, -5px);
}

/* About section */
.about-section {
  background: var(--primary);
  color: #ffffff;
  padding: 60px 0;
  text-align: center;
}

.about-section h2 {
  font-size: 2rem;
  margin-bottom: 20px;
  color: var(--accent);
}

.about-section p {
  max-width: 800px;
  margin: 0 auto;
  line-height: 1.6;
  opacity: 0.95;
}

/* Popups */
.popup {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.75);
  display: none;
  justify-content: center;
  align-items: center;
  padding: 20px;
  z-index: 2000;
}

.popup.show {
  display: flex;
}

.popup-content {
  background: #ffffff;
  max-width: 600px;
  width: 100%;
  border-radius: 8px;
  padding: 30px 40px;
  position: relative;
  max-height: 90vh;
  overflow-y: auto;
}

.popup-content h3 {
  margin-top: 0;
  margin-bottom: 16px;
  color: var(--primary);
  font-size: 1.5rem;
}

.popup-content p {
  margin-bottom: 20px;
  line-height: 1.5;
  color: var(--dark-text);
}

.popup-close {
  position: absolute;
  top: 16px;
  right: 16px;
  background: none;
  border: none;
  font-size: 26px;
  color: #999999;
  cursor: pointer;
  transition: color 0.2s ease;
}

.popup-close:hover {
  color: var(--dark-text);
}

/* Order form */
.order-form input,
.order-form textarea {
  width: 100%;
  padding: 10px 14px;
  margin-bottom: 12px;
  border: 1px solid #cccccc;
  border-radius: 4px;
  font-family: inherit;
  font-size: 0.95rem;
  transition: border-color 0.2s ease;
}

.order-form input:focus,
.order-form textarea:focus {
  outline: none;
  border-color: var(--primary);
}

.order-form textarea {
  resize: vertical;
  min-height: 100px;
}

.order-form .btn {
  width: 100%;
  font-size: 1rem;
  margin-top: 8px;
}

/* Footer */
.site-footer {
  background: var(--primary);
  color: #ffffff;
  padding: 40px 0;
  text-align: center;
}

.site-footer .contact-info p {
  margin: 5px 0;
  font-size: 0.9rem;
}

.footer-bottom {
  margin-top: 20px;
}

.footer-bottom .admin-link {
  color: var(--accent);
  font-weight: 500;
  transition: color 0.2s ease;
}

.footer-bottom .admin-link:hover {
  color: #ffffff;
}

/* Responsive tweaks */
@media (max-width: 768px) {
  .hero h1 {
    font-size: 1.9rem;
  }
  .hero p {
    font-size: 1rem;
  }
  .service-card {
    padding: 20px 15px;
  }
  .popup-content {
    padding: 20px 25px;
  }
}

@media (max-width: 480px) {
  /* Adjust hero padding on very small screens */
  .hero {
    padding: 100px 15px 120px;
  }
}