* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { font-family: 'Changa', sans-serif; background: #F4F6F8; color: #0A2540; line-height: 1.6; }

header { background: linear-gradient(135deg, #0A2540, #1A3A5C); color: #fff; padding: 1.5rem 0 0; }
nav { display: flex; justify-content: space-between; align-items: center; max-width: 1200px; margin: auto; padding: 0 2rem; }
.logo { font-size: 1.8rem; font-weight: 800; color: #FF5722; }
nav ul { display: flex; gap: 2rem; list-style: none; }
nav a { color: #fff; text-decoration: none; font-weight: 500; transition: color .3s; }
nav a:hover { color: #FF5722; }
.hero { text-align: center; padding: 5rem 2rem; }
.hero h1 { font-size: 3rem; font-weight: 800; }
.hero h1 span { color: #FF5722; }
.hero p { font-size: 1.3rem; margin-top: 1rem; opacity: .8; }

.container { max-width: 1100px; margin: auto; padding: 0 2rem; }
.section { padding: 5rem 0; }
.bg-gray { background: #F4F6F8; }
h2 { font-size: 2rem; font-weight: 800; text-align: center; margin-bottom: 3rem; position: relative; }
h2::after { content: ''; display: block; width: 50px; height: 3px; background: #FF5722; margin: .8rem auto 0; border-radius: 2px; }

.calc-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 2rem; align-items: start; }
.form-group { margin-bottom: 1.5rem; }
.form-group label { display: block; font-weight: 700; margin-bottom: .5rem; font-size: 1rem; color: #0A2540; }
select, input[type="number"] { width: 100%; padding: .8rem 1rem; border: 2px solid #ddd; border-radius: 6px; font-size: 1rem; font-family: inherit; background: #fff; transition: border-color .3s; }
select:focus, input:focus { border-color: #FF5722; outline: none; }
.row-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }

.calc-result { display: flex; flex-direction: column; gap: 1rem; }
.result-card { background: #fff; border-radius: 8px; padding: 1.5rem; box-shadow: 0 2px 12px rgba(10,37,64,.06); border: 1px solid #e8ecf0; }
.result-header { font-weight: 700; font-size: 1rem; margin-bottom: 1rem; color: #0A2540; border-bottom: 2px solid #FF5722; padding-bottom: .5rem; display: inline-block; }

.cost-table { width: 100%; border-collapse: collapse; }
.cost-table tr { border-bottom: 1px solid #f0f0f0; }
.cost-table td { padding: .6rem .3rem; font-size: .95rem; }
.cost-table td:nth-child(2) { text-align: center; direction: ltr; font-weight: 700; }
.cost-table td:nth-child(3) { text-align: left; color: #888; }
.total-row td { font-weight: 800; color: #FF5722; font-size: 1.1rem; border-top: 2px solid #FF5722; border-bottom: none; padding-top: .8rem; }

.duration-big { font-size: 3rem; font-weight: 800; color: #0A2540; text-align: center; direction: ltr; }

.payment-schedule { background: #fff; border-radius: 8px; overflow: hidden; box-shadow: 0 2px 12px rgba(10,37,64,.06); }
.payment-row { display: grid; grid-template-columns: 2fr 1fr 1.5fr 1.5fr; padding: 1rem 1.5rem; border-bottom: 1px solid #f0f0f0; align-items: center; }
.payment-row span { font-size: .95rem; }
.payment-row span:nth-child(3) { direction: ltr; font-weight: 700; }
.header-row { background: #0A2540; color: #fff; font-weight: 700; }
.header-row span { font-size: 1rem; }

.gantt-container { background: #fff; border-radius: 8px; padding: 1.5rem; box-shadow: 0 2px 12px rgba(10,37,64,.06); overflow-x: auto; }
.gantt-header { display: grid; grid-template-columns: 180px 1fr; gap: 1rem; margin-bottom: 1rem; padding-bottom: .5rem; border-bottom: 2px solid #0A2540; }
.gantt-phase-label { font-weight: 800; color: #0A2540; }
.gantt-dates { display: grid; grid-template-columns: repeat(8, 1fr); font-size: .75rem; color: #888; }
.gantt-row { display: grid; grid-template-columns: 180px 1fr; gap: 1rem; margin-bottom: .6rem; align-items: center; cursor: pointer; }
.gantt-label { font-size: .85rem; font-weight: 600; color: #0A2540; padding: .3rem 0; }
.gantt-bar-wrapper { position: relative; height: 28px; background: #F4F6F8; border-radius: 4px; overflow: hidden; }
.gantt-bar { position: absolute; top: 0; height: 100%; background: #0A2540; border-radius: 4px; display: flex; align-items: center; justify-content: center; transition: all .3s; }
.gantt-bar span { font-size: .65rem; color: #fff; font-weight: 600; white-space: nowrap; }
.gantt-row.active .gantt-bar { background: #FF5722; box-shadow: 0 0 8px rgba(255,87,34,.3); }
.gantt-row.done .gantt-bar { background: #28a745; }

.gantt-progress { display: flex; align-items: center; gap: 1rem; margin-top: 2rem; justify-content: center; }
.gantt-progress span { font-weight: 600; }
.gantt-progress-bar { flex: 1; max-width: 400px; height: 10px; background: #e8ecf0; border-radius: 5px; overflow: hidden; }
.gantt-progress-fill { height: 100%; width: 0%; background: linear-gradient(90deg, #FF5722, #FF7043); border-radius: 5px; transition: width .5s; }
.gantt-progress-pct { font-weight: 800; color: #FF5722; min-width: 50px; direction: ltr; }

.tracker-controls { display: flex; gap: 1rem; justify-content: center; margin-top: 1.5rem; }
.btn { padding: .8rem 2rem; border: 2px solid #ddd; background: #fff; border-radius: 6px; cursor: pointer; font-family: inherit; font-size: 1rem; font-weight: 600; transition: all .3s; }
.btn:hover { border-color: #FF5722; color: #FF5722; }
.btn-primary { background: #FF5722; border-color: #FF5722; color: #fff; }
.btn-primary:hover { background: #E64A19; border-color: #E64A19; color: #fff; }
.btn-reset { background: #dc3545; border-color: #dc3545; color: #fff; }
.btn-reset:hover { background: #c82333; }

.contact-info { display: flex; justify-content: center; gap: 3rem; flex-wrap: wrap; }
.contact-item { font-size: 1.2rem; font-weight: 500; }

footer { background: #0A2540; color: #fff; text-align: center; padding: 2rem; }

@media (max-width: 768px) {
    .calc-grid { grid-template-columns: 1fr; }
    nav { flex-direction: column; gap: 1rem; }
    nav ul { gap: .8rem; flex-wrap: wrap; justify-content: center; }
    .hero h1 { font-size: 2rem; }
    .payment-row { grid-template-columns: 1fr 1fr; font-size: .85rem; gap: .3rem; padding: .8rem 1rem; }
    .header-row { display: none; }
    .gantt-header, .gantt-row { grid-template-columns: 120px 1fr; }
    .gantt-label { font-size: .75rem; }
}