/* 
   Intercloud Servers - Premium Design System
   Vanilla CSS with CSS variables, Glassmorphism, Neon Glows and Animations
*/

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=Outfit:wght@400;500;600;700;800&display=swap');

:root {
    --bg-dark: #070913;
    --bg-darker: #04050a;
    --bg-card: rgba(255, 255, 255, 0.03);
    --border-color: rgba(255, 255, 255, 0.08);
    
    --primary: #00f0ff;
    --primary-glow: rgba(0, 240, 255, 0.3);
    --secondary: #8a2be2;
    --secondary-glow: rgba(138, 43, 226, 0.3);
    --accent: #ff007f;
    --text-main: #f3f4f6;
    --text-muted: #9ca3af;
    --text-dark: #1f2937;
    
    --success: #10b981;
    --warning: #f59e0b;
    --danger: #ef4444;
    
    --font-head: 'Outfit', sans-serif;
    --font-body: 'Inter', sans-serif;
    --shadow-glow: 0 0 25px var(--primary-glow);
    --shadow-purple: 0 0 25px var(--secondary-glow);
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

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

body {
    background-color: var(--bg-dark);
    color: var(--text-main);
    font-family: var(--font-body);
    line-height: 1.6;
    overflow-x: hidden;
    position: relative;
}

/* Background Glowing Nodes */
body::before {
    content: '';
    position: absolute;
    top: -10%;
    left: -10%;
    width: 60vw;
    height: 60vw;
    background: radial-gradient(circle, rgba(138, 43, 226, 0.1) 0%, transparent 70%);
    z-index: -1;
    pointer-events: none;
}

body::after {
    content: '';
    position: absolute;
    bottom: -10%;
    right: -10%;
    width: 60vw;
    height: 60vw;
    background: radial-gradient(circle, rgba(0, 240, 255, 0.08) 0%, transparent 70%);
    z-index: -1;
    pointer-events: none;
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-head);
    font-weight: 700;
    letter-spacing: -0.02em;
    color: #ffffff;
}

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

/* Navigation Header */
header {
    background: rgba(7, 9, 19, 0.7);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border-color);
    position: sticky;
    top: 0;
    z-index: 100;
    padding: 1.25rem 2rem;
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-family: var(--font-head);
    font-size: 1.5rem;
    font-weight: 800;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.logo svg {
    stroke: var(--primary);
}

.nav-menu {
    display: flex;
    align-items: center;
    gap: 2rem;
    list-style: none;
}

.nav-link {
    font-size: 0.95rem;
    font-weight: 500;
    color: var(--text-muted);
    position: relative;
    padding: 0.5rem 0;
}

.nav-link:hover, .nav-link.active {
    color: #ffffff;
    text-shadow: 0 0 10px rgba(255, 255, 255, 0.3);
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, var(--primary), var(--secondary));
    transition: var(--transition);
}

.nav-link:hover::after, .nav-link.active::after {
    width: 100%;
}

.nav-actions {
    display: flex;
    align-items: center;
    gap: 1.2rem;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    font-family: var(--font-head);
    font-weight: 600;
    font-size: 0.95rem;
    border-radius: 8px;
    cursor: pointer;
    transition: var(--transition);
    border: none;
}

.btn-primary {
    background: linear-gradient(135deg, var(--secondary), var(--primary));
    color: #ffffff;
    box-shadow: var(--shadow-glow);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 0 30px rgba(0, 240, 255, 0.45);
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-color);
    color: #ffffff;
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: var(--primary);
    transform: translateY(-2px);
}

.btn-sm {
    padding: 0.4rem 0.8rem;
    font-size: 0.85rem;
}

.lang-switch {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.4rem 0.8rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    color: var(--text-main);
    transition: var(--transition);
}

.lang-switch:hover {
    border-color: var(--primary);
    background: rgba(0, 240, 255, 0.08);
}

/* Page Layout Containers */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 4rem 2rem;
}

/* Hero Section (Inicio) */
.hero {
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    gap: 4rem;
    align-items: center;
    padding: 6rem 2rem;
    max-width: 1200px;
    margin: 0 auto;
}

.hero-content {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.badge {
    align-self: flex-start;
    padding: 0.4rem 1rem;
    border-radius: 50px;
    background: rgba(0, 240, 255, 0.08);
    border: 1px solid rgba(0, 240, 255, 0.2);
    color: var(--primary);
    font-family: var(--font-head);
    font-weight: 600;
    font-size: 0.85rem;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    box-shadow: 0 0 15px rgba(0, 240, 255, 0.05);
}

.hero-title {
    font-size: 3.5rem;
    line-height: 1.15;
    background: linear-gradient(135deg, #ffffff 60%, var(--primary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero-desc {
    font-size: 1.15rem;
    color: var(--text-muted);
}

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

/* Hero Graphic / Server Model Visualizer */
.hero-graphic {
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
}

.server-rack {
    background: linear-gradient(145deg, rgba(15, 17, 30, 0.8), rgba(8, 9, 18, 0.9));
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 2.5rem;
    width: 100%;
    max-width: 440px;
    box-shadow: var(--shadow-purple), inset 0 0 20px rgba(255,255,255,0.02);
    position: relative;
    overflow: hidden;
}

.server-rack::before {
    content: '';
    position: absolute;
    top: 0; right: 0; bottom: 0; left: 0;
    background: linear-gradient(180deg, rgba(255,255,255,0.03) 0%, transparent 100%);
    pointer-events: none;
}

.rack-unit {
    border-bottom: 2px solid rgba(255,255,255,0.02);
    padding: 1.2rem 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.rack-unit:last-child {
    border-bottom: none;
}

.unit-label {
    display: flex;
    align-items: center;
    gap: 0.8rem;
}

.led-indicator {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background-color: var(--success);
    box-shadow: 0 0 10px var(--success);
    animation: pulse 2s infinite;
}

.led-indicator.blink {
    animation: blink-led 1s infinite alternate;
}

.unit-spec {
    font-size: 0.85rem;
    font-family: var(--font-head);
    color: var(--primary);
    background: rgba(0, 240, 255, 0.05);
    padding: 0.2rem 0.5rem;
    border-radius: 4px;
    border: 1px solid rgba(0, 240, 255, 0.1);
}

/* Feature Cards Grid (Home / Services) */
.section-header {
    text-align: center;
    max-width: 700px;
    margin: 0 auto 4rem auto;
}

.section-header h2 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.section-header p {
    color: var(--text-muted);
}

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

.card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 2.5rem;
    transition: var(--transition);
    position: relative;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

.card:hover {
    transform: translateY(-5px);
    border-color: rgba(0, 240, 255, 0.25);
    box-shadow: 0 10px 30px rgba(0, 240, 255, 0.05);
    background: rgba(255, 255, 255, 0.05);
}

.card-icon {
    width: 50px;
    height: 50px;
    border-radius: 10px;
    background: rgba(0, 240, 255, 0.08);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.5rem;
    color: var(--primary);
    border: 1px solid rgba(0, 240, 255, 0.15);
}

.card h3 {
    font-size: 1.3rem;
    margin-bottom: 1rem;
}

.card p {
    color: var(--text-muted);
    font-size: 0.95rem;
}

/* Server Pricing Cards (Products) */
.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 2.5rem;
}

.product-card {
    background: linear-gradient(145deg, rgba(255, 255, 255, 0.02) 0%, rgba(255, 255, 255, 0.04) 100%);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 3rem 2.5rem;
    display: flex;
    flex-direction: column;
    position: relative;
    overflow: hidden;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    transition: var(--transition);
}

.product-card.premium {
    border-color: rgba(138, 43, 226, 0.4);
    box-shadow: 0 0 30px rgba(138, 43, 226, 0.1);
}

.product-card.premium::after {
    content: 'RECOMMENDED';
    position: absolute;
    top: 20px;
    right: -30px;
    background: var(--secondary);
    color: #fff;
    font-size: 0.75rem;
    font-weight: 700;
    padding: 0.3rem 2.5rem;
    transform: rotate(45deg);
    font-family: var(--font-head);
}

.product-card:hover {
    transform: translateY(-8px);
    border-color: var(--primary);
    box-shadow: 0 15px 40px rgba(0, 240, 255, 0.08);
}

.product-type {
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--primary);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-bottom: 0.5rem;
}

.product-name {
    font-size: 1.8rem;
    margin-bottom: 1rem;
}

.product-price {
    font-size: 2.5rem;
    color: #ffffff;
    font-family: var(--font-head);
    font-weight: 800;
    margin-bottom: 1.5rem;
    display: flex;
    align-items: baseline;
}

.product-price span {
    font-size: 1rem;
    font-weight: 400;
    color: var(--text-muted);
    margin-left: 0.3rem;
}

.product-features {
    list-style: none;
    margin-bottom: 2.5rem;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
}

.product-features li {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 0.95rem;
    color: var(--text-muted);
}

.product-features li svg {
    color: var(--primary);
    flex-shrink: 0;
}

/* Custom Quote Form (Cotizaciones) with Sliders */
.quote-wrapper {
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    gap: 4rem;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    padding: 4rem;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.quote-calculator {
    display: flex;
    flex-direction: column;
    gap: 2rem;
    padding-right: 2rem;
    border-right: 1px solid var(--border-color);
}

.calc-slider-group {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.slider-header {
    display: flex;
    justify-content: space-between;
    font-family: var(--font-head);
    font-weight: 600;
}

.slider-val {
    color: var(--primary);
    text-shadow: 0 0 10px rgba(0, 240, 255, 0.4);
}

.range-input {
    -webkit-appearance: none;
    width: 100%;
    height: 6px;
    border-radius: 5px;
    background: rgba(255, 255, 255, 0.1);
    outline: none;
    transition: var(--transition);
}

.range-input::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: var(--primary);
    cursor: pointer;
    box-shadow: 0 0 10px var(--primary);
    transition: var(--transition);
}

.range-input::-webkit-slider-thumb:hover {
    transform: scale(1.2);
}

.calc-total {
    margin-top: 1rem;
    background: rgba(255, 255, 255, 0.02);
    border: 1px dashed rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 1.5rem;
    text-align: center;
}

.calc-total .price {
    font-size: 3rem;
    font-family: var(--font-head);
    font-weight: 800;
    color: var(--primary);
    text-shadow: 0 0 15px rgba(0, 240, 255, 0.2);
    margin: 0.5rem 0;
}

/* Contact & Admin Forms */
.form-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 3rem;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

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

.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
}

.form-group.full-width {
    grid-column: span 2;
}

.form-label {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-muted);
}

.form-control {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 0.85rem 1rem;
    font-family: var(--font-body);
    font-size: 0.95rem;
    color: #ffffff;
    transition: var(--transition);
}

.form-control:focus {
    outline: none;
    border-color: var(--primary);
    background: rgba(255, 255, 255, 0.08);
    box-shadow: 0 0 15px rgba(0, 240, 255, 0.1);
}

textarea.form-control {
    resize: vertical;
    min-height: 120px;
}

.alert {
    padding: 1.25rem;
    border-radius: 8px;
    margin-bottom: 2rem;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

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

.alert-danger {
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.2);
    color: var(--danger);
}

/* Footer Section */
footer {
    border-top: 1px solid var(--border-color);
    padding: 4rem 2rem 2rem 2rem;
    background-color: var(--bg-darker);
}

.footer-grid {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 4rem;
    margin-bottom: 4rem;
}

.footer-info {
    display: flex;
    flex-direction: column;
    gap: 1.2rem;
}

.footer-info p {
    color: var(--text-muted);
    font-size: 0.95rem;
    max-width: 320px;
}

.footer-col h4 {
    font-size: 1.1rem;
    margin-bottom: 1.5rem;
}

.footer-links {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
}

.footer-links a {
    color: var(--text-muted);
    font-size: 0.95rem;
}

.footer-links a:hover {
    color: #ffffff;
    padding-left: 5px;
}

.footer-bottom {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    padding-top: 2rem;
    color: var(--text-muted);
    font-size: 0.9rem;
}

/* --- ADMIN PANEL LAYOUT & VIEWS --- */
.admin-login-body {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    background-color: var(--bg-darker);
}

.admin-login-card {
    width: 100%;
    max-width: 420px;
}

.admin-layout {
    display: flex;
    min-height: 100vh;
}

.admin-sidebar {
    width: 280px;
    background-color: var(--bg-darker);
    border-right: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    padding: 2rem;
    position: fixed;
    top: 0; bottom: 0; left: 0;
}

.admin-content {
    flex-grow: 1;
    margin-left: 280px;
    padding: 3rem;
    background-color: var(--bg-dark);
}

.admin-menu {
    list-style: none;
    margin-top: 3rem;
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
}

.admin-menu-link {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.85rem 1.2rem;
    border-radius: 8px;
    color: var(--text-muted);
    font-weight: 500;
    transition: var(--transition);
}

.admin-menu-link:hover, .admin-menu-link.active {
    background: rgba(255, 255, 255, 0.05);
    color: #ffffff;
}

.admin-menu-link.active {
    border-left: 3px solid var(--primary);
    border-top-left-radius: 0;
    border-bottom-left-radius: 0;
    background: rgba(0, 240, 255, 0.04);
    color: var(--primary);
}

.admin-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 3rem;
}

.admin-title-group h1 {
    font-size: 2rem;
}

.admin-title-group p {
    color: var(--text-muted);
    font-size: 0.95rem;
}

/* Stats Dashboard Grids */
.admin-stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1.5rem;
    margin-bottom: 3rem;
}

.stat-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 2rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.stat-num {
    font-size: 2.2rem;
    font-family: var(--font-head);
    font-weight: 800;
    color: #ffffff;
}

.stat-label {
    color: var(--text-muted);
    font-size: 0.9rem;
    margin-top: 0.2rem;
}

.stat-icon {
    width: 48px;
    height: 48px;
    border-radius: 10px;
    background: rgba(138, 43, 226, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--secondary);
}

.stat-card.glow .stat-icon {
    background: rgba(0, 240, 255, 0.1);
    color: var(--primary);
}

/* Admin Tables & Forms */
.table-container {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    overflow-x: auto;
    margin-bottom: 3rem;
}

.admin-table {
    width: 100%;
    border-collapse: collapse;
    text-align: left;
}

.admin-table th {
    background: rgba(255, 255, 255, 0.02);
    border-bottom: 1px solid var(--border-color);
    padding: 1.2rem 1.5rem;
    font-family: var(--font-head);
    font-weight: 600;
    font-size: 0.9rem;
    color: #ffffff;
}

.admin-table td {
    padding: 1.2rem 1.5rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    color: var(--text-muted);
    font-size: 0.95rem;
}

.admin-table tr:last-child td {
    border-bottom: none;
}

.status-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
}

.status-pending {
    background: rgba(245, 158, 11, 0.1);
    color: var(--warning);
    border: 1px solid rgba(245, 158, 11, 0.2);
}

.status-completed, .status-available {
    background: rgba(16, 185, 129, 0.1);
    color: var(--success);
    border: 1px solid rgba(16, 185, 129, 0.2);
}

.status-contacted, .status-read {
    background: rgba(59, 130, 246, 0.1);
    color: #3b82f6;
    border: 1px solid rgba(59, 130, 246, 0.2);
}

.status-unread {
    background: rgba(239, 68, 68, 0.1);
    color: var(--danger);
    border: 1px solid rgba(239, 68, 68, 0.2);
}

/* Modals & Forms for Adding/Editing */
.admin-card-section {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 2.5rem;
    margin-bottom: 3rem;
}

.action-row {
    display: flex;
    gap: 0.5rem;
}

/* Animations */
@keyframes pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7);
    }
    70% {
        box-shadow: 0 0 0 10px rgba(16, 185, 129, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(16, 185, 129, 0);
    }
}

@keyframes blink-led {
    0% {
        opacity: 0.3;
        box-shadow: 0 0 2px var(--primary);
    }
    100% {
        opacity: 1;
        box-shadow: 0 0 12px var(--primary);
    }
}

/* Responsive Grid Tweaks */
@media (max-width: 968px) {
    .hero {
        grid-template-columns: 1fr;
        gap: 3rem;
        text-align: center;
    }
    .hero-content {
        align-items: center;
    }
    .hero-graphic {
        order: -1;
    }
    .quote-wrapper {
        grid-template-columns: 1fr;
        padding: 2rem;
    }
    .quote-calculator {
        padding-right: 0;
        border-right: none;
        border-bottom: 1px solid var(--border-color);
        padding-bottom: 2rem;
    }
    .footer-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    .admin-sidebar {
        width: 80px;
        padding: 1rem 0.5rem;
    }
    .admin-sidebar .logo span, .admin-sidebar .admin-menu-link span {
        display: none;
    }
    .admin-content {
        margin-left: 80px;
        padding: 2rem;
    }
}
