:root {
    --bg-color: #f8fafc;
    --card-bg: #ffffff;
    --card-border: #e2e8f0;
    --primary-color: #3b82f6;
    --secondary-color: #8b5cf6;
    --accent-color: #06b6d4;
    --text-color: #1e293b;
    --text-muted: #64748b;
    --font-main: 'Outfit', sans-serif;
    --gradient-main: linear-gradient(135deg, #3b82f6 0%, #8b5cf6 100%);
    --glass-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --header-bg: rgba(255, 255, 255, 0.8);
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: var(--font-main);
    background-color: var(--bg-color);
    color: var(--text-color);
    line-height: 1.6;
    overflow-x: hidden;
}

a {
    text-decoration: none;
    color: inherit;
    transition: all 0.3s ease;
}

ul {
    list-style: none;
}

/* Header */
header {
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 1000;
    background: var(--header-bg);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--card-border);
    padding: 1rem 0;
}

.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

.navbar-brand img {
    height: 50px;
}

.nav-menu {
    display: flex;
    gap: 2rem;
    align-items: center;
}

.nav-link {
    font-weight: 500;
    color: var(--text-color);
    font-size: 1rem;
}

.nav-link:hover {
    color: var(--accent-color);
}

.btn {
    padding: 0.75rem 1.5rem;
    border-radius: 50px;
    font-weight: 600;
    cursor: pointer;
    display: inline-block;
    border: none;
    transition: transform 0.2s, box-shadow 0.2s;
}

.btn-primary {
    background: var(--gradient-main);
    color: white;
    box-shadow: 0 4px 15px rgba(59, 130, 246, 0.4);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(59, 130, 246, 0.6);
}

/* Hero Section */
.hero {
    padding: 160px 0 80px;
    text-align: center;
    background: radial-gradient(circle at top center, rgba(59, 130, 246, 0.1), transparent 70%);
}

.blog-detail-page .hero {
    background: var(--gradient-main);
    padding: 80px 0 30px;
    margin-bottom: 0;
    text-align: center;
}

.blog-detail-page .hero h1 {
    color: #ffffff !important;
    background: none;
    -webkit-text-fill-color: #ffffff !important;
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.blog-detail-page .hero .meta {
    color: #ffffff !important;
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
    opacity: 1 !important;
    font-weight: 500;
}

.blog-detail-page .hero .meta * {
    color: #ffffff !important;
}

/* Explore Detail Hero Styles */
.hero-section.small-hero {
    background: var(--gradient-main);
    padding: 80px 0 30px;
    /* Reduced from 100/40 */
    color: white;
    text-align: center;
}

.hero-section.small-hero h1 {
    color: white;
    font-size: 2.25rem;
    margin-bottom: 0.5rem;
}

.hero-section.small-hero p {
    color: rgba(255, 255, 255, 0.9);
    font-size: 1rem;
}

.hero h1 {
    font-size: 3.5rem;
    font-weight: 800;
    margin-bottom: 1.5rem;
    background: linear-gradient(to right, #1e293b, #64748b);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    line-height: 1.2;
}

.hero p {
    font-size: 1.25rem;
    color: var(--text-muted);
    max-width: 600px;
    margin: 0 auto 2.5rem;
}

/* Section Titles */
.section-title {
    text-align: center;
    margin-bottom: 3rem;
    font-size: 2.5rem;
    font-weight: 700;
}

.categories-section {
    padding: 60px 0;
    width: 100%;
    overflow: visible;
    /* Allow nav buttons to show */
}

.categories-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
    padding: 0 1.5rem;
    overflow: visible !important;
}

/* Slider Overrides - When owl-carousel is used, remove grid */
.owl-carousel.categories-grid {
    display: block !important;
}

.owl-carousel .item {
    padding: 10px;
}

.category-card {
    position: relative;
    border-radius: 16px;
    overflow: hidden;
    height: 200px;
    cursor: pointer;
}

.category-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.category-card:hover img {
    transform: scale(1.1);
}

.category-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.8), transparent);
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: 1.5rem;
}

.category-title {
    color: white;
    font-size: 1.25rem;
    font-weight: 600;
}

/* Owl Carousel Nav Styling */
.owl-theme .owl-nav {
    margin-top: 0;
}

.owl-theme .owl-nav [class*='owl-'] {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 45px;
    height: 45px;
    line-height: 45px;
    background: white !important;
    border-radius: 50% !important;
    color: var(--primary-color) !important;
    font-size: 18px !important;
    margin: 0 !important;
    padding: 0 !important;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    transition: all 0.3s ease !important;
    display: flex;
    align-items: center;
    justify-content: center;
}

.owl-theme .owl-nav .owl-prev {
    left: -25px;
}

.owl-theme .owl-nav .owl-next {
    right: -25px;
}

.owl-theme .owl-nav [class*='owl-']:hover {
    background: #2563eb !important;
    /* Darker blue on hover */
    color: white !important;
    transform: translateY(-50%) scale(1.1);
}

@media (max-width: 1200px) {
    .owl-theme .owl-nav .owl-prev {
        left: 0;
    }

    .owl-theme .owl-nav .owl-next {
        right: 0;
    }
}

/* Companies List */
.companies-section {
    padding: 60px 0;
    background: var(--bg-color);
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

.company-card {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    /* backdrop-filter: blur(10px); No longer needed for solid bg */
    border-radius: 16px;
    padding: 2rem;
    margin-bottom: 2rem;
    display: flex;
    gap: 2rem;
    transition: transform 0.3s, box-shadow 0.3s;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    /* Subtle shadow for light mode */
}

.company-card:hover {
    transform: translateY(-5px);
    border-color: var(--primary-color);
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

.company-logo {
    flex: 0 0 200px;
    height: 200px;
    background: white;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    overflow: hidden;
}

.company-logo img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.company-info {
    flex: 1;
}

.company-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.company-name {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--primary-color);
}

.company-details-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.5rem;
    margin-bottom: 1.5rem;
    background: #f1f5f9;
    /* Light gray background */
    padding: 1rem;
    border-radius: 8px;
}

.detail-item strong {
    display: block;
    font-size: 0.9rem;
    color: var(--text-muted);
    margin-bottom: 0.25rem;
}

.detail-item span {
    font-size: 1.1rem;
    font-weight: 600;
}

.company-actions {
    display: flex;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.btn-outline {
    background: transparent;
    border: 2px solid var(--primary-color);
    color: var(--primary-color);
}

.btn-outline:hover {
    background: var(--primary-color);
    color: white;
}

.services-list {
    display: flex;
    gap: 1rem;
    align-items: center;
}

.service-icon {
    width: 40px;
    height: 40px;
    background: #f1f5f9;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.service-icon img {
    width: 24px;
    height: 24px;
}

/* Footer */
footer {
    background: #1e293b;
    /* Dark footer adds nice contrast even in light theme */
    padding: 60px 0 20px;
    margin-top: 80px;
    color: #f1f5f9;
}

.footer-content {
    display: flex;
    justify-content: space-between;
    margin-bottom: 3rem;
    flex-wrap: wrap;
    gap: 2rem;
}

.footer-brand p {
    width: 300px;
    color: var(--text-muted);
    font-size: 0.9rem;
    margin-top: 1rem;
}

.social-links {
    display: flex;
    gap: 1rem;
}

.social-btn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.3s;
}

.social-btn:hover {
    background: var(--primary-color);
}

.copyright {
    text-align: center;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: 20px;
    color: #94a3b8;
    /* Explicit light grey for footer text */
    font-size: 0.9rem;
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(5px);
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.modal.show {
    display: flex;
    opacity: 1;
}

.modal-content {
    background: #ffffff;
    border: 1px solid var(--card-border);
    border-radius: 16px;
    padding: 2.5rem;
    width: 90%;
    max-width: 600px;
    position: relative;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    transform: translateY(20px);
    transition: transform 0.3s ease;
}

.modal.show .modal-content {
    transform: translateY(0);
}

.close-btn {
    position: absolute;
    top: 1.5rem;
    right: 1.5rem;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--text-muted);
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
}

.form-label.required::after {
    content: "*";
    color: #ef4444;
    margin-left: 4px;
}

.form-control {
    width: 100%;
    padding: 0.75rem 1rem;
    border-radius: 8px;
    border: 1px solid #cbd5e1;
    background: #f8fafc;
    color: #1e293b;
    font-family: inherit;
    transition: border-color 0.3s;
}

.form-control:focus {
    outline: none;
    border-color: var(--primary-color);
}

/* Responsiveness */
@media (max-width: 768px) {
    .hero h1 {
        font-size: 2.5rem;
    }

    .navbar-toggler {
        display: block;
    }

    .nav-menu {
        display: none;
        /* Add mobile menu logic later if needed */
    }

    .company-card {
        flex-direction: column;
    }

    .company-logo {
        width: 100%;
        height: 150px;
    }

    .company-details-grid {
        grid-template-columns: 1fr 1fr;
    }
}

/* Blog Section */
.blog-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    padding: 2rem 0;
}

.blog-card {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: 12px;
    overflow: hidden;
    transition: transform 0.3s ease;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.blog-card:hover {
    transform: translateY(-5px);
    border-color: var(--secondary-color);
}

.blog-card-content {
    padding: 1.5rem;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.blog-meta {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-bottom: 0.5rem;
}

.blog-title {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 1rem;
    line-height: 1.4;
    color: var(--text-color);
}

.blog-excerpt {
    color: var(--text-muted);
    font-size: 0.95rem;
    margin-bottom: 1.5rem;
    flex-grow: 1;
}

.read-more {
    font-weight: 600;
    color: var(--primary-color);
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.read-more:hover {
    gap: 0.75rem;
}

/* Page Content (Write For Us, Blog Details) */
.page-container {
    padding: 120px 0 80px;
    /* Offset for fixed header */
}

.page-content {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: 16px;
    padding: 3rem;
    margin-top: 2rem;
}

.page-content h2,
.page-content h3,
.page-content h4 {
    color: var(--text-color);
    margin-top: 2rem;
    margin-bottom: 1rem;
}

.page-content p {
    color: var(--text-muted);
    margin-bottom: 1.5rem;
    line-height: 1.8;
}

.page-content ul {
    list-style: disc;
    margin-left: 1.5rem;
    margin-bottom: 1.5rem;
    color: var(--text-muted);
}

.page-content ul li {
    margin-bottom: 0.5rem;
}

/* Blog Details Specific */
.blog-header {
    text-align: center;
    margin-bottom: 3rem;
}

.blog-header h1 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.blog-header .meta {
    color: var(--accent-color);
    font-weight: 500;
}

/* Sitemap */
.sitemap-list {
    column-count: 2;
    column-gap: 4rem;
}

.sitemap-list li {
    margin-bottom: 0.75rem;
}

.sitemap-list a {
    color: var(--text-muted);
    font-size: 1.1rem;
}

.sitemap-list a:hover {
    color: var(--primary-color);
    padding-left: 5px;
}

@media (max-width: 768px) {
    .sitemap-list {
        column-count: 1;
    }
}

/* Trending Apps Section */
.trending-apps-section {
    padding: 60px 0;
    max-width: 1200px;
    margin: 0 auto;
}

.trending-apps-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 1.5rem;
}

.trending-app-card {
    background: #000;
    border-radius: 12px;
    overflow: hidden;
    position: relative;
    height: 300px;
}

.trending-app-card img.app-bg {
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.6;
    transition: transform 0.3s ease;
}

.trending-app-card:hover img.app-bg {
    transform: scale(1.05);
}

.trending-app-content {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    padding: 1.5rem;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.9), transparent);
    color: white;
}

.trending-app-icon {
    width: 50px;
    height: 50px;
    margin-bottom: 0.5rem;
    border-radius: 10px;
}

.trending-app-title {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: white;
}

.trending-app-desc {
    font-size: 0.9rem;
    margin-bottom: 1rem;
    opacity: 0.9;
    color: #cbd5e1;
}

.app-store-buttons {
    display: flex;
    gap: 0.5rem;
}

.app-store-btn img {
    height: 35px;
}

/* Blog Sidebar Layout */
.blog-layout {
    display: grid;
    grid-template-columns: 350px 1fr;
    gap: 3rem;
    align-items: start;
    max-width: 1200px;
    /* Constrain width */
    margin: 0 auto;
    /* Center container */
}

.blog-sidebar {
    background: white;
    padding: 1.5rem;
    border-radius: 12px;
    border: 1px solid var(--card-border);
    position: sticky;
    top: 100px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
    /* Added shadow for better definition */
}

.sidebar-title {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--card-border);
}

.sidebar-post {
    display: flex;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.sidebar-post img {
    width: 80px;
    height: 60px;
    object-fit: cover;
    border-radius: 6px;
}

.sidebar-post-content h4 {
    font-size: 0.95rem;
    line-height: 1.3;
    margin-bottom: 0.25rem;
}

.sidebar-post-content h4 a {
    color: var(--text-color);
}

.sidebar-post-content h4 a:hover {
    color: var(--primary-color);
}

.sidebar-post-date {
    font-size: 0.8rem;
    color: var(--text-muted);
}

@media (max-width: 992px) {
    .blog-layout {
        grid-template-columns: 1fr;
    }

    .blog-sidebar {
        order: 2;
        /* Move to bottom on mobile if desired, or keep top */
        position: static;
    }
}

/* Company Details Page Specific */
.company-details-header {
    background: var(--gradient-main);
    padding: 160px 0 60px;
    color: white;
}

.company-header-grid {
    display: flex;
    gap: 3rem;
    align-items: center;
}

.company-detail-logo {
    width: 200px;
    height: 200px;
    background: white;
    padding: 1rem;
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.company-detail-logo img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.company-header-info h1 {
    font-size: 3rem;
    margin-bottom: 0.5rem;
}

/* Explore Listing Header Image */
.explore-header-image {
    width: 100%;
    max-width: 1000px;
    height: 450px;
    margin: 40px auto;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: var(--glass-shadow);
}

.explore-header-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.hero-section.small-hero {
    padding: 140px 0 60px;
    background: var(--gradient-main);
    color: white;
    text-align: center;
}

.hero-section.small-hero h1 {
    font-size: 2.5rem;
    font-weight: 800;
    margin-bottom: 1rem;
    color: white;
    -webkit-text-fill-color: white;
}

.hero-section.small-hero p {
    font-size: 1.1rem;
    opacity: 0.9;
}

.company-header-info .meta-info {
    display: flex;
    gap: 1.5rem;
    margin-top: 1rem;
}

.meta-link {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: rgba(255, 255, 255, 0.1);
    padding: 0.5rem 1rem;
    border-radius: 50px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    font-weight: 500;
}

.meta-link:hover {
    background: rgba(255, 255, 255, 0.2);
}

.detail-section {
    background: white;
    border-radius: 20px;
    padding: 2.5rem;
    border: 1px solid var(--card-border);
    margin-bottom: 2rem;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
}

.detail-section h2 {
    font-size: 1.75rem;
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.detail-section h2::before {
    content: '';
    display: block;
    width: 5px;
    height: 25px;
    background: var(--primary-color);
    border-radius: 5px;
}

.service-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.service-chip {
    background: #f1f5f9;
    padding: 0.5rem 1.25rem;
    border-radius: 50px;
    font-weight: 500;
    font-size: 0.95rem;
    color: var(--text-color);
    border: 1px solid var(--card-border);
    transition: all 0.3s ease;
}

.service-chip:hover {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

/* Rating Circles */
.rating-group {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
    gap: 1rem;
    margin: 2rem 0;
}

.rating-circle-item {
    text-align: center;
}

.rating-svg-container {
    position: relative;
    width: 80px;
    height: 80px;
    margin: 0 auto 0.5rem;
}

.rating-svg-container svg {
    width: 100%;
    height: 100%;
    transform: rotate(-90deg);
}

.rating-svg-container circle {
    fill: none;
    stroke-width: 6;
    stroke-linecap: round;
}

.rating-svg-container .bg-circle {
    stroke: #f1f5f9;
}

.rating-svg-container .progress-circle {
    stroke: var(--primary-color);
    stroke-dasharray: 251.2;
    /* 2 * PI * 40 */
    stroke-dashoffset: 251.2;
    transition: stroke-dashoffset 1s ease-out;
}

.rating-value {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1.2rem;
}

.rating-label {
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--text-muted);
}

/* Review Cards */
.review-card {
    background: #f8fafc;
    border-radius: 12px;
    padding: 2rem;
    margin-bottom: 2rem;
    border: 1px solid var(--card-border);
}

.review-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 1.5rem;
}

.reviewer-info h4 {
    font-size: 1.1rem;
    margin-bottom: 0.25rem;
}

.review-date {
    font-size: 0.9rem;
    color: var(--text-muted);
}

.review-text {
    font-size: 1.05rem;
    line-height: 1.7;
    margin-bottom: 1.5rem;
    color: var(--text-color);
}

.review-stats {
    display: flex;
    gap: 2rem;
    flex-wrap: wrap;
    padding-top: 1.5rem;
    border-top: 1px solid var(--card-border);
}

.stat-item {
    display: flex;
    flex-direction: column;
}

.stat-label {
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-muted);
}

.stat-value {
    font-weight: 600;
    font-size: 1.1rem;
}

@media (max-width: 768px) {
    .company-header-grid {
        flex-direction: column;
        text-align: center;
    }

    .company-header-info .meta-info {
        flex-direction: column;
        align-items: center;
    }
}