/*
  The US Space Industry Review
  File: styles.css
  Description: Custom stylesheet for the website.
*/

:root {
  --primary-color: #0a2342;
  --secondary-color: #2ca58d;
  --accent-color: #f4a261;
  --bg-color: #f8f9fa;
  --text-color: #212529;
  --text-light: #f1f1f1;
  --text-muted: #6c757d;
  --border-color: #dee2e6;
  --header-bg: #ffffff;
  --footer-bg: #0a2342;
  --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.1);
  --font-family-sans: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-family-serif: 'Lora', serif;
  --container-width: 1280px;
  --spacing-xs: 4px;
  --spacing-sm: 8px;
  --spacing-md: 16px;
  --spacing-lg: 24px;
  --spacing-xl: 32px;
  --spacing-xxl: 64px;
  --border-radius: 8px;
}

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;700&family=Lora:ital,wght@0,400;0,600;1,400&display=swap');

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

html {
  font-size: 100%;
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-family-sans);
  font-size: 1rem;
  line-height: 1.6;
  color: var(--text-color);
  background-color: var(--bg-color);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

.container {
  max-width: var(--container-width);
  margin-left: auto;
  margin-right: auto;
  padding-left: var(--spacing-lg);
  padding-right: var(--spacing-lg);
}

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

a {
  color: var(--secondary-color);
  text-decoration: none;
  transition: color 0.2s ease-in-out;
}

a:hover {
  color: var(--primary-color);
  text-decoration: underline;
}

a.phone-link, a[href^="tel:"] {
  color: inherit;
  text-decoration: none;
  cursor: pointer;
  transition: color 0.2s ease;
}

a.phone-link:hover, a[href^="tel:"]:hover {
  color: var(--accent-color);
  text-decoration: underline;
}

a.email-link, a[href^="mailto:"] {
  color: inherit;
  text-decoration: none;
  transition: color 0.2s ease;
}

a.email-link:hover, a[href^="mailto:"]:hover {
  color: var(--accent-color);
  text-decoration: underline;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-family-serif);
  font-weight: 700;
  line-height: 1.2;
  margin-bottom: var(--spacing-md);
  color: var(--primary-color);
}

h1 { font-size: clamp(2.5rem, 5vw, 3.5rem); }
h2 { font-size: clamp(2rem, 4vw, 2.75rem); }
h3 { font-size: clamp(1.5rem, 3vw, 2rem); }
p { margin-bottom: var(--spacing-md); }

.section {
  padding: var(--spacing-xxl) 0;
}

.btn {
  display: inline-block;
  font-weight: 500;
  padding: 0.75rem 1.5rem;
  border-radius: var(--border-radius);
  transition: all 0.2s ease;
  border: 1px solid transparent;
  cursor: pointer;
  text-align: center;
}

.btn-primary {
  background-color: var(--secondary-color);
  color: #fff;
  border-color: var(--secondary-color);
}

.btn-primary:hover {
  background-color: #22846f;
  border-color: #22846f;
  color: #fff;
  text-decoration: none;
}

/* --- Header & Navigation --- */
.site-header {
  background-color: var(--header-bg);
  padding: var(--spacing-md) 0;
  border-bottom: 1px solid var(--border-color);
  position: sticky;
  top: 0;
  z-index: 1000;
  box-shadow: var(--shadow-sm);
}

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

.logo {
  font-family: var(--font-family-serif);
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--primary-color);
  text-decoration: none;
}

.logo:hover {
  text-decoration: none;
  color: var(--secondary-color);
}

.nav-links {
  display: none;
  list-style: none;
}

.nav-links a {
  padding: 0.5rem 1rem;
  font-weight: 500;
  color: var(--text-color);
  text-decoration: none;
  position: relative;
}

.nav-links a::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 0;
  height: 2px;
  background-color: var(--secondary-color);
  transition: width 0.3s ease;
}

.nav-links a:hover::after,
.nav-links .active a::after {
  width: 70%;
}

.mobile-menu-toggle {
  display: block;
  z-index: 1002;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.5rem;
}

.mobile-menu-toggle .icon-bar {
  display: block;
  width: 25px;
  height: 3px;
  background-color: var(--primary-color);
  margin: 5px 0;
  transition: transform 0.3s ease, opacity 0.3s ease;
}

.nav-open .mobile-menu-toggle .icon-bar:nth-child(1) {
  transform: translateY(8px) rotate(45deg);
}
.nav-open .mobile-menu-toggle .icon-bar:nth-child(2) {
  opacity: 0;
}
.nav-open .mobile-menu-toggle .icon-bar:nth-child(3) {
  transform: translateY(-8px) rotate(-45deg);
}

@media (min-width: 1024px) {
  .mobile-menu-toggle { display: none; }
  .nav-links {
    display: flex;
    gap: var(--spacing-sm);
  }
}

.mobile-nav {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: var(--primary-color);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  transform: translateX(100%);
  transition: transform 0.4s cubic-bezier(0.23, 1, 0.32, 1);
  z-index: 1001;
}

.nav-open .mobile-nav {
  transform: translateX(0);
}

.mobile-nav .nav-links {
  display: flex;
  flex-direction: column;
  text-align: center;
}

.mobile-nav .nav-links li {
  margin: 1.5rem 0;
}

.mobile-nav .nav-links a {
  color: var(--text-light);
  font-size: 1.75rem;
}

/* --- Hero Section --- */
.hero {
  position: relative;
  background-color: var(--primary-color);
  color: var(--text-light);
  min-height: 60vh;
  display: flex;
  align-items: center;
  text-align: center;
  background-image: url('https://images.pexels.com/photos/60130/pexels-photo-60130.jpeg?auto=compress&cs=tinysrgb&dpr=2&h=650&w=940');
  background-size: cover;
  background-position: center;
}

.hero::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(10, 35, 66, 0.7);
}

.hero-content {
  position: relative;
  z-index: 2;
  max-width: 800px;
}

.hero h1 {
  color: #fff;
  margin-bottom: var(--spacing-lg);
}

.hero p {
  font-size: 1.25rem;
  font-family: var(--font-family-sans);
  opacity: 0.9;
}

/* --- Page Heading Section --- */
.page-header-section {
    background: var(--primary-color);
    color: white;
    padding: 4rem 1rem;
    text-align: center;
}
.page-header-section h1 {
    color: white;
    margin-bottom: 0.5rem;
}
.page-header-section p {
    font-size: 1.1rem;
    max-width: 700px;
    margin: 0 auto;
    color: rgba(255, 255, 255, 0.8);
}


/* --- Article Grid --- */
.article-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: var(--spacing-xl);
}

.article-card {
  background: #fff;
  border-radius: var(--border-radius);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  transition: transform 0.2s ease-in-out, box-shadow 0.2s ease-in-out;
  display: flex;
  flex-direction: column;
}

.article-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-md);
}

.article-card-img {
  width: 100%;
  height: 220px;
  object-fit: cover;
}

.article-card-content {
  padding: var(--spacing-lg);
  flex-grow: 1;
  display: flex;
  flex-direction: column;
}

.article-card-category {
  font-size: 0.8rem;
  font-weight: 700;
  margin-bottom: var(--spacing-sm);
  color: var(--secondary-color);
  text-transform: uppercase;
}

.article-card h3 {
  font-size: 1.25rem;
  margin-bottom: var(--spacing-sm);
}

.article-card h3 a {
  color: var(--primary-color);
  text-decoration: none;
}

.article-card h3 a:hover {
  color: var(--secondary-color);
}

.article-card p {
  color: var(--text-muted);
  font-size: 0.95rem;
  margin-bottom: var(--spacing-md);
  flex-grow: 1;
}

.article-card-footer {
  font-size: 0.85rem;
  color: var(--text-muted);
  border-top: 1px solid var(--border-color);
  padding-top: var(--spacing-md);
  margin-top: auto;
}

/* --- Content Page Styles (About, Legal) --- */
.content-section {
    max-width: 800px;
    margin: 0 auto;
    padding: var(--spacing-xxl) var(--spacing-lg);
}
.content-section h2 {
    margin-bottom: var(--spacing-xl);
}
.content-section h3 {
    margin-top: var(--spacing-xl);
    margin-bottom: var(--spacing-md);
}
.content-section ul, .content-section ol {
    margin-bottom: var(--spacing-md);
    padding-left: 2rem;
}
.content-section li {
    margin-bottom: var(--spacing-sm);
}

/* --- Topics Page --- */
.topics-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: var(--spacing-xl);
}
.topic-card {
    background: var(--header-bg);
    padding: var(--spacing-xl);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-sm);
    text-align: center;
    transition: all 0.2s ease;
    border: 1px solid var(--border-color);
}
.topic-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-md);
    border-color: var(--secondary-color);
}
.topic-card h3 {
    font-size: 1.3rem;
    margin-bottom: var(--spacing-sm);
}
.topic-card p {
    font-size: 0.95rem;
    color: var(--text-muted);
    margin-bottom: 0;
}
.topic-card a {
    color: inherit;
    text-decoration: none;
}
.topic-card a:hover {
    color: var(--secondary-color);
}
.topic-card a::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
}

/* --- Contact Page --- */
.contact-layout {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--spacing-xxl);
}
@media (min-width: 992px) {
  .contact-layout {
    grid-template-columns: 1fr 1fr;
    align-items: start;
  }
}

.contact-info-item {
  display: flex;
  align-items: flex-start;
  margin-bottom: var(--spacing-lg);
}

.contact-info-item svg {
  width: 24px;
  height: 24px;
  margin-right: var(--spacing-md);
  color: var(--secondary-color);
  flex-shrink: 0;
  margin-top: 4px;
}

.contact-form .form-group {
  margin-bottom: var(--spacing-lg);
}

.contact-form label {
  display: block;
  font-weight: 500;
  margin-bottom: var(--spacing-sm);
}

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

.contact-form .form-control:focus {
  outline: none;
  border-color: var(--secondary-color);
  box-shadow: 0 0 0 2px rgba(44, 165, 141, 0.2);
}

.map-container {
  width: 100%;
  height: 450px;
  border-radius: var(--border-radius);
  overflow: hidden;
  box-shadow: var(--shadow-md);
  margin-top: var(--spacing-xxl);
}
.map-container iframe {
  width: 100%;
  height: 100%;
  border: none;
}

/* --- Thank You Page --- */
.thank-you-section {
  min-height: 60vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 80px 20px;
}
.thank-you-icon {
  width: 80px;
  height: 80px;
  background: var(--secondary-color);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 30px;
}
.thank-you-icon svg {
  width: 40px;
  height: 40px;
  color: white;
}
.thank-you-section h1 { font-size: clamp(2rem, 5vw, 3.5rem); margin-bottom: 20px; }
.thank-you-section p { font-size: 1.2rem; color: var(--text-muted); max-width: 600px; margin-bottom: 30px; }

/* --- Footer --- */
.site-footer {
  background-color: var(--footer-bg);
  color: var(--text-light);
  padding: var(--spacing-xxl) 0 0;
  font-size: 0.9rem;
}

.footer-main {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: var(--spacing-xl);
  padding-bottom: var(--spacing-xxl);
}

.footer-column h4 {
  color: var(--accent-color);
  font-family: var(--font-family-sans);
  font-size: 1rem;
  font-weight: 700;
  text-transform: uppercase;
  margin-bottom: var(--spacing-lg);
}

.footer-column p, .footer-column li {
  margin-bottom: var(--spacing-sm);
  color: rgba(255, 255, 255, 0.8);
}

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

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

.footer-links a:hover {
  color: #fff;
  text-decoration: underline;
}

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding: var(--spacing-lg) 0;
  text-align: center;
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.6);
}

.disclaimer-section {
  background-color: rgba(0,0,0,0.1);
  padding: var(--spacing-lg) var(--spacing-xl);
  margin-top: var(--spacing-xxl);
  border-radius: var(--border-radius);
  border-top: 2px solid var(--accent-color);
  font-size: 0.8rem;
  line-height: 1.5;
  text-align: left;
}
.disclaimer-section p {
    margin: 0;
}
.disclaimer-section strong {
  display: block;
  margin-bottom: var(--spacing-sm);
  color: var(--accent-color);
}

/* --- Cookie Banner --- */
#cookie-banner {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: var(--primary-color);
  color: var(--text-light);
  padding: var(--spacing-lg);
  display: none;
  align-items: center;
  justify-content: space-between;
  z-index: 9999;
  box-shadow: 0 -4px 10px rgba(0, 0, 0, 0.1);
  gap: var(--spacing-lg);
}
.cookie-text {
    flex-grow: 1;
    font-size: 0.9rem;
}
.cookie-text a {
    color: var(--accent-color);
}
.cookie-buttons {
    display: flex;
    gap: var(--spacing-md);
    flex-shrink: 0;
}
#cookie-banner .btn {
  padding: 0.5rem 1rem;
}
#cookie-banner .btn-decline {
    background: transparent;
    border-color: var(--text-muted);
    color: var(--text-light);
}
#cookie-banner .btn-decline:hover {
    background: rgba(255,255,255,0.1);
}

/* --- Cookies Table (Cookie Policy Page) --- */
.cookies-table {
  width: 100%;
  border-collapse: collapse;
  margin: var(--spacing-xl) 0;
  font-size: 0.95rem;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border-color);
}
.cookies-table thead {
  background: var(--primary-color);
  color: white;
}
.cookies-table th, .cookies-table td {
  padding: var(--spacing-md);
  text-align: left;
  border-bottom: 1px solid var(--border-color);
}
.cookies-table tbody tr:nth-child(even) {
  background: rgba(0, 0, 0, 0.02);
}
.cookies-table tbody tr:hover {
  background: rgba(44, 165, 141, 0.05);
}

@media (max-width: 768px) {
  .section { padding: var(--spacing-xl) 0; }
  h1 { font-size: 2.2rem; }
  h2 { font-size: 1.8rem; }
  #cookie-banner { flex-direction: column; text-align: center; }
  .cookies-table { display: block; overflow-x: auto; white-space: nowrap; }
}