/* ========================================
   Yaş Hesaplama - Global Styles
   Production-Ready Calculator Platform
   ======================================== */

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  /* Primary Colors - High Contrast with WCAG AA Compliance */
  --primary: #003d99;
  --primary-dark: #002147;
  --secondary: #4c63d2;
  --success: #0d7a3d;
  --warning: #cc7a00;
  --danger: #c41e3a;
  --gray-50: #f8f9fa;
  --gray-100: #f1f3f5;
  --gray-200: #e9ecef;
  --gray-300: #dee2e6;
  --gray-400: #adb5bd;
  --gray-500: #6c757d;
  --gray-600: #374151;
  --gray-700: #1f2937;
  --gray-800: #111827;
  --gray-900: #030712;
  --text-primary: #030712;
  --text-secondary: #374151;
  --border-color: #cbd5e1;
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.08);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.12);
  --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.15);
  --transition: all 0.3s ease;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
  color: var(--text-primary);
  background-color: #fff;
  line-height: 1.7;
  font-size: 16px;
  font-weight: 400;
  letter-spacing: 0.3px;
  -webkit-text-size-adjust: 100%;
  -moz-text-size-adjust: 100%;
}

/* ========================================
   HEADER & NAVIGATION
   ======================================== */

header {
  background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
  color: white;
  padding: 1rem 0;
  box-shadow: var(--shadow-md);
  position: sticky;
  top: 0;
  z-index: 100;
}

.header-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.5rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 2rem;
}

.logo {
  font-size: 1.5rem;
  font-weight: 700;
  text-decoration: none;
  color: white;
  letter-spacing: -0.5px;
}

nav ul {
  list-style: none;
  display: flex;
  gap: 2rem;
  flex-wrap: wrap;
}

nav a {
  color: white;
  text-decoration: none;
  font-size: 0.95rem;
  transition: var(--transition);
  opacity: 0.95;
  font-weight: 500;
}

nav a:hover {
  opacity: 1;
  text-decoration: underline;
  font-weight: 600;
}

.hamburger {
  display: none;
  flex-direction: column;
  cursor: pointer;
  gap: 5px;
}

.hamburger span {
  width: 25px;
  height: 2px;
  background: white;
  border-radius: 2px;
}

/* ========================================
   FOOTER
   ======================================== */

footer {
  background-color: var(--gray-900);
  color: white;
  padding: 3rem 1.5rem 1.5rem;
  margin-top: 4rem;
}

.footer-container {
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 2rem;
  margin-bottom: 2rem;
}

.footer-section h3 {
  margin-bottom: 1rem;
  font-size: 1rem;
  font-weight: 600;
}

.footer-section ul {
  list-style: none;
}

.footer-section a {
  color: var(--gray-300);
  text-decoration: none;
  font-size: 0.9rem;
  line-height: 1.8;
  transition: var(--transition);
}

.footer-section a:hover {
  color: white;
}

.footer-bottom {
  border-top: 1px solid var(--gray-700);
  padding-top: 1.5rem;
  text-align: center;
  color: var(--gray-400);
  font-size: 0.9rem;
}

/* ========================================
   MAIN CONTAINER & SECTIONS
   ======================================== */

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

main {
  min-height: calc(100vh - 200px);
}

section {
  margin: 2rem 0;
  padding: 2rem 0;
}

section h2 {
  font-size: 1.75rem;
  margin-bottom: 1rem;
  color: var(--gray-900);
}

section p {
  color: var(--text-secondary);
  margin-bottom: 1rem;
  line-height: 1.7;
}

/* ========================================
   CALCULATOR CARD
   ======================================== */

.calculator-card {
  background: white;
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 2rem;
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
}

.calculator-card:hover {
  box-shadow: var(--shadow-lg);
  border-color: var(--primary);
}

.calculator-card.section {
  margin: 0;
}

.calculator-title {
  font-size: 1.5rem;
  font-weight: 600;
  margin-bottom: 1.5rem;
  color: var(--gray-900);
}

/* ========================================
   FORMS & INPUTS
   ======================================== */

.form-group {
  margin-bottom: 1.5rem;
}

label {
  display: block;
  margin-bottom: 0.5rem;
  font-weight: 500;
  color: var(--gray-700);
  font-size: 0.95rem;
}

input[type="date"],
input[type="number"],
input[type="text"],
select,
textarea {
  width: 100%;
  padding: 0.75rem;
  border: 1px solid var(--border-color);
  border-radius: 8px;
  font-size: 1rem;
  transition: var(--transition);
  font-family: inherit;
}

input[type="date"]:focus,
input[type="number"]:focus,
input[type="text"]:focus,
select:focus,
textarea:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(0, 61, 153, 0.1);
}

input[type="range"] {
  width: 100%;
  cursor: pointer;
}

input::placeholder,
textarea::placeholder {
  color: #6b7280;
  font-weight: 400;
  opacity: 0.85;
}

/* ========================================
   BUTTONS
   ======================================== */

.btn {
  padding: 0.75rem 1.5rem;
  border: none;
  border-radius: 8px;
  font-size: 1rem;
  font-weight: 500;
  cursor: pointer;
  transition: var(--transition);
  text-decoration: none;
  display: inline-block;
  text-align: center;
}

.btn-primary {
  background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
  color: white;
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.btn-primary:active {
  transform: translateY(0);
}

.btn-secondary {
  background-color: var(--gray-200);
  color: var(--text-primary);
  font-weight: 500;
}

.btn-secondary:hover {
  background-color: #d1d5db;
  font-weight: 600;
}

.btn-success {
  background-color: var(--success);
  color: white;
}

.btn-success:hover {
  opacity: 0.9;
}

.btn-block {
  width: 100%;
  display: block;
}

/* ========================================
   RESULTS BOX
   ======================================== */

.results-box {
  background: linear-gradient(135deg, #f5f7ff 0%, #eff3ff 100%);
  border-left: 4px solid var(--primary);
  padding: 1.5rem;
  border-radius: 8px;
  margin-top: 1.5rem;
}

.result-item {
  display: flex;
  justify-content: space-between;
  margin-bottom: 1rem;
  font-size: 1.05rem;
}

.result-item:last-child {
  margin-bottom: 0;
}

.result-label {
  font-weight: 500;
  color: var(--text-primary);
}

.result-value {
  font-weight: 700;
  color: var(--primary);
  font-size: 1.2rem;
}

/* ========================================
   GRID LAYOUTS
   ======================================== */

.grid-2 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
  margin: 1.5rem 0;
}

.grid-3 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1.5rem;
}

.calculator-link {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 1.5rem;
  background: white;
  border: 1px solid var(--border-color);
  border-radius: 12px;
  text-decoration: none;
  color: var(--text-primary);
  transition: var(--transition);
  cursor: pointer;
}

.calculator-link:hover {
  border-color: var(--primary);
  box-shadow: var(--shadow-lg);
  transform: translateY(-4px);
}

.calculator-link h3 {
  font-size: 1.1rem;
  margin-bottom: 0.5rem;
  color: var(--gray-900);
}

.calculator-link p {
  font-size: 0.9rem;
  color: var(--text-secondary);
  margin-bottom: 1rem;
}

.calculator-link .arrow {
  display: inline-block;
  margin-top: auto;
  color: var(--primary);
  font-weight: 600;
}

/* ========================================
   HERO SECTION
   ======================================== */

.hero {
  background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
  color: white;
  padding: 3rem 1.5rem;
  text-align: center;
  border-radius: 12px;
  margin-bottom: 3rem;
}

.hero h1 {
  font-size: 2.5rem;
  margin-bottom: 1rem;
  line-height: 1.2;
}

.hero p {
  font-size: 1.2rem;
  opacity: 0.95;
  margin-bottom: 1.5rem;
}

/* ========================================
   EXTERNAL RESOURCES SECTION
   ======================================== */

.external-resources {
  background: var(--gray-50);
  border-left: 4px solid var(--primary);
  padding: 1.5rem;
  border-radius: 8px;
  margin-top: 2rem;
}

.external-resources h3 {
  color: var(--primary);
  margin-bottom: 1rem;
  font-size: 1.3rem;
}

.external-resources p {
  color: var(--text-secondary);
  margin-bottom: 1rem;
  font-weight: 500;
}

.external-resources ul li {
  margin-bottom: 0.75rem;
  padding: 0.5rem 0;
  font-size: 0.95rem;
  color: var(--text-primary);
}

.external-resources a {
  font-weight: 500;
  text-decoration: none;
  border-bottom: 1px solid var(--primary);
  transition: var(--transition);
}

.external-resources a:hover {
  text-decoration: underline;
  opacity: 0.8;
}

/* ========================================
   TABS
   ======================================== */

.tabs {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 1.5rem;
  flex-wrap: wrap;
  border-bottom: 2px solid var(--border-color);
}

.tab-btn {
  padding: 0.75rem 1rem;
  background: none;
  border: none;
  cursor: pointer;
  font-size: 1rem;
  color: var(--text-secondary);
  border-bottom: 3px solid transparent;
  transition: var(--transition);
  font-weight: 500;
}

.tab-btn.active {
  color: var(--primary);
  border-bottom-color: var(--primary);
}

.tab-content {
  display: none;
}

.tab-content.active {
  display: block;
}

/* ========================================
   ALERTS & MESSAGES
   ======================================== */

.alert {
  padding: 1rem;
  border-radius: 8px;
  margin-bottom: 1rem;
  border-left: 4px solid;
}

.alert-info {
  background-color: #e3f2fd;
  border-color: var(--primary);
  color: #003d99;
}

.alert-success {
  background-color: #e8f5e9;
  border-color: var(--success);
  color: #0d7a3d;
}

.alert-warning {
  background-color: #fff3e0;
  border-color: var(--warning);
  color: #cc7a00;
}

.alert-error {
  background-color: #ffebee;
  border-color: var(--danger);
  color: #c41e3a;
}

/* ========================================
   TYPOGRAPHY
   ======================================== */

h1 {
  font-size: 2.25rem;
  font-weight: 700;
  margin-bottom: 1rem;
  line-height: 1.2;
}

h2 {
  font-size: 1.75rem;
  font-weight: 600;
  margin-bottom: 1rem;
}

h3 {
  font-size: 1.25rem;
  font-weight: 600;
  margin-bottom: 0.75rem;
}

h4 {
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
}

p {
  margin-bottom: 1rem;
}

a {
  color: var(--primary);
  text-decoration: none;
  transition: var(--transition);
}

a:hover {
  text-decoration: underline;
}

strong {
  font-weight: 600;
}

code {
  background-color: var(--gray-100);
  padding: 0.2rem 0.5rem;
  border-radius: 4px;
  font-family: 'Courier New', monospace;
  font-size: 0.9rem;
}

/* ========================================
   FEATURED SECTION
   ======================================== */

.featured-section {
  background: linear-gradient(135deg, #f0f7ff 0%, #e6f2ff 100%);
  border: 2px solid var(--primary);
  border-radius: 12px;
  padding: 2rem;
  margin: 2rem 0;
}

.featured-section h3 {
  color: var(--primary);
  font-size: 1.3rem;
}

/* ========================================
   COMPARISON TABLE
   ======================================== */

.comparison-table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.5rem 0;
}

.comparison-table th {
  background-color: var(--gray-100);
  padding: 1rem;
  text-align: left;
  font-weight: 600;
  border-bottom: 2px solid var(--border-color);
}

.comparison-table td {
  padding: 1rem;
  border-bottom: 1px solid var(--border-color);
}

.comparison-table tr:hover {
  background-color: var(--gray-50);
}

/* ========================================
   RELATED TOOLS
   ======================================== */

.related-tools {
  background-color: var(--gray-50);
  border-radius: 12px;
  padding: 2rem;
  margin-top: 2rem;
}

.related-tools h3 {
  margin-bottom: 1.5rem;
}

/* ========================================
   RESPONSIVE DESIGN
   ======================================== */

@media (max-width: 768px) {
  .header-container {
    flex-direction: column;
    gap: 1rem;
  }

  nav ul {
    gap: 1rem;
    flex-direction: column;
  }

  .hamburger {
    display: flex;
  }

  .hero h1 {
    font-size: 1.75rem;
  }

  .hero p {
    font-size: 1rem;
  }

  h1 {
    font-size: 1.75rem;
  }

  h2 {
    font-size: 1.5rem;
  }

  section {
    padding: 1.5rem 0;
    margin: 1.5rem 0;
  }

  .calculator-card {
    padding: 1.5rem;
  }

  .grid-2 {
    grid-template-columns: 1fr;
  }

  .grid-3 {
    grid-template-columns: 1fr;
  }

  .result-item {
    flex-direction: column;
    gap: 0.5rem;
  }

  .results-box {
    margin-top: 1rem;
  }

  .footer-container {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 480px) {
  body {
    font-size: 14px;
  }

  .container {
    padding: 0 1rem;
  }

  .header-container {
    padding: 0 1rem;
  }

  h1 {
    font-size: 1.5rem;
  }

  h2 {
    font-size: 1.25rem;
  }

  .hero {
    padding: 2rem 1rem;
  }

  .calculator-card {
    padding: 1rem;
  }

  .btn {
    padding: 0.65rem 1rem;
  }

  section {
    padding: 1rem 0;
  }
}

/* ========================================
   UTILITY CLASSES
   ======================================== */

.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mt-4 { margin-top: 2rem; }

.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }
.mb-4 { margin-bottom: 2rem; }

.p-1 { padding: 0.5rem; }
.p-2 { padding: 1rem; }
.p-3 { padding: 1.5rem; }
.p-4 { padding: 2rem; }

.text-center { text-align: center; }
.text-primary { color: var(--primary); }
.text-secondary { color: var(--text-secondary); }
.text-success { color: var(--success); }
.text-warning { color: var(--warning); }
.text-danger { color: var(--danger); }

.hidden { display: none; }
.visible { display: block; }

.opacity-50 { opacity: 0.5; }
.opacity-75 { opacity: 0.75; }

.cursor-pointer { cursor: pointer; }
