/* Font Awesome Icons */
@import url('https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.0.0/css/all.min.css');

/* Reset and base styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #fff;
}

/* Global anchor styles */
a {
    text-decoration: none;
    color: #0066cc;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Header */
.site-header {
    background-color: #fff;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 0;
}

.logo a {
    display: flex;
    align-items: center;
    text-decoration: none;
    color: #333;
}

.w3c-logo {
    height: 40px;
    margin-right: 12px;
}

.site-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: #0066cc;
}

/* Navigation */
.main-nav {
    position: relative;
}

.nav-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
}

.hamburger {
    display: block;
    width: 24px;
    height: 2px;
    background-color: #333;
    position: relative;
}

.hamburger::before,
.hamburger::after {
    content: '';
    display: block;
    width: 24px;
    height: 2px;
    background-color: #333;
    position: absolute;
}

.hamburger::before {
    top: -8px;
}

.hamburger::after {
    top: 8px;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 2rem;
}

.nav-menu a {
    text-decoration: none;
    color: #333;
    font-weight: 500;
    padding: 0.5rem 0;
    transition: color 0.3s ease;
}

.nav-menu a:hover,
.nav-menu a:focus {
    color: #0066cc;
}

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

.dropdown:hover .dropdown-menu,
.dropdown:focus-within .dropdown-menu {
    display: block;
}

.dropdown-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    background-color: #fff;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    border-radius: 4px;
    padding: 0.5rem 0;
    min-width: 200px;
    z-index: 200;
}

.dropdown-menu li {
    list-style: none;
}

.dropdown-menu a {
    display: block;
    padding: 0.5rem 1rem;
    color: #333;
    text-decoration: none;
    transition: background-color 0.3s ease;
}

.dropdown-menu a:hover,
.dropdown-menu a:focus {
    background-color: #f5f5f5;
    color: #0066cc;
}

/* Main content */
.main-content {
    min-height: calc(100vh - 200px);
}

.hero {
    background: linear-gradient(135deg, #0066cc 0%, #004499 100%);
    color: white;
    padding: 4rem 0;
    text-align: center;
}

.hero h1 {
    font-size: 3rem;
    margin-bottom: 1rem;
    font-weight: 700;
}

.hero p {
    font-size: 1.25rem;
    margin-bottom: 2rem;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
    opacity: 0.9;
}

.cta-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

.btn {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    text-decoration: none;
    border-radius: 4px;
    font-weight: 500;
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

.btn-primary {
    background-color: white;
    color: #0066cc;
}

.btn-primary:hover,
.btn-primary:focus {
    background-color: #f0f0f0;
    transform: translateY(-2px);
}

.btn-secondary {
    background-color: transparent;
    color: #fff;
    border-color: #fff;
}

.btn-secondary:hover,
.btn-secondary:focus {
    background-color: #fff;
    color: #0066cc;
    transform: translateY(-2px);
}

/* Content sections */
.content-section {
    padding: 4rem 0;
}

.content-section:nth-child(even) {
    background-color: #f8f9fa;
}

.section-title {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    color: #333;
    text-align: center;
}

.section-subtitle {
    font-size: 1.25rem;
    color: #666;
    text-align: center;
    margin-bottom: 3rem;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

.feature-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-top: 3rem;
}

.feature-card {
    background-color: #fff;
    padding: 2rem;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.feature-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 4px 16px rgba(0,0,0,0.15);
}

.feature-card h3 {
    color: #0066cc;
    margin-bottom: 1rem;
    font-size: 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.feature-card h3 i {
    font-size: 1.75rem;
    color: #0066cc;
}

.feature-card p {
    color: #666;
    margin-bottom: 1rem;
}

.feature-card a {
    color: #0066cc;
    text-decoration: none;
    font-weight: 500;
}

.feature-card a:hover,
.feature-card a:focus {
    text-decoration: underline;
}

.image-text-container {
  display: flex;
  align-items: flex-start; /* Align items to top */
  gap: 20px; /* Space between image and text */
}

.image-text-container img {
  flex-shrink: 0; /* Prevent image from shrinking */
  max-width: 300px; /* Set maximum width for image */
  height: auto; /* Maintain aspect ratio */
}

.image-text-container .text-content {
  flex: 1; /* Take up remaining space */
  font-size: 1.25rem;
  color: #666;
  margin-bottom: 3rem;
  max-width: 800px;
  margin-left: auto;
  margin-right: auto;
}

@media (max-width: 768px) {
  .image-text-container {
    flex-direction: column; /* Stack vertically on mobile */
  }

  .image-text-container img {
    max-width: 100%;
  }
}

/* Footer */
.site-footer {
    background-color: #333;
    color: #fff;
    padding: 3rem 0 1rem;
}

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

.footer-section h3,
.footer-section h4 {
    margin-bottom: 1rem;
    color: #0066cc;
}

.footer-section ul {
    list-style: none;
}

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

.footer-section a {
    color: #ccc;
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer-section a:hover,
.footer-section a:focus {
    color: #fff;
}

.footer-bottom {
    border-top: 1px solid #555;
    padding-top: 1rem;
    text-align: center;
    color: #ccc;
}

.footer-bottom a {
    color: #0066cc;
    text-decoration: none;
}

.footer-bottom a:hover,
.footer-bottom a:focus {
    text-decoration: underline;
}

/* Responsive design */
@media (max-width: 768px) {
    .nav-toggle {
        display: block;
    }

    .nav-menu {
        display: none;
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background-color: #fff;
        flex-direction: column;
        padding: 6rem 2rem 2rem 2rem;
        gap: 0;
        width: 100vw;
        height: 100vh;
        z-index: 999;
        overflow-y: auto;
    }

    .nav-menu.active {
        display: flex;
    }

    /* Ensure hamburger is still accessible when menu is open */
    .nav-toggle {
        position: relative;
        z-index: 1001;
    }

    .nav-menu li {
        margin: 0;
        width: 100%;
    }

    .nav-menu a {
        padding: 1rem 0;
        display: block;
        font-size: 1.2rem;
        border-bottom: 1px solid #eee;
    }

    /* Override desktop dropdown behavior on mobile */
    .dropdown:hover .dropdown-menu,
    .dropdown:focus-within .dropdown-menu {
        display: none; /* Disable hover behavior on mobile */
    }

    .dropdown-menu {
        position: static;
        display: none;
        box-shadow: none;
        background-color: #f8f9fa;
        margin: 0;
        padding: 0.5rem 0;
        width: 100%;
        min-width: auto;
        border-radius: 0;
        border-top: 1px solid #ddd;
        border-bottom: 1px solid #ddd;
    }

    .dropdown-menu a {
        padding: 0.75rem 2rem;
        font-size: 1rem;
        border-left: 3px solid #0066cc;
        border-bottom: none;
    }

    .hero h1 {
        font-size: 2rem;
    }

    .hero p {
        font-size: 1.1rem;
    }

    .cta-buttons {
        flex-direction: column;
        align-items: center;
    }

    .section-title {
        font-size: 2rem;
    }

    .feature-grid {
        grid-template-columns: 1fr;
    }

    .footer-content {
        grid-template-columns: 1fr;
    }
}

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

/* Focus styles */
a:focus,
button:focus,
input:focus,
textarea:focus,
select:focus {
    outline: 2px solid #0066cc;
    outline-offset: 2px;
}

/* Skip link */
.skip-link {
    position: absolute;
    top: -40px;
    left: 6px;
    background: #0066cc;
    color: white;
    padding: 8px;
    text-decoration: none;
    border-radius: 0 0 4px 4px;
    z-index: 1000;
}

.skip-link:focus {
    top: 0;
}
