/* ========================================
   SGC TECH AI - Beautification Enhancements 2025
   Premium UI/UX Improvements
   ======================================== */

/* ========== ENHANCED BUTTON STYLING ========== */

/* Primary CTA Buttons - Premium Hover Effects */
.cta-button,
.btn-primary,
.hero-cta,
.btn-nav-cta,
button[type="submit"],
.download-btn {
    position: relative;
    background: linear-gradient(135deg, #00FFF0 0%, #00d4c4 100%);
    color: #0c1e34;
    font-weight: 700;
    padding: 16px 32px;
    border-radius: 12px;
    border: none;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 16px rgba(0, 255, 240, 0.3);
    overflow: hidden;
    z-index: 1;
}

.cta-button::before,
.btn-primary::before,
.hero-cta::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #00FF88 0%, #00e676 100%);
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: -1;
}

.cta-button:hover,
.btn-primary:hover,
.hero-cta:hover,
.btn-nav-cta:hover,
button[type="submit"]:hover,
.download-btn:hover {
    transform: translateY(-3px) scale(1.02);
    box-shadow: 0 8px 24px rgba(0, 255, 240, 0.5);
}

.cta-button:hover::before,
.btn-primary:hover::before,
.hero-cta:hover::before {
    opacity: 1;
}

.cta-button:active,
.btn-primary:active,
.hero-cta:active {
    transform: translateY(-1px) scale(0.98);
    box-shadow: 0 2px 12px rgba(0, 255, 240, 0.4);
}

/* Secondary Button Styling */
.btn-secondary,
.btn-outline {
    background: transparent;
    color: #00FFF0;
    border: 2px solid #00FFF0;
    padding: 14px 30px;
    border-radius: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.btn-secondary::before,
.btn-outline::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: rgba(0, 255, 240, 0.1);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transition: width 0.6s ease, height 0.6s ease;
}

.btn-secondary:hover,
.btn-outline:hover {
    background: rgba(0, 255, 240, 0.15);
    border-color: #00FF88;
    color: #00FF88;
    box-shadow: 0 4px 16px rgba(0, 255, 240, 0.3);
}

.btn-secondary:hover::before,
.btn-outline:hover::before {
    width: 300px;
    height: 300px;
}

/* Button Loading State */
.btn-loading {
    pointer-events: none;
    opacity: 0.7;
    position: relative;
}

.btn-loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    margin-top: -10px;
    margin-left: -10px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-top-color: #fff;
    border-radius: 50%;
    animation: spinner 0.8s linear infinite;
}

@keyframes spinner {
    to { transform: rotate(360deg); }
}

/* ========== ENHANCED CARD DESIGNS ========== */

/* Base Card Style with Depth */
.service-card,
.feature-card,
.pricing-card,
.success-card,
.testimonial-card,
.stat-card,
.metric-card {
    background: rgba(255, 255, 255, 0.98);
    border-radius: 16px;
    padding: 32px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

/* Card Hover Effect with Lift */
.service-card:hover,
.feature-card:hover,
.pricing-card:hover,
.success-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.12),
                0 0 0 1px rgba(0, 255, 240, 0.1);
}

/* Card Accent Border on Hover */
.service-card::before,
.feature-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #00FFF0 0%, #00FF88 100%);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.service-card:hover::before,
.feature-card:hover::before {
    transform: scaleX(1);
}

/* Premium Stat Cards */
.stat-card,
.metric-card {
    background: linear-gradient(135deg, rgba(0, 255, 240, 0.05) 0%, rgba(0, 255, 136, 0.05) 100%);
    border: 1px solid rgba(0, 255, 240, 0.15);
    backdrop-filter: blur(10px);
}

.stat-card:hover,
.metric-card:hover {
    background: linear-gradient(135deg, rgba(0, 255, 240, 0.1) 0%, rgba(0, 255, 136, 0.1) 100%);
    border-color: rgba(0, 255, 240, 0.3);
}

/* Dark Background Card Variant */
.card-dark {
    background: rgba(12, 30, 52, 0.95);
    color: #ffffff;
    border: 1px solid rgba(0, 255, 240, 0.2);
}

.card-dark:hover {
    background: rgba(12, 30, 52, 1);
    border-color: rgba(0, 255, 240, 0.4);
}

/* ========== IMPROVED SPACING SYSTEM ========== */

/* Section Spacing */
section {
    padding: 80px 0;
}

section + section {
    margin-top: 0; /* Remove default margin, use padding instead */
}

/* Desktop: Larger spacing for premium feel */
@media (min-width: 1024px) {
    section {
        padding: 100px 0;
    }
}

/* Subsection spacing */
.section-content + .section-content {
    margin-top: 60px;
}

/* Card Grid Spacing */
.card-grid,
.service-grid,
.feature-grid {
    display: grid;
    gap: 32px;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}

@media (min-width: 768px) {
    .card-grid,
    .service-grid,
    .feature-grid {
        gap: 40px;
    }
}

/* Content Block Spacing */
.content-block + .content-block {
    margin-top: 48px;
}

/* ========== ENHANCED TYPOGRAPHY ========== */

/* Typography Scale - Golden Ratio Based */
h1, .h1 {
    font-size: clamp(36px, 5vw, 64px);
    font-weight: 800;
    line-height: 1.1;
    letter-spacing: -0.02em;
    margin-bottom: 24px;
}

h2, .h2 {
    font-size: clamp(28px, 4vw, 48px);
    font-weight: 700;
    line-height: 1.2;
    letter-spacing: -0.01em;
    margin-bottom: 20px;
}

h3, .h3 {
    font-size: clamp(22px, 3vw, 36px);
    font-weight: 700;
    line-height: 1.3;
    margin-bottom: 16px;
}

h4, .h4 {
    font-size: clamp(18px, 2.5vw, 28px);
    font-weight: 600;
    line-height: 1.4;
    margin-bottom: 12px;
}

/* Enhanced Paragraph Styling */
p.lead,
.hero-subtitle {
    font-size: clamp(18px, 2vw, 24px);
    line-height: 1.7;
    color: var(--slate-gray, #64748b);
    margin-bottom: 24px;
}

p {
    line-height: 1.7;
    margin-bottom: 16px;
}

/* Highlighted Text */
.text-highlight {
    color: #00FFF0;
    font-weight: 600;
}

.text-gradient {
    background: linear-gradient(135deg, #00FFF0 0%, #00FF88 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* ========== STRATEGIC COLOR ENHANCEMENTS ========== */

/* Cyan Accent on Key Metrics */
.metric-value,
.stat-value,
.number-highlight {
    color: #00FFF0;
    font-weight: 800;
    text-shadow: 0 0 20px rgba(0, 255, 240, 0.3);
}

/* Success/Achievement Green */
.success-indicator,
.achievement-badge {
    color: #00FF88;
    background: rgba(0, 255, 136, 0.1);
    padding: 4px 12px;
    border-radius: 20px;
    font-weight: 600;
    font-size: 14px;
}

/* Gradient Backgrounds */
.gradient-bg-cyan {
    background: linear-gradient(135deg, rgba(0, 255, 240, 0.1) 0%, rgba(0, 212, 196, 0.05) 100%);
}

.gradient-bg-dark {
    background: linear-gradient(180deg, #0c1e34 0%, #1e3a8a 100%);
}

/* ========== ENHANCED FORM INPUTS ========== */

/* Input Fields with Minimum Touch Target */
input[type="text"],
input[type="email"],
input[type="tel"],
input[type="number"],
textarea,
select {
    width: 100%;
    min-height: 48px; /* WCAG AAA compliance */
    padding: 14px 16px;
    font-size: 16px; /* Prevents zoom on mobile */
    border: 2px solid rgba(100, 116, 139, 0.2);
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.98);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    font-family: var(--font-primary, 'Inter', sans-serif);
}

input[type="text"]:focus,
input[type="email"]:focus,
input[type="tel"]:focus,
input[type="number"]:focus,
textarea:focus,
select:focus {
    outline: none;
    border-color: #00FFF0;
    box-shadow: 0 0 0 4px rgba(0, 255, 240, 0.1),
                0 4px 12px rgba(0, 0, 0, 0.08);
    background: #ffffff;
}

/* Input Error State */
input.error,
textarea.error,
select.error {
    border-color: #ff4444;
    box-shadow: 0 0 0 4px rgba(255, 68, 68, 0.1);
}

/* Input Success State */
input.success,
textarea.success,
select.success {
    border-color: #00FF88;
    box-shadow: 0 0 0 4px rgba(0, 255, 136, 0.1);
}

/* Textarea Specific */
textarea {
    min-height: 120px;
    resize: vertical;
}

/* ========== RESPONSIVE TABLES ========== */

/* Table Container with Scroll */
.table-responsive {
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    margin: 24px 0;
    border-radius: 12px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
}

table {
    width: 100%;
    border-collapse: collapse;
    background: white;
}

thead {
    background: linear-gradient(135deg, #0c1e34 0%, #1e3a8a 100%);
    color: white;
}

th {
    padding: 16px;
    text-align: left;
    font-weight: 700;
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

td {
    padding: 16px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

tr:hover {
    background: rgba(0, 255, 240, 0.03);
}

/* Mobile Table Stack */
@media (max-width: 767px) {
    .table-responsive table,
    .table-responsive thead,
    .table-responsive tbody,
    .table-responsive th,
    .table-responsive td,
    .table-responsive tr {
        display: block;
    }

    .table-responsive thead tr {
        position: absolute;
        top: -9999px;
        left: -9999px;
    }

    .table-responsive tr {
        margin-bottom: 16px;
        border: 1px solid rgba(0, 0, 0, 0.1);
        border-radius: 8px;
        background: white;
    }

    .table-responsive td {
        border: none;
        position: relative;
        padding-left: 50%;
    }

    .table-responsive td::before {
        content: attr(data-label);
        position: absolute;
        left: 16px;
        font-weight: 700;
        color: #0c1e34;
    }
}

/* ========== ENHANCED ACCESSIBILITY ========== */

/* Focus States - Keyboard Navigation */
*:focus-visible {
    outline: 3px solid #00FFF0;
    outline-offset: 3px;
    border-radius: 4px;
}

a:focus-visible,
button:focus-visible {
    outline: 3px solid #00FFF0;
    outline-offset: 4px;
}

/* Skip to Main Content */
.skip-to-main {
    position: absolute;
    top: -100px;
    left: 0;
    background: #00FFF0;
    color: #0c1e34;
    padding: 12px 24px;
    text-decoration: none;
    font-weight: 700;
    z-index: 10000;
    transition: top 0.3s ease;
    border-radius: 0 0 8px 0;
}

.skip-to-main:focus {
    top: 0;
}

/* High Contrast Mode Support */
@media (prefers-contrast: high) {
    .cta-button,
    .btn-primary {
        border: 2px solid #000000;
    }

    .card,
    .service-card,
    .feature-card {
        border: 2px solid #000000;
    }
}

/* Reduced Motion Support */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* ========== HERO SECTION ENHANCEMENTS ========== */

.hero-section,
.page-hero {
    position: relative;
    padding: 120px 0 80px;
    background: linear-gradient(180deg, #0c1e34 0%, #1e3a8a 100%);
    overflow: hidden;
}

/* Hero Background Pattern */
.hero-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image:
        radial-gradient(circle at 20% 30%, rgba(0, 255, 240, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 80% 70%, rgba(0, 255, 136, 0.1) 0%, transparent 50%);
    pointer-events: none;
}

.hero-content {
    position: relative;
    z-index: 2;
    text-align: center;
    max-width: 900px;
    margin: 0 auto;
}

.hero-content h1 {
    color: white;
    margin-bottom: 24px;
}

.hero-content .hero-subtitle {
    color: rgba(255, 255, 255, 0.85);
    font-size: 20px;
    line-height: 1.6;
    margin-bottom: 40px;
}

/* Hero Stats/Badges */
.hero-badges,
.hero-stats {
    display: flex;
    gap: 24px;
    justify-content: center;
    flex-wrap: wrap;
    margin-top: 40px;
}

.badge-item,
.hero-stat {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    padding: 16px 24px;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: white;
    font-weight: 600;
    transition: all 0.3s ease;
}

.badge-item:hover,
.hero-stat:hover {
    background: rgba(255, 255, 255, 0.15);
    border-color: rgba(0, 255, 240, 0.5);
    transform: translateY(-2px);
}

/* ========== MICRO-INTERACTIONS ========== */

/* Smooth Underline Effect for Links */
.text-link {
    position: relative;
    color: #00FFF0;
    text-decoration: none;
}

.text-link::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 100%;
    height: 2px;
    background: #00FFF0;
    transform: scaleX(0);
    transform-origin: right;
    transition: transform 0.3s ease;
}

.text-link:hover::after {
    transform: scaleX(1);
    transform-origin: left;
}

/* Icon Animations */
.icon-rotate:hover {
    animation: rotate-icon 0.6s ease-in-out;
}

@keyframes rotate-icon {
    0%, 100% { transform: rotate(0deg); }
    50% { transform: rotate(180deg); }
}

.icon-pulse {
    animation: pulse-icon 2s ease-in-out infinite;
}

@keyframes pulse-icon {
    0%, 100% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.1); opacity: 0.8; }
}

/* ========== UTILITY CLASSES ========== */

/* Spacing Utilities */
.mt-sm { margin-top: 16px; }
.mt-md { margin-top: 32px; }
.mt-lg { margin-top: 48px; }
.mt-xl { margin-top: 64px; }

.mb-sm { margin-bottom: 16px; }
.mb-md { margin-bottom: 32px; }
.mb-lg { margin-bottom: 48px; }
.mb-xl { margin-bottom: 64px; }

.pt-sm { padding-top: 16px; }
.pt-md { padding-top: 32px; }
.pt-lg { padding-top: 48px; }
.pt-xl { padding-top: 64px; }

.pb-sm { padding-bottom: 16px; }
.pb-md { padding-bottom: 32px; }
.pb-lg { padding-bottom: 48px; }
.pb-xl { padding-bottom: 64px; }

/* Text Alignment */
.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }

/* Display Utilities */
.flex { display: flex; }
.flex-center { display: flex; justify-content: center; align-items: center; }
.flex-between { display: flex; justify-content: space-between; align-items: center; }
.flex-column { display: flex; flex-direction: column; }

/* Shadow Utilities */
.shadow-sm { box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08); }
.shadow-md { box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12); }
.shadow-lg { box-shadow: 0 8px 32px rgba(0, 0, 0, 0.16); }
.shadow-cyan { box-shadow: 0 0 20px rgba(0, 255, 240, 0.3); }

/* Border Radius Utilities */
.rounded-sm { border-radius: 8px; }
.rounded-md { border-radius: 12px; }
.rounded-lg { border-radius: 16px; }
.rounded-xl { border-radius: 24px; }
.rounded-full { border-radius: 9999px; }
