/* 
  TELCORED PREMIUM DESIGN SYSTEM 
  Version: 3.0 (Clean & Professional)
*/

:root {
    --primary: #033f72;
    --primary-light: #0d4a85;
    --accent: #a71715;
    --accent-light: #c21a18;
    --bg-dark: #000c14;
    --bg-card: rgba(255, 255, 255, 0.03);
    --glass-border: rgba(255, 255, 255, 0.08);
    --text-main: #f8fafc;
    --text-muted: #94a3b8;
    --transition: all 0.4s cubic-bezier(0.23, 1, 0.32, 1);
}

/* Reset */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    background-color: var(--bg-dark);
    color: var(--text-main);
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    line-height: 1.6;
    overflow-x: hidden;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

/* Utilities */
.text-gradient {
    background: linear-gradient(135deg, #fff 0%, #b3c7d9 40%, var(--primary) 70%, var(--accent) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in {
    animation: fadeInUp 0.8s cubic-bezier(0.23, 1, 0.32, 1) forwards;
}

.delay-1 {
    animation-delay: 0.2s;
}

.delay-2 {
    animation-delay: 0.4s;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.8rem 2rem;
    border-radius: 50px;
    font-weight: 700;
    text-decoration: none;
    transition: var(--transition);
    cursor: pointer;
    border: none;
    font-size: 0.95rem;
}

.btn-primary {
    background: var(--accent);
    color: white;
    box-shadow: 0 10px 20px rgba(167, 23, 21, 0.2);
}

.btn-primary:hover {
    background: var(--accent-light);
    transform: translateY(-3px);
    box-shadow: 0 15px 30px rgba(167, 23, 21, 0.4);
}

.btn-outline {
    background: transparent;
    border: 1.5px solid rgba(255, 255, 255, 0.2);
    color: white;
}

.btn-outline:hover {
    border-color: white;
    background: rgba(255, 255, 255, 0.05);
}

.glass {
    background: var(--bg-card);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    border: 1px solid var(--glass-border);
    border-radius: 20px;
}

/* Navbar Premium Finish */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 2000;
    background: rgba(0, 8, 15, 0.8);
    backdrop-filter: blur(25px);
    -webkit-backdrop-filter: blur(25px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    height: 85px;
    display: flex;
    align-items: center;
    transition: var(--transition);
}

.nav-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
}

.logo {
    font-size: 1.7rem;
    font-weight: 900;
    color: white;
    text-decoration: none;
    letter-spacing: -1.5px;
    text-transform: uppercase;
}

.logo span {
    color: var(--accent);
}

/* Desktop Menu */
.nav-links {
    display: flex;
    gap: 1rem;
    list-style: none;
    align-items: center;
}

.nav-links>li {
    position: relative;
}

.nav-links>li>a {
    color: var(--text-muted);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.9rem;
    padding: 0.6rem 1rem;
    border-radius: 8px;
    transition: var(--transition);
}

.nav-links>li>a:hover,
.nav-links>li.active>a {
    color: white;
    background: rgba(255, 255, 255, 0.05);
}

/* Dropdowns Desktop */
.dropdown-menu {
    position: absolute;
    top: 100%;
    right: 0;
    /* Aligned to right to avoid overflow */
    width: 240px;
    background: #0f172a;
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    padding: 0.6rem;
    opacity: 0;
    visibility: hidden;
    transform: translateY(15px);
    transition: var(--transition);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.5);
    list-style: none;
}

.dropdown:hover>.dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.dropdown-menu a {
    display: flex;
    align-items: center;
    padding: 0.7rem 1rem;
    color: var(--text-muted);
    text-decoration: none;
    font-size: 0.85rem;
    border-radius: 8px;
    transition: var(--transition);
}

.dropdown-menu a:hover {
    background: rgba(255, 255, 255, 0.05);
    color: white;
    padding-left: 1.2rem;
}

/* Nested Submenus Desktop */
.has-submenu {
    position: relative;
}

.submenu-right {
    position: absolute;
    top: 0;
    right: 100%;
    /* Move to LEFT of the parent list */
    margin-right: 5px;
    width: 220px;
    background: #1e293b;
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    padding: 0.6rem;
    opacity: 0;
    visibility: hidden;
    transform: translateX(10px);
    transition: var(--transition);
    list-style: none;
}

.has-submenu:hover>.submenu-right {
    opacity: 1;
    visibility: visible;
    transform: translateX(0);
}

/* Mobile Toggle */
.menu-toggle {
    display: none;
    flex-direction: column;
    gap: 6px;
    cursor: pointer;
    padding: 5px;
    z-index: 2100;
}

.menu-toggle span {
    width: 28px;
    height: 3px;
    background: white;
    border-radius: 3px;
    transition: var(--transition);
}

/* Mobile Responsiveness */
@media (max-width: 992px) {
    .menu-toggle {
        display: flex;
    }

    .nav-links {
        position: fixed;
        top: 0;
        right: -100%;
        width: 100%;
        height: 100vh;
        background: #000c14;
        flex-direction: column;
        justify-content: flex-start;
        padding: 100px 1.5rem 50px;
        transition: 0.5s cubic-bezier(0.77, 0, 0.175, 1);
        overflow-y: auto;
        gap: 0.5rem;
    }

    .nav-links.nav-active {
        right: 0;
    }

    .nav-links>li {
        width: 100%;
    }

    .nav-links>li>a {
        display: flex;
        justify-content: space-between;
        padding: 1rem;
        font-size: 1.1rem;
        border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    }

    /* Mobile Dropdowns */
    .dropdown-menu {
        position: relative;
        top: 0;
        width: 100%;
        opacity: 1;
        visibility: visible;
        transform: none;
        display: none;
        background: rgba(255, 255, 255, 0.02);
        box-shadow: none;
        border: none;
        margin-top: 0.5rem;
        padding-left: 1rem;
    }

    .dropdown.active>.dropdown-menu {
        display: block;
    }

    .submenu-right {
        position: relative;
        top: 0;
        right: 0;
        width: 100%;
        opacity: 1;
        visibility: visible;
        transform: none;
        display: none;
        background: rgba(0, 0, 0, 0.2);
        border: none;
        padding-left: 1rem;
    }

    .has-submenu.mobile-open>.submenu-right {
        display: block;
    }

    .nav-btn-item {
        margin-top: 1rem;
    }

    .btn-login {
        width: 100% !important;
        border-radius: 12px !important;
    }

    .menu-toggle.open span:nth-child(1) {
        transform: translateY(9px) rotate(45deg);
    }

    .menu-toggle.open span:nth-child(2) {
        opacity: 0;
    }

    .menu-toggle.open span:nth-child(3) {
        transform: translateY(-9px) rotate(-45deg);
    }
}

/* Sections */
section {
    padding: 100px 0;
}

.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    position: relative;
    padding-top: 80px;
    background:
        radial-gradient(circle at 80% 20%, rgba(3, 63, 114, 0.15) 0%, transparent 50%),
        radial-gradient(circle at 20% 80%, rgba(167, 23, 21, 0.05) 0%, transparent 40%);
    overflow: hidden;
}

/* Subtle Tech Grid Background */
.hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(255, 255, 255, 0.02) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.02) 1px, transparent 1px);
    background-size: 50px 50px;
    mask-image: radial-gradient(circle at center, black, transparent 80%);
    -webkit-mask-image: radial-gradient(circle at center, black, transparent 80%);
    z-index: -1;
}

.hero-title {
    font-size: clamp(2.8rem, 8vw, 4.8rem);
    font-weight: 900;
    line-height: 1.05;
    letter-spacing: -3px;
    margin-bottom: 2rem;
}

.hero-subtitle {
    font-size: clamp(1.1rem, 3vw, 1.4rem);
    color: var(--text-muted);
    max-width: 650px;
    margin-bottom: 3rem;
    line-height: 1.7;
    font-weight: 400;
}

.hero-btns {
    display: flex;
    gap: 1.5rem;
    flex-wrap: wrap;
}

.hero .btn {
    padding: 1rem 2.8rem;
    font-size: 1rem;
    letter-spacing: 0.5px;
    position: relative;
    overflow: hidden;
}

.hero .btn-primary::after {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.2) 0%, transparent 60%);
    transform: scale(0);
    transition: transform 0.6s ease-out;
    pointer-events: none;
}

.hero .btn-primary:hover::after {
    transform: scale(1);
}

/* Grid System */
.grid {
    display: grid;
    gap: 2rem;
}

.grid-3 {
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
}

/* Service Cards */
/* High-Tech Service Cards */
/* High-Tech Service Cards */
.service-card {
    position: relative;
    padding: 3.5rem 2.5rem;
    overflow: hidden;
    z-index: 1;
    border: 1px solid rgba(255, 255, 255, 0.05);
    background: rgba(255, 255, 255, 0.02);
    display: flex;
    flex-direction: column;
}

/* Theme Glows & Specific Accents */
.card-hosting {
    --accent-card: #00d2ff;
    --accent-glow: rgba(0, 210, 255, 0.15);
}

.card-informatica {
    --accent-card: #bd00ff;
    --accent-glow: rgba(189, 0, 255, 0.15);
}

.card-electricidad {
    --accent-card: #ff9d00;
    --accent-glow: rgba(255, 157, 0, 0.15);
}

.card-seguridad {
    --accent-card: #ff003c;
    --accent-glow: rgba(255, 0, 60, 0.15);
}

.card-telecom {
    --accent-card: #00ffa3;
    --accent-glow: rgba(0, 255, 163, 0.15);
}

.card-automatizacion {
    --accent-card: #ffffff;
    --accent-glow: rgba(255, 255, 255, 0.1);
}

.service-card:hover {
    border-color: var(--accent-card);
    background: linear-gradient(135deg, var(--accent-glow) 0%, rgba(255, 255, 255, 0.03) 100%);
    box-shadow: 0 20px 50px -15px var(--accent-glow);
    transform: translateY(-10px) scale(1.02);
}

.service-card .icon-box {
    width: 80px;
    height: 80px;
    background: rgba(0, 0, 0, 0.5);
    border: 1px solid var(--accent-card);
    color: var(--accent-card);
    font-size: 2.2rem;
    margin-bottom: 2rem;
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
    box-shadow: 0 0 15px var(--accent-glow);
}

.service-card:hover .icon-box {
    transform: scale(1.1) rotate(10deg);
    background: var(--accent-card);
    color: #000;
    box-shadow: 0 0 40px var(--accent-card);
}

.service-card h3 {
    font-size: 1.7rem;
    font-weight: 800;
    margin-bottom: 1.2rem;
    letter-spacing: -0.5px;
    color: #fff;
}

.service-card h3::after {
    content: '';
    display: block;
    width: 30px;
    height: 3px;
    background: var(--accent-card);
    margin-top: 12px;
    transition: width 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
    box-shadow: 0 0 10px var(--accent-card);
}

.service-card:hover h3::after {
    width: 70px;
}

/* Background elements for cards */
.card-bg-icon {
    position: absolute;
    right: -40px;
    bottom: -40px;
    font-size: 10rem;
    opacity: 0.05;
    transform: rotate(-15deg);
    transition: var(--transition);
    pointer-events: none;
    z-index: -1;
}

.service-card:hover .card-bg-icon {
    opacity: 0.15;
    transform: rotate(0deg) scale(1.2) translate(-20px, -20px);
    color: var(--accent-card);
}

.service-card .btn-primary {
    background: linear-gradient(45deg, var(--accent-card), var(--primary)) !important;
    border: none;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}


/* Forms */
.contact-grid {
    display: grid;
    grid-template-columns: 1fr 1.2fr;
    gap: 4rem;
    align-items: start;
}

@media (max-width: 900px) {
    .contact-grid {
        grid-template-columns: 1fr;
        gap: 3rem;
    }
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
    margin-bottom: 1.5rem;
}

@media (max-width: 600px) {
    .form-row {
        grid-template-columns: 1fr;
    }
}

/* Contact Section Refinement */
#contacto {
    position: relative;
    overflow: hidden;
    background: linear-gradient(to bottom, var(--bg-dark), #001a2c);
}

#contacto::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image: radial-gradient(circle at 90% 10%, rgba(3, 63, 114, 0.1) 0%, transparent 40%);
    z-index: 0;
}

#contacto .container {
    position: relative;
    z-index: 1;
}

#contacto .glass {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.05);
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
}

input,
textarea {
    width: 100%;
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.1);
    padding: 1.1rem;
    border-radius: 14px;
    color: white;
    font-family: inherit;
    transition: var(--transition);
}

input:focus,
textarea:focus {
    outline: none;
    border-color: var(--primary);
    background: rgba(3, 63, 114, 0.05);
    box-shadow: 0 0 15px rgba(3, 63, 114, 0.2);
}

label {
    display: block;
    font-weight: 600;
    color: var(--text-muted);
    margin-bottom: 0.6rem;
    font-size: 0.85rem;
    letter-spacing: 0.5px;
}

/* Footer */
footer {
    padding: 50px 0;
    border-top: 1px solid var(--glass-border);
    text-align: center;
    color: var(--text-muted);
    font-size: 0.9rem;
}

/* Helpers */
.w-100 {
    width: 100%;
}

.mt-auto {
    margin-top: auto;
}

.mb-4 {
    margin-bottom: 1.5rem;
}

.p-4 {
    padding: 1.5rem;
}

.p-5 {
    padding: 3rem;
}

@media (max-width: 600px) {
    .p-5 {
        padding: 1.5rem;
    }
}

.alert {
    padding: 1rem;
    border-radius: 12px;
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.8rem;
    font-size: 0.9rem;
}

.alert-success {
    background: rgba(16, 185, 129, 0.1);
    border: 1px solid rgba(16, 185, 129, 0.2);
    color: #34d399;
}