
.terms-header {
    position: relative;
    min-height: fit-content;
}

/* Remove the default gradient from terms page */
.terms-header .navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    background-color: transparent;
    transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
    z-index: 1001;
    padding: 6px 50px;
}

.terms-header .navbar.scrolled {
    background-color: var(--dark-base);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    padding: 10px 50px;
}

.terms-header .navbar.hidden {
    transform: translateY(-100%);
}

/* Terms hero section - starts below navbar */
.terms-hero {
    position: relative;
    width: 100%;
    min-height: 350px; /* Increased minimum height */
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    overflow: hidden;
    z-index: 5;
    margin-top: 0;
    padding-top: 80px;
    padding-bottom: 40px; /* Reduced bottom padding */
}

/* Fix image coverage issue */
.terms-hero-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
}

.terms-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    filter: brightness(0.6);
    /* Ensure image covers all spaces */
    min-height: 100%;
    min-width: 100%;
    filter: brightness(0.35);
}

.terms-hero-content {
    position: relative;
    z-index: 10;
    max-width: 800px;
    padding: 0 1.5rem;
    margin-bottom: 1rem; /* Increased space before arrow */
}

.terms-hero-title {
    font-family: var(--primary-font);
    font-size: clamp(2.5rem, 5vw, 3.5rem);
    font-weight: 700;
    line-height: 1.1;
    color: var(--light-base);
    margin-block-start: 3rem; 
    text-shadow: 0 2px 15px rgba(0, 0, 0, 0.5);
}

.terms-hero-subtitle {
    font-family: var(--secondary-font);
    font-size: clamp(1rem, 2vw, 1.2rem);
    color: var(--light-base);
    opacity: 0.9;
    text-shadow: 0 1px 8px rgba(0, 0, 0, 0.4);
    margin-bottom: 0.5rem; /* Added for spacing */
}

/* Scroll Indicator Styles */
.scroll-indicator {
    position: relative;
    z-index: 10;
    margin-top: 1rem; /* Added margin for spacing */
    padding-bottom: 1rem;
    cursor: pointer;
    animation: bounce 2s infinite;
}

.scroll-arrow {
    width: 24px;
    height: 24px;
    border-right: 2px solid var(--light-base);
    border-bottom: 2px solid var(--light-base);
    transform: rotate(45deg);
    margin: 0 auto;
    opacity: 0.8;
    transition: all 0.3s ease;
}

.scroll-indicator:hover .scroll-arrow {
    opacity: 1;
    transform: rotate(45deg) translateY(3px);
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% {
        transform: translateY(0);
    }
    40% {
        transform: translateY(-10px);
    }
    60% {
        transform: translateY(-5px);
    }
}

.terms-main {
    background-color: var(--light-base);
    position: relative;
    padding: 4rem 1rem;
    min-height: calc(100vh - 40vh - 100px);
}

/* Add the continuous grid pattern */
.terms-main::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: 
        linear-gradient(var(--dark-base) 1px, transparent 1px),
        linear-gradient(90deg, var(--dark-base) 1px, transparent 1px);
    background-size: 40px 40px;
    background-position: center center;
    opacity: 0.04;
    z-index: 1;
    pointer-events: none;
}

.terms-container {
    max-width: 900px;
    margin: 0 auto;
    position: relative;
    z-index: 2;
}

.terms-content {
    background: var(--light-base);
    border-radius: 12px;
    padding: 3rem 2.5rem;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
}

.terms-section {
    margin-bottom: 2.5rem;
    padding-bottom: 2.5rem;
    border-bottom: 1px solid var(--light-border);
}

.terms-section:last-child {
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: none;
}

.terms-section-title {
    font-family: var(--primary-font);
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--dark-base);
    margin-bottom: 1rem;
    line-height: 1.2;
}

.terms-text {
    font-family: var(--secondary-font);
    font-size: 1rem;
    line-height: 1.6;
    color: var(--dark-base);
    margin-bottom: 1rem;
    opacity: 0.8;
}

.terms-list {
    list-style: none;
    margin: 1rem 0 1.5rem 1.5rem;
}

.terms-list li {
    font-family: var(--secondary-font);
    font-size: 1rem;
    line-height: 1.6;
    color: var(--dark-base);
    margin-bottom: 0.75rem;
    opacity: 0.8;
    position: relative;
}

.terms-list li::before {
    content: "•";
    color: var(--accent-primary);
    font-size: 1.2rem;
    position: absolute;
    left: -1.5rem;
    top: -0.1rem;
}

.contact-details {
    background: var(--accent-subtle);
    border-left: 4px solid var(--accent-primary);
    padding: 1.5rem;
    border-radius: 4px;
    margin: 1.5rem 0;
}

.contact-details p {
    font-family: var(--secondary-font);
    font-size: 0.95rem;
    line-height: 1.6;
    color: var(--dark-base);
    margin-bottom: 0.5rem;
    opacity: 0.8;
}

.contact-details p strong {
    color: var(--dark-base);
    opacity: 1;
}

.terms-notice {
    background: var(--accent-subtle);
    border: 1px solid var(--accent-border);
    border-radius: 8px;
    padding: 1.5rem;
    margin-top: 3rem;
}

.notice-text {
    font-family: var(--secondary-font);
    font-size: 0.95rem;
    line-height: 1.6;
    color: var(--dark-base);
    margin: 0;
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
}

.notice-text i {
    color: var(--accent-primary);
    margin-top: 0.2rem;
    flex-shrink: 0;
}

/* Responsive Design - Consolidated */
@media (max-width: 1200px) {
    .terms-hero {
        min-height: 320px;
        padding-top: 70px;
        padding-bottom: 30px;
    }
}

@media (max-width: 991px) {
    .terms-header .navbar {
        padding: 10px 30px;
    }
    
    .terms-header .navbar.scrolled {
        padding: 15px 30px;
    }
    
    .terms-hero {
        min-height: 280px;
        padding-top: 60px;
        padding-bottom: 20px;
    }
    
    .terms-hero-content {
        margin-bottom: 2.5rem; /* Adjusted for tablet */
    }
    
    .terms-hero-title {
        font-size: clamp(2rem, 4vw, 2.8rem);
        margin-bottom: 0.75rem;
    }
    
    .terms-hero-subtitle {
        font-size: clamp(0.9rem, 1.8vw, 1.1rem);
    }
    
    .scroll-indicator {
        margin-top: 0.5rem;
    }
    
    .scroll-arrow {
        width: 20px;
        height: 20px;
    }
    
    .terms-main {
        min-height: calc(100vh - 35vh - 80px);
        padding: 3rem 1rem;
    }
    
    .terms-content {
        padding: 2rem 1.5rem;
    }
    
    .terms-section {
        margin-bottom: 2rem;
        padding-bottom: 2rem;
    }
    
    .terms-section-title {
        font-size: 1.3rem;
    }
    
    .terms-text, .terms-list li {
        font-size: 0.95rem;
    }
}

@media (max-width: 768px) {
    .terms-hero {
        min-height: 250px;
        padding-top: 50px;
        padding-bottom: 15px;
    }
    
    .terms-hero-image {
        /* Ensure image covers completely on mobile */
        background-color: var(--dark-base); /* Fallback color */
    }
    
    .terms-image {
        /* Force image to cover any gaps */
        object-fit: cover;
        object-position: center center;
        width: 100vw; /* Ensure full viewport width */
        height: 100%;
    }
    
    .terms-hero-content {
        margin-bottom: 2rem;
        padding: 0 1rem;
    }
    
    .terms-hero-title {
        font-size: clamp(1.8rem, 3.5vw, 2.2rem);
        margin-bottom: 0.75rem;
    }
    
    .terms-hero-subtitle {
        font-size: 0.95rem;
        margin-bottom: 0.5rem;
    }
    
    .scroll-indicator {
        margin-top: 0.5rem;
        padding-bottom: 0.5rem;
    }
    
    .scroll-arrow {
        width: 18px;
        height: 18px;
    }
}

@media (max-width: 480px) {
    .terms-header .navbar {
        padding: 8px 20px;
    }
    
    .terms-header .navbar.scrolled {
        padding: 12px 20px;
    }
    
    .terms-hero {
        min-height: 220px;
        padding-top: 50px;
        padding-bottom: 10px;
    }
    
    /* Force image to cover all spaces on small screens */
    .terms-hero-image {
        position: absolute;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background-color: var(--dark-base);
    }
    
    .terms-image {
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        object-fit: cover;
        object-position: center;
        /* Prevent any gaps */
        min-width: 100%;
        min-height: 100%;
    }
    
    .terms-hero-content {
        margin-bottom: 1.5rem;
        padding: 0 0.75rem;
    }
    
    .terms-hero-title {
        font-size: 1.6rem;
        margin-bottom: 0.75rem;
    }
    
    .terms-hero-subtitle {
        font-size: 0.85rem;
        margin-bottom: 0.5rem;
    }
    
    .scroll-indicator {
        margin-top: 0.25rem;
    }
    
    .scroll-arrow {
        width: 16px;
        height: 16px;
        border-width: 1.5px;
    }
    
    .scroll-indicator {
        animation: bounce-mobile 2s infinite;
    }
    
    @keyframes bounce-mobile {
        0%, 20%, 50%, 80%, 100% {
            transform: translateY(0);
        }
        40% {
            transform: translateY(-5px);
        }
        60% {
            transform: translateY(-3px);
        }
    }
    
    .terms-main {
        min-height: calc(100vh - 30vh - 60px);
        padding: 2rem 0.5rem;
    }
    
    .terms-content {
        padding: 1.5rem 1.25rem;
    }
    
    .terms-section {
        margin-bottom: 1.75rem;
        padding-bottom: 1.75rem;
    }
    
    .terms-section-title {
        font-size: 1.2rem;
    }
    
    .contact-details {
        padding: 1.25rem;
    }
    
    .terms-notice {
        padding: 1.25rem;
    }
}

