/*
########################
FONTS
########################
*/

@import url('../fonts/bootstrapicons/bootstrap-icons.min.css'); /* Use Bootstrap icons locally */

/*
########################
BODY STYLING
########################
*/

html {
  height: 100%;
}

html,
body {
  overflow-x: hidden; /* Prevent scroll on narrow devices */
}

body {
  padding-top: 56px;
  background-color: #000000;
  min-height: 100%;
  display: flex;
  flex-direction: column;
}


/*
########################
FONT STYLING
########################
*/

/* Headings */
h1,h2,h3,h4,h5,h6 {
  font-weight: 600;
}

/*
########################
NAVIGATION STYLING
########################
*/

@media (max-width: 991.98px) {
  .offcanvas-collapse {
    position: fixed;
    top: 56px; /* Height of navbar */
    bottom: 0;
    left: 100%;
    width: 100%;
    padding-right: 1rem;
    padding-left: 1rem;
    overflow-y: auto;
    visibility: hidden;
    background-color: #000000;
    opacity: 1;
    transition: transform .3s ease-in-out, visibility .3s ease-in-out;
    font-weight: bolder; /* Mobile menu text */
  }
  .offcanvas-collapse.open {
    visibility: visible;
    transform: translateX(-100%);
  }
}

.nav-scroller {
  position: relative;
  z-index: 2;
  height: 2.75rem;
  overflow-y: hidden;
}

.nav-scroller .nav {
  display: flex;
  flex-wrap: nowrap;
  padding-bottom: 1rem;
  margin-top: -1px;
  overflow-x: auto;
  color: rgba(255, 255, 255, .75);
  text-align: center;
  white-space: nowrap;
  -webkit-overflow-scrolling: touch;
}

.nav-underline .nav-link {
  padding-top: .75rem;
  padding-bottom: .75rem;
  font-size: .875rem;
  color: #6c757d;
}

.nav-underline .nav-link:hover {
  color: #007bff;
}

.nav-underline .active {
  font-weight: 500;
  color: #343a40;
}

/* Wordlogo styling */
.navbar-brand {
  font-weight: 900; 
  font-size: 2rem; 
}

.open .nav-link {
  font-size: 125%; 
  color: #fff !important; 
  text-align:center; 
  padding: 1em;}

/* Navbar styling desktop only*/
@media screen and (min-width: 992px) {
  .navbar-collapse{
    border-left: 5px solid #ffffff;
    padding-left: 5px;
  }
}

/* Navigation styling - mobile only */
@media screen and (max-width: 991.98px) {
  .navbar-brand {
    font-weight: 900;
    font-size: 1.5rem;
  }

  .offcanvas-collapse {
    position: fixed;
    top: 56px; /* Height of navbar */
    bottom: 0;
    left: 100%;
    width: 100%;
    padding-right: 1rem;
    padding-left: 1rem;
    overflow-y: auto;
    visibility: hidden;
    transition: transform .3s ease-in-out, visibility .3s ease-in-out;
  }

  .offcanvas-collapse.open {
    visibility: visible;
    transform: translateX(-100%);
  }

  .nav-item {
    text-align:center;
    border-radius: 15px;
    margin-top: 1rem;
    padding: 0.2rem;
    font-weight: bold;
    font-size: 1.5rem;
}
}


/* 
########################
UI Element Styling
########################
*/

/*
########################
TEXT STYLING
########################
*/

.text-white-50 { color: rgba(255, 255, 255, .5); }

.font-larger {font-size: 100%;} /* To make nav link after each subject larger */


/*
########################
BACKGROUND STYLING
########################
*/

.bg-purple { background-color: #6f42c1; }

.bg-green { background-color: #007545;}

.bg-black { background-color: #000000;}

.bg-transparent-black {
  background-color: rgba(0, 0, 0, 1);
}

/*
########################
NAVBAR STYLING
########################
*/

.navbar {
  border: none;
}

/*
########################
MAIN CONTENT STYLING
########################
*/

main {
  flex: 1;
}

/*
########################
FOOTER STYLING
########################
*/

footer {
  margin-top: auto;
}


/*
########################
UL STYLING
########################
*/

ul {
  padding-left: 1rem;
}

/*
########################
MODERN TOOL CARD STYLING
########################
*/

/* Modern tool card styling */
.tool-card {
  background: linear-gradient(135deg, rgba(20, 20, 20, 0.95) 0%, rgba(10, 10, 10, 0.95) 100%);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 16px;
  padding: 1.5rem !important;
  margin-bottom: 1.5rem;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  backdrop-filter: blur(10px);
  position: relative;
  overflow: hidden;
}

/* Hover effects for tool cards */
.tool-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.3), 0 4px 8px rgba(0, 0, 0, 0.2);
  border-color: rgba(255, 255, 255, 0.2);
}

/* Card header styling */
.tool-card h2 {
  color: #ffffff;
  font-size: 1.5rem;
  font-weight: 600;
  margin-bottom: 1rem;
  position: relative;
  padding-bottom: 0.5rem;
}

/* Add subtle underline to card headers */
.tool-card h2::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 40px;
  height: 2px;
  background: linear-gradient(90deg, #ffffff 0%, rgba(255, 255, 255, 0.5) 100%);
  border-radius: 1px;
}

/* Tool links styling */
.tool-card .tool-link {
  color: rgba(255, 255, 255, 0.8);
  text-decoration: none;
  display: block;
  padding: 0.75rem 1rem;
  margin: 0.5rem 0;
  border-radius: 8px;
  transition: all 0.2s ease;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid transparent;
}

/* Hover effects for tool links */
.tool-card .tool-link:hover {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.2);
  transform: translateX(4px);
  text-decoration: none;
}

/* List styling within tool cards */
.tool-card ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.tool-card li {
  margin: 0;
  padding: 0;
}

/* Search input styling */
#toolSearch {
  background: rgba(20, 20, 20, 0.9) !important;
  border: 1px solid rgba(255, 255, 255, 0.2) !important;
  border-radius: 12px !important;
  color: #ffffff !important;
  padding: 1rem 1.5rem !important;
  font-size: 1.1rem !important;
  transition: all 0.3s ease;
  backdrop-filter: blur(10px);
}

#toolSearch:focus {
  background: rgba(30, 30, 30, 0.95) !important;
  border-color: rgba(255, 255, 255, 0.4) !important;
  box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.1) !important;
  outline: none !important;
}

#toolSearch::placeholder {
  color: rgba(255, 255, 255, 0.6) !important;
}

/*
########################
CORNER BORDER STYLING (UPDATED)
########################
*/

/* Corner border class - creates border pieces only in the four corners */
.corner-border {
  position: relative;
}

/* Create corner pieces using pseudo-elements */
.corner-border::before,
.corner-border::after {
  content: '';
  position: absolute;
  width: 20px;
  height: 20px;
  border: 2px solid rgba(255, 255, 255, 0.3);
  z-index: 1;
  transition: border-color 0.3s ease;
}

/* Top-left corner */
.corner-border::before {
  top: 0;
  left: 0;
  border-right: none;
  border-bottom: none;
}

/* Bottom-right corner */
.corner-border::after {
  bottom: 0;
  right: 0;
  border-left: none;
  border-top: none;
}

/* Hover effect for corner borders */
.corner-border:hover::before,
.corner-border:hover::after {
  border-color: rgba(255, 255, 255, 0.6);
}

/* For all four corners, we need additional elements */
.corner-border .corner-top-right,
.corner-border .corner-bottom-left {
  content: '';
  position: absolute;
  width: 20px;
  height: 20px;
  border: 2px solid rgba(255, 255, 255, 0.3);
  z-index: 1;
  transition: border-color 0.3s ease;
}

/* Top-right corner */
.corner-border .corner-top-right {
  top: 0;
  right: 0;
  border-left: none;
  border-bottom: none;
}

/* Bottom-left corner */
.corner-border .corner-bottom-left {
  bottom: 0;
  left: 0;
  border-right: none;
  border-top: none;
}

/* Hover effect for additional corner elements */
.corner-border:hover .corner-top-right,
.corner-border:hover .corner-bottom-left {
  border-color: rgba(255, 255, 255, 0.6);
}

/*
########################
SECTION HEADER STYLING
########################
*/

.section-header {
  color: #ffffff;
  font-size: 1.75rem;
  font-weight: 600;
  margin-bottom: 1rem;
  position: relative;
  padding-bottom: 0.5rem;
}

/* Add subtle underline to card headers */
.section-header::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 40px;
  height: 2px;
  background: linear-gradient(90deg, #ffffff 0%, rgba(255, 255, 255, 0.5) 100%);
  border-radius: 1px;
}

/*
########################
RESPONSIVE DESIGN
########################
*/

@media (max-width: 768px) {
  .tool-card {
    padding: 1.25rem !important;
    margin-bottom: 1rem;
  }
  
  .tool-card h2 {
    font-size: 1.25rem;
  }
  
  #toolSearch {
    padding: 0.875rem 1.25rem !important;
    font-size: 1rem !important;
  }
}

/*
########################
MODERN FORM STYLING
########################
*/

/* Calculator page styling */
.calculator-container {
  background: linear-gradient(135deg, rgba(20, 20, 20, 0.95) 0%, rgba(10, 10, 10, 0.95) 100%);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 16px;
  padding: 2rem !important;
  margin-bottom: 1.5rem;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  backdrop-filter: blur(10px);
  position: relative;
  overflow: hidden;
}

/* Form controls styling */
.form-control, .form-select {
  background: rgba(20, 20, 20, 0.9) !important;
  border: 1px solid rgba(255, 255, 255, 0.2) !important;
  border-radius: 8px !important;
  color: #ffffff !important;
  padding: 0.875rem 1rem !important;
  font-size: 1rem !important;
  transition: all 0.3s ease;
  backdrop-filter: blur(5px);
}

.form-control:focus, .form-select:focus {
  background: rgba(30, 30, 30, 0.95) !important;
  border-color: rgba(255, 255, 255, 0.4) !important;
  box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.1) !important;
  outline: none !important;
}

.form-control::placeholder {
  color: rgba(255, 255, 255, 0.6) !important;
}

/* Form labels styling */
.form-label {
  color: #ffffff !important;
  font-weight: 500;
  margin-bottom: 0.5rem;
  font-size: 0.95rem;
}

/* Floating label styling for dark theme */
.form-floating > .form-control,
.form-floating > .form-select {
  background: rgba(20, 20, 20, 0.9) !important;
  border: 1px solid rgba(255, 255, 255, 0.2) !important;
  border-radius: 8px !important;
  color: #ffffff !important;
  padding: 1rem 0.75rem 0.25rem 0.75rem !important;
  font-size: 1rem !important;
  transition: all 0.3s ease;
  backdrop-filter: blur(5px);
  height: calc(3.5rem + 2px);
}

.form-floating > .form-control:focus,
.form-floating > .form-select:focus {
  background: rgba(30, 30, 30, 0.95) !important;
  border-color: rgba(255, 255, 255, 0.4) !important;
  box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.1) !important;
  outline: none !important;
}

.form-floating > .form-control::placeholder {
  color: transparent !important;
}

.form-floating > label {
  color: rgba(255, 255, 255, 0.7) !important;
  font-weight: 400;
  font-size: 0.9rem;
  padding: 1rem 0.75rem;
  pointer-events: none;
  border: 1px solid transparent;
  transform-origin: 0 0;
  transition: opacity 0.1s ease-in-out, transform 0.1s ease-in-out;
}

.form-floating > .form-control:focus ~ label,
.form-floating > .form-control:not(:placeholder-shown) ~ label,
.form-floating > .form-select:focus ~ label,
.form-floating > .form-select:not([value=""]) ~ label {
  opacity: 0.65;
  transform: scale(0.85) translateY(-0.5rem) translateX(0.15rem);
  color: rgba(255, 255, 255, 0.8) !important;
}

/* Ensure select options are visible */
.form-floating > .form-select option {
  background: #1a1a1a;
  color: #ffffff;
}

/* Custom input group with floating labels */
.input-group-floating {
  display: flex;
  align-items: stretch;
  width: 100%;
}

.input-group-floating > .form-floating {
  flex: 1 1 auto;
  width: 1%;
}

.input-group-floating > .form-floating > .form-control {
  border-top-right-radius: 0 !important;
  border-bottom-right-radius: 0 !important;
  border-right: 0 !important;
}

.input-group-floating > .btn {
  border-top-left-radius: 0 !important;
  border-bottom-left-radius: 0 !important;
  border-left: 0 !important;
  border-color: rgba(255, 255, 255, 0.2) !important;
  background: rgba(20, 20, 20, 0.9) !important;
  color: rgba(255, 255, 255, 0.8) !important;
  z-index: 2;
}

.input-group-floating > .btn:hover {
  border-color: rgba(255, 255, 255, 0.4) !important;
  background: rgba(30, 30, 30, 0.95) !important;
  color: #ffffff !important;
}

/* Ensure the floating label works properly with input groups */
.input-group-floating > .form-floating > .form-control:focus {
  border-color: rgba(255, 255, 255, 0.4) !important;
  box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.1) !important;
}

.input-group-floating > .form-floating > .form-control:focus + .btn {
  border-color: rgba(255, 255, 255, 0.4) !important;
}

/* Small text styling */
small {
  color: rgba(255, 255, 255, 0.7) !important;
  font-size: 0.875rem;
}

/* Modern button styling */
.btn {
  border-radius: 8px;
  padding: 0.75rem 1.5rem;
  font-weight: 500;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
}

.btn-outline-primary {
  background: rgba(13, 110, 253, 0.1);
  border: 1px solid rgba(13, 110, 253, 0.5);
  color: #ffffff;
}

.btn-outline-primary:hover {
  background: rgba(13, 110, 253, 0.2);
  border-color: rgba(13, 110, 253, 0.7);
  color: #ffffff;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(13, 110, 253, 0.3);
}

.btn-outline-danger {
  background: rgba(220, 53, 69, 0.1);
  border: 1px solid rgba(220, 53, 69, 0.5);
  color: #ffffff;
}

.btn-outline-danger:hover {
  background: rgba(220, 53, 69, 0.2);
  border-color: rgba(220, 53, 69, 0.7);
  color: #ffffff;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(220, 53, 69, 0.3);
}

/* Textarea styling */
textarea.form-control {
  min-height: 100px;
  resize: vertical;
  font-family: 'Courier New', monospace;
  font-size: 0.9rem;
  line-height: 1.4;
}

/* Page header styling */
.page-header {
  background: linear-gradient(135deg, rgba(20, 20, 20, 0.95) 0%, rgba(10, 10, 10, 0.95) 100%);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 16px;
  padding: 2rem !important;
  margin-bottom: 2rem;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  backdrop-filter: blur(10px);
}

.page-header h1 {
  color: #ffffff;
  font-size: 1.75rem;
  font-weight: 600;
  margin-bottom: 1rem;
  text-align: center;
}

.page-header p {
  color: rgba(255, 255, 255, 0.8);
  line-height: 1.6;
  margin-bottom: 0;
}

/* Content page styling for pages like About */
.content-page {
  background: linear-gradient(135deg, rgba(20, 20, 20, 0.95) 0%, rgba(10, 10, 10, 0.95) 100%);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 16px;
  padding: 2.5rem !important;
  margin-bottom: 2rem;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  backdrop-filter: blur(10px);
}

.content-page h1 {
  color: #ffffff;
  font-size: 2.5rem;
  font-weight: 700;
  margin-bottom: 1.5rem;
  text-align: left;
}

.content-page p {
  color: rgba(255, 255, 255, 0.8);
  line-height: 1.7;
  margin-bottom: 1.5rem;
  font-size: 1.1rem;
  text-align: left;
}

.content-page p:last-child {
  margin-bottom: 0;
}

/* Enhanced paragraph spacing for better readability */
.page-header p {
  color: rgba(255, 255, 255, 0.8);
  line-height: 1.7;
  margin-bottom: 1.5rem;
  font-size: 1rem;
}

.page-header p:last-child {
  margin-bottom: 0;
}

/* General paragraph spacing improvements */
p {
  line-height: 1.7;
  margin-bottom: 1.5rem;
  color: rgba(255, 255, 255, 0.8);
}

/* Info section styling */
.info-section {
  background: linear-gradient(135deg, rgba(20, 20, 20, 0.95) 0%, rgba(10, 10, 10, 0.95) 100%);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 16px;
  padding: 1.5rem !important;
  margin-bottom: 1.5rem;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  backdrop-filter: blur(10px);
}

.info-section h1 {
  color: #ffffff;
  font-size: 1.5rem;
  font-weight: 600;
  margin-bottom: 1rem;
  text-align: center;
}

.info-section p {
  color: rgba(255, 255, 255, 0.8);
  line-height: 1.7;
  margin-bottom: 1.5rem;
  font-size: 1rem;
}

.info-section p:last-child {
  margin-bottom: 0;
}


/* Form group spacing */
.mb-3 {
  margin-bottom: 1.5rem !important;
}

/* Tighter spacing for floating label forms */
.form-floating.mb-3 {
  margin-bottom: 1rem !important;
}

/* Responsive adjustments for calculator */
@media (max-width: 768px) {
  .calculator-container,
  .page-header,
  .info-section {
    padding: 1.5rem !important;
    margin-bottom: 1rem;
  }
  
  .page-header h1 {
    font-size: 1.5rem;
  }
  
  .info-section h1 {
    font-size: 1.25rem;
  }
  
  .btn {
    padding: 0.625rem 1.25rem;
    font-size: 0.9rem;
  }
}