/* ==========================================================================
   Integrated Universal CSS Framework
   Combines existing project styles with universal responsive features
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. Reset & Global Styles
   -------------------------------------------------------------------------- */
*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  height: 100%;
  width: 100%;
  font-size: 16px;
  scroll-behavior: smooth;
}

body {
  height: 100%;
  width: 100%;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif, sans-serif;
  overflow-x: hidden;
  background-color: #f5f5f5;
  color: #222;
  line-height: 1.6;
  display: flex;
  flex-direction: column;
}

/* --------------------------------------------------------------------------
   2. Layout System
   -------------------------------------------------------------------------- */

/* Header - Fixed Navigation */
header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  background-color: #003147;
  color: rgb(249, 245, 245);
  padding: 20px;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

header h1 a {
  font-weight: bold;
  letter-spacing: 2px;
  text-decoration: none;
  color: white;
}

/* Navigation Links */
nav {
  display: flex;
  gap: 1.75rem;
}

nav a {
  color: #ffd700;
  text-decoration: none;
  font-size: 1em;
  transition: all 0.3s ease;
}

nav a:hover {
  text-decoration: underline;
}

/* Main Content Layout */
main {
  flex: 1;
  padding: 1rem;
  padding-top: 100px; /* Prevent overlap from fixed header */
  padding-bottom: 80px; /* Should match the height of footer */
}

/* Container System - Universal */
.container, article, section {
  max-width: 1200px;
  margin: 0 auto;
  background: white;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
  border-radius: 12px;
  margin-bottom: 20px;
}

/* Special container for main content sections */
main section {
  margin-top: 0;
  margin-bottom: 0;
  padding: 20px;
}

/* --------------------------------------------------------------------------
   3. Typography - Universal System
   -------------------------------------------------------------------------- */

/* Headings */
h1, h2, h3, h4, h5, h6 {
  font-weight: 600;
  color: #003147;
  margin-bottom: 1rem;
  line-height: 1.3;
}

h1 {
  font-size: 2rem;
  text-align: center;
  border-bottom: 3px solid #003147;
  padding-bottom: 1rem;
  margin-bottom: 0;
}

h2 {
  font-size: 1.75rem;
  margin-top: 2.5rem;
  margin-bottom: 1.5rem;
  border-left: 4px solid #003147;
  padding-left: 1rem;
}

section h2, section h3 {
  margin-bottom: 0.5rem;
}

h3 {
  font-size: 1.5rem;
  margin-top: 2rem;
  margin-bottom: 1rem;
  position: relative;
  padding-left: 1.5rem;
}

h3::before {
  content: '';
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 8px;
  height: 8px;
  background: #003147;
  border-radius: 50%;
}

section h3 {
  font-size: 1.75rem;
  margin-bottom: 1rem;
  color: #003147;
  padding-left: 0;
}

section h3::before {
  display: none;
}

h4 {
  font-size: 1.25rem;
  margin-top: 1.5rem;
  color: #003147;
}

h5 {
  font-size: 1.1rem;
  margin-top: 1rem;
  color: #003147;
}

h6 {
  font-size: 1rem;
  margin-top: 1rem;
  color: #003147;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* Paragraphs and Text */
p {
  font-size: 1rem;
  margin-bottom: 1rem;
  color: #222;
  text-align: justify;
}

p, li {
  margin-bottom: 1rem;
  text-align: justify;
}

/* --------------------------------------------------------------------------
   4. Lists - Universal + Custom
   -------------------------------------------------------------------------- */
ul, ol {
  margin: 1rem 0;
  padding-left: 2rem;
}

li {
  margin-bottom: 0.5rem;
  color: #222;
}

ul li::marker {
  color: #003147;
}

ol li::marker {
  color: #003147;
  font-weight: 600;
}

/* Section Lists - Custom styling */
section ul {
  list-style-type: none;
  padding-left: 0;
}

section ul li {
  font-size: 1rem;
  margin-bottom: 0.5rem;
}

section ul li a {
  color: #003147;
  text-decoration: none;
  font-weight: normal;
  transition: all 0.3s ease;
}

section ul li a:hover {
  text-decoration: underline;
  color: #ffd700;
}

/* --------------------------------------------------------------------------
   5. Links - Universal
   -------------------------------------------------------------------------- */
a {
  color: #003147;
  text-decoration: none;
  transition: all 0.3s ease;
}

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

/* --------------------------------------------------------------------------
   6. Tables - Universal
   -------------------------------------------------------------------------- */
table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.5rem 0;
  background: white;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

th, td {
  padding: 12px 15px;
  text-align: left;
  border-bottom: 1px solid #e2e8f0;
}

th {
  background: #f7fafc;
  font-weight: 600;
  color: #003147;
}

tr:hover {
  background: #f9fafb;
}

/* --------------------------------------------------------------------------
   7. Code and Pre - Universal
   -------------------------------------------------------------------------- */
code {
  background: #f1f5f9;
  padding: 2px 6px;
  border-radius: 4px;
  font-family: 'Monaco', 'Consolas', 'Courier New', monospace;
  font-size: 0.9em;
  color: #003147;
}

pre {
  background: #003147;
  color: #e2e8f0;
  padding: 1.5rem;
  border-radius: 8px;
  overflow-x: auto;
  margin: 1.5rem 0;
  font-family: 'Monaco', 'Consolas', 'Courier New', monospace;
  line-height: 1.5;
}

pre code {
  background: none;
  padding: 0;
  color: inherit;
}

/* --------------------------------------------------------------------------
   8. Blockquotes - Universal
   -------------------------------------------------------------------------- */
blockquote {
  border-left: 4px solid #003147;
  padding-left: 1.5rem;
  margin: 1.5rem 0;
  font-style: italic;
  color: #4a5568;
  background: #f7fafc;
  padding: 1rem 1.5rem;
  border-radius: 0 8px 8px 0;
}

/* --------------------------------------------------------------------------
   9. Special Content Boxes - Universal + Custom
   -------------------------------------------------------------------------- */
.highlight-box, .info-box, .warning-box, .success-box, .tools, .example {
  padding: 1.2rem;
  margin: 1.5rem 0;
  border-radius: 0 8px 8px 0;
  position: relative;
  border-left: 4px solid;
}

.highlight-box, .info-box, .tools {
  background: linear-gradient(135deg, #e3f2fd 0%, #f1f8ff 100%);
  border-left-color: #003147;
  color: #003147;
}

.warning-box {
  background: linear-gradient(135deg, #fff3e0 0%, #ffe0b2 100%);
  border-left-color: #f57c00;
  color: #ef6c00;
}

.success-box {
  background: linear-gradient(135deg, #e8f5e8 0%, #f3e5f5 100%);
  border-left-color: #007B5E;
  color: #007B5E;
}

.example {
  background: linear-gradient(135deg, #f3e5f5 0%, #fce4ec 100%);
  border-left-color: #9c27b0;
  color: #6a1b9a;
}

/* Mission Section - Custom */
.mission-section {
  background-color: #f5faff;
  padding: 2rem;
  border-radius: 12px;
  margin: 2rem 0;
  border-left: 4px solid #003147;
}

.mission-section h3 {
  font-size: 1.5rem;
  color: #003147;
  margin-bottom: 1rem;
}

.mission-section ul {
  list-style-type: none;
  padding-left: 0;
}

.mission-section li {
  margin-bottom: 1rem;
  padding-left: 1.5rem;
  position: relative;
  font-size: 1rem;
  color: #333;
}

.mission-section li::before {
  content: "✓";
  position: absolute;
  left: 0;
  color: #007B5E;
  font-weight: bold;
}

/* Add icons to special boxes */
.tools::before { content: "🛠️ "; }
.example::before { content: "💡 "; }
.info-box::before { content: "ℹ️ "; }
.warning-box::before { content: "⚠️ "; }
.success-box::before { content: "✅ "; }

.tools::before, .example::before, .info-box::before, .warning-box::before, .success-box::before {
  margin-right: 8px;
}

/* --------------------------------------------------------------------------
   10. Cards System - Custom + Universal
   -------------------------------------------------------------------------- */
.card-container {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1rem;
}

.card {
  border: 1px solid #e0e0e0;
  padding: 0.5rem;
  border-radius: 10px;
  background-color: #f9f9f9;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.05);
  transition: all 0.3s ease;
}

.card h4 a {
  text-decoration: none;
  color: #003147;
}

.card h4 a:hover {
  text-decoration: underline;
}

.card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

/* About Page Styles */
.about-card {
  background-color: #fefefe;
  padding: 1.5rem;
  margin: 1rem auto;
  max-width: 999px;
  border-radius: 15px;
  box-shadow: 0 4px 12px rgba(0, 49, 71, 0.1);
}

.who-follow ul {
  list-style-type: none;
  padding-left: 0;
}

.who-follow li::before {
  content: "✓";
  color: #007B5E;
  font-weight: bold;
  margin-right: 10px;
}

/* --------------------------------------------------------------------------
   11. Images and Media - Universal
   -------------------------------------------------------------------------- */
img {
  max-width: 100%;
  height: auto;
  border-radius: 8px;
  margin: 1rem 0;
}

video, iframe {
  max-width: 100%;
  border-radius: 8px;
  margin: 1rem 0;
}

/* --------------------------------------------------------------------------
   12. Forms - Universal
   -------------------------------------------------------------------------- */
input, textarea, select {
  width: 100%;
  padding: 12px;
  border: 2px solid #e2e8f0;
  border-radius: 6px;
  font-size: 1rem;
  transition: border-color 0.3s ease;
  margin-bottom: 1rem;
}

input:focus, textarea:focus, select:focus {
  outline: none;
  border-color: #003147;
}

button, .btn {
  display: inline-block;
  padding: 12px 24px;
  background: linear-gradient(135deg, #003147 0%, #004d66 100%);
  color: white;
  border: none;
  border-radius: 25px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 4px 12px rgba(0, 49, 71, 0.3);
  text-decoration: none;
  font-size: 1rem;
}

button:hover, .btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0, 49, 71, 0.4);
  background: linear-gradient(135deg, #004d66 0%, #006680 100%);
}

/* --------------------------------------------------------------------------
   13. Various Links Section - Custom
   -------------------------------------------------------------------------- */
.various_links {
  width: 100%;
  background: #152f5d;
  color: #f2ecec;
  padding: 2rem 1rem 100px 1rem; /* extra bottom padding for footer */
}

.various_links h3 {
  color: #f5faff;
  font-size: 1.35rem;
  margin-bottom: 15px;
}

.column article-links ul ul {
  font-weight: normal;
  color: #ffd700;
}

.various_links .container {
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: auto auto auto auto;
  gap: 20px;
  background: none;
  box-shadow: none;
  border-radius: 0;
}

.various_links .column {
  padding: 10px;
}

.various_links ul {
  list-style: none;
  padding: 0;
}

.various_links ul li {
  margin: 6px 0;
  font-weight: normal;
  text-align: left;
}

.various_links a {
  color: white;
  text-decoration: none;
}

.various_links a:hover {
  text-decoration: underline;
  color: #ddd;
}

/* Subscribe Form */
.subscribe-form {
  display: flex;
  margin-top: 10px;
}

.subscribe-form input[type="email"] {
  padding: 10px;
  font-size: 1em;
  border: 1px solid #ccc;
  border-radius: 4px 0 0 4px;
  width: 70%;
  margin-bottom: 0;
}

.subscribe-form button {
  padding: 10px 20px;
  font-size: 1em;
  border: 1px solid #ccc;
  background-color: #4CAF50;
  color: #fff;
  border-radius: 0 4px 4px 0;
  cursor: pointer;
  box-shadow: none;
  transform: none;
}

.subscribe-form button:hover {
  background-color: #45a049;
  transform: none;
  box-shadow: none;
}

/* --------------------------------------------------------------------------
   14. Footer - Custom Fixed Footer
   -------------------------------------------------------------------------- */
.footer-final {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  height: 80px;
  background-color: #011720;
  color: white;
  text-align: center;
  padding: 1rem;
  border-top: 1px solid #ddd;
  z-index: 999;
  font-size: 0.875rem;
}

/* --------------------------------------------------------------------------
   15. Navigation - Universal + Custom
   -------------------------------------------------------------------------- */
.content-nav {
  margin-top: 2rem;
  padding-top: 2rem;
  border-top: 2px solid #e2e8f0;
  text-align: center;
}

.content-nav a {
  display: inline-block;
  margin: 0 10px;
  padding: 10px 20px;
  background: #003147;
  color: white;
  border-radius: 20px;
  text-decoration: none;
  transition: all 0.3s ease;
}

.content-nav a:hover {
  background: #004d66;
  transform: translateY(-2px);
  color: white;
}

/* --------------------------------------------------------------------------
   16. Utility Classes - Universal
   -------------------------------------------------------------------------- */
.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }
.text-justify { text-align: justify; }

.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; }

/* --------------------------------------------------------------------------
   17. Responsive Design - Mobile First
   -------------------------------------------------------------------------- */

/* Tablets (768px and down) */
@media (max-width: 768px) {
  html { font-size: 16px; }
  
  header, .footer-final {
    flex-direction: column;
    text-align: center;
    padding: 1rem;
  }

  nav {
    flex-direction: row;
    gap: 1rem;
  }

  nav a {
    display: block;
    margin: 0.5rem 0;
  }

  .card-container {
    grid-template-columns: 1fr;
  }

  main {
    padding: 1rem;
    padding-top: 120px;
    padding-bottom: 100px;
    margin-top: 1rem;
  }
  
  main section h2 {
    font-size: 1.5rem;
    text-align: center;
  }

  main section p {
    text-align: justify;
  }
  
  section h3 {
    font-size: 1.5rem;
    text-align: center;
  }

  section ul li {
    text-align: left;
  }
  
  .container, article, section {
    margin: 10px;
    padding: 20px 15px;
    border-radius: 8px;
  }
  
  h1 { font-size: 2rem; }
  h2 { font-size: 1.6rem; }
  h3 { font-size: 1.3rem; }
  h4 { font-size: 1.1rem; }
  
  table {
    font-size: 0.9rem;
  }
  
  th, td {
    padding: 8px 10px;
  }
  
  .tools, .example, .info-box, .warning-box, .success-box, .highlight-box {
    padding: 1rem;
  }
  
  ul, ol {
    padding-left: 1.5rem;
  }

  /* Various Links responsive */
  .various_links .container {
    grid-template-columns: 1fr;
  }

  .footer-final {
    font-size: 0.9rem;
    padding: 0.7rem;
  }
}

/* Mobile phones (480px and down) */
@media (max-width: 480px) {
  html { font-size: 16px; }
  
  main {
    margin-top: 0.5rem;
    padding: 1rem;
    padding-top: 140px;
    padding-bottom: 120px;
  }
  
  .container, article, section {
    margin: 5px;
    padding: 15px 10px;
    border-radius: 6px;
  }
  
  h1 {
    font-size: 1.8rem;
    text-align: left;
    border-bottom-width: 2px;
    padding-bottom: 0.8rem;
  }
  
  h2 {
    font-size: 1.4rem;
    padding-left: 0.8rem;
    border-left-width: 3px;
  }
  
  h3 {
    font-size: 1.2rem;
    padding-left: 1rem;
  }
  
  h3::before {
    width: 6px;
    height: 6px;
  }
  
  p {
    text-align: left;
  }
  
  table {
    font-size: 0.8rem;
  }
  
  th, td {
    padding: 6px 8px;
  }
  
  .tools, .example, .info-box, .warning-box, .success-box, .highlight-box {
    padding: 0.8rem;
    border-left-width: 3px;
  }
  
  button, .btn {
    padding: 10px 20px;
    font-size: 0.9rem;
  }
  
  .content-nav a {
    margin: 5px;
    padding: 8px 16px;
    font-size: 0.9rem;
  }
  
  ul, ol {
    padding-left: 1.2rem;
  }
}

/* Extra small devices (360px and down) */
@media (max-width: 360px) {
  html { font-size: 13px; }
  
  .container, article, section {
    margin: 2px;
    padding: 12px 8px;
  }
  
  h1 { font-size: 1.6rem; }
  h2 { font-size: 1.3rem; }
  h3 { font-size: 1.1rem; }
  
  table {
    font-size: 0.75rem;
  }
  
  button, .btn {
    padding: 8px 16px;
    font-size: 0.85rem;
  }

  .footer-final {
    height: 70px;
    font-size: 0.8rem;
  }
}

/* Additional responsive breakpoint for footer */
@media (max-width: 600px) {
  .footer-final {
    font-size: 0.9rem;
    padding: 0.7rem;
  }
}

/* Large screens (1200px and up) */
@media (min-width: 1200px) {
  .container, article, section {
    padding: 40px;
    margin-bottom: 40px;
  }
  
  h1 { font-size: 3rem; }
  h2 { font-size: 2.2rem; }
  h3 { font-size: 1.7rem; }
  h4 { font-size: 1.4rem; }
  
  .tools, .example, .info-box, .warning-box, .success-box, .highlight-box {
    padding: 1.5rem;
  }
}

/* --------------------------------------------------------------------------
   18. Print Styles
   -------------------------------------------------------------------------- */
@media print {
  body {
    background: white;
    font-size: 12pt;
    line-height: 1.4;
  }
  
  header, .footer-final, nav, .content-nav, .various_links {
    display: none;
  }
  
  main {
    padding: 0;
  }
  
  .container, article, section {
    box-shadow: none;
    max-width: none;
    margin: 0;
    padding: 0;
  }
  
  h1, h2, h3, h4, h5, h6 {
    page-break-after: avoid;
    color: #000;
  }
  
  .tools, .example, .info-box, .warning-box, .success-box, .highlight-box {
    border: 1px solid #ccc;
    background: #f9f9f9 !important;
    color: #333 !important;
  }
  
  a {
    color: #333;
    text-decoration: underline;
  }
}

/* --------------------------------------------------------------------------
   19. Dark Mode Support (Optional)
   -------------------------------------------------------------------------- */
@media (prefers-color-scheme: dark) {
  body {
    background-color: #1a1a1a;
    color: #e2e8f0;
  }
  
  .container, article, section {
    background: #2d3748;
    color: #e2e8f0;
  }
  
  h1, h2, h3, h4, h5, h6 {
    color: #ffd700;
  }
  
  p, li {
    color: #cbd5e0;
  }
  
  th {
    background: #4a5568;
    color: #f7fafc;
  }
  
  tr:hover {
    background: #4a5568;
  }
  
  .card {
    background-color: #2d3748;
    border-color: #4a5568;
  }
}