/* Legal Pages Specific Styles */
.legal-main {
    padding-top: 80px;
    min-height: 100vh;
    background: linear-gradient(135deg, var(--deep-ocean) 0%, var(--ocean-blue) 100%);
}

.legal-hero {
    padding: 4rem 0;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.legal-hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: 
        radial-gradient(circle at 25% 75%, rgba(0, 255, 212, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 75% 25%, rgba(69, 179, 157, 0.1) 0%, transparent 50%);
    animation: float 8s ease-in-out infinite;
}

.page-title {
    font-family: var(--font-heading);
    font-size: 3.5rem;
    font-weight: 800;
    color: var(--bioluminescent);
    margin-bottom: 1rem;
    text-shadow: 0 0 30px rgba(0, 255, 212, 0.5);
    position: relative;
    z-index: 2;
}

.page-subtitle {
    font-size: 1.3rem;
    color: var(--sand-beige);
    margin-bottom: 2rem;
    position: relative;
    z-index: 2;
}

.last-updated {
    background: rgba(0, 255, 212, 0.1);
    color: var(--bioluminescent);
    padding: 0.75rem 1.5rem;
    border-radius: 25px;
    border: 1px solid rgba(0, 255, 212, 0.3);
    display: inline-block;
    font-size: 0.9rem;
    font-weight: 500;
    position: relative;
    z-index: 2;
}

.legal-content {
    padding: 4rem 0 6rem;
    background: rgba(0, 0, 0, 0.1);
    position: relative;
}

.legal-content::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><path d="M0,50 Q25,30 50,50 T100,50 L100,100 L0,100 Z" fill="rgba(69,179,157,0.05)"/></svg>') repeat-x;
    background-size: 200px 100px;
    animation: wave-move 15s linear infinite;
    opacity: 0.3;
}

.content-wrapper {
    display: grid;
    grid-template-columns: 250px 1fr;
    gap: 3rem;
    align-items: start;
    position: relative;
    z-index: 2;
}

/* Table of Contents */
.table-of-contents {
    position: sticky;
    top: 120px;
    background: rgba(11, 47, 74, 0.8);
    border-radius: 15px;
    padding: 2rem;
    border: 2px solid rgba(0, 255, 212, 0.3);
    backdrop-filter: blur(10px);
    box-shadow: 0 10px 30px rgba(0, 255, 212, 0.1);
}

.table-of-contents h3 {
    font-family: var(--font-heading);
    color: var(--bioluminescent);
    font-size: 1.2rem;
    margin-bottom: 1.5rem;
    text-align: center;
}

.toc-nav {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.toc-link {
    color: var(--sand-beige);
    text-decoration: none;
    padding: 0.75rem 1rem;
    border-radius: 8px;
    transition: all 0.3s ease;
    font-size: 0.9rem;
    border-left: 3px solid transparent;
    position: relative;
}

.toc-link:hover,
.toc-link.active {
    background: rgba(0, 255, 212, 0.1);
    color: var(--bioluminescent);
    border-left-color: var(--bioluminescent);
    transform: translateX(5px);
}

.toc-link::before {
    content: '🌊';
    margin-right: 0.5rem;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.toc-link:hover::before,
.toc-link.active::before {
    opacity: 1;
}

/* Legal Document */
.legal-document {
    background: rgba(11, 47, 74, 0.6);
    border-radius: 20px;
    padding: 3rem;
    border: 2px solid rgba(0, 255, 212, 0.3);
    backdrop-filter: blur(10px);
    box-shadow: 0 20px 40px rgba(0, 255, 212, 0.1);
    line-height: 1.7;
}

.intro-section {
    margin-bottom: 3rem;
    padding-bottom: 2rem;
    border-bottom: 2px solid rgba(0, 255, 212, 0.2);
}

.intro-text {
    font-size: 1.1rem;
    color: var(--sand-beige);
    margin-bottom: 2rem;
    font-weight: 400;
}

.highlight-box {
    background: rgba(0, 255, 212, 0.1);
    border: 2px solid rgba(0, 255, 212, 0.3);
    border-radius: 15px;
    padding: 2rem;
    margin: 2rem 0;
}

.highlight-box h4 {
    font-family: var(--font-heading);
    color: var(--bioluminescent);
    font-size: 1.3rem;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.highlight-box ul {
    margin: 0;
    padding-left: 1.5rem;
}

.highlight-box li {
    color: var(--pearl-white);
    margin-bottom: 0.5rem;
}

.legal-section {
    margin-bottom: 3rem;
    scroll-margin-top: 120px;
}

.legal-section h2 {
    font-family: var(--font-heading);
    font-size: 2rem;
    color: var(--bioluminescent);
    margin-bottom: 1.5rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid rgba(0, 255, 212, 0.3);
    position: relative;
}

.legal-section h2::before {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 60px;
    height: 2px;
    background: linear-gradient(90deg, var(--seafoam-green), var(--bioluminescent));
}

.legal-section h3 {
    font-family: var(--font-heading);
    font-size: 1.4rem;
    color: var(--seafoam-green);
    margin: 2rem 0 1rem;
    font-weight: 600;
}

.legal-section p {
    color: var(--pearl-white);
    margin-bottom: 1.5rem;
    text-align: justify;
}

.legal-section ul,
.legal-section ol {
    color: var(--pearl-white);
    margin: 1rem 0 1.5rem 2rem;
}

.legal-section li {
    margin-bottom: 0.75rem;
    line-height: 1.6;
}

.legal-section strong {
    color: var(--bioluminescent);
    font-weight: 600;
}

.legal-section a {
    color: var(--seafoam-green);
    text-decoration: none;
    border-bottom: 1px solid rgba(69, 179, 157, 0.3);
    transition: all 0.3s ease;
}

.legal-section a:hover {
    color: var(--bioluminescent);
    border-bottom-color: var(--bioluminescent);
}

/* Contact Details */
.contact-details {
    background: rgba(0, 0, 0, 0.2);
    border-radius: 10px;
    padding: 2rem;
    margin: 2rem 0;
    border: 1px solid rgba(0, 255, 212, 0.2);
}

.contact-method {
    margin-bottom: 1rem;
    padding: 0.75rem;
    background: rgba(0, 255, 212, 0.05);
    border-radius: 8px;
    border-left: 3px solid var(--seafoam-green);
}

.contact-method:last-child {
    margin-bottom: 0;
}

.contact-method strong {
    color: var(--bioluminescent);
    display: inline-block;
    min-width: 120px;
}

/* Acknowledgment Section */
.acknowledgment-section {
    background: linear-gradient(45deg, rgba(0, 255, 212, 0.1), rgba(69, 179, 157, 0.1));
    border: 2px solid rgba(0, 255, 212, 0.3);
    border-radius: 15px;
    padding: 2rem;
    margin-top: 3rem;
    text-align: center;
}

.acknowledgment-section h3 {
    font-family: var(--font-heading);
    color: var(--bioluminescent);
    font-size: 1.5rem;
    margin-bottom: 1rem;
}

.acknowledgment-section p {
    color: var(--pearl-white);
    margin-bottom: 1rem;
}

.acknowledgment-section p:last-child {
    color: var(--seafoam-green);
    font-weight: 600;
    font-size: 1.1rem;
    margin-bottom: 0;
}

/* Floating Elements Animation */
@keyframes seaweedSway {
    0%, 100% {
        transform: rotate(-2deg) translateX(0);
    }
    25% {
        transform: rotate(1deg) translateX(5px);
    }
    50% {
        transform: rotate(-1deg) translateX(-3px);
    }
    75% {
        transform: rotate(2deg) translateX(7px);
    }
}

.legal-content::after {
    content: '🌿';
    position: absolute;
    font-size: 3rem;
    color: rgba(69, 179, 157, 0.3);
    animation: seaweedSway 6s ease-in-out infinite;
    top: 20%;
    right: 5%;
}

/* Responsive Design */
@media (max-width: 1024px) {
    .content-wrapper {
        grid-template-columns: 200px 1fr;
        gap: 2rem;
    }

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

    .legal-document {
        padding: 2rem;
    }
}

@media (max-width: 768px) {
    .content-wrapper {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .table-of-contents {
        position: static;
        order: 2;
        margin-top: 2rem;
    }

    .legal-document {
        order: 1;
    }

    .page-title {
        font-size: 2.5rem;
    }

    .legal-section h2 {
        font-size: 1.6rem;
    }

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

    .toc-nav {
        flex-direction: row;
        flex-wrap: wrap;
        gap: 0.5rem;
    }

    .toc-link {
        flex: 1;
        min-width: calc(50% - 0.25rem);
        text-align: center;
        padding: 0.5rem;
        font-size: 0.8rem;
    }
}

@media (max-width: 480px) {
    .legal-hero {
        padding: 2rem 0;
    }

    .page-title {
        font-size: 2rem;
    }

    .page-subtitle {
        font-size: 1.1rem;
    }

    .legal-document {
        padding: 1.5rem;
    }

    .legal-content {
        padding: 2rem 0 4rem;
    }

    .highlight-box,
    .contact-details,
    .acknowledgment-section {
        padding: 1.5rem;
    }

    .toc-link {
        min-width: 100%;
    }
}

/* Smooth scrolling for anchor links */
html {
    scroll-behavior: smooth;
}

/* Active section highlighting */
.legal-section.in-view h2 {
    color: var(--seafoam-green);
    text-shadow: 0 0 10px rgba(69, 179, 157, 0.5);
}

/* Print styles */
@media print {
    .legal-main {
        background: white;
        color: black;
    }

    .table-of-contents,
    .header,
    .footer {
        display: none;
    }

    .content-wrapper {
        grid-template-columns: 1fr;
    }

    .legal-document {
        background: white;
        border: none;
        box-shadow: none;
    }

    .highlight-box {
        border: 2px solid #ccc;
        background: #f5f5f5;
    }
}

/* Custom scrollbar for legal content */
.legal-document::-webkit-scrollbar {
    width: 8px;
}

.legal-document::-webkit-scrollbar-track {
    background: rgba(11, 47, 74, 0.3);
    border-radius: 4px;
}

.legal-document::-webkit-scrollbar-thumb {
    background: var(--bioluminescent);
    border-radius: 4px;
}

.legal-document::-webkit-scrollbar-thumb:hover {
    background: var(--seafoam-green);
}