/*
Theme Name: TASCforce Theme
Theme URI: https://www.tascforce.ca/
Author: OpenAI Assistant
Author URI: https://www.tascforce.ca/
Description: A custom WordPress theme developed for the TASCforce website redesign. It implements the new colour palette and layout for the home page, about page, services, renewables, training, contact, careers and health & safety pages.
Version: 1.0
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: tascforce-theme
*/

/* CSS Variables for the colour palette */
:root {
  --primary-dark: #0A2940;
  --secondary-green: #0DBF8B;
  --accent-yellow: #F5A623;
  --supporting-blue: #0073E6;
  --light-bg: #F7F9FC;
  --footer-bg: #05203A;
  --body-text: #222222;
}

body {
  margin: 0;
  font-family: Arial, sans-serif;
  background-color: var(--light-bg);
  color: var(--body-text);
  line-height: 1.6;
}

a {
  color: var(--supporting-blue);
  text-decoration: none;
}
a:hover {
  text-decoration: underline;
}

header {
  background-color: var(--primary-dark);
  color: #ffffff;
  padding: 0.5rem 1.5rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

header .logo {
  font-size: 1.5rem;
  font-weight: bold;
}

nav ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
}

nav ul li {
  margin-left: 1rem;
}

nav ul li a {
  color: #ffffff;
  font-size: 1rem;
  text-decoration: none;
  font-weight: 500;
}

nav ul li a:hover,
nav ul li a.active {
  color: var(--accent-yellow);
}

footer {
  background-color: var(--footer-bg);
  color: #B0C4D8;
  padding: 1rem 1.5rem;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
}

footer .contact-info {
  font-size: 0.75rem;
}

footer .cta {
  background-color: var(--secondary-green);
  color: #ffffff;
  padding: 0.5rem 1rem;
  border-radius: 4px;
  font-weight: bold;
}

/* Hero section styling */
.hero {
  position: relative;
  display: flex;
  height: 50vh;
  min-height: 300px;
}

.hero .left,
.hero .right {
  flex: 1;
  background-size: cover;
  background-position: center;
}

.hero .overlay {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  /*
   * Use a semi‑transparent dark overlay on hero images to ensure the
   * page title and subtitle remain legible on busy photographic backgrounds.
   * A darker overlay with white text provides better contrast against
   * conventional and renewable energy photos.
   */
  background: rgba(0, 0, 0, 0.5);
  padding: 1rem 2rem;
  border-radius: 8px;
  text-align: center;
}

.hero .overlay h1 {
  margin: 0;
  font-size: 2rem;
  /* Override heading colour for hero overlays to white for contrast */
  color: #fff;
}

.hero .overlay p {
  margin-top: 0.5rem;
  font-size: 1rem;
  /* Override subheading colour for hero overlays to white for contrast */
  color: #fff;
}

.hero .cta-btn {
  margin-top: 1rem;
  display: inline-block;
  background-color: var(--accent-yellow);
  color: var(--primary-dark);
  padding: 0.5rem 1.5rem;
  border-radius: 4px;
  font-weight: bold;
}

/* Sections */
.section {
  padding: 2rem 1.5rem;
}

.section h2 {
  color: var(--primary-dark);
  margin-bottom: 1rem;
}

.cards {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
}

.card {
  flex: 1;
  min-width: 200px;
  padding: 1rem;
  border: 1px solid var(--supporting-blue);
  border-radius: 6px;
  background-color: #fff;
}

.card h3 {
  margin-top: 0;
  font-size: 1.1rem;
  color: var(--primary-dark);
}

/* Calendar table */
.calendar-table {
  width: 100%;
  border-collapse: collapse;
}

.calendar-table th,
.calendar-table td {
  border: 1px solid var(--primary-dark);
  padding: 0.5rem;
  text-align: center;
}
.calendar-table th {
  background-color: var(--secondary-green);
  color: var(--primary-dark);
}

/*============================================================
  Page-specific overrides
  ------------------------------------------------------------
  The following rules provide targeted overrides for pages that
  utilise our custom templates. These rules hide redundant
  hero sections generated by the Elementor/ElementsKit plugins
  and style lists used for additional services.  
============================================================*/

/* Override the autogenerated hero section at the top of the Renewables page
   added by third‑party plugins. We set a custom background so that it
   matches our renewables aesthetic instead of showing a generic
   industrial image. */
body.page-template-page-renewables .elementor-section:first-of-type {
  /* Use our renewable background image for the first Elementor section */
  background-image: url('assets/images/renewable.png');
  background-size: cover;
  background-position: center;
}

/* Style the services list on the Renewables page */
body.page-template-page-renewables .services-list {
  list-style: disc;
  margin: 0 0 0 1.5rem;
  padding: 0;
  font-size: 1rem;
  color: var(--body-text);
}
body.page-template-page-renewables .services-list li {
  margin-bottom: 0.5rem;
}