/* =================================================
   Bay of Islands Aero Club - Main Stylesheet
   ================================================= */

/* CSS Variables */
:root {
  --primary-blue: #005a95;
  --light-gray-bg: #f8f9fa;
  --text-dark: #212529;
}

/* =================================================
   Base Styles
   ================================================= */

body {
  font-family: 'Open Sans', sans-serif;
  color: var(--text-dark);
  background-color: var(--light-gray-bg);
}

h1, h2, h3, h4, h5, h6 {
  font-family: 'Montserrat', sans-serif;
  color: var(--primary-blue);
}

a {
  color: var(--primary-blue);
  text-decoration: none;
}

/* =================================================
   Bootstrap Component Overrides
   ================================================= */

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

.bg-primary {
  background-color: var(--primary-blue) !important;
}

/* Navigation Styles */
.navbar {
  background-color: var(--primary-blue);
  border-bottom: 3px solid white;
}

.nav-link {
  color: white;
}

.nav-link:hover,
.nav-link:focus {
  color: #ffffff;
}

.navbar-brand img {
  height: 60px;
  margin-right: 15px;
}

@media (max-width: 667px) {
  .navbar-brand img {
    height: 40px;
    margin-right: 7px;
  }
}

/* =================================================
   Layout Components
   ================================================= */

.fleet-row {
  column-gap: 2rem;
}

.map-iframe {
  width: 100%;
  height: 400px;
  border: 0;
}

/* =================================================
   Hero Section & Slider
   ================================================= */

.hero-slider {
  width: 100vw;
  height: 700px;
  margin: 0;
  padding: 0;
  z-index: 1; /* Lowest layer */
}

.slide-img {
  width: 100%;
  height: 700px;
  object-fit: cover;
  display: block;
}

.slick-arrow,
.slick-dots {
  display: none !important;
}

.overlay {
  z-index: 50; /* Above slider, below content */
  height: 700px;
}

.hero-content {
  z-index: 100; /* Highest layer */
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 700px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
}

.hero-content h1 {
  color: #fff !important;
}

/* Mobile view adjustments for hero section */
@media (max-width: 768px) {
  #hero,
  .hero-slider,
  .slide-img,
  .overlay,
  .hero-content {
    height: 500px;
  }
  .hero-content img {
    max-height: 150px; /* 75% of 200px */
  }
  .hero-content {
    padding: 40px 0; /* Approx. 75px spacing above/below text block */
  }
  .hero-content h1 {
    font-size: 1.8rem; /* Reduce heading size */
  }
  .hero-content p {
    font-size: 0.9rem; /* Reduce paragraph size */
  }
  .hero-content a {
    font-size: 0.9rem; /* Reduce button size */
    padding: 0.5rem 1rem;
  }
}

/* =================================================
   Form Styles & Validation
   ================================================= */

/* Loading States */
.btn-loading {
  pointer-events: none;
  opacity: 0.6;
  position: relative;
}

.loading-spinner {
  display: none;
  width: 16px;
  height: 16px;
  border: 2px solid transparent;
  border-top: 2px solid currentColor;
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin-right: 8px;
}

.btn-loading .loading-spinner {
  display: inline-block;
}

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

/* Form validation states */
.form-control.is-invalid {
  border-color: #dc3545;
}

.form-control.is-valid {
  border-color: #28a745;
}

.invalid-feedback {
  display: none;
  width: 100%;
  margin-top: 0.25rem;
  font-size: 0.875rem;
  color: #dc3545;
}

.valid-feedback {
  display: none;
  width: 100%;
  margin-top: 0.25rem;
  font-size: 0.875rem;
  color: #28a745;
}

/* Show validation messages only when input has validation class */
.form-control.is-invalid + .invalid-feedback {
  display: block;
}

.form-control.is-valid + .valid-feedback {
  display: block;
}

/* Script loading error fallback */
.script-error {
  background-color: #f8d7da;
  color: #721c24;
  padding: 10px;
  border-radius: 4px;
  margin: 10px 0;
  border: 1px solid #f5c6cb;
}

/* =================================================
   Learn to Fly Page Specific Styles
   ================================================= */

.aircraft-section {
  margin-bottom: 2rem;
}

#aircraft .container > .btn {
  display: block;
  width: fit-content;
  margin: 1rem auto 6rem auto;
  text-align: center;
}

.aircraft-image {
  border-radius: 15px;
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
}

.aircraft-specs {
  background: white;
  border-radius: 10px;
  padding: 1.5rem;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
  margin-top: 2rem;
}

.spec-item {
  border-bottom: 1px solid #eee;
  padding: 0.75rem 0;
}

.spec-item:last-child {
  border-bottom: none;
}

.spec-label {
  font-weight: 600;
  color: var(--primary-blue);
}

.hero-section {
  background: linear-gradient(rgba(0, 90, 149, 0.7), rgba(0, 90, 149, 0.8)), url('images/header/clouds.jpg');
  background-size: cover;
  background-position: bottom;
  background-repeat: no-repeat;
  color: white;
  padding: 2rem 0;
  text-align: center;
}

.hero-section h1 {
  color: white;
  font-size: 2rem;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
  position: relative;
  z-index: 2;
}

.hero-section p {
  font-size: 1.2rem;
  margin-bottom: 2rem;
  opacity: 0.95;
  text-shadow: 0 1px 5px rgba(0, 0, 0, 0.2);
  position: relative;
  z-index: 2;
}

/* License Comparison Table */
.comparison-table {
  background: white;
  border-radius: 15px;
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
  overflow: hidden;
  margin-top: 3rem;
}

.comparison-table .table {
  margin-bottom: 0;
}

.comparison-table th {
  background-color: var(--primary-blue);
  color: white;
  font-weight: 600;
  text-align: center;
  padding: 1.2rem;
  border: none;
}

.comparison-table td {
  padding: 1rem 1.5rem;
  border-color: #eee;
  vertical-align: middle;
}

.comparison-table .feature-label {
  font-weight: 600;
  color: var(--primary-blue);
  background-color: #f8f9fa;
}

.microlight-col {
  background-color: #f0f8ff;
}

.ppl-col {
  background-color: #f8fff0;
}

.table-icon {
  color: var(--primary-blue);
  margin-right: 0.5rem;
}

.comparison-highlight {
  background-color: #fffbf0;
  border-left: 4px solid #ffc107;
  padding: 1rem;
  margin: 1rem 0;
  border-radius: 0 8px 8px 0;
}

/* Custom container width - 3/4 of original Bootstrap container width - only for main content */
.hero-section .container,
#aircraft .container,
#comparison .container,
section.py-5 .container {
  max-width: 900px; /* 75% of Bootstrap's default ~1200px */
  margin: 0 auto;
}

/* =================================================
   Responsive Design
   ================================================= */

@media (max-width: 768px) {
  .hero-section {
    padding: 3rem 0;
  }
  
  .hero-section h1 {
    font-size: 2rem;
  }
  .hero-section p {
    font-size: 1rem;
  }
}

@media (max-width: 480px) {
  .hero-section {
    padding: 2.5rem 0;
  }
  
  .hero-section h1 {
    font-size: 1.8rem;
  }
  
  .hero-section p {
    font-size: 0.95rem;
  }
  .comparison-table {
    font-size: 0.9rem;
  }
  .comparison-table th,
  .comparison-table td {
    padding: 0.75rem;
  }
  /* 3/4 width on mobile too for consistency - only for main content */
  .hero-section .container,
  #aircraft .container,
  #comparison .container,
  section.py-5 .container {
    max-width: 90%;
  }
}

/* =================================================
   Index Page Specific Styles
   ================================================= */

/* Wider containers for index page */
body.index-page .container {
  max-width: 1100px;
  margin: 0 auto;
}

/* Ensure hero section container is also wider on index page */
body.index-page #hero .container,
body.index-page .hero-content .container {
  max-width: 1100px;
}

/* =================================================
   Utility Classes for Inline Styles
   ================================================= */

/* Image sizing classes */
.hero-image {
  max-height: 400px;
  object-fit: cover;
}

.person-image {
  width: 100%;
  height: 200px;
  object-fit: cover;
}

.news-image {
  height: 200px;
  width: 100%;
  object-fit: cover;
}

.logo-image {
  max-height: 200px;
}

/* Layout and display classes */
.hidden {
  display: none;
}

.overflow-hidden {
  overflow: hidden;
}

.overlay-dark {
  background: rgba(0, 0, 0, 0.5);
}

.section-margin-top {
  margin-top: 4.5rem;
}

/* Icon sizing */
.icon-large {
  font-size: 2rem;
}

/* Navbar brand styling */
.navbar-brand-custom {
  color: white !important;
  font-size: 120%;
}

/* Map iframe styling */
.map-frame {
  height: 400px;
  border-radius: 0.375rem;
} 