/* ===================================
   BASE STYLES
   =================================== */
body {
  font-family: Arial, sans-serif;
  margin: 0px;
  padding: 0px;
  background: #fafafa;
  color: #333;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

input, select, textarea, button {
  font-size: 16px;
}


h1 {
  text-align: center;
}

button {
  margin: 2px;
  padding: 10px;
  border-radius: 6px;
  cursor: pointer;
}

/* ===================================
   CHART CONTAINERS
   =================================== */
.chart-container {
    position: relative;
    width: 100%;
    height: 100%;
    
}

.chart-container h2 {
    text-align: left;
    margin-top: 0; 
    padding-top: 20px; 
    margin-left: 20px; 
}

#t-bills-navigator, 
#t-bonds-navigator {
    width: 100%;
    height: 20px;
    display: block;
}

.main-container {
    display: flex;
    flex-direction: column; 
    align-items: center;
    gap: 50px;
}

.site-footer {
    position: fixed;  
    bottom: 10px;
    left: 10px;
    font-size: 14px;
    color: #555;
    font-style: italic;
}

.date-picker-container {
    text-align: center;
    margin-bottom: 20px; 
}

.controls-wrapper {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
}

#pin-curve-button {
    width: 27px;  
    height: 24px;  
    padding: 0;    
    border: 0px;
    background-color: purple;
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
}

#pin-curve-button svg {
    fill: white;
    transform: rotate(45deg);
}

#cbr-chart {
    width: 100%;
    height: 400px;
}

/* ===================================
   NAVIGATION BAR
   =================================== */
.navbar {
    background-color: white;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.nav-links {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
}

.nav-item {
    position: relative;
    padding: 0px;
}

.nav-item a {
    text-decoration: none;
    color: #333;
    font-weight: 600;
   font-size: 16px;
    transition: all 0.3s ease;
    position: relative;
}



.nav-item.has-dropdown > a::before {
            content: '';
            margin-left: 0.4rem;
            font-size: 16px;
            transition: transform 0.3s ease;
        }

        .nav-item.has-dropdown:hover > a::before {
            transform: rotate(-180deg);
        }

.dropdown-outer {
    position: absolute;
    top: 100%; /* Stays below the trigger link */
    
    /* 1. ALIGN RIGHT EDGE to the parent .nav-item's right edge */
    right: 0; 
    
    /* 2. REMOVE the left: 0 and full-width viewport centering hacks */
    left: auto; /* Ensure no conflict */
    width: auto; /* Let the content determine the width, constrained by max-width */
    
    /* Optional: Set a starting width for the outer background */
    min-width: 500px; 
    
    /* REMOVE: width: 100vw; */
    /* REMOVE: transform: translateX(calc((100vw - 100%) / -2)); */
    
    /* Background and visibility (kept the same) */
    background: #fff;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: 999;
   border-radius: 4px;
}

        .dropdown {
    /* No absolute positioning here—it's a normal block element now */
    
    /* Set max-width and center it (this is where the desired width is enforced) */
    max-width: 1400px; /* or whatever width matches your .home-nav-container */
    
    
    /* Apply internal spacing */
    padding: 2rem;
    list-style: none;
    border-radius: 8px;
    
    /* Remove old absolute positioning and related styles */
    /* REMOVE: position: absolute; */
    /* REMOVE: top: 100%; */
    /* REMOVE: left: 50%; */
    /* REMOVE: transform: translateX(-50%); */
    /* REMOVE: width: 100vw; */
    /* REMOVE: max-width: 1400px; */
    /* REMOVE: opacity: 0; and visibility: hidden; (These belong to the .dropdown-outer) */
    /* REMOVE: box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15); (This belongs to the .dropdown-outer) */
}  

        .nav-item.has-dropdown:hover .dropdown-outer {
            opacity: 1;
            visibility: visible;
            margin-top: 1rem;
        }

        .dropdown-grid {
            
            grid-template-columns: repeat(3, 1fr) repeat(3, 1fr);
            gap: 1.5rem 2rem;
            align-items: start;
           width: 100%;
    box-sizing: border-box;
        }

        .dropdown-description {
            grid-column: 1 / 4;
            padding: 1.5rem;
            background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
            border-radius: 6px;
            border-left: 4px solid #22c55e;
        }

        .dropdown-description h3 {
            font-size: 16px;
            color: #333;
            margin-bottom: 0.5rem;
        }

        .dropdown-description p {
            color: #666;
            font-size: 1rem;
            line-height: 1.6;
        }

        .dropdown-items {
            grid-column: 4 / 7;
            display: contents;
        }

        .dropdown li {
            list-style: none;
        }

        .dropdown a {
            display: block;
            padding: 1rem 1.2rem;
            text-decoration: none;
            color: #333;
            font-weight: 600;
            font-size: 16px;
            transition: all 0.3s ease;
            border-radius: 2px;
            background: ;
            border: 1px solid transparent;
        }

        .dropdown a::after {
            content: '';
            position: absolute;
            bottom: -5px;
            left: 0;
            width: 0;
            height: 2px;
            background: linear-gradient(90deg, #22c55e 0%, #dc2626 100%);
            transition: width 0.3s ease;
        }

        .dropdown a:hover::after {
            
            color: #fff;
            transform: translateX(5px);
            border-color: #22c55e;
        }

        /* Responsive adjustments */
        @media (max-width: 1200px) {
            .dropdown {
                max-width: 95vw;
            }
        }

        @media (max-width: 768px) {
            .dropdown-grid {
                grid-template-columns: 1fr;
            }

            .dropdown-description,
            .dropdown-items {
                grid-column: 1;
            }
        }

/* ===================================
   MULTISELECT & CURRENCY SELECT
   =================================== */
.currency-select {
    position: relative;
    z-index: 10;
    display: block;
    width: 100%;
    max-width: 400px;
    min-height: 120px;
    margin: 0.5rem 0 1rem;
    padding: 0.5rem;
    border: 1px solid #ccc;
    border-radius: 6px;
    background: #fff;
    font-family: inherit;
    font-size: 14px;
}

.custom-multiselect {
    position: relative;
    width: 100%;
    max-width: 250px;
    margin: 0.5rem auto 1rem;
    z-index: 10;
}

.multiselect-button {
    width: 100%;
    padding: 0.5rem 0.75rem;
    border: 1px solid #ccc;
    border-radius: 6px;
    background: #fff;
    text-align: left;
    cursor: pointer;
    font-size: 13px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin: 0;
    box-sizing: border-box;
}

.multiselect-button:hover {
    border-color: #999;
}

.multiselect-dropdown {
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    width: 100%;
    background: #fff;
    border: 1px solid #ccc;
    border-top: none;
    border-radius: 0 0 6px 6px;
    max-height: 200px;
    align-items: center;
    overflow-y: auto;
    display: none;
    z-index: 1000;
    box-sizing: border-box;
}

.multiselect-dropdown.open {
    display: block;
}

.multiselect-option {
    padding: 0.4rem 0.5rem;
    cursor: pointer;
    border-bottom: 1px solid #eee;
    display: flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 13px;
}

.multiselect-option:hover {
    background-color: #f5f5f5;
}

.multiselect-option:last-child {
    border-bottom: none;
}

.multiselect-option input[type="checkbox"] {
    margin: 0;
}

.multiselect-option label {
    cursor: pointer;
    flex: 1;
}

.dropdown-arrow {
    transition: transform 0.2s;
}

.dropdown-arrow.open {
    transform: rotate(180deg);
}

/* ===================================
   COMPARE PAGE STYLES
   =================================== */
.compare-page .main-container {
    display: flex;
    flex-direction: row;
    min-height: 100vh;
    gap: 20px;
    padding: 20px;
    align-items: flex-start;
}

.left-sidebar, .right-sidebar {
    flex: 0 0 280px;
    background: #fafafa;
    padding: 20px;
    border-radius: 8px;
    height: fit-content;
    position: sticky;
    top: 20px;
}

.compare-page .chart-area {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 0 20px;
}

.compare-page .chart-container {
    width: 100%;
    max-width: 1000px;
    height: 500px;
    position: relative;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 20px;
}

.sidebar-section {
    margin-bottom: 25px;
}

.sidebar-section h3 {
    font-size: 16px;
    font-weight: bold;
    margin-bottom: 12px;
    color: #333;
    border-bottom: 1px solid #000000;
    padding-bottom: 5px;
    margin-top: 0;
}

.checkbox-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.checkbox-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 4px 0;
    transition: all 0.2s ease;
}

.checkbox-item input[type="checkbox"] {
    margin: 0;
    transform: scale(1.1);
    accent-color: #4e79a7;
}

.checkbox-item label {
    font-size: 14px;
    cursor: pointer;
    color: #555;
    flex: 1;
    line-height: 1.3;
}

.checkbox-item:hover {
    background-color: rgba(78, 121, 167, 0.1);
    border-radius: 4px;
    margin: 0 -4px;
    padding: 4px 4px;
}

.chart-title {
    text-align: center;
    font-size: 24px;
    font-weight: bold;
    color: #333;
    margin-bottom: 20px;
}

.chart-controls {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.control-button {
    padding: 8px 16px;
    border: 0.05px solid #f0f0f0;
    background: white;
    border-radius: 0px;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.2s ease;
    font-family: inherit;
}

.control-button:hover {
    background: #f0f0f0;
}

.control-button.active {
    background: #4e79a7;
    color: white;
    border-color: #4e79a7;
}

#compare-chart {
    width: 100% !important;
    height: 100% !important;
}

.compare-page .navbar {
    position: relative;
    z-index: 1001;
}

.compare-page .site-footer {
    position: static;
    text-align: center;
    margin-top: 40px;
    bottom: auto;
    left: auto;
}

/* ===================================
   NSE SECTIONS
   =================================== */
#indexChart {
    display: block;
    width: 100%;
    height: 400px;
    max-height: 60vh;
}

.section {
    margin-bottom: 40px;
    position: relative;
    width: 70%;
}

.section canvas {
    background: #fff;
    padding: 15px;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
}

/* ===================================
   STOCK SEARCH SECTION
   =================================== */
.search-section {
    margin: 30px auto;
    padding: 20px;
    max-width: 600px;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
}

.search-controls {
    display: flex;
    gap: 10px;
    margin-bottom: 15px;
    flex-wrap: wrap;
}

.search-controls input,
.search-controls select {
    flex: 1;
    min-width: 150px;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
}

.search-controls button {
    padding: 10px 20px;
    background: #007bff;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-weight: bold;
}

.search-controls button:hover {
    background: #0056b3;
}

.stock-info-container {
    margin: 20px auto;
    max-width: 900px;
}

.stock-info-section h3 {
    text-align: center;
    margin-bottom: 20px;
    font-size: 24px;
}

.info-cards-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
}

.info-card {
    background: #f9fafb;
    padding: 15px;
    border-radius: 3px;
    border-left: 2px solid #007bff;
}

.info-card h4 {
    margin-top: 0;
    color: #007bff;
}

.info-card p {
    margin: 8px 0;
    font-size: 14px;
}

#stock-chart-container {
    max-width: 900px;
    margin: 40px auto;
    height: 400px;
}

/* ===================================
   PERFORMANCE PERIODS
   =================================== */
.performance-periods {
    margin-top: 20px;
    padding: 15px;
    background: #f9fafb;
    border-radius: 8px;
}

.performance-periods h4 {
    margin-top: 0;
    margin-bottom: 15px;
    color: #333;
}

.period-boxes {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
    gap: 10px;
}

.period-box {
    padding: 9px;
    border-radius: 3px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    border: 1px solid transparent;
    background: white;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.period-box:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.15);
}

.period-box.positive {
    border-color: #28a745;
}

.period-box.positive .period-value {
    color: #28a745;
}

.period-box.negative {
    border-color: #dc3545;
}

.period-box.negative .period-value {
    color: #dc3545;
}

.period-box.active {
    border-color: #007bff;
    background: #e7f3ff;
}

.period-label {
    display: block;
    font-size: 12px;
    color: #666;
    margin-bottom: 5px;
    font-weight: 500;
    text-transform: uppercase;
}

.period-value {
    display: block;
    font-size: 18px;
    font-weight: bold;
    transition: color 0.3s ease;
}

/* ===================================
   HOME PAGE LANDING STYLES
   =================================== */
.home-navbar {
    background: #fff;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    position: sticky;
    top: 0;
    z-index: 1000;
    padding: 1rem 0;
   position: relative;
}

.home-nav-container {
    max-width: 100%;
    margin: 0 auto;
    padding: 0 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
   position: relative;
}

.home-logo {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    text-decoration: none;
}

.logo-img {
    height: 40px;
    width: auto;
    transition: transform 0.3s ease;
}

.logo-img:hover {
    transform: scale(1.05);
}

.home-logo span {
    font-size: 18px;
    font-weight: 700;
    background: linear-gradient(135deg, #22c55e 0%, #dc2626 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-decoration: none;
    transition: opacity 0.3s ease;
}

.home-logo:hover span {
    opacity: 0.8;
}

.home-nav-links {
    display: flex;
    gap: 2rem;
    list-style: none;
    align-items: center;
}

.home-nav-links a {
    text-decoration: none;
    color: #333;
    font-weight: 600;
   font-size: 16px;
    transition: all 0.3s ease;
    position: relative;
}

.home-nav-links a::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, #22c55e 0%, #dc2626 100%);
    transition: width 0.3s ease;
}

.home-nav-links a:hover {
    color: #dc2626;
}

.home-nav-links a:hover::after {
    width: 100%;
}

.hero {
    background: linear-gradient(135deg, #22c55e 0%, #dc2626 100%);
    color: white;
    padding: 6rem 2rem;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1440 320"><path fill="%23ffffff" fill-opacity="0.1" d="M0,96L48,112C96,128,192,160,288,160C384,160,480,128,576,122.7C672,117,768,139,864,138.7C960,139,1056,117,1152,106.7C1248,96,1344,96,1392,96L1440,96L1440,320L1392,320C1344,320,1248,320,1152,320C1056,320,960,320,864,320C768,320,672,320,576,320C480,320,384,320,288,320C192,320,96,320,48,320L0,320Z"></path></svg>') no-repeat bottom;
    background-size: cover;
}

.hero-content {
    max-width: 1000px;
    margin: 0 auto;
    position: relative;
    z-index: 1;
    padding: 0 1rem;
}

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

.hero p {
    font-size: 20px;
    margin-bottom: 2rem;
    opacity: 0.95;
}

.cta-button {
    display: inline-block;
    background: white;
    color: #dc2626;
    padding: 1rem 2.5rem;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 600;
    font-size: 1.1rem;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
    position: relative;
    overflow: hidden;
}

.cta-button::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(34, 197, 94, 0.3), transparent);
    transition: left 0.5s ease;
}

.cta-button:hover::before {
    left: 100%;
}

.cta-button:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(220, 38, 38, 0.3);
    color: #22c55e;
}

.features {
    padding: 5rem 0rem;
    max-width: 100%;
    margin: 0 auto;
    width: 100%;
}

.section-title {
    text-align: center;
    font-size: 32px;
    margin-bottom: 3rem;
    color: #333;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 2rem;
}

.feature-card {
    background: white;
    padding: 2rem;
    border-radius: 15px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
    transition: all 0.3s ease;
    cursor: pointer;
    text-decoration: none;
    color: inherit;
    display: block;
    position: relative;
    overflow: hidden;
}

.feature-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: linear-gradient(90deg, #22c55e 0%, #dc2626 100%);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.3s ease;
}

.feature-card:hover::before {
    transform: scaleX(1);
}

.feature-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 8px 30px rgba(220, 38, 38, 0.2);
}

.feature-icon {
    width: 60px;
    height: 60px;
    background: transparent;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.5rem;
    font-size: 2rem;
    transition: all 0.3s ease;
}

.feature-icon img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    transition: transform 0.3s ease;
}

.feature-card:hover .feature-icon {
    transform: rotate(5deg) scale(1.1);
}

.feature-card:hover .feature-icon img {
    filter: drop-shadow(0 4px 8px rgba(220, 38, 38, 0.3));
}

.feature-card h3 {
    font-size: 18px;
    margin-bottom: 1rem;
    color: #333;
}

.feature-card p {
    color: #666;
    line-height: 1.8;
}

/* ===================================
   MARKETS LOGO CAROUSEL
   =================================== */
.markets {
    background: #f8f9fa;
    padding: 5rem 2rem;
    overflow: hidden;
}

.markets-container {
    max-width: 1500px;
    margin: 0 auto;
}

.logo-carousel {
    width: 100%;
    overflow: hidden;
    position: relative;
    margin-top: 3rem;
    padding: 2rem 0;
}

.logo-carousel::before,
.logo-carousel::after {
    content: '';
    position: absolute;
    top: 0;
    bottom: 0;
    width: 100px;
    z-index: 2;
    pointer-events: none;
}

.logo-carousel::before {
    left: 0;
    background: linear-gradient(to right, #f8f9fa, transparent);
}

.logo-carousel::after {
    right: 0;
    background: linear-gradient(to left, #f8f9fa, transparent);
}

.logo-track {
    display: flex;
    gap: rem;
    animation: scroll 40s linear infinite;
    width: fit-content;
}

.logo-track:hover {
    animation-play-state: paused;
}

.logo-item {
    flex-shrink: 0;
    width: 150px;
    height: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
    
    padding: 1rem;
    border-radius: 10px;
    
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.logo-item:hover {
    transform: translateY(-5px);
    
}

.logo-item img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    filter: grayscale(0%);
    transition: filter 0.3s ease;
}

.logo-item:hover img {
    filter: grayscale(0%) brightness(1.1);
}

@keyframes scroll {
    0% {
        transform: translateX(0);
    }
    100% {
        transform: translateX(-50%);
    }
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .logo-item {
        width: 120px;
        height: 60px;
        padding: 0.75rem;
    }
    
    .logo-track {
        gap: 2rem;
        animation: scroll 30s linear infinite;
    }
    
    .logo-carousel::before,
    .logo-carousel::after {
        width: 50px;
    }
}
.footer {
    background: #2d3748;
    color: white;
    padding: 3rem 0rem;
    text-align: center;
    width: 100%;
}

.footer-content {
    max-width: 100%;
    margin: 0 auto;
    padding: 0 2rem;
}

.footer-links {
    display: flex;
    justify-content: center;
    gap: 2rem;
    margin-bottom: 2rem;
    flex-wrap: wrap;
}

.footer-links a {
    color: white;
    text-decoration: none;
    transition: color 0.3s;
}

.footer-links a:hover {
    background: linear-gradient(135deg, #22c55e 0%, #dc2626 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.mobile-menu-btn {
    display: none;
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: #333;
}

/* ===================================
   RESPONSIVE DESIGN
   =================================== */
@media (max-width: 1200px) {
    .compare-page .main-container {
        flex-direction: column;
        gap: 15px;
    }
    
    .left-sidebar, .right-sidebar {
        flex: none;
        position: static;
        width: 100%;
        max-width: none;
        display: grid;
        grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
        gap: 20px;
    }
    
    .compare-page .chart-area {
        order: -1;
    }
    
    .compare-page .chart-container {
        height: 450px;
    }
}

@media (max-width: 768px) {
    /* Compare page mobile */
    .compare-page .main-container {
        padding: 10px;
        gap: 15px;
    }
    
    .left-sidebar, .right-sidebar {
        padding: 15px;
        grid-template-columns: 1fr;
    }
    
    .compare-page .chart-container {
        height: 400px;
        padding: 15px;
    }
    
    .sidebar-section h3 {
        font-size: 15px;
    }
    
    .checkbox-item label {
        font-size: 13px;
    }
    
    .chart-title {
        font-size: 20px;
    }
    
    .chart-controls {
        gap: 10px;
    }
    
    .control-button {
        padding: 6px 12px;
        font-size: 13px;
    }

    /* Performance periods mobile */
    .period-boxes {
        grid-template-columns: repeat(3, 1fr);
    }
    
    .period-box {
        padding: 10px;
    }
    
    .period-value {
        font-size: 14px;
    }

    /* Home page mobile */
    .mobile-menu-btn {
        display: block;
    }

    .home-nav-links {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: white;
        flex-direction: column;
        padding: 1rem;
        box-shadow: 0 4px 10px rgba(0,0,0,0.1);
    }

    .home-nav-links.active {
        display: flex;
    }

    /* Mobile dropdown fixes */
@media (max-width: 768px) {
    .nav-item.has-dropdown {
        width: 100%;
    }

    .dropdown-outer {
        position: static;
        width: 100%;
        min-width: auto;
        box-shadow: none;
        opacity: 1;
        visibility: visible;
        margin-top: 0;
        padding-left: 20px;
        background: #f9fafb;
        border-radius: 0;
    }

    .nav-item.has-dropdown:hover .dropdown-outer {
        margin-top: 0;
    }

    .dropdown {
        max-width: 100%;
        padding: 0.5rem 0;
    }

    .dropdown-grid {
        grid-template-columns: 1fr;
        gap: 0;
    }

    .dropdown-description,
    .dropdown-items {
        grid-column: 1;
    }

    .dropdown li {
        width: 100%;
    }

    .dropdown a {
        padding: 0.75rem 1rem;
        font-size: 14px;
        
    }

    .dropdown a:hover {
        
        background: white;
    }
}

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

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

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

/* ===================================
   COMING SOON CARD STYLES
   =================================== */
.coming-soon-card {
    position: relative;
    cursor: default;
    opacity: 0.95;
    overflow: visible;
}

.coming-soon-badge {
    position: absolute;
    top: -20px;
    right: 0px;
    width: 90px;
    height: auto;
    z-index: 10;
    
    filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.2));
}

.coming-soon-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: linear-gradient(90deg, #22c55e 0%, #dc2626 100%);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.3s ease;
}

.coming-soon-card:hover::before {
    transform: scaleX(1);
}

.coming-soon-card:hover {
    transform: translateY(-5px);
}

.coming-soon-card:hover .coming-soon-badge {
    
    transition: transform 0.3s ease;
}

/* ===================================
   AFRICAN MARKETS DASHBOARD STYLES
   =================================== */

   .markets-page-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 40px 20px;
}

.markets-page-container h1 {
    text-align: center;
    color: #333;
    margin-bottom: 40px;
    font-size: 32px;
    width: 100%;
}

/* ===================================
   EXCHANGE SELECTOR
   =================================== */
.exchange-selector-container {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 15px;
    margin-bottom: 40px;
    margin-left: auto;
    margin-right: auto;
    
    
    border-radius: 8px;
    
    width: fit-content;
    
}

.exchange-selector-container label {
    font-weight: 600;
    font-size: 16px;
    color: #333;
}

.exchange-dropdown {
    padding: 12px 20px;
    font-size: 15px;
    border: 2px solid #ddd;
    border-radius: 3px;
    background: white;
    cursor: pointer;
    transition: all 0.3s ease;
    min-width: 300px;
}

.exchange-dropdown:hover {
    border-color: #22c55e;
}

.exchange-dropdown:focus {
    outline: none;
    border-color: #dc2626;
    box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.1);
}

/* ===================================
   LOADING & ERROR STATES
   =================================== */
.loading-indicator {
    text-align: center;
    padding: 60px 20px;
}
.spinner {
    width: 120px;
    height: 120px;
    margin: 0 auto 20px;
    background-image: url('3b45aa7a-f53e-45ef-87dd-e95535fe08c6-removebg-preview.png');
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    animation: pulse 1.5s ease-in-out infinite;
    border: none;
    border-radius: 0;
}
@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.2; }
}
.loading-indicator p {
    font-size: 16px;
    color: #666;
}

.error-message {
    background: #fee;
    border: 1px solid #fcc;
    border-radius: 8px;
    padding: 20px;
    margin: 20px 0;
    color: #c33;
    text-align: center;
    font-size: 15px;
}

/* ===================================
   MARKET OVERVIEW GRID
   =================================== */
.market-overview {
    margin-bottom: 50px;
}

.overview-grid {
    display: grid;
    grid-template-columns: 1.8fr 1fr 1fr;
    gap: 20px;
    margin-bottom: 40px;
    align-items: start; /* ADD THIS - prevents stretching */
}


/* Make grid items positioned relatively for separators */
.overview-grid > * {
    position: relative;
}

/* Add vertical separators between columns (not at the ends) */
.overview-grid > *:not(:last-child)::after {
    content: '';
    position: absolute;
    right: -10px; /* Half of the gap (20px / 2) */
    top: 0;
    bottom: 0;
    width: 1px;
    background-color: #e5e5e5; /* Faint grey */
}

.index-chart-card,
.movers-card {
    
    
    padding: 15px;
    
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.index-chart-card {
    display: flex;
    flex-direction: column;
    height: fit-content; /* ADD THIS - stops infinite growth */
}

.index-chart-card:hover,
.movers-card:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 15px rgba(0,0,0,0.12);
}

.index-chart-card h3,
.movers-card h3 {
    margin-top: 0;
    margin-bottom: 20px;
    color: #333;
    font-size: 18px;
    border-bottom: 2px solid #f0f0f0;
    padding-bottom: 10px;
}

.index-chart-card canvas {
    width: 100% !important;
    height: 250px !important; /* CHANGE THIS - fixed height for chart */
}

/* ===================================
   MOVERS LIST (TOP GAINERS/LOSERS)
   =================================== */
.movers-list {
    display: flex;
    flex-direction: column;
    gap: 0px;
}

.mover-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px;
    background: #f9fafb;
    
    border-bottom: 2px solid #f0f0f0;
    transition: background 0.2s ease;
}

.mover-item:hover {
    background: #f0f2f5;
}

.mover-ticker {
    font-weight: 700;
    font-size: 14px;
    color: #333;
    min-width: 60px;
}

.mover-price {
    font-size: 14px;
    color: #666;
    min-width: 80px;
    text-align: center;
}

.mover-change {
    font-weight: 600;
    font-size: 14px;
    padding: 4px 8px;
    border-radius: 4px;
    min-width: 70px;
    text-align: right;
}

.mover-change.positive {
    color: #16a34a;
    background: #dcfce7;
}

.mover-change.negative {
    color: #dc2626;
    background: #fee2e2;
}

.movers-empty {
    text-align: center;
    color: #999;
    padding: 30px;
    font-style: italic;
}

/* ===================================
   LISTED COMPANIES SECTION
   =================================== */
.listed-companies-section {
    
    
    padding: 30px;
    
}

.listed-companies-section h2 {
    margin-top: 0;
    margin-bottom: 25px;
    color: #333;
    font-size: 24px;
    text-align: center;
}

.table-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    flex-wrap: wrap;
    gap: 15px;
}

.company-search-input {
    padding: 10px 15px;
    border: 2px solid #ddd;
    border-radius: 6px;
    font-size: 14px;
    min-width: 250px;
    transition: border-color 0.3s ease;
}

.company-search-input:focus {
    outline: none;
    border-color: #22c55e;
}

.table-info {
    font-size: 14px;
    color: #666;
    font-weight: 600;
}

/* ===================================
   COMPANIES TABLE
   =================================== */
.table-wrapper {
    overflow-x: auto;
    border-radius: 8px;
    border: 1px solid #e5e7eb;
}

.companies-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}

.companies-table thead {
    background: linear-gradient(135deg, #22c55e 0%, #16a34a 100%);
    color: white;
}

.companies-table th {
    padding: 15px 12px;
    text-align: left;
    font-weight: 600;
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.companies-table tbody tr {
    border-bottom: 1px solid #e5e7eb;
    transition: background-color 0.2s ease;
}

.companies-table tbody tr:hover {
    background-color: #f9fafb;
}

.companies-table tbody tr:last-child {
    border-bottom: none;
}

.companies-table td {
    padding: 12px;
    color: #374151;
}

.companies-table td:first-child {
    font-weight: 700;
    color: #1f2937;
}

.companies-table td:nth-child(4) {
    font-weight: 600;
}

.change-cell {
    font-weight: 600;
}

.change-cell.positive {
    color: #16a34a;
}

.change-cell.negative {
    color: #dc2626;
}

.change-cell.neutral {
    color: #6b7280;
}

/* ===================================
   RESPONSIVE DESIGN
   =================================== */
@media (max-width: 1024px) {
    .overview-grid {
        grid-template-columns: 1fr;
    }

    .index-chart-card {
        order: -1;
    }

    .exchange-dropdown {
        min-width: 250px;
    }
}

@media (max-width: 768px) {
    .markets-page-container {
        padding: 20px 10px;
    }

    .markets-page-container h1 {
        font-size: 24px;
        margin-bottom: 30px;
    }

    .exchange-selector-container {
        flex-direction: column;
        padding: 15px;
    }

    .exchange-dropdown {
        width: 100%;
        min-width: auto;
    }

    .overview-grid {
        gap: 15px;
    }

    .index-chart-card,
    .movers-card {
        padding: 15px;
    }

    .mover-item {
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
        gap: 8px;
    }

    .mover-price,
    .mover-change {
        
    }

    .table-controls {
        flex-direction: column;
        align-items: stretch;
    }

    .company-search-input {
        width: 100%;
        min-width: auto;
    }

    .companies-table {
        font-size: 12px;
    }

    .companies-table th,
    .companies-table td {
        padding: 10px 8px;
    }

    .companies-table th {
        font-size: 11px;
    }
}

@media (max-width: 480px) {
    .companies-table th:nth-child(3),
    .companies-table td:nth-child(3) {
        display: none;
    }
}

/* ===================================
   STOCK DETAIL PAGE STYLES
   =================================== */

   .stock-detail-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 40px 20px;
}

/* ===================================
   SEARCH SECTION
   =================================== */
.stock-search-section {
    
    padding: 25px;
    border-radius: 8px;
    
    margin-bottom: 30px;
}

.search-boxes {
    display: flex;
    gap: 15px;
    align-items: flex-end;
}

.search-box-wrapper {
    
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.search-box-wrapper label {
    font-size: 14px;
    font-weight: 600;
    color: #333;
}

.search-input {
    padding: 12px 15px;
    border: 2px solid #ddd;
    border-radius: 2px;
    font-size: 15px;
    transition: all 0.3s ease;
    
}

.search-input:focus {
    outline: none;
    border-color: #22c55e;
}

.ticker-search-container {
    position: relative;
    width: 100%;
}

.ticker-suggestions {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    border: 2px solid #22c55e;
    border-top: none;
    border-radius: 0 0 6px 6px;
    max-height: 250px;
    overflow-y: auto;
    z-index: 1000;
    display: none;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.suggestion-item {
    padding: 12px 15px;
    cursor: pointer;
    border-bottom: 1px solid #f0f0f0;
    transition: background 0.2s ease;
}

.suggestion-item:hover {
    background: #f9fafb;
}

.suggestion-item:last-child {
    border-bottom: none;
}

.search-icon-btn {
    padding: 12px 20px;
    background: linear-gradient(135deg, #ebf3ee 0%, #16a34a 100%);
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 60px;
}

.search-icon-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(34, 197, 94, 0.3);
}

/* ===================================
   STOCK HEADER
   =================================== */
.stock-header {
    margin-bottom: 25px;
}

.stock-header h1 {
    font-size: 32px;
    color: #333;
    margin: 0 0 8px 0;
    text-align: left;
}

.company-ticker {
    font-size: 18px;
    color: #666;
    font-weight: 600;
}

/* ===================================
   FACTSHEET SECTION
   =================================== */
.factsheet-section {
    background: white;
    padding: 25px;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    margin-bottom: 30px;
    position: relative;
}

.factsheet-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.factsheet-item {
    display: flex;
    gap: 15px;
}

.factsheet-label {
    font-weight: 600;
    color: #333;
    min-width: 100px;
}

.factsheet-value {
    color: #666;
    flex: 1;
}

.factsheet-value a {
    color: #22c55e;
    text-decoration: none;
}

.factsheet-value a:hover {
    text-decoration: underline;
}

/* ===================================
   LOADING SPINNER
   =================================== */
.loading-spinner {
    display: none;
    text-align: center;
    padding: 40px;
}
.loading-spinner .spinner {
    width: 120px;
    height: 120px;
    margin: 0 auto;
    background-image: url('3b45aa7a-f53e-45ef-87dd-e95535fe08c6-removebg-preview.png');
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    animation: pulse 1.5s ease-in-out infinite;
    border: none;
    border-radius: 0;
}

/* ===================================
   MAIN CONTENT GRID
   =================================== */
.main-content-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 20px;
    margin-bottom: 30px;
}

/* Add vertical separators between columns (not at the ends) */
.main-content-grid > *:not(:last-child)::after {
    content: '';
    position: absolute;
    right: -10px; /* Half of the gap (20px / 2) */
    top: 0;
    bottom: 0;
    width: 1px;
    background-color: #e5e5e5; /* Faint grey */
}


.content-column {
    
    padding: 20px;
    border-radius: 8px;
    
    position: relative;
}

.content-column h3 {
    margin: 0 0 20px 0;
    font-size: 18px;
    color: #333;
    border-bottom: 2px solid #f0f0f0;
    padding-bottom: 10px;
}

/* ===================================
   CHART COLUMN
   =================================== */
.chart-column {
    display: flex;
    flex-direction: column;
}

.chart-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    flex-wrap: wrap;
    gap: 10px;
}

.period-buttons {
    display: flex;
    
    flex-wrap: wrap;
}

.period-btn {
    padding: 5px 5px;
    border: none;
    background: white;
    border-radius: 2px;
    cursor: pointer;
    font-size: 13px;
    font-weight: 600;
    transition: all 0.2s ease;
}

.period-btn:hover {
    background: #f0f0f0;
}

.period-btn.active {
    background: #22c55e;
    color: white;
    border-color: #22c55e;
}

.quarter-dropdown-container {
    position: relative;
}

.quarter-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    background: white;
    border: 1px solid #ddd;
    border-radius: 4px;
    margin-top: 4px;
    display: none;
    z-index: 100;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.quarter-option {
    padding: 10px 20px;
    cursor: pointer;
    transition: background 0.2s ease;
    white-space: nowrap;
}

.quarter-option:hover {
    background: #f0f0f0;
}

.quarter-option.disabled {
    color: #ccc;
    cursor: not-allowed;
}

.quarter-option.disabled:hover {
    background: white;
}

.chart-right-controls {
    display: flex;
    align-items: center;
    gap: 15px;
}

.percentage-change {
    font-size: 18px;
    font-weight: 700;
    padding: 6px 12px;
    border-radius: 4px;
}

.percentage-change.positive {
    color: #16a34a;
    background: #dcfce7;
}

.percentage-change.negative {
    color: #dc2626;
    background: #fee2e2;
}

.reset-zoom-btn {
    padding: 8px 16px;
    background: #f0f0f0;
    border: 1px solid #ddd;
    border-radius: 4px;
    cursor: pointer;
    font-size: 13px;
    font-weight: 600;
    transition: all 0.2s ease;
}

.reset-zoom-btn:hover {
    background: #e0e0e0;
}

/* 1. Constrain the height of the wrapper (parent) */
#chart-wrapper {
    /* Use a fixed height or max-height for the chart area */
    max-height: 50vh; /* Example: 50% of the viewport height */
    height: 400px;  /* Or a fixed height, e.g., 400 pixels */
    width: 100%;
    position: relative; /* Crucial for Chart.js responsiveness */
}

/* 2. Ensure the canvas fills the constrained wrapper */
#price-chart {
    /* This allows the chart to scale properly within the wrapper */
    max-width: 100%;
    max-height: 100%;
    width: 100%;
    height: 100%;
}

/* ===================================
   DATA LIST (TRADING & VALUATION)
   =================================== */
.data-list {
    display: flex;
    flex-direction: column;
    gap: 0px;
}

.data-item {
    display: flex;
    justify-content: space-between;
    padding: 10px;
    background: #f9fafb;
    
    
    border-bottom: 2px solid #f0f0f0;
    transition: background 0.2s ease;

}

.data-item:hover {
    background: #f0f2f5;
}



.data-label {
    font-weight: 600;
    color: #333;
    font-size: 14px;
}

.data-value {
    color: #666;
    font-size: 14px;
    text-align: right;
}

/* ===================================
   TABS SECTION
   =================================== */
.tabs-section {
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    overflow: hidden;
}

.tabs-header {
    display: flex;
    border-bottom: 2px solid #f0f0f0;
}

.tab-btn {
    flex: 1;
    padding: 18px 24px;
    background: white;
    border: none;
    cursor: pointer;
    font-size: 16px;
    font-weight: 600;
    color: #666;
    transition: all 0.3s ease;
    position: relative;
}

.tab-btn:hover {
    background: #f9fafb;
}

.tab-btn.active {
    color: #22c55e;
}

.tab-btn.active::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, #22c55e 0%, #16a34a 100%);
}

.tabs-content {
    padding: 30px;
    position: relative;
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}

/* ===================================
   DATA TABLES
   =================================== */
.table-wrapper {
    overflow-x: auto;
    border-radius: 6px;
    border: 1px solid #e5e7eb;
}

.data-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}

.data-table thead {
    background: linear-gradient(135deg, #22c55e 0%, #16a34a 100%);
    color: white;
}

.data-table th {
    padding: 15px 12px;
    text-align: left;
    font-weight: 600;
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.data-table tbody tr {
    border-bottom: 1px solid #e5e7eb;
    transition: background-color 0.2s ease;
}

.data-table tbody tr:hover {
    background-color: #f9fafb;
}

.data-table tbody tr:last-child {
    border-bottom: none;
}

.data-table td {
    padding: 12px;
    color: #374151;
}

.data-table td.positive {
    color: #16a34a;
    font-weight: 600;
}

.data-table td.negative {
    color: #dc2626;
    font-weight: 600;
}

.error-text {
    color: #dc2626;
    text-align: center;
    padding: 20px;
    font-style: italic;
}

/* ===================================
   RESPONSIVE DESIGN
   =================================== */
@media (max-width: 1200px) {
    .main-content-grid {
        grid-template-columns: 1fr;
    }
    
    .chart-column {
        order: -1;
    }
}

@media (max-width: 768px) {
    .stock-detail-container {
        padding: 20px 10px;
    }
    
    .search-boxes {
        flex-direction: column;
    }
    
    .stock-header h1 {
        font-size: 24px;
    }
    
    .factsheet-grid {
        grid-template-columns: 1fr;
    }
    
    .chart-controls {
        flex-direction: column;
        align-items: stretch;
    }
    
    .chart-right-controls {
        justify-content: space-between;
    }
    
    .period-buttons {
        justify-content: center;
    }
    
    #price-chart {
        min-height: 300px;
    }
    
    .tabs-header {
        flex-direction: column;
    }
    
    .data-table {
        font-size: 12px;
    }
    
    .data-table th,
    .data-table td {
        padding: 10px 8px;
    }
}

@media (max-width: 480px) {
    .period-btn {
        padding: 6px 12px;
        font-size: 12px;
    }
    
    .data-table th:nth-child(3),
    .data-table td:nth-child(3) {
        display: none;
    }
}
/* Header with Button Container */
.header-with-button {
    display: flex;
    align-items: center;
    
    margin-bottom: 20px;
    
}

.header-with-button h1 {
    margin: 0;
}

/* Irregular Ticker Button Styles */
.ticker-button-container {
    display: flex;
    align-items: center;
    padding: 0;
}

.irregular-ticker-btn {
    position: relative;
    background: linear-gradient(135deg, #ebf3ee 0%, #16a34a 100%);
    border: none;
    padding: 0;
    cursor: pointer;
    outline: none;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    /* Irregular shape using clip-path */
    clip-path: polygon(
        8% 0%, 
        92% 3%, 
        97% 15%, 
        100% 50%, 
        95% 85%, 
        88% 97%, 
        12% 100%, 
        3% 88%, 
        0% 50%, 
        5% 12%
    );
    box-shadow: 0 4px 15px rgba(0, 123, 255, 0.3);
    width: 150px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.irregular-ticker-btn:hover {
    transform: scale(1.05);
    box-shadow: 0 6px 20px rgba(0, 123, 255, 0.5);
}

.irregular-ticker-btn:active {
    transform: scale(0.98);
}

.ticker-text {
    font-size: 20px;
    font-weight: bold;
    color: white;
    text-transform: uppercase;
    letter-spacing: 2px;
    z-index: 1;
    display: inline-block;
    line-height: 1;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .header-with-button {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }
    
    .irregular-ticker-btn {
        width: 130px;
        height: 50px;
    }
    
    .ticker-text {
        font-size: 16px;
        letter-spacing: 1.5px;
    }
}

/* subtle underline effect on ticker hover */
.companies-table tbody tr:hover td:first-child,
.data-table tbody tr:hover td:first-child {
    text-decoration: underline;
    color: #16a34a;
}

/* Underline effect for mover items*/
.mover-item:hover .mover-ticker {
    text-decoration: underline;
    color: #16a34a;
}

/* ===================================
   DATA SERVICES PAGE STYLES
   =================================== */

/* Data Services Hero */
.data-services-hero {
    background: linear-gradient(135deg, #22c55e 0%, #dc2626 100%);
    color: white;
    padding: 5rem 2rem;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.data-services-hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1440 320"><path fill="%23ffffff" fill-opacity="0.1" d="M0,96L48,112C96,128,192,160,288,160C384,160,480,128,576,122.7C672,117,768,139,864,138.7C960,139,1056,117,1152,106.7C1248,96,1344,96,1392,96L1440,96L1440,320L1392,320C1344,320,1248,320,1152,320C1056,320,960,320,864,320C768,320,672,320,576,320C480,320,384,320,288,320C192,320,96,320,48,320L0,320Z"></path></svg>') no-repeat bottom;
    background-size: cover;
}

.data-services-hero .hero-content {
    max-width: 900px;
    margin: 0 auto;
    position: relative;
    z-index: 1;
}

.data-services-hero h1 {
    font-size: 42px;
    margin-bottom: 1rem;
    font-weight: 700;
}

.data-services-hero p {
    font-size: 18px;
    margin-bottom: 0;
    opacity: 0.95;
    line-height: 1.6;
}

/* API Services Section */
.api-services-section {
    padding: 4rem 2rem;
    background: #fafafa;
}

.api-services-container {
    max-width: 1400px;
    margin: 0 auto;
}

.api-cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 2.5rem;
    margin-top: 2rem;
}

.api-card {
    background: white;
    padding: 2.5rem 2rem;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    position: relative;
    overflow: visible;
}

.api-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 8px 30px rgba(34, 197, 94, 0.2);
}

.api-icon {
    width: 80px;
    height: 80px;
    margin-bottom: 1.5rem;
}

.api-icon img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.api-card h3 {
    font-size: 22px;
    margin-bottom: 1rem;
    color: #333;
}

.api-card p {
    color: #666;
    line-height: 1.7;
    margin-bottom: 1.5rem;
    flex-grow: 1;
}

.api-features {
    list-style: none;
    padding: 0;
    margin: 0 0 2rem 0;
}

.api-features li {
    padding: 0.5rem 0;
    color: #555;
    font-size: 14px;
}

.api-cta-button {
    display: inline-block;
    background: linear-gradient(135deg, #22c55e 0%, #16a34a 100%);
    color: white;
    padding: 0.9rem 2rem;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    font-size: 16px;
    transition: all 0.3s ease;
    text-align: center;
    box-shadow: 0 4px 15px rgba(34, 197, 94, 0.3);
}

.api-cta-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(34, 197, 94, 0.4);
}

.api-cta-button.disabled {
    background: #ccc;
    cursor: not-allowed;
    box-shadow: none;
}

.api-cta-button.disabled:hover {
    transform: none;
    box-shadow: none;
}

/* API Documentation Section */
.api-documentation-section {
    padding: 4rem 2rem;
    background: white;
}

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

.doc-content {
    background: #f9fafb;
    padding: 3rem;
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

.doc-header {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-bottom: 2rem;
}

.doc-header img {
    height: 20px;
}

.doc-intro {
    font-size: 17px;
    color: #555;
    line-height: 1.8;
    margin-bottom: 2rem;
    padding: 1.5rem;
    background: white;
    border-left: 4px solid #22c55e;
    border-radius: 4px;
}

.doc-section {
    margin-bottom: 3rem;
}

.doc-section h3 {
    font-size: 26px;
    color: #333;
    margin-bottom: 1.5rem;
    padding-bottom: 0.5rem;
    border-bottom: 3px solid #22c55e;
}

.doc-section h4 {
    font-size: 20px;
    color: #444;
    margin: 1.5rem 0 1rem 0;
}

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

.doc-section ul li {
    padding: 0.6rem 0;
    color: #555;
    line-height: 1.7;
}

.doc-section a {
    color: #22c55e;
    text-decoration: none;
    font-weight: 600;
}

.doc-section a:hover {
    text-decoration: underline;
}

.markets-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1rem;
    margin-top: 1.5rem;
}

.market-item {
    background: white;
    padding: 1rem;
    border-radius: 6px;
    border-left: 3px solid #22c55e;
    font-size: 14px;
    color: #555;
}

.market-item strong {
    color: #22c55e;
    font-family: monospace;
    font-size: 15px;
}

.market-note {
    margin-top: 1rem;
    font-size: 13px;
    color: #666;
    font-style: italic;
}

pre {
    background: #2d3748;
    color: #f7fafc;
    padding: 1.5rem;
    border-radius: 8px;
    overflow-x: auto;
    font-size: 14px;
    line-height: 1.6;
}

code {
    font-family: 'Courier New', monospace;
}

.endpoint-list {
    background: white;
    padding: 1.5rem;
    border-radius: 6px;
}

.endpoint-list li {
    padding: 0.8rem 0;
    border-bottom: 1px solid #f0f0f0;
}

.endpoint-list li:last-child {
    border-bottom: none;
}

.endpoint-list code {
    background: #f0f0f0;
    padding: 0.3rem 0.6rem;
    border-radius: 4px;
    color: #dc2626;
    font-size: 13px;
}

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

.use-case {
    background: white;
    padding: 1.5rem;
    border-radius: 8px;
    border-top: 3px solid #22c55e;
    transition: transform 0.3s ease;
}

.use-case:hover {
    transform: translateY(-5px);
}

.use-case h4 {
    font-size: 18px;
    color: #333;
    margin: 0 0 0.8rem 0;
}

.use-case p {
    color: #666;
    font-size: 14px;
    line-height: 1.6;
    margin: 0;
}

.cta-section {
    background: linear-gradient(135deg, #22c55e 0%, #16a34a 100%);
    color: white;
    padding: 3rem;
    border-radius: 12px;
    text-align: center;
    margin-top: 3rem;
}

.cta-section h3 {
    color: white;
    border-bottom: 3px solid rgba(255,255,255,0.3);
    font-size: 28px;
}

.cta-section p {
    font-size: 17px;
    margin-bottom: 2rem;
    opacity: 0.95;
}

.doc-cta-button {
    display: inline-block;
    background: white;
    color: #22c55e;
    padding: 1rem 2.5rem;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 600;
    font-size: 18px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
}

.doc-cta-button:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(0,0,0,0.3);
    color: #16a34a;
}

/* Responsive Design */
@media (max-width: 768px) {
    .data-services-hero h1 {
        font-size: 28px;
    }

    .data-services-hero p {
        font-size: 16px;
    }

    .api-cards-grid {
        grid-template-columns: 1fr;
    }

    .doc-content {
        padding: 1.5rem;
    }

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

    .use-cases-grid {
        grid-template-columns: 1fr;
    }
}