/* 
 * Autocaravanas Vega - Core Styles
 * Aesthetic: Premium, Nature, Clean, Professional
 * Inspiration: HorizonCHM (Teal/Green/Gold)
 */

:root {
  /* Color Palette */
  --color-primary: #00897B;
  /* Teal similar to Horizon */
  --color-primary-dark: #00695C;
  --color-secondary: #C0CA33;
  /* Lime/Gold accent */
  --color-text: #333333;
  --color-text-light: #777777;
  --color-bg-light: #F9F9F9;
  --color-white: #FFFFFF;
  --color-black: #1a1a1a;

  /* Typography */
  --font-heading: 'Montserrat', sans-serif;
  --font-body: 'Poppins', sans-serif;

  /* Spacing */
  --section-padding: 5rem 1rem;
  --container-width: 1200px;

  /* Transitions */
  --transition-fast: 0.3s ease;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: var(--font-body);
  color: var(--color-text);
  line-height: 1.6;
  background-color: var(--color-bg-light);
}

h1,
h2,
h3,
h4,
h5,
h6 {
  font-family: var(--font-heading);
  font-weight: 700;
  line-height: 1.2;
  color: var(--color-black);
}

a {
  text-decoration: none;
  color: inherit;
  transition: var(--transition-fast);
}

ul {
  list-style: none;
}

img {
  max-width: 100%;
  display: block;
}

/* --- Utilities --- */

.container {
  max-width: var(--container-width);
  margin: 0 auto;
  padding: 0 1rem;
}

.text-center {
  text-align: center;
}

.text-primary {
  color: var(--color-primary) !important;
}

.mb-1 {
  margin-bottom: 0.5rem;
}

.mb-2 {
  margin-bottom: 1rem;
}

.mb-5 {
  margin-bottom: 3rem;
}

.section-padding {
  padding: var(--section-padding);
}

/* --- Buttons --- */

.btn {
  display: inline-block;
  padding: 0.8rem 2rem;
  border-radius: 50px;
  font-weight: 600;
  text-transform: uppercase;
  font-size: 0.9rem;
  letter-spacing: 1px;
  cursor: pointer;
  transition: all 0.3s ease;
  border: 2px solid transparent;
}

.btn-primary {
  background-color: var(--color-primary);
  color: var(--color-white);
}

.btn-primary:hover {
  background-color: var(--color-primary-dark);
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(0, 137, 123, 0.3);
}

.btn-outline {
  background: transparent;
  border: 2px solid var(--color-primary);
  color: var(--color-primary);
}

.btn-outline:hover {
  background-color: var(--color-primary);
  color: var(--color-white);
}

/* --- Navigation --- */

.header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  z-index: 1000;
  box-shadow: 0 2px 20px rgba(0, 0, 0, 0.05);
  padding: 1rem 0;
}

.nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo {
  font-size: 1.5rem;
  font-weight: 800;
  font-family: var(--font-heading);
  color: var(--color-black);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.logo span {
  color: var(--color-primary);
}

.nav-links {
  display: flex;
  gap: 2rem;
}

.nav-link {
  font-weight: 500;
  color: var(--color-black);
  position: relative;
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: -5px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--color-primary);
  transition: var(--transition-fast);
}

.nav-link:hover::after {
  width: 100%;
}

.mobile-menu-btn {
  display: none;
  font-size: 1.5rem;
  cursor: pointer;
}

/* --- Hero Section (Static Image) --- */

/* --- Hero Section (Full Image) --- */

.hero {
  position: relative;
  width: 100%;
  overflow: hidden;
  /* Ensure no scrollbar if image is massive, though width 100% handles it */
  padding-top: 0;
  /* Removed padding */
  display: block;
  /* Reset flex */
  height: auto !important;
  /* Let content define height */
  min-height: auto;
}

.hero-image {
  width: 100%;
  height: auto;
  display: block;
  /* Removes bottom spacing/gap */
}

/* Remove the pseudo-element overlay from .hero, stick it on the image container or make a new one */
.hero::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.3);
  z-index: 1;
}

.hero-content {
  position: absolute;
  top: 15%;
  /* Move higher up */
  left: 50%;
  transform: translateX(-50%);
  /* Remove vertical centering to anchor to top */
  z-index: 2;
  width: 100%;
  text-align: center;
  padding: 0 1rem;
}

.hero-cta {
  position: absolute;
  bottom: 5%;
  /* Position at the bottom */
  left: 50%;
  transform: translateX(-50%);
  z-index: 2;
  width: 100%;
  text-align: center;
}

.hero-content h1 {
  font-size: 3.5rem;
  margin-bottom: 1rem;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.7);
  color: #ffffff;
}

.hero-content p {
  font-size: 1.2rem;
  margin-bottom: 2rem;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
  text-shadow: 0 1px 5px rgba(0, 0, 0, 0.7);
}

/* --- Components --- */

/* Philosophy Cards */
.philosophy-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
}

.philosophy-card {
  text-align: center;
  padding: 2rem;
  border-radius: 20px;
  background: var(--color-white);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
  transition: var(--transition-fast);
}

.philosophy-card:hover {
  transform: translateY(-10px);
}

.philosophy-icon {
  font-size: 3rem;
  color: var(--color-primary);
  margin-bottom: 1.5rem;
}

/* Fleet Badge */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.4rem 1rem;
  border-radius: 5px;
  background: #f0f0f0;
  font-size: 0.8rem;
  font-weight: 500;
}

.badge-primary {
  background: rgba(0, 137, 123, 0.1);
  color: var(--color-primary);
}

/* --- Responsive --- */

@media (max-width: 768px) {

  /* Header adjustments */
  .header {
    padding: 0.75rem 0;
  }

  .nav {
    padding: 0 0.5rem;
  }

  .logo {
    font-size: 1.1rem;
  }

  .logo i {
    font-size: 1rem;
  }

  .nav-links,
  .nav-cta {
    display: none;
  }

  .mobile-menu-btn {
    display: block;
    padding: 0.5rem;
  }

  /* Hero section - Mobile improvements */
  .hero {
    display: flex;
    flex-direction: column;
    background: white;
    position: relative;
  }

  .hero::before {
    display: block;
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    /* Gradient starts dark at top to help text readability on image, then fades */
    background: linear-gradient(to bottom, rgba(0, 0, 0, 0.5) 0%, rgba(0, 0, 0, 0) 60%);
    z-index: 2;
    pointer-events: none;
  }

  .hero-image {
    position: relative;
    width: 100%;
    height: auto;
    z-index: 1;
    display: block;
    order: 1;
  }

  .hero-content {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 3;
    padding: 12% 1rem 0;
    text-align: center;
    pointer-events: none;
    order: 2;
    transform: none;
  }

  .hero-content h1 {
    font-size: clamp(1.5rem, 7vw, 2.2rem);
    color: white;
    text-shadow: 1px 1px 8px rgba(0, 0, 0, 0.8);
    margin: 0;
    font-weight: 800;
    line-height: 1.2;
    text-transform: uppercase;
  }

  .hero-cta {
    position: relative;
    padding: 1.5rem 1rem 2rem;
    z-index: 4;
    background: white;
    text-align: center;
    order: 3;
    margin-top: -2px;
    /* Smooth transition from image */
  }

  .hero-cta .btn {
    width: 100%;
    max-width: 350px;
    font-size: 1rem;
    padding: 1rem;
  }

  /* Contact bar - ensure it follows the stacked hero */
  .contact-bar {
    padding: 0.5rem 0 !important;
  }

  .contact-info {
    flex-direction: column !important;
    gap: 0.5rem !important;
    padding: 0.5rem !important;
  }

  .contact-info div {
    font-size: 0.9rem;
    min-width: auto !important;
  }

  .contact-info a {
    word-break: break-word;
  }

  /* Section padding */
  .section-padding {
    padding: 3rem 0.5rem;
  }

  /* Experience cards */
  .experience-card {
    min-width: 280px !important;
  }

  .experience-img {
    height: 150px;
  }

  .experience-content {
    padding: 1rem;
  }

  .experience-content h3 {
    font-size: 1.1rem;
  }

  .experience-content p {
    font-size: 0.9rem;
  }

  /* Carousel navigation buttons */
  #prevExp,
  #nextExp {
    padding: 0.6rem !important;
    font-size: 0.9rem;
  }

  /* Gallery grid */
  .gallery-grid {
    grid-template-columns: 1fr !important;
    gap: 0.75rem;
  }

  .gallery-item {
    height: 180px;
  }

  /* Calendar container */
  div[style*="max-width: 800px"] {
    padding: 1rem !important;
    border-radius: 10px !important;
  }

  /* Calendar months grid - single column on mobile */
  #calendar-months-grid {
    grid-template-columns: 1fr !important;
    gap: 1.5rem !important;
  }

  /* Calendar controls - stack buttons vertically on very small screens */
  #calendar-widget>div:first-child {
    flex-wrap: wrap;
    gap: 0.5rem;
  }

  /* Calendar day cells */
  .calendar-day {
    height: 45px !important;
    font-size: 0.85rem !important;
  }

  .calendar-day div:first-child {
    font-size: 0.85rem !important;
  }

  .calendar-day div:last-child {
    font-size: 0.6rem !important;
  }

  /* Month container */
  .month-container {
    padding: 0.5rem;
  }

  /* Booking summary */
  #booking-summary {
    padding: 1rem !important;
  }

  #booking-summary h3 {
    font-size: 1.2rem;
  }

  #booking-summary p {
    font-size: 0.9rem;
  }


  /* Buttons */
  .btn {
    padding: 0.7rem 1.5rem;
    font-size: 0.85rem;
  }

  /* Footer */
  .footer {
    padding: 2rem 0 !important;
  }

  .footer h3 {
    font-size: 1.3rem;
  }

  .footer p {
    font-size: 0.9rem;
  }

  /* Headings */
  h2 {
    font-size: 1.8rem;
  }

  h3 {
    font-size: 1.3rem;
  }

  /* Ensure text is readable */
  body {
    font-size: 15px;
  }
}

/* Extra small devices (phones in portrait, less than 375px) */
@media (max-width: 374px) {
  .hero-content h1 {
    font-size: 1.5rem;
  }

  .logo {
    font-size: 1rem;
  }

  .experience-card {
    min-width: 260px !important;
  }

  h2 {
    font-size: 1.5rem;
  }

  /* Calendar adjustments for very small screens */
  .calendar-day {
    height: 40px !important;
    padding: 1px !important;
  }

  .calendar-day div:first-child {
    font-size: 0.75rem !important;
  }

  .calendar-day div:last-child {
    font-size: 0.55rem !important;
  }

  .month-container h4 {
    font-size: 0.95rem !important;
  }

  /* Contact info even smaller */
  .contact-info div {
    font-size: 0.85rem;
  }

  /* Buttons smaller */
  .btn {
    padding: 0.6rem 1.2rem;
    font-size: 0.8rem;
  }
}