/*
 * Base styles for the CUARI website
 *
 * The design draws inspiration from the provided brochure: warm gradients,
 * rounded shapes and a clear hierarchy. Sections alternate background
 * colours to create visual rhythm. Flexbox and grid layouts ensure a
 * responsive experience across devices. See accompanying index.html for
 * content structure.
 */

/* CSS Reset */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Poppins', sans-serif;
  color: #333;
  background-color: #fff;
  line-height: 1.6;
}

/* Colour palette derived from the brochure */
:root {
  --primary: #f78e2c; /* orange tone */
  --secondary: #fbb040; /* yellow tone */
  --dark: #2f2f2f;     /* dark grey for text */
  --light: #f7f7f7;    /* light grey for alternating sections */
  --accent: #0077b6;   /* blue accent for buttons */
}

/* Container utility */
.container {
  width: 90%;
  max-width: 1200px;
  margin: 0 auto;
}

/* Header styles */
header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  background: #fff;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
  z-index: 999;
}

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

/* Logo styling */
/* Logo container now holds a single image */
.logo {
  display: flex;
  align-items: center;
}

/* Size the logo image appropriately. Height matches the header while
   preserving aspect ratio. */
.logo-img {
  height: 2.5rem;
  width: auto;
}

/* Navigation styling */
nav ul {
  list-style: none;
  display: flex;
  gap: 1.5rem;
  align-items: center;
}

nav ul li a {
  text-decoration: none;
  color: var(--dark);
  font-weight: 500;
  position: relative;
  padding: 0.5rem 0;
  transition: color 0.3s ease;
}

nav ul li a::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: -4px;
  width: 0;
  height: 2px;
  background: var(--primary);
  transition: width 0.3s ease;
}

nav ul li a:hover {
  color: var(--primary);
}

nav ul li a:hover::after {
  width: 100%;
}

/* Mobile menu toggle */
.menu-toggle {
  display: none;
  font-size: 1.5rem;
  color: var(--dark);
  cursor: pointer;
}

/* Hero section */
#hero {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  padding-top: 6rem;
  background: linear-gradient(125deg, var(--primary), var(--secondary));
  color: #fff;
}

#hero .hero-content {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
}

#hero .hero-text {
  flex: 1;
  margin-right: 2rem;
}

#hero h1 {
  font-size: 2.8rem;
  margin-bottom: 1rem;
  line-height: 1.2;
}

#hero p {
  font-size: 1.1rem;
  margin-bottom: 1.5rem;
  max-width: 550px;
}

.btn-cta {
  display: inline-block;
  background: var(--accent);
  color: #fff;
  padding: 0.7rem 1.6rem;
  border-radius: 30px;
  text-decoration: none;
  font-weight: 500;
  transition: transform 0.3s ease;
}

.btn-cta:hover {
  transform: scale(1.05);
}

#hero .hero-image img {
  max-width: 100%;
  width: 420px;
  border-radius: 1rem;
  box-shadow: 0 15px 40px rgba(0, 0, 0, 0.2);
}

/* Sections */
.section {
  padding: 4rem 0;
  position: relative;
}

.light-section {
  background: var(--light);
}

.dark-section {
  background: #fff;
}

.section-title {
  text-align: center;
  margin-bottom: 2rem;
}

.section-title h2 {
  font-size: 2rem;
  color: var(--dark);
  margin-bottom: 0.5rem;
}

.section-title p {
  max-width: 600px;
  margin: 0 auto;
  color: #666;
}

/* Two-column layouts */
.two-col {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 2rem;
}

.two-col.reverse {
  flex-direction: row-reverse;
}

.text-col {
  flex: 1;
  min-width: 280px;
}

.image-col {
  flex: 1;
  min-width: 280px;
  text-align: center;
}

.image-col img {
  max-width: 100%;
  height: auto;
  border-radius: 1rem;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
}

/* Cards inside mission/vision */
.card {
  background: #fff;
  border-radius: 1rem;
  padding: 1.5rem;
  margin-bottom: 1.5rem;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05);
}

.card h3 {
  margin-top: 0.5rem;
  margin-bottom: 0.5rem;
  color: var(--primary);
  font-size: 1.3rem;
}

.card p {
  color: #555;
  font-size: 0.95rem;
}

.card-icon {
  font-size: 1.8rem;
  color: var(--accent);
}

/* Features list */
.features-list {
  list-style: none;
  margin-top: 1rem;
}

.features-list li {
  display: flex;
  align-items: center;
  margin-bottom: 0.6rem;
  color: #555;
}

.features-list li i {
  /* Hide inline icons by default – bullets are handled via pseudo-elements */
  display: none;
}

/* Use Font Awesome check icons as bullets */
.features-list li {
  position: relative;
  padding-left: 1.6rem;
}

/* Custom bullet styling for feature lists */
.features-list li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0.5rem;
  width: 0.5rem;
  height: 0.5rem;
  background: var(--accent);
  border-radius: 50%;
}

/* Note: removed an extra closing brace here that accidentally closed the CSS block,
 * which prevented subsequent styles (including the contact-section gradient) from
 * applying correctly. With this fix, the contact section gradient and text styles
 * below will now be parsed as intended. */

/* Contact section */
.contact-section {
  /* Override the section background to a warm gradient and set base text colour */
  background: linear-gradient(125deg, var(--secondary), var(--primary));
  color: #fff;
}

/* Ensure text inside the contact section remains legible */
.contact-section .section-title h2,
.contact-section .section-title p,
.contact-section .contact-details h3,
.contact-section .contact-details p,
.contact-section .contact-details a {
  color: #fff;
}

/* Style form labels and fields in the contact section */
.contact-section .contact-form-wrapper label {
  color: #fff;
}

.contact-section .form-group input,
.contact-section .form-group textarea {
  /* Use a solid white background and subtle border so inputs are visible on the gradient */
  background: #ffffff;
  color: var(--dark);
  border: 1px solid rgba(0, 0, 0, 0.2);
  border-radius: 0.5rem;
  padding: 0.6rem;
}

.contact-section .form-group input:focus,
.contact-section .form-group textarea:focus {
  box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.6);
}

.contact-section .contact-form-wrapper form {
  background: rgba(255, 255, 255, 0.15);
  backdrop-filter: blur(5px);
}

.contact-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 2rem;
  margin-top: 2rem;
}

.contact-details,
.contact-form-wrapper {
  flex: 1;
  min-width: 280px;
}

.contact-details p {
  margin-bottom: 0.8rem;
  font-size: 0.95rem;
}

.contact-details i {
  margin-right: 0.5rem;
  color: #fff;
}

.contact-details a {
  color: #fff;
  text-decoration: underline;
}

.contact-form-wrapper form {
  background: rgba(255, 255, 255, 0.1);
  padding: 1.5rem;
  border-radius: 1rem;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}

.form-group {
  margin-bottom: 1rem;
}

.form-group label {
  display: block;
  margin-bottom: 0.3rem;
  font-size: 0.9rem;
  color: #fff;
}

.form-group input,
.form-group textarea {
  width: 100%;
  padding: 0.6rem;
  border: none;
  border-radius: 0.5rem;
  font-size: 0.9rem;
  font-family: inherit;
}

.form-group input:focus,
.form-group textarea:focus {
  outline: none;
  box-shadow: 0 0 0 2px var(--accent);
}

.contact-form-wrapper .btn-cta {
  margin-top: 0.5rem;
  background: #fff;
  color: var(--primary);
  font-weight: 600;
}

.contact-form-wrapper .btn-cta:hover {
  background: #f5f5f5;
}

/* Footer */
footer {
  background: #232323;
  color: #aaa;
  text-align: center;
  padding: 1rem 0;
}

footer p {
  font-size: 0.9rem;
}

/* Responsive design */
@media (max-width: 992px) {
  #hero h1 {
    font-size: 2.2rem;
  }
  #hero .hero-content {
    flex-direction: column;
    text-align: center;
  }
  #hero .hero-text {
    margin-right: 0;
    margin-bottom: 2rem;
  }
  #hero img {
    width: 300px;
  }
  .two-col {
    flex-direction: column;
  }
  .two-col.reverse {
    flex-direction: column;
  }
}

@media (max-width: 768px) {
  nav ul {
    position: absolute;
    top: 100%;
    right: 0;
    background: #fff;
    flex-direction: column;
    width: 200px;
    padding: 1rem;
    border-radius: 0 0 0.5rem 0.5rem;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
    display: none;
  }
  nav ul.open {
    display: flex;
  }
  .menu-toggle {
    display: block;
  }
}
