/*
Theme Name: Mountain Leaders
Theme URI: https://your-site.com/mountain-leaders
Author: Your Name
Author URI: https://your-site.com
Description: A custom WordPress theme for the British Association of International Mountain Leaders
Version: 1.0.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: mountain-leaders
Tags: custom-logo, custom-menu, featured-images
*/

/* CSS Variables */
:root {
  /* Colors */
  --color-primary: rgba(49, 110, 128, 1);
  --color-primary-dark: #1976d2;
  --color-header-bg: #1d2327;
  --color-footer-bg: #1d2327;
  --color-text: #333;
  --color-text-light: #999;
  --color-white: #fff;
  --color-border: #ccc;
  --color-overlay-light: rgba(0, 0, 0, 0.2);
  --color-overlay-medium: rgba(49, 110, 128, 0.84);
  --color-overlay-dark: rgba(44, 62, 80, 0.9);
  --color-section-overlay: rgba(49, 110, 128, 0.84);
  --color-section-overlay-hover: rgba(67, 84, 96, 0.9);
  --color-slider-nav: rgba(0, 0, 0, 0.5);
  --color-slider-nav-hover: rgba(0, 0, 0, 0.7);

  /* Typography */
  --font-primary: "Poppins", sans-serif;

  /* Layout */
  --header-height: 150px;
  --container-width: 80%;
  --header-min-width: 790px;
}

/* Base Styles */
body {
  font-family: var(--font-primary);
  margin: 0;
  padding: 0;
  line-height: 1.6;
}

/* Typography */
h1,
h2,
h3,
h4,
h5,
h6 {
  font-family: var(--font-primary);
  font-weight: 500;
}

/* Header */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  background: var(--color-header-bg);
  height: var(--header-height);
  z-index: 1001;
}

.main-header {
  display: flex;
  align-items: center;
  padding: 40px 0 0 0;
  position: relative;
  width: var(--container-width);
  min-width: var(--header-min-width);
  margin: 0 auto;
}

.menu-toggle {
  display: none;
}

.header-right {
  flex: 1;
  display: flex;
  align-items: center;
  margin-left: 30px;
  margin-top: 0;
}

/* Branding */
.site-branding {
  flex: 0 0 300px;
}

.custom-logo {
  max-height: 100px;
  width: auto;
}

/* Header Navigation */
.main-navigation {
  flex: 1;
}

.main-navigation ul {
  display: flex;
  list-style: none;
  margin-top: 40px;
  padding: 0;
  min-width: max-content;
  gap: 30px;
}

.main-navigation ul li a {
  color: var(--color-white);
  text-decoration: none;
  font-weight: 400;
  font-size: 20px;
}

.main-navigation ul li a:hover {
  color: var(--color-primary);
}

/* Header Buttons */
.header-buttons {
  position: absolute;
  top: 38px; /* Aligned with the search button's margin-top */
  right: 0;
  display: flex;
  gap: 10px;
}

.header-button {
  background: var(--color-primary);
  color: var(--color-white);
  padding: 8px 20px;
  border-radius: 4px;
  text-decoration: none;
  font-weight: 500;
  transition: background 0.3s ease;
}

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

/* Header Search */
.header-search {
  margin-left: 24px;
  margin-top: 45px;
}

.header-search form {
  display: flex;
}

.header-search input[type="search"] {
  padding: 8px 12px;
  border: 1px solid var(--color-border);
  border-radius: 4px;
  width: 200px;
  background: var(--color-white);
  color: var(--color-text);
}

.header-search input[type="search"]::placeholder {
  color: var(--color-text-light);
}

.header-search input[type="submit"] {
  padding: 8px 15px;
  background: var(--color-text);
  color: var(--color-white);
  border: none;
  border-radius: 4px;
  margin-left: 5px;
  cursor: pointer;
}

.header-search input[type="submit"]:hover {
  background: var(--color-primary-dark);
}

/* Hero Section */
.hero-section {
  height: 100%;
  width: 100%;
  position: relative;
}

.hero-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: var(--color-overlay-light);
  display: flex;
  align-items: flex-start;
  justify-content: center;
  text-align: center;
}

.hero-content {
  width: 100%;
  padding: 10px 20px;
  background: var(--color-overlay-medium);
  margin-top: 0;
}

.hero-content h1 {
  font-size: 2.5em;
  margin: 0 auto;
  color: var(--color-white);
  font-weight: 300;
  max-width: 1200px;
}

/* Featured Sections */
.featured-sections {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0;
  max-width: 100%;
  margin: 0;
  padding: 0;
}

.section {
  position: relative;
  padding: 0;
  height: 350px;
  overflow: hidden;
  text-decoration: none;
  display: block;
}

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

.section-content {
  position: absolute;
  top: 10%;
  left: 0;
  padding: 15px 30px;
  background: var(--color-section-overlay);
  color: var(--color-white);
  text-align: center;
  min-width: 70%;
}

.section h2 {
  margin: 0;
  font-size: 1.5rem;
  font-weight: 300;
  white-space: nowrap;
}

/* Section Hover Effects */
.section:hover .section-content {
  background: var(--color-section-overlay-hover);
}

.section:hover img {
  transform: scale(1.05);
  transition: transform 0.3s ease;
}

/* Hero Slider */
.hero-slider {
  position: relative;
  height: 600px;
  margin-top: 140px;
  margin-bottom: 20px;
  width: 100%;
  z-index: 1000;
}

.hero-slider .swiper-slide {
  background-size: cover;
  background-position: center;
}

.swiper-button-prev,
.swiper-button-next {
  color: var(--color-white) !important;
  background: var(--color-slider-nav);
  padding: 30px;
  border-radius: 50%;
  transition: background 0.3s ease;
}

.swiper-button-prev:hover,
.swiper-button-next:hover {
  background: var(--color-slider-nav-hover);
}

.swiper-pagination-bullet {
  width: 12px;
  height: 12px;
  background: var(--color-white);
  opacity: 0.7;
}

.swiper-pagination-bullet-active {
  background: var(--color-primary);
  opacity: 1;
}

/* Container */
.container {
  width: var(--container-width);
  margin: 164px auto 20px auto;
  padding: 0 20px;
}

.hero-slider + .container {
  margin-top: 40px;
}

/* Media Queries */
@media (max-width: 990px) {
  .main-header {
    flex-direction: column;
  }

  .site-branding {
    margin-bottom: 15px;
  }

  .header-right {
    margin-left: 0;
    flex-direction: column;
    gap: 15px;
  }

  .header-search {
    margin-left: 0;
  }
}

/* Footer */
.site-footer {
  display: flex;
  justify-content: center;
  align-items: center;
  width: 100%;
  background: var(--color-footer-bg);
  color: var(--color-white);
  padding: 20px;
}

.footer-content {
  width: var(--container-width);
  text-align: center;
}

@media (max-width: 768px) {
  .container {
    width: 95%;
    padding: 60px 10px 0 10px;
  }

  .featured-sections {
    grid-template-columns: 1fr;
  }

  .nav-menu {
    display: none;
  }

  .nav-menu.active {
    display: block;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--color-overlay-dark);
  }

  .utility-nav {
    display: none;
  }
}
