/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #2d6a4f;
    --primary-dark: #1b4332;
    --primary-light: #40916c;
    --accent-color: #52b788;
    --text-primary: #1a1a1a;
    --text-secondary: #4a4a4a;
    --text-muted: #757575;
    --bg-primary: #ffffff;
    --bg-secondary: #f8faf9;
    --bg-tertiary: #e8f5e9;
    --border-color: #d7e5dd;
    --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.08);
    --shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.12);
    --border-radius: 12px;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    line-height: 1.7;
    color: var(--text-primary);
    background-color: var(--bg-secondary);
    font-size: 16px;
}

/* Container */
.container {
    max-width: 1200px;
    margin: 0 auto;
    background-color: var(--bg-primary);
    box-shadow: var(--shadow-lg);
    min-height: 100vh;
}

/* Header */
.header {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
    color: white;
    padding: 3rem 2rem;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.header::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255,255,255,0.1) 0%, transparent 70%);
    animation: pulse 15s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); opacity: 0.5; }
    50% { transform: scale(1.1); opacity: 0.3; }
}

.header-content {
    position: relative;
    z-index: 1;
}

.logo-section {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 1rem;
}

.logo-icon {
    width: 48px;
    height: 48px;
    filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.2));
}

.header h1 {
    font-size: 2.5rem;
    font-weight: 700;
    margin: 0;
    letter-spacing: -0.5px;
}

.header-subtitle {
    font-size: 1.25rem;
    font-weight: 300;
    opacity: 0.95;
    margin-top: 0.5rem;
}

/* Table of Contents */
.table-of-contents {
    background-color: var(--bg-tertiary);
    padding: 2rem;
    margin: 2rem;
    border-radius: var(--border-radius);
    border-left: 4px solid var(--primary-color);
    box-shadow: var(--shadow-sm);
}

.table-of-contents h2 {
    color: var(--primary-dark);
    font-size: 1.25rem;
    margin-bottom: 1rem;
    font-weight: 600;
}

.table-of-contents ul {
    list-style: none;
}

.table-of-contents li {
    margin: 0.75rem 0;
}

.table-of-contents a {
    color: var(--text-secondary);
    text-decoration: none;
    transition: var(--transition);
    display: block;
    padding: 0.5rem 0.75rem;
    border-radius: 6px;
    font-weight: 500;
}

.table-of-contents a:hover {
    color: var(--primary-color);
    background-color: rgba(45, 106, 79, 0.08);
    transform: translateX(4px);
}

/* Content */
.content {
    padding: 2rem;
}

/* Intro Section */
.intro-section {
    margin-bottom: 3rem;
    padding: 2rem;
    background: linear-gradient(to bottom right, var(--bg-tertiary), var(--bg-secondary));
    border-radius: var(--border-radius);
    border: 1px solid var(--border-color);
}

.effective-date {
    color: var(--text-muted);
    font-size: 0.95rem;
    margin-bottom: 1rem;
    font-weight: 500;
}

.effective-date span {
    color: var(--primary-color);
    font-weight: 600;
}

.intro-text {
    font-size: 1.1rem;
    line-height: 1.8;
    color: var(--text-secondary);
}

/* Policy Sections */
.policy-section {
    margin-bottom: 3rem;
    scroll-margin-top: 2rem;
}

.policy-section h2 {
    color: var(--primary-dark);
    font-size: 1.75rem;
    margin-bottom: 1.5rem;
    padding-bottom: 0.75rem;
    border-bottom: 3px solid var(--accent-color);
    font-weight: 700;
}

.policy-section h3 {
    color: var(--primary-color);
    font-size: 1.35rem;
    margin: 2rem 0 1rem;
    font-weight: 600;
}

.policy-section h4 {
    color: var(--text-primary);
    font-size: 1.1rem;
    margin: 1.5rem 0 0.75rem;
    font-weight: 600;
}

.policy-section p {
    margin-bottom: 1rem;
    color: var(--text-secondary);
    line-height: 1.8;
}

.policy-section ul {
    margin: 1rem 0 1.5rem 1.5rem;
    color: var(--text-secondary);
}

.policy-section li {
    margin: 0.75rem 0;
    padding-left: 0.5rem;
}

.policy-section li::marker {
    color: var(--accent-color);
}

/* Subsections */
.subsection {
    margin: 2rem 0;
    padding: 1.5rem;
    background-color: var(--bg-secondary);
    border-radius: var(--border-radius);
    border-left: 3px solid var(--accent-color);
}

/* Use Case Grid */
.use-case-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
    margin: 2rem 0;
}

.use-case-card {
    background: white;
    padding: 1.75rem;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-color);
    transition: var(--transition);
}

.use-case-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
    border-color: var(--accent-color);
}

.use-case-icon {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.use-case-card h4 {
    color: var(--primary-dark);
    margin: 0 0 0.75rem 0;
    font-size: 1.15rem;
}

.use-case-card p {
    color: var(--text-secondary);
    font-size: 0.95rem;
    margin: 0;
    line-height: 1.6;
}

/* Service Table */
.service-table {
    margin: 2rem 0;
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-color);
}

.service-row {
    display: grid;
    grid-template-columns: 1.2fr 1.5fr 2fr;
    gap: 1.5rem;
    padding: 1.25rem 1.5rem;
    background-color: white;
    border-bottom: 1px solid var(--border-color);
}

.service-row:last-child {
    border-bottom: none;
}

.service-header {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-light));
    color: white;
    font-weight: 600;
    font-size: 0.95rem;
}

.service-row > div {
    display: flex;
    align-items: center;
}

/* Info Box */
.info-box {
    background-color: var(--bg-tertiary);
    border-left: 4px solid var(--accent-color);
    padding: 1.5rem;
    margin: 2rem 0;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-sm);
}

.info-box.warning {
    background-color: #fff8e1;
    border-left-color: #ffa726;
}

.info-box p {
    margin: 0;
    color: var(--text-primary);
}

/* Storage Grid */
.storage-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin: 2rem 0;
}

.storage-card {
    background: linear-gradient(135deg, white, var(--bg-secondary));
    padding: 1.75rem;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-color);
    transition: var(--transition);
}

.storage-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.storage-card h4 {
    color: var(--primary-color);
    margin: 0 0 1rem 0;
    font-size: 1.1rem;
}

.storage-card p {
    color: var(--text-secondary);
    font-size: 0.95rem;
    margin: 0;
}

/* Rights List */
.rights-list {
    margin: 2rem 0;
}

.right-item {
    display: flex;
    gap: 1.25rem;
    padding: 1.5rem;
    margin: 1rem 0;
    background: white;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-color);
    transition: var(--transition);
}

.right-item:hover {
    border-color: var(--accent-color);
    box-shadow: var(--shadow-md);
}

.right-icon {
    width: 36px;
    height: 36px;
    background: linear-gradient(135deg, var(--accent-color), var(--primary-light));
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    flex-shrink: 0;
    font-size: 1.25rem;
}

.right-item h4 {
    color: var(--primary-dark);
    margin: 0 0 0.5rem 0;
    font-size: 1.1rem;
}

.right-item p {
    color: var(--text-secondary);
    font-size: 0.95rem;
    margin: 0;
}

/* Permissions Grid */
.permissions-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1.25rem;
    margin: 2rem 0;
}

.permission-card {
    background: white;
    padding: 1.5rem;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-color);
    text-align: center;
    transition: var(--transition);
}

.permission-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
    border-color: var(--accent-color);
}

.permission-icon {
    font-size: 2.5rem;
    margin-bottom: 0.75rem;
}

.permission-card h4 {
    color: var(--primary-dark);
    margin: 0 0 0.75rem 0;
    font-size: 1.05rem;
}

.permission-card p {
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin: 0;
}

/* Regional Section */
.regional-section {
    margin: 2rem 0;
    padding: 1.5rem;
    background-color: var(--bg-secondary);
    border-radius: var(--border-radius);
    border-left: 3px solid var(--primary-light);
}

.regional-section h4 {
    color: var(--primary-color);
    margin: 0 0 0.75rem 0;
}

.regional-section p {
    margin: 0;
}

/* Contact Box */
.contact-box {
    background: linear-gradient(135deg, var(--bg-tertiary), var(--bg-secondary));
    padding: 2rem;
    border-radius: var(--border-radius);
    margin: 2rem 0;
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-sm);
}

.contact-item {
    margin: 1rem 0;
    padding: 0.75rem 0;
    border-bottom: 1px solid var(--border-color);
}

.contact-item:last-child {
    border-bottom: none;
}

.contact-item strong {
    color: var(--primary-dark);
    display: inline-block;
    min-width: 140px;
}

.contact-item a {
    color: var(--accent-color);
    text-decoration: none;
    font-weight: 500;
    transition: var(--transition);
}

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

.final-note {
    margin-top: 2rem;
    padding: 1.5rem;
    background-color: var(--bg-tertiary);
    border-radius: var(--border-radius);
    text-align: center;
    font-style: italic;
    color: var(--text-secondary);
}

/* Footer */
.footer {
    background-color: var(--primary-dark);
    color: white;
    text-align: center;
    padding: 2rem;
    margin-top: 4rem;
}

.footer p {
    margin: 0 0 1rem 0;
    opacity: 0.9;
}

.footer-links {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1rem;
}

.footer-links a {
    color: white;
    text-decoration: none;
    opacity: 0.8;
    transition: var(--transition);
}

.footer-links a:hover {
    opacity: 1;
    text-decoration: underline;
}

.footer-links span {
    opacity: 0.5;
}

/* Back to Top Button */
.back-to-top {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, var(--accent-color), var(--primary-light));
    color: white;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow-lg);
    opacity: 0;
    visibility: hidden;
    transition: var(--transition);
    z-index: 1000;
}

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

.back-to-top:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.15);
}

.back-to-top svg {
    width: 24px;
    height: 24px;
}

/* Responsive Design */
@media (max-width: 768px) {
    .header {
        padding: 2rem 1.5rem;
    }

    .header h1 {
        font-size: 1.75rem;
    }

    .header-subtitle {
        font-size: 1rem;
    }

    .logo-icon {
        width: 36px;
        height: 36px;
    }

    .table-of-contents,
    .content {
        padding: 1.5rem;
        margin: 1.5rem;
    }

    .policy-section h2 {
        font-size: 1.5rem;
    }

    .policy-section h3 {
        font-size: 1.2rem;
    }

    .service-row {
        grid-template-columns: 1fr;
        gap: 0.75rem;
        padding: 1rem;
    }

    .service-header {
        display: none;
    }

    .service-row > div::before {
        content: attr(data-label);
        font-weight: 600;
        display: block;
        margin-bottom: 0.25rem;
        color: var(--primary-color);
    }

    .use-case-grid,
    .storage-grid,
    .permissions-grid {
        grid-template-columns: 1fr;
    }

    .back-to-top {
        bottom: 1rem;
        right: 1rem;
        width: 45px;
        height: 45px;
    }

    .contact-item strong {
        display: block;
        margin-bottom: 0.5rem;
    }
}

@media (max-width: 480px) {
    body {
        font-size: 15px;
    }

    .header h1 {
        font-size: 1.5rem;
    }

    .logo-section {
        flex-direction: column;
        gap: 0.5rem;
    }

    .table-of-contents,
    .content {
        padding: 1rem;
        margin: 1rem;
    }

    .policy-section h2 {
        font-size: 1.35rem;
    }

    .right-item {
        flex-direction: column;
        gap: 1rem;
    }

    .right-icon {
        margin: 0 auto;
    }
}

/* Print Styles */
@media print {
    .table-of-contents,
    .back-to-top,
    .footer-links {
        display: none;
    }

    .header {
        background: var(--primary-color);
        color: black;
        page-break-after: avoid;
    }

    .policy-section {
        page-break-inside: avoid;
    }

    body {
        background: white;
    }

    .container {
        box-shadow: none;
    }
}