/*
Theme Name: Insurance Hub
Theme URI: http://example.com/insurance-hub/
Author: Admin
Author URI: http://example.com
Description: A premium insurance blog theme based on the UI prototype.
Version: 1.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: insurance-hub
*/

/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #0d5cda;
    --primary-dark: #094bb7;
    --secondary-color: #0f1b29;
    --text-main: #333333;
    --text-muted: #666666;
    --bg-light: #f8f9fa;
    --white: #ffffff;
    --border-color: #e5e7eb;
    --font-family: 'Inter', sans-serif;
    
    --container-width: 1200px;
}

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

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

a:hover {
    color: var(--primary-color);
}

ul {
    list-style: none;
}

.container {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 20px;
}

/* Utilities */
.btn {
    display: inline-block;
    padding: 10px 24px;
    border-radius: 6px;
    font-weight: 500;
    cursor: pointer;
    border: none;
    transition: background-color 0.2s;
}

.btn-primary {
    background-color: var(--primary-color);
    color: var(--white);
}

.btn-primary:hover {
    background-color: var(--primary-dark);
    color: var(--white);
}

.btn-secondary {
    background-color: var(--white);
    color: var(--primary-color);
    border: 1px solid var(--primary-color);
}

.btn-secondary:hover {
    background-color: var(--bg-light);
}

/* Top Bar */
.top-bar {
    background-color: var(--secondary-color);
    color: #a0aec0;
    font-size: 13px;
    padding: 8px 0;
}

.top-bar-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.top-bar-left {
    display: flex;
    align-items: center;
    gap: 8px;
}

.trending-icon {
    color: var(--white);
}

.top-bar-right {
    display: flex;
    align-items: center;
    gap: 20px;
}

.top-nav {
    display: flex;
    gap: 15px;
}

.top-nav a:hover {
    color: var(--white);
}

.social-icons {
    display: flex;
    gap: 12px;
}

.social-icons a:hover {
    color: var(--white);
}

/* Main Header */
.main-header {
    background-color: var(--white);
    padding: 20px 0;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    display: flex;
    align-items: center;
    gap: 12px;
}

.top-bar .logo-text h1 {
    color: var(--white);
}

.top-bar .logo-text p {
    color: #a0aec0;
}

.logo-icon {
    font-size: 32px;
    color: var(--primary-color);
}

.logo-text h1 {
    font-size: 22px;
    font-weight: 700;
    color: var(--primary-color);
    line-height: 1.1;
}

.logo-text p {
    font-size: 11px;
    color: var(--text-muted);
}

.main-nav > ul {
    list-style: none;
    display: flex;
    gap: 24px;
    font-weight: 500;
    font-size: 15px;
}

.main-nav > ul > li {
    position: relative;
}

.main-nav a.active {
    color: var(--primary-color);
    position: relative;
}

.main-nav a.active::after {
    content: '';
    position: absolute;
    bottom: -28px;
    left: 0;
    width: 100%;
    height: 3px;
    background-color: var(--primary-color);
}

.main-nav i {
    font-size: 10px;
    margin-left: 4px;
}

/* Dropdown Styles */
.dropdown-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    background: #fff;
    min-width: 220px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    list-style: none;
    padding: 10px 0;
    z-index: 999;
    border-radius: 8px;
    margin-top: 20px;
    border: 1px solid #eee;
}

.dropdown-menu li a {
    display: block;
    padding: 10px 20px;
    color: var(--text-main);
    transition: 0.3s;
}

.dropdown-menu li a:hover {
    background: #f4f7f9;
    color: var(--primary-color);
}

.has-dropdown.open .dropdown-menu {
    display: block;
}

.header-search .search-form {
    display: flex;
    align-items: center;
    border: 1px solid var(--border-color);
    border-radius: 20px;
    padding: 4px 12px;
    background: var(--bg-light);
}

.header-search .search-field {
    border: none;
    background: transparent;
    outline: none;
    width: 120px;
    font-size: 14px;
    font-family: var(--font-family);
    transition: width 0.3s;
}

.header-search .search-field:focus {
    width: 180px;
}

.header-search button {
    background: none;
    border: none;
    font-size: 16px;
    cursor: pointer;
    color: var(--text-muted);
}

/* Hero Section */
.hero {
    position: relative;
    padding: 80px 0;
    color: var(--white);
    min-height: 500px;
    overflow: hidden;
    background: linear-gradient(135deg, #0f1b29 0%, #092244 100%);
}

.hero-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -2;
}

.hero-bg img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, rgba(8, 25, 48, 0.95) 0%, rgba(8, 25, 48, 0.8) 50%, rgba(8, 25, 48, 0.2) 100%);
    z-index: -1;
}

.hero-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.hero-content {
    flex: 1;
    max-width: 600px;
}

.hero-content h2 {
    font-size: 42px;
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 20px;
}

.hero-content p {
    font-size: 16px;
    color: #d1d5db;
    margin-bottom: 30px;
}

.search-box {
    display: flex;
    background: var(--white);
    border-radius: 8px;
    padding: 6px;
    margin-bottom: 40px;
}

.search-box input {
    flex: 1;
    border: none;
    padding: 10px 15px;
    font-size: 15px;
    outline: none;
    border-radius: 6px;
}

.search-box .btn {
    padding: 12px 30px;
}

.hero-features {
    display: flex;
    gap: 30px;
}

.feature-item {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 13px;
    color: #e5e7eb;
}

.feature-item i {
    font-size: 20px;
    color: #93c5fd;
}

/* Most Popular Widget (in hero) */
.hero-sidebar {
    width: 350px;
}

.widget {
    background: var(--white);
    border-radius: 12px;
    padding: 24px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
}

.widget h3 {
    font-size: 18px;
    color: var(--text-main);
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.widget-title-bar {
    display: inline-block;
    width: 4px;
    height: 18px;
    background-color: var(--primary-color);
    border-radius: 2px;
}

.popular-list li {
    margin-bottom: 15px;
    padding-bottom: 15px;
    border-bottom: 1px solid var(--border-color);
}

.popular-list li:last-child {
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: none;
}

.popular-item {
    display: flex;
    align-items: center;
    gap: 15px;
    color: var(--text-main);
    position: relative;
}

.popular-item img {
    width: 70px;
    height: 50px;
    border-radius: 6px;
    object-fit: cover;
}

.popular-info h4 {
    font-size: 14px;
    font-weight: 600;
    line-height: 1.4;
    margin-bottom: 4px;
}

.popular-info .date {
    font-size: 12px;
    color: var(--text-muted);
}

.popular-item .rank {
    position: absolute;
    right: 0;
    background-color: var(--primary-color);
    color: var(--white);
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 600;
}

/* Main Content Area */
.main-content {
    padding: 40px 0;
}

.main-layout {
    display: flex;
    gap: 40px;
}

.left-col {
    flex: 1;
}

.right-col {
    width: 320px;
}

/* Category Badges */
.category-badges {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 15px;
    margin-bottom: 40px;
}

.badge-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 20px 10px;
    background: var(--white);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    text-align: center;
    font-size: 13px;
    font-weight: 500;
    color: var(--text-main);
    transition: all 0.2s;
}

.badge-item i {
    font-size: 24px;
    color: var(--primary-color);
    margin-bottom: 10px;
}

.badge-item:hover {
    border-color: var(--primary-color);
    box-shadow: 0 4px 12px rgba(13, 92, 218, 0.1);
    transform: translateY(-2px);
}

/* Section Titles */
.section-title {
    font-size: 20px;
    font-weight: 700;
    margin-bottom: 24px;
    display: flex;
    align-items: center;
    gap: 10px;
}

/* Latest Guides Grid */
.guides-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    margin-bottom: 40px;
}

.post-card {
    background: var(--white);
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid var(--border-color);
    transition: transform 0.2s, box-shadow 0.2s;
}

.post-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 10px 20px rgba(0,0,0,0.05);
}

.post-thumb {
    position: relative;
    height: 150px;
}

.post-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.category-tag {
    position: absolute;
    bottom: 0;
    left: 0;
    padding: 4px 12px;
    font-size: 11px;
    font-weight: 700;
    color: var(--white);
    text-transform: uppercase;
}

.tag-health { background-color: var(--primary-color); }
.tag-life { background-color: #6366f1; }
.tag-car { background-color: #ef4444; }
.tag-travel { background-color: #10b981; }
.tag-default { background-color: var(--primary-color); }

.post-content {
    padding: 16px;
}

.post-content h4 {
    font-size: 15px;
    font-weight: 600;
    margin-bottom: 10px;
    line-height: 1.4;
}

.post-content h4 a:hover {
    color: var(--primary-color);
}

.post-meta {
    font-size: 12px;
    color: var(--text-muted);
    margin-bottom: 10px;
    display: flex;
    gap: 15px;
}

.post-meta i {
    margin-right: 4px;
}

.post-content p {
    font-size: 13px;
    color: var(--text-muted);
    line-height: 1.5;
}

/* Insurance Comparisons */
.comparisons-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
}

.compare-card {
    position: relative;
    border-radius: 8px;
    overflow: hidden;
    height: 150px;
}

.compare-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.compare-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(15, 27, 41, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: var(--white);
    padding: 15px;
    transition: background 0.3s;
}

.compare-card:hover .compare-overlay {
    background: rgba(15, 27, 41, 0.85);
}

.compare-overlay h4 {
    font-size: 14px;
    font-weight: 600;
    line-height: 1.4;
}

/* Sidebar Widgets */
.right-col .widget {
    margin-bottom: 30px;
}

.newsletter-widget {
    background-color: var(--primary-color);
    color: var(--white);
}

.newsletter-widget h3 {
    color: var(--white);
}

.newsletter-widget p {
    font-size: 14px;
    margin-bottom: 20px;
    opacity: 0.9;
}

.newsletter-form input {
    width: 100%;
    padding: 12px;
    border: none;
    border-radius: 6px;
    margin-bottom: 12px;
    font-family: var(--font-family);
}

.newsletter-form .btn {
    width: 100%;
    font-weight: 600;
}

.cat-list li {
    margin-bottom: 12px;
}

.cat-list li:last-child {
    margin-bottom: 0;
}

.cat-list a {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    color: var(--text-main);
}

.cat-list a i {
    font-size: 10px;
    color: var(--primary-color);
    transition: transform 0.2s;
}

.cat-list a:hover {
    color: var(--primary-color);
}

.cat-list a:hover i {
    transform: translateX(4px);
}

.cat-list span.count {
    float: right;
    font-size: 13px;
    color: var(--text-muted);
}

/* Responsive Styles */
@media (max-width: 1200px) {
    .guides-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .comparisons-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 992px) {
    .main-layout {
        flex-direction: column;
    }
    .right-col {
        width: 100%;
    }
    .hero-inner {
        flex-direction: column;
        gap: 40px;
    }
    .hero-sidebar {
        width: 100%;
        max-width: 500px;
    }
    .main-nav {
        display: none;
    }
    .category-badges {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 768px) {
    .top-bar {
        display: none;
    }
    .hero {
        padding: 40px 0;
    }
    .hero-content h2 {
        font-size: 32px;
    }
    .hero-features {
        flex-wrap: wrap;
    }
    .category-badges {
        grid-template-columns: repeat(2, 1fr);
    }
    .guides-grid {
        grid-template-columns: 1fr;
    }
    .comparisons-grid {
        grid-template-columns: 1fr;
    }
}

/* Footer Styles */
.site-footer {
    background-color: #111111;
    color: #a0aec0;
    padding: 60px 0 20px;
    margin-top: 60px;
}

.footer-widgets-wrapper {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 40px;
    margin-bottom: 40px;
}

.widget-title {
    color: #ffffff;
    font-size: 14px;
    font-weight: 700;
    letter-spacing: 1px;
    margin-bottom: 20px;
    text-transform: uppercase;
}

.widget-about p {
    font-size: 13px;
    line-height: 1.8;
}

.widget-links ul li {
    margin-bottom: 12px;
}

.widget-links a {
    color: #a0aec0;
    font-size: 13px;
    transition: color 0.3s;
}

.widget-links a:hover {
    color: #ffffff;
}

.footer-bottom {
    border-top: 1px solid #333333;
    padding-top: 20px;
    font-size: 12px;
    text-align: left;
}

/* Contact Info Grid */
.contact-info-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin-bottom: 40px;
}

.contact-card {
    background-color: #f8f6f0;
    border-radius: 12px;
    padding: 30px 20px;
    text-align: center;
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
}

.contact-card .card-icon {
    width: 60px;
    height: 60px;
    background-color: #8c6239;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 15px;
}

.contact-card .card-icon i {
    color: #ffffff;
    font-size: 24px;
}

.contact-card .card-title {
    font-size: 18px;
    color: #333333;
    margin-bottom: 10px;
    font-family: serif;
    font-weight: 700;
}

.contact-card p {
    font-size: 14px;
    color: #8c6239;
    font-weight: 600;
}

@media (max-width: 768px) {
    .footer-widgets-wrapper {
        grid-template-columns: 1fr;
    }
    .contact-info-grid {
        grid-template-columns: 1fr;
    }
}
