/* ================================
   PREMIUM TERMS PAGE STYLES - SAUDI NATIONAL COLORS
   🇸🇦 Pure Saudi Green (#006C35) + White
   ================================ */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800;900&family=Poppins:wght@400;500;600;700&display=swap');

/* CSS Variables for Terms Page - SAUDI COLORS */
:root {
    /* Saudi Green Shades */
    --terms-primary-green: #006C35;
    --terms-green-light: #00894a;
    --terms-green-dark: #005528;
    --terms-green-pale: #e8f5ed;
    
    /* White/Light Shades */
    --terms-white: #ffffff;
    --terms-cream: #f8faf8;
    --terms-off-white: #f5f7f5;
    --terms-light: #eef2ee;
    --terms-light-medium: #e8ece8;
    --terms-light-soft: #dde5dd;
    
    /* Text Colors */
    --terms-text-dark: rgba(0, 0, 0, 0.85);
    --terms-text-gray: rgba(0, 0, 0, 0.6);
    --terms-text-light: rgba(0, 0, 0, 0.5);
    
    /* Gradients - SAUDI GREEN */
    --terms-gradient-primary: linear-gradient(135deg, #006C35 0%, #00894a 100%);
    --terms-gradient-light: linear-gradient(135deg, #ffffff 0%, #f8faf8 100%);
    --terms-gradient-glass: linear-gradient(135deg, rgba(0, 108, 53, 0.08), rgba(0, 137, 74, 0.04));
    
    /* Shadows - SAUDI GREEN */
    --terms-shadow-sm: 0 2px 4px 0 rgba(0, 0, 0, 0.05);
    --terms-shadow-md: 0 4px 8px 0 rgba(0, 0, 0, 0.08);
    --terms-shadow-lg: 0 8px 16px 0 rgba(0, 0, 0, 0.1);
    --terms-shadow-xl: 0 12px 24px 0 rgba(0, 0, 0, 0.12);
    --terms-shadow-green: 0 8px 32px rgba(0, 108, 53, 0.2);
    
    --terms-transition-fast: all 0.15s ease-in-out;
    --terms-transition-normal: all 0.3s ease-in-out;
    --terms-transition-slow: all 0.5s ease-in-out;
}

/* Reset and Base Styles */
.terms-page-container {
    position: relative;
    min-height: 100vh;
    font-family: 'Inter', sans-serif;
    line-height: 1.6;
    color: var(--terms-text-dark);
    background: var(--terms-gradient-light);
    overflow-x: hidden;
}

/* Simple Animated Background */
.terms-bg-animation {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    pointer-events: none;
}

.terms-dots-pattern {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0.15;
    background-image: radial-gradient(circle at 2px 2px, var(--terms-primary-green) 1px, transparent 0);
    background-size: 50px 50px;
    animation: termsDotsMove 30s linear infinite;
}

.terms-gradient-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at 30% 20%, rgba(0, 108, 53, 0.03) 0%, transparent 50%),
                radial-gradient(circle at 70% 80%, rgba(0, 137, 74, 0.02) 0%, transparent 50%);
}

/* Content Wrapper */
.terms-content-wrapper {
    position: relative;
    z-index: 2;
    max-width: 1400px;
    margin: 0 auto;
    padding: 2rem 1.5rem;
}

/* Header Section */
.terms-header-section {
    text-align: center;
    margin-bottom: 3rem;
    padding: 3rem 0;
    margin-top: 4rem;
}

.terms-breadcrumb {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    margin-bottom: 2rem;
    font-size: 0.875rem;
    color: var(--terms-text-gray);
    animation: termsFadeInUp 0.6s ease-out;
}

.terms-breadcrumb-separator {
    opacity: 0.5;
}

.terms-breadcrumb-active {
    color: var(--terms-primary-green);
    font-weight: 600;
}

.terms-main-title {
    font-family: 'Poppins', sans-serif;
    font-size: clamp(3rem, 5vw, 4.5rem);
    font-weight: 800;
    color: var(--terms-text-dark);
    margin: 0 0 1rem 0;
    position: relative;
    animation: termsFadeInUp 0.8s ease-out 0.2s both;
}

.terms-title-accent {
    background: var(--terms-gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.terms-title-underline {
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 100px;
    height: 4px;
    background: var(--terms-gradient-primary);
    border-radius: 2px;
    animation: termsScaleIn 1s ease-out 1s both;
}

.terms-subtitle {
    font-size: 1.25rem;
    color: var(--terms-text-gray);
    max-width: 600px;
    margin: 0 auto;
    animation: termsFadeInUp 1s ease-out 0.4s both;
}

/* Terms Cards Grid */
.terms-sections-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 2rem;
    margin-bottom: 4rem;
}

.terms-card {
    background: var(--terms-white);
    border-radius: 20px;
    padding: 2.5rem;
    box-shadow: var(--terms-shadow-lg);
    border: 1px solid rgba(0, 108, 53, 0.1);
    transition: var(--terms-transition-normal);
    position: relative;
    overflow: hidden;
    animation: termsFadeInUp 0.8s ease-out both;
}

.terms-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(0, 108, 53, 0.05), transparent);
    transition: var(--terms-transition-slow);
}

.terms-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--terms-shadow-green);
    border-color: var(--terms-primary-green);
}

.terms-card:hover::before {
    left: 100%;
}

.terms-card:nth-child(1) { animation-delay: 0.1s; }
.terms-card:nth-child(2) { animation-delay: 0.2s; }
.terms-card:nth-child(3) { animation-delay: 0.3s; }
.terms-card:nth-child(4) { animation-delay: 0.4s; }
.terms-card:nth-child(5) { animation-delay: 0.5s; }
.terms-card:nth-child(6) { animation-delay: 0.6s; }
.terms-card:nth-child(7) { animation-delay: 0.7s; }
.terms-card:nth-child(8) { animation-delay: 0.8s; }

/* Card Top Borders */
.terms-card-primary::after,
.terms-card-secondary::after,
.terms-card-tertiary::after,
.terms-card-accent::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--terms-gradient-primary);
}

/* Card Header */
.terms-card-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.terms-card-icon {
    width: 50px;
    height: 50px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 108, 53, 0.1);
    color: var(--terms-primary-green);
    transition: var(--terms-transition-normal);
}

.terms-card-icon svg {
    width: 24px;
    height: 24px;
}

.terms-card:hover .terms-card-icon {
    transform: scale(1.1) rotate(5deg);
    background: rgba(0, 108, 53, 0.15);
}

.terms-card-title {
    font-family: 'Poppins', sans-serif;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--terms-text-dark);
    margin: 0;
}

/* Card Content */
.terms-card-content p {
    color: var(--terms-text-gray);
    margin-bottom: 1.5rem;
    font-size: 1rem;
    line-height: 1.7;
}

.terms-card-content h3 {
    font-family: 'Poppins', sans-serif;
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--terms-text-dark);
    margin: 2rem 0 1rem 0;
}

.terms-list {
    list-style: none;
    padding: 0;
    margin: 1rem 0;
}

.terms-list li {
    position: relative;
    padding-left: 1.5rem;
    margin-bottom: 0.75rem;
    color: var(--terms-text-gray);
    line-height: 1.6;
}

.terms-list li::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0.6rem;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--terms-primary-green);
}

/* Contact Section */
.terms-contact-section {
    text-align: center;
    margin: 4rem 0;
}

.terms-contact-card {
    background: var(--terms-white);
    border-radius: 24px;
    padding: 3rem 2rem;
    box-shadow: var(--terms-shadow-xl);
    border: 1px solid rgba(0, 108, 53, 0.1);
    max-width: 600px;
    margin: 0 auto;
    position: relative;
    overflow: hidden;
    animation: termsFadeInUp 1s ease-out 0.6s both;
}

.terms-contact-card::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(0, 108, 53, 0.03) 0%, transparent 70%);
    animation: termsRotate 20s linear infinite;
}

.terms-contact-title {
    font-family: 'Poppins', sans-serif;
    font-size: 2rem;
    font-weight: 700;
    color: var(--terms-text-dark);
    margin: 0 0 1rem 0;
    position: relative;
    z-index: 1;
}

.terms-contact-description {
    font-size: 1.125rem;
    color: var(--terms-text-gray);
    margin: 0 0 2rem 0;
    position: relative;
    z-index: 1;
}

.terms-contact-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
    position: relative;
    z-index: 1;
}

.terms-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 1rem 2rem;
    border-radius: 12px;
    font-weight: 600;
    text-decoration: none;
    transition: var(--terms-transition-normal);
    border: none;
    cursor: pointer;
    font-size: 1rem;
}

.terms-btn svg {
    width: 18px;
    height: 18px;
}

.terms-btn-primary {
    background: var(--terms-gradient-primary);
    color: var(--terms-white);
    box-shadow: var(--terms-shadow-md);
}

.terms-btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: var(--terms-shadow-green);
}

.terms-btn-secondary {
    background: var(--terms-off-white);
    color: var(--terms-text-dark);
    border: 2px solid rgba(0, 108, 53, 0.2);
}

.terms-btn-secondary:hover {
    background: var(--terms-green-pale);
    border-color: var(--terms-primary-green);
    transform: translateY(-2px);
}

/* Floating Elements */
.terms-floating-elements {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1;
}

.terms-floating-car {
    position: absolute;
    opacity: 0.05;
    color: var(--terms-primary-green);
}

.terms-floating-car svg {
    width: 80px;
    height: 80px;
}

.terms-floating-car-1 {
    top: 15%;
    right: 8%;
    animation: termsFloat 20s ease-in-out infinite;
}

.terms-floating-car-2 {
    bottom: 20%;
    left: 5%;
    animation: termsFloat 25s ease-in-out infinite reverse;
}

/* Animations */
@keyframes termsDotsMove {
    0% { transform: translate(0, 0); }
    100% { transform: translate(50px, 50px); }
}

@keyframes termsFadeInUp {
    from { opacity: 0; transform: translateY(30px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes termsScaleIn {
    from { transform: translateX(-50%) scaleX(0); }
    to { transform: translateX(-50%) scaleX(1); }
}

@keyframes termsRotate {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

@keyframes termsFloat {
    0%, 100% { transform: translateY(0px) rotate(0deg); }
    25% { transform: translateY(-15px) rotate(2deg); }
    50% { transform: translateY(-8px) rotate(-1deg); }
    75% { transform: translateY(-12px) rotate(1deg); }
}

/* Responsive Design */
@media (max-width: 1200px) {
    .terms-content-wrapper { padding: 1.5rem; }
    .terms-sections-grid { grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 1.5rem; }
}

@media (max-width: 768px) {
    .terms-header-section { padding: 2rem 0; margin-bottom: 3rem; }
    .terms-main-title { font-size: clamp(2.5rem, 8vw, 3.5rem); }
    .terms-subtitle { font-size: 1.125rem; }
    .terms-sections-grid { grid-template-columns: 1fr; gap: 1.5rem; }
    .terms-card { padding: 2rem 1.5rem; border-radius: 16px; }
    .terms-card-header { flex-direction: column; text-align: center; gap: 0.75rem; }
    .terms-contact-card { padding: 2rem 1.5rem; border-radius: 20px; }
    .terms-contact-title { font-size: 1.75rem; }
    .terms-contact-buttons { flex-direction: column; align-items: center; }
    .terms-btn { width: 100%; max-width: 280px; justify-content: center; }
    .terms-floating-car { display: none; }
}

@media (max-width: 480px) {
    .terms-content-wrapper { padding: 1rem; }
    .terms-breadcrumb { font-size: 0.75rem; }
    .terms-card { padding: 1.5rem; border-radius: 12px; }
    .terms-card-icon { width: 40px; height: 40px; }
    .terms-card-icon svg { width: 20px; height: 20px; }
    .terms-card-title { font-size: 1.25rem; }
    .terms-contact-card { padding: 1.5rem; margin: 0 1rem; }
    .terms-contact-title { font-size: 1.5rem; }
    .terms-contact-description { font-size: 1rem; }
}

/* Performance optimizations */
@media (prefers-reduced-motion: reduce) {
    * { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; }
    .terms-dots-pattern { animation: none; }
    .terms-floating-car { display: none; }
}

/* Print styles */
@media print {
    .terms-bg-animation, .terms-floating-elements, .terms-contact-buttons { display: none !important; }
    .terms-page-container { background: white !important; color: black !important; }
    .terms-card, .terms-contact-card { background: white !important; color: black !important; box-shadow: none !important; border: 1px solid #ccc !important; break-inside: avoid; }
}