/* ==========================================================================
   SmartCM Frontend Theme — Default
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. CSS Custom Properties
   -------------------------------------------------------------------------- */
:root {
    --scmf-primary:        #3b82f6;
    --scmf-primary-hover:  #2563eb;
    --scmf-primary-light:  #dbeafe;
    --scmf-secondary:      #6366f1;
    --scmf-accent:         #8b5cf6;

    --scmf-dark:           #0f172a;
    --scmf-body-bg:        #ffffff;
    --scmf-section-alt:    #f8fafc;

    --scmf-text:           #334155;
    --scmf-text-dark:      #0f172a;
    --scmf-text-muted:     #64748b;
    --scmf-text-light:     #94a3b8;

    --scmf-border-color:   #e2e8f0;

    --scmf-radius:         0.5rem;
    --scmf-radius-lg:      1rem;
    --scmf-radius-xl:      1.5rem;

    --scmf-shadow:         0 1px 3px rgba(0, 0, 0, 0.06), 0 1px 2px rgba(0, 0, 0, 0.04);
    --scmf-shadow-md:      0 4px 12px rgba(0, 0, 0, 0.08);
    --scmf-shadow-lg:      0 12px 32px rgba(0, 0, 0, 0.1);

    --scmf-transition:     all 0.3s ease;
    --scmf-font-family:    'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

/* --------------------------------------------------------------------------
   2. Base
   -------------------------------------------------------------------------- */
html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--scmf-font-family);
    font-size: 1rem;
    line-height: 1.7;
    color: var(--scmf-text);
    background-color: var(--scmf-body-bg);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

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

a:hover {
    color: var(--scmf-primary-hover);
}

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

/* --------------------------------------------------------------------------
   3. Typography
   -------------------------------------------------------------------------- */
h1, h2, h3, h4, h5, h6 {
    color: var(--scmf-text-dark);
    font-weight: 700;
    line-height: 1.3;
}

.section-title {
    font-size: 2rem;
    font-weight: 800;
    margin-bottom: 0.75rem;
}

.section-subtitle {
    font-size: 1.125rem;
    color: var(--scmf-text-muted);
    max-width: 600px;
}

/* --------------------------------------------------------------------------
   4. Header / Navbar
   -------------------------------------------------------------------------- */
.scmf-header {
    background-color: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--scmf-border-color);
    transition: box-shadow 0.3s ease;
    z-index: 1050;
}

.scmf-header.scrolled {
    box-shadow: var(--scmf-shadow-md);
}

.scmf-header .navbar-brand {
    font-weight: 800;
    font-size: 1.375rem;
    color: var(--scmf-text-dark);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.scmf-header .navbar-brand .brand-icon {
    width: 36px;
    height: 36px;
    background: linear-gradient(135deg, var(--scmf-primary), var(--scmf-secondary));
    border-radius: var(--scmf-radius);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 0.875rem;
}

.scmf-header .nav-link {
    font-size: 0.9375rem;
    font-weight: 500;
    color: var(--scmf-text);
    padding: 0.5rem 1rem !important;
    border-radius: var(--scmf-radius);
    transition: var(--scmf-transition);
}

.scmf-header .nav-link:hover,
.scmf-header .nav-link:focus-visible {
    color: var(--scmf-primary);
    background-color: var(--scmf-primary-light);
}

.scmf-header .nav-link.active {
    color: var(--scmf-primary);
    font-weight: 600;
}

.scmf-header .navbar-toggler {
    border: none;
    padding: 0.5rem;
    font-size: 1.25rem;
    color: var(--scmf-text-dark);
}

.scmf-header .navbar-toggler:focus {
    box-shadow: none;
}

/* --------------------------------------------------------------------------
   5. Hero Section
   -------------------------------------------------------------------------- */
.scmf-hero {
    background: linear-gradient(135deg, var(--scmf-dark) 0%, #1e293b 100%);
    color: #fff;
    padding: 5rem 0 4rem;
    position: relative;
    overflow: hidden;
}

.scmf-hero::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -20%;
    width: 80%;
    height: 200%;
    background: radial-gradient(ellipse, rgba(99, 102, 241, 0.15) 0%, transparent 70%);
    pointer-events: none;
}

.min-vh-50 {
    min-height: 50vh;
}

.scmf-hero-title {
    font-size: 3rem;
    font-weight: 800;
    line-height: 1.15;
    margin-bottom: 1rem;
    color: #fff;
}

.scmf-hero-subtitle {
    font-size: 1.25rem;
    color: #cbd5e1;
    line-height: 1.6;
    max-width: 540px;
}

@media (max-width: 767.98px) {
    .scmf-hero {
        padding: 3rem 0 2.5rem;
    }

    .scmf-hero-title {
        font-size: 2rem;
    }

    .scmf-hero-subtitle {
        font-size: 1.0625rem;
    }
}

/* --------------------------------------------------------------------------
   6. Section Spacing
   -------------------------------------------------------------------------- */
.scmf-section {
    padding: 5rem 0;
}

.scmf-section-alt {
    background-color: var(--scmf-section-alt);
}

@media (max-width: 767.98px) {
    .scmf-section {
        padding: 3rem 0;
    }
}

/* --------------------------------------------------------------------------
   7. Cards / Features
   -------------------------------------------------------------------------- */
.scmf-card {
    background: var(--scmf-body-bg);
    border: 1px solid var(--scmf-border-color);
    border-radius: var(--scmf-radius-lg);
    padding: 2rem;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    height: 100%;
}

.scmf-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--scmf-shadow-lg);
}

.scmf-card .card-icon {
    width: 56px;
    height: 56px;
    border-radius: var(--scmf-radius);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    margin-bottom: 1.25rem;
    background: var(--scmf-primary-light);
    color: var(--scmf-primary);
}

.scmf-card .card-title {
    font-size: 1.125rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.scmf-card .card-text {
    color: var(--scmf-text-muted);
    font-size: 0.9375rem;
    line-height: 1.7;
}

/* Feature grid */
.scmf-feature-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
}

/* --------------------------------------------------------------------------
   8. Footer
   -------------------------------------------------------------------------- */
.scmf-footer {
    background-color: var(--scmf-dark);
    color: #94a3b8;
    padding: 4rem 0 0;
}

.scmf-footer h5,
.scmf-footer h6 {
    color: #fff;
    font-weight: 600;
    font-size: 1rem;
    margin-bottom: 1.25rem;
}

.scmf-footer p {
    font-size: 0.9375rem;
    line-height: 1.7;
}

.scmf-footer-links {
    list-style: none;
    padding: 0;
    margin: 0;
}

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

.scmf-footer-links a {
    color: #94a3b8;
    font-size: 0.9375rem;
    transition: var(--scmf-transition);
}

.scmf-footer-links a:hover {
    color: #fff;
    padding-left: 4px;
}

.scmf-footer .social-icons a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.08);
    color: #94a3b8;
    font-size: 0.9375rem;
    transition: var(--scmf-transition);
    margin-right: 0.5rem;
}

.scmf-footer .social-icons a:hover {
    background: var(--scmf-primary);
    color: #fff;
    transform: translateY(-2px);
}

.scmf-footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    padding: 1.5rem 0;
    margin-top: 3rem;
    font-size: 0.875rem;
}

.scmf-footer .newsletter-form .form-control {
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.12);
    color: #fff;
    border-radius: var(--scmf-radius) 0 0 var(--scmf-radius);
    font-size: 0.875rem;
    padding: 0.6rem 1rem;
}

.scmf-footer .newsletter-form .form-control::placeholder {
    color: #64748b;
}

.scmf-footer .newsletter-form .form-control:focus {
    background: rgba(255, 255, 255, 0.12);
    border-color: var(--scmf-primary);
    box-shadow: none;
}

.scmf-footer .newsletter-form .btn {
    border-radius: 0 var(--scmf-radius) var(--scmf-radius) 0;
}

/* --------------------------------------------------------------------------
   9. Cookie Consent Banner
   -------------------------------------------------------------------------- */
.scmf-cookie-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: var(--scmf-dark);
    color: #cbd5e1;
    z-index: 9999;
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.2);
    animation: slideUp 0.4s ease-out;
}

@keyframes slideUp {
    from { transform: translateY(100%); }
    to   { transform: translateY(0); }
}

/* --------------------------------------------------------------------------
   10. Back to Top Button
   -------------------------------------------------------------------------- */
.scmf-back-to-top {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    width: 44px;
    height: 44px;
    border: none;
    border-radius: 50%;
    background: var(--scmf-primary);
    color: #fff;
    font-size: 1rem;
    cursor: pointer;
    z-index: 1040;
    box-shadow: var(--scmf-shadow-md);
    transition: var(--scmf-transition);
    display: flex;
    align-items: center;
    justify-content: center;
}

.scmf-back-to-top:hover {
    background: var(--scmf-primary-hover);
    transform: translateY(-3px);
    box-shadow: var(--scmf-shadow-lg);
}

/* --------------------------------------------------------------------------
   11. Buttons (theme overrides)
   -------------------------------------------------------------------------- */
.btn-primary {
    background-color: var(--scmf-primary);
    border-color: var(--scmf-primary);
    font-weight: 500;
    border-radius: var(--scmf-radius);
    padding: 0.6rem 1.5rem;
}

.btn-primary:hover,
.btn-primary:focus-visible {
    background-color: var(--scmf-primary-hover);
    border-color: var(--scmf-primary-hover);
    box-shadow: 0 4px 14px rgba(59, 130, 246, 0.4);
}

.btn-outline-primary {
    color: var(--scmf-primary);
    border-color: var(--scmf-primary);
    border-radius: var(--scmf-radius);
    font-weight: 500;
}

.btn-outline-primary:hover {
    background-color: var(--scmf-primary);
    border-color: var(--scmf-primary);
}

.btn-lg {
    font-size: 1rem;
    padding: 0.75rem 2rem;
    border-radius: var(--scmf-radius);
}

/* --------------------------------------------------------------------------
   12. Forms (frontend)
   -------------------------------------------------------------------------- */
.form-control,
.form-select {
    border-radius: var(--scmf-radius);
    border-color: var(--scmf-border-color);
    padding: 0.625rem 1rem;
    font-size: 0.9375rem;
    transition: var(--scmf-transition);
}

.form-control:focus,
.form-select:focus {
    border-color: var(--scmf-primary);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.15);
}

/* --------------------------------------------------------------------------
   13. Lazy Load placeholder
   -------------------------------------------------------------------------- */
img[data-src] {
    opacity: 0;
    transition: opacity 0.4s ease;
}

img[data-src].loaded {
    opacity: 1;
}

/* --------------------------------------------------------------------------
   14. Responsive
   -------------------------------------------------------------------------- */
@media (max-width: 991.98px) {
    .section-title {
        font-size: 1.625rem;
    }

    .scmf-footer {
        padding: 3rem 0 0;
    }
}

@media (max-width: 575.98px) {
    .scmf-back-to-top {
        bottom: 1rem;
        right: 1rem;
        width: 38px;
        height: 38px;
        font-size: 0.875rem;
    }

    .scmf-cookie-banner p {
        font-size: 0.8125rem;
    }
}

/* --------------------------------------------------------------------------
   15. Utilities
   -------------------------------------------------------------------------- */
.text-gradient {
    background: linear-gradient(135deg, var(--scmf-primary), var(--scmf-secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.divider {
    width: 60px;
    height: 4px;
    background: linear-gradient(90deg, var(--scmf-primary), var(--scmf-secondary));
    border-radius: 2px;
    margin: 1rem 0;
}

.overlay-dark {
    position: relative;
}

.overlay-dark::before {
    content: '';
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1;
}

.overlay-dark > * {
    position: relative;
    z-index: 2;
}

/* --------------------------------------------------------------------------
   16. Print
   -------------------------------------------------------------------------- */
@media print {
    .scmf-header,
    .scmf-footer,
    .scmf-cookie-banner,
    .scmf-back-to-top {
        display: none !important;
    }
}
