/* Base Styles & Custom Properties */
:root {
  --bg-color: #060f1c;
  --text-color: #f5f5f5;
  --primary-color: #29b3bd;
  --secondary-color: #1884a8;
  --dark-accent: #0a192c;
  --error-color: #ff6b6b;
}

body {
  font-family: 'Inter', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  background-color: var(--bg-color);
  color: var(--text-color);
  margin: 0;
  padding: 0;
  line-height: 1.6;
}

/* Typography & Headings */
h1, h2, h3, h4, h5, h6 {
  color: var(--primary-color);
  margin-top: 0;
  margin-bottom: 1rem;
}

h1 {
  font-size: 2.5rem;
  border-bottom: 2px solid var(--secondary-color);
  padding-bottom: 0.5rem;
}

/* Layout Semantics */
header {
  background: var(--dark-accent);
  padding: 1rem 2rem;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  border-bottom: 2px solid var(--primary-color);
}

.logo {
  font-size: 1.5rem;
  font-weight: bold;
  color: var(--primary-color);
  text-decoration: none;
  display: flex;
  align-items: center;
}

.logo img {
  max-height: 50px;
  width: auto;
  display: block;
}

nav ul {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem;
  margin: 0;
  padding: 0;
}

nav a {
  color: var(--text-color);
  text-decoration: none;
  font-weight: bold;
  transition: color 0.3s ease; /* CSS Transition */
}

nav a:hover, nav a:focus {
  color: var(--primary-color);
}

/* Dropdown Menu */
.dropdown {
  position: relative;
}

.submenu {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  background: var(--dark-accent);
  min-width: 160px;
  box-shadow: 0 4px 6px rgba(0,0,0,0.5);
  z-index: 1000;
  flex-direction: column;
  gap: 0;
  padding: 0.5rem 0;
  border-radius: 4px;
}

.submenu li {
  width: 100%;
}

.submenu a {
  padding: 0.5rem 1rem;
  display: block;
  font-weight: normal;
}

.submenu a:hover {
  background: #333;
}

.dropdown:hover .submenu,
.dropdown:focus-within .submenu {
  display: flex;
}

main {
  padding: 2rem;
  max-width: 1200px;
  margin: 0 auto;
  min-height: 60vh;
}

main a {
  color: #4dc4cc;
  text-decoration: underline;
  transition: color 0.3s ease;
}

main a:hover, main a:focus {
  color: var(--text-color);
  text-decoration: none;
}

section {
  margin-bottom: 3rem;
}

article {
  background: var(--dark-accent);
  padding: 1.5rem;
  border-radius: 8px;
  margin-bottom: 1.5rem;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.3);
}

aside {
  background: #222;
  padding: 1rem;
  border-left: 4px solid var(--secondary-color);
  margin-top: 2rem;
}

footer {
  background: var(--dark-accent);
  text-align: center;
  padding: 2rem;
  border-top: 1px solid var(--secondary-color);
  margin-top: 2rem;
}

.footer-links {
  margin-bottom: 1rem;
}

.footer-links a {
  color: #4dc4cc;
  margin: 0 0.5rem;
  text-decoration: none;
}

.footer-links a:hover {
  text-decoration: underline;
}

/* Images & Media */
img {
  max-width: 100%;
  height: auto;
  border-radius: 8px;
  display: block;
}

figure {
  margin: 0;
  padding: 1rem;
  background: var(--dark-accent);
  border-radius: 8px;
}

figcaption {
  text-align: center;
  margin-top: 0.5rem;
  font-style: italic;
  color: #ccc;
}

.hero-content {
  display: flex;
  gap: 2rem;
  align-items: center;
}

.hero-image-vertical {
  width: 40%;
  max-width: 400px;
  height: auto;
  border-radius: 8px;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.5);
  object-fit: cover;
}

.hero-text {
  flex: 1;
}

@media (max-width: 768px) {
  .hero-content {
    flex-direction: column;
  }
  .hero-image-vertical {
    width: 100%;
    max-width: 100%;
  }
}

/* Forms */
fieldset {
  border: 1px solid var(--primary-color);
  border-radius: 8px;
  padding: 1.5rem;
  margin-bottom: 1.5rem;
}

legend {
  font-weight: bold;
  color: var(--primary-color);
  padding: 0 0.5rem;
}

label {
  display: block;
  margin-bottom: 0.5rem;
  font-weight: bold;
}

.radio-group label,
.checkbox-group label {
  display: inline-block;
  margin-right: 1rem;
  font-weight: normal;
}

input[type="text"],
input[type="email"],
textarea,
select {
  width: 100%;
  padding: 0.75rem;
  margin-bottom: 1rem;
  border: 1px solid #555;
  border-radius: 4px;
  background-color: #2a2a2a;
  color: var(--text-color);
  font-family: inherit;
  box-sizing: border-box;
}

input[type="text"]:focus,
input[type="email"]:focus,
textarea:focus,
select:focus {
  outline: 2px solid var(--primary-color);
}

button[type="submit"],
.btn {
  background-color: var(--primary-color);
  color: #000;
  border: none;
  padding: 0.75rem 1.5rem;
  font-size: 1rem;
  font-weight: bold;
  border-radius: 4px;
  cursor: pointer;
  transition: background-color 0.3s ease, transform 0.2s ease; /* CSS Transition */
  text-decoration: none;
  display: inline-block;
}

button[type="submit"]:hover,
.btn:hover {
  background-color: var(--secondary-color);
  color: #fff;
  transform: translateY(-2px);
}

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

.text-center {
  text-align: center;
}

.search-container {
  display: flex;
  align-items: center;
}

.search-container input[type="text"] {
  width: auto;
  margin-bottom: 0;
  border-radius: 4px 0 0 4px;
}

.search-container button {
  border-radius: 0 4px 4px 0;
  padding: 0.75rem;
  margin-bottom: 0;
}

.error-message {
  color: var(--error-color);
  font-size: 0.875rem;
  margin-top: -0.75rem;
  margin-bottom: 1rem;
  display: block;
}

.icon {
  margin-right: 0.5rem;
}

/* Gallery Grid */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1.5rem;
}
