/* --- GLOBAL VARIABLES & THEME --- */
:root {
    --primary-color: #005566;
    --secondary-color: #555;
    --background-color: #f4f7f6;
    --surface-color: #ffffff;
    --text-color: #333;
    --border-color: #e0e0e0;
    --shadow-color: rgba(0, 0, 0, 0.05);
    --danger-color: #d9534f;
}

body.dark-theme {
    --primary-color: #4dd0e1;
    --secondary-color: #b0bec5;
    --background-color: #121212;
    --surface-color: #1e1e1e;
    --text-color: #e0e0e0;
    --border-color: #444;
    --shadow-color: rgba(0, 0, 0, 0.2);
}

/* --- GENERAL LAYOUT & TYPOGRAPHY --- */
body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    margin: 0;
    padding-top: 70px; /* Space for the fixed header */
    background-color: var(--background-color);
    color: var(--text-color);
    transition: background-color 0.3s, color 0.3s;
}

main {
    padding: 20px;
    max-width: 1200px;
    margin: 0 auto;
}

h1, h2, h3 {
    color: var(--primary-color);
    font-weight: 600;
}

a {
    color: var(--primary-color);
    text-decoration: none;
}

/* --- HEADER --- */
header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 25px;
    background-color: var(--surface-color);
    border-bottom: 1px solid var(--border-color);
    box-shadow: 0 2px 8px var(--shadow-color);
    z-index: 100;
    box-sizing: border-box;
}

.header-content {
    display: flex;
    align-items: center;
    gap: 15px;
}

.header-logo {
    height: 35px;
    width: 35px;
}

header h1 {
    font-size: 1.1em;
    margin: 0;
    color: var(--text-color);
    font-weight: 500;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 15px;
}

/* --- BUTTONS & INTERACTIVE ELEMENTS --- */
.button-style, .theme-toggle {
    padding: 10px 20px;
    border: 1px solid transparent;
    border-radius: 8px;
    cursor: pointer;
    font-weight: bold;
    font-size: 1em;
    transition: background-color 0.2s, transform 0.1s, color 0.2s;
}

.button-style {
    background-color: var(--primary-color);
    color: #fff;
}

.theme-toggle {
    background: none;
    border-color: var(--border-color);
    color: var(--text-color);
    width: 40px;
    height: 40px;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.button-style:hover, .theme-toggle:hover {
    opacity: 0.85;
}

.button-style:active {
    transform: scale(0.98);
}

/* --- HERO SECTION (HOMEPAGE) --- */
.hero-section {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    min-height: 70vh;
    padding: 20px;
}

.hero-logo {
    width: 144px;
    height: 144px;
    margin-bottom: 25px;
    border-radius: 12px;
}

.hero-title {
    font-size: 2.2em;
    margin: 0 0 10px 0;
}

.hero-subtitle {
    font-size: 1.1em;
    color: var(--secondary-color);
    max-width: 500px;
    margin-bottom: 30px;
}

/* --- DOWNLOAD CARDS (HOMEPAGE) --- */
.download-cards-container {
    display: grid;
    grid-template-columns: 1fr; /* Una columna en móviles */
    gap: 25px;
    margin-top: 30px;
    width: 100%;
    max-width: 900px;
}

/* REGLA CORREGIDA Y UNIFICADA */
.download-card {
    background-color: var(--surface-color);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 30px 25px;
    box-shadow: 0 4px 12px var(--shadow-color);
    transition: transform 0.2s ease-in-out, box-shadow 0.2s ease-in-out;
    
    /* Flexbox para centrar y alinear el contenido */
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: space-between;
}

.download-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 6px 16px var(--shadow-color);
}

.os-icon {
    width: 60px;
    height: 60px;
    margin-bottom: 15px;
}

.download-card h3 {
    margin: 0 0 15px 0;
    font-size: 1.5em;
}

.download-button {
    display: inline-block;
    text-decoration: none;
    width: 100%;
    box-sizing: border-box;
    margin-top: 15px; /* Añade espacio sobre el botón */
}

/* --- RESPONSIVENESS --- */
@media (min-width: 768px) {
    .download-cards-container {
        /* Tres columnas en pantallas más grandes */
        grid-template-columns: repeat(3, 1fr);
    }
}