/* Animation */
@keyframes termsFadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Main Layout Fix */
.terms-main {
    position: relative;
    z-index: 1; /* Ensures it stays behind the sticky header (z-index 1000) */
    background-color: #ffffff;
    padding-top: 40px; 
    min-height: 100vh;
}

.terms-container {
    max-width: 900px;
    margin: 0 auto;
    padding: 60px 20px;
}

/* Header within Terms */
.terms-hero {
    margin-bottom: 50px;
    animation: termsFadeIn 0.8s ease-out forwards;
    text-align: center; /* Centers the H1, Subtitle, and Meta text */
}

/* ADD THIS: Set a default size for the icon on Desktop */
.terms-icon {
    width: 500px;
    height: auto;
    margin: 0 auto 20px auto; /* "0 auto" centers the image block, "20px" is bottom spacing */
    display: block; /* Required for margin: auto to center an image */
}

.terms-hero h1 {
    font-size: 3.2rem;
    color: #1d1d1f;
    margin-bottom: 10px;
}

.subtitle {
    font-size: 1.2rem;
    color: #86868b;
}

.terms-meta {
    margin-top: 20px;
    font-weight: 700;
    color: #FF0000;
    font-size: 0.9rem;
    text-transform: uppercase;
}

/* Grid Items */
.term-item {
    display: flex;
    gap: 25px;
    padding: 35px;
    background: #fff;
    border-bottom: 1px solid #eee;
    opacity: 0;
    animation: termsFadeIn 0.8s ease-out forwards;
}

.term-item:nth-child(1) { animation-delay: 0.1s; }
.term-item:nth-child(2) { animation-delay: 0.2s; }
.term-item:nth-child(3) { animation-delay: 0.3s; }
.term-item:nth-child(4) { animation-delay: 0.4s; }
.term-item:nth-child(5) { animation-delay: 0.5s; }

.term-number {
    font-family: serif;
    font-style: italic;
    font-size: 1.5rem;
    color: #d70707;
}

.term-content h3 {
    margin-top: 0;
    font-size: 1.4rem;
    color: #1d1d1f;
}

.term-content p {
    color: #424245;
    line-height: 1.6;
    font-size: 1.05rem;
}

/* Action Box */
.terms-footer-note {
    margin-top: 50px;
    background: #f5f5f7;
    padding: 25px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    gap: 15px;
    animation: termsFadeIn 0.8s ease-out 0.6s forwards;
    opacity: 0;
}

.info-icon {
    background: #d70707;
    color: white;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    flex-shrink: 0;
}

/* Mobile Adjustments */
@media (max-width: 768px) {
    .terms-hero h1 { font-size: 2.2rem; }
    .term-item { padding: 25px 10px; flex-direction: column; gap: 10px; }
}

/* ADD THIS: Resize the icon for mobile */
.terms-icon {
    width: 400px; 
    margin-bottom: 15px;
}

@media (prefers-reduced-motion: reduce) {
    .term-item, .terms-hero, .terms-footer-note {
        animation: none;
        opacity: 1;
    }
}