/* 
 * Military Time Chart - Main CSS
 * Colors: Military/Navy blues and grays
 */

:root {
  --primary-color: #0a3d62;      /* Dark navy blue */
  --secondary-color: #3c6382;    /* Medium navy blue */
  --accent-color: #38ada9;       /* Teal accent */
  --light-color: #f5f6fa;        /* Light background */
  --dark-color: #2c3e50;         /* Dark navy/gray */
  --text-color: #333;            /* Main text color */
  --light-text: #f1f2f6;         /* Light text color */
  --border-color: #dcdde1;       /* Light border color */
  --chart-bg: #f1f2f6;           /* Chart background */
  --chart-highlight: #c7ecee;    /* Chart highlight color */
  --error-color: #e74c3c;        /* Error/alert color */
  --success-color: #2ecc71;      /* Success color */
}

/* Base Styles */
body {
  font-family: 'Roboto', sans-serif;
  color: var(--text-color);
  line-height: 1.6;
  background-color: #fff;
  padding-top: 76px; /* Account for fixed navbar */
}

h1, h2, h3, h4, h5, h6 {
  font-family: 'Montserrat', sans-serif;
  font-weight: 700;
  color: var(--primary-color);
  margin-bottom: 1rem;
}

a {
  color: var(--secondary-color);
  text-decoration: none;
  transition: color 0.3s ease;
}

a:hover {
  color: var(--primary-color);
  text-decoration: underline;
}

.btn-primary {
  background-color: var(--primary-color);
  border-color: var(--primary-color);
}

.btn-primary:hover {
  background-color: var(--secondary-color);
  border-color: var(--secondary-color);
}

.btn-secondary {
  background-color: var(--secondary-color);
  border-color: var(--secondary-color);
}

.btn-outline-primary {
  color: var(--primary-color);
  border-color: var(--primary-color);
}

.btn-outline-primary:hover {
  background-color: var(--primary-color);
  color: white;
}

/* Utility Classes */
.text-primary {
  color: var(--primary-color) !important;
}

.text-secondary {
  color: var(--secondary-color) !important;
}

.text-accent {
  color: var(--accent-color) !important;
}

.bg-primary {
  background-color: var(--primary-color) !important;
}

.bg-secondary {
  background-color: var(--secondary-color) !important;
}

.bg-light {
  background-color: var(--light-color) !important;
}

.bg-chart {
  background-color: var(--chart-bg) !important;
}

/* Navigation */
.navbar {
  background-color: white;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  padding: 0.5rem 1rem;
}

.navbar-brand {
  font-family: 'Montserrat', sans-serif;
  font-weight: 700;
  color: var(--primary-color);
  font-size: 1.4rem;
}

.navbar-brand i {
  color: var(--secondary-color);
}

.navbar-light .navbar-nav .nav-link {
  color: var(--text-color);
  font-weight: 500;
  padding: 0.7rem 1rem;
}

.navbar-light .navbar-nav .nav-link:hover,
.navbar-light .navbar-nav .nav-link:focus {
  color: var(--primary-color);
}

.navbar-light .navbar-nav .active > .nav-link {
  color: var(--primary-color);
  font-weight: 700;
}

.dropdown-menu {
  border-radius: 0.25rem;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  border: 1px solid var(--border-color);
}

.dropdown-item:hover, .dropdown-item:focus {
  background-color: var(--light-color);
  color: var(--primary-color);
}

/* Hero Section */
.hero {
  background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
  color: white;
  padding: 5rem 0;
  margin-bottom: 3rem;
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-image: url("data:image/svg+xml,%3Csvg width='100' height='100' viewBox='0 0 100 100' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M11 18c3.866 0 7-3.134 7-7s-3.134-7-7-7-7 3.134-7 7 3.134 7 7 7zm48 25c3.866 0 7-3.134 7-7s-3.134-7-7-7-7 3.134-7 7 3.134 7 7 7zm-43-7c1.657 0 3-1.343 3-3s-1.343-3-3-3-3 1.343-3 3 1.343 3 3 3zm63 31c1.657 0 3-1.343 3-3s-1.343-3-3-3-3 1.343-3 3 1.343 3 3 3zM34 90c1.657 0 3-1.343 3-3s-1.343-3-3-3-3 1.343-3 3 1.343 3 3 3zm56-76c1.657 0 3-1.343 3-3s-1.343-3-3-3-3 1.343-3 3 1.343 3 3 3zM12 86c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4zm28-65c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4zm23-11c2.76 0 5-2.24 5-5s-2.24-5-5-5-5 2.24-5 5 2.24 5 5 5zm-6 60c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4zm29 22c2.76 0 5-2.24 5-5s-2.24-5-5-5-5 2.24-5 5 2.24 5 5 5zM32 63c2.76 0 5-2.24 5-5s-2.24-5-5-5-5 2.24-5 5 2.24 5 5 5zm57-13c2.76 0 5-2.24 5-5s-2.24-5-5-5-5 2.24-5 5 2.24 5 5 5z' fill='rgba(255,255,255,0.05)' fill-rule='evenodd'/%3E%3C/svg%3E");
  opacity: 0.3;
  z-index: 0;
}

.hero h1 {
  color: white;
  font-size: 2.5rem;
  font-weight: 700;
  margin-bottom: 1rem;
  position: relative;
  z-index: 1;
  text-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

.hero p {
  font-size: 1.2rem;
  max-width: 800px;
  margin: 0 auto 2rem;
  opacity: 0.9;
  position: relative;
  z-index: 1;
  text-shadow: 0 1px 2px rgba(0,0,0,0.1);
}

.hero .btn {
  position: relative;
  z-index: 1;
  box-shadow: 0 4px 6px rgba(0,0,0,0.1);
  transition: all 0.3s ease;
}

.hero .btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 10px rgba(0,0,0,0.15);
}

/* Cards */
.card {
  border: 1px solid var(--border-color);
  border-radius: 0.5rem;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  margin-bottom: 2rem;
}

.card:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
}

.card-title {
  color: var(--primary-color);
  font-weight: 600;
}

.resource-card {
  height: 100%;
}

.resource-card .card-icon {
  font-size: 2.5rem;
  color: var(--secondary-color);
  margin-bottom: 1rem;
}

/* Military Time Chart Table */
.time-chart {
  width: 100%;
  border-collapse: collapse;
  margin: 2rem 0;
  background-color: white;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.time-chart th {
  background-color: var(--primary-color);
  color: white;
  padding: 0.75rem;
  text-align: center;
  font-weight: 600;
}

.time-chart td {
  padding: 0.75rem;
  border: 1px solid var(--border-color);
  text-align: center;
}

.time-chart tr:nth-child(even) {
  background-color: var(--chart-bg);
}

.time-chart tr:hover {
  background-color: var(--chart-highlight);
}

.time-chart .military-time {
  font-weight: 700;
  color: var(--primary-color);
}

.time-chart .standard-time {
  color: var(--secondary-color);
}

/* Converter Tool */
.converter-tool {
  background-color: var(--light-color);
  border-radius: 0.5rem;
  padding: 2rem;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
  margin: 2rem 0;
}

.converter-tool h3 {
  margin-bottom: 1.5rem;
  text-align: center;
}

.converter-tool .form-group {
  margin-bottom: 1.5rem;
}

.converter-tool label {
  font-weight: 600;
  color: var(--primary-color);
}

.converter-result {
  padding: 1rem;
  background-color: white;
  border: 1px solid var(--border-color);
  border-radius: 0.25rem;
  font-size: 1.2rem;
  font-weight: 600;
  text-align: center;
  color: var(--primary-color);
}

/* Quick Reference Section */
.quick-reference {
  background-color: var(--light-color);
  padding: 2rem;
  border-radius: 0.5rem;
  margin-bottom: 3rem;
}

.quick-reference h2 {
  margin-bottom: 1.5rem;
  text-align: center;
}

.quick-reference-table {
  width: 100%;
  max-width: 500px;
  margin: 0 auto;
}

.quick-reference-table td {
  padding: 0.5rem 1rem;
  text-align: center;
}

.quick-reference-table .military-time {
  font-weight: 700;
  color: var(--primary-color);
}

/* Content Sections */
.content-section {
  padding: 3rem 0;
}

.content-section h2 {
  margin-bottom: 1.5rem;
  text-align: center;
}

.content-section p {
  margin-bottom: 1.5rem;
}

/* Featured Resources */
.featured-resources {
  padding: 3rem 0;
  background-color: var(--light-color);
}

.featured-resources h2 {
  margin-bottom: 2rem;
  text-align: center;
}

/* Latest Articles */
.latest-articles {
  padding: 3rem 0;
}

.latest-articles h2 {
  margin-bottom: 2rem;
  text-align: center;
}

.article-card {
  height: 100%;
}

.article-image {
  height: 200px;
  object-fit: cover;
  width: 100%;
}

.article-date {
  color: #777;
  font-size: 0.85rem;
}

/* Footer */
footer {
  background-color: var(--dark-color);
  color: var(--light-text);
  padding: 3rem 0 1.5rem;
}

.footer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 2rem;
  margin-bottom: 2rem;
}

.footer-logo {
  font-family: 'Montserrat', sans-serif;
  font-weight: 700;
  font-size: 1.4rem;
  margin-bottom: 1rem;
}

.footer-column h3 {
  color: white;
  font-size: 1.2rem;
  margin-bottom: 1.2rem;
  position: relative;
  padding-bottom: 0.5rem;
}

.footer-column h3:after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 40px;
  height: 2px;
  background-color: var(--accent-color);
}

.footer-column ul li {
  margin-bottom: 0.5rem;
}

.social-icons {
  display: flex;
  gap: 1rem;
  margin-top: 1.5rem;
}

.social-icons a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  background-color: rgba(255, 255, 255, 0.1);
  color: white;
  border-radius: 50%;
  transition: all 0.3s ease;
}

.social-icons a:hover {
  background-color: var(--accent-color);
  transform: translateY(-3px);
}

.footer-bottom {
  text-align: center;
  padding-top: 1.5rem;
  font-size: 0.9rem;
  opacity: 0.8;
}

/* Responsive Styles */
@media (max-width: 991.98px) {
  .navbar-brand {
    font-size: 1.2rem;
  }
  
  .hero h1 {
    font-size: 2rem;
  }
  
  .hero p {
    font-size: 1rem;
  }
}

@media (max-width: 767.98px) {
  .time-chart {
    font-size: 0.9rem;
  }
  
  .navbar-nav {
    padding: 1rem 0;
  }
  
  .footer-grid {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
}

/* Print Styles */
@media print {
  .navbar, .footer, .hero, .converter-tool {
    display: none;
  }
  
  .time-chart {
    box-shadow: none;
    border: 1px solid #ddd;
  }
  
  body {
    padding-top: 0;
    font-size: 12pt;
  }
  
  h1 {
    font-size: 18pt;
  }
  
  h2 {
    font-size: 16pt;
  }
}

/* Accessibility */
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border-width: 0;
}

/* Dark Mode Toggle */
.dark-mode-toggle {
  position: fixed;
  bottom: 1rem;
  right: 1rem;
  background-color: var(--primary-color);
  color: white;
  border: none;
  border-radius: 50%;
  width: 50px;
  height: 50px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  z-index: 1000;
  transition: background-color 0.3s ease;
}

.dark-mode-toggle:hover {
  background-color: var(--secondary-color);
}

/* Dark Mode Styles (to be toggled via JS) */
body.dark-mode {
  background-color: #1a202c;
  color: #e2e8f0;
}

body.dark-mode .navbar,
body.dark-mode .card,
body.dark-mode .converter-result {
  background-color: #2d3748;
  color: #e2e8f0;
}

body.dark-mode h1,
body.dark-mode h2,
body.dark-mode h3,
body.dark-mode h4,
body.dark-mode h5,
body.dark-mode h6,
body.dark-mode .navbar-brand,
body.dark-mode .navbar-light .navbar-nav .nav-link {
  color: #e2e8f0;
}

body.dark-mode .time-chart {
  background-color: #2d3748;
}

body.dark-mode .time-chart tr:nth-child(even) {
  background-color: #4a5568;
}

body.dark-mode .time-chart td {
  border-color: #4a5568;
}

body.dark-mode .border,
body.dark-mode .card {
  border-color: #4a5568 !important;
}

body.dark-mode .bg-light,
body.dark-mode .converter-tool,
body.dark-mode .quick-reference {
  background-color: #2d3748 !important;
} 