:root {
    --color-tema: #00bcd4;
    --color-hover: #00acc1;
    --nexo-font: 'Montserrat', sans-serif;
}

html,
body {
    overflow-x: hidden;
    width: 100%;
    margin: 0;
    padding: 0;
}

body {
    background-color: var(--fondo-body);
    transition: background-color 0.3s ease, color 0.3s ease;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

main {
    flex: 1;
}

header {
    text-align: center;
    width: 100%;
    margin-top: 5rem;
}

h1 {
    font-family: 'Montserrat', sans-serif !important;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: -1px;
    margin: 2.5rem auto;
    font-size: clamp(2rem, 5vw, 3.5rem);
    color: var(--color-tema);
    border-bottom: 2px solid var(--gris-borde-divisor);
    width: 60vw;
    display: inline-block;
    padding-bottom: 1.5vh;
    max-width: 90%;
    text-align: center;
}

.intro-text {
    font-size: 1rem;
    color: var(--texto-gris);
    margin-bottom: 2.5rem;
    text-align: center;
}

.tools-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 1.5rem;
    width: 100%;
    max-width: 1100px;
    margin: 0 auto 2.5rem auto;
    padding: 0 20px;
}

.tool-hub-card {
    position: relative;
    flex: 0 1 320px;
    max-width: 340px;
    background-color: var(--fondo-card);
    border: 2px solid var(--borde-card);
    border-radius: 16px;
    padding: 1.8rem;
    text-decoration: none;
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    box-shadow: var(--sombra-industrial);
    display: flex;
    flex-direction: column;
    align-items: center;
}

.tool-hub-card:hover {
    transform: translate(-4px, -4px);
    box-shadow: 8px 8px 0px var(--color-tema);
    border-color: var(--color-tema);
    background-color: var(--fondo-card-hover, #f0fcff);
}

.card-badge {
    position: absolute;
    top: 15px;
    right: 15px;
    background: linear-gradient(135deg, #ff6b35, #f7931e);
    color: #fff;
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 0.7rem;
    font-weight: 900;
    letter-spacing: 1px;
    text-transform: uppercase;
    box-shadow: 0 2px 8px rgba(255, 107, 53, 0.4);
}

.icon-container {
    width: 70px;
    height: 70px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.2rem;
    margin-bottom: 1.2rem;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.gradient-orange {
    background: linear-gradient(135deg, #ff6b35, #f7931e);
}

.gradient-blue {
    background: linear-gradient(135deg, #00bcd4, #0288d1);
}

.gradient-green {
    background: linear-gradient(135deg, #4caf50, #66bb6a);
}

.card-content {
    text-align: center;
    width: 100%;
}

.card-content h2 {
    font-family: 'Montserrat', sans-serif;
    font-size: 1.3rem;
    font-weight: 800;
    color: var(--texto-negro);
    margin: 0 0 0.8rem 0;
}

.card-content p {
    font-size: 0.9rem;
    color: var(--texto-gris);
    line-height: 1.5;
    margin-bottom: 1.2rem;
}

.btn-fake {
    display: inline-block;
    padding: 10px 24px;
    background-color: var(--color-tema);
    color: #ffffff;
    border-radius: 8px;
    font-weight: 700;
    font-size: 0.9rem;
    letter-spacing: 0.5px;
    transition: all 0.2s;
}

.tool-hub-card:hover .btn-fake {
    background-color: var(--color-hover);
    transform: scale(1.05);
}

body.dark-mode {
    --color-tema: #26c6da;
    --fondo-card-hover: #1a1a1a;
}

body.dark-mode h1 {
    color: var(--color-tema);
    border-bottom-color: #444;
}

body.dark-mode .intro-text {
    color: #aaa;
}

body.dark-mode .tool-hub-card {
    background-color: #27272a;
    border-color: #444;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.5);
}

body.dark-mode .tool-hub-card:hover {
    transform: translate(-4px, -4px);
    border-color: var(--color-tema);
    background-color: #1a1a1a;
    box-shadow: 8px 8px 0px var(--color-tema);
}

body.dark-mode .card-content h2 {
    color: #fff;
}

body.dark-mode .card-content p {
    color: #aaa;
}

@media (max-width: 768px) {
    body {
        padding-top: 1rem;
    }
    
    h1 {
        font-size: 2.5rem;
        width: 95vw;
        padding-bottom: 3vh;
        margin: 3rem auto;
    }
    
    .tools-grid {
        gap: 1.5rem;
        padding: 0 15px;
    }
    
    .tool-hub-card {
        flex: 1 1 100%;
        max-width: 100%;
    }
    
    .icon-container {
        width: 70px;
        height: 70px;
        font-size: 2rem;
    }
    
    .card-content h2 {
        font-size: 1.3rem;
    }
    
    .card-content p {
        font-size: 0.9rem;
    }
}
