/* =========================================
   1. GLOBAL LAYOUT & TYPOGRAPHY
   ========================================= */

@media (min-width: 1200px) {
    .container {
        max-width: 1200px;
    }
}

/* Global Body Styles */
body {
    background-color: #f8fafc; /* Modern soft gray */
    color: #334155;            /* Slate text */
    font-family: 'Inter', -apple-system, sans-serif;
    letter-spacing: -0.01em;
    font-size: 1.125rem;
    line-height: 1.6;
}

/* =========================================
   2. REFINED LINK STYLING
   ========================================= */

/* Body Links */
a {
    color: #0052cc;        /* Inter Blue */
    text-decoration: none; 
    transition: all 0.2s ease-in-out;
}

a:hover {
    color: #003d99;        /* Royal Blue */
    text-decoration: none; 
    border-bottom: 1px solid #0052cc; 
}

/* Navigation Links (No Underlines) */
.navbar a,
.nav-link,
.navbar-brand,
#navstyle a {
    border-bottom: none !important;
    text-decoration: none !important;
    color: #475569 !important; /* Slate Gray */
}

.navbar a:hover,
.nav-link:hover,
#navstyle a:hover {
    color: #0052cc !important; /* Blue hover */
    border-bottom: none !important;
}

/* =========================================
   3. NAVIGATION & HEADER
   ========================================= */

#navstyle {
    padding-top: 0px;
    padding-bottom: 0px;
}

/* Seamless Header (Matches Body Background) */
.navbar, #navstyle {
    background-color: #f8fafc !important; 
    border-bottom: none !important; 
    color: #334155; 
}

.navbar-toggler {
    border: none !important;
}

/* Dropdown Menus (Keep White) */
.dropdown-menu {
    background-color: white !important;
    border: none !important;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1) !important;
    border-radius: 12px !important;
}

/* =========================================
   4. MODERN COMPONENT STYLES
   ========================================= */

h1, h2, h3, h4 {
    padding-bottom: 10px;
    font-weight: 700;
}

/* --- CARDS --- */
.card {
    border: none !important;
    border-radius: 12px !important;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -1px rgba(0, 0, 0, 0.03);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    background-clip: padding-box; /* Fixes border bleed */
    overflow: hidden; /* Fixes square children */
}
.card:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.08);
}

/* Card Inner Elements Fixes */
.card-header:first-child { border-radius: 12px 12px 0 0 !important; }
.card-footer:last-child { border-radius: 0 0 12px 12px !important; }
.card-img-top { border-top-left-radius: 12px !important; border-top-right-radius: 12px !important; }

.table-bordered td, .table-bordered th {
    border: 0.25px solid rgb(222, 226, 230);
}

.table td, .table th {
    padding: .5rem;
    vertical-align: top;
    border-top: .5px solid #dee2e6;
}

/* --- BUTTONS --- */
.btn {
    border-radius: 8px !important;
    padding: 0.6rem 1.25rem;
    font-weight: 600;
    transition: all 0.2s;
    background-clip: padding-box;
}

/* Primary Action Color */
.btn-primary,
.btn-primary:hover,
.btn-primary:active,
.btn-primary:focus {
    background-color: #103766 !important; /* Navy */
    color: white !important;
    border: none !important;
}

/* --- FORMS & INPUTS --- */
.form-control, select {
    border-radius: 8px !important;
    border: 1px solid #e2e8f0;
    padding: 0.75rem;
    width: 100%;
    background-clip: padding-box;
}
.form-control:focus, select:focus {
    box-shadow: 0 0 0 3px rgba(16, 55, 102, 0.1);
    border-color: #103766;
    outline: none;
}

input[type=text], select {
    width: 100%;
    padding: 12px 20px;
    display: inline-block;
    border: 1px solid #ccc;
    border-radius: 4px;
    box-sizing: border-box;
}

input[type=submit], input[type=submit]:hover {
    width: 100%;
    background: #0084c9 !important;
    color: white;
    padding: 14px 20px;
    margin: 8px 0;
    border: none;
    border-radius: 4px;
    cursor: pointer;
}

.calc	 {
	max-width: 350px;
	min-width: 250px;
    border-radius: 5px;
    background-color: #f2f2f2;
    padding: 20px;
    /* margin: auto; */ /*Enable to center calc*/
}

.row#calc-row {
	margin-top: 50px;
}

h2#calc-header {
  text-align: center;
}

h4#answer-header {
  margin-top: 20px;	
}

#answer {
	margin-top: 20px;
}

/* --- TABLES --- */
.table {
    background: white;
    overflow: hidden;
    border-collapse: separate; 
    border-spacing: 0;
}
.table thead th {
    background-color: #e9ecef;
    border-bottom: 2px solid #e2e8f0;
    text-transform: uppercase;
    font-size: 0.75rem;
    letter-spacing: 0.05em;
    color: #64748b;
}

/* =========================================
   5. SITE SPECIFIC LAYOUTS
   ========================================= */

.container { padding-top: 25px; padding-bottom: 50px; }
#articles { padding-top: 25px; padding-bottom: 0px; }

/* Banner */
#banner {
    background-image: url("/images/banner.jpg");
    background-size: cover;
    background-repeat: no-repeat;
    padding-top: 10px !important;
    padding-bottom: 10px !important;
}

/* Utilities */
.disabled {
    color: #999;
    pointer-events: none;
    text-decoration: none;
    cursor: default;
}

/* Calculator Box */
.calc {
    max-width: 350px;
    min-width: 250px;
    border-radius: 12px;
    background-color: white;
    padding: 20px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
}
.row#calc-row { margin-top: 50px; }
h2#calc-header { text-align: center; }
h4#answer-header { margin-top: 20px; }
#answer { margin-top: 20px; }

/* =========================================
   6. RESPONSIVE UTILITIES
   ========================================= */

@media screen and (max-width: 768px) {
    h1 { font-size: 2rem; }
    h2 { font-size: 1.75rem; }
    h3 { font-size: 1.5rem; }
    h4 { font-size: 1.25rem; }
    .display-4 { font-size: 2.0rem; }
    #ad-slot { min-height: 300px; }
    
    h2::before {
        display: block; content: " "; margin-top: -85px; height: 85px;
        visibility: hidden; pointer-events: none;
    }
}

@media screen and (min-width: 769px) {
    #ad-slot { min-height: 300px; }
    h2::before {
        display: block; content: " "; margin-top: -60px; height: 60px;
        visibility: hidden; pointer-events: none;
    }
}

.columns {
    -moz-column-width: 5.0em;
    -webkit-column-width: 5.0em;
    column-width: 5.0em;
}
.columns ul { margin: 0; padding: 0; list-style-type: none; }
.columns ul li:first-child { margin-top: 0px; }
.columns li { line-height: 35px; }
li { line-height: 30px; }

.table-responsive {
  border-radius: .5rem;
}

/* =========================================
   7. HOMEPAGE STICKY HEADER
   ========================================= */

/* Smooth scrolling when clicking links */
  html {
    scroll-behavior: smooth;
  }
  
/* 1. Desktop: Keep it as is (or a very small buffer) */
[id] {
  scroll-margin-top: 20px; 
}

/* 2. Increase the offset for Mobile (where the menu wraps and gets taller) */
@media (max-width: 576px) {
  :root {
    --nav-height: 50px; /* Adjust this based on how many lines your menu wraps to */
  }
}

/* 3. Apply the variable to all linkable IDs */
[id] {
  scroll-margin-top: var(--nav-height);
}

/* Smooth scrolling for a better user experience */
html {
  scroll-behavior: smooth;
}

  /* Subtle hover effect for the letters */
  .nav-pills .nav-link:hover:not(.disabled) {
    background-color: #f8f9fa;
    color: #007bff;
  }

  /* Fade-in animation for the Top button */
  #back-to-top {
    animation: fadeIn 0.4s;
  }

  @keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
  }
  
/* Specifically target the disabled span in nav */
.nav-link.disabled {
    color: #adb5bd !important; /* Bootstrap's $gray-500 */
    cursor: default;           /* Keeps the pointer from turning into a hand */
    pointer-events: none;      /* Prevents any accidental click logic */
    opacity: 0.6;              /* Makes it look slightly faded */
}