/* ==========================================================================
   Travel Recommendation Website - Main Stylesheet
   ========================================================================== */

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

:root {
  --primary-color: #2563eb;
  --primary-hover: #1d4ed8;
  --secondary-color: #f59e0b;
  --text-color: #1f2937;
  --text-light: #6b7280;
  --bg-color: #ffffff;
  --bg-light: #f9fafb;
  --border-color: #e5e7eb;
  --success-color: #10b981;
  --error-color: #ef4444;
  --warning-color: #f59e0b;
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
  --transition: all 0.3s ease;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  line-height: 1.6;
  color: var(--text-color);
  background-color: var(--bg-light);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

main {
  flex: 1;
}

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

/* ==========================================================================
   Navigation Bar
   ========================================================================== */
.navbar {
  background-color: var(--bg-color);
  box-shadow: var(--shadow-md);
  position: sticky;
  top: 0;
  z-index: 1000;
  padding: 1rem 0;
}

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

.nav-list {
  display: flex;
  list-style: none;
  gap: 2rem;
  justify-content: center;
  align-items: center;
}

.nav-link {
  text-decoration: none;
  color: var(--text-color);
  font-weight: 600;
  font-size: 1rem;
  padding: 0.5rem 1rem;
  border-radius: 6px;
  transition: var(--transition);
  position: relative;
}

.nav-link:hover {
  color: var(--primary-color);
  background-color: var(--bg-light);
}

.nav-link.active {
  color: var(--primary-color);
  background-color: #eff6ff;
}

.nav-link.active::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 60%;
  height: 3px;
  background-color: var(--primary-color);
  border-radius: 2px 2px 0 0;
}

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

.hero h1 {
  font-size: 2.5rem;
  margin-bottom: 1rem;
  font-weight: 700;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.2);
}

.hero-description {
  font-size: 1.1rem;
  max-width: 800px;
  margin: 0 auto;
  line-height: 1.8;
  opacity: 0.95;
}

/* ==========================================================================
   Sections
   ========================================================================== */
.recommendation-section,
.country-section,
.about-section,
.contact-section {
  padding: 3rem 0;
}

.recommendation-section h2,
.country-section h2,
.about-section h1,
.contact-section h1 {
  font-size: 2rem;
  color: var(--text-color);
  margin-bottom: 1.5rem;
  text-align: center;
}

.section-description {
  text-align: center;
  color: var(--text-light);
  font-size: 1.1rem;
  margin-bottom: 2rem;
  max-width: 700px;
  margin-left: auto;
  margin-right: auto;
}

/* ==========================================================================
   Cards
   ========================================================================== */
.card,
.content-card {
  background-color: var(--bg-color);
  border-radius: 12px;
  padding: 2rem;
  margin: 2rem auto;
  max-width: 900px;
  box-shadow: var(--shadow-md);
  transition: var(--transition);
}

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

.card h3 {
  font-size: 1.75rem;
  color: var(--primary-color);
  margin-bottom: 1rem;
}

.card p,
.content-card p {
  font-size: 1rem;
  color: var(--text-light);
  line-height: 1.8;
  margin-bottom: 1.5rem;
}

.content-card p {
  margin-bottom: 1.25rem;
}

/* ==========================================================================
   Image Gallery
   ========================================================================== */
.image-gallery {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 1.5rem;
  margin-top: 1.5rem;
}

.image-gallery img {
  width: 100%;
  height: 300px;
  object-fit: cover;
  border-radius: 8px;
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
}

.image-gallery img:hover {
  transform: scale(1.05);
  box-shadow: var(--shadow-lg);
}

/* ==========================================================================
   Country Selection
   ========================================================================== */
.country-selector {
  display: flex;
  gap: 1rem;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
  margin: 2rem 0;
}

.country-dropdown {
  padding: 0.75rem 1.25rem;
  font-size: 1rem;
  border: 2px solid var(--border-color);
  border-radius: 8px;
  background-color: var(--bg-color);
  color: var(--text-color);
  cursor: pointer;
  transition: var(--transition);
  min-width: 250px;
}

.country-dropdown:hover {
  border-color: var(--primary-color);
}

.country-dropdown:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.country-result {
  margin-top: 2rem;
  display: none;
}

.country-result .card {
  animation: fadeIn 0.5s ease-in;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

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

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

.btn-primary:hover {
  background-color: var(--primary-hover);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.btn-primary:active {
  transform: translateY(0);
}

/* ==========================================================================
   Forms
   ========================================================================== */
.form-container {
  max-width: 600px;
  margin: 2rem auto;
}

.contact-form {
  background-color: var(--bg-color);
  padding: 2.5rem;
  border-radius: 12px;
  box-shadow: var(--shadow-md);
}

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

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

.required {
  color: var(--error-color);
}

.form-group input,
.form-group textarea {
  width: 100%;
  padding: 0.75rem;
  font-size: 1rem;
  border: 2px solid var(--border-color);
  border-radius: 8px;
  transition: var(--transition);
  font-family: inherit;
  background-color: var(--bg-color);
}

.form-group input:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.form-group input.error,
.form-group textarea.error {
  border-color: var(--error-color);
}

.form-group input.valid,
.form-group textarea.valid {
  border-color: var(--success-color);
}

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

.error-message {
  color: var(--error-color);
  font-size: 0.875rem;
  margin-top: 0.25rem;
  display: none;
}

.success-message {
  background-color: #d1fae5;
  border: 2px solid var(--success-color);
  border-radius: 8px;
  padding: 1.5rem;
  text-align: center;
  color: #065f46;
  font-weight: 600;
  animation: fadeIn 0.5s ease-in;
}

.success-message p {
  margin: 0;
  font-size: 1.1rem;
}

/* ==========================================================================
   Alert Messages
   ========================================================================== */
.error-text {
  color: var(--error-color);
  text-align: center;
  font-size: 1rem;
  padding: 1rem;
  background-color: #fee2e2;
  border-radius: 8px;
  margin: 1rem 0;
}

.warning-text {
  color: #92400e;
  text-align: center;
  font-size: 1rem;
  padding: 1rem;
  background-color: #fef3c7;
  border-radius: 8px;
  margin: 1rem 0;
}

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

.footer p {
  margin: 0;
  opacity: 0.9;
}

/* ==========================================================================
   Accessibility
   ========================================================================== */
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* Focus visible for keyboard navigation */
a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 3px solid var(--primary-color);
  outline-offset: 2px;
}

/* ==========================================================================
   Responsive Design
   ========================================================================== */
@media (max-width: 768px) {
  .hero h1 {
    font-size: 2rem;
  }

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

  .nav-list {
    gap: 1rem;
  }

  .nav-link {
    padding: 0.4rem 0.75rem;
    font-size: 0.9rem;
  }

  .recommendation-section h2,
  .country-section h2,
  .about-section h1,
  .contact-section h1 {
    font-size: 1.5rem;
  }

  .card,
  .content-card {
    padding: 1.5rem;
  }

  .image-gallery {
    grid-template-columns: 1fr;
    gap: 1rem;
  }

  .image-gallery img {
    height: 250px;
  }

  .country-selector {
    flex-direction: column;
  }

  .country-dropdown {
    width: 100%;
  }

  .contact-form {
    padding: 1.5rem;
  }

  .recommendation-section,
  .country-section,
  .about-section,
  .contact-section {
    padding: 2rem 0;
  }
}

@media (max-width: 480px) {
  .hero {
    padding: 3rem 0;
  }

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

  .container {
    padding: 0 15px;
  }

  .nav-list {
    gap: 0.5rem;
  }

  .image-gallery img {
    height: 200px;
  }
}
