/* Variables CSS (Tema Claro por defecto) */
:root {
    --bg-color: #f4f7f6;
    --text-color: #333;
    --card-bg: #ffffff;
    --primary-color: #2563eb; /* Azul ingeniería */
    --secondary-color: #1e40af;
    --accent-color: #0ea5e9;
    --nav-bg: rgba(255, 255, 255, 0.95);
    --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    /* Enlaces por defecto (tema claro) */
    --link-color: var(--primary-color);
    --link-hover-color: var(--accent-color);
    --parrafo-color: black;
}

/* Tema Oscuro (Sobrescribe variables) */
body.dark-mode {
    --bg-color: #0f172a;
    --text-color: #e2e8f0;
    --card-bg: #1e293b;
    --primary-color: #3b82f6;
    --secondary-color: #60a5fa;
    --nav-bg: rgba(15, 23, 42, 0.95);
    --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.5);
    /* Enlaces más visibles en modo oscuro */
    --link-color: #93c5fd; /* azul claro alto contraste */
    --link-hover-color: #bfdbfe;
    --parrafo-color: #93c5fd;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', system-ui, sans-serif;
    transition: background-color 0.3s, color 0.3s;
}

body {
    background-color: var(--bg-color);
    color: var(--text-color);
    line-height: 1.6;
}

/* Navegación */
.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 5%;
    background-color: var(--nav-bg);
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: var(--shadow);
    backdrop-filter: blur(10px);
}

.logo {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-color);
}
.logo span { color: var(--primary-color); }

.nav-links {
    list-style: none;
    display: flex;
    gap: 2rem;
}

.nav-links a {
    text-decoration: none;
    color: var(--text-color);
    font-weight: 500;
    position: relative;
}

.nav-links a::after {
    content: '';
    width: 0;
    height: 2px;
    background: var(--primary-color);
    position: absolute;
    bottom: -5px;
    left: 0;
    transition: width 0.3s;
}

.nav-links a:hover::after { width: 100%; }

/* Botón Dark Mode */
.theme-btn {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 1.2rem;
    color: var(--text-color);
    padding: 0.5rem;
    border-radius: 50%;
}
.theme-btn:hover { background-color: var(--card-bg); }

/* Hero Section */
.hero {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 4rem 5%;
    min-height: 80vh;
}

.hero-content { max-width: 600px; }

.hero h1 {
    font-size: 3.5rem;
    line-height: 1.2;
    margin-bottom: 1rem;
    background: linear-gradient(to right, var(--primary-color), var(--accent-color));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero-buttons { margin-top: 2rem; display: flex; gap: 1rem; }

.btn {
    padding: 0.8rem 1.5rem;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    transition: transform 0.2s;
}

.btn.primary {
    background-color: var(--primary-color);
    color: white;
}

.btn.secondary {
    border: 2px solid var(--primary-color);
    color: var(--primary-color);
}

.btn:hover { transform: translateY(-3px); }

/* Hero Visual Animation */
.hero-visual {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
}

.computer {
    position: relative;
    width: 450px;
    height: 300px;
    animation: floating 3s ease-in-out infinite;
}

.monitor {
    width: 450px;
    height: 270px;
    background-color: #333;
    border: 15px solid #2d2d2d;
    border-radius: 20px;
    position: relative;
    box-shadow: 0 20px 60px rgba(0,0,0,0.4);
}

.screen {
    width: 100%;
    height: 100%;
    background-color: #0f172a;
    border-radius: 5px;
    padding: 25px;
    overflow: hidden;
    position: relative;
}

.screen::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(255,255,255,0.05) 0%, transparent 50%);
}

/* Network Animation inside Computer */
.network-display {
    width: 100%;
    height: 100%;
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
}

.node {
    width: 25px;
    height: 25px;
    background-color: var(--accent-color);
    border-radius: 50%;
    position: absolute;
    box-shadow: 0 0 15px var(--accent-color);
    opacity: 0.8;
}

.node-1 { top: 20%; left: 20%; }
.node-2 { top: 20%; right: 20%; }
.node-3 { bottom: 20%; left: 20%; }
.node-4 { bottom: 20%; right: 20%; }

.data-packet {
    width: 10px;
    height: 10px;
    background-color: #fff;
    border-radius: 50%;
    position: absolute;
    box-shadow: 0 0 10px #fff;
    opacity: 0;
}

.p1 { animation: packet1 3s infinite linear; }
.p2 { animation: packet2 4s infinite linear; animation-delay: 1s; }
.p3 { animation: packet3 2.5s infinite linear; animation-delay: 0.5s; }

.status-box {
    position: absolute;
    top: 5px;
    left: 5px;
    font-family: 'Courier New', monospace;
    color: #4ade80;
    font-size: 0.8rem;
    background: rgba(0,0,0,0.5);
    padding: 2px 8px;
    border-radius: 4px;
}

.status-box::before {
    content: '';
    display: inline-block;
    width: 8px;
    height: 8px;
    background-color: #4ade80;
    border-radius: 50%;
    margin-right: 8px;
    animation: blink 1s infinite;
}

@keyframes packet1 {
    0% { top: 20%; left: 20%; opacity: 0; }
    10% { opacity: 1; }
    90% { opacity: 1; }
    100% { top: 20%; left: 80%; opacity: 0; } /* de node 1 a 2 */
}

@keyframes packet2 {
    0% { top: 20%; left: 80%; opacity: 0; }
    10% { opacity: 1; }
    90% { opacity: 1; }
    100% { top: 80%; left: 80%; opacity: 0; } /* de node 2 a 4 */
}

@keyframes packet3 {
    0% { top: 80%; left: 20%; opacity: 0; }
    10% { opacity: 1; }
    90% { opacity: 1; }
    100% { top: 20%; left: 20%; opacity: 0; } /* de node 3 a 1 */
}

@keyframes blink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0; }
}

.base {
    width: 120px;
    height: 30px;
    background-color: #2d2d2d;
    margin: 0 auto;
    position: relative;
}

.base::after {
    content: '';
    position: absolute;
    bottom: -20px;
    left: -60px;
    width: 240px;
    height: 20px;
    background-color: #252525;
    border-radius: 12px 12px 0 0;
}

@keyframes floating {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-20px); }
}

/* Cards Grid */
.container { padding: 4rem 5%; }
.section-title { text-align: center; margin-bottom: 3rem; font-size: 2rem; }

img {
    display: block;
    margin: 0 auto 3rem;
    max-width: 100%;
    border-radius: 3%;

}

.cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.card {
    background-color: var(--card-bg);
    padding: 2rem;
    border-radius: 12px;
    box-shadow: var(--shadow);
    transition: transform 0.3s;
}

.card:hover { transform: translateY(-10px); }

.icon-box {
    font-size: 2rem;
    color: var(--primary-color);
    margin-bottom: 1rem;
}

/* Enlaces dentro de tarjetas */
.card a {
    color: var(--link-color);
    text-decoration: underline;
    font-weight: 600;
}
.card a:hover,
.card a:focus {
    color: var(--link-hover-color);
}
.card a:visited {
    color: var(--link-color);
}

/* Lista de Recursos */
.resources-section { background-color: var(--card-bg); padding: 4rem 5%; }

.resource-list {
    max-width: 800px;
    margin: 0 auto;
}

.socials{
    color:#4a768a;
    
}

.contact-section h2{
    color:#0ea5e9;
    display: flex;
    align-items: center;
    justify-content: center;
}

.contact-section p{
    color: var(--text-color);
    align-items: center;
    justify-content: center;
    display: flex;
    margin: 0px 0px 25px;
}

.contact-section a{
    color: var(--primary-color);
    display: flex;
    align-items: center;
    justify-content: center ;
}

.resource-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.5rem;
    border-bottom: 1px solid var(--text-color);
    opacity: 0.8;
}

.resource-item span { font-size: 2rem; margin-right: 1rem; }
.res-info h4 { margin-bottom: 0.5rem; }

.download-btn {
    color: var(--primary-color);
    font-size: 1.5rem;
}

/* Footer */
footer {
    text-align: center;
    padding: 2rem;
    background-color: var(--nav-bg);
    margin-top: 2rem;
}

footer a{
    color: var(--link-color);
}

.contact-info {
    margin-top: 1.5rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
}

#email-to-copy {
    font-weight: 500;
    margin-right: 10px;
    padding: 5px 10px;
    background-color: var(--card-bg);
    border-radius: 4px;
}

#copy-btn {

    border: 2px solid var(--primary-color);
}

/* Responsive */
@media (max-width: 768px) {
    .nav-links { display: none; }
    .hero { flex-direction: column; text-align: center; }
    .hero h1 { font-size: 2.5rem; }
    .hero-visual { display: none; }
}