/* Layout CSS - Responsive grid and structure */

/* CSS Reset and Base Styles */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
  line-height: 1.6;
  color: #333;
  background-color: #fafafa;
}

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

/* Header Layout */
.header {
  background: white;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  position: sticky;
  top: 0;
  z-index: 100;
}

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

.logo h1 {
  font-size: 1.8rem;
  font-weight: 700;
  color: #2563eb;
  margin-bottom: 0.25rem;
}

.tagline {
  font-size: 0.875rem;
  color: #6b7280;
  font-weight: 400;
}

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

.nav a {
  text-decoration: none;
  color: #4b5563;
  font-weight: 500;
  transition: color 0.2s ease;
}

.nav a:hover {
  color: #2563eb;
}

/* Main Layout */
.main {
  min-height: calc(100vh - 200px);
}

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

.hero-content {
  max-width: 800px;
  margin: 0 auto;
}

.hero-title {
  font-size: 3rem;
  font-weight: 700;
  margin-bottom: 1.5rem;
  line-height: 1.2;
}

.hero-description {
  font-size: 1.25rem;
  margin-bottom: 2.5rem;
  opacity: 0.9;
  line-height: 1.6;
}

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

/* Search Section Layout */
.search-section {
  background: white;
  padding: 3rem 0;
  border-bottom: 1px solid #e5e7eb;
}

.search-section h3 {
  text-align: center;
  font-size: 2rem;
  margin-bottom: 2rem;
  color: #1f2937;
}

.search-controls {
  max-width: 900px;
  margin: 0 auto;
}

.search-input-group {
  display: flex;
  margin-bottom: 2rem;
  max-width: 500px;
  margin-left: auto;
  margin-right: auto;
}

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

.filter-group {
  display: flex;
  flex-direction: column;
}

.filter-group label {
  font-weight: 500;
  margin-bottom: 0.5rem;
  color: #374151;
}

.active-filters {
  margin-top: 1rem;
  padding: 1rem;
  background: #f3f4f6;
  border-radius: 8px;
}

.active-filters-label {
  font-weight: 500;
  margin-right: 0.5rem;
  color: #374151;
}

.filter-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 0.5rem;
}

.results-summary {
  text-align: center;
  margin-top: 2rem;
  padding-top: 2rem;
  border-top: 1px solid #e5e7eb;
}

/* Startups Grid Layout */
.startups-grid-section {
  padding: 3rem 0;
  background: #fafafa;
}

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

.loading-state,
.no-results {
  text-align: center;
  padding: 4rem 0;
}

.no-results-content {
  max-width: 400px;
  margin: 0 auto;
}

.no-results-icon {
  font-size: 3rem;
  margin-bottom: 1rem;
  display: block;
}

/* Contact Section Layout */
.contact-section {
  background: white;
  padding: 4rem 0;
}

.contact-content {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: start;
}

.contact-info h3 {
  font-size: 2rem;
  margin-bottom: 1rem;
  color: #1f2937;
}

.contact-methods {
  margin-top: 2rem;
}

.contact-method {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.contact-icon {
  font-size: 1.25rem;
}

.contact-form-container {
  background: #f9fafb;
  padding: 2rem;
  border-radius: 12px;
  border: 1px solid #e5e7eb;
}

.contact-form h4 {
  margin-bottom: 1.5rem;
  color: #1f2937;
}

.form-group {
  margin-bottom: 1.5rem;
}

.form-group label {
  display: block;
  font-weight: 500;
  margin-bottom: 0.5rem;
  color: #374151;
}

/* Footer Layout */
.footer {
  background: #1f2937;
  color: white;
  padding: 2rem 0;
  margin-top: auto;
}

.footer-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.footer-links {
  display: flex;
  gap: 2rem;
}

.footer-links a {
  color: #9ca3af;
  text-decoration: none;
  transition: color 0.2s ease;
}

.footer-links a:hover {
  color: white;
}

/* Modal Layout */
.modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem;
}

.modal-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(4px);
}

.modal-content {
  position: relative;
  background: white;
  border-radius: 16px;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
  max-width: 800px;
  width: 100%;
  max-height: 90vh;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.modal-header {
  padding: 2rem 2rem 1rem;
  border-bottom: 1px solid #e5e7eb;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.modal-body {
  padding: 2rem;
  overflow-y: auto;
  flex: 1;
}

.modal-footer {
  padding: 1rem 2rem 2rem;
  border-top: 1px solid #e5e7eb;
}

.modal-loading {
  padding: 4rem 2rem;
  text-align: center;
}

/* Startup Detail Layout */
.startup-detail {
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.startup-header {
  display: flex;
  gap: 1.5rem;
  align-items: start;
}

.startup-logo {
  flex-shrink: 0;
  width: 80px;
  height: 80px;
}

.startup-basic-info {
  flex: 1;
}

.startup-meta {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 0.5rem;
}

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

.detail-item {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.detail-item label {
  font-weight: 500;
  color: #6b7280;
  font-size: 0.875rem;
}

.tags-container {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.links-container {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
}

.contact-section-modal .contact-options {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.contact-email {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

/* Responsive Design */
@media (max-width: 768px) {
  .container {
    padding: 0 16px;
  }

  .header-content {
    flex-direction: column;
    gap: 1rem;
    padding: 1rem 0;
  }

  .nav ul {
    gap: 1rem;
  }

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

  .hero-description {
    font-size: 1.1rem;
  }

  .hero-cta {
    flex-direction: column;
    align-items: center;
  }

  .search-input-group {
    margin-bottom: 1.5rem;
  }

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

  .startups-grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }

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

  .footer-content {
    flex-direction: column;
    gap: 1rem;
    text-align: center;
  }

  .modal {
    padding: 1rem;
  }

  .modal-content {
    max-height: 95vh;
  }

  .modal-header,
  .modal-body,
  .modal-footer {
    padding-left: 1.5rem;
    padding-right: 1.5rem;
  }

  .startup-header {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }

  .startup-details-grid {
    grid-template-columns: 1fr;
  }

  .links-container {
    flex-direction: column;
  }
}

@media (max-width: 480px) {
  .container {
    padding: 0 12px;
  }

  .hero {
    padding: 2rem 0;
  }

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

  .search-section {
    padding: 2rem 0;
  }

  .search-section h3 {
    font-size: 1.5rem;
  }

  .startups-grid {
    grid-template-columns: 1fr;
  }

  .contact-form-container {
    padding: 1.5rem;
  }
}