/* Hero Section */
.terms-hero {
    background: linear-gradient(135deg, #0D3458 0%, #1a5c99 100%);
    color: white;
    padding: clamp(4rem, 15vh, 8rem) 2rem;
    text-align: center;
}

.terms-hero .container {
    max-width: 900px;
    margin: 0 auto;
}

.hero-title {
    font-size: clamp(2.5rem, 5vw, 4rem);
    font-weight: 700;
    margin-bottom: 1rem;
    line-height: 1.2;
}

.hero-subtitle {
    font-size: clamp(1.1rem, 2vw, 1.5rem);
    opacity: 0.9;
}

/* Table of Contents */
.terms-toc {
    max-width: 1000px;
    margin: -3rem auto 4rem;
    padding: 2rem;
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    position: relative;
    z-index: 2;
}

.terms-toc h2 {
    font-size: clamp(1.5rem, 3vw, 2rem);
    margin-bottom: 2rem;
    color: var(--color-primary);
}

.toc-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
}

.toc-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    border-radius: 8px;
    background: var(--color-light);
    text-decoration: none;
    color: inherit;
    transition: all 0.3s ease;
}

.toc-item:hover {
    background: var(--color-primary);
    color: white;
    transform: translateY(-2px);
}

.toc-item span:first-child {
    font-weight: 600;
    color: var(--color-primary);
}

.toc-item:hover span:first-child {
    color: white;
}

/* Terms Content */
.terms-content {
    max-width: 800px;
    margin: 0 auto;
    padding: 0 2rem 4rem;
}

/* Terms Block Enhanced Styling */
.terms-block {
    margin-bottom: 2rem;
    padding: 3rem;
    background: #f8fafc;
    border-radius: 16px;
    transition:
        transform 0.5s cubic-bezier(0.68, -0.6, 0.32, 1.6),
        background-color 0.5s ease,
        box-shadow 0.5s ease,
        border-color 0.5s ease;
    position: relative;
    overflow: hidden;
    border: 1px solid rgba(13, 52, 88, 0.08);
}

/* Hover effects */
.terms-block:hover {
    transform: translateY(-4px);
    background: #e8f1ff;
    box-shadow:
        0 4px 24px -1px rgba(13, 52, 88, 0.12),
        0 2px 8px -1px rgba(13, 52, 88, 0.08);
    border-color: rgba(13, 52, 88, 0.15);
}

/* Enhanced headings with icon support */
.terms-block h2,
.terms-block h3 {
    display: flex;
    align-items: center;
    gap: 1rem;
    font-size: clamp(1.3rem, 2.5vw, 1.8rem);
    margin-bottom: clamp(1.5rem, 4vw, 2rem);
    color: var(--color-primary);
    position: relative;
    padding-bottom: clamp(0.75rem, 2vw, 1rem);
}

.terms-block h2::after,
.terms-block h3::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 2px;
    background: linear-gradient(to right,
            var(--color-primary) 0%,
            rgba(122, 174, 222, 0.5) 50%,
            transparent 100%);
}

/* Enhanced list styling */
.terms-block ul {
    display: grid;
    gap: 0.75rem;
    padding-left: 0;
    list-style: none;
    margin: 1.5rem 0;
}

.terms-block ul li {
    background: rgba(255, 255, 255, 0.5);
    padding: 1rem;
    border-radius: 8px;
    position: relative;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    transition: all 0.3s ease;
    border: 1px solid rgba(13, 52, 88, 0.04);
}

.terms-block ul li:hover {
    background: white;
    transform: translateX(8px);
    box-shadow: 0 2px 8px rgba(13, 52, 88, 0.05);
    border-color: rgba(13, 52, 88, 0.08);
}

/* Icon styling in list items */
.terms-block ul li .material-icons {
    color: var(--color-primary);
    font-size: 1.4rem;
    min-width: 24px;
    opacity: 0.8;
    transition: all 0.3s ease;
}

.terms-block ul li:hover .material-icons {
    opacity: 1;
}

/* Notice styling */
.terms-block .notice {
    background: rgba(13, 52, 88, 0.03);
    padding: 1.5rem;
    border-radius: 8px;
    border-left: 4px solid var(--color-primary);
    margin: 2rem 0;
    display: flex;
    align-items: flex-start;
    gap: 1rem;
}

/* Important term styling */
.important-term {
    background: rgba(var(--color-primary-rgb), 0.05);
    padding: 1.5rem;
    border-radius: 8px;
    margin: 1.5rem 0;
}

/* Mobile Responsiveness */
@media (max-width: 768px) {
    .terms-block {
        padding: 1.5rem;
        margin: 0 auto 2rem;
        width: 90%;
    }

    .terms-block h2 {
        font-size: 1.5rem;
    }

    .terms-block ul li {
        padding: 0.75rem;
    }

    .terms-block ul li .material-icons {
        font-size: 1.2rem;
    }

    .notice {
        padding: 1rem;
    }
}

/* For even smaller screens */
@media (max-width: 480px) {
    .terms-block {
        width: 95%;
        padding: 1.25rem;
    }

    .terms-block h2 {
        font-size: 1.3rem;
    }
}

/* Notice Styling */
.notice {
    background: linear-gradient(to right, var(--color-light), #f8f9fa);
    border-left: 4px solid var(--color-primary);
    border-radius: 12px;
    padding: 1.5rem;
    margin: 2rem 0;
}

.notice-content h4 {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--color-primary);
    margin: 0 0 0.5rem 0;
    font-size: 1.1rem;
}

.notice-content ul {
    display: block;
    padding-left: 1.25rem;
    list-style: disc;
    margin: 0.5rem 0;
}

/* Definition Lists */
.terms-definitions {
    display: grid;
    gap: 1.5rem;
    margin: 1.5rem 0;
}

.term-definition {
    padding: 1rem;
    background: var(--color-light);
    border-radius: 8px;
}

.term-definition dt {
    font-weight: 600;
    color: var(--color-primary);
    margin-bottom: 0.5rem;
}

.term-definition dd {
    color: var(--color-secondary);
    margin-left: 0;
}

/* Enhanced Contact Section */
.contact-section {
    background: linear-gradient(135deg, #fff, var(--color-light));
}

.contact-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-top: 2rem;
}

.contact-card {
    padding: 1.5rem;
    background: white;
    border-radius: 8px;
    text-align: center;
    text-decoration: none;
    color: inherit;
    transition: all 0.3s ease;
}

.contact-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

/* Print Styles */
@media print {
    .terms-hero {
        background: none;
        color: black;
        padding: 2rem 0;
    }

    .terms-block,
    .notice {
        box-shadow: none;
        border: 1px solid #eee;
    }
}

/* Terms Block Numbering */
.terms-block::before {
    content: attr(data-number);
    position: absolute;
    top: 2rem;
    right: 2rem;
    font-size: 4.5rem;
    font-weight: 800;
    color: rgba(13, 52, 88, 0.08);
    line-height: 1;
    font-family: 'Poppins', sans-serif;
    transition: color 0.5s cubic-bezier(0.68, -0.6, 0.32, 1.6);
}

.terms-block:hover::before {
    color: #0D3458;
}

/* Mobile adjustments for numbering */
@media (max-width: 768px) {
    .terms-block::before {
        font-size: 3rem;
        top: 1.5rem;
        right: 1.5rem;
    }
}