@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');

/* Base Styles */
body, p, td, div, span, input, th, li, textarea {
	font-family: 'Inter', sans-serif;
	font-size: 16px;
	color: #333;
	line-height: 1.5;
}

body {
	background: #f8f9fa;
	margin: 0;
	padding: 0;
	border: 0;
	text-align: center;
}

p {
	margin: 5px 0 8px 0;
}

img {
	border: 0;
	max-width: 100%;
	height: auto;
}

h1 {
	color: #1a73e8;
	font-size: 26px;
	font-weight: 600;
	padding: 0;
	margin: 12px 0;
}

h2 {
	font-size: 22px;
	font-weight: 600;
	color: #1a73e8;
	padding: 0;
	margin-bottom: 2px;
}

h3 {
	font-size: 19px;
	font-weight: 600;
	color: #444;
}

hr {
	border: 0;
	color: #e0e0e0;
	background-color: #e0e0e0;
	height: 1px;
	margin: 20px 0;
}

a {
	color: #1a73e8;
	text-decoration: none;
	transition: color 0.2s ease;
}

a:hover {
	color: #0d47a1;
	text-decoration: underline;
}

/* Form Elements */
input {
	padding: 10px;
	color: #333;
	box-sizing: border-box;
	transition: all 0.2s ease;
}

select {
	padding: 10px;
	color: #333;
	box-sizing: border-box;
	border-radius: 4px;
	transition: all 0.2s ease;
}

option {
	font-size: 16px;
}

input[type=text],
input[type=url],
input[type=tel],
input[type=number],
input[type=color],
input[type=date],
input[type=email], 
select {
	border: 1px solid #dadce0;
	border-radius: 4px;
	box-shadow: 0 1px 3px rgba(0,0,0,0.05);
	font-size: 16px;
	background-color: #fff;
	transition: border 0.2s ease, box-shadow 0.2s ease;
}

input[type=text]:focus,
input[type=url]:focus,
input[type=tel]:focus,
input[type=number]:focus,
input[type=color]:focus,
input[type=date]:focus,
input[type=email]:focus, 
select:focus {
	outline: none;
	border-color: #1a73e8;
	box-shadow: 0 1px 5px rgba(26,115,232,0.3);
}

input[type=submit] {
	border: 0;
	color: #fff;
	padding: 11px 16px;
	font-size: 16px;
	font-weight: 500;
	background-color: #1a73e8;
	border-radius: 4px;
	cursor: pointer;
	box-shadow: 0 1px 3px rgba(0,0,0,0.12);
	transition: all 0.2s ease;
	position: relative;
	padding-right: 50px;
	background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="180px" height="40px"><circle cx="112" cy="20" r="11" fill="rgba(255,255,255,0.3)" /><path d="M110 12 L120 20 L110 28 Z" fill="white" /></svg>');
	background-repeat: no-repeat;
}

input[type=submit]:hover {
	background-color: #0d62d1;
	box-shadow: 0 1px 5px rgba(0,0,0,0.2);
}

input[type=reset], 
input[type=button] {
	border: 0;
	color: #fff;
	padding: 11px 16px;
	font-size: 16px;
	background: #9aa0a6;
	border-radius: 4px;
	cursor: pointer;
	box-shadow: 0 1px 3px rgba(0,0,0,0.12);
	transition: all 0.2s ease;
}

input[type=reset]:hover, 
input[type=button]:hover {
	background: #7e868c;
}

input[type=image],
input[type=image]:hover {
	background: #1a73e8;
	color: #fff;
	padding: 0;
	margin: 0;
	transition: opacity 0.2s ease;
}

input[type=image]:hover {
	opacity: 0.9;
}

.clearbtn {
	cursor: pointer;
	transition: opacity 0.2s ease;
}

.clearbtn:hover {
	opacity: 0.8;
}

.inputErrMsg {
	position: absolute;
	padding: 4px 8px;
	color: #d93025;
	background-color: #fce8e6;
	border: 1px solid #fee2e0;
	border-radius: 4px;
	white-space: nowrap;
	display: inline-block;
	box-shadow: 0 2px 4px rgba(0,0,0,0.1);
	font-size: 14px;
}

/* Custom Checkboxes and Radio Buttons */
.cbcontainer {
	display: inline-block;
	position: relative;
	padding-left: 28px;
	padding-top: 1px;
	margin: 5px 0;
	cursor: pointer;
	font-size: 16px;
	user-select: none;
}

.cbcontainer input {
	position: absolute;
	opacity: 0;
	cursor: pointer;
	height: 0;
	width: 0;
}

.cbmark {
	position: absolute;
	top: 0;
	left: 0;
	height: 18px;
	width: 18px;
	background-color: #fff;
	border: 2px solid #dadce0;
	border-radius: 3px;
	transition: all 0.2s ease;
}

.rbmark {
	position: absolute;
	top: 0;
	left: 0;
	height: 18px;
	width: 18px;
	background-color: #fff;
	border: 2px solid #dadce0;
	border-radius: 50%;
	transition: all 0.2s ease;
}

.cbcontainer:hover input ~ .cbmark, 
.cbcontainer:hover input ~ .rbmark {
	border-color: #1a73e8;
	background-color: #f1f3f4;
}

.cbcontainer input:checked ~ .cbmark, 
.cbcontainer input:checked ~ .rbmark {
	background-color: #1a73e8;
	border-color: #1a73e8;
}

.cbmark:after, 
.rbmark:after {
	content: "";
	position: absolute;
	display: none;
}

.cbcontainer input:checked ~ .cbmark:after, 
.cbcontainer input:checked ~ .rbmark:after {
	display: block;
}

.cbcontainer .cbmark:after {
	left: 6px;
	top: 2px;
	width: 5px;
	height: 10px;
	border: solid white;
	border-width: 0 2px 2px 0;
	transform: rotate(45deg);
}

.cbcontainer .rbmark:after {
	top: 5px;
	left: 5px;
	width: 8px;
	height: 8px;
	border-radius: 50%;
	background: white;
}

/* Input Specific Styling */
.indollar {
	background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="15px" height="20px"><text x="2" y="15" style="font: normal 16px arial;">$</text></svg>');
	background-position: 8px center;
	background-repeat: no-repeat;
	padding-left: 24px !important;
}

.inpct {
	background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="17px" height="20px"><text x="1" y="15" style="font: normal 16px arial;">%</text></svg>');
	background-position: right 8px center;
	background-repeat: no-repeat;
	padding-right: 24px !important;
}

/* Input Size Classes - Updated for better width */
.innormal { width: 120px; }
.in4char { width: 80px; }
.in3char { width: 70px; }
.in2char { width: 60px; }
.inlong { width: 150px; }
.inlonger { width: 200px; }
.inlongest { width: 250px; }
.inlongesthalf { width: 150px; }
.infull { width: 100%; max-width: 400px; }
.inhalf { width: 100%; max-width: 200px; } /* Changed from percentage to fixed width with max-width */
.infulltxarea { width: 100%; max-width: 600px; padding: 8px; }
.inshortfull { width: 200px; }
.inshorthalf { width: 100px; }

/* Input UI Helpers */
.inuiyear { padding-right: 50px; }
.inuiyearspan { margin-left: -45px; color: #666; }
.inuipound { padding-right: 62px; }
.inuipoundspan { margin-left: -58px; color: #666; }
.inuifoot { padding-right: 38px; }
.inuifootspan { margin-left: -34px; color: #666; }
.inuiinch { padding-right: 57px; }
.inuiinchspan { margin-left: -53px; color: #666; }
.inuick { padding-right: 32px; }
.inuickspan { margin-left: -27px; color: #666; }
.inui1c { padding-right: 16px; }
.inui1cspan { margin-left: -11px; color: #666; }

/* Tooltip */
#tt {
	position: absolute;
	display: block;
	background-color: #444;
	color: #fff;
	padding: 10px;
	border-radius: 4px;
	border: none;
	text-align: left;
	box-shadow: 0 2px 8px rgba(0,0,0,0.2);
	font-size: 14px;
	z-index: 1000;
}

.ttimg {
	opacity: 0.6;
	vertical-align: top;
	transition: opacity 0.2s ease;
}

.ttimg:hover {
	opacity: 1;
}

/* Header */
#headerout {
	background: #1a73e8;
	text-align: center;
	box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

#header {
	width: 100%;
	max-width: 1100px;
	height: 64px;
	background: #1a73e8;
	padding: 0;
	margin-left: auto;
	margin-right: auto;
	text-align: left;
	overflow: hidden;
	display: flex;
	align-items: center;
	justify-content: space-between;
}

#logo {
	padding: 12px 0;
	width: 270px;
	float: left;
}

/* Add styling for the text logo */
#logo a {
	color: #ffffff;
	font-size: 28px;
	font-weight: 700;
	text-decoration: none;
	letter-spacing: 1px;
	text-transform: uppercase;
}

#logo a:hover {
	color: #e8f0fe;
	text-decoration: none;
}

#login {
	padding: 2px;
	float: right;
	color: #fff;
}

#login a {
	color: #fff;
	text-decoration: none;
	transition: color 0.2s ease;
}

#login a:hover {
	text-decoration: underline;
	color: #e8f0fe;
}

/* Navigation */
.topNavAbs {
	position: absolute;
	top: 16px;
	left: 50%;
	width: 520px;
	margin-left: -80px;
	text-align: left;
}

.topNavAbs a {
	color: white;
	padding: 8px 16px;
	border: none;
	cursor: pointer;
	font-size: 15px;
	text-transform: uppercase;
	display: inline-block;
	text-decoration: none;
	border-radius: 4px;
	transition: background-color 0.2s ease;
	font-weight: 500;
	letter-spacing: 0.5px;
}

.topNavAbs a:hover {
	background-color: rgba(255,255,255,0.1);
}

.topNavOn {
	background-color: rgba(255,255,255,0.2);
}

/* Content Layout */
#contentout {
	width: 100%;
	max-width: 1100px;
	padding-top: 20px;
	margin-left: auto;
	margin-right: auto;
	text-align: left;
	overflow: auto;
}

#content {
	padding: 0 0 30px 0;
	width: 728px;
	float: left;
}

#right {
	width: 336px;
	float: right;
	text-align: center;
}

#contentbig {
	padding: 0 0 30px 0;
	width: 843px;
	float: right;
}

/* Footer */
#footer {
	background: #f1f3f4;
	padding: 30px 0;
	font-size: 14px;
	color: #5f6368;
	text-align: center;
	margin-top: 40px;
	border-top: 1px solid #e0e0e0;
}

#footer a {
	color: #1a73e8;
	transition: color 0.2s ease;
}

#footer a:hover {
	text-decoration: none;
	color: #0d47a1;
}

#footerin {
	width: 100%;
	max-width: 1100px;
	margin-left: auto;
	margin-right: auto;
	text-align: left;
	overflow: auto;
	color: #5f6368;
}

#footernav {
	text-align: center;
}

/* Home Page */
#homecaldiv {
	background: #e8f0fe;
	padding: 20px 0;
	border-radius: 8px;
	margin-bottom: 20px;
}

#homelistdiv {
	background: #fff;
	padding: 20px 0;
	border-radius: 8px;
	box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

#homecaldiv td {
	overflow: hidden;
}

#homelistwrap {
	display: grid;
	grid-row-gap: 30px;
	justify-content: center;
	grid-template-columns: 280px 320px 260px 220px;
}

/* Breadcrumbs */
#breadcrumbs, 
#breadcrumbs span {
	font-size: 14px;
	color: #5f6368;
	margin-bottom: 15px;
}

#breadcrumbs a, 
#breadcrumbs a span {
	text-decoration: none;
	color: #1a73e8;
}

#breadcrumbs a:hover, 
#breadcrumbs a span:hover {
	text-decoration: underline;
}

/* Other Calculators Box */
#othercalc {
	border: solid 1px #dadce0;
	margin: auto;
	text-align: left;
	width: 332px;
	border-radius: 8px;
	overflow: hidden;
	box-shadow: 0 1px 3px rgba(0,0,0,0.08);
}

#octitle {
	background-color: #1a73e8;
	padding: 12px;
	color: #fff;
	font-size: 18px;
	font-weight: 500;
}

#octitle a {
	color: #fff;
	text-decoration: none;
}

#octitle a:hover {
	text-decoration: underline;
}

#occontent {
	padding: 12px;
	font-size: 14px;
	background: #fff;
}

#occontent a {
	display: inline-block;
	width: 158px;
	padding: 6px 0;
	color: #1a73e8;
	transition: color 0.2s ease;
}

#occontent a:hover {
	color: #0d47a1;
	text-decoration: underline;
}

#ocother {
	background-color: #f1f3f4;
	padding: 10px;
	text-align: center;
	font-size: 15px;
	color: #5f6368;
}

#sectitle {
	background-color: #1a73e8;
	padding: 12px;
	color: #fff;
	font-size: 18px;
	font-weight: 500;
	border-radius: 8px 8px 0 0;
}

/* Home Icons and Lists */
.hicon {
	padding: 20px 0 20px 10px;
}

.hl {
	list-style-type: none;
	margin: 0;
	padding: 5px 0 5px 8px;
	background-color: #fff;
	font-size: 16px;
}

.hl li {
	padding: 0 0 10px 0;
}

.hl li a {
	color: #1a73e8;
	text-decoration: none;
	transition: color 0.2s ease;
}

.hl li a:hover {
	color: #0d47a1;
	text-decoration: underline;
}

/* Utility Classes */
.scaleimg {
	max-width: 100%;
	height: auto;
}

/* Media Queries for Responsiveness */
@media (max-width: 1100px) {
	#header, #contentout, #footerin {
		width: 95%;
		padding-left: 10px;
		padding-right: 10px;
	}
	
	.topNavAbs {
		position: relative;
		top: 0;
		left: 0;
		width: 100%;
		margin-left: 0;
		display: flex;
		justify-content: center;
		flex-wrap: wrap;
	}
}

@media (max-width: 900px) {
	#content, #contentbig {
		width: 100%;
		float: none;
	}
	
	#right {
		width: 100%;
		float: none;
		margin-top: 20px;
	}
	
	#homelistwrap {
		grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
	}
}

@media (max-width: 600px) {
	body, p, td, div, span, input, th, li, textarea {
		font-size: 15px;
	}
	
	h1 {
		font-size: 22px;
	}
	
	h2 {
		font-size: 20px;
	}
	
	h3 {
		font-size: 18px;
	}
	
	.topNavAbs a {
		font-size: 14px;
		padding: 6px 10px;
	}
	
	#homelistwrap {
		grid-template-columns: 1fr;
	}
	
	#othercalc {
		width: 100%;
	}
	
	#occontent a {
		width: 100%;
	}
	
	.infull, .infulltxarea {
		width: 100%;
	}
}

/* Calculator Layout Improvements */
.leftinput {
    width: 350px;
    float: left;
    padding-right: 20px;
}

.rightresult {
    width: 350px;
    float: right;
}

.clefthalf {
    width: 48%;
    float: left;
    margin-right: 2%;
}

.crighthalf {
    width: 48%;
    float: right;
}

/* Table Styling Improvements */
.cinfoT {
    width: 100%;
    border-collapse: collapse;
    margin: 15px 0;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    border-radius: 4px;
    overflow: hidden;
}

.cinfoT th, 
.cinfoT td.cinfoHd, 
.cinfoT td.cinfoHdL {
    border-top: 1px solid #1a73e8;
    border-left: 1px solid #1a73e8;
    border-right: 1px solid #1a73e8;
    border-bottom: 1px solid #1a73e8;
    background-color: #1a73e8;
    font-weight: 600;
	color: #fff;
    padding: 10px 8px;
    text-align: center;
}

.cinfoT td {
    border: 1px solid #dfe1e5;
    color: #333;
    padding: 8px;
}

.cinfoT tr:nth-child(odd) {
    background-color: #f8f9fa;
}

.cinfoT tr:nth-child(even) {
    background-color: #fff;
}

/* Panel Styling */
.panel2 {
    background-color: #fff;
    padding: 20px;
    border: 1px solid #dadce0;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    margin-bottom: 20px;
}

#topmenu ul {
    color: #333;
    border-bottom: 1px solid #dadce0;
    margin: 0 0 15px 0;
    padding: 0 0 8px 0;
    font-size: 15px;
    font-weight: 500;
    display: flex;
}

#topmenu ul li {
	display: inline-block;
    list-style-type: none;
    margin-right: 5px;
}

#topmenu ul li a, 
#topmenu ul li a:visited {
	color: #fff;
    background: #1a73e8;
    border: 1px solid #1a73e8;
    padding: 8px 15px;
    border-radius: 4px;
	text-decoration: none;
    transition: all 0.2s ease;
}

#topmenu ul li a:hover {
    background: #0d62d1;
	color: #fff;
}

#topmenu ul #menuon a {
    color: #1a73e8;
    background: #e8f0fe;
    border: 1px solid #1a73e8;
    padding: 8px 15px;
    border-radius: 4px;
    text-decoration: none;
}

#topmenu ul #menuon a:hover {
    background: #d2e3fc;
}

/* Result Styling */
.h2result {
    background: #1a73e8;
    color: #fff;
    border: none;
    border-radius: 4px;
    padding: 12px;
    margin-top: 10px;
    font-size: 22px;
    font-weight: 500;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

/* Responsive Layout Adjustments */
@media (max-width: 900px) {
    .leftinput, 
    .rightresult, 
    .clefthalf, 
    .crighthalf {
        width: 100%;
        float: none;
        margin-right: 0;
        padding-right: 0;
    }
    
    .crighthalf {
        margin-top: 20px;
    }
    
    .panel2 table {
        width: 100%;
    }
    
    .inhalf {
        width: 100%;
        max-width: none;
    }
}

@media (max-width: 600px) {
    .panel2 {
        padding: 15px;
    }
    
    #topmenu ul {
        flex-direction: column;
    }
    
    #topmenu ul li {
        margin-bottom: 5px;
    }
    
    .cinfoT th, 
    .cinfoT td {
        padding: 5px;
        font-size: 14px;
    }
}

/* Modern Categories Section */
.modern-categories {
  background-color: #f8f9fa;
  padding: 40px 0;
  margin: 30px 0;
}

.category-heading {
  text-align: center;
  font-size: 28px;
  color: #202124;
  margin-bottom: 30px;
  font-weight: 600;
}

.category-card {
  background: white;
  border-radius: 12px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
  padding: 20px;
  height: 100%;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.category-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
}

.category-icon {
  display: flex;
  justify-content: center;
  margin-bottom: 15px;
}

.category-icon img {
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid #1a73e8;
  transition: transform 0.3s ease;
}

.category-card:hover .category-icon img {
  transform: scale(1.05);
}

.category-title {
  text-align: center;
  margin-bottom: 15px;
  padding-bottom: 15px;
  border-bottom: 1px solid #e8eaed;
}

.category-title a {
  color: #1a73e8;
  font-size: 20px;
  font-weight: 600;
  text-decoration: none;
  transition: color 0.2s ease;
}

.category-title a:hover {
  color: #1557b0;
}

.category-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.category-list li {
  padding: 8px 0;
  border-bottom: 1px solid #f1f3f4;
}

.category-list li:last-child {
  border-bottom: none;
}

.category-list li a {
  color: #444;
  text-decoration: none;
  transition: color 0.2s ease;
  font-size: 15px;
  display: block;
}

.category-list li a:hover {
  color: #1a73e8;
}

.category-list li.more-link {
  margin-top: 10px;
}

.category-list li.more-link a {
  color: #1a73e8;
  font-weight: 500;
  font-size: 14px;
}

.view-all-button {
  text-align: center;
  margin-top: 30px;
}

.view-all-button a {
  display: inline-block;
  background: #1a73e8;
  color: white;
  font-weight: 600;
  text-decoration: none;
  padding: 12px 24px;
  border-radius: 30px;
  font-size: 16px;
  transition: background 0.2s ease;
  box-shadow: 0 4px 8px rgba(26, 115, 232, 0.3);
}

.view-all-button a:hover {
  background: #0d62d1;
  box-shadow: 0 6px 12px rgba(26, 115, 232, 0.4);
}

/* Make categories responsive */
#homelistwrap {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 20px;
  margin: 0 auto;
  max-width: 1200px;
}

.homelisttile {
  flex: 1 0 280px;
  max-width: 350px;
  margin-bottom: 20px;
}

@media (max-width: 768px) {
  .homelisttile {
    flex: 0 0 100%;
    max-width: 450px;
  }
  
  .category-heading {
    font-size: 24px;
  }
}