/* Updated Mortgage Calculator Styles */
:root {
  --header-height: 80px;
  --section-padding: 4vw;
  --container-width: 1200px;
  --transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  --dark-bg: #404040;
  --section-bg: #7F7F7F;
  --accent-color: #ecb306;
}

body {
  font-family: 'Inter', sans-serif;
  color: #f0f0f0;
  background-color: var(--dark-bg);
  line-height: 1.6;
  overflow-x: hidden;
}

.calculator-container {
  max-width: var(--container-width);
  margin: 0 auto;
  padding: var(--section-padding);
  position: relative;
  z-index: 2;
}

h1 {
  font-size: 2.5rem;
  font-weight: 600;
  color: #fff;
  position: relative;
  z-index: 2;
  padding: 2rem 0;
  text-transform: uppercase;
  -webkit-text-stroke: 2px var(--dark-bg);
  text-stroke: 2px var(--dark-bg);
  paint-order: stroke fill;
}

@supports (-webkit-text-stroke: 1px black) or (text-stroke: 1px black) {
  h1 {
    text-shadow: none;
  }
}

.input-section {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 2rem;
  margin-bottom: 3rem;
  padding: 2rem;
  background: rgba(127, 127, 127, 0.2);
  backdrop-filter: blur(10px);
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.input-group {
  margin-bottom: 1.5rem;
}

label {
  display: block;
  margin-bottom: 0.75rem;
  font-weight: 600;
  color: #f0f0f0;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-size: 0.9rem;
}

input {
  width: 100%;
  padding: 1rem;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 0;
  font-size: 1rem;
  background: rgba(0, 0, 0, 0.2);
  color: #fff;
  transition: var(--transition);
  text-transform: uppercase;
  justify-content: center;
}

input::placeholder {
  color: rgba(255, 255, 255, 0.5);
  text-transform: none;
}

input:focus {
  outline: none;
  border-color: var(--accent-color);
  box-shadow: 0 0 0 2px rgba(236, 179, 6, 0.3);
}

button {
  background-color: var(--accent-color);
  color: var(--dark-bg);
  border: none;
  padding: 1.25rem 2rem;
  border-radius: 0;
  cursor: pointer;
  font-size: 1rem;
  font-weight: 600;
  transition: var(--transition);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  grid-column: 1 / -1;
  margin-top: 1rem;
}

button:hover {
  background-color: #d49e05;
  transform: translateY(-2px);
}

/* .results-section {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 2rem;
  margin-top: 2rem;
  margin-top: 2rem;
} */
.results-section {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); /* Match input-section min width */
  gap: 2rem;
  margin-top: 2rem;
}

.result-card {
  background: rgba(127, 127, 127, 0.2);
  backdrop-filter: blur(10px);
  padding: 2rem;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  text-align: center;
  transition: var(--transition);
}

.result-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
}

.result-card h3 {
  color: var(--accent-color);
  margin-top: 0;
  margin-bottom: 1rem;
  font-size: 1.1rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

.result-card p {
  font-size: 1.75rem;
  font-weight: bold;
  color: #fff;
  margin: 0;
}

.payment-breakdown {
  grid-column: 1 / -1;
  background: rgba(127, 127, 127, 0.2);
  backdrop-filter: blur(10px);
  padding: 2rem;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.breakdown-chart {
  display: flex;
  height: 40px;
  margin: 2rem 0;
  border-radius: 4px;
  overflow: hidden;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.principal {
  background-color: var(--accent-color);
}

.interest {
  background-color: var(--section-bg);
}

.breakdown-labels {
  display: flex;
  justify-content: center;
  gap: 2rem;
  margin-top: 1rem;
}

.legend {
  display: inline-block;
  width: 15px;
  height: 15px;
  border-radius: 2px;
  margin-right: 0.5rem;
  vertical-align: middle;
}

.amortization-section {
  grid-column: 1 / -1;
  overflow-x: auto;
  background: rgba(127, 127, 127, 0.2);
  backdrop-filter: blur(10px);
  padding: 2rem;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 1.5rem;
}

th, td {
  padding: 1rem 1.5rem;
  text-align: left;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

th {
  background-color: var(--section-bg);
  color: var(--dark-bg);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

tr:nth-child(even) {
  background-color: rgba(0, 0, 0, 0.1);
}

tr:hover {
  background-color: rgba(236, 179, 6, 0.1);
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .input-section {
    grid-template-columns: 1fr;
  }
  
  .results-section {
    grid-template-columns: 1fr;
  }
  
  h1 {
    font-size: 2rem;
    padding: 1.5rem 0;
  }
  
  .result-card {
    padding: 1.5rem;
  }
  
  .result-card p {
    font-size: 1.5rem;
  }
}

@media (max-width: 576px) {
  .calculator-container {
    padding: 2rem 1rem;
  }
  
  h1 {
    font-size: 1.75rem;
    padding: 1rem 0;
  }
  
  .input-section {
    padding: 1.5rem;
  }
  
  .result-card h3 {
    font-size: 1rem;
  }
  
  .result-card p {
    font-size: 1.25rem;
  }
  
  th, td {
    padding: 0.75rem 1rem;
    font-size: 0.9rem;
  }
}
}

/* Contact Section */
.contact {
  background-color: var(--dark-bg);
  position: relative;
}

.contact-container {
  width: 100%;
  padding: 0;
}

.contact-button-container {
  width: 100%;
  padding: 0;
  margin: 0;
}

.contact-button {
  display: flex;
  align-items: center;
  width: 100%;
  min-height: 10rem;
  background: var(--section-bg);
  color: var(--dark-bg);
  text-decoration: none;
  font-size: clamp(1.5rem, 6vw, 2.5rem);
  font-weight: 600;
  padding-left: 2rem;
  transition: var(--transition);
  border: none;
  border-radius: 0 !important;
}

.contact-button:hover {
  background: var(--accent-color);
  transform: scale(1.02);
}


/* Home Toggle Button */
.home-toggle {
  position: fixed;
  top: 1rem;
  left: 1rem;
  z-index: 1000;
}

.home-button {
  background: none !important; 
  border: none !important;
  padding: 0;
  cursor: pointer;
  display: block;
  transition: var(--transition);
}

.home-icon {
  width: 60px; 
  height: 60px;
  object-fit: contain;
  filter: none;
}

/* Second Logo */
.second-logo {
  position: fixed;
  top: 1rem;
  left: 4.5rem; 
  z-index: 1000;
  opacity: 1;
  transition: opacity 0.3s ease;
}

.second-logo.scrolled {
  opacity: 0;
  pointer-events: none;
}

.second-logo-button {
  background: none !important;
  border: none !important;
  padding: 0;
  cursor: pointer;
  display: block;
}

.second-logo-icon {
  width: auto;
  height: 55px;
  object-fit: contain;
}

/* Dock Menu */
.dock-wrapper {
  position: fixed;
  left: 0;
  top: 0;
  height: 100vh;
  width: 50px;
  z-index: 999;
  pointer-events: none;
}

.dock-container {
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  height: auto;
  pointer-events: none;
}

.dock-menu {
  position: relative;
  left: -80px;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  padding: 1.5rem 0.8rem;
  background: rgba(64, 64, 64, 0.2);
  backdrop-filter: blur(10px);
  border-radius: 0 12px 12px 0;
  transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  pointer-events: all;
}

.dock-wrapper:hover .dock-menu {
  left: 0;
  background: rgba(64, 64, 64, 0.4);
  width: 320px;
}

.dock-menu:hover .dock-label{
	opacity: 1;
}

.dock-item {
  position: relative;
  display: flex;
  align-items: center;
  width: 40px;
  height: 40px;
  transition: all 0.2s ease;
}

.dock-item img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  filter: none;
  transition: all 0.2s ease;
}

.dock-item:hover {
  transform: scale(1.2);
}

.dock-item:hover .dock-label {
  opacity: 1;
  font-weight: bold;
  color: var(--accent-color);
}

.dock-label {
  position: absolute;
  left: calc(100% + 15px);
  color: #ffffff;
  font-size: 1.5rem;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: all 0.2s ease;
  font-weight: normal;
  text-transform: uppercase;
}

.dock-indicator {
  position: absolute;
  left: 10px;
  top: 50%;
  transform: translateY(-50%);
  width: 2px;
  height: 50px;
  background: rgba(255, 255, 255, 0.5);
  transition: all 0.3s ease;
  z-index: 1000;
}

.dock-wrapper:hover .dock-indicator {
  opacity: 0;
}

/* Auto-hide functionality */
.dock-menu {
  transition-delay: 0.5s;
}

.dock-wrapper:hover .dock-menu {
  transition-delay: 0s;
}


/* Footer */
footer {
  background: var(--dark-bg);
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding: 2rem 0;
  text-align: center;
}