/*
 * General Styles
 * Applies to the whole page, fonts, basic resets.
 */
@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;600;700&display=swap');

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Poppins', sans-serif;
    line-height: 1.6;
    color: #333;
    display: flex;
    min-height: 100vh;
    background-color: #f4f7f6; /* Fallback color */
    flex-direction: column; /* Allow mobile header on top */
}

/* Optional: Prevent scrolling when menu is open */
body.no-scroll {
    overflow: hidden;
}

/*
 * Layout Styles
 * Manages the main container, sidebar, and content areas.
 */
.container {
    display: flex;
    width: 100%;
    flex-grow: 1; /* Allow container to fill remaining space */
}

/* Sidebar Backdrop Styles */
.sidebar-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 999; /* Below sidebar, above content */
    display: none; /* Hidden by default */
    transition: opacity 0.3s ease;
    opacity: 0;
}

.sidebar-backdrop.visible {
    display: block;
    opacity: 1;
}

/* Sidebar Styles */
.sidebar {
    width: 300px; /* Increased width */
    background-color: #0b0e13; /* Changed from #000 */
    color: #e2e8f0; /* Light grey text */
    display: flex;
    flex-direction: column;
    padding: 1.5rem 1.2rem; /* Adjusted padding */
    flex-shrink: 0;
    /* Desktop fixed state */
    position: fixed; /* Make sidebar fixed */
    top: 0; /* Position at the top of the viewport */
    left: 0; /* Position at the left of the viewport */
    height: 100vh; /* Make it fill the full height of the viewport */
    overflow-y: auto; /* Add scroll if content is longer than viewport height */
    z-index: 999; /* Ensure it's above the main content */
    /* Removed relative position, transform, and transition for desktop */
}

.logo-container {
    text-align: center;
    margin-bottom: 1rem; /* Reduced margin */
}

.logo {
    max-width: 150px;
    height: auto;
}

.sidebar-description {
    text-align: center;
    color: #cbd5e1; /* Lighter grey */
    margin-bottom: 2rem; /* Space before button */
    font-size: 0.9rem;
    line-height: 1.4;
}

.sidebar-description p:first-child {
    font-weight: 600; /* Make title bolder */
    font-size: 1.1rem;
    margin-bottom: 0.3rem;
}

.sidebar-footer {
    margin-top: auto; /* Pushes footer to the bottom */
    text-align: center;
    font-size: 0.8rem;
    color: #64748b; /* Muted grey */
    padding-top: 1.5rem;
    border-top: 1px solid #1e293b;
}

/*
 * Sidebar Button Styles
 * Simplified and more professional styles for all action buttons in the sidebar.
 * Adjusted padding and text wrapping properties to fix clipping issues.
 */
.sidebar a {
    display: flex;
    align-items: center; /* Keeps icon and text vertically centered */
    color: #e2e8f0; /* Light grey text */
    text-decoration: none;
    /* Adjusted padding for better text wrapping and space */
    padding: 1.2rem 2rem; /* Increased vertical and horizontal padding */
    border-radius: 4px; /* Slightly rounded corners */
    transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease; /* Smooth transition */
    font-weight: 600; /* Make text slightly bolder */
    margin-bottom: 0.8rem; /* Reduced space below button */
    text-align: left; /* Keep text left-aligned next to icon */
    background-color: transparent; /* Start with no background */
    position: relative;
    overflow: hidden; /* Hide potential overflow, though adjustments should prevent this */
    z-index: 1;
    /* Crystal-like border effect */
    border: 1px solid rgba(255, 255, 255, 0.15); /* Subtle translucent border */
    box-shadow: 0 0 5px rgba(255, 255, 255, 0.05); /* Subtle inner glow effect */
}

.sidebar a:hover {
    background-color: rgba(255, 255, 255, 0.1); /* Subtle white background on hover */
    color: #ffffff; /* White text on hover */
    border-color: rgba(255, 255, 255, 0.3); /* Border slightly brighter on hover */
    box-shadow: 0 0 8px rgba(255, 255, 255, 0.1); /* Slightly brighter inner glow on hover */
}

.sidebar a i {
    margin-right: 0.8rem; /* Space between icon and text */
    font-size: 1.2rem; /* Slightly larger icon */
    width: 20px; /* Align icon */
    text-align: center;
    flex-shrink: 0; /* Prevent icon from shrinking */
    color: #e2e8f0; /* Ensure icons have the default light color */
}

/* Style for the text span inside the button */
.sidebar a span {
    flex: 1 1 0%; /* Allow growing, shrinking, basis 0% - explicitly 0% */
    min-width: 0; /* Allow shrinking below content size */
    word-break: break-word; /* Allow breaking long words */
    line-height: 1.4; /* Improve line spacing for wrapped text */
    white-space: normal; /* Allow text to wrap */
    overflow-wrap: break-word; /* Alias for word-break in some browsers */
}

/* Removed specific color for create account button icon */
.create-account-button i {
    color: #e2e8f0; /* Ensure it uses the default icon color */
}

.sidebar a::before {
    content: none; /* Removed shine effect */
}

/* Specific styles for the Discord button */
.discord-join-button {
    border-color: rgba(114, 137, 218, 0.5); /* Discord blue border */
    box-shadow: 0 0 8px rgba(114, 137, 218, 0.3), 0 0 15px rgba(114, 137, 218, 0.15); /* More prominent glow */
    background-color: rgba(114, 137, 218, 0.1); /* Subtle blue background */
    animation: pulse-discord 2s infinite ease-in-out; /* Slight pulse animation */
    /* Adjusted padding to be consistent or slightly more than general button */
    padding: 1.4rem 2rem; /* Increased vertical padding, matched horizontal */
}

.discord-join-button i {
     color: #7289da; /* Discord specific blue color for icon */
}

.discord-join-button:hover {
    background-color: rgba(114, 137, 218, 0.2); /* Brighter blue background on hover */
    border-color: rgba(114, 137, 218, 0.8);
    box-shadow: 0 0 10px rgba(114, 137, 218, 0.5), 0 0 20px rgba(114, 137, 218, 0.3);
}

/* Animation for Discord button */
@keyframes pulse-discord {
    0% {
        box-shadow: 0 0 8px rgba(114, 137, 218, 0.3), 0 0 15px rgba(114, 137, 218, 0.15);
        background-color: rgba(114, 137, 218, 0.1);
    }
    50% {
        box-shadow: 0 0 12px rgba(114, 137, 218, 0.5), 0 0 25px rgba(114, 137, 218, 0.3);
        background-color: rgba(114, 137, 218, 0.2);
    }
    100% {
        box-shadow: 0 0 8px rgba(114, 137, 218, 0.3), 0 0 15px rgba(114, 137, 218, 0.15);
        background-color: rgba(114, 137, 218, 0.1);
    }
}

/*
 * Content Area Styles
 * Styles for the main content section, background, text, video.
 */
.content {
    flex-grow: 1;
    padding: 2rem 4rem; /* Increased horizontal padding */
    background-image: url('/Thema claro.png');
    background-size: cover; /* Cover the entire area */
    background-position: center center;
    background-repeat: no-repeat;
    overflow-y: auto; /* Allow scrolling if content overflows */
    text-align: center; /* Center content within the area */
    color: #212121; /* Default dark text color for content */
    position: relative; /* Needed for z-index context */
    /* Add an overlay if needed for text readability over background image */
    margin-left: 300px; /* Add margin to the left equal to sidebar width for desktop */
    /* Make content a flex container to push footer to bottom */
    display: flex;
    flex-direction: column;
}

.tendex-afiliados {
    width: 100%; /* Take full width available */
    max-width: 900px; /* Still constrain inner elements */
    margin: 0 auto; /* Center the container for inner elements */
    text-align: center; /* Ensure text is centered */
    flex-grow: 1; /* Allow section to grow and push footer down */
}

/* Styling for the split title - Use clamp for responsive font size */
.tendex-afiliados h2 {
    color: #000; /* Dark color */
    margin-bottom: 0.5rem;
    text-align: center;
    font-weight: 600; /* Slightly less bold than h1 */
    text-shadow: 1px 1px 2px rgba(255, 255, 255, 0.8);
    /* Responsive font size: scales between 1rem (min) and 1.3rem (max) */
    font-size: clamp(1rem, 3vw, 1.3rem);
    text-transform: uppercase; /* Ensure uppercase */
}

.tendex-afiliados h1 {
    color: #000; /* Dark color */
    margin-bottom: 1.5rem; /* Space below the main title part */
    text-align: center;
    font-weight: 800; /* Very bold */
    text-shadow: 1px 1px 2px rgba(255, 255, 255, 0.8);
    /* Adjusted Responsive font size: slightly smaller min to help with wrapping on narrow screens */
    font-size: clamp(1.4rem, 5vw, 2.2rem); /* Changed 1.6rem to 1.4rem */
    text-transform: uppercase; /* Ensure uppercase */
    line-height: 1.2; /* Improve line spacing for larger text */
}

/* YouTube Video Container Styles */
.video-container {
    position: relative;
    padding-bottom: 56.25%;
    height: 0;
    overflow: hidden;
    max-width: 800px; /* Limit video width */
    background: #000; /* Black background while loading */
    margin: 0 auto 1rem auto; /* Center container and add bottom margin */
    border-radius: 8px; /* Match placeholder style */
    border: 1px solid #ccc; /* Slightly darker border */
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.15); /* Add shadow for depth */
}

.video-container iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

/* Hotmart Attribution */
.powered-by {
    text-align: right;
    font-size: 0.8rem;
    color: #424242; /* Darker Grey */
    margin-bottom: 2rem; /* Space below attribution */
    margin-top: 0.5rem;
    text-shadow: 1px 1px 2px rgba(255, 255, 255, 0.5); /* Subtle shadow */
    max-width: 800px; /* Match video width */
    margin-left: auto; /* Align right within tendex-afiliados max-width */
    margin-right: auto;
    padding-right: 10px; /* Small padding to prevent hitting edge */
    font-weight: 600; /* Make Hotmart attribution a bit bolder */
}

.intro-class {
    max-width: 800px; /* Match video width */
    margin: 2rem auto 0 auto; /* Add margin top, center text */
    text-align: center; /* Center the text */
    color: #212121; /* Darker grey text for better readability */
    font-size: 1.1rem; /* Slightly larger font size */
    line-height: 1.7; /* Improved line spacing */
    text-shadow: 1px 1px 2px rgba(255, 255, 255, 0.6); /* Adjusted light shadow for contrast */
}

.intro-class strong {
     font-weight: 700; /* Ensure bold is prominent */
    color: #000; /* Make bold text even darker */
}

/* Content Footer Styles */
.content-footer {
    text-align: center;
    margin-top: auto; /* Push footer to the bottom if content doesn't fill space */
    padding-top: 2rem; /* Space above the footer text */
    padding-bottom: 1rem; /* Space below the footer text */
    font-size: 0.9rem;
    color: #424242; /* Darker grey text */
    width: 100%; /* Ensure it spans the content width */
    max-width: 900px; /* Match the max-width of .tendex-afiliados */
    margin-left: auto;
    margin-right: auto;
    text-shadow: 1px 1px 2px rgba(255, 255, 255, 0.6); /* Add shadow for readability */
}

/*
 * Mobile Styles
 * Specific styles applied for smaller screens (max-width: 768px).
 */

/* Mobile Header Styles */
.mobile-header {
    display: none; /* Hidden by default on desktop */
    justify-content: space-between;
    align-items: center;
    padding: 0.8rem 1rem;
    background-color: #0b0e13; /* Changed from #000 */
    color: #e2e8f0; /* Light grey text */
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1001; /* Above sidebar backdrop */
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
}

.mobile-logo-container {
    display: flex;
    align-items: center;
}

.mobile-logo {
    height: 30px; /* Adjust size as needed */
    margin-right: 0.5rem;
}

.mobile-logo-container span {
    font-size: 1.2rem;
    font-weight: 600;
    color: #e2e8f0;
}

.menu-toggle {
    background: none;
    border: none;
    color: #e2e8f0;
    font-size: 1.5rem;
    cursor: pointer;
    padding: 0.5rem;
}

@media (max-width: 768px) {
    body {
        flex-direction: column; /* Stack mobile header and container */
        padding-top: 50px; /* Add padding to body to account for fixed mobile header height */
    }

    .mobile-header {
        display: flex; /* Show mobile header on mobile */
        height: 50px; /* Define height */
    }

    .container {
        flex-direction: column; /* Stack sidebar and content */
        /* No padding-top needed on container if added to body */
    }

    .sidebar {
        /* Mobile menu state (already fixed, just adjust top/bottom/height and initial position) */
        width: 280px; /* Keep the width smaller on mobile */
        position: fixed; /* Keep fixed */
        top: 50px; /* Below mobile header */
        bottom: 0; /* Extends to the bottom */
        left: 0;
        z-index: 1000; /* Keep above backdrop */
        transform: translateX(-100%); /* Keep off-screen initially */
        transition: transform 0.3s ease; /* Keep transition */
        overflow-y: auto; /* Keep scrolling */
        box-shadow: 2px 0 5px rgba(0,0,0,0.5); /* Keep shadow */
        padding-bottom: 1.5rem; /* Keep padding */
        height: auto; /* Let bottom: 0 define height */
    }

    .sidebar.open {
        transform: translateX(0); /* Slide into view */
    }

    /* Hide desktop-specific sidebar elements on mobile */
    .desktop-only {
        display: none;
    }

    .content {
        padding: 1.5rem 0.75rem; /* Adjusted horizontal padding for mobile */
        flex-grow: 1;
        margin-left: 0; /* Remove the margin-left on mobile */
        /* Ensure content is still a flex column on mobile */
        display: flex;
        flex-direction: column;
    }

    .tendex-afiliados {
        max-width: 100%; /* Allow content to use more width */
         flex-grow: 1; /* Ensure section grows to push footer */
    }

    /* Adjust heading sizes for mobile - these are now handled by clamp()
       Keep other mobile-specific styles */
    .tendex-afiliados h2 {
         margin-bottom: 0.3rem;
    }

    .tendex-afiliados h1 {
        margin-bottom: 1rem;
    }

    .video-container {
        max-width: 100%; /* Full width on smaller screens */
        margin-left: 0; /* Remove centering margin */
        margin-right: 0; /* Remove centering margin */
        /* Reduce lateral padding by adjusting padding on .content */
    }

    /* Adjust content padding on mobile to reduce space around video */
    /* Already adjusted in .content block above */

    .powered-by {
         max-width: 100%;
         text-align: center; /* Center on mobile */
         padding-right: 0;
         margin-bottom: 1.5rem;
    }

    .intro-class {
         max-width: 100%;
         margin-top: 1.5rem; /* Adjust margin top for mobile */
         font-size: 1rem; /* Adjust font size for mobile */
     }

     /* Hide shine effect on mobile for performance/simplicity */
     .sidebar a::before {
         display: none;
     }

    /* Hide sidebar footer on small screens */
    .sidebar-footer {
        display: none; /* Hide the footer div entirely on mobile */
    }

    /* Ensure content footer is visible on mobile */
    .content-footer {
        display: block; /* Ensure it's displayed on mobile */
        padding-top: 1.5rem;
        padding-bottom: 0.8rem;
        font-size: 0.85rem;
    }
}

@media (min-width: 769px) {
     .sidebar {
        width: 300px; /* Ensure desktop width is applied */
     }
     .sidebar-footer {
        /* Ensure the desktop state of the footer div allows margin-top: auto */
        display: block;
     }
     /* Apply margin-left to content only on desktop to make space for fixed sidebar */
     .content {
         margin-left: 300px; /* Match the new sidebar width */
     }
}