/* ===================================
   MR stavebné realizácie - Custom Styles
   Design: Rustic & Craft
   =================================== */

:root {
  --primary: #8B4513;
  --secondary: #2C2C2C;
  --accent: #D4A843;
  --dark: #1A1A1A;
  --light: #F5F5F0;
  --text: #333333;
  --text-light: #666666;
}

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

html {
  scroll-behavior: smooth;
  overflow-x: hidden;
}

body {
  overflow-x: hidden;
}

/* ===================================
   Loader Animation
   =================================== */
@keyframes spin {
  to { transform: rotate(360deg); }
}

/* ===================================
   Typography
   =================================== */
h1, h2, h3, h4, h5, h6 {
  font-family: 'Archivo', sans-serif;
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.02em;
}

p, a, li, span {
  font-family: 'DM Sans', sans-serif;
  line-height: 1.7;
}

/* ===================================
   Buttons
   =================================== */
.btn-primary {
  display: inline-block;
  padding: 14px 32px;
  background: var(--primary);
  color: white;
  font-weight: 600;
  border-radius: 8px;
  text-decoration: none;
  transition: all 0.3s ease;
  box-shadow: 0 2px 8px rgba(139, 69, 19, 0.2);
}

.btn-primary:hover {
  background: #6d3410;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(139, 69, 19, 0.3);
}

.btn-secondary {
  display: inline-block;
  padding: 14px 32px;
  background: transparent;
  color: white;
  font-weight: 600;
  border: 2px solid white;
  border-radius: 8px;
  text-decoration: none;
  transition: all 0.3s ease;
}

.btn-secondary:hover {
  background: white;
  color: var(--secondary);
  transform: translateY(-2px);
}

.btn-accent {
  display: inline-block;
  padding: 16px 40px;
  background: var(--accent);
  color: var(--dark);
  font-weight: 700;
  font-size: 1.125rem;
  border-radius: 8px;
  text-decoration: none;
  transition: all 0.3s ease;
  box-shadow: 0 4px 16px rgba(212, 168, 67, 0.3);
}

.btn-accent:hover {
  background: #c49a3a;
  transform: translateY(-3px);
  box-shadow: 0 6px 20px rgba(212, 168, 67, 0.4);
}

/* ===================================
   Navigation
   =================================== */
.navbar {
  background: transparent;
}

.navbar.scrolled {
  background: rgba(255, 255, 255, 0.98);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  box-shadow: 0 2px 20px rgba(0, 0, 0, 0.08);
}

.navbar .logo-text {
  color: white;
  transition: color 0.3s ease;
}

.navbar.scrolled .logo-text {
  color: var(--secondary);
}

.nav-links a {
  color: white;
  text-decoration: none;
  font-weight: 500;
  transition: color 0.3s ease;
  position: relative;
}

.navbar.scrolled .nav-links a {
  color: var(--secondary);
}

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

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

.mobile-menu-toggle {
  color: white;
  background: none;
  border: none;
  cursor: pointer;
  transition: color 0.3s ease;
}

.navbar.scrolled .mobile-menu-toggle {
  color: var(--secondary);
}

.mobile-menu {
  background: white;
  border-top: 1px solid #e5e5e5;
}

.mobile-nav-links a {
  color: var(--secondary);
  text-decoration: none;
  font-weight: 500;
  padding: 12px 0;
  display: block;
  transition: color 0.3s ease;
}

.mobile-nav-links a:hover {
  color: var(--primary);
}

/* ===================================
   Hero Section
   =================================== */
.hero-section {
  position: relative;
  padding-top: 80px;
  overflow-x: hidden;
}

.hero-bg {
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}

.hero-bg::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(26, 26, 26, 0.85) 0%, rgba(26, 26, 26, 0.4) 100%);
}

/* ===================================
   About Section
   =================================== */
#about_1 {
  overflow-x: hidden;
}

/* ===================================
   Services List
   =================================== */
#services_1 {
  overflow-x: hidden;
}

.service-item {
  display: grid;
  grid-template-columns: 1fr;
  gap: 3rem;
  align-items: center;
  background: white;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.06);
  transition: all 0.4s ease;
}

@media (min-width: 1024px) {
  .service-item {
    grid-template-columns: 1fr 1fr;
  }
  
  .service-item:nth-child(even) .service-content {
    order: 2;
  }
  
  .service-item:nth-child(even) .service-image-wrapper {
    order: 1;
  }
}

.service-item:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.12);
}

.service-content {
  padding: 3rem;
}

.service-number {
  font-size: 4rem;
  font-weight: 800;
  color: var(--accent);
  opacity: 0.3;
  line-height: 1;
  margin-bottom: 1rem;
}

.service-title {
  font-size: 2rem;
  font-weight: 700;
  color: var(--secondary);
  margin-bottom: 1rem;
}

.service-description {
  font-size: 1.125rem;
  color: var(--text-light);
  line-height: 1.8;
}

.service-image-wrapper {
  position: relative;
  overflow: hidden;
  height: 400px;
}

.service-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s ease;
}

.service-item:hover .service-image {
  transform: scale(1.08);
}

/* ===================================
   Stats
   =================================== */
.stat-item {
  text-align: center;
  padding: 1.5rem;
  background: var(--light);
  border-radius: 8px;
  transition: all 0.3s ease;
}

.stat-item:hover {
  transform: translateY(-4px);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
}

.stat-value {
  font-size: 3rem;
  font-weight: 800;
  color: var(--primary);
  line-height: 1;
  margin-bottom: 0.5rem;
}

.stat-label {
  font-size: 0.875rem;
  color: var(--text-light);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* ===================================
   CTA Banner
   =================================== */
.cta-banner {
  position: relative;
}

.cta-bg {
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}

/* ===================================
   Gallery
   =================================== */
#gallery_1 {
  overflow-x: hidden;
}

.gallery-item {
  break-inside: avoid;
  margin-bottom: 1.5rem;
  position: relative;
  overflow: hidden;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.3s ease;
}

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

.gallery-item img {
  width: 100%;
  height: auto;
  display: block;
  transition: transform 0.6s ease;
}

.gallery-item:hover img {
  transform: scale(1.05);
}

.gallery-caption {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 1.5rem;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.8), transparent);
  color: white;
  font-weight: 500;
  transform: translateY(100%);
  transition: transform 0.3s ease;
}

.gallery-item:hover .gallery-caption {
  transform: translateY(0);
}

/* ===================================
   Contact Cards
   =================================== */
#contact_1 {
  overflow-x: hidden;
}

.contact-card {
  transition: all 0.3s ease;
}

.contact-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1);
}

.contact-icon {
  width: 40px;
  height: 40px;
  min-width: 40px;
  min-height: 40px;
  background: var(--light);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

/* ===================================
   Contact Form
   =================================== */
.contact-form-wrapper {
  transition: all 0.3s ease;
}

.form-input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(139, 69, 19, 0.1);
}

.form-submit:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none !important;
}

.form-message {
  animation: slideDown 0.3s ease;
}

@keyframes slideDown {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ===================================
   Scroll to Top Button
   =================================== */
.scroll-top-btn.visible {
  opacity: 1;
  pointer-events: all;
}

/* ===================================
   Responsive Utilities
   =================================== */
@media (max-width: 768px) {
  .service-number {
    font-size: 3rem;
  }
  
  .service-title {
    font-size: 1.5rem;
  }
  
  .service-description {
    font-size: 1rem;
  }
  
  .service-content {
    padding: 2rem;
  }
  
  .service-image-wrapper {
    height: 300px;
  }
  
  .stat-value {
    font-size: 2.5rem;
  }
}

/* ===================================
   Accessibility - Reduced Motion
   =================================== */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
  
  .service-item:hover,
  .gallery-item:hover,
  .contact-card:hover,
  .stat-item:hover {
    transform: none !important;
  }
  
  .service-image,
  .gallery-item img {
    transform: none !important;
  }
}

/* ===================================
   Print Styles
   =================================== */
@media print {
  .navbar,
  .mobile-menu,
  .scroll-top-btn,
  #page-loader {
    display: none !important;
  }
  
  body {
    background: white;
  }
  
  a {
    text-decoration: underline;
  }
}


/* ===================================
   Responsive - Small Phones (≤ 480px)
   =================================== */
@media (max-width: 480px) {
  .container {
    padding-left: 1rem;
    padding-right: 1rem;
  }
  
  .hero-section {
    padding-top: 70px;
  }
  
  .stat-value {
    font-size: 2rem;
  }
  
  .stat-label {
    font-size: 0.75rem;
  }
  
  .service-content {
    padding: 1.5rem;
  }
  
  .service-number {
    font-size: 2.5rem;
  }
  
  .service-title {
    font-size: 1.25rem;
  }
  
  .service-description {
    font-size: 0.95rem;
  }
  
  .contact-card {
    padding: 1rem !important;
  }
  
  .contact-icon {
    width: 36px;
    height: 36px;
    min-width: 36px;
    min-height: 36px;
  }
}

/* ===================================
   Responsive - Very Small Screens (< 350px)
   =================================== */
@media (max-width: 350px) {
  .container {
    padding-left: 0.75rem;
    padding-right: 0.75rem;
  }
  
  /* Navigation */
  .navbar .container {
    padding-top: 0.75rem;
    padding-bottom: 0.75rem;
  }
  
  .logo-text {
    font-size: 1.25rem !important;
  }
  
  /* Hero */
  .hero-headline {
    font-size: 2rem !important;
    line-height: 1.2;
  }
  
  .hero-subheadline {
    font-size: 1rem !important;
  }
  
  .hero-content .btn-primary,
  .hero-content .btn-secondary {
    width: 100%;
    text-align: center;
    padding: 12px 20px;
    font-size: 0.95rem;
  }
  
  /* Stats */
  .stats-grid {
    grid-template-columns: 1fr !important;
    gap: 1rem !important;
  }
  
  .stat-value {
    font-size: 1.75rem;
  }
  
  /* About */
  .about-image {
    max-width: 240px;
    margin: 0 auto;
  }
  
  /* Services */
  .service-content {
    padding: 1rem;
  }
  
  .service-number {
    font-size: 2rem;
  }
  
  .service-title {
    font-size: 1.1rem;
  }
  
  .service-description {
    font-size: 0.875rem;
  }
  
  .service-image-wrapper {
    height: 200px;
  }
  
  /* Contact */
  .contact-form-wrapper {
    padding: 1rem !important;
  }
  
  .form-input {
    padding: 10px 12px;
    font-size: 0.95rem;
  }
  
  .contact-card {
    padding: 0.75rem !important;
  }
  
  .contact-card h3 {
    font-size: 0.875rem;
  }
  
  .contact-card a,
  .contact-card p {
    font-size: 0.8rem;
    word-break: break-all;
  }
  
  .contact-icon {
    width: 32px;
    height: 32px;
    min-width: 32px;
    min-height: 32px;
  }
  
  .contact-icon i {
    width: 16px !important;
    height: 16px !important;
  }
  
  /* CTA Banner */
  .cta-banner h2 {
    font-size: 1.75rem !important;
  }
  
  .cta-banner p {
    font-size: 1rem !important;
  }
  
  /* Scroll to top button */
  .scroll-top-btn {
    bottom: 1rem;
    right: 1rem;
    padding: 0.625rem;
  }
  
  .scroll-top-btn i {
    width: 20px !important;
    height: 20px !important;
  }
}
