/* ===================================================
   Syrap Software - Estilos Principales (SaaS Design)
   Soluciones Tecnológicas de Alto Rendimiento
   Por Harolt Rangel
   Basado en los Colores de Marca SYRAP
   =================================================== */

:root {
    --primary: #00b4d8;
    --primary-hover: #0096c7;
    --secondary: #00f0ff;
    --accent: #2563eb;
    --bg-main: #070a12;
    --bg-card: #111827;
    --bg-card-hover: #1f2937;
    --bg-nav: rgba(7, 10, 18, 0.88);
    --text-main: #f8fafc;
    --text-muted: #94a3b8;
    --border-color: rgba(0, 180, 216, 0.15);
    --gradient-primary: linear-gradient(135deg, #00d2ff 0%, #0077b6 100%);
    --gradient-hero: linear-gradient(135deg, #070a12 0%, #0c1527 50%, #070a12 100%);
    --gradient-text: linear-gradient(135deg, #00f0ff 0%, #3b82f6 100%);
    --shadow-sm: 0 4px 6px -1px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 20px 25px -5px rgba(0, 0, 0, 0.6), 0 8px 10px -6px rgba(0, 0, 0, 0.4);
    --shadow-glow: 0 0 25px rgba(0, 210, 255, 0.3);
    --radius-sm: 8px;
    --radius-md: 16px;
    --radius-lg: 24px;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --font-family: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

[data-theme="light"] {
    --bg-main: #f0f4f8;
    --bg-card: #ffffff;
    --bg-card-hover: #e2e8f0;
    --bg-nav: rgba(255, 255, 255, 0.92);
    --text-main: #0f172a;
    --text-muted: #475569;
    --border-color: rgba(0, 119, 182, 0.15);
    --gradient-hero: linear-gradient(135deg, #e0f2fe 0%, #f8fafc 50%, #dbeafe 100%);
    --gradient-text: linear-gradient(135deg, #0284c7 0%, #1d4ed8 100%);
    --shadow-sm: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
    --shadow-lg: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
    --shadow-glow: 0 0 20px rgba(0, 180, 216, 0.2);
}

/* Reset Base */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
    overflow-x: hidden;
}

body {
    font-family: var(--font-family);
    background-color: var(--bg-main);
    color: var(--text-main);
    line-height: 1.6;
    overflow-x: hidden;
    width: 100%;
    max-width: 100vw;
    transition: background-color 0.3s ease, color 0.3s ease;
}

/* Loader Inicial */
#page-loader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background: var(--bg-main);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    transition: opacity 0.5s ease, visibility 0.5s ease;
}

.spinner {
    width: 55px;
    height: 55px;
    border: 4px solid var(--border-color);
    border-top-color: var(--secondary);
    border-radius: 50%;
    animation: spin 1s infinite linear;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Typography & Utilities */
h1, h2, h3, h4, h5, h6 {
    font-weight: 700;
    line-height: 1.2;
    color: var(--text-main);
}

.gradient-text {
    background: var(--gradient-text);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.container {
    width: 100%;
    max-width: 1240px;
    margin: 0 auto;
    padding: 0 1.5rem;
    box-sizing: border-box;
}

.section-padding {
    padding: 6rem 0;
}

.text-center { text-align: center; }

.section-header {
    text-align: center;
    max-width: 750px;
    margin: 0 auto 4rem auto;
}

.badge-tag {
    display: inline-block;
    padding: 0.4rem 1.2rem;
    background: rgba(0, 240, 255, 0.1);
    color: var(--secondary);
    border: 1px solid rgba(0, 240, 255, 0.3);
    border-radius: 50px;
    font-size: 0.85rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 1rem;
}

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

.section-subtitle {
    font-size: 1.125rem;
    color: var(--text-muted);
}

/* Botones */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    padding: 0.875rem 2rem;
    font-size: 1rem;
    font-weight: 600;
    border-radius: var(--radius-sm);
    text-decoration: none;
    cursor: pointer;
    transition: var(--transition);
    border: 1px solid transparent;
}

.btn-primary {
    background: var(--gradient-primary);
    color: #070a12;
    font-weight: 700;
    box-shadow: var(--shadow-glow);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(0, 210, 255, 0.5);
    color: #000;
}

.btn-secondary {
    background: var(--bg-card);
    color: var(--text-main);
    border-color: var(--border-color);
}

.btn-secondary:hover {
    background: var(--bg-card-hover);
    border-color: var(--secondary);
    transform: translateY(-2px);
}

/* Sticky Header & Navbar */
.site-header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    max-width: 100vw;
    z-index: 1000;
    background: var(--bg-nav);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border-color);
    transition: var(--transition);
}

.nav-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 85px;
    box-sizing: border-box;
    width: 100%;
}

.brand-logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    text-decoration: none;
    color: var(--text-main);
    flex-shrink: 1;
    min-width: 0;
    overflow: hidden;
}

.brand-logo-img {
    height: 52px;
    width: auto;
    border-radius: 8px;
    box-shadow: var(--shadow-glow);
    transition: var(--transition);
    flex-shrink: 0;
}

.brand-logo-img:hover {
    transform: scale(1.03);
}

.brand-info {
    display: flex;
    flex-direction: column;
    min-width: 0;
    overflow: hidden;
}

.brand-name {
    font-size: 1.4rem;
    font-weight: 800;
    letter-spacing: -0.5px;
    line-height: 1.1;
    color: var(--text-main);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.brand-author {
    font-size: 0.72rem;
    color: var(--secondary);
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

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

.nav-link {
    color: var(--text-muted);
    text-decoration: none;
    font-weight: 500;
    font-size: 0.95rem;
    transition: var(--transition);
}

.nav-link:hover, .nav-link.active {
    color: var(--secondary);
}

.nav-actions {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-shrink: 0;
}

.theme-toggle-btn {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    color: var(--text-main);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    transition: var(--transition);
}

.theme-toggle-btn:hover {
    background: var(--bg-card-hover);
    border-color: var(--secondary);
    color: var(--secondary);
    transform: scale(1.05);
}

.mobile-toggle {
    display: none;
    background: none;
    border: none;
    color: var(--text-main);
    font-size: 1.5rem;
    cursor: pointer;
}

/* Hero Section */
.hero-section {
    position: relative;
    padding: 11rem 0 6rem 0;
    background: var(--gradient-hero);
    overflow: hidden;
}

.hero-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
}

.hero-content h1 {
    font-size: 3.25rem;
    letter-spacing: -1px;
    margin-bottom: 1.5rem;
}

.hero-subtitle {
    font-size: 1.25rem;
    color: var(--text-muted);
    margin-bottom: 2.5rem;
    line-height: 1.7;
}

.hero-buttons {
    display: flex;
    gap: 1.25rem;
    flex-wrap: wrap;
}

.hero-illustration {
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
}

.hero-logo-display {
    max-width: 450px;
    width: 100%;
    border-radius: 20px;
    box-shadow: 0 25px 50px -12px rgba(0, 210, 255, 0.25), 0 0 40px rgba(0, 180, 216, 0.3);
    border: 1px solid var(--border-color);
    transition: var(--transition);
}

.hero-logo-display:hover {
    transform: scale(1.02);
    box-shadow: 0 30px 60px -12px rgba(0, 240, 255, 0.4);
}

/* Cards (Servicios y Productos) */
.cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 2rem;
}

.card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 2.5rem 2rem;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.card:hover {
    transform: translateY(-8px);
    border-color: var(--secondary);
    box-shadow: var(--shadow-lg), var(--shadow-glow);
}

.card-icon {
    width: 60px;
    height: 60px;
    background: rgba(0, 240, 255, 0.1);
    color: var(--secondary);
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.75rem;
    margin-bottom: 1.5rem;
    border: 1px solid rgba(0, 240, 255, 0.2);
}

.card-title {
    font-size: 1.5rem;
    margin-bottom: 1rem;
}

.card-text {
    color: var(--text-muted);
    font-size: 0.975rem;
    margin-bottom: 1.5rem;
    flex-grow: 1;
}

.card-features {
    list-style: none;
    margin-bottom: 1.5rem;
}

.card-features li {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9rem;
    color: var(--text-muted);
    margin-bottom: 0.5rem;
}

.card-features li i {
    color: var(--secondary);
}

.card-badge {
    position: absolute;
    top: 1.5rem;
    right: 1.5rem;
    background: var(--gradient-primary);
    color: #070a12;
    font-size: 0.75rem;
    font-weight: 800;
    padding: 0.25rem 0.75rem;
    border-radius: 50px;
    text-transform: uppercase;
}

/* Sección Tecnologías */
.tech-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 1.25rem;
}

.tech-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 2rem 1.5rem;
    text-align: center;
    transition: var(--transition);
}

.tech-card:hover {
    transform: translateY(-5px);
    border-color: var(--secondary);
}

.tech-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.tech-icon.html5 { color: #e34f26; }
.tech-icon.css3 { color: #1572b6; }
.tech-icon.js { color: #f7df1e; }
.tech-icon.php { color: #777bb4; }
.tech-icon.mysql { color: #00758f; }

.tech-name {
    font-size: 1.25rem;
    margin-bottom: 0.5rem;
}

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

/* Sección Nosotros */
.about-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
}

.about-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 2.5rem;
}

/* Counter Stats */
.stats-section {
    background: var(--bg-card);
    border-top: 1px solid var(--border-color);
    border-bottom: 1px solid var(--border-color);
    padding: 4rem 0;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 2rem;
    text-align: center;
}

.stat-number {
    font-size: 3.5rem;
    font-weight: 800;
    color: var(--secondary);
    line-height: 1;
    margin-bottom: 0.5rem;
    text-shadow: 0 0 15px rgba(0, 240, 255, 0.4);
}

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

/* Testimonios Carousel */
.testimonials-wrapper {
    position: relative;
    max-width: 800px;
    margin: 0 auto;
    overflow: hidden;
}

.testimonial-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 3rem 2.5rem;
    text-align: center;
    display: none;
}

.testimonial-card.active {
    display: block;
    animation: fadeIn 0.5s ease-in-out;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.testimonial-quote {
    font-size: 1.15rem;
    font-style: italic;
    color: var(--text-main);
    margin-bottom: 2rem;
    line-height: 1.8;
}

.testimonial-author {
    font-weight: 700;
    font-size: 1.1rem;
}

.testimonial-company {
    font-size: 0.875rem;
    color: var(--secondary);
}

.slider-controls {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-top: 2rem;
}

.slider-btn {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    color: var(--text-main);
    width: 44px;
    height: 44px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
}

.slider-btn:hover {
    background: var(--primary);
    color: #000;
}

/* Formulario Contacto */
.contact-grid {
    display: grid;
    grid-template-columns: 1fr 1.5fr;
    gap: 3rem;
    align-items: start;
}

.contact-info-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 2.5rem;
}

.contact-info-item {
    display: flex;
    align-items: center;
    gap: 1.25rem;
    margin-bottom: 2rem;
}

.contact-info-icon {
    width: 50px;
    height: 50px;
    background: rgba(0, 240, 255, 0.15);
    color: var(--secondary);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.35rem;
}

.contact-form-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 3rem;
}

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

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

.form-label {
    display: block;
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-main);
}

.form-control {
    width: 100%;
    padding: 0.875rem 1.25rem;
    background: var(--bg-main);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    color: var(--text-main);
    font-size: 0.95rem;
    font-family: inherit;
    transition: var(--transition);
}

.form-control:focus {
    outline: none;
    border-color: var(--secondary);
    box-shadow: 0 0 0 3px rgba(0, 240, 255, 0.25);
}

select.form-control option {
    background: var(--bg-card);
    color: var(--text-main);
}

/* Footer */
.site-footer {
    background: var(--bg-card);
    border-top: 1px solid var(--border-color);
    padding: 5rem 0 2rem 0;
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1.5fr;
    gap: 3rem;
    margin-bottom: 4rem;
}

.footer-brand p {
    color: var(--text-muted);
    font-size: 0.95rem;
    margin: 1rem 0;
}

.footer-credits {
    font-size: 0.85rem;
    color: var(--secondary);
    font-weight: 600;
}

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

.footer-links {
    list-style: none;
}

.footer-links li {
    margin-bottom: 0.75rem;
}

.footer-links a {
    color: var(--text-muted);
    text-decoration: none;
    transition: var(--transition);
}

.footer-links a:hover {
    color: var(--secondary);
}

.social-links {
    display: flex;
    gap: 1rem;
    margin-top: 1.5rem;
}

.social-btn {
    width: 40px;
    height: 40px;
    background: var(--bg-main);
    border: 1px solid var(--border-color);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-main);
    text-decoration: none;
    transition: var(--transition);
}

.social-btn:hover {
    background: var(--primary);
    color: #000;
    transform: translateY(-3px);
}

.footer-bottom {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid var(--border-color);
    font-size: 0.875rem;
    color: var(--text-muted);
}

/* Back to Top Button */
.back-to-top {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    width: 48px;
    height: 48px;
    background: var(--gradient-primary);
    color: #070a12;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    box-shadow: var(--shadow-glow);
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transition: var(--transition);
    z-index: 900;
}

.back-to-top.active {
    opacity: 1;
    visibility: visible;
}

.back-to-top:hover {
    transform: translateY(-4px);
}

/* Responsive Media Queries */
@media (max-width: 992px) {
    .tech-grid {
        grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    }

    .hero-grid, .about-grid, .contact-grid {
        grid-template-columns: 1fr;
        gap: 3rem;
    }

    .footer-grid {
        grid-template-columns: 1fr 1fr;
    }

    .hero-content h1 {
        font-size: 2.5rem;
    }
}

@media (max-width: 768px) {
    .nav-container {
        height: 75px;
        padding: 0 1rem;
    }

    .brand-logo-img {
        height: 42px;
    }

    .brand-name {
        font-size: 1.15rem;
    }

    .brand-author {
        display: none;
    }

    .nav-menu {
        position: fixed;
        top: 75px;
        left: 0;
        width: 100vw;
        height: calc(100vh - 75px);
        background: #070a12;
        display: flex;
        flex-direction: column;
        justify-content: flex-start;
        align-items: center;
        padding-top: 3rem;
        gap: 1.5rem;
        z-index: 99999;
        opacity: 0;
        visibility: hidden;
        pointer-events: none;
        transform: translateY(-20px);
        transition: all 0.3s ease-in-out;
        border-top: 1px solid var(--border-color);
        box-shadow: 0 20px 40px rgba(0,0,0,0.8);
    }

    .nav-menu.active {
        opacity: 1 !important;
        visibility: visible !important;
        pointer-events: auto !important;
        transform: translateY(0) !important;
    }

    .nav-menu li {
        width: 100%;
        text-align: center;
    }

    .nav-link {
        display: block;
        font-size: 1.35rem;
        font-weight: 700;
        padding: 0.75rem 1.5rem;
        color: var(--text-main);
        border-radius: var(--radius-sm);
        transition: var(--transition);
    }

    .nav-link:hover, .nav-link.active {
        color: var(--secondary);
        background: rgba(0, 240, 255, 0.08);
    }

    .mobile-toggle {
        display: flex;
        align-items: center;
        justify-content: center;
        width: 44px;
        height: 44px;
        border-radius: 10px;
        background: var(--bg-card);
        border: 1px solid var(--border-color);
        color: var(--secondary);
        font-size: 1.25rem;
    }

    .btn-admin-nav span {
        display: none;
    }

    .hero-section {
        padding: 8rem 0 4rem 0;
    }

    .hero-content h1 {
        font-size: 2.25rem;
    }

    .hero-subtitle {
        font-size: 1.05rem;
    }

    .form-row {
        grid-template-columns: 1fr;
    }

    .footer-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 576px) {
    .nav-container {
        height: 70px;
        padding: 0 0.5rem;
    }

    .brand-logo {
        gap: 0.35rem;
    }

    .brand-logo-img {
        height: 34px;
    }

    .brand-name {
        font-size: 0.95rem;
    }

    .nav-actions {
        gap: 0.35rem;
    }

    .theme-toggle-btn {
        width: 36px;
        height: 36px;
        font-size: 0.9rem;
    }

    .btn-admin-nav {
        padding: 0.4rem 0.5rem !important;
        height: 36px;
        font-size: 0.8rem;
    }

    .mobile-toggle {
        width: 36px;
        height: 36px;
        font-size: 1.1rem;
    }

    .nav-menu {
        top: 70px;
        height: calc(100vh - 70px);
    }
}
