/* Global Styles - Modern and Responsive */

/* CSS Variables for consistent theming */
:root {
    --primary-color: #ff7b00;
    --primary-hover: #e66a00;
    --secondary-color: #ff9500;
    --text-dark: #333;
    --text-light: #666;
    --bg-light: #f8f9fa;
    --white: #ffffff;
    --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.1);
    --shadow-md: 0 4px 8px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 30px rgba(0, 0, 0, 0.1);
    --transition: all 0.3s ease;
}

/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    line-height: 1.6;
    color: var(--text-dark);
    background-color: var(--white);
    overflow-x: hidden;
}

body.menu-open {
    overflow: hidden;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    font-weight: 600;
    line-height: 1.2;
    margin-bottom: 1rem;
}

h1 { font-size: 2.5rem; }
h2 { font-size: 2rem; color: var(--primary-color); }
h3 { font-size: 1.75rem; }
h4 { font-size: 1.5rem; }
h5 { font-size: 1.25rem; }
h6 { font-size: 1rem; }

p {
    margin-bottom: 1rem;
}

a {
    color: var(--primary-color);
    text-decoration: none;
    transition: var(--transition);
}

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

/* Utility Classes */
.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 20px;
}

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

.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mt-4 { margin-top: 2rem; }
.mt-5 { margin-top: 3rem; }

.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }
.mb-4 { margin-bottom: 2rem; }
.mb-5 { margin-bottom: 3rem; }

.py-1 { padding-top: 0.5rem; padding-bottom: 0.5rem; }
.py-2 { padding-top: 1rem; padding-bottom: 1rem; }
.py-3 { padding-top: 1.5rem; padding-bottom: 1.5rem; }
.py-4 { padding-top: 2rem; padding-bottom: 2rem; }
.py-5 { padding-top: 3rem; padding-bottom: 3rem; }

/* Section Styling */
section {
    padding: 80px 0;
    position: relative;
}

section h2 {
    text-align: center;
    margin-bottom: 3rem;
}

.smaller-text {
    font-size: 0.8em;
    color: var(--text-dark);
    font-weight: 400;
}

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

/* Buttons */
.btn {
    display: inline-block;
    padding: 12px 30px;
    font-size: 1rem;
    font-weight: 600;
    text-align: center;
    border-radius: 8px;
    border: none;
    cursor: pointer;
    transition: var(--transition);
    text-decoration: none;
}

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

.btn-primary:hover {
    background-color: var(--primary-hover);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.btn-secondary {
    background-color: transparent;
    color: var(--primary-color);
    border: 2px solid var(--primary-color);
}

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

/* Cards */
.card {
    background: var(--white);
    border-radius: 15px;
    padding: 2rem;
    box-shadow: var(--shadow-lg);
    transition: var(--transition);
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.15);
}

/* Header Section - styles moved to header.css */

#back-link {
    color: var(--text-dark);
    text-decoration: none;
    padding: 8px 12px;
    display: block;
    transition: var(--transition);
    border-radius: 4px;
}

#back-link:hover {
    background-color: var(--bg-light);
}

/* Loading States */
.loading {
    text-align: center;
    padding: 3rem;
}

.loading i {
    font-size: 2.5rem;
    color: var(--primary-color);
    margin-bottom: 1rem;
    display: block;
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.animate-fadeIn {
    animation: fadeIn 0.6s ease-out;
}

.animate-slideInUp {
    animation: slideInUp 0.8s ease-out;
}

/* Responsive Design */

/* Tablet Styles */
@media (max-width: 992px) {
    html { font-size: 15px; }
    
    section { padding: 60px 0; }
    
    h1 { font-size: 2rem; }
    h2 { font-size: 1.75rem; }
    h3 { font-size: 1.5rem; }
    
    .container { padding: 0 15px; }
}

/* Mobile Styles */
@media (max-width: 768px) {
    html { font-size: 14px; }
    
    section { padding: 40px 0; }
    
    h1 { font-size: 1.75rem; }
    h2 { font-size: 1.5rem; }
    h3 { font-size: 1.25rem; }
    
    .btn {
        padding: 10px 25px;
        font-size: 0.95rem;
    }
    
    .card { padding: 1.5rem; }
    
    /* Mobile Navigation - banner styles moved to header.css */
}

/* Small Mobile Styles */
@media (max-width: 480px) {
    html { font-size: 13px; }
    
    section { padding: 30px 0; }
    
    h1 { font-size: 1.5rem; }
    h2 { 
        font-size: 1.25rem; 
        margin-bottom: 2rem;
    }
    
    .btn {
        width: 100%;
        padding: 12px 20px;
    }
}

/* Desktop Styles - banner styles moved to header.css */

/* Accessibility */
:focus {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

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

/* Print Styles */
@media print {
    header, footer {
        display: none;
    }
    
    section {
        page-break-inside: avoid;
    }
}

/* Reset default browser padding and margins */
html, body {
    padding: 0;
    margin: 0;
    width: 100%;
    height: 100%;
    overflow-x: hidden; /* Prevent horizontal overflow */
}

img {
    max-width: 100%; /* Ensure the image does not exceed the container's width */
    height: auto; /* Maintain aspect ratio */
    border-radius: 10px; /* Adjust this value to increase or decrease the roundness */
}

.smaller-text {
    font-size: 0.8em; /* Makes the text smaller than the rest of the h2 content */
    color: black;
}

/* Header Section - duplicate styles removed, see header.css */


/* Default (light mode) styles remain as usual */

/* D
body.dark-mode {
    background-color: #121212;
    color: #e0e0e0;
  }
  

  body.dark-mode #results {
    color: #121212;
  }

  body.dark-mode header#sticky-banner {
    background-color: #1e1e1e;
    border-bottom-color: #ff7b00;
  }
  
  body.dark-mode a {
    color: #ff7b00; /* Or another color that contrasts with dark background 
  }

  body.dark-mode #typewriter {
    color: #ffffff;
  }

body.dark-mode #how-it-works,
body.dark-mode #how-it-works h2,
body.dark-mode #how-it-works h3,
body.dark-mode #how-it-works p,
body.dark-mode #how-it-works .cta-instruction,
body.dark-mode #how-it-works .step-button {
  color: #ffffff;
}

body.dark-mode #how-it-works {
  background-color: #000000; /* or any dark color that suits your design 
}
  
  .card h5 {
    color: #000000 !important;
  }

  body.dark-mode .smaller-text {
    color: #ffffff !important;
  }

body.dark-mode footer {
    background-color: #1e1e1e;  
    border-top: 1px solid #ff7b00;  
    color: #ffffff;  
    box-shadow: 0 -4px 8px rgba(255, 255, 255, 0.1); 
  }
  
  body.dark-mode footer a {
    color: #ffffff;
  }

  body.dark-mode .footer-right p {
    color: #ffffff !important;
  }

body.dark-mode #results,
body.dark-mode #results h2,
body.dark-mode #results p {
  color: #ffffff !important;
}

body.dark-mode .btn.btn-primary {
    color: #ffffff !important;
  }

body.dark-mode #resultOutput,
body.dark-mode #resultOutput h2,
body.dark-mode #resultOutput p {
  color: #000000 !important;
}
  */

/* Additional Global Styles */
.hidden {
    display: none;
}

/* Modern Mega Menu Navigation */
#sticky-banner {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: var(--white);
    box-shadow: var(--shadow-md);
    border-bottom: 2px solid var(--primary-color);
    z-index: 1000;
    padding: 0;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 65px;
}

#sticky-banner .logo {
    padding: 0.5rem 0;
    margin-left: 15px;
}

#sticky-banner .logo img {
    height: 35px;
    width: auto;
}

.main-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex: 1;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
}

.nav-items,
.nav-actions {
    display: flex;
    list-style: none;
    align-items: center;
    margin: 0;
    padding: 0;
}

.nav-items {
    gap: 0.25rem;
}

.nav-actions {
    gap: 0.5rem;
}

.nav-item {
    position: relative;
}

/* Navigation link padding - reduced from 1rem 1.25rem to be more compact */
.nav-link {
    display: flex;
    align-items: center;
    padding: 0.75rem 1rem;
    color: var(--text-dark);
    text-decoration: none;
    font-weight: 500;
    transition: var(--transition);
    cursor: pointer;
    font-size: 0.9rem;
}

.nav-link:hover {
    color: var(--primary-color);
}

.sign-in-btn {
    color: var(--primary-color) !important;
    border: 1px solid transparent;
    border-radius: 6px;
    transition: var(--transition);
    padding: 0.75rem 0.875rem !important;
}

.sign-in-btn:hover {
    background-color: var(--primary-color);
    color: var(--white) !important;
}

.nav-cta {
    margin-left: 0.25rem;
    padding: 0.75rem 1.25rem !important;
    font-size: 0.85rem;
}

/* Mega Menu Styles */
.has-mega-menu .nav-link::after {
    content: "\25BC";
    font-size: 0.7em;
    margin-left: 0.5em;
    transition: transform 0.3s ease;
}

.has-mega-menu:hover .nav-link::after {
    transform: rotate(180deg);
}

.mega-menu {
    position: fixed;
    top: 65px;
    left: 50%;
    transform: translateX(-50%);
    width: 1100px;
    max-width: calc(100vw - 40px);
    background: var(--white);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
    border-radius: 12px;
    opacity: 0;
    visibility: hidden;
    transform: translateX(-50%) translateY(-10px);
    transition: all 0.3s ease;
    z-index: 1001;
    padding: 1.25rem;
    margin: 0;
    /* Add a small buffer at the top to prevent hover gaps */
    border-top: 10px solid transparent;
    margin-top: -10px;
}

@media (min-width: 769px) {
    .has-mega-menu:hover .mega-menu {
        opacity: 1;
        visibility: visible;
        transform: translateX(-50%) translateY(0);
    }
    
    /* Ensure hover area includes the space between nav and dropdown */
    .has-mega-menu::before {
        content: '';
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        height: 20px;
        background: transparent;
        z-index: 1000;
    }
    
    /* Keep menu visible when hovering over the invisible bridge area */
    .has-mega-menu:hover::before {
        background: transparent;
    }
}

.mega-menu-content {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr 1.3fr;
    gap: 1.25rem;
}

.mega-menu-column {
    min-height: 140px;
}

.mega-menu-column h4 {
    color: var(--text-dark);
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 0.75rem;
    padding-bottom: 0.375rem;
    border-bottom: 2px solid var(--primary-color);
}

.mega-menu-column ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.mega-menu-column li {
    margin-bottom: 0.25rem;
}

.mega-menu-column a {
    display: block;
    color: var(--text-dark);
    text-decoration: none;
    padding: 0.375rem 0;
    font-size: 0.85rem;
    transition: var(--transition);
    border-radius: 4px;
}

.mega-menu-column a:hover {
    color: var(--primary-color);
    background-color: var(--bg-light);
    padding-left: 0.75rem;
}

/* Featured Content in Mega Menu */
.featured-solution,
.featured-resource,
.featured-company {
    background: linear-gradient(135deg, var(--bg-light) 0%, #f0f8ff 100%);
    padding: 0.75rem;
    border-radius: 8px;
    border: 1px solid #e0e0e0;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
}

/* Remove orange line from featured columns to fix alignment */
.featured-solution h4,
.featured-resource h4,
.featured-company h4 {
    border-bottom: none;
    margin-bottom: 0.5rem;
}

.featured-content h5 {
    color: var(--text-dark);
    font-size: 0.9rem;
    font-weight: 600;
    margin-bottom: 0.25rem;
}

.featured-content p {
    color: var(--text-light);
    font-size: 0.8rem;
    line-height: 1.3;
    margin-bottom: 0.5rem;
}

.featured-content .btn {
    font-size: 0.75rem;
    padding: 0.375rem 0.75rem;
    margin-top: 0.5rem;
}

/* Mobile Menu Toggle */
.mobile-menu-toggle {
    display: none;
    background: none;
    border: none;
    color: var(--text-dark);
    font-size: 1.5rem;
    cursor: pointer;
    padding: 0.5rem;
    margin-right: 20px;
}

/* Responsive Design */
@media (max-width: 1200px) {
    .nav-link {
        padding: 0.75rem 0.85rem;
        font-size: 0.85rem;
    }
    
    .nav-cta {
        padding: 0.75rem 1.1rem !important;
        font-size: 0.8rem;
    }
    
    .sign-in-btn {
        padding: 0.75rem 0.75rem !important;
        font-size: 0.85rem;
    }
    
    .mega-menu {
        width: 1050px;
        max-width: calc(100vw - 30px);
    }
    
    .mega-menu-content {
        grid-template-columns: 1fr 1fr 1fr 1.3fr;
        gap: 1rem;
    }
    
    .mega-menu-column a {
        font-size: 0.8rem;
        padding: 0.25rem 0;
    }
}

@media (max-width: 1100px) {
    .mega-menu {
        width: 950px;
        max-width: calc(100vw - 30px);
    }
    
    .mega-menu-content {
        grid-template-columns: 1fr 1fr 1fr 1.3fr;
        gap: 0.875rem;
    }
    
    .mega-menu-column a {
        font-size: 0.775rem;
        padding: 0.25rem 0;
    }
}

@media (max-width: 1024px) {
    .nav-link {
        padding: 0.75rem 0.75rem;
        font-size: 0.8rem;
    }
    
    .nav-cta {
        padding: 0.75rem 1rem !important;
        font-size: 0.75rem;
    }
    
    .main-nav {
        padding: 0 10px;
    }
    
    .nav-items {
        gap: 0.125rem;
    }
    
    .mega-menu {
        width: 900px;
        max-width: calc(100vw - 30px);
    }
    
    .mega-menu-content {
        grid-template-columns: 1fr 1fr 1fr 1.3fr;
        gap: 0.75rem;
    }
    
    .mega-menu-column a {
        font-size: 0.75rem;
        padding: 0.25rem 0;
    }
}

@media (max-width: 950px) {
    .mega-menu {
        width: 800px;
        max-width: calc(100vw - 20px);
        padding: 1rem;
    }
    
    .mega-menu-content {
        grid-template-columns: repeat(3, 1fr);
        gap: 1rem;
    }
    
    .mega-menu-column:nth-child(4) {
        grid-column: 1 / -1;
        margin-top: 0.5rem;
    }
}

/* Add breakpoint to start compressing navigation more aggressively */
@media (max-width: 900px) {
    .nav-link {
        padding: 0.75rem 0.625rem;
        font-size: 0.8rem;
    }
    
    .nav-cta {
        padding: 0.75rem 1rem !important;
        font-size: 0.75rem;
    }
    
    .sign-in-btn {
        padding: 0.75rem 0.75rem !important;
        font-size: 0.8rem;
    }
    
    .nav-items {
        gap: 0.125rem;
    }
    
    .nav-actions {
        gap: 0.375rem;
    }
    
    .main-nav {
        padding: 0 8px;
    }
}

/* Add new breakpoint to prevent menu wrapping */
@media (max-width: 850px) {
    .nav-link {
        padding: 0.75rem 0.5rem;
        font-size: 0.75rem;
    }
    
    .nav-cta {
        padding: 0.75rem 0.875rem !important;
        font-size: 0.7rem;
    }
    
    .sign-in-btn {
        padding: 0.75rem 0.625rem !important;
        font-size: 0.75rem;
    }
    
    .nav-items {
        gap: 0rem;
    }
    
    .nav-actions {
        gap: 0.25rem;
    }
    
    .main-nav {
        padding: 0 5px;
    }
    
    .mega-menu {
        width: 700px;
        max-width: calc(100vw - 15px);
        padding: 0.75rem;
    }
    
    .mega-menu-content {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.75rem;
    }
    
    .mega-menu-column:nth-child(3),
    .mega-menu-column:nth-child(4) {
        grid-column: 1 / -1;
        margin-top: 0.5rem;
    }
}

@media (max-width: 768px) {
    #sticky-banner {
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
        min-height: 65px;
        padding: 0 15px;
    }
    
    #sticky-banner .logo {
        margin-left: 0;
    }
    
    .main-nav {
        display: none !important;
        position: fixed;
        top: 65px;
        left: 0;
        right: 0;
        width: 100%;
        height: calc(100vh - 65px);
        background: var(--white);
        box-shadow: var(--shadow-lg);
        z-index: 999;
        padding: 1rem 15px;
        flex-direction: column;
        max-width: none;
        margin: 0;
        overflow-y: auto;
    }
    
    .main-nav.active {
        display: flex !important;
    }
    
    .nav-items,
    .nav-actions {
        flex-direction: column;
        width: 100%;
        align-items: stretch;
    }
    
    .nav-item {
        width: 100%;
    }
    
    .nav-link {
        padding: 1rem 0;
        border-bottom: 1px solid var(--bg-light);
        justify-content: space-between;
    }
    
    .mobile-menu-toggle {
        display: block !important;
        margin-right: 0;
        position: relative;
        top: auto;
        right: auto;
        transform: none;
        min-width: 44px;
        min-height: 44px;
        -webkit-tap-highlight-color: rgba(0, 0, 0, 0.2);
        touch-action: manipulation;
        cursor: pointer;
        z-index: 1001;
        background: transparent !important;
        border: none !important;
        color: var(--text-dark);
        font-size: 1.5rem;
    }
    
    .has-mega-menu .nav-link::after {
        content: "+";
        font-size: 1.2em;
        margin-left: auto;
        order: 2;
    }
    
    .has-mega-menu.active .nav-link::after {
        content: "−";
    }
    
    .mega-menu {
        position: static !important;
        top: auto !important;
        left: auto !important;
        right: auto !important;
        width: 100% !important;
        max-width: none !important;
        transform: none !important;
        box-shadow: none;
        background: var(--bg-light);
        border-radius: 0;
        padding: 1rem;
        margin: 0;
        opacity: 1 !important;
        visibility: visible !important;
        display: none;
    }
    
    .has-mega-menu.active .mega-menu {
        display: block;
    }
    
    /* Completely disable hover behavior on mobile */
    .has-mega-menu:hover .mega-menu {
        transform: none !important;
        position: static !important;
        left: auto !important;
        opacity: 1 !important;
        visibility: visible !important;
    }
    
    .mega-menu-content {
        display: block;
    }
    
    .mega-menu-column {
        margin-bottom: 1.5rem;
        min-height: auto;
    }
    
    .mega-menu-column h4 {
        font-size: 1.1rem;
        margin-bottom: 0.75rem;
    }
    
    .mega-menu-column a {
        padding: 0.5rem 0;
        font-size: 0.9rem;
    }
    
    .featured-solution,
    .featured-resource,
    .featured-company {
        background: var(--white);
        margin-top: 1rem;
        padding: 1rem;
    }
    
    .nav-actions {
        margin-top: 1rem;
        padding-top: 1rem;
        border-top: 1px solid var(--bg-light);
    }
    
    .sign-in-btn {
        text-align: center;
        margin-bottom: 0.5rem;
        justify-content: center;
    }
    
    .nav-cta {
        margin-left: 0 !important;
        text-align: center;
        justify-content: center;
    }
    
    /* Prevent body scroll when menu is open */
    body.menu-open {
        overflow: hidden;
        position: fixed;
        width: 100%;
    }
    
    /* Mobile backdrop */
    .mobile-backdrop {
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background-color: rgba(0, 0, 0, 0.5);
        opacity: 0;
        visibility: hidden;
        transition: all 0.3s ease;
        z-index: 998;
    }
    
    .mobile-backdrop.active {
        opacity: 1;
        visibility: visible;
    }
    
    body.menu-open {
        overflow: hidden;
        height: 100vh;
    }
}

/* Footer Styles Update */
.footer-main {
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    padding: 50px 0;
    max-width: 1200px;
    margin: 0 auto;
}

.footer-column {
    flex: 1;
    min-width: 200px;
    margin-bottom: 30px;
}

.footer-column h4 {
    color: #333;
    margin-bottom: 20px;
    font-size: 18px;
    font-weight: 600;
}

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

.footer-column ul li {
    margin-bottom: 10px;
}

.footer-column ul li a {
    color: #666;
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer-column ul li a:hover {
    color: #ff7b00;
}

.footer-logo {
    max-width: 150px;
    margin-bottom: 20px;
}

.social-links {
    display: flex;
    gap: 15px;
    margin-bottom: 20px;
}

.social-links a {
    color: #666;
    font-size: 20px;
    transition: color 0.3s ease;
}

.social-links a:hover {
    color: #ff7b00;
}

.newsletter-signup h5 {
    margin-bottom: 10px;
    font-size: 16px;
}

.newsletter-form {
    display: flex;
    gap: 10px;
}

.newsletter-form input {
    flex: 1;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
}

.newsletter-form button {
    padding: 10px 20px;
    background-color: #ff7b00;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.newsletter-form button:hover {
    background-color: #e66900;
}

.footer-bottom {
    border-top: 1px solid #eee;
    padding: 20px 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    max-width: 1200px;
    margin: 0 auto;
}

.footer-legal {
    display: flex;
    gap: 20px;
}

.footer-legal a {
    color: #666;
    text-decoration: none;
    font-size: 14px;
    transition: color 0.3s ease;
}

.footer-legal a:hover {
    color: #ff7b00;
}

.footer-copyright {
    font-size: 14px;
    color: #666;
}

  