:root {
    --primary-color: #0f172a;
    --secondary-color: #1e293b;
    --accent-color: #fbbf24;
    --accent-gradient: linear-gradient(135deg, #fbbf24 0%, #d97706 100%);
    --button-glow: 0 4px 20px rgba(251, 191, 36, 0.4);
    --text-light: #f1f5f9;
    --text-dim: #94a3b8;
    --glass-bg: rgba(255, 255, 255, 0.03);
    --glass-border: rgba(255, 255, 255, 0.08);
    --danger-color: #ef4444;
    --success-color: #10b981;
    --glass-bg: rgba(30, 41, 59, 0.6);
    --glass-border: rgba(255, 255, 255, 0.08);
    --glass-blur: blur(20px);
    --font-heading: 'Outfit', sans-serif;
    --font-body: 'Inter', sans-serif;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background-color: var(--primary-color);
    color: var(--text-light);
    font-family: var(--font-body);
    overflow-x: hidden;
    line-height: 1.6;
    background-image: radial-gradient(circle at 10% 20%, rgba(251, 191, 36, 0.03) 0%, transparent 20%),
        radial-gradient(circle at 90% 80%, rgba(37, 99, 235, 0.03) 0%, transparent 20%);
}

h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: var(--font-heading);
    color: #fff;
    letter-spacing: -0.02em;
}

a {
    text-decoration: none;
    color: inherit;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Utilities */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.hidden {
    display: none;
}

/* Premium Glassmorphism */
.glass-panel {
    background: rgba(30, 41, 59, 0.4);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
    position: relative;
    overflow: hidden;
}

/* Subtle inner glow for premium feel */
.glass-panel::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
}

/* Header */
header {
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 1000;
    padding: 15px 0;
    background: rgba(15, 23, 42, 0.85);
    backdrop-filter: blur(15px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* Logo Styles (Trustpilot Style) */
.brand-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-family: var(--font-heading);
    font-weight: 800;
    font-size: 1.5rem;
    color: white;
    letter-spacing: -0.03em;
    text-decoration: none;
}

.star-icon {
    color: var(--accent-color);
    font-size: 1.8rem;
    filter: drop-shadow(0 0 10px rgba(251, 191, 36, 0.5));
}

.brand-highlight {
    color: var(--accent-color);
    font-weight: 800;
}

.logo img {
    display: none;
    /* Hide old image logo just in case */
}

.nav-links {
    display: flex;
    gap: 30px;
}

.nav-links a {
    font-weight: 500;
    font-size: 1rem;
    color: var(--text-dim);
}

.nav-links a:hover,
.nav-links a.active {
    color: var(--accent-color);
    text-shadow: 0 0 15px rgba(251, 191, 36, 0.3);
}

/* Hero Section Premium */
.hero {
    min-height: 60vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    /* Mesh Gradient Background */
    background: radial-gradient(circle at 50% 0%, rgba(30, 58, 138, 0.3), transparent 60%),
        radial-gradient(circle at 80% 50%, rgba(15, 23, 42, 1), transparent),
        linear-gradient(180deg, rgba(15, 23, 42, 0) 0%, var(--primary-color) 100%);
    margin-top: 0;
    /* Cover header area if needed, but sticky header is fine */
    padding-top: 120px;
    padding-bottom: 60px;
    position: relative;
}

/* Feature Grid */
.section {
    padding: 80px 0;
}

.section-title {
    font-size: 2.8rem;
    margin-bottom: 70px;
    text-align: center;
}

.section-title span {
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    filter: drop-shadow(0 4px 20px rgba(0, 0, 0, 0.3));
}

.hero h1 span {
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    display: block;
    /* Ensure it wraps nicely if needed or holds gradient better */
    font-size: 1.1em;
    /* Slight bump */
}

.companies-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 35px;
}

/* Company Card Refinement */
.company-card {
    padding: 35px;
    display: flex;
    flex-direction: column;
    height: 100%;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.company-card:hover {
    transform: translateY(-12px);
    border-color: rgba(251, 191, 36, 0.3);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.4);
}

.company-name {
    font-size: 1.4rem;
    font-weight: 700;
    color: white;
}

.rating {
    color: var(--accent-color);
    font-size: 1.1rem;
}

.view-btn {
    padding: 12px 25px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 50px;
    color: var(--text-dim);
    font-weight: 600;
    font-size: 0.9rem;
    text-align: center;
    transition: all 0.3s ease;
}

.view-btn:hover {
    background: white;
    color: var(--primary-color);
    border-color: white;
    box-shadow: 0 5px 20px rgba(255, 255, 255, 0.2);
    transform: translateY(-2px);
}

/* Category Cards Premium */
.category-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 25px;
    margin-top: 40px;
}

.category-card {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 20px;
    padding: 40px 20px;
    text-align: center;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.category-card::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at center, rgba(251, 191, 36, 0.1), transparent 70%);
    opacity: 0;
    transition: opacity 0.4s ease;
}

.category-card:hover {
    transform: translateY(-8px);
    border-color: rgba(251, 191, 36, 0.3);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.3);
}

.category-card:hover::after {
    opacity: 1;
}

.category-card h3 {
    font-size: 1.2rem;
    font-weight: 600;
    z-index: 2;
    position: relative;
    color: var(--text-light);
}

/* Base Mobile Nav Styles (Hidden on Desktop) */
.hamburger-menu {
    display: none;
}

.mobile-nav {
    display: none;
}

.close-nav {
    display: none;
}

/* Base Mobile Nav Styles (Hidden on Desktop) */
@media (max-width: 768px) {

    /* Header Layout */
    nav {
        width: 100%;
        justify-content: flex-end;
        /* Align right to push hamburger to end */
        position: relative;
    }

    .logo {
        margin-right: auto;
        /* Push logo to far left */
    }

    .nav-links {
        display: none !important;
    }

    /* Hamburger Menu Icon */
    .hamburger-menu {
        display: block;
        font-size: 2rem;
        cursor: pointer;
        padding: 5px;
        color: white;
        z-index: 1001;
        /* Above header bg but below nav overlay if active? No, clicking it opens nav */
    }

    /* Fixed Header Compensation */
    .hero {
        padding-top: 150px;
        align-items: flex-start;
        min-height: 90vh;
    }

    .hero-content {
        padding-top: 20px;
    }

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

    /* Layout Adjustments */
    .companies-grid,
    .category-grid {
        grid-template-columns: 1fr;
    }

    .section {
        padding: 60px 0;
    }

    /* Compare Tool Mobile Fixes */
    #comparison-tool .glass-panel>div[style*="grid-template-columns"] {
        grid-template-columns: 1fr !important;
        gap: 60px;
        /* Space for VS badge */
    }

    /* VS Badge on Mobile - Center vertically between stacked items */
    #comparison-tool .glass-panel>div[style*="absolute"] {
        top: 50% !important;
        /* Keep centered relative to container */
    }

    /* Actually simple absolute positioning might fail if heights differ. 
       Let's keep absolute but ensure container has room. */

    .compare-slot {
        padding: 10px;
    }

    /* Mobile Table Scroll */
    #comparison-result {
        overflow-x: auto;
    }

    #comparison-result table {
        min-width: 600px;
        /* Force scroll */
    }

    .section {
        padding: 60px 0;
    }
}

/* SEARCH IMPROVEMENTS (Premium Mobile Override) */
@media (max-width: 768px) {
    .search-container {
        flex-direction: column;
        padding: 15px;
        gap: 15px;
        background: rgba(255, 255, 255, 0.05);
        /* Slight bg for mobile visibility */
        border-radius: 20px;
    }

    .search-input {
        width: 100%;
        text-align: center;
        background: rgba(0, 0, 0, 0.2);
    }

    .search-btn {
        width: 100%;
        justify-content: center;
        margin: 0;
    }
}

/* Mobile Menu Overlay - Full Screen */
.mobile-nav {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background: rgba(15, 23, 42, 0.98);
    /* Deep slate, almost opaque */
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    z-index: 2000;
    /* Highest layer */
    opacity: 0;
    visibility: hidden;
    transform: translateY(-20px);
    transition: all 0.3s ease-in-out;
    gap: 30px;
}

.mobile-nav.active {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.mobile-nav a {
    font-size: 1.5rem;
    font-weight: 700;
    color: white;
    text-transform: capitalize;
    transition: color 0.3s ease;
}

.mobile-nav a:hover {
    color: var(--accent-color);
}

/* Close Button */
.close-nav {
    position: absolute;
    top: 30px;
    right: 30px;
    font-size: 3rem;
    color: var(--text-dim);
    cursor: pointer;
    line-height: 1;
    transition: color 0.3s ease;
}

.close-nav:hover {
    color: var(--danger-color);
}
}

/* Review Modal Styles */
.modal-overlay {
    position: fixed;
    top: 0;
    ;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(5px);
    z-index: 3000;
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.modal-content {
    background: rgba(30, 41, 59, 0.95);
    border: 1px solid rgba(255, 255, 255, 0.1);
    padding: 40px;
    border-radius: 20px;
    width: 90%;
    max-width: 500px;
    position: relative;
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.5);
    transform: translateY(20px);
    transition: transform 0.3s ease;
}

.modal-overlay.active .modal-content {
    transform: translateY(0);
}

.modal-close {
    position: absolute;
    top: 20px;
    right: 20px;
    font-size: 1.5rem;
    color: var(--text-dim);
    cursor: pointer;
    transition: color 0.3s;
}

.modal-close:hover {
    color: white;
}

.form-group {
    margin-bottom: 20px;
    text-align: left;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    color: var(--text-light);
    font-weight: 500;
}

.form-input,
.form-textarea {
    width: 100%;
    padding: 12px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    color: white;
    font-family: var(--font-body);
    font-size: 1rem;
}

.form-input:focus,
.form-textarea:focus {
    outline: none;
    border-color: var(--accent-color);
    background: rgba(255, 255, 255, 0.1);
}

/* Star Rating Input */
.star-rating-input {
    display: flex;
    flex-direction: row-reverse;
    justify-content: center;
    gap: 10px;
    margin: 20px 0;
}

.star-rating-input input {
    display: none;
}

.star-rating-input label {
    font-size: 2rem;
    color: rgba(255, 255, 255, 0.2);
    cursor: pointer;
    transition: color 0.2s;
}

.star-rating-input input:checked~label,
.star-rating-input label:hover,
.star-rating-input label:hover~label {
    color: var(--accent-color);
}

/* --- RESTORED PREMIUM SEARCH (Stacked Layout) --- */
.search-container {
    display: flex;
    flex-direction: column;
    gap: 15px;
    width: 100%;
    max-width: 650px;
    margin: 40px auto;
    background: transparent !important;
    box-shadow: none !important;
    border: none !important;
    backdrop-filter: none !important;
    padding: 0 !important;
}

.search-input {
    width: 100%;
    padding: 18px 30px;
    border-radius: 50px;
    border: 1px solid rgba(255, 255, 255, 0.15);
    background: rgba(30, 41, 59, 0.95) !important;
    /* Deep dark blue/slate */
    color: white;
    font-size: 1.1rem;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
    transition: all 0.3s ease;
}

.search-input:focus {
    outline: none;
    background: rgba(15, 23, 42, 1) !important;
    border-color: rgba(251, 191, 36, 0.5);
    box-shadow: 0 0 20px rgba(251, 191, 36, 0.2);
}

.search-input::placeholder {
    color: rgba(255, 255, 255, 0.5);
}

.search-btn {
    width: 100%;
    padding: 18px;
    border-radius: 50px;
    /* Verified Orange Gradient */
    background: linear-gradient(90deg, #fbbf24 0%, #d97706 100%);
    color: #0f172a;
    /* Dark text for contrast */
    font-weight: 700;
    font-size: 1.1rem;
    border: none;
    cursor: pointer;
    box-shadow: 0 0 25px rgba(245, 158, 11, 0.5);
    /* Strong glow */
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    margin-top: 5px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.search-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 40px rgba(245, 158, 11, 0.7);
}

/* Ensure mobile responsiveness */
@media (max-width: 768px) {
    .search-container {
        padding: 0 20px !important;
    }
}