@import url('https://fonts.googleapis.com/css2?family=Montserrat:ital,wght@0,300;0,400;0,600;0,800;1,400&display=swap');

:root {
    --bg-start: #2a2a2a;
    --bg-end: #5a5a5a;
    --bg-card: #151515;
    --text-main: #ffffff;
    --text-secondary: #cccccc;
    --accent: #d82323;
    --accent-hover: #ff3b3b;
    --btn-bg: #0d0d0d;
    --btn-hover: #ffffff;
    --btn-text-hover: #000000;
}

body {
    margin: 0;
    padding: 0;
    background: linear-gradient(135deg, var(--bg-start) 0%, var(--bg-end) 100%);
    background-attachment: fixed;
    color: var(--text-main);
    font-family: 'Montserrat', sans-serif;
    line-height: 1.6;
    min-height: 100vh;
}

header {
    text-align: center;
    padding: 2rem 1rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    margin-bottom: 3rem;
}

header strong {
    font-size: 1.1rem;
    font-weight: 800;
    color: var(--text-main);
    text-transform: uppercase;
    letter-spacing: 4px;
}

main {
    max-width: 900px;
    margin: 0 auto;
    padding: 0 1rem 4rem;
}

h1 {
    font-size: 2rem;
    font-weight: 800;
    text-align: center;
    margin-bottom: 0.5rem;
    color: var(--text-main);
    line-height: 1.2;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.subtitle {
    text-align: center;
    color: var(--text-secondary);
    margin-bottom: 4rem;
    font-size: 1.1rem;
    font-weight: 300;
    font-style: italic;
    position: relative;
    padding-bottom: 1rem;
}

.subtitle::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 3px;
    background-color: var(--accent);
}

.empresas-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: grid;
    gap: 3rem;
}

.empresa-card {
    background-color: var(--bg-card);
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    position: relative;
    box-shadow: 0 20px 40px rgba(0,0,0,0.4);
    overflow: hidden;
}

.empresa-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: 0;
    opacity: 0.12;
    transition: transform 0.5s ease-out, opacity 0.5s ease;
}

.empresa-card:hover .empresa-bg {
    transform: scale(1.05);
    opacity: 0.25;
}

.posicion-badge {
    position: absolute;
    top: 1rem;
    right: 1.5rem;
    font-size: 4rem;
    font-weight: 800;
    color: rgba(255, 77, 77, 0.4);
    line-height: 1;
    z-index: 0;
}

.empresa-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background-color: var(--accent);
}

.empresa-card h2 {
    margin-top: 0;
    margin-bottom: 1rem;
    font-size: 2rem;
    font-weight: 600;
    z-index: 1;
    position: relative;
}

.empresa-desc {
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
    font-size: 0.95rem;
    font-weight: 400;
    z-index: 1;
    position: relative;
}

.empresa-tipo {
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin-bottom: 2rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    font-weight: 600;
    z-index: 1;
    position: relative;
}

.empresa-link {
    display: inline-block;
    background-color: var(--btn-bg);
    color: var(--text-main);
    text-decoration: none;
    padding: 1rem 2rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 3px;
    font-size: 0.85rem;
    text-align: center;
    transition: all 0.3s ease;
    align-self: flex-start;
    z-index: 1;
    position: relative;
    border: 1px solid rgba(255,255,255,0.1);
}

.empresa-link:hover {
    background-color: var(--btn-hover);
    color: var(--btn-text-hover);
}

@media (min-width: 768px) {
    h1 { font-size: 3.2rem; }
    .empresa-card { padding: 3rem; }
    .posicion-badge { font-size: 5rem; }
}

@keyframes fadeUp {
    from { opacity: 0; transform: translateY(40px); }
    to { opacity: 1; transform: translateY(0); }
}
@keyframes fadeLeft {
    from { opacity: 0; transform: translateX(-40px); }
    to { opacity: 1; transform: translateX(0); }
}
@keyframes fadeRight {
    from { opacity: 0; transform: translateX(40px); }
    to { opacity: 1; transform: translateX(0); }
}

h1, .subtitle {
    opacity: 0;
    animation: fadeUp 0.8s ease-out forwards;
}
h1 { animation-delay: 0.1s; }
.subtitle { animation-delay: 0.3s; }

.empresa-card {
    opacity: 0;
    animation: fadeUp 0.7s ease-out forwards;
}

.empresa-card:nth-child(1) { animation-delay: 0.5s; }
.empresa-card:nth-child(2) { animation-delay: 0.7s; }
.empresa-card:nth-child(3) { animation-delay: 0.9s; }
.empresa-card:nth-child(4) { animation-delay: 1.1s; }
.empresa-card:nth-child(5) { animation-delay: 1.3s; }
.empresa-card:nth-child(6) { animation-delay: 1.5s; }
.empresa-card:nth-child(7) { animation-delay: 1.7s; }
.empresa-card:nth-child(8) { animation-delay: 1.9s; }
.empresa-card:nth-child(9) { animation-delay: 2.1s; }
.empresa-card:nth-child(10) { animation-delay: 2.3s; }

.empresa-card .empresa-desc { opacity: 0; }
.empresa-card:nth-child(odd) .empresa-desc { animation: fadeLeft 0.8s ease-out forwards; }
.empresa-card:nth-child(even) .empresa-desc { animation: fadeRight 0.8s ease-out forwards; }

.empresa-card:nth-child(1) .empresa-desc { animation-delay: 0.8s; }
.empresa-card:nth-child(2) .empresa-desc { animation-delay: 1.0s; }
.empresa-card:nth-child(3) .empresa-desc { animation-delay: 1.2s; }
.empresa-card:nth-child(4) .empresa-desc { animation-delay: 1.4s; }
.empresa-card:nth-child(5) .empresa-desc { animation-delay: 1.6s; }
.empresa-card:nth-child(6) .empresa-desc { animation-delay: 1.8s; }
.empresa-card:nth-child(7) .empresa-desc { animation-delay: 2.0s; }
.empresa-card:nth-child(8) .empresa-desc { animation-delay: 2.2s; }
.empresa-card:nth-child(9) .empresa-desc { animation-delay: 2.4s; }
.empresa-card:nth-child(10) .empresa-desc { animation-delay: 2.6s; }
