/* style/gdpr.css */

/* Variables and Base Styles */
:root {
    --primary-color: #017439; /* Main brand green */
    --secondary-color: #FFFFFF; /* Auxiliary white */
    --text-dark: #333333; /* Dark text for light backgrounds */
    --text-light: #FFFFFF; /* Light text for dark backgrounds */
    --button-register-bg: #C30808; /* Custom register button background */
    --button-login-bg: #C30808; /* Custom login button background */
    --button-text-yellow: #FFFF00; /* Custom button text color */
    --border-light: #e0e0e0;
    --spacing-xs: 10px;
    --spacing-sm: 20px;
    --spacing-md: 40px;
    --spacing-lg: 60px;
    --max-content-width: 1200px;
}

/* Page container - inherits body background from shared.css, so text should be dark by default */
.page-gdpr {
    font-family: Arial, sans-serif;
    line-height: 1.6;
    color: var(--text-dark); /* Default text color for light body background */
    background-color: var(--secondary-color); /* Fallback, but body background is handled by shared.css */
}

/* Sections with specific background colors for contrast */
.page-gdpr__light-bg {
    background-color: var(--secondary-color);
    color: var(--text-dark);
}

.page-gdpr__dark-bg {
    background-color: var(--primary-color);
    color: var(--text-light);
}

/* Hero Section */
.page-gdpr__hero-section {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding-top: var(--spacing-xs); /* Small top padding, body handles --header-offset */
    padding-bottom: var(--spacing-lg);
    padding-left: var(--spacing-sm);
    padding-right: var(--spacing-sm);
    overflow: hidden; /* Ensure no overflow */
}

.page-gdpr__hero-content {
    position: relative;
    z-index: 2; /* Ensure content is above image if any overlap */
    max-width: 800px;
    margin-bottom: var(--spacing-md); /* Space between text and image */
}

.page-gdpr__main-title {
    font-size: clamp(2.2rem, 4vw, 3.5rem); /* Responsive font size */
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: var(--spacing-sm);
    color: var(--text-light); /* For dark hero section */
}

.page-gdpr__hero-description {
    font-size: 1.1rem;
    margin-bottom: var(--spacing-md);
    color: var(--text-light); /* For dark hero section */
}

.page-gdpr__hero-image {
    display: block;
    max-width: 100%;
    height: auto;
    margin: var(--spacing-sm) auto 0 auto; /* Space between content and image */
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    object-fit: cover;
    width: 100%; /* Ensure desktop width is 100% before max-width */
    max-width: var(--max-content-width);
    min-width: 200px; /* Min image size */
    min-height: 200px; /* Min image size */
}

/* General Section Styling */
.page-gdpr__section {
    padding: var(--spacing-lg) var(--spacing-sm);
    display: flex;
    justify-content: center;
    flex-direction: column;
    align-items: center;
}

.page-gdpr__container {
    max-width: var(--max-content-width);
    width: 100%; /* Ensure desktop width is 100% before max-width */
    margin: 0 auto;
    box-sizing: border-box;
}

.page-gdpr__section-title {
    font-size: clamp(1.8rem, 3vw, 2.8rem);
    font-weight: 700;
    text-align: center;
    margin-bottom: var(--spacing-md);
    color: var(--primary-color); /* Default for light backgrounds */
}

.page-gdpr__section-title--white {
    color: var(--text-light); /* For dark backgrounds */
}

.page-gdpr__text-block {
    margin-bottom: var(--spacing-sm);
    font-size: 1rem;
    line-height: 1.7;
    text-align: justify;
}

.page-gdpr__text-block--white {
    color: var(--text-light);
}

.page-gdpr__image {
    display: block;
    max-width: 100%;
    height: auto;
    margin: var(--spacing-md) auto;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    object-fit: cover;
    min-width: 200px; /* Min image size */
    min-height: 200px; /* Min image size */
}

/* Grid Cards for Principles */
.page-gdpr__grid-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: var(--spacing-sm);
    margin-top: var(--spacing-md);
    margin-bottom: var(--spacing-md);
}

.page-gdpr__card {
    background-color: var(--secondary-color); /* Default light background */
    color: var(--text-dark);
    padding: var(--spacing-sm);
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    text-align: left;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    transition: transform 0.3s ease;
}

.page-gdpr__card:hover {
    transform: translateY(-5px);
}

.page-gdpr__card--dark {
    background-color: rgba(255, 255, 255, 0.1); /* Semi-transparent white on dark bg */
    color: var(--text-light);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

.page-gdpr__card-title {
    font-size: 1.3rem;
    font-weight: 600;
    margin-bottom: var(--spacing-xs);
    color: var(--primary-color); /* Default for light cards */
}

.page-gdpr__card--dark .page-gdpr__card-title {
    color: var(--button-text-yellow); /* Yellow for titles on dark cards */
}

.page-gdpr__card-text {
    font-size: 0.95rem;
    line-height: 1.6;
    color: inherit; /* Inherit from card */
}

/* Lists */
.page-gdpr__list {
    list-style: disc;
    margin-left: var(--spacing-md);
    margin-bottom: var(--spacing-md);
    color: var(--text-dark); /* Default for light backgrounds */
}

.page-gdpr__list--white {
    color: var(--text-light);
}

.page-gdpr__list-item {
    margin-bottom: var(--spacing-xs);
    font-size: 1rem;
    line-height: 1.6;
}

.page-gdpr__list-item strong {
    color: var(--primary-color); /* Highlight important terms */
}

.page-gdpr__list--white .page-gdpr__list-item strong {
    color: var(--button-text-yellow); /* Highlight on dark background */
}

/* Buttons */
.page-gdpr__btn-primary,
.page-gdpr__btn-secondary {
    display: inline-block;
    padding: 12px 25px;
    border-radius: 5px;
    font-size: 1.1rem;
    font-weight: 600;
    text-decoration: none;
    transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease;
    cursor: pointer;
    text-align: center;
    max-width: 100%; /* Responsive button */
    box-sizing: border-box; /* Include padding in width calculation */
    white-space: normal; /* Allow text to wrap */
    word-wrap: break-word; /* Break long words */
}

.page-gdpr__btn-primary {
    background-color: var(--button-register-bg); /* Custom register button color */
    color: var(--button-text-yellow); /* Custom text color */
    border: 2px solid var(--button-register-bg);
    margin-right: var(--spacing-sm);
}

.page-gdpr__btn-primary:hover {
    background-color: #A10606; /* Darker shade of #C30808 */
    border-color: #A10606;
}

.page-gdpr__btn-secondary {
    background-color: transparent;
    color: var(--primary-color);
    border: 2px solid var(--primary-color);
}

.page-gdpr__btn-secondary:hover {
    background-color: var(--primary-color);
    color: var(--text-light);
}

/* CTA Section */
.page-gdpr__cta-section {
    text-align: center;
    padding-top: var(--spacing-lg);
    padding-bottom: var(--spacing-lg);
}

.page-gdpr__cta-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--spacing-sm);
}

.page-gdpr__cta-buttons {
    display: flex;
    justify-content: center;
    flex-wrap: wrap; /* Allow buttons to wrap on smaller screens */
    gap: var(--spacing-sm);
    width: 100%; /* Ensure desktop width is 100% before max-width */
    max-width: 500px; /* Limit button group width */
    margin-top: var(--spacing-sm);
}

.page-gdpr__btn-login {
    background-color: var(--button-login-bg); /* Custom login button color */
    color: var(--button-text-yellow); /* Custom text color */
    border: 2px solid var(--button-login-bg);
}

.page-gdpr__btn-login:hover {
    background-color: #A10606; /* Darker shade of #C30808 */
    border-color: #A10606;
}

/* FAQ Section */
.page-gdpr__faq-list {
    margin-top: var(--spacing-md);
    width: 100%;
}

.page-gdpr__faq-item {
    background-color: var(--secondary-color);
    border: 1px solid var(--border-light);
    border-radius: 8px;
    margin-bottom: var(--spacing-xs);
    overflow: hidden;
    color: var(--text-dark);
}

.page-gdpr__faq-question {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: var(--spacing-sm);
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    background-color: #f9f9f9;
    color: var(--primary-color);
    border-bottom: 1px solid var(--border-light);
    transition: background-color 0.3s ease;
    list-style: none; /* Remove default marker for <summary> */
}

.page-gdpr__faq-question::-webkit-details-marker {
    display: none; /* Hide default marker for Webkit browsers */
}

.page-gdpr__faq-item[open] .page-gdpr__faq-question {
    background-color: #f0f0f0;
    border-bottom: 1px solid transparent;
}

.page-gdpr__faq-qtext {
    flex-grow: 1;
    margin-right: var(--spacing-xs);
}

.page-gdpr__faq-toggle {
    font-size: 1.5rem;
    line-height: 1;
    width: 24px;
    text-align: center;
    user-select: none;
    color: var(--primary-color);
}

.page-gdpr__faq-answer {
    padding: var(--spacing-sm);
    font-size: 1rem;
    line-height: 1.7;
    border-top: 1px solid var(--border-light);
    color: var(--text-dark);
}

.page-gdpr__faq-answer p {
    margin-bottom: var(--spacing-xs);
}

.page-gdpr__faq-answer p:last-child {
    margin-bottom: 0;
}

/* Link styling */
.page-gdpr a {
    color: var(--primary-color);
    text-decoration: underline;
}

.page-gdpr a:hover {
    color: #005a2e; /* Slightly darker green */
}

/* Responsive Design */
@media (max-width: 768px) {
    .page-gdpr {
        font-size: 16px;
        line-height: 1.6;
    }

    .page-gdpr__hero-section {
        padding-top: var(--spacing-xs) !important; /* body handles --header-offset */
        padding-bottom: var(--spacing-md);
        padding-left: 15px;
        padding-right: 15px;
    }

    .page-gdpr__main-title {
        font-size: clamp(1.8rem, 7vw, 2.5rem);
    }

    .page-gdpr__hero-description {
        font-size: 1rem;
    }

    .page-gdpr__section {
        padding: var(--spacing-md) 15px;
    }

    .page-gdpr__section-title {
        font-size: clamp(1.5rem, 6vw, 2rem);
        margin-bottom: var(--spacing-sm);
    }

    .page-gdpr__text-block,
    .page-gdpr__list-item,
    .page-gdpr__card-text,
    .page-gdpr__faq-answer {
        font-size: 0.95rem;
    }

    /* Images responsiveness */
    .page-gdpr img {
        max-width: 100% !important;
        width: 100% !important;
        height: auto !important;
        display: block !important;
        min-width: 200px !important; /* Enforce min size */
        min-height: 200px !important; /* Enforce min size */
    }
    
    /* Ensure content containers are responsive */
    .page-gdpr__section,
    .page-gdpr__card,
    .page-gdpr__container,
    .page-gdpr__grid-cards,
    .page-gdpr__faq-list {
        max-width: 100% !important;
        width: 100% !important;
        box-sizing: border-box !important;
        padding-left: 15px;
        padding-right: 15px;
        overflow: hidden !important; /* Prevent horizontal scroll */
    }

    /* Buttons responsiveness */
    .page-gdpr__btn-primary,
    .page-gdpr__btn-secondary,
    .page-gdpr a[class*="button"],
    .page-gdpr a[class*="btn"] {
        max-width: 100% !important;
        width: 100% !important;
        box-sizing: border-box !important;
        white-space: normal !important;
        word-wrap: break-word !important;
        padding-left: 15px;
        padding-right: 15px;
        margin-right: 0 !important; /* Remove margin for stacking */
    }

    .page-gdpr__cta-buttons {
        flex-direction: column; /* Stack buttons vertically */
        gap: var(--spacing-xs); /* Smaller gap for mobile */
        max-width: 100% !important;
        width: 100% !important;
        box-sizing: border-box !important;
        padding-left: 15px;
        padding-right: 15px;
        overflow: hidden !important;
    }

    .page-gdpr__card {
        padding: var(--spacing-sm);
    }

    .page-gdpr__faq-question {
        font-size: 1rem;
        padding: var(--spacing-xs) var(--spacing-sm);
    }

    .page-gdpr__faq-answer {
        padding: var(--spacing-xs) var(--spacing-sm);
    }
}