/* ========================================
   Кузовной Ремонт Тюмень — Styles
   ======================================== */

/* CSS Variables */
:root {
  --primary-dark: #0D0D0D;
  --secondary-dark: #1A1A1A;
  --accent-yellow: #FFD60A;
  --accent-orange: #FF6B35;
  --text-primary: #FFFFFF;
  --text-secondary: #B0B0B0;
  --success-green: #00D26A;
  --border-color: #2A2A2A;
  --shadow: 0 4px 24px rgba(0,0,0,0.5);
  --radius: 12px;
  --radius-sm: 8px;
}

/* Reset & Base */
*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  background: var(--primary-dark);
  color: var(--text-primary);
  line-height: 1.6;
  overflow-x: hidden;
}

a {
  color: inherit;
  text-decoration: none;
}

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

ul {
  list-style: none;
}

/* Container */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

/* Typography */
h1, h2, h3, h4 {
  font-weight: 700;
  line-height: 1.2;
}

h1 {
  font-size: clamp(2rem, 5vw, 3.5rem);
}

h2 {
  font-size: clamp(1.75rem, 4vw, 2.5rem);
  margin-bottom: 1rem;
}

h3 {
  font-size: clamp(1.25rem, 2.5vw, 1.5rem);
}

p {
  color: var(--text-secondary);
}

/* ========================================
   HEADER
   ======================================== */
.header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  background: rgba(13, 13, 13, 0.95);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border-color);
  padding: 12px 0;
  transition: transform 0.3s ease;
}

.header.hidden {
  transform: translateY(-100%);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.logo {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--accent-yellow);
  white-space: nowrap;
}

.logo span {
  color: var(--text-primary);
}

.header-phone {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--text-primary);
  font-weight: 600;
}

.header-phone svg {
  color: var(--accent-yellow);
}

.header-cta {
  display: none;
}

@media (min-width: 768px) {
  .header-cta {
    display: flex;
  }
}

/* Navigation */
.nav {
  display: none;
}

@media (min-width: 1024px) {
  .nav {
    display: flex;
    gap: 32px;
  }
}

.nav a {
  color: var(--text-secondary);
  transition: color 0.2s;
  font-size: 0.9rem;
}

.nav a:hover {
  color: var(--accent-yellow);
}

/* Mobile Menu Button */
.menu-toggle {
  display: flex;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
}

@media (min-width: 1024px) {
  .menu-toggle {
    display: none;
  }
}

.menu-toggle span {
  width: 24px;
  height: 2px;
  background: var(--text-primary);
  transition: all 0.3s;
}

.menu-toggle.active span:nth-child(1) {
  transform: rotate(45deg) translate(5px, 5px);
}

.menu-toggle.active span:nth-child(2) {
  opacity: 0;
}

.menu-toggle.active span:nth-child(3) {
  transform: rotate(-45deg) translate(5px, -5px);
}

/* Mobile Menu */
.mobile-menu {
  position: fixed;
  top: 60px;
  left: 0;
  right: 0;
  background: var(--secondary-dark);
  padding: 20px;
  transform: translateY(-120%);
  transition: transform 0.3s ease;
  z-index: 999;
  border-bottom: 1px solid var(--border-color);
}

.mobile-menu.active {
  transform: translateY(0);
}

.mobile-menu a {
  display: block;
  padding: 12px 0;
  color: var(--text-secondary);
  border-bottom: 1px solid var(--border-color);
}

.mobile-menu a:hover {
  color: var(--accent-yellow);
}

/* ========================================
   BUTTONS
   ======================================== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 16px 32px;
  border-radius: var(--radius-sm);
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  border: 2px solid transparent;
  transition: all 0.2s ease;
  text-align: center;
  white-space: nowrap;
}

.btn svg {
  width: 20px;
  height: 20px;
}

.btn-primary {
  background: var(--accent-yellow);
  color: var(--primary-dark);
}

.btn-primary:hover {
  filter: brightness(1.1);
  transform: scale(1.02);
}

.btn-primary:active {
  transform: scale(0.98);
}

.btn-secondary {
  background: transparent;
  border-color: var(--accent-yellow);
  color: var(--accent-yellow);
}

.btn-secondary:hover {
  background: rgba(255, 214, 10, 0.1);
}

.btn-large {
  padding: 20px 40px;
  font-size: 1.125rem;
}

.btn-icon {
  width: 56px;
  height: 56px;
  padding: 0;
  border-radius: 50%;
}

/* ========================================
   HERO SECTION
   ======================================== */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding: 100px 0 60px;
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse at 20% 80%, rgba(255, 107, 53, 0.15) 0%, transparent 50%),
    radial-gradient(ellipse at 80% 20%, rgba(255, 214, 10, 0.1) 0%, transparent 50%);
  pointer-events: none;
}

.hero-content {
  position: relative;
  z-index: 1;
  text-align: center;
  max-width: 800px;
  margin: 0 auto;
}

.hero h1 {
  margin-bottom: 16px;
}

.hero h1 span {
  color: var(--accent-yellow);
}

.hero-subtitle {
  font-size: clamp(1.125rem, 2vw, 1.5rem);
  margin-bottom: 32px;
  color: var(--text-secondary);
}

.hero-ctas {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-bottom: 48px;
}

@media (min-width: 480px) {
  .hero-ctas {
    flex-direction: row;
    justify-content: center;
  }
}

.hero-triggers {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 24px;
  margin-top: 32px;
}

.trigger {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.9rem;
  color: var(--success-green);
}

/* Before/After Preview */
.hero-gallery {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
  margin-top: 48px;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}

.gallery-item {
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
  aspect-ratio: 4/3;
}

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

.gallery-label {
  position: absolute;
  bottom: 12px;
  left: 12px;
  background: rgba(0,0,0,0.8);
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
}

.gallery-label.before {
  background: var(--accent-orange);
}

.gallery-label.after {
  background: var(--success-green);
}

/* ========================================
   SECTIONS
   ======================================== */
.section {
  padding: 80px 0;
}

@media (max-width: 768px) {
  .section {
    padding: 48px 0;
  }
}

.section-dark {
  background: var(--secondary-dark);
}

.section-header {
  text-align: center;
  max-width: 700px;
  margin: 0 auto 48px;
}

.section-header p {
  margin-top: 16px;
  font-size: 1.1rem;
}

/* ========================================
   QUICK ESTIMATE BLOCK
   ======================================== */
.estimate {
  background: linear-gradient(135deg, var(--secondary-dark) 0%, #252525 100%);
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  padding: 48px 24px;
  text-align: center;
}

.estimate h2 {
  margin-bottom: 8px;
}

.estimate-subtitle {
  color: var(--text-secondary);
  margin-bottom: 32px;
}

.estimate-ctas {
  display: flex;
  flex-direction: column;
  gap: 16px;
  max-width: 400px;
  margin: 0 auto 32px;
}

.estimate-triggers {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 24px;
}

/* ========================================
   TRUST BLOCK
   ======================================== */
.trust-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 24px;
}

.trust-item {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  padding: 24px;
  background: var(--secondary-dark);
  border-radius: var(--radius);
  border: 1px solid var(--border-color);
  transition: border-color 0.2s;
}

.trust-item:hover {
  border-color: var(--accent-yellow);
}

.trust-icon {
  width: 48px;
  height: 48px;
  background: rgba(255, 214, 10, 0.1);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent-yellow);
  flex-shrink: 0;
}

.trust-item h4 {
  margin-bottom: 4px;
}

.trust-item p {
  font-size: 0.9rem;
}

/* ========================================
   PORTFOLIO
   ======================================== */
.portfolio-filters {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
  margin-bottom: 40px;
}

.filter-btn {
  padding: 10px 24px;
  background: transparent;
  border: 1px solid var(--border-color);
  border-radius: 30px;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.2s;
  font-size: 0.9rem;
}

.filter-btn:hover,
.filter-btn.active {
  background: var(--accent-yellow);
  border-color: var(--accent-yellow);
  color: var(--primary-dark);
}

.portfolio-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 24px;
}

.portfolio-card {
  background: var(--secondary-dark);
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--border-color);
  transition: all 0.3s ease;
}

.portfolio-card:hover {
  border-color: var(--accent-yellow);
  transform: translateY(-4px);
}

.portfolio-images {
  display: grid;
  grid-template-columns: 1fr 1fr;
  aspect-ratio: 2/1;
}

.portfolio-images img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s;
}

.portfolio-card:hover .portfolio-images img {
  transform: scale(1.05);
}

.portfolio-info {
  padding: 20px;
}

.portfolio-category {
  display: inline-block;
  padding: 4px 12px;
  background: rgba(255, 214, 10, 0.1);
  color: var(--accent-yellow);
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  margin-bottom: 12px;
}

.portfolio-info h3 {
  margin-bottom: 8px;
}

.portfolio-meta {
  display: flex;
  gap: 16px;
  margin-top: 12px;
  font-size: 0.85rem;
  color: var(--text-secondary);
}

.portfolio-meta span {
  display: flex;
  align-items: center;
  gap: 4px;
}

/* ========================================
   SERVICES
   ======================================== */
.services-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 24px;
}

.service-card {
  background: var(--secondary-dark);
  border-radius: var(--radius);
  padding: 32px;
  border: 1px solid var(--border-color);
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.service-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--accent-yellow);
  transform: scaleX(0);
  transition: transform 0.3s;
}

.service-card:hover {
  border-color: var(--accent-yellow);
  transform: translateY(-4px);
}

.service-card:hover::before {
  transform: scaleX(1);
}

.service-icon {
  width: 56px;
  height: 56px;
  background: rgba(255, 214, 10, 0.1);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent-yellow);
  margin-bottom: 20px;
}

.service-card h3 {
  margin-bottom: 12px;
}

.service-card p {
  font-size: 0.9rem;
  margin-bottom: 20px;
}

.service-link {
  color: var(--accent-yellow);
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: gap 0.2s;
}

.service-link:hover {
  gap: 10px;
}

/* ========================================
   PROCESS
   ======================================== */
.process-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 24px;
}

.process-step {
  text-align: center;
  padding: 24px;
  position: relative;
}

.step-number {
  width: 64px;
  height: 64px;
  background: var(--accent-yellow);
  color: var(--primary-dark);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  font-weight: 700;
  margin: 0 auto 20px;
}

.process-step h4 {
  margin-bottom: 8px;
}

.process-step p {
  font-size: 0.9rem;
}

/* ========================================
   CTA BLOCK
   ======================================== */
.cta-block {
  background: linear-gradient(135deg, var(--accent-yellow) 0%, var(--accent-orange) 100%);
  border-radius: var(--radius);
  padding: 48px 24px;
  text-align: center;
  color: var(--primary-dark);
}

.cta-block h2 {
  color: var(--primary-dark);
  margin-bottom: 8px;
}

.cta-block p {
  color: rgba(13, 13, 13, 0.7);
  margin-bottom: 32px;
}

.cta-block-btns {
  display: flex;
  flex-direction: column;
  gap: 16px;
  max-width: 400px;
  margin: 0 auto;
}

.cta-block .btn-secondary {
  border-color: var(--primary-dark);
  color: var(--primary-dark);
}

.cta-block .btn-secondary:hover {
  background: rgba(13, 13, 13, 0.1);
}

/* ========================================
   FOOTER
   ======================================== */
.footer {
  background: var(--secondary-dark);
  border-top: 1px solid var(--border-color);
  padding: 48px 0 24px;
}

.footer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 40px;
  margin-bottom: 40px;
}

.footer h4 {
  color: var(--accent-yellow);
  margin-bottom: 16px;
  font-size: 1rem;
}

.footer-contact-item {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
  color: var(--text-secondary);
}

.footer-contact-item svg {
  color: var(--accent-yellow);
  flex-shrink: 0;
}

.footer a {
  color: var(--text-secondary);
  transition: color 0.2s;
}

.footer a:hover {
  color: var(--accent-yellow);
}

.footer-bottom {
  padding-top: 24px;
  border-top: 1px solid var(--border-color);
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 16px;
  font-size: 0.85rem;
  color: var(--text-secondary);
}

/* ========================================
   FLOATING CALL BUTTON
   ======================================== */
.floating-call {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 999;
  display: flex;
  flex-direction: column;
  gap: 12px;
  opacity: 0;
  visibility: hidden;
  transform: translateY(20px);
  transition: all 0.3s ease;
}

.floating-call.visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.floating-call .btn-primary {
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0%, 100% {
    box-shadow: 0 0 0 0 rgba(255, 214, 10, 0.5);
  }
  50% {
    box-shadow: 0 0 0 15px rgba(255, 214, 10, 0);
  }
}

.messenger-buttons {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.messenger-btn {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--secondary-dark);
  border: 1px solid var(--border-color);
  color: var(--text-primary);
  transition: all 0.2s;
  opacity: 0;
  transform: translateX(20px);
}

.floating-call.visible .messenger-btn {
  opacity: 1;
  transform: translateX(0);
}

.floating-call.visible .messenger-btn:nth-child(1) { transition-delay: 0.1s; }
.floating-call.visible .messenger-btn:nth-child(2) { transition-delay: 0.2s; }
.floating-call.visible .messenger-btn:nth-child(3) { transition-delay: 0.3s; }

.messenger-btn:hover {
  border-color: var(--accent-yellow);
  color: var(--accent-yellow);
}

/* ========================================
   PAGE HEADER (Inner Pages)
   ======================================== */
.page-header {
  padding: 120px 0 60px;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.page-header::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at center, rgba(255, 214, 10, 0.1) 0%, transparent 70%);
  pointer-events: none;
}

.page-header h1 {
  position: relative;
  margin-bottom: 16px;
}

.page-header p {
  font-size: 1.125rem;
  max-width: 600px;
  margin: 0 auto;
}

/* ========================================
   SERVICE PAGE CONTENT
   ======================================== */
.service-content {
  max-width: 800px;
  margin: 0 auto;
}

.service-content p {
  margin-bottom: 1.5rem;
  font-size: 1.05rem;
  line-height: 1.8;
}

.service-content h3 {
  color: var(--accent-yellow);
  margin: 2rem 0 1rem;
}

.service-content ul {
  margin-bottom: 1.5rem;
}

.service-content li {
  position: relative;
  padding-left: 24px;
  margin-bottom: 12px;
  color: var(--text-secondary);
}

.service-content li::before {
  content: '✓';
  position: absolute;
  left: 0;
  color: var(--accent-yellow);
}

/* ========================================
   ADMIN STYLES
   ======================================== */
.admin-container {
  max-width: 1000px;
  margin: 0 auto;
  padding: 100px 20px;
}

.admin-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 32px;
  flex-wrap: wrap;
  gap: 16px;
}

.admin-form {
  background: var(--secondary-dark);
  padding: 32px;
  border-radius: var(--radius);
  margin-bottom: 40px;
  border: 1px solid var(--border-color);
}

.form-group {
  margin-bottom: 20px;
}

.form-group label {
  display: block;
  margin-bottom: 8px;
  font-weight: 600;
  color: var(--text-secondary);
}

.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 12px 16px;
  background: var(--primary-dark);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  font-size: 1rem;
  font-family: inherit;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--accent-yellow);
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

@media (max-width: 600px) {
  .form-row {
    grid-template-columns: 1fr;
  }
}

.image-upload-area {
  border: 2px dashed var(--border-color);
  border-radius: var(--radius-sm);
  padding: 40px;
  text-align: center;
  cursor: pointer;
  transition: all 0.2s;
}

.image-upload-area:hover {
  border-color: var(--accent-yellow);
}

.image-preview {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-top: 16px;
}

.image-preview img {
  width: 100%;
  aspect-ratio: 4/3;
  object-fit: cover;
  border-radius: var(--radius-sm);
}

.admin-list {
  display: grid;
  gap: 16px;
}

.admin-item {
  background: var(--secondary-dark);
  border-radius: var(--radius);
  padding: 20px;
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 16px;
  align-items: center;
  border: 1px solid var(--border-color);
}

.admin-item-images {
  display: flex;
  gap: 8px;
}

.admin-item-images img {
  width: 80px;
  height: 60px;
  object-fit: cover;
  border-radius: 4px;
}

.admin-item-info h4 {
  margin-bottom: 4px;
}

.admin-item-info span {
  font-size: 0.8rem;
  color: var(--accent-yellow);
}

.admin-item-actions {
  display: flex;
  gap: 8px;
}

.admin-item-actions button {
  padding: 8px 16px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-size: 0.85rem;
  border: none;
  transition: all 0.2s;
}

.btn-edit {
  background: var(--accent-yellow);
  color: var(--primary-dark);
}

.btn-delete {
  background: #dc3545;
  color: white;
}

/* ========================================
   LOGIN PAGE
   ======================================== */
.login-container {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.login-form {
  background: var(--secondary-dark);
  padding: 40px;
  border-radius: var(--radius);
  width: 100%;
  max-width: 400px;
  border: 1px solid var(--border-color);
}

.login-form h2 {
  text-align: center;
  margin-bottom: 32px;
}

/* ========================================
   ANIMATIONS
   ======================================== */
.fade-in {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ========================================
   UTILITIES
   ======================================== */
.text-center {
  text-align: center;
}

.mt-4 {
  margin-top: 32px;
}

.mb-4 {
  margin-bottom: 32px;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}
