/* =============================================== */
/* 1. RESET & GLOBAL STYLES                        */
/* =============================================== */
:root {
  --color-primary: #3f51b5; /* Indigo */
  --color-primary-dark: #303f9f;
  --color-accent: #e91e63; /* Pink for Magic Link */
  --color-text: #212121;
  --color-text-light: #757575;
  --color-white: #ffffff;
  --color-bg-light: #fafafa;
  --color-bg-alt: #f5f5f5;
  --color-green: #4caf50;
  --color-yellow: #ffc107;
  --color-error: #f44336;
  --transition: all 0.2s ease-in-out;
}

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 62.5%;
  scroll-behavior: smooth;
}

body {
  font-family: "Roboto", sans-serif;
  font-size: 1.6rem;
  line-height: 1.6;
  color: var(--color-text);
  background-color: var(--color-bg-light);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

.container {
  width: 90%;
  max-width: 1200px;
  margin-left: auto;
  margin-right: auto;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

section {
  padding: 6rem 0;
}

.text-center {
  text-align: center;
}

.bg-white {
    background-color: var(--color-white);
}

.section-title {
  font-size: 2.8rem;
  font-weight: 500;
  color: var(--color-primary);
  margin-bottom: 1rem;
}
.section-subtitle {
  font-size: 1.8rem;
  color: var(--color-text-light);
  max-width: 600px;
  margin: 0 auto 4rem auto;
}

/* Fix for sticky header covering section titles */
section[id] {
  scroll-margin-top: 10rem; /* Adjust this value if needed */
}

/* =============================================== */
/* 2. SHARED COMPONENTS (Buttons, Cards, Forms)    */
/* =============================================== */
.mat-app-bar {
  background-color: var(--color-white);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.mat-card {
  background-color: var(--color-white);
  border-radius: 8px;
  padding: 2.4rem;
  box-shadow: 0 2px 1px -1px rgba(0,0,0,.2), 0 1px 1px 0 rgba(0,0,0,.14), 0 1px 3px 0 rgba(0,0,0,.12);
  /* The transition now only affects the box-shadow */
  transition: box-shadow 0.28s cubic-bezier(0.4, 0, 0.2, 1);
}

.mat-card:hover {
  box-shadow: 0 5px 5px -3px rgba(0,0,0,.2), 0 8px 10px 1px rgba(0,0,0,.14), 0 3px 14px 2px rgba(0,0,0,.12);
  /* The transform property has been removed to stop the movement */
}

.mat-raised-button, .mat-stroked-button {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  text-decoration: none;
  padding: 1rem 1.6rem;
  border-radius: 4px;
  font-weight: 500;
  text-transform: uppercase;
  font-size: 1.4rem;
  transition: var(--transition);
  position: relative;
  overflow: hidden;
  cursor: pointer;
  border: 1px solid transparent;
}

.mat-raised-button {
  background-color: var(--color-primary);
  color: var(--color-white);
  box-shadow: 0 3px 1px -2px rgba(0,0,0,.2), 0 2px 2px 0 rgba(0,0,0,.14), 0 1px 5px 0 rgba(0,0,0,.12);
}
.mat-raised-button:hover {
  box-shadow: 0 2px 4px -1px rgba(0,0,0,.2), 0 4px 5px 0 rgba(0,0,0,.14), 0 1px 10px 0 rgba(0,0,0,.12);
}
.mat-raised-button:disabled {
  background-color: rgba(0,0,0,.12);
  color: rgba(0,0,0,.26);
  box-shadow: none;
  cursor: not-allowed;
}
.mat-raised-button.magic-link {
  background-color: var(--color-accent);
}

.mat-stroked-button {
  border-color: rgba(0, 0, 0, 0.12);
  color: var(--color-primary);
}
.mat-stroked-button:hover {
  background-color: rgba(63, 81, 181, 0.04);
}

/* This positions the icons inside the form fields */
.mat-form-field .mat-icon {
    position: absolute;
    top: 50%;
    right: 12px;
    transform: translateY(-50%);
    width: 2.4rem;
    height: 2.4rem;
    color: var(--color-text-light);
    pointer-events: none;
}

/* This resets the position for icons inside a button (like the password toggle) */
.mat-icon-button .mat-icon {
    position: static;
    transform: none;
    pointer-events: auto;
}

/* This utility class will hide/show the eyeball icons */
.hidden {
    display: none;
}

.ripple {
  position: absolute;
  border-radius: 50%;
  transform: scale(0);
  animation: ripple 0.6s linear;
  background-color: rgba(255, 255, 255, 0.7);
}
@keyframes ripple {
  to { transform: scale(4); opacity: 0; }
}


/* =============================================== */
/* 3. HEADER & NAVIGATION                          */
/* =============================================== */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background-color: var(--color-white);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.main-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 0;
}

.main-nav__logo img {
  width: 150px;
  display: block;
}

.main-nav__links {
  display: none; /* Hidden on mobile */
}

.main-nav__auth a {
  padding: 0.8rem 1.6rem;
  font-size: 1.4rem;
}

/* =============================================== */
/* 4. HOMEPAGE SECTIONS                           */
/* =============================================== */
.hero-section {
  position: relative;
  background-size: cover;
  background-position: center;
  background-image: url("img/lskfoelsl009jfslskeo.jpg"); /* This line is restored */
  color: var(--color-text);
  text-align: center;
}
.hero-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(112, 128, 144, 0.25); /* Cool Slate Blue */
  z-index: 1;
}

/* Change hero text to white for better contrast */
.hero-content h1,
.hero-content .hero-description {
  color: #ffffff;
  /* Optional: A subtle shadow makes text pop on any background */
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.25);
}



.hero-content {
  position: relative;
  z-index: 2;
  padding: 6rem 0;
}
.hero-content h1 { font-size: 3.5rem; margin-bottom: 1rem; }
.hero-subtitle { font-size: 3.5rem; font-weight: 700; color: white; margin-bottom: 3rem; }
.hero-description { max-width: 600px; margin: 0 auto 4rem auto; }
.hero-button { font-size: 1.6rem; padding: 1.2rem 3.2rem; }


.highlight-text {
  color: gold;
  font-weight: 500;
}

.features-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
}
.feature-icon-wrapper {
  display: flex;
  justify-content: center;
  margin-bottom: 2rem;
}
.feature-icon-wrapper div {
  background-color: #e8eaf6;
  padding: 1.6rem;
  border-radius: 50%;
}
.mat-icon {
  width: 4rem;
  height: 4rem;
  color: var(--color-primary);
}
.feature-title { font-size: 2rem; margin-bottom: 1rem; }

.why-us-container {
  display: flex;
  flex-direction: column;
  gap: 4rem;
  align-items: center;
}
.why-us-text, .why-us-image { flex: 1; }
.why-us-text .section-title, .why-us-text .section-subtitle {
  text-align: left;
  margin-left: 0;
}
.why-us-list {
  margin-top: 3rem;
  display: flex;
  flex-direction: column;
  gap: 2.5rem;
}
.why-us-list-item {
  display: flex;
  align-items: flex-start;
  gap: 1.5rem;
}
.why-us-icon {
  width: 3.2rem;
  height: 3.2rem;
  color: var(--color-green);
  flex-shrink: 0;
  margin-top: 0.5rem;
}

.reviews-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
}
.review-card { text-align: left; }
.review-stars {
  display: flex;
  color: var(--color-yellow);
  margin-bottom: 1.5rem;
}
.review-stars .star-icon { width: 2rem; height: 2rem; }
.review-text {
  color: var(--color-text-light);
  font-style: italic;
  margin-bottom: 1.5rem;
}
.review-author { font-weight: 500; }

.cta-section { padding: 6rem 0; }
.cta-box {
  background-color: var(--color-primary);
  color: var(--color-white);
  border-radius: 8px;
  padding: 4rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 3rem;
  overflow: hidden;
}
.cta-text h2 { font-size: 3rem; margin-bottom: 1.5rem; }
.cta-text p { font-size: 1.8rem; color: rgba(255,255,255,0.8); margin-bottom: 3rem; max-width: 500px; }
.cta-image img { max-width: 300px; }

.cta-button {
  background-color: var(--color-white);
  color: var(--color-primary);
}

.cta-button:hover {
  background-color: #f5f5f5; /* A slightly off-white for hover */
}
/* =============================================== */
/* 5. FOOTER                                       */
/* =============================================== */
.site-footer {
  background-color: #333;
  color: var(--color-white);
  padding: 4rem 0 2rem 0;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  margin-bottom: 3rem;
}
.footer-grid h3 { font-size: 1.8rem; margin-bottom: 1.5rem; font-weight: 500; }
.footer-grid ul { list-style: none; }
.footer-grid li { margin-bottom: 1rem; }
.footer-grid a { text-decoration: none; color: #ccc; transition: var(--transition); }
.footer-grid a:hover { color: var(--color-primary); }
.social-links { display: flex; gap: 1.5rem; }
.social-links svg { width: 2.4rem; height: 2.4rem; }
.footer-bottom { border-top: 1px solid #444; padding-top: 2rem; text-align: center; font-size: 1.4rem; color: #aaa; }


/* =============================================== */
/* 6. FORMS (Sign In, Register, Forgot Password)   */
/* =============================================== */
.form-page-wrapper {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: calc(100vh - 82px); /* Full height minus header */
    padding: 2rem 0;
}
.form-card {
    width: 100%;
    max-width: 400px;
}
.form-card .form-title {
    font-size: 2.2rem;
}
.form-card .form-subtitle {
    color: var(--color-text-light);
    margin-top: 0.8rem;
    font-size: 1.4rem;
}
.form-card form {
    margin-top: 2.4rem;
    display: flex;
    flex-direction: column;
    gap: 2.4rem;
}
.form-card .form-footer-link {
    margin-top: 2.4rem;
    font-size: 1.4rem;
    text-align: center;
}
.form-card .form-footer-link a {
    font-weight: 500;
    color: var(--color-primary);
    text-decoration: none;
}
.form-card .form-footer-link a:hover {
    text-decoration: underline;
}

.mat-form-field {
  position: relative;
  background-color: rgba(0,0,0,.04);
  border-top-left-radius: 4px;
  border-top-right-radius: 4px;
  padding: 20px 12px 8px 12px;
  cursor: text;
  transition: background-color .3s;
}
.mat-form-field::after {
  content: '';
  position: absolute;
  bottom: 0; left: 0; right: 0; height: 1px;
  background-color: rgba(0,0,0,0.42);
  transform: scaleX(1);
  transition: all .3s;
}
.mat-form-field.focused::after {
  height: 2px;
  background-color: var(--color-primary);
}
.mat-form-field:hover { background-color: rgba(0,0,0,.08); }
.mat-form-field label {
  position: absolute;
  top: 20px;
  left: 12px;
  color: rgba(0,0,0,.6);
  transition: all .3s;
  transform-origin: left top;
  pointer-events: none;
}
.mat-form-field input {
  background: none;
  border: none;
  outline: none;
  width: 100%;
  font-size: 16px;
  color: var(--color-text);
  padding-right: 36px;
}
.mat-form-field.focused label,
.mat-form-field input:not(:placeholder-shown) + label {
  transform: translateY(-14px) scale(.75);
}
.mat-form-field.focused label { color: var(--color-primary); }

.mat-icon-button {
  position: absolute;
  top: 50%;
  right: 4px;
  transform: translateY(-50%);
  background: none;
  border: none;
  cursor: pointer;
  color: var(--color-text-light);
  border-radius: 50%;
  width: 36px;
  height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.mat-icon-button:hover { background-color: rgba(0,0,0,0.04); }

.mat-error {
  color: var(--color-error);
  font-size: 1.2rem;
  margin-top: 4px;
  display: none;
}
.mat-form-field.invalid.touched + .mat-error { display: block; }

.mat-button-toggle-group {
  border: 1px solid rgba(0,0,0,.12);
  border-radius: 4px;
  overflow: hidden;
  display: flex;
  width: fit-content;
  margin: 0 auto;
}
.mat-button-toggle-group label {
  cursor: pointer;
  padding: 0.8rem 1.6rem;
  transition: background-color 0.2s ease-in-out;
  color: rgba(0,0,0,.6);
  border-right: 1px solid rgba(0,0,0,.12);
}
.mat-button-toggle-group label:last-child { border-right: none; }
.mat-button-toggle-group input[type="radio"] { display: none; }
.mat-button-toggle-group input[type="radio"]:checked + label {
  color: var(--color-primary);
  background-color: #e8eaf6;
}

.password-container, .forgot-password-container {
  max-height: 0;
  overflow: hidden;
  transition: all 0.4s ease-in-out;
  opacity: 0;
}
.password-container.visible, .forgot-password-container.visible {
  max-height: 100px;
  opacity: 1;
}

.form-submit-button {
  width: 100%;
  padding-top: 1.2rem;
  padding-bottom: 1.2rem;
}

/* =============================================== */
/* 7. MEDIA QUERIES (TABLET & UP)                  */
/* =============================================== */
@media (min-width: 768px) {
  section { padding: 8rem 0; }
  .section-title { font-size: 3.2rem; }
  .hero-content h1 { font-size: 5rem; }

  .main-nav__links {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 2.5rem;
    /* Center the links */
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
  }
  .main-nav__auth { margin-left: auto; }

  /* Section Layouts */
  .features-grid { grid-template-columns: repeat(4, 1fr); }
  .why-us-container { flex-direction: row; }
  .reviews-grid { grid-template-columns: repeat(3, 1fr); }
  .cta-box { flex-direction: row; text-align: left; justify-content: space-between; }
  .cta-text p { max-width: none; }
  .footer-grid { grid-template-columns: repeat(4, 1fr); }
}

@media (min-width: 1024px) {
  section { padding: 10rem 0; }
  .hero-content h1 { font-size: 6rem; }
}