/* ROR STAY - Lightweight n8n Version Styles */

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

:root {
  --primary: #2563eb;
  --primary-dark: #1d4ed8;
  --secondary: #10b981;
  --gray-50: #f9fafb;
  --gray-100: #f3f4f6;
  --gray-200: #e5e7eb;
  --gray-300: #d1d5db;
  --gray-600: #4b5563;
  --gray-700: #374151;
  --gray-900: #111827;
  --success: #10b981;
  --error: #ef4444;
  --border-radius: 0.5rem;
  --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
  --shadow: 0 4px 6px -1px rgb(0 0 0 / 0.1);
  --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1);
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  line-height: 1.6;
  color: var(--gray-900);
  background: #fff;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* ===== Header & Navigation ===== */
.header {
  background: white;
  box-shadow: var(--shadow-sm);
  position: sticky;
  top: 0;
  z-index: 100;
}

.nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 1.5rem;
}

.logo {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--primary);
}

.nav-menu {
  display: flex;
  gap: 2rem;
  list-style: none;
}

.nav-menu a {
  text-decoration: none;
  color: var(--gray-700);
  font-weight: 500;
  transition: color 0.2s;
}

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

.btn-admin {
  background: var(--primary);
  color: white !important;
  padding: 0.5rem 1rem;
  border-radius: var(--border-radius);
}

/* ===== Hero Section ===== */
.hero {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  padding: 6rem 0;
  text-align: center;
}

.hero-title {
  font-size: 3rem;
  font-weight: 700;
  margin-bottom: 1rem;
}

.hero-subtitle {
  font-size: 1.25rem;
  margin-bottom: 2rem;
  opacity: 0.9;
}

.hero-cta {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
}

/* ===== Buttons ===== */
.btn {
  display: inline-block;
  padding: 0.75rem 1.5rem;
  border-radius: var(--border-radius);
  font-weight: 600;
  text-decoration: none;
  transition: all 0.2s;
  cursor: pointer;
  border: none;
  font-size: 1rem;
}

.btn-primary {
  background: var(--primary);
  color: white;
}

.btn-primary:hover {
  background: var(--primary-dark);
  box-shadow: var(--shadow);
}

.btn-outline {
  background: transparent;
  border: 2px solid currentColor;
  color: var(--primary);
}

.btn-outline:hover {
  background: var(--primary);
  color: white;
}

.btn-lg {
  padding: 1rem 2rem;
  font-size: 1.125rem;
}

.btn-block {
  width: 100%;
}

/* ===== Sections ===== */
.section-title {
  font-size: 2.5rem;
  font-weight: 700;
  text-align: center;
  margin-bottom: 3rem;
  color: var(--gray-900);
}

/* ===== Features ===== */
.features {
  padding: 4rem 0;
  background: var(--gray-50);
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 2rem;
}

.feature-card {
  background: white;
  padding: 2rem;
  border-radius: var(--border-radius);
  text-align: center;
  box-shadow: var(--shadow-sm);
  transition: transform 0.2s, box-shadow 0.2s;
}

.feature-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}

.feature-icon {
  font-size: 3rem;
  margin-bottom: 1rem;
}

.feature-card h3 {
  font-size: 1.25rem;
  margin-bottom: 0.5rem;
  color: var(--gray-900);
}

.feature-card p {
  color: var(--gray-600);
}

/* ===== Listings Section ===== */
.listings-section {
  padding: 4rem 0;
}

.filters-card {
  background: white;
  padding: 1.5rem;
  border-radius: var(--border-radius);
  box-shadow: var(--shadow-sm);
  margin-bottom: 2rem;
}

.filters-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1rem;
}

.listings-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 2rem;
  margin-top: 2rem;
}

.listing-card {
  background: white;
  border-radius: var(--border-radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: transform 0.2s, box-shadow 0.2s;
}

.listing-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}

.listing-image {
  position: relative;
  height: 200px;
  overflow: hidden;
}

.listing-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.listing-price {
  position: absolute;
  top: 1rem;
  right: 1rem;
  background: var(--primary);
  color: white;
  padding: 0.5rem 1rem;
  border-radius: var(--border-radius);
  font-weight: 600;
}

.listing-content {
  padding: 1.5rem;
}

.listing-title {
  font-size: 1.25rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
  color: var(--gray-900);
}

.listing-location {
  color: var(--gray-600);
  margin-bottom: 0.5rem;
}

.listing-type {
  display: inline-block;
  background: var(--gray-100);
  padding: 0.25rem 0.75rem;
  border-radius: 1rem;
  font-size: 0.875rem;
  margin-bottom: 0.75rem;
  color: var(--gray-700);
}

.listing-description {
  color: var(--gray-600);
  font-size: 0.875rem;
  margin-bottom: 1rem;
}

.listing-features {
  font-size: 0.875rem;
  color: var(--gray-600);
  margin-bottom: 1rem;
}

/* ===== Loading ===== */
.loading {
  text-align: center;
  padding: 3rem;
}

.spinner {
  border: 4px solid var(--gray-200);
  border-top: 4px solid var(--primary);
  border-radius: 50%;
  width: 50px;
  height: 50px;
  animation: spin 1s linear infinite;
  margin: 0 auto 1rem;
}

@keyframes spin {
  0% {
    transform: rotate(0deg);
  }

  100% {
    transform: rotate(360deg);
  }
}

/* ===== Contact Section ===== */
.contact-section {
  padding: 4rem 0;
  background: var(--gray-50);
}

.contact-grid {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 2rem;
}

.contact-form-card {
  background: white;
  padding: 2rem;
  border-radius: var(--border-radius);
  box-shadow: var(--shadow-sm);
}

.contact-form-card h3 {
  margin-bottom: 1.5rem;
  font-size: 1.5rem;
}

.contact-info {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.info-card {
  background: white;
  padding: 1.5rem;
  border-radius: var(--border-radius);
  box-shadow: var(--shadow-sm);
}

.info-card h4 {
  margin-bottom: 0.75rem;
  color: var(--gray-900);
}

.info-card p {
  color: var(--gray-600);
  margin-bottom: 0.25rem;
}

/* ===== Forms ===== */
.form {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

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

.form-group {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.form-group label {
  font-weight: 500;
  color: var(--gray-700);
}

.input,
.select,
.textarea {
  padding: 0.75rem;
  border: 1px solid var(--gray-300);
  border-radius: var(--border-radius);
  font-size: 1rem;
  font-family: inherit;
  transition: border-color 0.2s;
}

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

.input-file {
  padding: 0.5rem;
  border: 2px dashed var(--gray-300);
  border-radius: var(--border-radius);
  cursor: pointer;
}

.form-help {
  font-size: 0.875rem;
  color: var(--gray-600);
  margin-top: 0.25rem;
}

/* ===== Image Preview ===== */
.image-preview {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 1rem;
  margin-top: 1rem;
}

.preview-image {
  width: 100%;
  height: 150px;
  object-fit: cover;
  border-radius: var(--border-radius);
  box-shadow: var(--shadow-sm);
}

/* ===== Admin Section ===== */
.admin-section {
  padding: 4rem 0;
  background: var(--gray-50);
  min-height: calc(100vh - 200px);
}

.admin-card {
  background: white;
  padding: 2rem;
  border-radius: var(--border-radius);
  box-shadow: var(--shadow);
  margin-bottom: 2rem;
}

.info-banner {
  background: #dbeafe;
  border-left: 4px solid var(--primary);
  padding: 1.5rem;
  border-radius: var(--border-radius);
}

.info-banner h3 {
  margin-bottom: 1rem;
  color: var(--gray-900);
}

.info-banner ul {
  margin-left: 1.5rem;
  color: var(--gray-700);
}

/* ===== Notifications ===== */
.notification {
  position: fixed;
  top: 2rem;
  right: 2rem;
  padding: 1rem 1.5rem;
  border-radius: var(--border-radius);
  box-shadow: var(--shadow-lg);
  z-index: 1000;
  animation: slideIn 0.3s ease-out;
  max-width: 400px;
}

.notification-success {
  background: var(--success);
  color: white;
}

.notification-error {
  background: var(--error);
  color: white;
}

.notification-info {
  background: var(--primary);
  color: white;
}

.notification.fade-out {
  animation: fadeOut 0.3s ease-out forwards;
}

@keyframes slideIn {
  from {
    transform: translateX(100%);
    opacity: 0;
  }

  to {
    transform: translateX(0);
    opacity: 1;
  }
}

@keyframes fadeOut {
  to {
    opacity: 0;
    transform: translateY(-1rem);
  }
}

/* ===== Footer ===== */
.footer {
  background: var(--gray-900);
  color: white;
  padding: 2rem 0;
  text-align: center;
}

.footer-tech {
  margin-top: 0.5rem;
  opacity: 0.8;
  font-size: 0.875rem;
}

/* ===== Responsive ===== */
@media (max-width: 768px) {

  /* Typography */
  .hero-title {
    font-size: 2rem;
  }

  .section-title {
    font-size: 1.75rem;
  }

  /* Navigation */
  .nav {
    flex-direction: column;
    padding: 1rem;
  }

  .nav-menu {
    flex-direction: column;
    gap: 0.75rem;
    width: 100%;
    margin-top: 1rem;
  }

  .nav-menu li {
    width: 100%;
  }

  .nav-menu a {
    display: block;
    text-align: center;
    padding: 0.75rem;
    background: var(--gray-50);
    border-radius: var(--border-radius);
  }

  /* Hero */
  .hero {
    padding: 3rem 0;
  }

  .hero-cta {
    flex-direction: column;
    width: 100%;
  }

  .btn-lg {
    width: 100%;
  }

  /* Contact Grid */
  .contact-grid {
    grid-template-columns: 1fr;
  }

  /* Form rows */
  .form-row {
    grid-template-columns: 1fr;
  }

  /* Filters */
  .filters-grid {
    grid-template-columns: 1fr;
  }

  /* Listings */
  .listings-grid {
    grid-template-columns: 1fr;
  }

  /* Features */
  .features-grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }

  /* Cards - make them more compact on mobile */
  .feature-card,
  .listing-card {
    margin: 0 auto;
    max-width: 100%;
  }

  /* Container padding */
  .container {
    padding: 0 1rem;
  }

  /* Buttons - larger for touch */
  .btn {
    min-height: 44px;
    padding: 0.875rem 1.5rem;
  }

  /* Input fields - larger for touch */
  .input,
  .select,
  .textarea {
    min-height: 44px;
    font-size: 16px;
    /* Prevents zoom on iOS */
  }

  /* Image preview grid */
  .image-preview {
    grid-template-columns: repeat(2, 1fr);
  }

  /* Admin section */
  .admin-section {
    padding: 2rem 0;
  }

  /* Notification positioning */
  .notification {
    top: 1rem;
    right: 1rem;
    left: 1rem;
    max-width: none;
  }

  /* Footer */
  .footer {
    padding: 1.5rem 0;
    font-size: 0.875rem;
  }
}

/* Extra small devices */
@media (max-width: 480px) {
  .hero-title {
    font-size: 1.75rem;
  }

  .section-title {
    font-size: 1.5rem;
  }

  .listing-price {
    font-size: 0.875rem;
    padding: 0.375rem 0.75rem;
  }

  .btn {
    font-size: 0.875rem;
  }

  .image-preview {
    grid-template-columns: 1fr;
  }
}

/* Landscape orientation improvements */
@media (max-width: 768px) and (orientation: landscape) {
  .hero {
    padding: 2rem 0;
  }

  .nav {
    flex-direction: row;
  }

  .nav-menu {
    flex-direction: row;
    margin-top: 0;
  }
}

/* Touch-friendly improvements */
@media (hover: none) and (pointer: coarse) {

  /* Larger click targets for touch */
  .btn,
  .nav-menu a,
  .input,
  .select {
    min-height: 48px;
  }

  /* Remove hover effects on touch devices */
  .btn:hover,
  .feature-card:hover,
  .listing-card:hover {
    transform: none;
  }

  /* But add active states */
  .btn:active {
    transform: scale(0.98);
  }
}