/* ========================================
   style.css - Satellite World Maps
   Common Styles for All Pages
   ======================================== */

/* ----------------------------------------
   Global Styles & Variables
   ---------------------------------------- */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Poppins', sans-serif;
}

:root {
    --primary: #4361ee;
    --primary-dark: #3a56d4;
    --secondary: #3f37c9;
    --accent: #4cc9f0;
    --success: #4ade80;
    --warning: #fbbf24;
    --danger: #f87171;
    --dark: #1e1e2f;
    --darker: #151523;
    --light: #f8fafc;
    --gray: #64748b;
    --gradient: linear-gradient(135deg, var(--primary), var(--secondary));
    --gradient-hover: linear-gradient(135deg, var(--secondary), var(--primary));
    --shadow-sm: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    --shadow-md: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
    --shadow-colored: 0 20px 30px -10px rgba(67, 97, 238, 0.3);
}

body {
    background: #f8fafc;
    color: var(--dark);
    overflow-x: hidden;
}

/* ----------------------------------------
   Custom Scrollbar
   ---------------------------------------- */
::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
    background: var(--gradient);
    border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--gradient-hover);
}

/* ----------------------------------------
   Loading Animation
   ---------------------------------------- */
.loading {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: white;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    transition: opacity 0.5s ease;
}

.loading.hide {
    opacity: 0;
    pointer-events: none;
}

.loader {
    width: 50px;
    height: 50px;
    border: 3px solid #f3f3f3;
    border-top: 3px solid var(--primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* ----------------------------------------
   Back to Top Button
   ---------------------------------------- */
.back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    background: var(--gradient);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: 999;
    border: none;
    box-shadow: var(--shadow-colored);
}

.back-to-top.show {
    opacity: 1;
    visibility: visible;
}

.back-to-top:hover {
    transform: translateY(-5px) scale(1.1);
}

/* ----------------------------------------
   Navbar Styles
   ---------------------------------------- */
.navbar {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    box-shadow: var(--shadow-sm);
    padding: 15px 0;
    position: sticky;
    top: 0;
    z-index: 1000;
    transition: all 0.3s ease;
}

.navbar.scrolled {
    padding: 10px 0;
    background: rgba(255, 255, 255, 0.98);
    box-shadow: var(--shadow-md);
}

.navbar-brand {
    font-size: 1.6rem;
    font-weight: 800;
    background: var(--gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    letter-spacing: -0.5px;
    position: relative;
}

.navbar-nav .nav-link {
    color: var(--dark) !important;
    font-weight: 500;
    padding: 8px 16px !important;
    margin: 0 4px;
    border-radius: 8px;
    transition: all 0.3s ease;
    position: relative;
}

.navbar-nav .nav-link::before {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 2px;
    background: var(--gradient);
    transition: width 0.3s ease;
}

.navbar-nav .nav-link:hover::before,
.navbar-nav .nav-link.active::before {
    width: 30px;
}

.navbar-nav .nav-link:hover,
.navbar-nav .nav-link.active {
    color: var(--primary) !important;
    background: rgba(67, 97, 238, 0.05);
}

.navbar-toggler {
    border: none;
    background: var(--gradient);
    padding: 10px 12px;
    border-radius: 10px;
}

.navbar-toggler:focus {
    box-shadow: none;
}

.navbar-toggler-icon {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='rgba(255, 255, 255, 1)' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e");
}

/* ----------------------------------------
   Page Header
   ---------------------------------------- */
.page-header {
    background: linear-gradient(135deg, rgba(67, 97, 238, 0.1) 0%, rgba(63, 55, 201, 0.1) 100%);
    padding: 60px 0;
    margin-bottom: 40px;
    position: relative;
    overflow: hidden;
}

.page-header::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(67, 97, 238, 0.05) 0%, transparent 70%);
    animation: rotate 20s linear infinite;
}

.page-header h4 {
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--primary);
    margin-bottom: 10px;
    position: relative;
}

.page-header h1 {
    font-size: 3rem;
    font-weight: 800;
    background: var(--gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 10px;
    position: relative;
}

.page-header .effective-date,
.page-header .last-updated {
    color: var(--gray);
    font-weight: 500;
    position: relative;
}

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

/* ----------------------------------------
   Table of Contents Card
   ---------------------------------------- */
.toc-card {
    background: white;
    border-radius: 20px;
    border: none;
    box-shadow: var(--shadow-lg);
    position: sticky;
    top: 100px;
    transition: all 0.3s ease;
}

.toc-card:hover {
    box-shadow: var(--shadow-colored);
    transform: translateY(-5px);
}

.toc-card .card-body {
    padding: 25px;
}

.toc-card .card-title {
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--dark);
    margin-bottom: 20px;
    position: relative;
    padding-bottom: 10px;
}

.toc-card .card-title::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: 0;
    width: 50px;
    height: 3px;
    background: var(--gradient);
    border-radius: 2px;
}

.toc-nav {
    max-height: 400px;
    overflow-y: auto;
    padding-right: 10px;
}

.toc-nav::-webkit-scrollbar {
    width: 5px;
}

.toc-nav::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 10px;
}

.toc-nav::-webkit-scrollbar-thumb {
    background: var(--gradient);
    border-radius: 10px;
}

.toc-link {
    color: var(--gray);
    text-decoration: none;
    padding: 10px 15px;
    border-radius: 12px;
    transition: all 0.3s ease;
    display: block;
    font-weight: 500;
    border-left: 3px solid transparent;
    margin-bottom: 5px;
}

.toc-link:hover {
    color: var(--primary);
    background: rgba(67, 97, 238, 0.05);
    border-left-color: var(--primary);
    transform: translateX(5px);
}

.toc-link.active {
    color: var(--primary);
    background: rgba(67, 97, 238, 0.05);
    border-left-color: var(--primary);
}

/* ----------------------------------------
   Main Content Card
   ---------------------------------------- */
.policy-card {
    background: white;
    border-radius: 30px;
    border: none;
    box-shadow: var(--shadow-lg);
    overflow: hidden;
}

.policy-card .card-body {
    padding: 40px;
}

/* Policy Sections */
.policy-section {
    scroll-margin-top: 100px;
    transition: all 0.3s ease;
}

.policy-section:not(:last-child) {
    border-bottom: 2px solid rgba(67, 97, 238, 0.1);
    margin-bottom: 30px;
    padding-bottom: 30px;
}

.policy-section h2 {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--dark);
    margin-bottom: 20px;
    position: relative;
    padding-bottom: 10px;
}

.policy-section h2::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: 0;
    width: 60px;
    height: 3px;
    background: var(--gradient);
    border-radius: 2px;
}

.policy-section h4 {
    font-size: 1.4rem;
    font-weight: 600;
    color: var(--dark);
    margin-bottom: 15px;
}

.policy-section p {
    color: var(--gray);
    line-height: 1.8;
    margin-bottom: 15px;
}

.policy-section ul, 
.policy-section ol {
    color: var(--gray);
    line-height: 1.8;
    padding-left: 20px;
}

.policy-section li {
    margin-bottom: 8px;
}

.policy-section b {
    color: var(--dark);
}

/* ----------------------------------------
   Permissions Grid
   ---------------------------------------- */
.permissions-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 15px;
    margin: 20px 0;
}

.permission-item {
    background: linear-gradient(135deg, rgba(67, 97, 238, 0.05) 0%, rgba(63, 55, 201, 0.05) 100%);
    border: 1px solid rgba(67, 97, 238, 0.1);
    border-radius: 12px;
    padding: 12px 15px;
    font-weight: 500;
    color: var(--dark);
    transition: all 0.3s ease;
}

.permission-item:hover {
    background: var(--gradient);
    color: white;
    transform: translateY(-3px);
    box-shadow: var(--shadow-colored);
}

.permission-item i {
    color: var(--primary);
    margin-right: 10px;
    transition: all 0.3s ease;
}

.permission-item:hover i {
    color: white;
}

/* ----------------------------------------
   Contact Card
   ---------------------------------------- */
.contact-card {
    background: linear-gradient(135deg, rgba(67, 97, 238, 0.05) 0%, rgba(63, 55, 201, 0.05) 100%);
    border: 1px solid rgba(67, 97, 238, 0.2);
    border-radius: 16px;
    padding: 25px;
    margin-top: 20px;
}

.contact-card a {
    color: var(--primary);
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
}

.contact-card a:hover {
    color: var(--secondary);
    text-decoration: underline;
}

/* ----------------------------------------
   Highlight Box
   ---------------------------------------- */
.highlight {
    background: linear-gradient(135deg, rgba(67, 97, 238, 0.1) 0%, rgba(63, 55, 201, 0.1) 100%);
    padding: 20px;
    border-radius: 16px;
    margin: 20px 0;
    border-left: 4px solid var(--primary);
}

.highlight p {
    margin-bottom: 0;
}

/* ----------------------------------------
   Steps Container (for Offer Terms)
   ---------------------------------------- */
.steps-container {
    background: linear-gradient(135deg, rgba(67, 97, 238, 0.02) 0%, rgba(63, 55, 201, 0.02) 100%);
    border-radius: 20px;
    padding: 25px;
    margin: 20px 0;
}

.step-item {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 15px;
}

.step-number {
    width: 30px;
    height: 30px;
    background: var(--gradient);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 14px;
    flex-shrink: 0;
}

/* ----------------------------------------
   Footer Styles
   ---------------------------------------- */
.footer {
    background: linear-gradient(135deg, var(--dark) 0%, var(--darker) 100%);
    color: #ffffff;
    position: relative;
    overflow: hidden;
    margin-top: 80px;
}

.footer::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--gradient);
}

.footer::after {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(67, 97, 238, 0.1) 0%, transparent 70%);
    animation: rotate 20s linear infinite;
}

.footer-title {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 1.8rem;
    position: relative;
    display: inline-block;
}

.footer-title::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: -10px;
    width: 100%;
    height: 3px;
    background: var(--gradient);
    border-radius: 2px;
}

.footer-links {
    list-style: none;
    padding: 0;
}

.footer-links li {
    margin-bottom: 1rem;
    position: relative;
    z-index: 1;
}

.footer-links a {
    color: #b4b6bb;
    text-decoration: none;
    transition: all 0.3s ease;
    display: inline-block;
    position: relative;
    padding-left: 0;
}

.footer-links a:hover {
    color: #ffffff;
    padding-left: 10px;
    transform: translateX(5px);
}

.footer-links a i {
    margin-right: 8px;
    opacity: 0;
    transition: all 0.3s ease;
}

.footer-links a:hover i {
    opacity: 1;
    margin-right: 12px;
}

.footer-bottom {
    background: rgba(0,0,0,0.3);
    position: relative;
    z-index: 1;
    backdrop-filter: blur(10px);
}

.footer-bottom a {
    transition: all 0.3s ease;
}

.footer-bottom a:hover {
    color: #ffffff !important;
}

/* ----------------------------------------
   Responsive Styles
   ---------------------------------------- */
@media (max-width: 991px) {
    .toc-card {
        position: relative;
        top: 0;
        margin-bottom: 30px;
    }
}

@media (max-width: 768px) {
    .page-header h1 {
        font-size: 2.2rem;
    }
    
    .policy-card .card-body {
        padding: 25px;
    }
    
    .policy-section h2 {
        font-size: 1.5rem;
    }
    
    .permissions-grid {
        grid-template-columns: 1fr;
    }
    
    .step-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }
    
    .table-responsive {
        border-radius: 12px;
    }
    
    .table thead {
        display: none;
    }
    
    .table tbody tr {
        display: block;
        margin-bottom: 15px;
        border: 1px solid rgba(67, 97, 238, 0.1);
        border-radius: 12px;
        padding: 15px;
    }
    
    .table tbody td {
        display: block;
        text-align: left;
        padding: 8px 0;
        border: none;
    }
    
    .table tbody td::before {
        content: attr(data-label);
        font-weight: 600;
        color: var(--primary);
        display: block;
        margin-bottom: 5px;
    }
}

/* ----------------------------------------
   Print Styles
   ---------------------------------------- */
@media print {
    .navbar,
    .footer,
    .back-to-top,
    .loading,
    .toc-card {
        display: none;
    }
    
    .policy-card {
        box-shadow: none;
    }
}