/* ===== RESET & BASE ===== */
*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    font-size: 16px;
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', 'Segoe UI', 'Roboto', 'Helvetica Neue', Arial, sans-serif;
    line-height: 1.6;
    color: #1a1a2e;
    background-color: #f0f2f5;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* ===== LAYOUT ===== */
.wrapper {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* ===== HEADER ===== */
.site-header {
    background: #0f4c75;
    background: linear-gradient(135deg, #0f4c75 0%, #3282b8 100%);
    color: #fff;
    padding: 20px 0;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.site-header .wrapper {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.site-header .logo {
    font-size: 1.5rem;
    font-weight: 800;
    color: #fff;
    text-decoration: none;
    letter-spacing: -0.5px;
    text-transform: uppercase;
}

.site-header .logo span {
    color: #bbe1fa;
}

/* ===== HERO SECTION ===== */
.index-hero {
    background: url('hero-pattern.svg'), linear-gradient(135deg, #1b262c 0%, #0f4c75 100%);
    background-size: cover;
    color: #fff;
    padding: 100px 0 80px;
    text-align: center;
    margin-bottom: 40px;
    clip-path: polygon(0 0, 100% 0, 100% 90%, 0 100%);
}

.index-hero h1 {
    font-size: 3.5rem;
    font-weight: 900;
    margin-bottom: 15px;
    letter-spacing: -1.5px;
    line-height: 1.1;
    text-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
}

.index-hero p {
    font-size: 1.35rem;
    opacity: 0.9;
    max-width: 700px;
    margin: 0 auto 50px;
    font-weight: 300;
}

/* ===== SEARCH BOX ===== */
.search-container {
    max-width: 700px;
    margin: 0 auto;
    position: relative;
}

.search-box {
    width: 100%;
    position: relative;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.2);
    border-radius: 50px;
    transition: transform 0.3s ease;
}

.search-box:hover,
.search-box:focus-within {
    transform: translateY(-2px);
}

.search-box input {
    width: 100%;
    padding: 22px 30px 22px 65px;
    border: none;
    border-radius: 50px;
    font-size: 1.15rem;
    outline: none;
    background: #fff;
    color: #1a1a2e;
    font-weight: 500;
}

.search-icon {
    position: absolute;
    left: 25px;
    top: 50%;
    transform: translateY(-50%);
    color: #0f4c75;
    font-size: 1.4rem;
    pointer-events: none;
}

/* ===== ARTICLE GRID ===== */
.article-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
    gap: 30px;
    margin-bottom: 60px;
}

.results-count {
    text-align: center;
    color: #666;
    font-weight: 600;
    margin-bottom: 25px;
    text-transform: uppercase;
    font-size: 0.85rem;
    letter-spacing: 1px;
}

/* ===== CARDS ===== */
.card {
    background: #fff;
    border-radius: 16px;
    padding: 30px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.04);
    transition: all 0.3s cubic-bezier(0.165, 0.84, 0.44, 1);
    display: flex;
    flex-direction: column;
    border: 1px solid rgba(0, 0, 0, 0.03);
    position: relative;
    overflow: hidden;
}

.card:hover {
    transform: translateY(-8px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.1);
    border-color: rgba(50, 130, 184, 0.3);
}

.card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: linear-gradient(90deg, #3282b8, #0f4c75);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.card:hover::before {
    opacity: 1;
}

.category-tag {
    font-size: 0.75rem;
    font-weight: 800;
    color: #3282b8;
    background: rgba(50, 130, 184, 0.1);
    padding: 6px 12px;
    border-radius: 20px;
    align-self: flex-start;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 15px;
}

.card h3 {
    font-size: 1.4rem;
    font-weight: 800;
    color: #1b262c;
    margin-bottom: 12px;
    line-height: 1.3;
}

.card p {
    color: #555;
    font-size: 1rem;
    line-height: 1.6;
    margin-bottom: 25px;
    flex-grow: 1;
    opacity: 0.85;
}

.card a {
    text-align: center;
    display: block;
    width: 100%;
    padding: 12px 0;
    background: #f1f7fc;
    color: #0f4c75;
    text-decoration: none;
    border-radius: 8px;
    font-weight: 700;
    font-size: 0.95rem;
    transition: all 0.2s ease;
}

.card a:hover {
    background: #0f4c75;
    color: #fff;
    box-shadow: 0 4px 10px rgba(15, 76, 117, 0.25);
}


/* ===== ARTICLE CONTENT (Legacy for article pages) ===== */
article {
    background: #fff;
    border-radius: 16px;
    padding: 50px 60px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.06);
    margin-bottom: 40px;
}

article h1 {
    font-size: 2.2rem;
    font-weight: 800;
    color: #1b262c;
    margin-bottom: 25px;
    border-bottom: 2px solid #f1f7fc;
    padding-bottom: 20px;
    line-height: 1.25;
}

article h2 {
    font-size: 1.6rem;
    color: #0f4c75;
    margin: 40px 0 20px;
    font-weight: 700;
}

article h3 {
    font-size: 1.3rem;
    color: #3282b8;
    margin: 30px 0 15px;
    font-weight: 600;
}

article p {
    font-size: 1.05rem;
    margin-bottom: 20px;
    line-height: 1.8;
    color: #2c3e50;
}

article ul,
article ol {
    padding-left: 20px;
    margin-bottom: 25px;
}

article li {
    margin-bottom: 10px;
    padding-left: 10px;
}

/* Info Boxes */
.info-box {
    padding: 25px;
    border-radius: 12px;
    margin: 30px 0;
    font-size: 1.05rem;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.03);
}

.info-box.tip {
    background: #e8f5e9;
    border-left: 5px solid #43a047;
    color: #2e7d32;
}

.info-box.warning {
    background: #fff8e1;
    border-left: 5px solid #ffb300;
    color: #f57f17;
}

.info-box.info {
    background: #e3f2fd;
    border-left: 5px solid #1e88e5;
    color: #1565c0;
}

/* Breadcrumbs */
.breadcrumbs {
    margin: 20px 0 30px;
    font-size: 0.95rem;
    color: #888;
}

.breadcrumbs a {
    color: #3282b8;
    text-decoration: none;
    font-weight: 600;
    transition: color 0.2s;
}

.breadcrumbs a:hover {
    color: #0f4c75;
}

/* ===== FOOTER ===== */
.site-footer {
    background: #1b262c;
    color: #8fa6b8;
    padding: 40px 0;
    text-align: center;
    font-size: 0.95rem;
    margin-top: 60px;
}

.site-footer p {
    margin-bottom: 10px;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
    .index-hero h1 {
        font-size: 2.2rem;
    }

    .article-grid {
        grid-template-columns: 1fr;
    }

    article {
        padding: 30px 20px;
    }

    .card {
        padding: 25px;
    }
}

/* ===== PROMO BLOCK ===== */
.promo-block {
    background: linear-gradient(135deg, #1b262c 0%, #0f4c75 100%);
    border-radius: 16px;
    padding: 35px 40px;
    margin: 40px 0 20px;
    color: #fff;
    text-align: center;
    position: relative;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(15, 76, 117, 0.25);
}

.promo-block::before {
    content: '';
    position: absolute;
    top: -50px;
    right: -50px;
    width: 150px;
    height: 150px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 50%;
}

.promo-block h3 {
    color: #fff !important;
    /* Override potential article h3 styles */
    font-size: 1.6rem;
    margin: 0 0 15px;
    font-weight: 800;
}

.promo-block p {
    color: rgba(255, 255, 255, 0.9);
    font-size: 1.1rem;
    max-width: 600px;
    margin: 0 auto 25px;
    line-height: 1.6;
}

.promo-button {
    display: inline-block;
    background: #bbe1fa;
    color: #0f4c75;
    font-weight: 700;
    text-decoration: none;
    padding: 14px 35px;
    border-radius: 50px;
    font-size: 1.1rem;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.promo-button:hover {
    background: #fff;
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.25);
    color: #0f4c75;
    /* Ensure text color sticks */
}

@media (max-width: 600px) {
    .promo-block {
        padding: 30px 20px;
    }

    .promo-block h3 {
        font-size: 1.4rem;
    }
}

/* ===== ARTICLE IMAGES ===== */
.article-image {
    margin: 30px 0;
    text-align: center;
}

.article-image img {
    max-width: 100%;
    height: auto;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease;
}

.article-image img:hover {
    transform: scale(1.02);
}

@media (min-width: 768px) {
    .article-image img {
        max-width: 80%;
    }
}