/* =========================================
	 	1. VARIABLES & RESET
	 	========================================= */
:root {
  /* Brand Colors */
  --primary-blue: #002b5b;
  --accent-orange: #ff6b00;
  --accent-hover: #e65100;
  --gradient-primary: linear-gradient(135deg, #002b5b 0%, #0f172a 100%);
  --gradient-accent: linear-gradient(135deg, #ff6b00 0%, #ff8c42 100%);

  /* UI Colors */
  --bg-body: #f0f4f8;
  --bg-panel: #f8fafc;
  --white: #ffffff;
  --text-main: #1e293b;
  --text-muted: #64748b;
  --border: #e2e8f0;

  /* State Colors */
  --success: #10b981;
  --info: #3b82f6;
  --danger: #ef4444;
  --warning: #f59e0b;

  /* Dimensions */
  --radius: 12px;
  --shadow-card: 0 15px 40px -8px rgba(0, 43, 91, 0.2);
  --shadow-input: 0 0 0 1px #e2e8f0, inset 0 2px 4px rgba(0, 0, 0, 0.05);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: "Plus Jakarta Sans", sans-serif;
  background-color: var(--bg-body);
  color: var(--text-main);
  line-height: 1.6;
  min-height: 100vh;
  overflow-x: hidden;
}

/* =========================================
	 	2. HERO HEADER
	 	========================================= */
.hero-section {
  background: var(--gradient-primary);
  color: var(--white);
  padding: 1.5rem 5% 6rem;
  position: relative;
  overflow: hidden;
}

.hero-section::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: radial-gradient(
    circle at 80% 20%,
    rgba(255, 107, 0, 0.15) 0%,
    transparent 50%
  );
  z-index: 1;
}

.navbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 0 2rem 0;
  max-width: 1400px;
  margin: 0 auto;
  position: relative;
  z-index: 2;
}

.logo {
  font-size: 1.8rem;
  font-weight: 800;
  letter-spacing: -0.5px;
  color: var(--white);
  display: flex;
  align-items: center;
  gap: 8px;
}

.logo-icon {
  background: var(--accent-orange);
  width: 36px;
  height: 36px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
}

.nav-links span {
  font-size: 0.9rem;
  background: rgba(255, 255, 255, 0.15);
  padding: 8px 16px;
  border-radius: 50px;
  font-weight: 500;
  border: 1px solid rgba(255, 255, 255, 0.2);
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.hero-content {
  max-width: 1000px;
  margin: 0 auto;
  position: relative;
  z-index: 2;
}
.hero-content h1 {
  font-size: 3.2rem;
  margin-bottom: 0.5rem;
  line-height: 1.2;
}
.highlight {
  color: var(--accent-orange);
  position: relative;
  display: inline-block;
}
.highlight::after {
  content: "";
  position: absolute;
  bottom: 5px;
  left: 0;
  width: 100%;
  height: 8px;
  background: rgba(255, 107, 0, 0.2);
  z-index: -1;
  border-radius: 4px;
}

.hero-stats {
  display: flex;
  gap: 2rem;
  margin-top: 2rem;
}
.stat-box {
  display: flex;
  align-items: center;
  gap: 10px;
}
.stat-icon {
  width: 40px;
  height: 40px;
  background: rgba(255, 255, 255, 0.15);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}
.stat-text {
  font-size: 0.9rem;
}
.stat-number {
  font-size: 1.2rem;
  font-weight: 700;
}

/* =========================================
	 	3. MAIN LAYOUT & FORM STYLES
	 	========================================= */
.main-container {
  max-width: 1200px;
  margin: -4rem auto 4rem;
  background: var(--white);
  border-radius: 24px;
  box-shadow: var(--shadow-card);
  display: flex;
  flex-wrap: wrap;
  overflow: hidden;
  position: relative;
  z-index: 10;
  border: 1px solid var(--border);
  opacity: 0;
  transform: translateY(20px);
}

.input-card {
  flex: 1;
  min-width: 380px;
  padding: 3rem;
  border-right: 1px solid var(--border);
}
.card-header {
  display: flex;
  align-items: center;
  margin-bottom: 2rem;
  color: var(--primary-blue);
}
.card-header i {
  font-size: 1.8rem;
  margin-right: 10px;
}
.card-header h2 {
  font-size: 1.5rem;
  font-weight: 700;
}

.form-group {
  margin-bottom: 1.25rem;
  opacity: 0;
  transform: translateY(10px);
}
.form-group label {
  display: block;
  font-size: 0.9rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
}
.form-row {
  display: flex;
  gap: 15px;
}
.form-row .half {
  flex: 1;
}

/* Input Styles */
input[type="text"],
input[type="number"],
select,
.form-control {
  width: 100%;
  padding: 14px 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-size: 1rem;
  font-weight: 500;
  font-family: inherit;
  transition: all 0.3s ease;
  background-color: #fafafa;
  height: 52px;
  box-shadow: var(--shadow-input);
}

.input-wrapper {
  position: relative;
  display: flex;
  align-items: center;
}
.input-wrapper .icon {
  position: absolute;
  left: 15px;
  color: var(--text-muted);
  font-size: 1.1rem;
}
.input-wrapper input,
.input-wrapper select {
  padding-left: 48px;
}
input:focus,
select:focus,
.form-control:focus {
  outline: none;
  background-color: var(--white);
  border-color: var(--primary-blue);
  box-shadow: 0 0 0 3px rgba(0, 43, 91, 0.1), var(--shadow-input);
}
.cur-tag {
  font-weight: 800;
  color: var(--primary-blue);
  margin-left: 5px;
}

/* Button Styles */
.btn-calculate {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  padding: 15px 25px;
  background: var(--gradient-accent);
  color: var(--white);
  border: none;
  border-radius: var(--radius);
  font-size: 1.1rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.3s ease;
  margin-top: 1.5rem;
  box-shadow: 0 5px 10px rgba(255, 107, 0, 0.3);
  position: relative;
  overflow: hidden;
}

.btn-calculate::before {
  content: "";
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(255, 255, 255, 0.3),
    transparent
  );
  transition: left 0.5s;
}

.btn-calculate:hover::before {
  left: 100%;
}

.btn-calculate:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 15px rgba(255, 107, 0, 0.4);
}

.btn-calculate i {
  margin-right: 10px;
}

/* =========================================
	 	4. RIGHT SIDE: RESULTS & SUMMARY
	 	========================================= */
.results-panel {
  flex: 1.5;
  min-width: 450px;
  background: var(--bg-panel);
  padding: 3rem;
  max-height: 950px;
  overflow-y: auto;
  position: relative;
}
.results-wrapper {
  transition: opacity 0.5s ease-out;
  opacity: 0;
}
.results-wrapper.revealed {
  opacity: 1;
}

.results-header h2 {
  font-size: 2rem;
  color: var(--accent-orange);
}
.results-header p {
  font-size: 1rem;
  color: var(--text-muted);
  margin-bottom: 1.5rem;
}
.results-header.hidden {
  display: none;
}

/* === Simple Summary Card === */
.result-summary-card {
  background: var(--primary-blue);
  color: var(--white);
  padding: 25px;
  border-radius: var(--radius);
  margin-bottom: 25px;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
  opacity: 0;
  transform: scale(0.95);
  transition: all 0.5s ease;
}
.result-summary-card h3 {
  font-size: 1.4rem;
  font-weight: 700;
  margin-bottom: 15px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.15);
  padding-bottom: 10px;
}
.summary-stats {
  display: flex;
  justify-content: space-around;
  flex-wrap: wrap;
}
.summary-box {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
  margin: 10px 0;
  flex: 1 1 45%; /* Adjusted for 2 columns */
  min-width: 150px;
}
.summary-box i {
  font-size: 1.5rem;
  color: var(--accent-orange);
  margin-bottom: 5px;
}
.summary-box .label {
  font-size: 0.8rem;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.8);
}
.summary-box .value {
  font-size: 1.8rem;
  font-weight: 800;
  line-height: 1.1;
}
.summary-box .value.green {
  color: var(--success);
}
.summary-box .value.red {
  color: var(--danger);
}

/* Empty State */
.empty-state {
  text-align: center;
  background: #ffffff;
  border-radius: 16px;
  padding: 6rem 2rem;
  border: 1px dashed var(--border);
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.05);
  opacity: 0;
  transform: translateY(20px);
}

.empty-icon {
  font-size: 3rem;
  color: var(--primary-blue);
  margin-bottom: 1rem;
}

/* Result Cards */
.result-card {
  background: var(--white);
  border-radius: var(--radius);
  padding: 20px;
  margin-bottom: 15px;
  border-left: 6px solid var(--primary-blue);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
  transition: all 0.3s ease;
  position: relative;
  opacity: 0;
  transform: translateY(20px);
}

.result-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 10px 20px rgba(0, 43, 91, 0.15);
  border-color: var(--accent-orange);
}

.card-top {
  display: flex;
  gap: 10px;
  margin-bottom: 10px;
  flex-wrap: wrap;
}
.badge {
  padding: 4px 10px;
  border-radius: 50px;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
}
.badge.budget {
  background: var(--info);
  color: var(--white);
}
.badge.value {
  background: var(--success);
  color: var(--white);
}
.badge.premium {
  background: var(--accent-orange);
  color: var(--white);
}
.badge.match {
  background: var(--primary-blue);
  color: var(--white);
}

.uni-name {
  font-size: 1.25rem;
  color: var(--primary-blue);
  margin: 5px 0 0;
}
.spec-name {
  display: block;
  font-size: 0.9rem;
  color: var(--text-muted);
  margin-bottom: 15px;
}

.card-stats {
  display: flex;
  justify-content: space-between;
  padding: 15px;
  border-radius: 8px;
  background: #eef2f6;
}
.stat-label {
  display: block;
  font-size: 0.8rem;
  color: var(--text-muted);
  font-weight: 500;
  text-transform: uppercase;
}
.stat-value {
  font-size: 1.3rem;
  font-weight: 800;
  color: var(--danger);
  margin-top: 3px;
}
.stat-value.green {
  color: var(--success);
}

/* Loading Animation */
.loading-animation {
  display: none;
  text-align: center;
  padding: 3rem;
}
.loading-circle {
  width: 60px;
  height: 60px;
  border: 5px solid rgba(0, 43, 91, 0.1);
  border-top: 5px solid var(--accent-orange);
  border-radius: 50%;
  margin: 0 auto 1rem;
  animation: spin 1s linear infinite;
}
@keyframes spin {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}

/* Modal Styles */
.modal {
  position: fixed;
  z-index: 1000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.7);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.modal.hidden {
  display: none;
}
.modal.active {
  opacity: 1;
  pointer-events: all;
}

.modal-content {
  background-color: var(--white);
  padding: 40px;
  border-radius: 16px;
  max-width: 450px;
  width: 90%;
  text-align: center;
  position: relative;
  box-shadow: var(--shadow-card);
  transform: scale(0.9);
  transition: transform 0.3s ease;
}

.modal.active .modal-content {
  transform: scale(1);
}

.close-modal {
  position: absolute;
  top: 15px;
  right: 25px;
  color: var(--text-muted);
  font-size: 28px;
  font-weight: bold;
  cursor: pointer;
}

.modal-header-content .icon-box {
  background: var(--accent-orange);
  width: 60px;
  height: 60px;
  margin: 0 auto 15px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--white);
  font-size: 1.5rem;
}

/* Download Report Button */
.download-report {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  padding: 12px 20px;
  background: var(--primary-blue);
  color: var(--white);
  border: none;
  border-radius: var(--radius);
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  margin-top: 1.5rem;
  box-shadow: 0 4px 8px rgba(0, 43, 91, 0.2);
}

.download-report:hover {
  background: #001a36;
  transform: translateY(-2px);
  box-shadow: 0 6px 12px rgba(0, 43, 91, 0.3);
}

.download-report i {
  margin-right: 10px;
}

/* =========================================
	 	5. RESPONSIVE DESIGN
	 	========================================= */

/* Tablets/Small Desktops (>= 768px and up to 1250px) */
@media (min-width: 768px) and (max-width: 1250px) {
  .main-container {
    max-width: 95%;
  }
  .input-card {
    min-width: 300px;
    padding: 2rem;
  }
  .results-panel {
    min-width: 350px;
    padding: 2rem;
  }
}

/* Mobile Devices (max-width: 767px) */
@media (max-width: 767px) {
  .hero-section {
    padding: 1.5rem 1rem 4rem;
  }

  .main-container {
    flex-direction: column;
    max-width: 90%;
    margin: -4rem auto 2rem;
  }

  .input-card {
    border-right: none;
    border-bottom: 1px solid var(--border);
    min-width: 100%;
    padding: 2rem 1.5rem;
  }

  .results-panel {
    min-width: 100%;
    max-height: none;
    padding: 2rem 1.5rem;
  }

  .hero-content h1 {
    font-size: 2rem;
  }

  .hero-stats {
    flex-direction: column;
    gap: 1rem;
  }

  /* Stack multi-input rows */
  .form-row {
    flex-direction: column;
    gap: 0;
  }

  .form-row .half {
    margin-bottom: 1.25rem;
  }

  /* Stack the Summary Stats */
  .summary-stats {
    flex-direction: column;
    gap: 15px;
  }

  .summary-box {
    flex: 1 1 100%;
    margin: 0;
  }

  .summary-box .value {
    font-size: 1.5rem;
  }

  .result-card > div:last-child {
    flex-direction: column;
  }
}

/* Small Mobile Devices (max-width: 480px) */
@media (max-width: 480px) {
  .navbar {
    flex-direction: column;
    gap: 1rem;
    align-items: flex-start;
  }
}
