/* Material Design Professional Tennis App - CourtPulse */

/* Custom Material Design Color Palette - Professional Navy Theme */
:root {
  --primary-color: #1565c0;
  --primary-dark: #0d47a1;
  --primary-light: #42a5f5;
  --secondary-color: #37474f;
  --secondary-dark: #263238;
  --secondary-light: #546e7a;
  --accent-color: #ff5722;
  --background-color: #fafafa;
  --surface-color: #ffffff;
  --text-primary: #212121;
  --text-secondary: #757575;
  --text-hint: #9e9e9e;
  --divider-color: #e0e0e0;
  --shadow-1: rgba(0,0,0,0.12);
  --shadow-2: rgba(0,0,0,0.24);
}

/* Global Styles */
* {
  box-sizing: border-box;
}

body {
  margin: 0;
  padding: 0;
  font-family: 'Roboto', -apple-system, BlinkMacSystemFont, sans-serif;
  background-color: var(--background-color);
  color: var(--text-primary);
  line-height: 1.6;
}

/* Typography Hierarchy */
h1 {
  font-size: 2.5rem;
  font-weight: 300;
  margin: 2rem 0;
  color: var(--primary-color);
}

h2 {
  font-size: 2rem;
  font-weight: 400;
  margin: 1.5rem 0;
  color: var(--secondary-color);
}

h3 {
  font-size: 1.5rem;
  font-weight: 500;
  margin: 1rem 0;
}

p, li {
  font-size: 1rem;
  color: var(--text-secondary);
  margin-bottom: 1rem;
}

/* Layout Containers */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}

.section {
  padding: 60px 0;
}

.section-narrow {
  padding: 40px 0;
}

/* Material Design Cards */
.card {
  background-color: var(--surface-color);
  border-radius: 8px;
  box-shadow: 0 2px 4px var(--shadow-1), 0 4px 8px var(--shadow-2);
  margin-bottom: 24px;
  overflow: hidden;
  transition: box-shadow 0.3s cubic-bezier(0.4, 0.0, 0.2, 1);
}

.card:hover {
  box-shadow: 0 4px 8px var(--shadow-1), 0 8px 16px var(--shadow-2);
}

.card-content {
  padding: 24px;
  text-align: left;
}

.card-title {
  font-size: 1.25rem;
  font-weight: 500;
  margin-bottom: 16px;
  color: var(--text-primary);
}

.card-text {
  color: var(--text-secondary);
  margin-bottom: 0;
}

/* Navigation Styles */
.navbar {
  background-color: var(--surface-color);
  box-shadow: 0 2px 4px var(--shadow-1);
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  height: 64px;
}

.navbar .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
}

.navbar-brand {
  font-size: 1.25rem;
  font-weight: 500;
  color: var(--primary-color);
  text-decoration: none;
}

.navbar-nav {
  display: flex;
  list-style: none;
  margin: 0;
  padding: 0;
  gap: 32px;
}

.navbar-nav a {
  color: var(--text-secondary);
  text-decoration: none;
  font-weight: 500;
  padding: 8px 0;
  transition: color 0.2s ease;
}

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

/* Hero Section */
.hero {
  background: linear-gradient(135deg, var(--primary-light) 0%, var(--primary-color) 100%);
  color: white;
  padding: 120px 0 80px;
  margin-top: 64px;
}

.hero-content {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: center;
}

.hero-text h1 {
  color: white;
  font-size: 3rem;
  font-weight: 300;
  margin-bottom: 24px;
}

.hero-text p {
  color: rgba(255, 255, 255, 0.9);
  font-size: 1.25rem;
  margin-bottom: 32px;
}

.hero-image {
  text-align: center;
}

/* Device Mockup */
.device-mockup {
  position: relative;
  max-width: 300px;
  margin: 0 auto;
}

.device-mockup::before {
  content: '';
  position: absolute;
  top: -20px;
  left: -20px;
  right: -20px;
  bottom: -20px;
  background: linear-gradient(145deg, #f0f0f0, #ffffff);
  border-radius: 25px;
  z-index: -1;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.15);
}

.device-mockup img {
  width: 100%;
  height: auto;
  border-radius: 15px;
  position: relative;
  z-index: 1;
}

/* Button Styles */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 24px;
  font-size: 0.875rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  text-decoration: none;
  transition: all 0.2s cubic-bezier(0.4, 0.0, 0.2, 1);
  min-height: 48px;
  text-align: center;
}

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

.btn-primary:hover {
  background-color: var(--primary-dark);
  box-shadow: 0 4px 8px var(--shadow-1);
}

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

.btn-secondary:hover {
  background-color: #e64a19;
  box-shadow: 0 4px 8px var(--shadow-1);
}

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

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

.btn-large {
  padding: 16px 32px;
  font-size: 1rem;
  min-height: 56px;
}

.download-buttons {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}

/* Screenshot Carousel */
.screenshots-section {
  padding: 60px 0 !important;
}

.screenshot-carousel-container {
  position: relative;
  max-width: 800px;
  margin: 40px auto 0;
  overflow: hidden;
  border-radius: 12px;
  background-color: var(--surface-color);
  box-shadow: 0 4px 12px var(--shadow-1);
}

.screenshot-carousel {
  position: relative;
  width: 100%;
  height: 400px;
}

.screenshot-track {
  position: relative;
  width: 100%;
  height: 100%;
}

.screenshot-slide {
  position: absolute;
  width: 100%;
  height: 100%;
  opacity: 0;
  transition: opacity 0.5s ease-in-out;
  display: flex;
  justify-content: center;
  align-items: center;
}

.screenshot-slide.active {
  opacity: 1;
}

.screenshot-item {
  position: relative;
  cursor: pointer;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 4px 12px var(--shadow-1);
  transition: transform 0.2s ease;
  max-width: 300px;
  margin: 0 auto;
}

.screenshot-item:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 24px var(--shadow-2);
}

.screenshot-item img {
  width: 100%;
  height: auto;
  display: block;
}

.screenshot-caption {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: linear-gradient(transparent, rgba(0,0,0,0.8));
  color: white;
  text-align: center;
  padding: 20px 10px 10px;
  font-size: 0.875rem;
  font-weight: 500;
}

/* Carousel Navigation */
.carousel-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background-color: var(--surface-color);
  border: none;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 2px 8px var(--shadow-1);
  transition: all 0.2s ease;
  z-index: 10;
}

.carousel-nav:hover {
  background-color: var(--primary-color);
  color: white;
  box-shadow: 0 4px 12px var(--shadow-2);
}

.carousel-nav.prev {
  left: 20px;
}

.carousel-nav.next {
  right: 20px;
}

.carousel-nav i {
  font-size: 24px;
}

/* Carousel Dots */
.carousel-dots {
  display: flex;
  justify-content: center;
  gap: 12px;
  margin-top: 24px;
}

.carousel-dots .dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  border: none;
  background-color: var(--divider-color);
  cursor: pointer;
  transition: background-color 0.2s ease;
}

.carousel-dots .dot.active {
  background-color: var(--primary-color);
}

.carousel-dots .dot:hover {
  background-color: var(--primary-light);
}

/* Lightbox */
.lightbox {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.9);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10000;
  opacity: 0;
  animation: fadeIn 0.3s ease forwards;
}

.lightbox-content {
  position: relative;
  max-width: 90vw;
  max-height: 90vh;
  display: flex;
  align-items: center;
  justify-content: center;
}

.lightbox-content img {
  max-width: 100%;
  max-height: 100%;
  border-radius: 8px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
}

.lightbox-close {
  position: absolute;
  top: -50px;
  right: -50px;
  background-color: var(--surface-color);
  border: none;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 2px 8px var(--shadow-1);
  transition: all 0.2s ease;
  z-index: 10001;
}

.lightbox-close:hover {
  background-color: var(--accent-color);
  color: white;
}

.lightbox-close i {
  font-size: 20px;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

/* Features Section */
.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 32px;
  margin-top: 40px;
}

.feature-card {
  text-align: center;
}

.feature-icon {
  width: 64px;
  height: 64px;
  background-color: var(--primary-light);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 24px;
  font-size: 24px;
  color: white;
}

/* Form Styles */
.form-group {
  margin-bottom: 24px;
}

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

.form-control {
  width: 100%;
  padding: 16px;
  border: 1px solid var(--divider-color);
  border-radius: 8px;
  font-size: 1rem;
  transition: border-color 0.2s ease;
  background-color: var(--surface-color);
}

.form-control:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 2px rgba(21, 101, 192, 0.2);
}

textarea.form-control {
  min-height: 120px;
  resize: vertical;
}

/* Privacy Accept Button - Critical Flutter Integration */
.privacy-accept-button {
  position: fixed;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 9999;
  background-color: var(--primary-color);
  color: white;
  border: none;
  padding: 16px 32px;
  border-radius: 8px;
  font-size: 1rem;
  font-weight: 500;
  cursor: pointer;
  box-shadow: 0 4px 16px var(--shadow-2);
  text-align: center;
  min-width: 200px;
  display: none; /* Hidden by default, shown via JavaScript */
}

.privacy-accept-button:hover {
  background-color: var(--primary-dark);
}

.privacy-accept-button.visible {
  display: block;
}

/* Footer */
.footer {
  background-color: var(--secondary-color);
  color: white;
  padding: 40px 0 20px;
  margin-top: 80px;
}

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

.footer-section h3 {
  color: white;
  margin-bottom: 16px;
}

.footer-links {
  list-style: none;
  padding: 0;
}

.footer-links li {
  margin-bottom: 8px;
}

.footer-links a {
  color: rgba(255, 255, 255, 0.8);
  text-decoration: none;
  transition: color 0.2s ease;
}

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

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.2);
  padding-top: 20px;
  text-align: center;
  color: rgba(255, 255, 255, 0.7);
}

/* Contact Page Layout */
.contact-split {
  display: grid;
  grid-template-columns: 1fr 2fr;
  gap: 60px;
  margin-top: 40px;
}

.contact-info h3 {
  color: var(--primary-color);
  margin-bottom: 16px;
}

.contact-info p {
  margin-bottom: 24px;
}

/* Responsive Design */
@media (max-width: 768px) {
  .navbar-nav {
    display: none;
  }
  
  .hero-content {
    grid-template-columns: 1fr;
    text-align: center;
    gap: 40px;
  }
  
  .hero-text h1 {
    font-size: 2rem;
  }
  
  .features-grid {
    grid-template-columns: 1fr;
  }
  
  .screenshot-carousel {
    height: 300px;
  }
  
  .screenshot-item {
    max-width: 250px;
  }
  
  .carousel-nav {
    width: 40px;
    height: 40px;
  }
  
  .carousel-nav.prev {
    left: 10px;
  }
  
  .carousel-nav.next {
    right: 10px;
  }
  
  .carousel-nav i {
    font-size: 20px;
  }
  
  .device-mockup {
    max-width: 250px;
  }
  
  .download-buttons {
    justify-content: center;
  }
  
  .contact-split {
    grid-template-columns: 1fr;
    gap: 40px;
  }
  
  .container {
    padding: 0 16px;
  }
  
  h1 {
    font-size: 2rem;
  }
  
  .section {
    padding: 40px 0;
  }
}

@media (max-width: 480px) {
  .hero-text h1 {
    font-size: 1.75rem;
  }
  
  .screenshot-carousel {
    height: 250px;
  }
  
  .screenshot-item {
    max-width: 200px;
  }
  
  .carousel-nav {
    width: 36px;
    height: 36px;
  }
  
  .carousel-nav.prev {
    left: 5px;
  }
  
  .carousel-nav.next {
    right: 5px;
  }
  
  .carousel-nav i {
    font-size: 18px;
  }
  
  .device-mockup {
    max-width: 200px;
  }
  
  .lightbox-close {
    top: -40px;
    right: -40px;
    width: 36px;
    height: 36px;
  }
  
  .btn {
    width: 100%;
    margin-bottom: 12px;
  }
  
  .download-buttons {
    flex-direction: column;
  }
}

/* Page body offset for fixed navbar */
body {
  padding-top: 0;
}

.main-content {
  margin-top: 64px;
}

/* Utility Classes */
.text-center {
  text-align: center !important;
}

.text-left {
  text-align: left !important;
}

.mb-0 { margin-bottom: 0 !important; }
.mb-1 { margin-bottom: 8px !important; }
.mb-2 { margin-bottom: 16px !important; }
.mb-3 { margin-bottom: 24px !important; }
.mb-4 { margin-bottom: 32px !important; }

.mt-0 { margin-top: 0 !important; }
.mt-1 { margin-top: 8px !important; }
.mt-2 { margin-top: 16px !important; }
.mt-3 { margin-top: 24px !important; }
.mt-4 { margin-top: 32px !important; }