/* 
   SMG Soluciones Tecnológicas - Custom CSS Design System
   Aesthetics: Corporate, Modern, Precise, Premium
*/

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

/* Design Tokens & CSS Variables */
:root {
    --font-heading: 'Manrope', sans-serif;
    --font-body: 'Inter', sans-serif;

    /* Color Palette */
    --color-primary: #0B1F3A;         /* Dark Navy */
    --color-primary-rgb: 11, 31, 58;
    --color-secondary: #0059BB;       /* Corporate Blue */
    --color-secondary-rgb: 0, 89, 187;
    --color-accent: #007BFF;          /* Electric Blue Accent */
    --color-accent-rgb: 0, 123, 255;
    
    --color-bg-base: #F8F9FA;         /* Light Gray Page Background */
    --color-bg-card: #FFFFFF;         /* Pure White Card */
    
    /* Semantic Colors */
    --color-success: #10B981;
    --color-warning: #F59E0B;
    --color-error: #EF4444;

    /* Typography Hierarchy */
    --text-primary: #191C1D;
    --text-secondary: #44474D;
    --text-light: #FFFFFF;

    /* Borders & Roundness */
    --radius-sm: 4px;
    --radius-md: 10px;               /* Standard Corporate Soft Corner */
    --radius-lg: 16px;
    --radius-full: 9999px;

    /* Animations & Transitions */
    --transition-fast: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-normal: 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-slow: 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

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

html {
    scroll-behavior: smooth;
    font-size: 16px;
    background-color: var(--color-bg-base);
    color: var(--text-primary);
    font-family: var(--font-body);
    overflow-x: hidden;
}

body {
    min-height: 100vh;
    line-height: 1.6;
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    font-weight: 700;
    line-height: 1.25;
    color: var(--color-primary);
}

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

img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* Common Layout Components */
.container {
    width: 100%;
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 24px;
}

.section-padding {
    padding: 80px 0;
}

@media (max-width: 768px) {
    .section-padding {
        padding: 48px 0;
    }
}

/* Dynamic Glassmorphism Navigation Bar */
header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    transition: var(--transition-normal);
    background: transparent;
    padding: 24px 0;
}

header.scrolled,
header.header-solid {
    padding: 14px 0;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(12px);
    box-shadow: 0 4px 20px rgba(11, 31, 58, 0.06);
    border-bottom: 1px solid rgba(11, 31, 58, 0.05);
}

header.scrolled .nav-logo,
header.header-solid .nav-logo {
    color: var(--color-primary);
}

header.scrolled .nav-links a,
header.header-solid .nav-links a {
    color: var(--text-secondary);
}

header.scrolled .nav-links a:hover,
header.scrolled .nav-links a.active,
header.header-solid .nav-links a:hover,
header.header-solid .nav-links a.active {
    color: var(--color-secondary);
}

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

.nav-logo {
    font-family: var(--font-heading);
    font-weight: 800;
    font-size: 1.5rem;
    color: var(--color-primary);
    display: flex;
    align-items: center;
    gap: 8px;
    letter-spacing: -0.02em;
}

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

.nav-links {
    display: flex;
    list-style: none;
    gap: 32px;
    align-items: center;
}

.nav-links a {
    font-weight: 600;
    font-size: 0.95rem;
    color: var(--text-secondary);
    position: relative;
    padding: 4px 0;
}

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

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

.nav-links a:hover,
.nav-links a.active {
    color: var(--color-primary);
}

/* Call to Action Button inside Nav */
.btn-nav {
    background-color: var(--color-secondary);
    color: var(--text-light) !important;
    padding: 10px 20px !important;
    border-radius: var(--radius-md);
    font-size: 0.9rem !important;
}

.btn-nav::after {
    display: none !important;
}

.btn-nav:hover {
    background-color: var(--color-accent);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 123, 255, 0.3);
}

/* Mobile Menu Button */
.menu-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    color: var(--color-primary);
}

header.scrolled .menu-toggle {
    color: var(--text-light);
}

@media (max-width: 992px) {
    .menu-toggle {
        display: block;
        z-index: 1001; /* Stay above overlay */
    }
    
    .nav-links {
        position: fixed;
        top: 0;
        right: -100%; /* Slide out of view */
        width: 80%;
        max-width: 320px;
        height: 100vh;
        background-color: var(--color-primary);
        flex-direction: column;
        justify-content: center;
        align-items: center;
        padding: 80px 24px;
        gap: 28px;
        box-shadow: -10px 0 30px rgba(0,0,0,0.15);
        transition: var(--transition-normal);
        z-index: 1000;
    }
    
    .nav-links.open {
        right: 0; /* Slide into view */
    }
    
    .nav-links a {
        color: var(--text-light);
        width: 100%;
        text-align: center;
        padding: 12px 0;
        font-size: 1.15rem; /* Larger mobile touch target */
    }

    .nav-links a:hover {
        color: var(--color-accent);
    }

    /* Premium Overlay Backdrop */
    .nav-overlay {
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100vh;
        background: rgba(11, 31, 58, 0.4);
        backdrop-filter: blur(4px);
        z-index: 999;
        opacity: 0;
        pointer-events: none;
        transition: var(--transition-fast);
    }

    .nav-overlay.open {
        opacity: 1;
        pointer-events: auto;
    }
}

/* Responsive typography & Spacers */
@media (max-width: 768px) {
    html {
        font-size: 15px; /* Scaled down base for mobile readability */
    }

    .hero {
        padding: 120px 0 60px 0;
    }

    .hero-title {
        font-size: 2.2rem !important;
        line-height: 1.2;
    }

    .hero-desc {
        font-size: 1.05rem !important;
    }

    .section-title {
        font-size: 1.85rem !important;
    }

    .section-desc {
        font-size: 0.95rem !important;
    }

    .hero-btns {
        flex-direction: column;
        width: 100%;
        gap: 12px;
    }

    .hero-btns .btn {
        width: 100%;
    }

    .container {
        padding: 0 20px;
    }
}

/* Buttons with sweep / shine effect */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-family: var(--font-body);
    font-weight: 600;
    font-size: 1rem;
    padding: 14px 28px;
    border-radius: var(--radius-md);
    border: none;
    cursor: pointer;
    transition: var(--transition-normal);
    position: relative;
    overflow: hidden;
}

.btn-primary {
    background-color: var(--color-primary);
    color: var(--text-light);
    box-shadow: 0 4px 14px rgba(11, 31, 58, 0.2);
}

.btn-primary::before {
    content: '';
    position: absolute;
    top: 0;
    left: -150%;
    width: 50%;
    height: 100%;
    background: linear-gradient(
        to right,
        rgba(255, 255, 255, 0) 0%,
        rgba(255, 255, 255, 0.3) 50%,
        rgba(255, 255, 255, 0) 100%
    );
    transform: skewX(-25deg);
    transition: 0.75s;
}

.btn-primary:hover::before {
    left: 150%;
}

.btn-primary:hover {
    background-color: var(--color-secondary);
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(0, 89, 187, 0.3);
}

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

.btn-secondary:hover {
    background-color: var(--color-primary);
    color: var(--text-light);
    transform: translateY(-3px);
}

/* Premium Hero Section */
.hero {
    position: relative;
    padding: 160px 0 100px 0;
    background: radial-gradient(circle at 80% 20%, rgba(0, 89, 187, 0.08) 0%, rgba(248, 249, 250, 1) 70%);
    overflow: hidden;
}

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

@media (max-width: 992px) {
    .hero-grid {
        grid-template-columns: 1fr;
        text-align: center;
        gap: 32px;
    }
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background-color: rgba(0, 89, 187, 0.08);
    color: var(--color-secondary);
    padding: 8px 16px;
    border-radius: var(--radius-full);
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 24px;
    border: 1px solid rgba(0, 89, 187, 0.15);
}

.hero-badge i {
    font-size: 1rem;
}

.hero-title {
    font-size: 3.25rem;
    line-height: 1.15;
    letter-spacing: -0.02em;
    margin-bottom: 24px;
}

.hero-title span.gradient {
    background: linear-gradient(135deg, var(--color-primary) 30%, var(--color-secondary) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero-desc {
    font-size: 1.125rem;
    color: var(--text-secondary);
    margin-bottom: 32px;
    max-width: 540px;
}

@media (max-width: 992px) {
    .hero-desc {
        margin-left: auto;
        margin-right: auto;
    }
}

.hero-btns {
    display: flex;
    gap: 16px;
}

@media (max-width: 992px) {
    .hero-btns {
        justify-content: center;
    }
}

/* Glowing Dynamic Interactive Screen/Graphic */
.hero-graphic {
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
}

.hero-circle {
    position: absolute;
    width: 450px;
    height: 450px;
    background: radial-gradient(circle, rgba(0, 123, 255, 0.12) 0%, rgba(0, 123, 255, 0) 70%);
    border-radius: 50%;
    z-index: 1;
    animation: pulseGlow 8s infinite alternate ease-in-out;
}

@keyframes pulseGlow {
    0% { transform: scale(0.9); opacity: 0.6; }
    100% { transform: scale(1.1); opacity: 1; }
}

.hero-screen-container {
    position: relative;
    z-index: 2;
    background: rgba(255, 255, 255, 0.7);
    border: 1px solid rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(12px);
    border-radius: var(--radius-lg);
    padding: 16px;
    box-shadow: 0 20px 40px rgba(11, 31, 58, 0.12);
    width: 100%;
    max-width: 500px;
    transition: var(--transition-normal);
}

.hero-screen-container:hover {
    transform: translateY(-8px);
    box-shadow: 0 30px 60px rgba(11, 31, 58, 0.18);
}

/* Feature/Service Corporate Cards Grid */
.section-title-wrapper {
    text-align: center;
    max-width: 680px;
    margin: 0 auto 56px auto;
}

.section-tag {
    color: var(--color-secondary);
    font-size: 0.9rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-bottom: 12px;
    display: block;
}

.section-title {
    font-size: 2.25rem;
    margin-bottom: 16px;
    letter-spacing: -0.01em;
}

.section-desc {
    color: var(--text-secondary);
    font-size: 1.05rem;
}

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

/* Premium Card Design with Discrete Border Animation */
.card-premium {
    background-color: var(--color-bg-card);
    border-radius: var(--radius-md);
    padding: 40px 32px;
    border: 1px solid rgba(11, 31, 58, 0.05);
    box-shadow: 0 4px 12px rgba(11, 31, 58, 0.04);
    transition: var(--transition-normal);
    position: relative;
    overflow: hidden;
}

.card-premium::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background: linear-gradient(90deg, var(--color-secondary), var(--color-accent));
    transform: scaleX(0);
    transform-origin: left;
    transition: var(--transition-normal);
}

.card-premium:hover {
    transform: translateY(-8px);
    box-shadow: 0 16px 36px rgba(11, 31, 58, 0.1);
    border-color: rgba(11, 31, 58, 0.1);
}

.card-premium:hover::before {
    transform: scaleX(1);
}

.card-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 56px;
    height: 56px;
    background-color: rgba(0, 89, 187, 0.06);
    border-radius: var(--radius-md);
    color: var(--color-secondary);
    margin-bottom: 24px;
    transition: var(--transition-normal);
}

.card-premium:hover .card-icon {
    background-color: var(--color-secondary);
    color: var(--text-light);
    transform: scale(1.1);
}

.card-icon span {
    font-size: 28px;
}

.card-title {
    font-size: 1.35rem;
    margin-bottom: 16px;
}

.card-body-text {
    color: var(--text-secondary);
    font-size: 0.95rem;
    margin-bottom: 24px;
}

.card-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-weight: 600;
    color: var(--color-secondary);
    font-size: 0.95rem;
}

.card-premium:hover .card-link {
    color: var(--color-accent);
}

.card-link span.arrow {
    transition: var(--transition-fast);
}

.card-premium:hover .card-link span.arrow {
    transform: translateX(4px);
}

/* Statistics Counter Section */
.stats-section {
    background-color: var(--color-primary);
    color: var(--text-light);
    position: relative;
    overflow: hidden;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
    text-align: center;
}

@media (max-width: 992px) {
    .stats-grid {
        grid-template-columns: 1fr 1fr;
        gap: 40px;
    }
}

@media (max-width: 480px) {
    .stats-grid {
        grid-template-columns: 1fr;
    }
}

.stat-item h3 {
    color: var(--text-light);
    font-size: 3.5rem;
    margin-bottom: 8px;
    font-weight: 800;
    letter-spacing: -0.02em;
}

.stat-item p {
    color: rgba(255, 255, 255, 0.7);
    font-size: 1.05rem;
    font-weight: 500;
}

/* Interactive Tabs Component */
.tab-container {
    margin-top: 40px;
}

.tab-buttons {
    display: flex;
    justify-content: center;
    gap: 16px;
    margin-bottom: 40px;
    border-bottom: 1px solid rgba(11, 31, 58, 0.1);
    padding-bottom: 16px;
}

.tab-btn {
    background: none;
    border: none;
    font-family: var(--font-heading);
    font-weight: 600;
    font-size: 1.05rem;
    color: var(--text-secondary);
    padding: 8px 24px;
    cursor: pointer;
    position: relative;
    transition: var(--transition-fast);
}

.tab-btn::after {
    content: '';
    position: absolute;
    bottom: -18px;
    left: 0;
    width: 0;
    height: 3px;
    background-color: var(--color-secondary);
    transition: var(--transition-fast);
}

.tab-btn.active {
    color: var(--color-primary);
}

.tab-btn.active::after {
    width: 100%;
}

.tab-pane {
    display: none;
    animation: fadeInTab 0.5s ease-in-out forwards;
}

.tab-pane.active {
    display: block;
}

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

/* Scroll Reveal classes */
.reveal {
    opacity: 0;
    transition: var(--transition-slow);
}

.reveal-fade.reveal-active {
    opacity: 1;
}

.reveal-slide-up {
    transform: translateY(30px);
}

.reveal-slide-up.reveal-active {
    opacity: 1;
    transform: translateY(0);
}

.reveal-slide-left {
    transform: translateX(-40px);
}

.reveal-slide-left.reveal-active {
    opacity: 1;
    transform: translateX(0);
}

.reveal-slide-right {
    transform: translateX(40px);
}

.reveal-slide-right.reveal-active {
    opacity: 1;
    transform: translateX(0);
}

/* Footer Section */
footer {
    background-color: var(--color-primary);
    color: rgba(255, 255, 255, 0.75);
    padding: 80px 0 32px 0;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 48px;
    margin-bottom: 56px;
}

@media (max-width: 992px) {
    .footer-grid {
        grid-template-columns: 1fr 1fr;
        gap: 32px;
    }
}

@media (max-width: 480px) {
    .footer-grid {
        grid-template-columns: 1fr;
    }
}

.footer-info .logo {
    color: var(--text-light);
    margin-bottom: 24px;
}

.footer-info p {
    font-size: 0.95rem;
    margin-bottom: 24px;
    max-width: 320px;
}

.footer-socials {
    display: flex;
    gap: 16px;
}

.footer-social-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background-color: rgba(255, 255, 255, 0.05);
    border-radius: var(--radius-sm);
    color: var(--text-light);
    transition: var(--transition-fast);
}

.footer-social-link:hover {
    background-color: var(--color-secondary);
    color: var(--text-light);
    transform: translateY(-3px);
}

.footer-column h4 {
    color: var(--text-light);
    font-size: 1.1rem;
    margin-bottom: 24px;
}

.footer-column ul {
    list-style: none;
}

.footer-column ul li {
    margin-bottom: 12px;
}

.footer-column ul li a:hover {
    color: var(--color-accent);
    padding-left: 4px;
}

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    padding-top: 32px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.9rem;
}

@media (max-width: 768px) {
    .footer-bottom {
        flex-direction: column;
        gap: 16px;
        text-align: center;
    }
}
