: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: var(--tw-font, 'Plus Jakarta Sans', 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;
}

img {
    max-width: 100%;
    height: auto;
}

h1,
h2,
h3,
h4,
h5,
h6 {
    overflow-wrap: break-word;
    word-wrap: break-word;
    hyphens: auto;
}

html,
body {
    overflow-x: hidden;
    width: 100%;
    margin: 0;
    padding: 0;
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-main);
    background-color: var(--bg-color);
    color: var(--text-color);
    line-height: 1.6;
}

.page {
    width: 100%;
    overflow-x: hidden;
}

a {
    text-decoration: none;
    color: inherit;
    transition: all 0.3s ease;
}

ul {
    list-style: none;
}

/* Header */
header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    width: 100%;
    z-index: 1000;
    background: var(--header-bg);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--card-border);
    padding: 0.9rem 0;
}

.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1.5rem;
    flex-wrap: nowrap;
}

.navbar-brand img {
    height: 50px;
}

.nav-menu {
    display: flex;
    gap: 1rem;
    align-items: center;
    flex-wrap: nowrap;
}

@media (max-width: 1300px) {
    .nav-menu { gap: 0.6rem; }
    .navbar { padding: 0 1rem; }
    .navbar-brand img { height: 40px; }
}

.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 Sections */
.hero {
    padding: 160px 0 80px;
    text-align: center;
    background: radial-gradient(circle at top center, rgba(59, 130, 246, 0.1), transparent 70%);
}

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

.categories-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
    padding: 0 1.5rem;
    overflow: visible !important;
}

/* Explore list: keep exactly 3 cards per row on desktop */
.explore-page #explore_list.categories-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

/* Slider Overrides - When owl-carousel is used, remove grid */
.owl-carousel.categories-grid {
    display: block !important;
}

.owl-carousel .item {
    padding: 10px;
    width: 100%;
}

.category-card {
    display: block;
    width: 100%;
    position: relative;
    border-radius: 16px;
    overflow: hidden;
    height: 250px;
    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.1rem;
    font-weight: 600;
    line-height: 1.4;
    overflow-wrap: break-word;
    word-break: normal;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

/* 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: flex-start;
    gap: 0.75rem;
    margin-bottom: 1rem;
    flex-wrap: wrap;
}

.company-name {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--primary-color);
    flex: 1;
    min-width: 0;
    word-break: break-word;
}

.company-badges {
    flex-shrink: 0;
}

.badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 0.78rem;
    font-weight: 600;
    white-space: nowrap;
}

.company-details-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1rem;
    margin-bottom: 1.5rem;
    background: #f1f5f9;
    padding: 1rem;
    border-radius: 8px;
}

.company-details-grid .detail-item-contact {
    grid-column: 1 / -1;
    border-top: 1px solid #e2e8f0;
    padding-top: 0.6rem;
    margin-top: 0.1rem;
}

.company-printing-details-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
    margin-bottom: 1.5rem;
    margin-top: 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;
}

.company-contact-link {
    font-size: 1.1rem;
    font-weight: 600;
    color: #334155;
    text-decoration: none;
    margin-right: 1.5rem;
    white-space: nowrap;
}

.company-contact-link i {
    color: var(--primary-color);
    margin-right: 3px;
}

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

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

/* Company About Dropdown */
.company-about-toggle {
    margin-top: 1rem;
}

.company-about-btn {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    background: #f1f6ff;
    color: var(--text-color);
    padding: 0.65rem 1.1rem;
    border: none;
    border-radius: 12px;
    font-size: 0.9rem;
    font-weight: 600;
    font-family: inherit;
    text-align: left;
    text-decoration: none;
    cursor: pointer;
    transition: background 0.2s ease, color 0.2s ease;
}

.company-about-btn:hover {
    background: #e0ebff;
    color: var(--primary-color);
}

.company-about-chevron {
    color: var(--primary-color);
    font-size: 0.8rem;
    transition: transform 0.3s ease;
}

.company-about-btn[aria-expanded="true"] .company-about-chevron {
    transform: rotate(180deg);
}

.company-about-body {
    max-height: 0;
    overflow: hidden;
    padding: 0 1.1rem;
    color: var(--text-muted);
    font-size: 0.9rem;
    line-height: 1.6;
    transition: max-height 0.3s ease, padding 0.3s ease;
}

.company-about-body.show {
    max-height: 600px;
    padding: 0.9rem 1.1rem 0.2rem;
}

/* 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: 1150px) {
    .hero h1 {
        font-size: 2.5rem;
    }

    .navbar-toggler {
        display: block;
    }

    .nav-menu {
        display: none;
    }

    .company-card {
        flex-direction: column;
    }

    .company-logo {
        width: 100%;
        height: 150px;
    }

    .company-details-grid {
        grid-template-columns: 1fr 1fr;
    }

    .company-printing-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 */
}

/* Blog listing uses a hero above; remove extra top offset */
.blog-page .page-container {
    padding-top: 28px;
}

.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: 1150px) {
    .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;
}

/* Pagination Stylings */
.pagination {
    display: inline-flex;
    gap: 0.5rem;
    list-style: none;
    padding: 0;
    margin: 0;
}

.page-item {
    display: inline-block;
}

.page-link {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0.75rem 1.25rem;
    min-width: 45px;
    height: 45px;
    background: white;
    border: 1px solid var(--card-border);
    border-radius: 10px;
    color: var(--text-color);
    font-weight: 600;
    font-size: 0.95rem;
    transition: all 0.3s ease;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.page-link:hover {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.25);
}

.page-item.active .page-link {
    background: var(--gradient-main) !important;
    color: white;
    border-color: transparent;
    box-shadow: 0 4px 15px rgba(59, 130, 246, 0.4);
}

.page-item:first-child .page-link,
.page-item:last-child .page-link {
    background: #f8fafc;
}

.page-item:first-child .page-link:hover,
.page-item:last-child .page-link:hover {
    background: var(--primary-color);
    color: white;
}

/* 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: 3.5rem;
    font-weight: 800;
    margin-bottom: 1.5rem;
    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;
    gap: 0.75rem;
}

.reviewer-info h4 {
    font-size: 1.1rem;
    margin-bottom: 0.25rem;
}

.review-date {
    font-size: 0.9rem;
    color: var(--text-muted);
}

.review-header .reviewer-info {
    min-width: 0;
    flex: 1 1 auto;
}

.review-header .reviewer-info h3,
.review-header .reviewer-info h4 {
    overflow-wrap: anywhere;
    word-break: break-word;
}

.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: 1150px) {
    .company-header-grid {
        flex-direction: column;
        text-align: center;
    }

    .company-header-info .meta-info {
        flex-direction: column;
        align-items: center;
    }
}

/* Navigation & Mobile Menu */
.navbar-toggler {
    display: none;
    background: transparent;
    border: 1px solid var(--card-border);
    padding: 0.5rem 0.75rem;
    border-radius: 8px;
    font-size: 1.25rem;
    color: var(--text-color);
    cursor: pointer;
    transition: all 0.3s ease;
}

.navbar-toggler:hover {
    background: #f1f5f9;
}

.mobile-menu {
    position: fixed;
    top: 0;
    right: 0;
    width: 300px;
    max-width: 85%;
    height: 100vh;
    background: white;
    z-index: 2001;
    box-shadow: -10px 0 30px rgba(0, 0, 0, 0.1);
    transform: translateX(100%);
    transition: transform 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
    padding: 2rem;
    display: flex;
    flex-direction: column;
}

.mobile-menu.active {
    transform: translateX(0);
}

.close-menu {
    align-self: flex-end;
    background: none;
    border: none;
    font-size: 2.5rem;
    color: var(--text-muted);
    cursor: pointer;
    margin-bottom: 2rem;
    line-height: 1;
}

.mobile-menu-links {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.mobile-menu-links a {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-color);
    padding: 0.5rem 0;
    border-bottom: 1px solid #f1f5f9;
}

.mobile-menu-links a.active {
    color: var(--primary-color);
    border-bottom-color: var(--primary-color);
}

.no-scroll {
    overflow: hidden;
}

/* Responsive Fixes for Pages */
@media (max-width: 1150px) {
    header .nav-menu {
        display: none !important;
    }

    .navbar-toggler {
        display: flex !important;
        align-items: center;
        justify-content: center;
    }
    .navbar { padding: 0 1rem; }

    .navbar {
        padding: 0 1rem;
        height: 60px;
    }

    .navbar-brand img {
        height: 40px;
    }
}

@media (max-width: 640px) {
    .company-details-grid {
        grid-template-columns: 1fr;
    }

    .company-printing-details-grid {
        grid-template-columns: 1fr;
    }
    
    .company-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }

    .explore-header-image {
        height: 200px;
    }

    .hero h1 {
        font-size: 2rem;
        word-wrap: break-word; /* Prevent text overflow */
        hyphens: auto;
    }

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

    .company-name {
        font-size: 1.5rem;
        word-wrap: break-word;
        overflow-wrap: break-word;
    }

    .trending-app-card {
        height: 350px;
    }

    .trending-app-content {
        padding: 1rem;
    }

    .trending-app-title {
        font-size: 1.1rem;
    }

    .footer-content {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }

    .footer-brand p {
        width: 100%;
    }

    .social-links {
        justify-content: center;
    }

    /* Padding adjustments for detail sections */
    .detail-section {
        padding: 1.5rem;
    }
    
    .company-details-header {
        padding: 100px 0 30px;
    }
    
    .company-header-info h1 {
        font-size: 2.2rem;
        word-break: break-word;
        line-height: 1.2;
    }
    
    .rating-group {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .pros-cons-grid {
        grid-template-columns: 1fr;
    }
    
    .write-review-btn {
        width: 100%;
        justify-content: center;
    }
}

@media (max-width: 480px) {
    .company-logo {
        height: 120px;
    }

    .company-name {
        font-size: 1.25rem;
    }

    .hero-section.small-hero h1 {
        font-size: 1.5rem;
    }

    .container {
        padding: 0 1rem;
    }

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

@media (max-width: 360px) {
    .mobile-menu {
        width: 260px;
    }

    .hero h1 {
        font-size: 1.6rem;
    }
    
    .company-header-info h1 {
        font-size: 1.8rem;
    }
    
    .company-detail-logo {
        width: 150px;
        height: 150px;
        margin: 0 auto;
    }
}

.trending-apps-section,
.categories-section {
    overflow: hidden !important;
}

/* Base Responsive rules for rest of elements */
@media (max-width: 992px) {
    .company-card {
        flex-direction: column;
        padding: 1.5rem;
    }

    .company-logo {
        flex: 0 0 auto;
        height: 150px;
        width: 100%;
        border-radius: 12px 12px 0 0; /* Add proper rounding based on stack */
    }

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

    .explore-header-image {
        height: 300px;
        margin: 20px auto;
        border-radius: 12px;
    }

    .hero-section.small-hero {
        padding: 100px 0 40px;
    }

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

    .company-actions {
        flex-direction: column;
        width: 100%;
    }

    .company-actions .btn {
        width: 100%;
        text-align: center;
    }

    .company-details-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1rem;
    }

    .company-printing-details-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1rem;
        
    }

    .section-title {
        font-size: 2rem;
        margin-bottom: 2rem;
    }
    
    .detail-section {
        padding: 2rem;
    }
    
    .company-details-header {
        padding: 120px 0 40px;
    }
}

/* ═══════════════════════════════════════════
   HDR-* — Header buttons & profile dropdown
   (fresh class names, zero conflicts)
   ═══════════════════════════════════════════ */

/* nav gap */
.nav-menu { flex-wrap: nowrap; }
.nav-link  { font-size: 1rem !important; white-space: nowrap; }

/* ── Buttons ── */
.hdr-btn {
    display: inline-flex;
    align-items: center;
    padding: 8px 18px;
    border-radius: 50px;
    font-family: var(--font-main);
    font-size: .85rem;
    font-weight: 600;
    white-space: nowrap;
    cursor: pointer;
    border: none;
    text-decoration: none;
    transition: all .2s;
    line-height: 1.4;
}
.hdr-btn--outline {
    background: transparent;
    color: var(--primary-color);
    border: 2px solid var(--primary-color);
}
.hdr-btn--outline:hover { background: var(--primary-color); color: #fff; }

.hdr-btn--ghost {
    background: transparent;
    color: var(--text-color);
    border: 1.5px solid var(--card-border);
}
.hdr-btn--ghost:hover { background: #f1f5f9; color: var(--primary-color); border-color: var(--primary-color); }

.hdr-btn--solid {
    background: var(--gradient-main);
    color: #fff;
    box-shadow: 0 4px 14px rgba(59,130,246,.35);
}
.hdr-btn--solid:hover { transform: translateY(-1px); box-shadow: 0 6px 18px rgba(59,130,246,.45); color: #fff; }

/* ── Avatar button ── */
.hdr-profile { position: relative; display: inline-flex; align-items: center; }

.hdr-avatar-btn {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    background: #fff;
    border: 1.5px solid var(--card-border);
    border-radius: 50px;
    padding: 4px 12px 4px 4px;
    cursor: pointer;
    font-family: var(--font-main);
    font-size: .85rem;
    font-weight: 600;
    color: var(--text-color);
    white-space: nowrap;
    transition: border-color .2s, box-shadow .2s;
}
.hdr-avatar-btn:hover {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(59,130,246,.12);
}
.hdr-avatar {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--card-border);
    display: block;
    flex-shrink: 0;
}
.hdr-chevron {
    font-size: .62rem;
    color: var(--text-muted);
    transition: transform .22s ease;
    flex-shrink: 0;
}

/* ── Dropdown panel ── */
.hdr-dropdown {
    position: absolute;
    top: calc(100% + 12px);
    right: 0;
    min-width: 240px;
    background: #fff;
    border: 1px solid var(--card-border);
    border-radius: 14px;
    box-shadow: 0 12px 40px rgba(0,0,0,.13);
    z-index: 99999;
    /* hidden */
    opacity: 0;
    visibility: hidden;
    transform: translateY(-6px);
    transition: opacity .18s ease, transform .18s ease, visibility .18s;
    pointer-events: none;
}
.hdr-dropdown.open {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
    pointer-events: auto;
}
/* caret */
.hdr-dropdown::before {
    content: '';
    position: absolute;
    top: -6px;
    right: 18px;
    width: 12px;
    height: 12px;
    background: #fff;
    border-left: 1px solid var(--card-border);
    border-top: 1px solid var(--card-border);
    transform: rotate(45deg);
}

.hdr-dd-top {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 14px 14px 12px;
}
.hdr-dd-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--card-border);
    flex-shrink: 0;
}
.hdr-dd-name  { font-weight: 700; font-size: .88rem; color: var(--text-color); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 155px; }
.hdr-dd-email { font-size: .74rem; color: var(--text-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 155px; margin-top: 1px; }

.hdr-dd-sep { height: 1px; background: var(--card-border); margin: 3px 0; }

.hdr-dd-item {
    display: flex;
    align-items: center;
    gap: 9px;
    padding: 9px 14px;
    font-size: .87rem;
    font-weight: 500;
    color: var(--text-color);
    text-decoration: none;
    transition: background .14s;
}
.hdr-dd-item i { width: 15px; text-align: center; color: var(--text-muted); font-size: .8rem; flex-shrink: 0; }
.hdr-dd-item:hover { background: #f1f5f9; color: var(--primary-color); }
.hdr-dd-item:hover i { color: var(--primary-color); }
.hdr-dd-item:last-child { border-radius: 0 0 14px 14px; }
.hdr-dd-logout { color: #dc2626 !important; }
.hdr-dd-logout i { color: #dc2626 !important; }
.hdr-dd-logout:hover { background: #fef2f2 !important; }

/* ── Responsive: hide nav below 768px ── */
@media (max-width: 1150px) {
    .hdr-btn { display: none; }
    .hdr-profile { display: none; }
}

/* ── Auth dropdown (logged-out single button) ── */
.hdr-auth { position: relative; display: inline-flex; align-items: center; }

.hdr-auth-dd-body {
    padding: 18px 16px 16px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.hdr-auth-dd-title {
    font-size: 1rem;
    font-weight: 700;
    color: var(--text-color);
    margin: 0 0 2px;
}
.hdr-auth-dd-sub {
    font-size: .8rem;
    color: var(--text-muted);
    margin: 0 0 6px;
}
.hdr-auth-dd-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 16px;
    border-radius: 10px;
    font-size: .88rem;
    font-weight: 600;
    text-decoration: none;
    transition: all .18s;
    font-family: var(--font-main);
}
.hdr-auth-dd-btn--primary {
    background: var(--gradient-main);
    color: #fff;
    box-shadow: 0 4px 12px rgba(59,130,246,.3);
}
.hdr-auth-dd-btn--primary:hover { transform: translateY(-1px); box-shadow: 0 6px 16px rgba(59,130,246,.4); color: #fff; }
.hdr-auth-dd-btn--outline {
    background: transparent;
    color: var(--primary-color);
    border: 1.5px solid var(--primary-color);
}
.hdr-auth-dd-btn--outline:hover { background: #eff6ff; }

@media (max-width: 1150px) { .hdr-auth { display: none; } }


/* ═══════════════════════════════════════════
   Notification Bell & Dropdown
   ═══════════════════════════════════════════ */

.hdr-notification {
    position: relative;
    display: inline-flex;
    align-items: center;
    margin-right: 8px;
}

.hdr-notif-btn {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    background: #fff;
    border: 1.5px solid var(--card-border);
    border-radius: 50%;
    cursor: pointer;
    font-size: 1rem;
    color: var(--text-color);
    transition: all .2s;
}

.hdr-notif-btn:hover {
    border-color: var(--primary-color);
    color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(59,130,246,.12);
}

.hdr-notif-badge {
    position: absolute;
    top: -4px;
    right: -4px;
    min-width: 18px;
    height: 18px;
    background: #ef4444;
    color: #fff;
    font-size: .65rem;
    font-weight: 700;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 4px;
    border: 2px solid #fff;
}

.hdr-notif-dropdown {
    position: absolute;
    top: calc(100% + 12px);
    right: 0;
    width: 360px;
    max-width: 90vw;
    background: #fff;
    border: 1px solid var(--card-border);
    border-radius: 14px;
    box-shadow: 0 12px 40px rgba(0,0,0,.13);
    z-index: 99999;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-6px);
    transition: opacity .18s ease, transform .18s ease, visibility .18s;
    pointer-events: none;
}

.hdr-notif-dropdown.open {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
    pointer-events: auto;
}

.hdr-notif-dropdown::before {
    content: '';
    position: absolute;
    top: -6px;
    right: 18px;
    width: 12px;
    height: 12px;
    background: #fff;
    border-left: 1px solid var(--card-border);
    border-top: 1px solid var(--card-border);
    transform: rotate(45deg);
}

.hdr-notif-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 14px 16px;
    border-bottom: 1px solid var(--card-border);
}

.hdr-notif-header h4 {
    font-size: .95rem;
    font-weight: 700;
    color: var(--text-color);
    margin: 0;
}

.hdr-notif-mark-all {
    font-size: .75rem;
    color: var(--primary-color);
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
}

.hdr-notif-mark-all:hover {
    text-decoration: underline;
}

.hdr-notif-list {
    max-height: 400px;
    overflow-y: auto;
}

.hdr-notif-list::-webkit-scrollbar {
    width: 6px;
}

.hdr-notif-list::-webkit-scrollbar-track {
    background: #f1f5f9;
}

.hdr-notif-list::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 3px;
}

.hdr-notif-list::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}

.hdr-notif-item {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 12px 16px;
    text-decoration: none;
    color: var(--text-color);
    border-bottom: 1px solid #f1f5f9;
    transition: background .14s;
    position: relative;
}

.hdr-notif-item:hover {
    background: #f8fafc;
}

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

.hdr-notif-item.unread {
    background: #eff6ff;
}

.hdr-notif-item.unread:hover {
    background: #dbeafe;
}

.hdr-notif-content {
    flex: 1;
}

.hdr-notif-content p {
    font-size: .85rem;
    line-height: 1.5;
    margin: 0 0 4px;
    color: var(--text-color);
}

.hdr-notif-time {
    font-size: .72rem;
    color: var(--text-muted);
}

.hdr-notif-dot {
    width: 8px;
    height: 8px;
    background: var(--primary-color);
    border-radius: 50%;
    flex-shrink: 0;
    margin-top: 6px;
}

.hdr-notif-empty {
    padding: 40px 20px;
    text-align: center;
    color: var(--text-muted);
}

.hdr-notif-empty i {
    font-size: 2.5rem;
    margin-bottom: 12px;
    opacity: .5;
}

.hdr-notif-empty p {
    font-size: .9rem;
    margin: 0;
}

.hdr-notif-footer {
    border-top: 1px solid var(--card-border);
    padding: 10px 16px;
    text-align: center;
    background: #f8fafc;
    border-radius: 0 0 14px 14px;
}

.hdr-notif-view-all {
    display: block;
    font-size: .85rem;
    font-weight: 600;
    color: var(--primary-color);
    text-decoration: none;
    transition: color .2s;
}

.hdr-notif-view-all:hover {
    color: #2563eb;
    text-decoration: underline;
}

@media (max-width: 1150px) {
    .hdr-notification {
        display: none;
    }
}

/* ======================================
   Global Responsive Hardening Overrides
   ====================================== */
html, body {
    max-width: 100%;
}

body {
    text-size-adjust: 100%;
    -webkit-text-size-adjust: 100%;
}

.container {
    width: 100%;
}

.company-card,
.detail-section,
.review-card,
.page-content,
.company-details-grid,
.company-printing-details-grid,
.company-header-grid,
.company-actions,
.service-chips,
.services-list,
.meta-info,
.rating-group {
    min-width: 0;
}

.company-card {
    overflow: hidden;
}

.company-info,
.company-header-info {
    min-width: 0;
}

.company-name,
.company-name a,
.company-header-info h1,
.detail-item span,
.meta-link,
.hdr-dd-name,
.hdr-dd-email {
    overflow-wrap: anywhere;
    word-break: break-word;
}

.services-list {
    flex-wrap: wrap;
}

.company-actions {
    flex-wrap: wrap;
}

.company-actions .btn {
    text-align: center;
}

.meta-link {
    max-width: 100%;
}

.mobile-menu {
    overflow-y: auto;
}

.mobile-menu-links .btn {
    width: 100%;
}

/* 1440px+ */
@media (min-width: 1440px) {
    .container,
    .navbar {
        max-width: 1320px;
    }

    .hero h1 {
        font-size: clamp(3rem, 3.8vw, 4.25rem);
    }

    .section-title {
        font-size: clamp(2.2rem, 2.6vw, 3rem);
    }
}

/* 1024px and below */
@media (max-width: 1024px) {
    .explore-page #explore_list.categories-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .hero {
        padding: 135px 0 60px;
    }

    .hero h1 {
        font-size: clamp(2rem, 4.8vw, 2.8rem);
    }

    .hero p {
        font-size: 1.05rem;
        margin-bottom: 2rem;
    }

    .section-title {
        font-size: clamp(1.65rem, 3.4vw, 2.2rem);
        margin-bottom: 1.75rem;
    }

    .company-card {
        padding: 1.25rem;
        gap: 1.25rem;
    }

    .company-details-header {
        padding: 118px 0 34px;
    }

    .company-header-info h1 {
        font-size: clamp(1.8rem, 4.2vw, 2.4rem);
    }

    .company-header-grid {
        gap: 1.5rem;
    }
}

/* 768px and below */
@media (max-width: 768px) {
    .explore-page #explore_list.categories-grid {
        grid-template-columns: 1fr;
    }

    .blog-page .page-container {
        padding-top: 14px;
        padding-bottom: 20px;
    }

    .blog-page .blog-grid {
        padding-top: 0;
    }

    .blog-page .pagination-container {
        margin-top: 1.5rem !important;
        margin-bottom: 0.5rem !important;
    }

    .container {
        padding: 0 1rem;
    }

    .categories-section,
    .companies-section {
        padding: 40px 0;
    }

    .companies-container .company-card {
        margin-bottom: 1.25rem;
    }

    .company-logo {
        height: 140px;
    }

    .company-details-grid,
    .company-printing-details-grid {
        grid-template-columns: 1fr;
        gap: 0.75rem;
    }

    .detail-item span {
        font-size: 1rem;
    }

    .company-actions {
        flex-direction: column;
        gap: 0.75rem;
    }

    .company-actions .btn {
        width: 100%;
    }

    .meta-info {
        gap: 0.6rem;
    }

    .meta-link {
        width: 100%;
        justify-content: center;
        padding: 0.55rem 0.9rem;
    }

    .detail-section {
        border-radius: 14px;
        padding: 1.2rem;
    }

    .detail-section h2 {
        font-size: 1.2rem;
        margin-bottom: 1rem;
        gap: 0.5rem;
    }

    .detail-section h2::before {
        height: 18px;
    }

    .review-card {
        padding: 1.25rem;
    }

    .review-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }

    .review-header > div:last-child {
        width: 100%;
        align-items: flex-start !important;
        text-align: left !important;
        gap: 0.35rem !important;
    }

    .review-header > div:last-child .review-date {
        text-align: left !important;
    }

    .rating-group {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 768px) {
    footer {
        margin-top: 32px;
    }
}

/* 480px and below */
@media (max-width: 480px) {
    .hero {
        padding: 120px 0 46px;
    }

    .hero h1 {
        font-size: clamp(1.5rem, 8vw, 2rem);
        line-height: 1.2;
    }

    .hero p {
        font-size: 0.95rem;
        margin-bottom: 1.5rem;
    }

    .btn,
    .btn-primary,
    .btn-outline,
    .hdr-btn,
    .write-review-btn {
        width: 100%;
        justify-content: center;
    }

    .company-detail-logo {
        width: 132px;
        height: 132px;
        border-radius: 14px;
    }

    .company-header-grid {
        gap: 1rem;
    }

    .rating-svg-container {
        width: 68px;
        height: 68px;
    }

    .mobile-menu {
        width: min(88vw, 320px);
        padding: 1.25rem;
    }
}

/* 375px and below */
@media (max-width: 375px) {
    .container {
        padding: 0 0.85rem;
    }

    .company-card {
        padding: 1rem;
    }

    .company-name {
        font-size: 1.1rem;
    }

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

    .mobile-menu-links a {
        font-size: 1.02rem;
    }
}

/* 320px and below */
@media (max-width: 320px) {
    .container {
        padding: 0 0.7rem;
    }

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

    .company-name {
        font-size: 1rem;
    }

    .badge {
        font-size: 0.7rem;
        padding: 3px 7px;
    }

    .detail-item strong {
        font-size: 0.8rem;
    }

    .detail-item span {
        font-size: 0.92rem;
    }

    .mobile-menu {
        width: 100vw;
        max-width: 100vw;
    }
}

/* Remaining pages consistency pass */
.review-form-wrap,
.review-company-hero-inner,
.suggest-wrap,
.claim-wrap,
.write-review-wrap,
.notifications-wrap,
.vp-card,
.profile-section,
.blog-layout,
.blog-grid {
    width: 100%;
    max-width: 100%;
    min-width: 0;
}

.reviews-section [style*="min-width:140px"] {
    min-width: 0 !important;
    flex: 1 1 160px;
}

.reviews-section [style*="grid-template-columns:1fr 1fr"] {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
}

.review-company-hero .rch-company-name,
.review-company-hero .rch-review-title {
    overflow-wrap: anywhere;
    word-break: break-word;
}

.modal-content {
    max-height: min(90vh, 760px);
    overflow-y: auto;
}

.company-details-grid .detail-item span,
.company-printing-details-grid .detail-item span {
    display: block;
}

@media (max-width: 768px) {
    .reviews-section [style*="grid-template-columns:1fr 1fr"] {
        grid-template-columns: 1fr !important;
    }

    .review-form-page .form-card {
        padding: 1.1rem !important;
        border-radius: 12px !important;
    }

    .review-form-page .rating-item {
        min-width: 0 !important;
        width: 100%;
    }

    .review-form-page .star-rating {
        float: none !important;
    }

    .blog-layout,
    .profile-container {
        gap: 1rem !important;
    }

    /* Normalize title-to-content spacing across pages */
    .hero + .page-container,
    .hero-section.small-hero + .page-container,
    .company-details-header + .page-container {
        padding-top: 14px !important;
    }

    .hero + .categories-section,
    .hero + .companies-section {
        padding-top: 24px !important;
    }

    .hero + .content-section {
        padding-top: 16px !important;
    }

    .content-section .detail-content-card {
        margin-top: 0 !important;
    }

    /* Reduce content-to-footer gap across common pages */
    .page-container {
        padding-bottom: 32px;
    }

    .pagination-container {
        margin-bottom: 0 !important;
    }

    footer {
        margin-top: 24px !important;
    }
}

@media (max-width: 480px) {
    .review-form-page {
        padding-bottom: 42px !important;
    }

    .review-form-page .btn-submit,
    .review-form-page .btn,
    .review-form-page .btn-primary {
        width: 100%;
    }
}

/* ── development_service migration (T7.4): coloured initials placeholder for companies without a logo
   (application/helpers/profile_image_helper.php company_logo_placeholder()) ── */

/* Company logo placeholder - coloured initials shown where a company has no logo
   (company_logo_html() in application/helpers/profile_image_helper.php). Fills whatever logo
   box it's placed in; colours are set inline per company. */
.co-logo-ph.co-logo-ph {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    overflow: hidden;
    font-weight: 800;
    letter-spacing: .02em;
    line-height: 1;
    text-decoration: none;
    user-select: none;
}
/* Zero-specificity defaults - a logo class passed alongside (e.g. .t10-rt-logo) sets the real
   box size and shape, otherwise the placeholder fills its container. */
:where(.co-logo-ph) { width: 100%; height: 100%; font-size: 1.25rem; }
.co-logo-ph.co-logo-ph[hidden] { display: none; }
/* Profile hero logo tile (company-profile.php .cpx-logo) pads its <img>; let the placeholder fill
   the whole tile instead of sitting inside a white frame. */
.cpx-logo:has(> .co-logo-ph:not([hidden])) { padding: 0; overflow: hidden; }
