/* ===== CSS VARIABLES ===== */
:root {
    --primary-navy: #1a237e;
    --primary-blue: #2962ff;
    --accent-blue: #448aff;
    --light-blue: #82b1ff;
    --bg-light: #f5f7fa;
    --bg-white: #ffffff;
    --text-dark: #1a1a2e;
    --text-medium: #4a4a6a;
    --text-light: #7a7a9a;
    --border-light: #e8ecf1;
    --shadow-soft: 0 4px 20px rgba(26, 35, 126, 0.08);
    --shadow-medium: 0 8px 30px rgba(26, 35, 126, 0.12);
    --shadow-strong: 0 12px 40px rgba(26, 35, 126, 0.18);
    --gradient-hero: linear-gradient(135deg, #1a237e 0%, #2962ff 50%, #448aff 100%);
    --gradient-card: linear-gradient(145deg, #ffffff 0%, #f8faff 100%);
    --transition-fast: 0.2s ease;
    --transition-medium: 0.3s ease;
    --transition-slow: 0.5s ease;
    --radius-sm: 8px;
    --radius-md: 16px;
    --radius-lg: 24px;
    --radius-xl: 32px;
}

/* ===== RESET & BASE ===== */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Segoe UI', system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
    line-height: 1.6;
    color: var(--text-dark);
    background: var(--bg-light);
    overflow-x: hidden;
}

a {
    text-decoration: none;
    color: inherit;
}

ul, ol {
    list-style: none;
}

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

/* ===== UTILITY CLASSES ===== */
.container {
    width: 100%;
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 20px;
}

.section {
    padding: 80px 0;
}

.section-title {
    font-size: 2.5rem;
    font-weight: 700;
    text-align: center;
    margin-bottom: 16px;
    color: var(--primary-navy);
    position: relative;
}

.section-title::after {
    content: '';
    display: block;
    width: 60px;
    height: 4px;
    background: var(--gradient-hero);
    border-radius: 2px;
    margin: 16px auto 0;
}

.section-subtitle {
    font-size: 1.1rem;
    text-align: center;
    color: var(--text-medium);
    margin-bottom: 50px;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

/* ===== HEADER & NAVIGATION ===== */
.header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    box-shadow: var(--shadow-soft);
    transition: var(--transition-medium);
}

.header.scrolled {
    box-shadow: var(--shadow-medium);
}

.header .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 70px;
}

.logo {
    font-size: 1.6rem;
    font-weight: 800;
    color: var(--primary-navy);
    display: flex;
    align-items: center;
    gap: 10px;
}

.logo-icon {
    width: 40px;
    height: 40px;
    background: var(--gradient-hero);
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.4rem;
}

/* Navigation */
.nav-desktop {
    display: none;
}

@media (min-width: 1024px) {
    .nav-desktop {
        display: flex;
        align-items: center;
        gap: 8px;
    }
}

.nav-item {
    position: relative;
}

.nav-link {
    display: flex;
    align-items: center;
    gap: 5px;
    padding: 10px 16px;
    font-size: 0.95rem;
    font-weight: 500;
    color: var(--text-medium);
    border-radius: var(--radius-sm);
    transition: var(--transition-fast);
}

.nav-link:hover {
    color: var(--primary-blue);
    background: rgba(41, 98, 255, 0.08);
}

.nav-link i {
    font-size: 0.75rem;
    transition: transform var(--transition-fast);
}

.nav-item:hover .nav-link i {
    transform: rotate(180deg);
}

/* Dropdown Menu */
.dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    min-width: 220px;
    background: white;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-strong);
    padding: 12px 0;
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: var(--transition-medium);
}

.nav-item:hover .dropdown {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.dropdown-item {
    display: block;
    padding: 12px 20px;
    font-size: 0.9rem;
    color: var(--text-medium);
    transition: var(--transition-fast);
    border-left: 3px solid transparent;
}

.dropdown-item:hover {
    color: var(--primary-blue);
    background: rgba(41, 98, 255, 0.05);
    border-left-color: var(--primary-blue);
    padding-left: 24px;
}

/* Mobile Menu Toggle */
.menu-toggle {
    display: flex;
    flex-direction: column;
    gap: 5px;
    padding: 10px;
    background: none;
    border: none;
    cursor: pointer;
}

.menu-toggle span {
    width: 25px;
    height: 2px;
    background: var(--primary-navy);
    border-radius: 2px;
    transition: var(--transition-fast);
}

@media (min-width: 1024px) {
    .menu-toggle {
        display: none;
    }
}

/* Mobile Navigation */
.nav-mobile {
    position: fixed;
    top: 70px;
    left: 0;
    right: 0;
    bottom: 0;
    background: white;
    padding: 20px;
    transform: translateX(100%);
    transition: transform var(--transition-medium);
    overflow-y: auto;
    z-index: 999;
}

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

.nav-mobile-item {
    border-bottom: 1px solid var(--border-light);
}

.nav-mobile-link {
    display: block;
    padding: 16px 0;
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-dark);
}

.nav-mobile-dropdown {
    padding: 0 0 16px 16px;
}

.nav-mobile-dropdown a {
    display: block;
    padding: 10px 0;
    font-size: 0.95rem;
    color: var(--text-medium);
}

/* ===== HERO SECTION ===== */
.hero {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    padding: 120px 0 80px;
    background: var(--gradient-hero);
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255,255,255,0.1) 0%, transparent 60%);
    animation: gradientPulse 8s ease-in-out infinite;
}

@keyframes gradientPulse {
    0%, 100% { transform: scale(1) rotate(0deg); opacity: 0.5; }
    50% { transform: scale(1.1) rotate(180deg); opacity: 0.8; }
}

.hero .container {
    position: relative;
    z-index: 1;
}

.hero-content {
    text-align: center;
    max-width: 800px;
    margin: 0 auto;
    color: white;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(255,255,255,0.15);
    backdrop-filter: blur(10px);
    padding: 8px 20px;
    border-radius: 50px;
    font-size: 0.9rem;
    font-weight: 500;
    margin-bottom: 30px;
    animation: fadeInDown 0.8s ease;
}

.hero-title {
    font-size: clamp(2rem, 5vw, 3.5rem);
    font-weight: 800;
    line-height: 1.2;
    margin-bottom: 24px;
    animation: fadeInUp 0.8s ease 0.2s both;
}

.hero-subtitle {
    font-size: clamp(1rem, 2vw, 1.25rem);
    opacity: 0.9;
    margin-bottom: 40px;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
    animation: fadeInUp 0.8s ease 0.4s both;
}

.hero-cta {
    display: flex;
    gap: 16px;
    justify-content: center;
    flex-wrap: wrap;
    animation: fadeInUp 0.8s ease 0.6s both;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ===== BUTTONS ===== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 14px 32px;
    font-size: 1rem;
    font-weight: 600;
    border-radius: 50px;
    transition: var(--transition-medium);
    cursor: pointer;
    border: none;
}

.btn-primary {
    background: white;
    color: var(--primary-navy);
    box-shadow: var(--shadow-medium);
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-strong);
}

.btn-secondary {
    background: transparent;
    color: white;
    border: 2px solid rgba(255,255,255,0.5);
}

.btn-secondary:hover {
    background: rgba(255,255,255,0.1);
    border-color: white;
}

.btn-accent {
    background: var(--gradient-hero);
    color: white;
    box-shadow: var(--shadow-medium);
}

.btn-accent:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-strong);
}

/* ===== PRODUCT CARDS ===== */
.product-card {
    background: var(--gradient-card);
    border-radius: var(--radius-lg);
    padding: 30px;
    box-shadow: var(--shadow-soft);
    transition: var(--transition-medium);
    position: relative;
    overflow: hidden;
    border: 1px solid var(--border-light);
}

.product-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--gradient-hero);
    transform: scaleX(0);
    transition: transform var(--transition-medium);
}

.product-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-strong);
}

.product-card:hover::before {
    transform: scaleX(1);
}

.product-rank {
    position: absolute;
    top: 20px;
    right: 20px;
    width: 40px;
    height: 40px;
    background: var(--gradient-hero);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 700;
    font-size: 1.1rem;
}

.product-badge {
    display: inline-block;
    padding: 6px 14px;
    background: rgba(41, 98, 255, 0.1);
    color: var(--primary-blue);
    font-size: 0.8rem;
    font-weight: 600;
    border-radius: 20px;
    margin-bottom: 16px;
}

.product-name {
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--primary-navy);
    margin-bottom: 8px;
}

.product-bank {
    font-size: 0.9rem;
    color: var(--text-light);
    margin-bottom: 20px;
}

.product-features {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 24px;
}

.product-feature {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.9rem;
    color: var(--text-medium);
}

.product-feature i {
    color: var(--primary-blue);
}

.product-rate {
    font-size: 2rem;
    font-weight: 800;
    color: var(--primary-navy);
    margin-bottom: 20px;
}

.product-rate span {
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-light);
}

/* ===== AD SECTIONS ===== */
.ad-section {
    background: var(--bg-white);
    border-radius: var(--radius-md);
    padding: 40px;
    margin: 40px 0;
    text-align: center;
    border: 2px dashed var(--border-light);
    min-height: 250px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.ad-label {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: var(--text-light);
    margin-bottom: 20px;
}

.ad-placeholder {
    background: var(--bg-light);
    border-radius: var(--radius-sm);
    padding: 60px 80px;
    color: var(--text-light);
    font-size: 1.1rem;
}

/* Prevent ads from overflowing */
.ad-section,
.ad-placeholder {
    box-sizing: border-box;
}

.ad-section > div,
.ad-placeholder > * {
    max-width: 100%;
}

/* External ad scripts container fix */
.ad-placeholder iframe,
.ad-placeholder img,
.ad-placeholder a,
.ad-placeholder div[id^="CRLeadStar"],
.ad-placeholder script + div {
    max-width: 100% !important;
    width: auto !important;
    height: auto !important;
    display: block !important;
    visibility: visible !important;
}

@media (max-width: 768px) {
    .ad-placeholder {
        padding: 20px;
    }
    
    .ad-section {
        padding: 20px 10px;
        margin: 20px 0;
    }
}

/* ===== CALCULATOR ===== */
.calculator-container {
    background: var(--bg-white);
    border-radius: var(--radius-lg);
    padding: 40px;
    box-shadow: var(--shadow-medium);
    max-width: 700px;
    margin: 0 auto;
}

.calculator-form {
    display: grid;
    gap: 24px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.form-label {
    font-weight: 600;
    color: var(--text-dark);
    font-size: 0.95rem;
}

.form-input {
    padding: 14px 18px;
    border: 2px solid var(--border-light);
    border-radius: var(--radius-sm);
    font-size: 1rem;
    transition: var(--transition-fast);
    background: white;
}

.form-input:focus {
    outline: none;
    border-color: var(--primary-blue);
    box-shadow: 0 0 0 4px rgba(41, 98, 255, 0.1);
}

.form-select {
    padding: 14px 18px;
    border: 2px solid var(--border-light);
    border-radius: var(--radius-sm);
    font-size: 1rem;
    background: white;
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%231a237e' d='M6 9L1 4h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 18px center;
    padding-right: 45px;
}

.calculator-result {
    background: var(--gradient-hero);
    border-radius: var(--radius-md);
    padding: 30px;
    color: white;
    text-align: center;
    margin-top: 30px;
}

.calculator-result-label {
    font-size: 0.9rem;
    opacity: 0.9;
    margin-bottom: 10px;
}

.calculator-result-value {
    font-size: 2.5rem;
    font-weight: 800;
}

/* ===== BLOG ===== */
.blog-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 30px;
}

.blog-card {
    background: var(--bg-white);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-soft);
    transition: var(--transition-medium);
}

.blog-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-strong);
}

.blog-image {
    height: 200px;
    background: var(--gradient-hero);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 3rem;
}

.blog-content {
    padding: 24px;
}

.blog-category {
    display: inline-block;
    padding: 5px 12px;
    background: rgba(41, 98, 255, 0.1);
    color: var(--primary-blue);
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    border-radius: 20px;
    margin-bottom: 12px;
}

.blog-title {
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--primary-navy);
    margin-bottom: 12px;
    line-height: 1.4;
}

.blog-excerpt {
    font-size: 0.95rem;
    color: var(--text-medium);
    margin-bottom: 16px;
    line-height: 1.6;
}

.blog-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 0.85rem;
    color: var(--text-light);
}

/* ===== FAQ ===== */
.faq-list {
    max-width: 800px;
    margin: 0 auto;
}

.faq-item {
    background: var(--bg-white);
    border-radius: var(--radius-md);
    margin-bottom: 16px;
    box-shadow: var(--shadow-soft);
    overflow: hidden;
}

.faq-question {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 24px 30px;
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--primary-navy);
    cursor: pointer;
    transition: var(--transition-fast);
}

.faq-question:hover {
    background: rgba(41, 98, 255, 0.02);
}

.faq-question i {
    transition: transform var(--transition-fast);
    color: var(--primary-blue);
}

.faq-item.active .faq-question i {
    transform: rotate(180deg);
}

.faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height var(--transition-medium);
}

.faq-item.active .faq-answer {
    max-height: 500px;
}

.faq-answer p {
    padding: 0 30px 24px;
    color: var(--text-medium);
    line-height: 1.7;
}

/* ===== FOOTER ===== */
.footer {
    background: var(--primary-navy);
    color: white;
    padding: 60px 0 30px;
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 40px;
    margin-bottom: 50px;
}

.footer-brand {
    max-width: 300px;
}

.footer-logo {
    font-size: 1.6rem;
    font-weight: 800;
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.footer-desc {
    opacity: 0.8;
    line-height: 1.7;
    font-size: 0.95rem;
}

.footer-title {
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 20px;
}

.footer-links {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.footer-link {
    opacity: 0.8;
    font-size: 0.95rem;
    transition: var(--transition-fast);
}

.footer-link:hover {
    opacity: 1;
    padding-left: 5px;
}

.footer-bottom {
    border-top: 1px solid rgba(255,255,255,0.1);
    padding-top: 30px;
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    justify-content: space-between;
    align-items: center;
    font-size: 0.9rem;
    opacity: 0.7;
}

/* ===== COMPACT HEADER ===== */
.header-compact {
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(20px);
}

.header-compact .container {
    height: 60px;
}

.header-compact .logo {
    font-size: 1.3rem;
}

.header-compact .logo-icon {
    width: 35px;
    height: 35px;
    font-size: 1.1rem;
}

.nav-grid {
    display: flex;
    align-items: center;
    gap: 4px;
}

.nav-group {
    position: relative;
}

.nav-group > a.nav-link,
.nav-group .nav-link {
    display: flex;
    align-items: center;
    gap: 5px;
    padding: 8px 12px;
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--text-medium);
    border-radius: 20px;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.nav-group > a.nav-link:hover,
.nav-group .nav-link:hover {
    color: var(--primary-blue);
    background: rgba(41, 98, 255, 0.08);
}

.nav-cta {
    background: var(--gradient-hero);
    color: white !important;
    padding: 8px 16px !important;
}

.nav-cta:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-medium);
}

/* ===== COMPACT HERO ===== */
.hero-compact {
    position: relative;
    min-height: auto;
    padding: 100px 0 0px;
    overflow: hidden;
}

.hero-animated-bg {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    overflow: hidden;
    pointer-events: none;
}

.blob {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.4;
    animation: morph 15s ease-in-out infinite;
}

.blob-1 {
    width: 500px;
    height: 500px;
    background: linear-gradient(135deg, #2962ff, #448aff);
    top: -200px;
    right: -100px;
    animation-delay: 0s;
}

.blob-2 {
    width: 400px;
    height: 400px;
    background: linear-gradient(135deg, #1a237e, #3949ab);
    bottom: -150px;
    left: -100px;
    animation-delay: -5s;
}

.blob-3 {
    width: 300px;
    height: 300px;
    background: linear-gradient(135deg, #82b1ff, #bbdefb);
    top: 50%;
    left: 50%;
    animation-delay: -10s;
}

.hero-categories {
    display: flex;
    gap: 20px;
    justify-content: center;
    margin-top: 40px;
    flex-wrap: wrap;
}

.hero-category-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    padding: 20px 25px;
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(10px);
    border-radius: var(--radius-lg);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: white;
    text-decoration: none;
    transition: all 0.3s ease;
    min-width: 140px;
}

.hero-category-card:hover {
    background: rgba(255, 255, 255, 0.25);
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

.hero-category-card i {
    font-size: 1.8rem;
}

.hero-category-card span {
    font-size: 0.9rem;
    font-weight: 500;
}

/* ===== CATEGORY CARDS ===== */
.category-card {
    transition: all 0.4s ease;
}

.category-card:hover {
    transform: translateY(-10px) scale(1.02);
}

/* ===== CALCULATOR SECTION ===== */
.calculator-section-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 30px;
    max-width: 900px;
    margin: 0 auto;
}

/* ===== BLOG PREVIEW ===== */
#blog-preview-grid {
    min-height: 400px;
}

/* Section compact */
.section-compact {
    padding: 40px 0;
}


/* ===== COMPARISON TABLE ===== */
.comparison-table-wrapper {
    overflow-x: auto;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-soft);
    max-width: 100%;
    -webkit-overflow-scrolling: touch;
}

.comparison-table {
    width: 100%;
    background: white;
    border-collapse: collapse;
    min-width: 800px;
}

@media (max-width: 768px) {
    .comparison-table {
        min-width: 600px;
    }
    
    .comparison-table th,
    .comparison-table td {
        padding: 12px 10px;
        font-size: 0.85rem;
    }
}

@media (max-width: 480px) {
    .comparison-table {
        min-width: 500px;
    }
}

.comparison-table th {
    background: var(--gradient-hero);
    color: white;
    padding: 18px 20px;
    text-align: left;
    font-weight: 600;
    font-size: 0.95rem;
}

.comparison-table td {
    padding: 18px 20px;
    border-bottom: 1px solid var(--border-light);
    font-size: 0.95rem;
}

.comparison-table tr:hover {
    background: rgba(41, 98, 255, 0.02);
}

.comparison-table .product-name-cell {
    font-weight: 700;
    color: var(--primary-navy);
}

.comparison-table .rate-cell {
    font-weight: 700;
    color: var(--primary-blue);
    font-size: 1.1rem;
}

/* ===== ARTICLE PAGE ===== */
.article-header {
    background: var(--gradient-hero);
    padding: 140px 0 80px;
    color: white;
    text-align: center;
}

.article-meta {
    display: flex;
    gap: 20px;
    justify-content: center;
    margin-top: 20px;
    font-size: 0.9rem;
    opacity: 0.9;
}

.article-content {
    max-width: 800px;
    margin: 0 auto;
    padding: 60px 20px;
}

.article-content h2 {
    font-size: 1.8rem;
    color: var(--primary-navy);
    margin: 40px 0 20px;
}

.article-content p {
    font-size: 1.05rem;
    color: var(--text-medium);
    margin-bottom: 20px;
    line-height: 1.8;
}

.article-content ul, .article-content ol {
    margin: 20px 0;
    padding-left: 30px;
}

.article-content li {
    margin-bottom: 10px;
    color: var(--text-medium);
}

.article-cta {
    background: rgba(41, 98, 255, 0.05);
    border-radius: var(--radius-md);
    padding: 30px;
    margin: 40px 0;
    text-align: center;
    border-left: 4px solid var(--primary-blue);
}

.article-cta h3 {
    color: var(--primary-navy);
    margin-bottom: 16px;
}

/* ===== CONTACT FORM ===== */
.contact-form {
    background: var(--bg-white);
    border-radius: var(--radius-lg);
    padding: 40px;
    box-shadow: var(--shadow-medium);
}

.contact-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
}

.contact-grid .form-group:first-child,
.contact-grid .form-group:nth-child(2) {
    grid-column: span 1;
}

.contact-grid .form-group:nth-child(3),
.contact-grid .form-group:nth-child(4) {
    grid-column: span 2;
}

.form-textarea {
    min-height: 150px;
    resize: vertical;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
    .section {
        padding: 60px 0;
    }
    
    .section-title {
        font-size: 1.8rem;
    }
    
    .hero {
        padding: 100px 0 0px !important;
        min-height: auto !important;
    }
    
    .hero-compact {
        padding: 120px 0 0px !important;
        min-height: auto !important;
    }
    
    .hero-content {
        padding-top: 20px;
        padding-bottom: 0 !important;
    }
    
    .hero-title {
        font-size: 1.4rem !important;
        text-align: center;
        line-height: 1.3;
    }
    
    .hero-subtitle {
        font-size: 0.9rem !important;
        text-align: center;
        margin-bottom: 25px;
    }
    
    .hero-badge {
        font-size: 0.75rem;
        padding: 5px 12px;
        margin-bottom: 15px;
        margin-top: 10px;
    }
    
    .hero-cta {
        gap: 8px;
        flex-wrap: nowrap;
        margin-bottom: 5px;
    }
    
    .hero-cta .btn {
        padding: 10px 16px;
        font-size: 0.85rem;
        white-space: nowrap;
    }
    
    .hero-categories {
        gap: 8px;
        margin-top: 8px;
        margin-bottom: -20px !important;
        padding-bottom: 0 !important;
    }
    
    .hero-category-card {
        padding: 12px 15px;
        min-width: 110px;
    }
    
    .hero-category-card i {
        font-size: 1.2rem;
    }
    
    .hero-category-card span {
        font-size: 0.75rem;
    }
    
    .hero-category-card span {
        font-size: 0.8rem;
    }
    
    .hero-badge {
        font-size: 0.8rem;
        padding: 6px 14px;
        margin-bottom: 20px;
    }
    
    .blob {
        opacity: 0.3;
    }
    
    .blob-1 {
        width: 300px;
        height: 300px;
        top: -100px;
        right: -50px;
    }
    
    .blob-2 {
        width: 250px;
        height: 250px;
        bottom: -80px;
        left: -50px;
    }
    
    .blob-3 {
        width: 200px;
        height: 200px;
    }
    
    .product-card {
        padding: 24px;
    }
    
    .calculator-container {
        padding: 20px;
        max-width: 100%;
        margin: 0 10px;
        box-sizing: border-box;
    }
    
    .calculator-form {
        width: 100%;
    }
    
    .form-input,
    .form-select {
        max-width: 100% !important;
        width: 100% !important;
        box-sizing: border-box;
        flex: none !important;
    }
    
    /* Fix for period selector container */
    .form-group > div[style*="flex"] {
        display: flex;
        flex-direction: column;
        gap: 10px;
        width: 100%;
    }
    
    .form-group > div[style*="flex"] > input,
    .form-group > div[style*="flex"] > select {
        width: 100% !important;
        max-width: 100% !important;
    }
    
    .contact-grid {
        grid-template-columns: 1fr;
    }
    
    .contact-grid .form-group {
        grid-column: span 1 !important;
    }
    
    .ad-section {
        padding: 24px;
    }
    
    .ad-placeholder {
        padding: 40px;
    }
}

@media (max-width: 480px) {
    .btn {
        padding: 12px 24px;
        font-size: 0.9rem;
    }
    
    .calculator-result-value {
        font-size: 1.5rem;
    }
    
    .calculator-result > div {
        grid-template-columns: 1fr !important;
        gap: 15px !important;
    }
    
    .calculator-container {
        padding: 20px;
    }
    
    .form-input, .form-select {
        padding: 12px 14px;
        font-size: 16px; /* Prevents zoom on iOS */
    }
}

/* ===== ADDITIONAL ANIMATIONS ===== */

/* Floating animation */
@keyframes float {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-20px); }
}

.animate-float {
    animation: float 3s ease-in-out infinite;
}

/* Pulse animation */
@keyframes pulse {
    0%, 100% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.05); opacity: 0.8; }
}

.animate-pulse {
    animation: pulse 2s ease-in-out infinite;
}

/* Shake animation */
@keyframes shake {
    0%, 100% { transform: translateX(0); }
    10%, 30%, 50%, 70%, 90% { transform: translateX(-5px); }
    20%, 40%, 60%, 80% { transform: translateX(5px); }
}

.animate-shake:hover {
    animation: shake 0.5s ease-in-out;
}

/* Rotate animation */
@keyframes rotate {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.animate-rotate {
    animation: rotate 10s linear infinite;
}

/* Bounce animation */
@keyframes bounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

.animate-bounce {
    animation: bounce 1s ease-in-out infinite;
}

/* Fade in from left */
@keyframes fadeInLeft {
    from {
        opacity: 0;
        transform: translateX(-50px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.scroll-reveal-left {
    opacity: 0;
    transform: translateX(-50px);
    transition: opacity 0.8s ease, transform 0.8s ease;
    pointer-events: none;
}

.scroll-reveal-left.revealed {
    opacity: 1;
    transform: translateX(0);
    pointer-events: auto;
}

/* Fade in from right */
@keyframes fadeInRight {
    from {
        opacity: 0;
        transform: translateX(50px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.scroll-reveal-right {
    opacity: 0;
    transform: translateX(50px);
    transition: opacity 0.8s ease, transform 0.8s ease;
    pointer-events: none;
}

.scroll-reveal-right.revealed {
    opacity: 1;
    transform: translateX(0);
    pointer-events: auto;
}

/* Zoom in animation */
@keyframes zoomIn {
    from {
        opacity: 0;
        transform: scale(0.8);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.scroll-reveal-zoom {
    opacity: 0;
    transform: scale(0.8);
    transition: opacity 0.8s ease, transform 0.8s ease;
    pointer-events: none;
}

.scroll-reveal-zoom.revealed {
    opacity: 1;
    transform: scale(1);
    pointer-events: auto;
}

/* Glow effect on hover */
.hover-glow {
    transition: box-shadow 0.3s ease;
}

.hover-glow:hover {
    box-shadow: 0 0 30px rgba(41, 98, 255, 0.4);
}

/* Gradient text animation */
@keyframes gradientText {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

.animate-gradient-text {
    background: linear-gradient(90deg, #ffffff, #e3f2fd, #bbdefb, #ffffff);
    background-size: 300% 100%;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: gradientText 3s ease infinite;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

/* Card lift effect */
.card-lift {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.card-lift:hover {
    transform: translateY(-15px) scale(1.02);
    box-shadow: 0 20px 40px rgba(26, 35, 126, 0.2);
}

/* Staggered animation delays */
.stagger-1 { animation-delay: 0.1s; }
.stagger-2 { animation-delay: 0.2s; }
.stagger-3 { animation-delay: 0.3s; }
.stagger-4 { animation-delay: 0.4s; }
.stagger-5 { animation-delay: 0.5s; }
.stagger-6 { animation-delay: 0.6s; }

/* Parallax effect container */
.parallax {
    background-attachment: fixed;
    background-position: center;
    background-repeat: no-repeat;
    background-size: cover;
}

/* Loading shimmer effect */
@keyframes shimmer {
    0% { background-position: -1000px 0; }
    100% { background-position: 1000px 0; }
}

.shimmer {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 1000px 100%;
    animation: shimmer 2s infinite;
}

/* Ripple effect for buttons */
@keyframes ripple {
    to {
        transform: scale(4);
        opacity: 0;
    }
}

.btn-ripple {
    position: relative;
    overflow: hidden;
}

.btn-ripple::after {
    content: '';
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    pointer-events: none;
    background-image: radial-gradient(circle, rgba(255,255,255,0.3) 10%, transparent 10.01%);
    background-repeat: no-repeat;
    background-position: 50%;
    transform: scale(10, 10);
    opacity: 0;
    transition: transform 0.5s, opacity 0.5s;
}

.btn-ripple:active::after {
    transform: scale(0, 0);
    opacity: 0.3;
    transition: 0s;
}

/* Typing cursor animation */
@keyframes typing {
    from { width: 0; }
    to { width: 100%; }
}

@keyframes blink-caret {
    from, to { border-color: transparent; }
    50% { border-color: var(--primary-blue); }
}

.typing-effect {
    overflow: hidden;
    border-right: 2px solid var(--primary-blue);
    white-space: nowrap;
    animation: 
        typing 3.5s steps(40, end),
        blink-caret 0.75s step-end infinite;
}

/* Morphing blob animation */
@keyframes morph {
    0%, 100% { border-radius: 60% 40% 30% 70% / 60% 30% 70% 40%; }
    50% { border-radius: 30% 60% 70% 40% / 50% 60% 30% 60%; }
}

.blob {
    animation: morph 8s ease-in-out infinite;
}

/* Counter animation class */
.counter-animate {
    font-variant-numeric: tabular-nums;
}

/* ===== MOBILE MENU IMPROVEMENTS ===== */

/* Hide desktop menu on mobile */
@media (max-width: 1023px) {
    .nav-grid {
        display: none !important;
    }
}

/* Hamburger animation - transform to X */
.menu-toggle.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

.menu-toggle.active span:nth-child(2) {
    opacity: 0;
}

.menu-toggle.active span:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -5px);
}

/* Improved mobile navigation styles */
@media (max-width: 1023px) {
    .nav-mobile {
        position: fixed;
        top: 70px;
        left: 0;
        right: 0;
        bottom: 0;
        background: linear-gradient(180deg, #ffffff 0%, #f5f7fa 100%);
        padding: 20px;
        transform: translateX(100%);
        transition: transform 0.3s ease;
        overflow-y: auto;
        z-index: 999;
        box-shadow: -4px 0 20px rgba(26, 35, 126, 0.15);
    }
    
    .nav-mobile.active {
        transform: translateX(0);
    }
    
    .nav-mobile-item {
        border-bottom: 1px solid var(--border-light);
        transition: background 0.2s ease;
    }
    
    .nav-mobile-item:hover {
        background: rgba(41, 98, 255, 0.05);
    }
    
    .nav-mobile-link {
        display: block;
        padding: 18px 16px;
        font-size: 1.1rem;
        font-weight: 600;
        color: var(--text-dark);
        transition: all 0.2s ease;
        border-left: 3px solid transparent;
    }
    
    .nav-mobile-link:hover {
        color: var(--primary-blue);
        border-left-color: var(--primary-blue);
        padding-left: 20px;
    }
    
    /* Close menu when clicking outside */
    body.menu-open {
        overflow: hidden;
    }
}

/* Small screen adjustments */
@media (max-width: 480px) {
    .nav-mobile-link {
        padding: 16px 12px;
        font-size: 1rem;
    }
    
    .menu-toggle {
        padding: 8px;
    }
    
    .menu-toggle span {
        width: 22px;
        height: 2px;
    }
}

/* Ensure desktop menu is always visible on large screens */
@media (min-width: 1024px) {
    .nav-mobile {
        display: none !important;
    }
}

/* ===== MOBILE ONLY FIXES ===== */
/* These rules only apply to mobile devices and don't affect desktop */
@media (max-width: 1023px) {
    html, body {
        overflow-x: hidden;
    }
    
    img, iframe, video, embed {
        max-width: 100%;
        height: auto;
    }
    
    /* Fix for Leadstar ads on mobile */
    [id^="CRLeadStar"] {
        max-width: 100% !important;
    }
    
    [id^="CRLeadStar"] img,
    [id^="CRLeadStar"] iframe {
        max-width: 100% !important;
        height: auto !important;
    }
}

@media (max-width: 768px) {
    .ad-section,
    .ad-placeholder {
        max-width: 100%;
    }
    
    .ad-section > div,
    .ad-placeholder > * {
        max-width: 100% !important;
    }
    
    .ad-placeholder iframe,
    .ad-placeholder img {
        max-width: 100% !important;
        height: auto !important;
    }
}

/* Center all ads */
.ad-placeholder {
    display: flex;
    justify-content: center;
    align-items: center;
}
