/* assets/css/main.css - UPDATED */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');

body {
    font-family: 'Inter', sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f8f9fa;
    margin: 0;
    padding: 0;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
}

/* Header Styles (keep as is) */
.main-header {
    background-color: #fff;
    padding: 15px 0;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    position: relative;
    z-index: 1000;
    transition: all 0.3s ease-in-out;
}
.main-header.sticky {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    background-color: #f8f9fa;
    padding: 10px 0;
    box-shadow: 0 5px 10px rgba(0,0,0,0.2);
    animation: slideDown 0.5s ease-out;
}
@keyframes slideDown {
    0% { transform: translateY(-100%); opacity: 0; }
    100% { transform: translateY(0); opacity: 1; }
}
#sticky-navbar-placeholder {
    height: 0;
    display: block;
}
.main-header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.logo img {
    height: 50px; /* Adjust logo size */
    width: auto;
}
.main-nav ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    align-items: center;
}
.main-nav ul li {
    margin-left: 25px;
    position: relative; /* For dropdown */
}
.main-nav ul li a {
    text-decoration: none;
    color: #555;
    font-weight: 500;
    padding: 8px 0;
    transition: color 0.3s ease;
}
.main-nav ul li a:hover,
.main-nav ul li a.active {
    color: #007bff; /* Primary color for active/hover */
}
.main-nav ul li .btn {
    padding: 8px 15px;
    border-radius: 5px;
    font-weight: 600;
}

/* Navbar dropdowns */
.main-nav .dropdown {
    position: relative;
}
.main-nav .dropdown-menu {
    display: none;
    position: absolute;
    background-color: #fff;
    min-width: 180px; /* Increased width for better readability */
    box-shadow: 0px 8px 16px 0px rgba(0,0,0,0.2);
    z-index: 1;
    list-style: none;
    padding: 10px 0;
    border-radius: 8px; /* More rounded corners */
    left: 0;
    top: 100%; /* Position below the parent link */
    margin-top: 10px; /* Space between parent and dropdown */
    border: 1px solid #eee;
}
.main-nav .dropdown-menu li a {
    color: #333;
    padding: 10px 20px; /* Increased padding */
    text-decoration: none;
    display: block;
    text-align: left;
    white-space: nowrap;
    transition: background-color 0.2s ease, color 0.2s ease;
}
.main-nav .dropdown-menu li a:hover {
    background-color: #f1f1f1;
    color: #007bff;
}
.main-nav .dropdown:hover .dropdown-menu {
    display: block;
    animation: fadeIn 0.3s ease-in-out;
}
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Mobile Responsive Navigation */
.menu-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 10px;
}
.menu-toggle .bar {
    display: block;
    width: 25px;
    height: 3px;
    background-color: #333;
    margin: 5px 0;
    transition: 0.4s;
}

@media (max-width: 991px) { /* Adjust breakpoint for navbar collapse */
    .main-nav ul {
        display: none;
        flex-direction: column;
        width: 100%;
        background-color: #fff;
        position: absolute;
        top: 100%;
        left: 0;
        box-shadow: 0 8px 16px rgba(0,0,0,0.2);
        border-top: 1px solid #eee;
    }
    .main-nav ul.active {
        display: flex;
    }
    .main-nav ul li {
        margin: 0;
        width: 100%;
        text-align: center;
        border-bottom: 1px solid #f8f9fa;
    }
    .main-nav ul li:last-child {
        border-bottom: none;
    }
    .main-nav ul li a {
        padding: 15px 0;
        display: block;
    }
    .main-nav .dropdown-menu {
        position: static;
        box-shadow: none;
        width: 100%;
        padding: 0;
        border: none;
        border-radius: 0;
    }
    .main-nav .dropdown-menu li a {
        padding-left: 40px; /* Indent sub-items */
        background-color: #f9f9f9;
        font-size: 0.95em;
    }
    .menu-toggle {
        display: block;
    }
    .main-header .logo {
        flex-grow: 1; /* Allow logo to take space */
    }
}


/* General Section Styles */
section {
    margin-bottom: 40px;
    padding: 20px;
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.05);
}

h1, h2, h3, h4, h5, h6 {
    color: #333;
    font-weight: 600;
}

.lead {
    font-size: 1.15rem;
    font-weight: 300;
}

/* Buttons */
.btn-primary {
    background-color: #007bff;
    border-color: #007bff;
    transition: background-color 0.3s ease, border-color 0.3s ease, transform 0.2s ease;
}
.btn-primary:hover {
    background-color: #0056b3;
    border-color: #0056b3;
    transform: translateY(-2px);
}
.btn-outline-primary {
    color: #007bff;
    border-color: #007bff;
    transition: all 0.3s ease;
}
.btn-outline-primary:hover {
    background-color: #007bff;
    color: #fff;
}
.btn-secondary {
    background-color: #6c757d;
    border-color: #6c757d;
    transition: all 0.3s ease;
}
.btn-secondary:hover {
    background-color: #5a6268;
    border-color: #545b62;
}
.btn-info {
    background-color: #17a2b8;
    border-color: #17a2b8;
    transition: all 0.3s ease;
}
.btn-info:hover {
    background-color: #138496;
    border-color: #117a8b;
}
.btn-success {
    background-color: #28a745;
    border-color: #28a745;
    transition: all 0.3s ease;
}
.btn-success:hover {
    background-color: #218838;
    border-color: #1e7e34;
}
.btn-warning {
    background-color: #ffc107;
    border-color: #ffc107;
    color: #333; /* Ensure text is visible */
    transition: all 0.3s ease;
}
.btn-warning:hover {
    background-color: #e0a800;
    border-color: #d39e00;
}

/* Card Styles */
.card {
    border: none;
    border-radius: 8px;
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.1);
}
.card-img-top {
    height: 200px; /* Fixed height for consistency */
    object-fit: cover;
    border-top-left-radius: 8px;
    border-top-right-radius: 8px;
}
.card-body {
    padding: 20px;
}
.card-title {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 10px;
}
.card-text {
    font-size: 0.95rem;
    color: #666;
}

/* Hero Section Specific */
.hero-section {
    background: linear-gradient(45deg, #007bff, #00c6ff);
    color: #fff;
    padding: 80px 20px;
    border-radius: 15px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.2);
    animation: scaleIn 0.8s ease-out;
}
@keyframes scaleIn {
    0% { transform: scale(0.9); opacity: 0; }
    100% { transform: scale(1); opacity: 1; }
}
.hero-section .btn-lg {
    padding: 12px 30px;
    font-size: 1.1rem;
    border-radius: 30px;
}
.hero-section .btn-outline-secondary {
    border-color: rgba(255,255,255,0.5);
    color: #fff;
}
.hero-section .btn-outline-secondary:hover {
    background-color: #fff;
    color: #007bff;
}

/* Featured Database Section */
.featured-database-section {
    background-color: #e9f7ff; /* Light blue background */
    border: 1px solid #cce7ff;
}
.featured-database-section .card {
    background-color: #fff;
    border: 1px solid #e0e0e0;
}
.featured-database-section .card-title {
    color: #333;
}

/* Testimonials Section */
.testimonials-section {
    background: linear-gradient(45deg, #0056b3, #007bff); /* Darker blue gradient */
    color: #fff;
    border-radius: 15px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.2);
}
.testimonials-section .carousel-item p {
    font-size: 1.2rem;
}
.testimonials-section .carousel-control-prev-icon,
.testimonials-section .carousel-control-next-icon {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='%23fff'%3e%3cpath d='M11.354 1.646a.5.5 0 0 1 0 .708L5.707 8l5.647 5.646a.5.5 0 0 1-.708.708l-6-6a.5.5 0 0 1 0-.708l6-6a.5.5 0 0 1 .708 0z'/%3e%3c/svg%3e");
}

/* Filters Section */
.filters-section {
    background-color: #f0f8ff; /* Lighter background for filters */
    border: 1px solid #d0e7ff;
}
.filters-section .form-label {
    font-weight: 500;
    color: #555;
}

/* Download Data Section */
.download-data-section {
    background: linear-gradient(45deg, #28a745, #20c997); /* Green gradient */
    color: #fff;
    border-radius: 15px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.2);
}
.download-data-section .btn-warning {
    background-color: #ffc107;
    border-color: #ffc107;
    color: #333;
}
.download-data-section .btn-warning:hover {
    background-color: #e0a800;
    border-color: #d39e00;
}
.download-data-section .btn-outline-light {
    border-color: rgba(255,255,255,0.5);
    color: #fff;
}
.download-data-section .btn-outline-light:hover {
    background-color: #fff;
    color: #28a745;
}


/* Footer Styles - MODIFIED */
.main-footer {
    background-color: #222;
    color: #ccc;
    padding: 40px 0;
    font-size: 0.9em;
}
/* Removed these conflicting flexbox rules, let Bootstrap's grid handle it */
/*
.main-footer .container {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 20px;
}
.footer-section {
    flex: 1;
    min-width: 200px;
}
*/
.footer-section h3 {
    color: #fff;
    margin-bottom: 20px;
    font-size: 1.1em;
    position: relative;
}
.footer-section h3::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: -5px;
    width: 40px;
    height: 2px;
    background-color: #007bff;
}
.footer-section ul {
    list-style: none; /* Keep this for ul, as .list-unstyled is Bootstrap specific */
    padding: 0;
}
.footer-section ul li a {
    color: #ccc;
    text-decoration: none;
    padding: 5px 0;
    display: block;
    transition: color 0.3s ease;
}
.footer-section ul li a:hover {
    color: #007bff;
}
.social-links a {
    color: #ccc;
    font-size: 1.2em;
    /* margin-right: 15px; -- Removed, using Bootstrap's me-2 now */
    transition: color 0.3s ease;
}
.social-links a:hover {
    color: #007bff;
}
.contact-info p {
    display: flex;
    align-items: center;
    margin-bottom: 5px; /* Added some margin for contact info lines */
}
.contact-info p i {
    margin-right: 10px;
    color: #007bff;
}
.footer-bottom {
    width: 100%;
    text-align: center;
    border-top: 1px solid #333;
    padding-top: 20px;
    margin-top: 30px;
    color: #aaa;
}

@media (max-width: 767.98px) { /* Adjust breakpoint for medium devices or smaller */
    .main-footer .container .row > div { /* Target the columns directly within the footer row */
        text-align: center; /* Center content on small screens */
    }
    .footer-section h3::after {
        left: 50%;
        transform: translateX(-50%);
    }
    .contact-info p {
        justify-content: center; /* Center contact info icons and text */
    }
    .social-links {
        text-align: center; /* Ensure social links are centered */
    }
    .social-links a {
        margin: 0 7px; /* Add margin to center links better */
    }
    .hero-section {
        padding: 50px 15px;
    }
    .hero-section h1 {
        font-size: 2.5rem;
    }
    .hero-section .btn-lg {
        width: 100%;
        margin-bottom: 15px;
    }
    .ad-banners-section .card-img-top {
        height: 180px;
    }
    .card-title {
        font-size: 1.1rem;
    }
    .card-text {
        font-size: 0.9rem;
    }
    .testimonials-section .carousel-item p {
        font-size: 1rem;
    }
    .filters-section .col-md-4,
    .filters-section .col-md-2 {
        flex: 0 0 100%;
        max-width: 100%;
    }
    .filters-section .btn {
        margin-top: 10px;
    }
}

/* Basic Bootstrap overrides/enhancements */
.rounded-lg {
    border-radius: 0.5rem !important; /* Larger border-radius for sections */
}
.rounded-top-lg {
    border-top-left-radius: 0.5rem !important;
    border-top-right-radius: 0.5rem !important;
}
.shadow-sm {
    box-shadow: 0 .125rem .25rem rgba(0,0,0,.075)!important;
}
.shadow-lg {
    box-shadow: 0 1rem 3rem rgba(0,0,0,.175)!important;
}
.bg-gradient-primary {
    background: linear-gradient(45deg, #007bff, #00c6ff);
}
/* Add more gradient classes if needed for other sections */