/* Downloads Page Specific Styles */

/* Adjust main padding */
/* Moved to base.css main {
    padding-top: 40px; 
} */

/* Spinner Animation */
@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Container starts visible */
#downloads-list-container {
    opacity: 1; 
}

/* Sequential fade-in animation for cards */
.platform-card {
    opacity: 0; /* Start hidden */
    transform: translateY(20px);
    transition: transform 0.4s ease-out, opacity 0.4s ease-out;
    background-color: rgba(0, 0, 0, 0.3);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 25px;
    text-align: center;
}

/* Animation state: Hidden */
.platform-card.card-hidden {
    opacity: 0;
    transform: translateY(20px);
    pointer-events: none; /* Prevent interaction while hidden */
}

/* Animation state: Visible */
.platform-card.card-visible {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}

.platform-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 15px rgba(0, 0, 0, 0.3);
    border-color: var(--highlight-color);
}

.downloads-container {
    max-width: 1600px; /* INCREASED from 1200px */
    margin: 0 auto; /* Center container */
    padding: 20px;
}

.downloads-header {
    text-align: center;
    margin-bottom: 50px; /* Increased bottom margin */
}

/* Style for the main H1 "Download Echelon" */
.downloads-header h1 {
    font-size: 3.2rem;
    font-weight: 700;
    color: var(--text-color);
    margin-bottom: 10px;
    line-height: 1.2;
}

/* Style for the subheadline "Get the latest version..." */
.downloads-header .page-subheadline {
    font-size: 1.3rem;
    color: rgba(240, 240, 240, 0.85);
    margin-bottom: 25px;
    font-weight: 400;
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
    line-height: 1.5;
}

/* Styles for the new trial information banner */
.downloads-header .trial-info-banner {
    border-radius: 8px;
    padding: 15px 25px;
    margin: 0 auto 0px;
    max-width: 800px; /* INCREASED from 600px */
    display: inline-block;
}

.downloads-header .trial-info-banner p {
    font-size: 1.1rem;
    color: var(--text-color);
    margin: 0;
    font-weight: 400;
    line-height: 1.6;
}

.downloads-header .trial-info-banner p strong {
    color: var(--text-color); /* White text */
    font-weight: 700; /* Bolder */
    background-color: #383e45; /* Custom mid-dark grey background */
    padding: 4px 10px; /* Added padding */
    border-radius: 5px; /* Added border-radius */
    display: inline-block; /* To allow padding and background */
    line-height: 1.4; /* Adjust line-height */
}

.version-section {
    background-color: rgba(26, 31, 36, 0.75); /* Slightly transparent background */
    backdrop-filter: blur(8px);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    padding: 30px;
    margin-bottom: 40px;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.2);
}

.version-section h2 {
    font-size: 2rem;
    margin-bottom: 25px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--border-color); /* Restore the full-width gray line */
    color: var(--text-color); /* Changed to white/text color */
    position: relative; /* Ensure positioning context for pseudo-element */
    text-align: center; /* Center the text */
}

/* Override the global short blue line style specifically for this section */
.version-section h2:after {
    display: none; /* Hide the short blue line */
}

.platform-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); /* Responsive grid */
    gap: 25px;
}

.platform-icon {
    font-size: 2.5rem; /* Larger icon */
    margin-bottom: 15px;
    color: var(--accent-text-color); /* UPDATED from --highlight-color */
}

.platform-card h3 {
    font-size: 1.4rem;
    margin-bottom: 8px;
    cursor: pointer;
}
.platform-card .version-details {
    font-size: 0.9rem;
    color: rgba(240, 240, 240, 0.7);
    margin-bottom: 20px;
    text-align: center; /* Ensure centered */
}
.platform-card .version-details span {
     display: block; /* Details on separate lines */
     margin-bottom: 4px;
}

.platform-card .version-details .description {
    display: block; /* Ensure it takes block space */
    max-width: 90%; /* Limit width */
    margin: 0 auto 10px auto; /* Center the block, add bottom margin */
    text-align: left; /* Keep text left-aligned within the block */
    line-height: 1.5; /* Improve readability */
}

.download-button {
    display: inline-block;
    padding: 12px 25px;
    font-size: 1rem;
    font-weight: 600;
    background-color: var(--highlight-color);
    color: #fff;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
    text-decoration: none; /* Ensure it looks like a button */
    width: 100%; /* Full width button */
    box-shadow: 0 4px 12px rgba(0, 162, 255, 0.2);
}
.download-button:hover {
    background-color: var(--primary-hover-color);
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(0, 162, 255, 0.35);
}
.download-button i {
    margin-right: 8px;
}

.interested-link {
    display: block;
    margin-top: 15px;
    font-size: 0.9rem;
    color: var(--accent-text-color); /* UPDATED from var(--primary-color) */
    text-decoration: underline;
    cursor: pointer;
}
.interested-link:hover {
    color: var(--primary-link-hover-color); /* UPDATED from --highlight-color */
}

/* Empty state styling */
.version-section.empty-state {
    text-align: center;
    padding: 40px;
}

.version-section.empty-state h2 {
    border-bottom: none;
    padding-bottom: 0;
}

/* Empty state styling within the combined section */
.empty-state-message {
    text-align: center;
    padding-bottom: 30px; /* Space before divider */
}

.empty-state-message h2 {
     border-bottom: none;
     padding-bottom: 0;
     margin-bottom: 10px;
     color: var(--text-color); /* Ensure white text */
}

.empty-state-message p {
     color: rgba(240, 240, 240, 0.8);
     font-size: 1.1rem;
}

/* Styling for the request notification part */
.request-notification {
     text-align: center;
     padding-top: 30px; /* Space after divider */
}

.request-notification h2 {
     border-bottom: none;
     padding-bottom: 0;
     margin-bottom: 10px;
     color: var(--text-color); /* Ensure white text */
     font-size: 1.8rem; /* Slightly smaller title */
}

.request-notification p {
     color: rgba(240, 240, 240, 0.8);
     font-size: 1.1rem;
     margin-bottom: 30px; /* Space before grid */
}

/* Responsive adjustments for Downloads */
@media (max-width: 768px) {
    .version-section, 
    .platform-card {
        backdrop-filter: none; /* Ensure backdrop filter is off on mobile */
    }
    /* New responsive styles for trial headlines */
    .downloads-header h1 {
        font-size: 2.8rem;
    }
    .downloads-header .page-subheadline {
        font-size: 1.2rem;
    }
    .downloads-header .trial-info-banner {
        padding: 12px 20px;
        max-width: 90%;
    }
    .downloads-header .trial-info-banner p {
        font-size: 1rem;
    }
}

@media (max-width: 600px) { 
    .platform-grid {
        grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); 
        gap: 20px; 
    }
    .platform-card {
        padding: 20px; 
        min-height: auto; 
    }
    .placeholder-interest-text {
        font-size: 0.75rem;
    }
    .download-button, .interested-link {
        padding: 10px 15px;
        font-size: 0.9rem;
    }
    .modal-content {
        padding: 20px 25px;
        width: 95%;
        max-height: 85vh;
    }
    .modal-content h3 {
        font-size: 1.4rem;
    }
    #release-notes-modal-body {
        font-size: 0.95rem;
    }
}

@media (max-width: 480px) {
    /* Fix the downloads container */
    .downloads-container {
        padding: 0 10px; /* Add back small horizontal padding */
        margin-top: 20px;
        width: 100%; /* Ensure full width */
        max-width: none; /* Remove max-width constraint */
        margin-left: 0; /* Reset margin */
        margin-right: 0; /* Reset margin */
    }
    
    /* Fix spacing in version section */
    .version-section {
        padding: 20px 10px; /* Keep reduced padding */
        margin-bottom: 20px;
        border-radius: 8px; /* Ensure radius remains */
    }
    /* Remove underline from version H2 on mobile */
    .version-section h2:after {
        display: none;
    }
    .platform-grid {
        grid-template-columns: 1fr; /* Single column */
        gap: 15px;
        width: 100%; /* Take full width of container */
    }
    .platform-card {
        width: 100%; /* Take full width of grid column */
        max-width: 350px; /* Optional: Limit max width if desired */
        margin: 0 auto 15px auto; /* Center and add bottom margin */
        padding: 20px; /* Consistent padding */
        box-sizing: border-box;
        overflow: hidden; /* Prevent overflow */
        display: flex;
        flex-direction: column;
        align-items: center;
    }
    .platform-card .version-details {
        margin-bottom: 10px;
        text-align: center; /* Ensure text is centered */
    }
    .download-button, .interested-link {
        width: 100%; /* Full width */
        padding: 10px 15px;
        font-size: 0.9rem;
        box-sizing: border-box;
    }
    #loading-spinner {
        /* Ensure the container itself is centered */
        width: 100%;
        text-align: center;
    }
    /* .downloads-header h1 { font-size: 2rem; } // This was generic, specific rule below is better */
    /* New responsive styles for trial headlines */
    .downloads-header h1 { /* Specific for main H1 */
        font-size: 2.4rem;
    }
    .downloads-header .page-subheadline {
        font-size: 1.1rem;
    }
    .downloads-header .trial-info-banner p {
        font-size: 0.95rem;
    }

    .version-section {
        padding: 20px 10px; /* Keep reduced padding */
        margin-bottom: 20px;
        border-radius: 8px; /* Ensure radius remains */
    }
} 

/* --- Release Notes Modal Styles --- */
/* REMOVED - Styles are now handled by base.css .modal-overlay and .modal-content */
/*
.modal-overlay {
    position: fixed; 
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7); 
    display: none; 
    justify-content: center;
    align-items: center;
    z-index: 99999; 
    padding: 20px;
    box-sizing: border-box;
    backdrop-filter: blur(5px); 
}

.modal-content {
    background-color: var(--secondary-color); 
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 30px 40px;
    position: relative;
    max-width: 800px; 
    width: 90%; 
    max-height: 80vh; 
    overflow-y: auto; 
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    color: var(--text-color);
}

.modal-close-button {
    position: absolute;
    top: 10px;
    right: 15px;
    background: none;
    border: none;
    font-size: 2rem;
    color: var(--text-color);
    cursor: pointer;
    line-height: 1;
    opacity: 0.7;
    transition: opacity 0.2s ease;
}
.modal-close-button:hover {
    opacity: 1;
}

.modal-content h3 {
    margin-top: 0;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--border-color);
    font-size: 1.6rem;
    text-align: left;
}

#release-notes-modal-body {
    font-size: 1rem;
    line-height: 1.6;
    text-align: left;
}
*/

/* Keep release notes button style */
.release-notes-button {
    background-color: var(--secondary-color); /* Match card background */
    border: 1px solid var(--border-color);
    color: var(--text-color);
    padding: 8px 15px;
    font-size: 0.9rem;
    cursor: pointer;
    transition: background-color 0.3s ease, border-color 0.3s ease;
}

.release-notes-button:hover {
    background-color: rgba(255, 255, 255, 0.1); /* Subtle hover */
    border-color: var(--highlight-color);
}


/* --- End Modal Styles --- */ 

.modal-content h3 {
    margin-top: 0;
    margin-bottom: 20px; /* Spacing below title */
    font-size: 1.5rem; /* Larger modal title */
    color: var(--text-color);
    padding-bottom: 15px; /* Space above border */
    border-bottom: 1px solid var(--border-color); /* Line below title */
}

#release-notes-modal-body {
    font-size: 1rem; /* Standard text size */
    line-height: 1.7; /* Improved line spacing */
    color: rgba(240, 240, 240, 0.9); /* Slightly brighter text for notes */
    max-height: 60vh; /* Max height with viewport consideration */
    overflow-y: auto; /* Scroll for long notes */
    padding-right: 15px; /* Add padding to account for scrollbar */
    white-space: pre-wrap; /* Preserve whitespace and line breaks, wrap text */
    word-break: break-word; /* Break long words to prevent overflow */
}

/* Add a subtle scrollbar style if desired (Webkit example) */
#release-notes-modal-body::-webkit-scrollbar {
    width: 5px;
}

#release-notes-modal-body::-webkit-scrollbar-track {
    background: transparent;
}

#release-notes-modal-body::-webkit-scrollbar-thumb {
    background-color: rgba(255, 255, 255, 0.2);
    border-radius: 20px;
    border: 3px solid transparent;
}

#release-notes-modal-body::-webkit-scrollbar-thumb:hover {
    background-color: rgba(255, 255, 255, 0.3);
} 