/* ============================================================================
   NIZHARA Real Estate - Legal Pages Stylesheet
   Privacy Policy, Terms of Service, Cookie Policy
   ============================================================================ */

/* ========================================================================
   LEGAL HERO SECTION
   ======================================================================== */

.legal-hero {
    background: linear-gradient(360deg, var(--color-primary) 0%, var(--color-highlight) 90%);
    padding: 120px 0 80px;
    color: white;
    position: relative;
    overflow: hidden;
    max-height: 415px;;
}

.legal-hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url(/assets/images/pattern-overlay.png) no-repeat bottom center;
    background-size: contain; 
    opacity: 0.1;
    z-index: 1;
}


.legal-hero .hero-content {
    position: relative;
    z-index: 2;
    text-align: center;
    max-width: 800px;
    margin: 0 auto;
}

.legal-hero .hero-title {
    font-size: clamp(2rem, 4vw, 3.5rem);
    font-weight: var(--font-weight-bold);
    margin-bottom: 1.5rem;
    line-height: 1.2;
    text-transform: uppercase;
    letter-spacing: 0.02em;
}

.legal-hero .hero-description {
    font-size: clamp(1rem, 1.5vw, 1.25rem);
    margin-bottom: 2rem;
    opacity: 0.9;
    line-height: 1.6;
    font-weight: var(--font-weight-normal);
}

.legal-hero .hero-meta {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 2rem;
    margin-top: 2rem;
}

.legal-hero .last-updated {
    background: rgba(255, 255, 255, 0.1);
    padding: 0.5rem 1rem;
    border-radius: 25px;
    font-size: 0.9rem;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    font-weight: var(--font-weight-medium);
    text-transform: uppercase;
    letter-spacing: 0.025em;
}

/* ========================================================================
   LEGAL PAGE LAYOUT
   ======================================================================== */

.legal-page-section {
    padding: 8vw 0 6vw 0;
    background: var(--color-white);
    min-height: auto;
    position: relative;
    padding: 5vh;
}

.legal-page-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent 0%, var(--color-accent) 50%, transparent 100%);
    opacity: 0.3;
}

/* ========================================================================
   LEGAL PAGE CONTENT
   ======================================================================== */

.legal-page-content {
    max-width: 52.083vw;
    margin: 0 auto;
    line-height: 1.7;
}

.legal-section {
    margin-bottom: 3vw;
    position: relative;
}

.legal-section:last-child {
    margin-bottom: 0;
}

.legal-section h2 {
    font-weight: var(--font-weight-semibold);
    font-size: clamp(1.25rem, 2vw, 1.875rem);
    line-height: 1.3;
    color: var(--color-primary);
    margin-bottom: 1.5vw;
    text-transform: uppercase;
    letter-spacing: 0.025em;
    position: relative;
    padding-left: 1.5vw;
}

.legal-section h2::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 0.5vw;
    height: 100%;
    background: linear-gradient(180deg, var(--color-accent) 0%, var(--color-highlight) 100%);
    border-radius: 2px;
}

.legal-section h3 {
    font-weight: var(--font-weight-medium);
    font-size: clamp(1rem, 1.5vw, 1.375rem);
    line-height: 1.4;
    color: var(--color-primary);
    margin-bottom: 1vw;
    margin-top: 2vw;
    text-transform: uppercase;
    letter-spacing: 0.025em;
}

.legal-section p {
    font-weight: var(--font-weight-normal);
    font-size: clamp(0.875rem, 1.1vw, 1.125rem);
    line-height: 1.7;
    color: var(--color-gray-700);
    margin-bottom: 1.5vw;
    text-align: justify;
}

.legal-section p:last-child {
    margin-bottom: 0;
}

.legal-section ul {
    list-style: none;
    padding: 0;
    margin: 1.5vw 0;
}

.legal-section li {
    font-weight: var(--font-weight-normal);
    font-size: clamp(0.875rem, 1.1vw, 1.125rem);
    line-height: 1.7;
    color: var(--color-gray-700);
    margin-bottom: 0.8vw;
    padding-left: 2vw;
    position: relative;
    text-align: justify;
}

.legal-section li::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0.85em;
    width: 0.5vw;
    height: 0.5vw;
    background: var(--color-accent);
    border-radius: var(--radius-full);
    transform: translateY(-50%);
}

.legal-section li:last-child {
    margin-bottom: 0;
}

/* ========================================================================
   SPECIAL CONTENT SECTIONS
   ======================================================================== */

.cookie-type {
    background: var(--color-gray-50);
    padding: 2vw;
    border-radius: var(--radius-lg);
    margin-bottom: 2vw;
    border-left: 4px solid var(--color-accent);
    transition: var(--transition-base);
}

.cookie-type:hover {
    background: var(--color-white);
    box-shadow: var(--shadow-base);
    transform: translateY(-2px);
}

.cookie-type h3 {
    margin-top: 0;
    color: var(--color-highlight);
}

.third-party-service {
    background: linear-gradient(135deg, var(--color-gray-50) 0%, var(--color-white) 100%);
    padding: 2vw;
    border-radius: var(--radius-lg);
    margin-bottom: 2vw;
    border: 1px solid var(--color-gray-200);
    transition: var(--transition-base);
}

.third-party-service:hover {
    border-color: var(--color-accent);
    box-shadow: var(--shadow-accent);
    transform: translateY(-2px);
}

.third-party-service h3 {
    margin-top: 0;
    color: var(--color-primary);
    font-size: clamp(1rem, 1.3vw, 1.25rem);
}

.contact-info {
    background: var(--color-light-gray);
    padding: 2vw;
    border-radius: var(--radius-lg);
    border: 2px solid var(--color-accent);
    margin-top: 1.5vw;
}

.contact-info p {
    margin-bottom: 0.8vw;
    text-align: left;
}

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

/* ========================================================================
   LINKS
   ======================================================================== */

.legal-link,
.contact-info a {
    color: var(--color-highlight);
    text-decoration: none;
    font-weight: var(--font-weight-medium);
    transition: var(--transition-colors);
    border-bottom: 1px solid transparent;
}

.legal-link:hover,
.contact-info a:hover {
    color: var(--color-accent);
    border-bottom-color: var(--color-accent);
}

.legal-link:active,
.contact-info a:active {
    color: var(--color-primary);
    border-bottom-color: var(--color-primary);
}

/* External links */
.legal-section a[target="_blank"] {
    position: relative;
    padding-right: 1.2em;
}

.legal-section a[target="_blank"]::after {
    content: '↗';
    position: absolute;
    right: 0;
    top: 0;
    font-size: 0.8em;
    opacity: 0.7;
    transition: var(--transition-base);
}

.legal-section a[target="_blank"]:hover::after {
    opacity: 1;
    transform: translate(2px, -2px);
}

/* ========================================================================
   LEGAL PAGE FOOTER
   ======================================================================== */

.legal-page-footer {
    margin-top: 4vw;
    padding-top: 3vw;
    border-top: 1px solid var(--color-gray-200);
    text-align: center;
}

.legal-navigation {
    display: flex;
    justify-content: center;
    gap: 2vw;
    flex-wrap: wrap;
}

.legal-nav-link {
    display: inline-flex;
    align-items: center;
    padding: 1vw 2vw;
    background: var(--color-white);
    color: var(--color-primary);
    text-decoration: none;
    border: 2px solid var(--color-accent);
    border-radius: var(--radius-base);
    font-weight: var(--font-weight-medium);
    font-size: clamp(0.875rem, 1vw, 1rem);
    text-transform: uppercase;
    letter-spacing: 0.025em;
    transition: var(--transition-all);
    position: relative;
    overflow: hidden;
}

.legal-nav-link::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(217, 198, 163, 0.2), transparent);
    transition: left 0.6s ease;
}

.legal-nav-link:hover {
    background: var(--color-accent);
    color: var(--color-white);
    transform: translateY(-2px);
    box-shadow: var(--shadow-accent);
}

.legal-nav-link:hover::before {
    left: 100%;
}

.legal-nav-link:active {
    background: var(--color-highlight);
    border-color: var(--color-highlight);
    transform: translateY(0);
}

/* ========================================================================
   RESPONSIVE DESIGN
   ======================================================================== */

@media (min-width: 1400px) {
    .hero-content {
        padding: 0;
        min-height: 100% !important;
    }
}

@media (min-width: 120px) and (max-width: 1599.98px) {
    .hero-content {
        padding: 0;
        min-height: 100% !important;
    }
}

@media (min-width: 992px) and (max-width: 1199.98px) {
    .hero-content {
        padding: 0;
        min-height: 100% !important;
    }
}

@media (min-width: 768px) and (max-width: 991.98px) {
    .hero-content {
        padding: 0;
        min-height: 100% !important;
    }
}

/* Responsive Design for Legal Hero */
@media (max-width: 768px) {
    .legal-hero {
        padding: 100px 0 60px;
    }
    
    .legal-hero .hero-title {
        font-size: 2.5rem;
    }
    
    .legal-hero .hero-description {
        font-size: 1.1rem;
    }
    
    .legal-hero .hero-meta {
        flex-direction: column;
        gap: 1rem;
    }
}

@media (max-width: 480px) {
    .legal-hero .hero-title {
        font-size: 2rem;
    }
    
    .legal-hero .hero-description {
        font-size: 1rem;
    }
}

/* Tablet Styles */
@media (max-width: 1200px) {
    .legal-page-section {
        padding: 10vw 0 8vw 0;
    }
    
    .legal-page-content {
        max-width: 70vw;
    }
    
    .legal-section h2::before {
        width: 0.7vw;
    }
    
    .legal-section li::before {
        width: 0.7vw;
        height: 0.7vw;
    }
    
    .cookie-type,
    .third-party-service,
    .contact-info {
        padding: 3vw;
    }
    
    .legal-navigation {
        gap: 3vw;
    }
    
    .legal-nav-link {
        padding: 1.5vw 3vw;
    }
}

/* Mobile Styles */
@media (max-width: 768px) {
    .legal-page-section {
        padding: 80px 0 60px 0;
    }
    
    .legal-page-content {
        max-width: 90vw;
        padding: 0 20px;
    }
    
    .legal-section {
        margin-bottom: 40px;
    }
    
    .legal-section h2 {
        font-size: 20px;
        line-height: 1.3;
        margin-bottom: 20px;
        padding-left: 20px;
    }
    
    .legal-section h2::before {
        width: 4px;
    }
    
    .legal-section h3 {
        font-size: 16px;
        margin-bottom: 15px;
        margin-top: 25px;
    }
    
    .legal-section p {
        font-size: 15px;
        line-height: 1.6;
        margin-bottom: 20px;
        text-align: left;
    }
    
    .legal-section ul {
        margin: 20px 0;
    }
    
    .legal-section li {
        font-size: 15px;
        line-height: 1.6;
        margin-bottom: 12px;
        padding-left: 25px;
        text-align: left;
    }
    
    .legal-section li::before {
        width: 6px;
        height: 6px;
        top: 0.7em;
    }
    
    .cookie-type,
    .third-party-service,
    .contact-info {
        padding: 20px;
        margin-bottom: 20px;
    }
    
    .cookie-type h3,
    .third-party-service h3 {
        font-size: 16px;
    }
    
    .contact-info p {
        margin-bottom: 10px;
        font-size: 14px;
    }
    
    .legal-page-footer {
        margin-top: 40px;
        padding-top: 30px;
    }
    
    .legal-navigation {
        flex-direction: column;
        gap: 15px;
        align-items: center;
    }
    
    .legal-nav-link {
        padding: 15px 25px;
        font-size: 14px;
        width: 200px;
        justify-content: center;
    }
    
    /* External link icons */
    .legal-section a[target="_blank"] {
        padding-right: 1em;
    }
    
    .legal-section a[target="_blank"]::after {
        font-size: 0.9em;
    }
}

/* Small Mobile Styles */
@media (max-width: 480px) {
    .legal-page-section {
        padding: 60px 0 40px 0;
    }
    
    .legal-page-content {
        padding: 0 15px;
    }
    
    .legal-section h2 {
        font-size: 18px;
        padding-left: 15px;
    }
    
    .legal-section h3 {
        font-size: 15px;
    }
    
    .legal-section p,
    .legal-section li {
        font-size: 14px;
    }
    
    .legal-section li {
        padding-left: 20px;
    }
    
    .cookie-type,
    .third-party-service,
    .contact-info {
        padding: 15px;
    }
    
    .legal-nav-link {
        width: 180px;
        padding: 12px 20px;
        font-size: 13px;
    }
}

/* ========================================================================
   ACCESSIBILITY ENHANCEMENTS
   ======================================================================== */

/* Focus styles for keyboard navigation */
.legal-nav-link:focus,
.legal-link:focus,
.contact-info a:focus {
    outline: 3px solid var(--color-accent);
    outline-offset: 2px;
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .legal-section h2::before,
    .legal-section li::before {
        background: #000;
    }
    
    .cookie-type,
    .third-party-service {
        border: 2px solid #000;
    }
    
    .contact-info {
        border-color: #000;
    }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
    .cookie-type,
    .third-party-service,
    .legal-nav-link {
        transition: none;
    }
    
    .legal-nav-link::before {
        transition: none;
    }
    
    .legal-section a[target="_blank"]::after {
        transition: none;
    }
}