/* ============================================
   Modern Styles for Policy Pages
   Styling without changing any text content
   ============================================ */

:root {
    --policy-primary: #007AFF;
    --policy-primary-dark: #0051D5;
    --policy-text: #1D1D1F;
    --policy-text-secondary: #6E6E73;
    --policy-bg: #FFFFFF;
    --policy-bg-light: #F5F5F7;
    --policy-border: #D2D2D7;
    --policy-accent: #30249c;
}

/* Reset and Base */
body {
    font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'SF Pro Text', 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    font-size: 1rem;
    line-height: 1.7;
    color: var(--policy-text);
    background-color: var(--policy-bg-light);
    margin: 0;
    padding: 0;
}

.body {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Header with Home Button */
#header {
    background: var(--policy-bg);
    border-bottom: 1px solid var(--policy-border);
    padding: 1.5rem 0;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    position: sticky;
    top: 0;
    z-index: 100;
}

#header .header-content {
    max-width: 900px;
    margin: 0 auto;
    padding: 0 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

#header img {
    max-height: 40px;
    width: auto;
}

.home-button {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    background: var(--policy-primary);
    color: white;
    text-decoration: none;
    border-radius: 8px;
    font-weight: 600;
    font-size: 0.9375rem;
    transition: all 0.2s ease;
    box-shadow: 0 2px 8px rgba(0, 122, 255, 0.2);
}

.home-button:hover {
    background: var(--policy-primary-dark);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 122, 255, 0.3);
    color: white;
    text-decoration: none;
}

.home-button::before {
    content: "←";
    font-size: 1.125rem;
}

/* Main Content */
.main {
    flex: 1;
    padding: 2rem 0;
}

.section {
    padding: 3rem 0;
}

.section-default {
    background: var(--policy-bg-light);
}

.container {
    max-width: 900px;
    margin: 0 auto;
    padding: 0 2rem;
}

/* Typography */
h1 {
    font-size: 2.5rem;
    font-weight: 800;
    color: var(--policy-text);
    margin: 0 0 1rem 0;
    padding: 1.5rem 2rem;
    background: linear-gradient(135deg, var(--policy-primary), var(--policy-primary-dark));
    color: white !important;
    border-radius: 12px;
    text-align: center;
    letter-spacing: -0.02em;
    box-shadow: 0 4px 16px rgba(0, 122, 255, 0.2);
}

h2 {
    font-size: 2rem;
    font-weight: 700;
    color: var(--policy-text);
    margin: 2rem 0 1rem 0;
    padding-bottom: 0.5rem;
    border-bottom: 3px solid var(--policy-primary);
    letter-spacing: -0.01em;
}

h3 {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--policy-text);
    margin: 1.5rem 0 0.75rem 0;
}

p {
    font-size: 1.0625rem;
    line-height: 1.8;
    color: var(--policy-text-secondary);
    margin: 1rem 0;
    text-align: justify;
}

p[style*="color:#30249c"],
p[style*="color: #30249c"] {
    color: var(--policy-primary) !important;
    font-weight: 600;
    font-size: 1.125rem;
    margin-top: 1.5rem;
    margin-bottom: 0.75rem;
}

b, strong {
    font-weight: 600;
    color: var(--policy-text);
}

.cambio {
    color: var(--policy-primary) !important;
    font-weight: 600;
}

/* Lists */
ul, ol {
    margin: 1rem 0;
    padding-left: 2rem;
}

li {
    font-size: 1.0625rem;
    line-height: 1.8;
    color: var(--policy-text-secondary);
    margin: 0.75rem 0;
    text-align: justify;
}

ul li {
    list-style-type: disc;
}

ol li {
    list-style-type: decimal;
}

/* Divider */
.divider {
    margin: 2rem 0;
    text-align: center;
}

.divider i {
    color: var(--policy-primary);
    font-size: 1.5rem;
}

/* Content Box */
.col-md-10 {
    background: var(--policy-bg);
    border-radius: 16px;
    padding: 3rem;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    border: 1px solid var(--policy-border);
    margin: 2rem 0;
}

.col-md-offset-1 {
    margin-left: 8.33333333%;
}

.mt-sm {
    margin-top: 1rem;
}

.row {
    margin: 0;
    padding: 0;
}

/* Tables */
table {
    width: 100%;
    border-collapse: collapse;
    margin: 1.5rem 0;
    background: var(--policy-bg);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

td, th {
    padding: 1rem;
    text-align: left;
    border-bottom: 1px solid var(--policy-border);
    font-size: 1rem;
}

th {
    background: var(--policy-bg-light);
    font-weight: 600;
    color: var(--policy-text);
}

tr:last-child td {
    border-bottom: none;
}

/* Links */
a {
    color: var(--policy-primary);
    text-decoration: none;
    transition: color 0.2s ease;
}

a:hover {
    color: var(--policy-primary-dark);
    text-decoration: underline;
}

/* Cookie Notice */
#aviso-cookie {
    margin: 1rem 0;
}

/* Responsive */
@media (max-width: 768px) {
    .container {
        padding: 0 1rem;
    }
    
    .col-md-10 {
        padding: 2rem 1.5rem;
        margin: 1rem 0;
    }
    
    .col-md-offset-1 {
        margin-left: 0;
    }
    
    h1 {
        font-size: 2rem;
        padding: 1.25rem 1.5rem;
    }
    
    h2 {
        font-size: 1.75rem;
    }
    
    h3 {
        font-size: 1.25rem;
    }
    
    p, li {
        font-size: 1rem;
    }
    
    .section {
        padding: 2rem 0;
    }
}

/* Hide broken vendor references */
body > *:not(.body) {
    display: none;
}

/* Ensure proper display */
.body > * {
    display: block;
}

/* Footer Styles */
.policy-footer {
    background: var(--policy-text);
    color: white;
    padding: 3rem 2rem 1.5rem;
    margin-top: 4rem;
}

.policy-footer-container {
    max-width: 900px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

.policy-footer-section h4 {
    font-size: 1.125rem;
    margin-bottom: 1rem;
    color: white;
    font-weight: 700;
}

.policy-footer-section ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.policy-footer-section ul li {
    margin-bottom: 0.75rem;
}

.policy-footer-section a {
    color: rgba(255, 255, 255, 0.75);
    text-decoration: none;
    transition: color 0.2s ease;
    font-size: 0.9375rem;
}

.policy-footer-section a:hover {
    color: white;
    text-decoration: underline;
}

.policy-footer-section p {
    color: rgba(255, 255, 255, 0.75);
    font-size: 0.9375rem;
    line-height: 1.7;
    margin: 1rem 0 0 0;
}

.policy-footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.15);
    padding-top: 1.5rem;
    text-align: center;
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.875rem;
    max-width: 900px;
    margin: 0 auto;
}

/* Override inline styles that break consistency */
.section-default {
    margin-left: 0 !important;
    margin-right: 0 !important;
    text-align: left !important;
    font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'SF Pro Text', 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif !important;
}

.title {
    background: linear-gradient(135deg, var(--policy-primary), var(--policy-primary-dark)) !important;
    text-align: center !important;
    font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'SF Pro Text', 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif !important;
    padding: 1.5rem 2rem !important;
    border-radius: 12px !important;
    color: white !important;
    margin-bottom: 1rem !important;
}

/* Override inline styles in style tags */
#styles {
    display: none !important;
}

/* Force consistent h2 styling */
h2[style*="background"] {
    background: transparent !important;
    color: var(--policy-text) !important;
    border-bottom: 3px solid var(--policy-primary) !important;
    padding-bottom: 0.5rem !important;
    font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'SF Pro Text', 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif !important;
}

/* Ensure all text uses consistent font */
body, p, li, td, th, a, b, strong, span {
    font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'SF Pro Text', 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif !important;
}

/* Fix alignment */
[align="center"] {
    text-align: center;
}

[align="left"] {
    text-align: left;
}

[align="right"] {
    text-align: right;
}

/* Improve readability */
.main {
    background: var(--policy-bg-light);
}

/* Style improvements for better UX */
.section-default .container {
    background: transparent;
}

/* Remove old theme styles interference */
.section-default {
    background: var(--policy-bg-light) !important;
}

/* Modern spacing */
.row + .row {
    margin-top: 2rem;
}

/* Better visual hierarchy */
h1 + h2 {
    margin-top: 0.5rem;
}

/* Improve list spacing */
ul ul, ol ol, ul ol, ol ul {
    margin-top: 0.5rem;
    margin-bottom: 0.5rem;
}

