.hero {
    position: relative;
    min-height: 520px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    background-color: #1a1a1a;
    background-image: url('/images/home-hero.jpg');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}
.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.55);
}
.hero-content {
    position: relative;
    z-index: 1;
    max-width: 720px;
    padding: 60px 24px;
}
.hero-content h1 {
    color: #fff;
    font-size: 2.8rem;
    margin: 0 0 16px;
}
.hero-subtitle {
    color: #ddd;
    font-size: 1.15rem;
    margin: 0 0 32px;
    font-weight: 400;
}
.btn-cta {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 14px 36px;
    background: var(--color-cta);
    color: #fff;
    font-size: 16px;
    font-weight: 700;
    text-decoration: none;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    position: relative;
    overflow: hidden;
    transition: background-color 0.2s, box-shadow 0.2s;
}
.btn-cta::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 0;
    height: 100%;
    background: rgba(0,0,0,0.1);
    transition: width 0.35s ease;
}
.btn-cta:hover {
    background: #e64a19;
    text-decoration: none;
    box-shadow: 0 6px 18px rgba(255,87,34,0.25);
}
.btn-cta:hover::before {
    width: 100%;
}
.btn-cta .btn-arrow {
    display: inline-block;
    transition: transform 0.25s ease;
}
.btn-cta:hover .btn-arrow {
    transform: translateX(4px);
}

.intro-section {
    max-width: 800px;
    margin: 0 auto;
    padding: 52px 24px;
    text-align: center;
}
.intro-section p {
    font-size: 1.05rem;
    color: #555;
    line-height: 1.6;
    margin: 0;
}

.categories-section {
    padding: 20px 24px 52px;
    max-width: 1200px;
    margin: 0 auto;
}
.categories-section h2 {
    text-align: center;
    margin: 0 0 28px;
}
.cat-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 16px;
}
.cat-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 28px 16px;
    background: #f7f7f7;
    border: 1px solid var(--border);
    border-radius: 8px;
    text-decoration: none;
    color: var(--color-brand);
    transition: background-color 0.2s, box-shadow 0.2s;
}
.cat-card:hover {
    background: #efefef;
    box-shadow: 0 4px 14px rgba(0,0,0,0.07);
    text-decoration: none;
}
.cat-card svg {
    margin: 0 0 12px;
    color: var(--color-brand);
}
.cat-card span {
    font-size: 14px;
    font-weight: 700;
}

.articles-section {
    padding: 20px 24px 52px;
    max-width: 1200px;
    margin: 0 auto;
}
.articles-section h2 {
    text-align: center;
    margin: 0 0 36px;
}

.masonry-grid {
    column-count: 3;
    column-gap: 24px;
}
.masonry-card {
    break-inside: avoid;
    margin-bottom: 24px;
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 8px;
    overflow: hidden;
    transition: box-shadow 0.2s;
}
.masonry-card:hover {
    box-shadow: 0 4px 16px rgba(0,0,0,0.08);
}
.masonry-card img {
    width: 100%;
    aspect-ratio: 3 / 2;
    object-fit: cover;
    display: block;
}
.masonry-card:nth-child(3n+2) img {
    aspect-ratio: 16 / 10;
}
.card-body {
    padding: 20px;
}
.card-category {
    font-size: 13px;
    color: #999;
    font-weight: 400;
    margin: 0 0 6px;
    line-height: 1.6;
}
.card-body h3 {
    font-size: 1.1rem;
    margin: 0 0 10px;
    line-height: 1.6;
}
.card-body h3 a {
    color: var(--color-brand);
    text-decoration: none;
}
.card-body h3 a:hover {
    color: var(--color-cta);
    text-decoration: underline;
}
.card-excerpt {
    font-size: 14px;
    color: #666;
    margin: 0 0 12px;
    line-height: 1.6;
}
.card-meta {
    font-size: 13px;
    color: #999;
    line-height: 1.6;
    margin: 0;
}
.masonry-card--featured {
    border-width: 2px;
    border-color: var(--color-brand);
}
.masonry-card--featured .card-body h3 {
    font-size: 1.25rem;
}
.masonry-card--featured .card-excerpt {
    font-size: 15px;
    color: #555;
}

.tools-section {
    padding: 20px 24px 56px;
    max-width: 1200px;
    margin: 0 auto;
}
.tools-section h2 {
    text-align: center;
    margin: 0 0 8px;
}
.tools-subtitle {
    text-align: center;
    color: var(--text-muted);
    margin: 0 0 36px;
    font-size: 15px;
    font-weight: 400;
}
.tools-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 28px;
}
.tool-card {
    background: #f7f7f7;
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 28px;
}
.tool-card h3 {
    font-size: 1.2rem;
    margin: 0 0 6px;
}
.tool-desc {
    font-size: 14px;
    color: var(--text-muted);
    margin: 0 0 20px;
    line-height: 1.6;
}
.tool-card label {
    display: block;
    font-size: 14px;
    font-weight: 700;
    margin: 0 0 6px;
    color: var(--color-brand);
}
.tool-card select,
.tool-card input[type="number"] {
    width: 100%;
    padding: 10px 12px;
    font-size: 15px;
    border: 1px solid var(--border);
    border-radius: 6px;
    background: #fff;
    margin: 0 0 16px;
    font-family: inherit;
    color: var(--color-brand);
}
.tool-card select:focus,
.tool-card input[type="number"]:focus {
    outline: 2px solid var(--color-cta);
    outline-offset: -1px;
    border-color: var(--color-cta);
}
.tool-card .btn-cta {
    width: 100%;
    justify-content: center;
    margin-top: 4px;
    padding: 12px 24px;
}
.tool-card .btn-cta::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 0;
    height: 2px;
    background: rgba(255,255,255,0.6);
    transition: width 0.3s ease, left 0.3s ease;
}
.tool-card .btn-cta:hover::after {
    width: 70%;
    left: 15%;
}
.tool-results {
    margin: 20px 0 0;
}
.tool-results table {
    width: 100%;
    border-collapse: collapse;
}
.tool-results th,
.tool-results td {
    padding: 10px 12px;
    text-align: left;
    font-size: 14px;
    border-bottom: 1px solid var(--border);
    color: var(--color-brand);
    font-weight: 400;
    line-height: 1.6;
}
.tool-results th {
    font-weight: 700;
    color: var(--color-brand);
}
.tool-results td:last-child {
    text-align: right;
    font-weight: 700;
}
.tool-results .total-row td {
    font-weight: 700;
    border-top: 2px solid var(--color-brand);
    border-bottom: none;
    padding-top: 14px;
}

.newsletter-section {
    padding: 52px 24px;
    background: #f2f2f2;
}
.newsletter-inner {
    max-width: 580px;
    margin: 0 auto;
    text-align: center;
}
.newsletter-inner h2 {
    margin: 0 0 8px;
}
.newsletter-inner > p {
    font-size: 15px;
    color: #666;
    margin: 0 0 24px;
    line-height: 1.6;
}
.newsletter-form {
    display: flex;
    gap: 12px;
}
.newsletter-form input[type="email"] {
    flex: 1;
    padding: 12px 16px;
    font-size: 15px;
    border: 1px solid var(--border);
    border-radius: 6px;
    font-family: inherit;
    color: var(--color-brand);
    background: #fff;
}
.newsletter-form input[type="email"]:focus {
    outline: 2px solid var(--color-cta);
    outline-offset: -1px;
    border-color: var(--color-cta);
}
.newsletter-form .btn-cta {
    padding: 12px 28px;
    white-space: nowrap;
}
.newsletter-success {
    font-size: 15px;
    color: #555;
    padding: 12px 0;
    margin: 0;
    line-height: 1.6;
}

@media (max-width: 900px) {
    .masonry-grid {
        column-count: 2;
    }
    .tools-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .hero {
        min-height: 420px;
    }
    .hero-content {
        padding: 48px 20px;
    }
    .hero-content h1 {
        font-size: 2rem;
    }
    .hero-subtitle {
        font-size: 1rem;
    }
    .cat-grid {
        grid-template-columns: repeat(3, 1fr);
    }
    .newsletter-form {
        flex-direction: column;
    }
    .newsletter-form .btn-cta {
        width: 100%;
        justify-content: center;
    }
}

@media (max-width: 580px) {
    .masonry-grid {
        column-count: 1;
    }
    .hero {
        min-height: 360px;
    }
    .hero-content h1 {
        font-size: 1.65rem;
    }
    .cat-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .card-body {
        padding: 16px;
    }
    .tool-card {
        padding: 20px;
    }
}