/*==================== RESET ====================*/
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

/*==================== ROOT VARIABLES ====================*/
:root {
  --primary-color: #041E42;
  --hover-color: #ff4c00;
  --footer-bg-color: #041E42;
  --footer-text-color: #fff;
  --body-light-bg-color: #fff;
  --body-dark-bg-color: #191919;
  --text-light-color: #000;
  --text-dark-color: #bababa;
  --h1-font-size: 36px;
  --h2-font-size: 30px;
  --h3-font-size: 1rem;
  --h4-font-size: 1rem;
  --h1-font-weight: 900;
  --h2-font-weight: 900;
  --h3-font-weight: 900;
  --h4-font-weight: 600;
  --h1-color: #FF4C00;
  --h2-color: #FF4C00;
  --h3-color: #FF4C00;
  --h4-color: #041E42;

  /* NEW: global button settings */
  --am-btn-radius: 0.55rem;
  --bs-btn-focus-box-shadow: none;  /* kill Bootstrap glow globally */
}

/*==================== TYPOGRAPHY ====================*/
h1 {
  font-size: var(--h1-font-size) !important;
  font-weight: var(--h1-font-weight) !important;
  color: var(--h1-color) !important;
}

h2 {
  font-size: var(--h2-font-size) !important;
  font-weight: var(--h2-font-weight) !important;
  color: var(--h2-color) !important;
}

h3 {
  font-size: var(--h3-font-size) !important;
  font-weight: var(--h3-font-weight) !important;
  color: var(--h3-color) !important;
  text-transform: uppercase !important;
}

h4 {
  font-size: var(--h4-font-size) !important;
  font-weight: var(--h4-font-weight) !important;
  color: var(--h4-color) !important;
  text-transform: uppercase !important;
}

strong {
  font-weight: 800 !important;
  font-size: 1rem !important;
  text-transform: uppercase !important;
}

/*==================== LAYOUT ====================*/
html, body {
  height: 100%;
  font-family: Arial, sans-serif;
  background-color: var(--body-light-bg-color);
  color: var(--text-light-color);
  font-size: 18px;
  line-height: 1.5;
  overflow-y: auto;
}

main { flex: 1; }

#footerContainer,
#copyrightContainer { margin-top: auto; }

/*==================== NAVBAR ====================*/
.navbar {
  width: 100%;
  min-height: 60px;
  display: flex;
  align-items: center;
  box-shadow: 0 4px 4px var(--primary-color);
  padding: 0.1rem 1rem;
}

.navbar-brand {
  margin: 0;
  padding: 0;
  display: flex;
  align-items: center;
}

.navbar-brand img {
  height: 30px;
  max-height: 34px;
  width: auto;
  display: block;
  padding: 0;
  object-fit: contain;
}

.navbar-toggler { margin-left: auto; border: none; }
.navbar-nav { min-height: 40px; }

.navbar-nav .nav-link {
  color: var(--primary-color);
  text-decoration: none;
  transition: text-decoration 0.3s ease, color 0.3s ease;
}

.navbar-nav .nav-link:hover {
  text-decoration: underline;
  color: var(--hover-color);
}

/*==================== FOOTER ====================*/
footer {
  background-color: var(--footer-bg-color);
  color: var(--footer-text-color);
  padding: 10px 0;
}

/* headings & links back to base size (~18px) */
footer h5 {
  font-size: 1rem;          /* 18px on your base */
  margin-bottom: 0.35rem;   /* tighter under-title space */
  text-transform: uppercase;
}

/* reset list spacing and keep gaps tight */
footer ul.list-unstyled { margin: 0; padding: 0; }
footer .list-unstyled li { margin: 0; }
footer .list-unstyled li + li { margin-top: 0.15rem; }  /* compact vertical gap */

/* links: base size, compact line-height, minimal padding */
footer a {
  color: var(--hover-color);
  text-decoration: none;
  margin: 0;
  position: relative;
  font-size: 1rem;          /* back to 18px */
  line-height: 1.3;         /* tighter than default */
  display: inline-block;    /* enables padding control */
  padding: 0;               /* no extra vertical padding */
}

footer a:hover {
  color: var(--hover-color);
  text-decoration: underline;
}


/* Hidden “easter egg” footer link */
.footer-ghost-link {
  color: transparent !important;   /* make text invisible */
  text-decoration: none;
}

.footer-ghost-link:hover,
.footer-ghost-link:focus {
  color: var(--hover-color) !important;   /* reveal on hover/focus */
  text-decoration: underline;
}



/* desktop-only: make links block-level for consistent spacing and tighten further */
@media (min-width: 992px) {
  footer .list-unstyled li a {
    display: block;
    line-height: 1.25;        /* a bit tighter on desktop */
    padding-top: 0;
    padding-bottom: 0;
  }
  footer .list-unstyled li + li { margin-top: 0.1rem; }
  footer h5 { margin-bottom: 0.25rem; }
  #footerContainer .row { --bs-gutter-y: 0.25rem; }
}

/* optional: keep same sizes on mobile; remove if you had smaller overrides earlier */
@media (max-width: 576px) {
  footer h5 { font-size: 1rem; }
  footer a  { font-size: 1rem; }
}

/* legacy class (safe to keep) */
.footer-menu {
  display: flex;
  justify-content: flex-start;
  list-style: none;
  padding: 0;
  margin: 0;
}

#copyrightContainer {
  background-color: var(--footer-bg-color);
  color: var(--footer-text-color);
  text-align: center;
  padding: 0 0 6px 0;
  margin: 0;
  border-top: none;
  font-size: 1rem;
}

/*==================== FORMS ====================*/

.form-label {
  font-size: 1rem !important;
  font-weight: 500 !important;
  line-height: 1.4 !important;
}

/* Apply to all text inputs, textareas, and selects */
.form-control,
.form-select {
  border-width: 1px;
}

/* Browser validation – thin red border when invalid */
.form-control:invalid,
.form-select:invalid {
  border-color: #dc3545; /* red */
}

/* Thin green border when valid */
.form-control:valid,
.form-select:valid {
  border-color: #198754; /* green */
}

/* Province – always show as thin green to indicate it's "pre-filled valid" */
#pmProvince {
  border-color: #198754;
}

/* Keep if you ever use validation icons somewhere */
.validation-icon {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 1.2rem;
  font-weight: bold;
}



/*==================== MODALS ====================*/
.popup-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background-color: rgba(0, 0, 0, 0.5);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 1000;
}

.popup-card {
  background-color: rgba(255, 76, 0, 0.5) !important;
  color: white !important;
  padding: 20px;
  border-radius: 8px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
  z-index: 1001;
  text-align: center;
}

.d-none { display: none; }



/*==================== CUSTOM BUTTON ====================*/
.btn-custom {
  background-color: var(--primary-color) !important;
  border-color: var(--primary-color) !important;
  color: white !important;
}

.btn-custom:hover {
  background-color: var(--hover-color) !important;
  border-color: var(--hover-color) !important;
}

/* NAVBAR BUTTONS – consistent radius light & dark (SUBSCRIBE + LOGIN/LOGOUT) */
.navbar .btn,
.navbar .btn-sm,
.navbar .btn-custom {
  border-radius: var(--am-btn-radius) !important;
  box-shadow: none !important;
  outline: none !important;
}

body.dark-mode .navbar .btn,
body.dark-mode .navbar .btn-sm,
body.dark-mode .navbar .btn-custom {
  border-radius: var(--am-btn-radius) !important;
}

/* Dark-mode styling for brand button color stays the same */
body.dark-mode .btn-custom {
  border: 2px solid white !important;
  background-color: var(--primary-color) !important;
  color: white !important;
}

body.dark-mode .btn-custom:hover {
  background-color: var(--hover-color) !important;
  border-color: var(--hover-color) !important;
}




/*==================== RESPONSIVE ====================*/
@media (max-width: 992px) {

  html {
    font-size: 12px !important;
  }

  .navbar {
    min-height: 46px !important;
    padding: 0rem 0.15rem !important;
    display: flex;
    align-items: center;
  }

  .navbar-brand { padding-left: 0 !important; margin-left: 0 !important; }

  .navbar-brand img {
    height: 30px !important;
    max-height: 32px !important;
    display: block;
  }

  .navbar-toggler { padding: 0.25rem !important; }

  .navbar-collapse {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    width: 100%;
    max-height: 0;
    overflow: hidden;
    background-color: #ffffff !important;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    z-index: 999;
    visibility: hidden;
    opacity: 0;
    transition: max-height 0.2s ease, opacity 0.2s ease;
  }

  .navbar-collapse.show {
    max-height: 400px;
    visibility: visible;
    opacity: 1;
    overflow-y: auto;
  }

  .navbar-collapse .navbar-nav .nav-item {
    margin-bottom: 0;
  }

  .navbar-collapse.show .nav-link {
    padding-top: 0.2rem !important;
    padding-bottom: 0.2rem !important;
    font-size: 0.95rem !important;
    line-height: 1.2 !important;
  }

  #navbarContainer {
    min-height: 80px;
    background-color: #f8f9fa;
    display: flex;
    align-items: center;
    justify-content: center;
  }

  .container {
    padding-left: 0.25rem;
    padding-right: 0.25rem;
  }

  .footer-menu {
    justify-content: flex-start !important;
  }

  footer .container {
    text-align: center;
  }

  /* Add spacing between stacked nav buttons on mobile */
  .nav .nav-link.btn.btn-custom {
    margin-right: 0 !important;
    margin-bottom: 8px !important;
    width: 100%;
  }

}
/*==================== GLOBAL CONTAINER (DESKTOP+) ====================*/
@media (min-width: 993px) {
  .container {
    max-width: 1200px;
    margin-left: auto;
    margin-right: auto;
    padding-left: 1rem;
    padding-right: 1rem;
    width: 100%;
  }
}





/*==================== FOOTER: MOBILE HORIZONTAL COMPACT ====================*/
@media (max-width: 576px) {
  #footerContainer .container { padding-left: 8px; padding-right: 8px; }

  #footerContainer .row { --bs-gutter-x: 0.5rem; }

  #footerContainer .row > [class*="col"] {
    padding-left: 0.25rem;
    padding-right: 0.25rem;
  }

  footer .list-unstyled li a {
    padding-left: 0;
    padding-right: 0;
    line-height: 1.25;
  }
}

/* ========= Footer link spacing overrides (tighten gaps) ========= */
footer .list-unstyled { margin: 0; padding: 0; }
footer .list-unstyled li { margin: 0 !important; }
footer .list-unstyled li + li { margin-top: 0.08rem !important; } /* adjust to taste */

footer .list-unstyled li a {
  display: block;                 /* ensure line-height controls vertical rhythm */
  line-height: 1.15 !important;   /* slightly tighter lines */
  padding-top: 0 !important;
  padding-bottom: 0 !important;
}

@media (max-width: 576px) {
  footer .list-unstyled li + li { margin-top: 0.06rem !important; }
  footer .list-unstyled li a { line-height: 1.12 !important; }
}

/* Remove default tap-highlight and odd rounding on iOS */
button, .btn {
  -webkit-appearance: none;
}


/*================================================================================================*/
/*================================= SPANISH FLASHCARDS PAGE ======================================*/
/*================================================================================================*/

html,
body {
  overflow-x: hidden;
}



.flashcard-header {
  margin-bottom: 0.25rem !important;
  text-align: left;
}



.flashcard-subtext {
  font-size: 1rem;
  color: #444;
  line-height: 1.45;
}

.flashcard-subtext a {
  font-weight: 700;
}

.flashcard-toolbar {
  width: 100%;
  max-width: 450px;
  margin: 0 auto;
}

.flashcard-toolbar-right {
  width: 100%;
  max-width: 320px;
  margin-left: auto;
}

.card-counter {
  font-size: 1rem;
  font-weight: 700;
  color: #666;
}


/*================================================================================================*/
/*===================================== FLASHCARD =================================================*/
/*================================================================================================*/

.flashcard-stage {
  margin-top: 0.75rem;
}

.flashcard {
  width: 100%;
  perspective: 1200px;
  cursor: pointer;
  user-select: none;
  position: relative;
}

.flashcard-inner {
  position: relative;
  width: 100%;
  display: grid;
  transition: transform 0.55s ease;
  transform-style: preserve-3d;
}

.flashcard.flipped .flashcard-inner {
  transform: rotateY(180deg);
}

.flashcard-face {
  position: relative;
  grid-area: 1 / 1;
  width: 100%;
  min-height: 0;
  border-radius: var(--am-btn-radius);
  padding: 0.9rem 1.25rem;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  text-align: center;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.12);
}

.flashcard-front {
  background: #ffffff;
  color: #111111;
  border: 2px solid #111111;
}

.flashcard-back {
  background: var(--primary-color);
  color: #ffffff;
  transform: rotateY(180deg);
  position: absolute;
  inset: 0;
  height: 100%;
}

.flashcard-content {
  display: block;
  width: 100%;
  padding-top: 2.75rem;
  padding-bottom: 0.8rem;
}

.flashcard-text {
  font-size: clamp(1.8rem, 5vw, 2.8rem);
  font-weight: 800;
  line-height: 1.2;
  max-width: 96%;
  margin: 0 auto;
}

.flashcard-label {
  position: absolute;
  top: 16px;
  left: 20px;
  font-size: 0.8rem;
  font-weight: 800;
  letter-spacing: 0.5px;
  opacity: 0.7;
}

.tap-hint {
  position: absolute;
  top: 16px;
  right: 20px;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.4px;
  opacity: 0.45;
  pointer-events: none;
}


/*================================================================================================*/
/*================================ ACTIONS BELOW CARD ============================================*/
/*================================================================================================*/

.mobile-flashcard-actions {
  margin-top: 0.9rem;
}

.review-buttons-wrapper {
  margin-top: 0.75rem;
}

.review-prompt {
  font-size: 0.8rem;
  font-weight: 700;
  opacity: 0.7;
  margin-bottom: 6px;
  text-align: center;
}

.review-buttons,
.flashcard-card-buttons {
  width: 100%;
  display: flex;
  justify-content: center;
  flex-wrap: nowrap;
  gap: 8px;
}

.review-buttons .btn,
.flashcard-card-buttons .btn {
  flex: 1 1 0;
  min-width: 0;
  border-radius: var(--am-btn-radius);
  font-weight: 800;
  white-space: nowrap;
}

.review-buttons .btn {
  padding: 0.45rem 0.8rem;
  font-size: 0.95rem;
}

.flashcard-card-buttons {
  padding-bottom: 2px;
}

.flashcard-card-buttons .btn {
  padding: 0.45rem 0.75rem;
}

.flashcard-card-buttons .btn-light {
  border: 2px solid #111111;
}


/*================================================================================================*/
/*===================================== MOBILE STYLES ============================================*/
/*================================================================================================*/

@media (max-width: 768px) {

  .flashcard-header {
    margin-bottom: 0rem !important;
  }

  .yes-words-title {
    font-size: 0.9rem !important;
  }

  .flashcard-subtext {
    display: none;
  }

  .flashcard-toolbar-right {
    max-width: 100%;
    margin-left: 0;
    margin-top: 0.25rem;
  }

  .flashcard-toolbar label {
    margin-bottom: 0.25rem;
    font-size: 0.9rem;
  }

  .card-counter {
    font-size: 0.9rem;
    margin-top: 0.25rem;
  }

  .flashcard-face {
    padding: 0.75rem 0.75rem;
  }

  .flashcard-content {
    padding-top: 2rem;
    padding-bottom: 0.45rem;
  }

  .flashcard-text {
    font-size: 1.15rem;
    line-height: 1.08;
    max-width: 100%;
  }

  .tap-hint {
    display: none;
  }

  .mobile-flashcard-actions {
    margin-top: 0.35rem;
  }

  .review-buttons-wrapper {
    margin-top: 0.4rem;
  }

  .flashcard-card-buttons,
  .review-buttons {
    gap: 5px;
  }

  .flashcard-card-buttons .btn,
  .review-buttons .btn {
    font-size: 0.68rem;
    padding: 0.38rem 0.1rem;
    min-height: 36px;
  }

  .review-prompt {
    font-size: 0.68rem;
    margin-bottom: 3px;
  }
}

/*================================================================================================*/
/*===================================== MOBILE FOOTER ============================================*/
/*================================================================================================*/

@media (max-width: 768px) {

  #footerContainer .row {
    display: flex;
    flex-wrap: wrap;
  }

  #footerContainer .row > div {
    width: 50% !important;
    flex: 0 0 50% !important;
    max-width: 50% !important;
  }
}

/*================================================================================================*/
/*===================================== TABLET / MEDIUM WIDTH ====================================*/
/*================================================================================================*/

@media (max-width: 991.98px) {

  .flashcard-toolbar,
  .flashcard-toolbar-right {
    width: 100% !important;
    max-width: 100% !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
  }

}


/*================================================================================================*/
/*===================================== YES CARDS LIST MOBILE ====================================*/
/*================================================================================================*/

@media (max-width: 768px) {

  #yesCardsList .fw-bold {
    font-size: 0.9rem !important;
  }

  #yesCardsList div {
    font-size: 0.85rem;
  }

  #yesCardsList .small {
    font-size: 0.72rem !important;
  }

}

/*================================================================================================*/
/*===================================== CUSTOM MODAL THEME =======================================*/
/*================================================================================================*/

.modal-content {
  border: 3px solid #041E42 !important;
  border-radius: 0.75rem !important;
}

.modal-header {
  border-bottom: 2px solid #041E42 !important;
}

.modal-footer {
  border-top: 2px solid #041E42 !important;
}