/* Base Styles */
:root {
    --primary-color: #1e3a8a; /* Deep Blue */
    --secondary-color: #3b82f6; /* Lighter Blue */
    --bg-main: #ffffff;
    --bg-card: #f8fafc;
    --text-main: #333333;
    --text-muted:#666666;
    --navbar-bg: #ffffff;
    --white: #ffffff;
}

body.dark-theme {
    --bg-main: #0f172a; /* Dark Slate */
    --bg-card: #1e293b;
    --text-main: #f8fafc;
    --text-muted: #94a3b8;
    --navbar-bg: #1e293b;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body {
    background-color: var(--bg-main);
    color: var(--text-main);
    line-height: 1.6;
    transition: background-color 0.3s ease, color 0.3s ease;
}

.container {
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
}

/* Typography & Buttons */
h1, h2, h3 {
    margin-bottom: 15px;
}

.btn {
    display: inline-block;
    background: var(--secondary-color);
    color: var(--white);
    padding: 10px 20px;
    text-decoration: none;
    border-radius: 5px;
    transition: background 0.3s ease;
}

.btn:hover {
    background: var(--primary-color);
}

.btn-large {
    padding: 15px 30px;
    font-size: 1.1rem;
}

/* Header & Navigation */
.navbar {
    background: var(--navbar-bg);
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 100;
    transition: background 0.3s ease;
}

.flex-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 0;
}

.logo {
    font-size: 1.5rem;
    color: var(--primary-color);
}

.logo span {
    font-weight: 400;
    color: #666;
}

.nav-links {
    list-style: none;
    display: flex;
    align-items: center;
}

.nav-links li {
    margin-left: 20px;
}

.nav-links a {
    text-decoration: none;
    color: var(--text-main);
    font-weight: 500;
    transition: color 0.3s ease;
}

.nav-links a:hover {
    text-decoration: none;
    color: var(--secondary-color);
}

/* Hero Section */
.hero {
    position: relative;
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--white);
    text-align: center;
    padding-top: 80px; /* Offset for fixed nav */
    overflow: hidden;
}

.hero-content p {
    margin-bottom: 30px;
    font-size: 1.2rem;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.hero::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(rgba(30, 58, 138, 0.5), rgba(30, 58, 138, 1));
    z-index: 3;
    pointer-events: none;
}

.hero-slideshow {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
}

.hero-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    opacity: 0;
    transform: translateX(100%);
    transition: opacity 1s ease-in-out, transform 1s ease-in-out;
    z-index: 1;
}

.hero-slide.active {
    opacity: 1;
    transform: translateX(0);
    z-index: 2;
}

.hero-slide.previous {
    opacity: 0;
    transform: translateX(-100%);
    z-index: 1;
}

.hero-content {
    position: relative;
    z-index: 10;
}

/* Layout Utilities */
.section-padding {
    padding: 80px 0;
}

.section-title {
    text-align: center;
    font-size: 2.5rem;
    color: var(--primary-color);
    margin-bottom: 50px;
}

.grid-3 {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

.card {
    background: var(--bg-card);
    color: var(--text-main);
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.05);
    text-align: center;
    border-top: 4px solid var(--secondary-color);
    transition: background 0.3s ease, color 0.3s ease;
}

/* Footer */
footer {
    background: var(--primary-color);
    color: var(--white);
    text-align: center;
    padding: 20px 0;
}
/* Subpage Banner style */
.page-banner {
    background: #1e293b; /* Sleek Dark Slate */
    color: var(--white);
    padding: 120px 0 60px 0; /* Extra top padding to clear fixed nav */
    text-align: center;
}

.page-banner h2 {
    font-size: 2.5rem;
}

.page-banner p {
    color: #94a3b8;
}

/* Form Styling */
.grid-2 {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 50px;
}

.contact-form {
    background: var(--bg-card);
    color: var(--text-main);
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.05);
    transition: background 0.3s ease, color 0.3s ease;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: 500;
}

.form-group input, 
.form-group textarea {
    width: 100%;
    padding: 10px;
    border: 1px solid #cbd5e1;
    border-radius: 4px;
    font-size: 1rem;
    background-color: var(--bg-main);
    color: var(--text-main);
}

.form-group input:focus, 
.form-group textarea:focus {
    outline: none;
    border-color: var(--secondary-color);
}

/* Typography tweaks */
.content-narrow {
    max-width: 800px;
    margin: 0 auto;
}

.sub-heading {
    color: var(--primary-color);
    font-size: 1.8rem;
    margin-top: 30px;
    margin-bottom: 15px;
}

.text-center {
    text-align: center;
}

.lead-text {
    font-size: 1.2rem;
    max-width: 800px;
    margin: 0 auto;
}

/* Highlight the active tab */
.nav-links a.active {
    color: var(--secondary-color);
    border-bottom: 2px solid var(--secondary-color);
    padding-bottom: 4px;
}

/* Darkened background overlay */
.modal-overlay {
  display: none; /* Hidden by default */
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(4px);
  z-index: 1000;
  justify-content: center;
  align-items: center;
}

/* Modal Box Centered */
.modal-content {
  background: var(--bg-card);
  color: var(--text-main);
  padding: 2rem;
  border-radius: 12px;
  width: 90%;
  max-width: 450px;
  position: relative;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.3);
}

/* Close Button (X) */
.modal-close {
  position: absolute;
  top: 12px;
  right: 16px;
  background: none;
  border: none;
  font-size: 1.5rem;
  cursor: pointer;
  color: inherit;
}

/* Basic Form Layout */
.modal-content form {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 15px;
}

.modal-content input,
.modal-content textarea {
  width: 100%;
  padding: 10px;
  border-radius: 6px;
  border: 1px solid #cbd5e1;
  box-sizing: border-box;
  background-color: var(--bg-main);
  color: var(--text-main);
}

.submit-btn {
  padding: 12px;
  background-color: #0070f3;
  color: white;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  font-weight: bold;
}

.logo {
  display: flex;
  align-items: center;
  text-decoration: none;
}

/* Control the dimensions of the logo image */
.logo img {
  height: 70px; /* Adjust this value to fit your navbar design */
  width: auto;  /* Maintains aspect ratio */
  display: block;
}

/* Container for the page section */
.projects-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 2rem 1rem;
}

/* 2-Column Grid Layout */
.projects-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr); /* 2 equal columns */
  gap: 1rem; /* Spacing between the columns and rows */
}

/* Individual Project Card Structure */
.project-card {
  color: var(--text-main);
  display: flex;
  align-items: center;
  gap: 1.5rem;
  background: var(--bg-card);
  border-radius: 8px;
  overflow: hidden;
  padding: 1rem;
  transition: background 0.3s ease, color 0.3s ease;
}

/* 40% Image Container */
.project-img {
  flex: 0 0 40%; /* Fixed 40% width */
}

.project-img img {
  width: 100%;
  height: 200px;
  object-fit: cover; /* Keeps images scaled properly without stretching */
  border-radius: 6px;
  display: block;
}

/* 60% Text Container */
.project-info {
  flex: 0 0 55%; /* Takes remaining space / 60% ratio */
}

.project-info h3 {
  margin-top: 0;
  margin-bottom: 0.5rem;
}

/* Reverses the order: Text Left, Image Right */
.project-card.reverse {
  flex-direction: row-reverse;
}

/* Mobile Responsive adjustment: stack vertically on small screens */
@media (max-width: 900px) {
  .projects-grid {
    grid-template-columns: 1fr; /* Single column on tablets/mobile */
  }
}

.theme-toggle-btn {
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
  display: flex;
  align-items: center;
}

/* Minimal Track */
.toggle-track {
  width: 48px;
  height: 24px;
  background-color: #e5e7eb;
  border: 1px solid #d1d5db;
  border-radius: 30px;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 5px;
  box-sizing: border-box;
  transition: background-color 0.3s ease, border-color 0.3s ease;
}

/* Vector Icon styling */
.toggle-track .icon {
  z-index: 1;
  color: #6b7280;
  transition: color 0.3s ease;
  display: block;
}

/* Sliding Circle */
.toggle-thumb {
  position: absolute;
  top: 2px;
  left: 2px;
  width: 18px;
  height: 18px;
  background-color: #ffffff;
  border-radius: 50%;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.15);
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Dark Mode States */
body.dark-theme .toggle-track {
  background-color: #1f2937;
  border-color: #374151;
}

body.dark-theme .toggle-track .icon {
  color: #9ca3af;
}

body.dark-theme .toggle-thumb {
  transform: translateX(24px);
  background-color: #111827;
}

.logo .dark-logo {
  display: none;
}

body.dark-theme .logo .light-logo {
  display: none;
}

body.dark-theme .logo .dark-logo {
  display: block;
}