/* ==========================================
   TERMS & CONDITIONS PAGE STYLES
   Scaled to match homepage compact style
   Legacy Protection Services
========================================== */

/* ------------------------------------------
   TERMS SECTION
------------------------------------------ */
.terms-section {
    padding: clamp(48px, 6vw, 80px) 0;
    background: linear-gradient(135deg, #f8fafc 0%, #ffffff 100%);
}

.terms-wrapper {
    max-width: 1300px;
    margin: 0 auto;
}

/* ------------------------------------------
   TERMS BANNER
------------------------------------------ */
.terms-banner {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
    flex-wrap: wrap;
    margin-bottom: 2.5rem;
    padding: 0.75rem 1.5rem;
    background: var(--color-white);
    border-radius: 2rem;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    border: 1px solid rgba(0, 0, 0, 0.06);
}

.terms-banner__item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.75rem;  /* Reduced from 0.85rem */
    color: var(--color-text-light);
}

.terms-banner__item i {
    color: var(--color-primary);
    font-size: 0.85rem;  /* Reduced from 1rem */
}

/* ------------------------------------------
   TERMS GRID (2 Columns)
------------------------------------------ */
.terms-grid {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 2rem;
}

/* ------------------------------------------
   SIDEBAR NAVIGATION
------------------------------------------ */
.terms-nav-sidebar {
    position: relative;
}

.nav-sticky {
    position: sticky;
    top: 100px;
    background: var(--color-white);
    border-radius: 1rem;
    padding: 1.25rem;
    border: 1px solid rgba(0, 0, 0, 0.06);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.nav-sticky h3 {
    font-family: var(--font-heading);
    font-size: 0.85rem;  /* Reduced from 1rem */
    font-weight: 700;
    color: var(--color-black);
    margin-bottom: 0.875rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--color-primary);
    display: inline-block;
}

.nav-sticky ul {
    list-style: none;
    margin: 0 0 1rem 0;
    padding: 0;
}

.nav-sticky li {
    margin-bottom: 0.2rem;
}

.nav-sticky a {
    display: block;
    padding: 0.4rem 0.6rem;  /* Reduced from 0.5rem 0.75rem */
    font-size: 0.75rem;  /* Reduced from 0.85rem */
    color: var(--color-text-light);
    text-decoration: none;
    border-radius: 0.5rem;
    transition: all 0.2s ease;
}

.nav-sticky a:hover {
    background: rgba(214, 154, 59, 0.08);
    color: var(--color-primary);
    transform: translateX(4px);
}

.nav-sticky a.active {
    background: rgba(214, 154, 59, 0.12);
    color: var(--color-primary);
    font-weight: 600;
}

/* Help Box in Sidebar */
.nav-help {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid rgba(0, 0, 0, 0.06);
    text-align: center;
}

.nav-help i {
    font-size: 1.5rem;  /* Reduced from 2rem */
    color: var(--color-primary);
    margin-bottom: 0.4rem;
}

.nav-help h4 {
    font-size: 0.8rem;  /* Reduced from 0.9rem */
    font-weight: 700;
    margin-bottom: 0.2rem;
}

.nav-help p {
    font-size: 0.65rem;  /* Reduced from 0.75rem */
    color: var(--color-text-light);
    margin-bottom: 0.6rem;
}

.nav-btn {
    display: inline-block;
    background: var(--color-primary);
    color: var(--color-black);
    padding: 0.35rem 0.875rem;  /* Reduced from 0.4rem 1rem */
    border-radius: 2rem;
    font-size: 0.65rem;  /* Reduced from 0.75rem */
    font-weight: 600;
    text-decoration: none;
    transition: all 0.2s ease;
}

.nav-btn:hover {
    background: var(--color-primary-dark);
    transform: translateY(-2px);
}

/* ------------------------------------------
   MAIN CONTENT
------------------------------------------ */
.terms-main {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;  /* Reduced from 1.5rem */
}

/* Section Blocks */
.terms-section-block {
    background: var(--color-white);
    border-radius: 1rem;
    padding: 1.25rem;  /* Reduced from 1.75rem */
    border: 1px solid rgba(0, 0, 0, 0.06);
    transition: all 0.2s ease;
}

.terms-section-block:hover {
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.05);
}

/* Section Headers */
.section-header {
    display: flex;
    align-items: center;
    gap: 0.6rem;  /* Reduced from 0.75rem */
    margin-bottom: 1rem;  /* Reduced from 1.25rem */
    padding-bottom: 0.6rem;  /* Reduced from 0.75rem */
    border-bottom: 2px solid rgba(214, 154, 59, 0.3);
}

.section-header i {
    font-size: 1.2rem;  /* Reduced from 1.5rem */
    color: var(--color-primary);
}

.section-header h2 {
    font-family: var(--font-heading);
    font-size: clamp(1.1rem, 2.5vw, 1.3rem);  /* Reduced from 1.35rem */
    font-weight: 700;
    color: var(--color-black);
    margin: 0;
}

/* Paragraphs */
.terms-section-block p {
    font-size: 0.85rem;  /* Reduced from 0.95rem - matches homepage */
    line-height: 1.65;  /* Adjusted */
    color: var(--color-text-light);
    margin-bottom: 0.75rem;
}

.terms-section-block p:last-child {
    margin-bottom: 0;
}

/* Styled Lists */
.styled-list {
    list-style: none;
    margin: 0.75rem 0;
    padding: 0;
}

.styled-list li {
    position: relative;
    padding-left: 1.25rem;
    margin-bottom: 0.5rem;
    font-size: 0.85rem;  /* Reduced from 0.95rem */
    line-height: 1.6;
    color: var(--color-text-light);
}

.styled-list li::before {
    content: "▹";
    position: absolute;
    left: 0;
    color: var(--color-primary);
    font-size: 0.7rem;
}

/* Info Highlight */
.info-highlight {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    background: rgba(214, 154, 59, 0.05);
    padding: 0.875rem;
    border-radius: 0.75rem;
    margin-top: 0.75rem;
    border-left: 3px solid var(--color-primary);
}

.info-highlight i {
    color: var(--color-primary);
    font-size: 1rem;
    margin-top: 0.15rem;
}

.info-highlight p {
    margin: 0;
    font-size: 0.8rem;
}

/* Contact Block */
.contact-block {
    background: linear-gradient(135deg, #ffffff 0%, #fef9f0 100%);
    border-left: 4px solid var(--color-primary);
}

.contact-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 0.875rem;
    margin: 0.875rem 0;
}

.contact-method {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem;
    background: rgba(214, 154, 59, 0.04);
    border-radius: 0.75rem;
}

.contact-method i {
    width: 34px;  /* Reduced from 40px */
    height: 34px;  /* Reduced from 40px */
    background: rgba(214, 154, 59, 0.1);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--color-primary);
    font-size: 1rem;  /* Reduced from 1.2rem */
}

.contact-method strong {
    display: block;
    font-size: 0.6rem;  /* Reduced from 0.7rem */
    color: var(--color-text-light);
    margin-bottom: 0.15rem;
}

.contact-method a,
.contact-method span {
    font-size: 0.75rem;  /* Reduced from 0.85rem */
    color: var(--color-black);
    text-decoration: none;
}

.contact-method a:hover {
    color: var(--color-primary);
}

/* Info Officer */
.info-officer {
    background: rgba(214, 154, 59, 0.08);
    padding: 0.6rem 0.875rem;
    border-radius: 0.75rem;
    font-size: 0.75rem;  /* Reduced from 0.85rem */
    margin: 0.75rem 0;
}

/* Links */
.terms-section-block a {
    color: var(--color-primary);
    text-decoration: none;
}

.terms-section-block a:hover {
    text-decoration: underline;
}

/* Terms Footer */
.terms-footer {
    text-align: center;
    padding-top: 1rem;
    margin-top: 0.5rem;
    border-top: 1px solid rgba(0, 0, 0, 0.06);
}

.terms-footer p {
    font-size: 0.7rem;  /* Reduced from 0.8rem */
    color: var(--color-text-light);
}

/* ------------------------------------------
   REVEAL ANIMATIONS
------------------------------------------ */
.reveal-item {
    opacity: 0;
    transform: translateY(28px);
    transition: opacity 0.7s cubic-bezier(0.2, 0.9, 0.4, 1.1), transform 0.7s cubic-bezier(0.2, 0.9, 0.4, 1.1);
}

.reveal-item.revealed {
    opacity: 1;
    transform: translateY(0);
}

/* ------------------------------------------
   ENHANCED RESPONSIVE BREAKPOINTS
------------------------------------------ */

/* Large desktop */
@media (max-width: 1199px) {
    .terms-grid {
        gap: 1.5rem;
    }
}

/* Tablet landscape */
@media (max-width: 1024px) {
    .terms-grid {
        grid-template-columns: 240px 1fr;
        gap: 1.25rem;
    }
}

/* Tablet portrait */
@media (max-width: 900px) {
    .terms-grid {
        grid-template-columns: 1fr;
    }
    
    .terms-nav-sidebar {
        order: 2;
    }
    
    .nav-sticky {
        position: relative;
        top: 0;
    }
    
    .nav-sticky ul {
        display: flex;
        flex-wrap: wrap;
        gap: 0.4rem;
    }
    
    .nav-sticky li {
        margin-bottom: 0;
    }
    
    .nav-sticky a {
        padding: 0.3rem 0.7rem;
        font-size: 0.7rem;
    }
    
    .nav-sticky h3 {
        font-size: 0.8rem;
    }
    
    .nav-help {
        display: none;
    }
}

/* Mobile landscape */
@media (max-width: 768px) {
    .terms-banner {
        flex-direction: column;
        align-items: center;
        gap: 0.6rem;
        border-radius: 1rem;
        padding: 0.75rem 1rem;
        margin-bottom: 1.5rem;
    }
    
    .terms-banner__item {
        font-size: 0.7rem;
    }
    
    .terms-banner__item i {
        font-size: 0.75rem;
    }
    
    .terms-section-block {
        padding: 1rem;
    }
    
    .section-header {
        gap: 0.5rem;
        margin-bottom: 0.75rem;
        padding-bottom: 0.5rem;
    }
    
    .section-header i {
        font-size: 1rem;
    }
    
    .section-header h2 {
        font-size: 1.1rem;
    }
    
    .contact-grid {
        grid-template-columns: 1fr;
        gap: 0.75rem;
    }
    
    .contact-method {
        padding: 0.6rem;
    }
    
    .terms-main {
        gap: 1rem;
    }
}

/* Mobile portrait */
@media (max-width: 640px) {
    .terms-section {
        padding: 40px 0;
    }
    
    .terms-section-block {
        padding: 0.875rem;
    }
    
    .section-header h2 {
        font-size: 1rem;
    }
    
    .terms-section-block p,
    .styled-list li {
        font-size: 0.8rem;
        line-height: 1.6;
    }
    
    .styled-list li {
        margin-bottom: 0.4rem;
    }
    
    .info-highlight {
        flex-direction: column;
        gap: 0.5rem;
        padding: 0.75rem;
    }
    
    .info-highlight i {
        margin-top: 0;
    }
    
    .info-highlight p {
        font-size: 0.75rem;
    }
    
    .contact-method i {
        width: 30px;
        height: 30px;
        font-size: 0.85rem;
    }
    
    .contact-method a,
    .contact-method span {
        font-size: 0.7rem;
    }
    
    .info-officer {
        font-size: 0.7rem;
        padding: 0.5rem 0.75rem;
    }
}

/* Small mobile */
@media (max-width: 480px) {
    .section-header h2 {
        font-size: 0.95rem;
    }
    
    .terms-section-block p,
    .styled-list li {
        font-size: 0.75rem;
    }
    
    .nav-sticky a {
        font-size: 0.65rem;
        padding: 0.25rem 0.6rem;
    }
    
    .nav-sticky h3 {
        font-size: 0.75rem;
    }
    
    .terms-footer p {
        font-size: 0.65rem;
    }
}

/* Large screens */
@media (min-width: 1400px) {
    .terms-wrapper {
        max-width: 1400px;
        margin: 0 auto;
    }
}

/* Touch device optimization */
@media (hover: none) {
    .nav-sticky a:hover {
        transform: none;
    }
    
    .nav-btn:hover {
        transform: none;
    }
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
    .reveal-item,
    .terms-section-block {
        transition: none;
    }
    
    .reveal-item {
        opacity: 1;
        transform: none;
    }
    
    @keyframes fadeInUp {
        from {
            opacity: 1;
            transform: translateY(0);
        }
        to {
            opacity: 1;
            transform: translateY(0);
        }
    }
}