/**
 * NSEMM Flexible Shortcodes CSS
 * Works better within WordPress blocks of different sizes
 */

/* CSS Variables */
:root {
    --nsemm-primary: #1C3B70;
    --nsemm-secondary: #FACD00;
    --nsemm-accent: #00FACD;
    --nsemm-pink: #FA00CD;
    --nsemm-green: #D9FFEC;
    --nsemm-dark: #2B2A2A;
    --nsemm-light: #E1E1E1;
}

/* Base Countup Styles - Flexible Container */
.nsemm-countup-container {
    display: inline-block;
    font-family: 'Sora', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    font-weight: 700;
    transition: all 0.3s ease;
    line-height: 1.2;
}

/* Block Style - Traditional card-like appearance */
.nsemm-countup-block {
    display: block;
    text-align: center;
    padding: 1.5rem 1rem;
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(28, 59, 112, 0.08);
    border: 2px solid var(--nsemm-secondary);
    margin: 1rem 0;
}

.nsemm-countup-block:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 30px rgba(28, 59, 112, 0.12);
}

.nsemm-countup-block .nsemm-countup-number {
    display: block;
    color: var(--nsemm-primary);
    margin-bottom: 0.5rem;
}

.nsemm-countup-block .nsemm-countup-label {
    display: block;
    font-size: 0.875rem;
    color: var(--nsemm-dark);
    font-weight: 600;
    margin-top: 0.5rem;
}

/* Inline Style - Works within text */
.nsemm-countup-inline {
    display: inline;
    background: var(--nsemm-secondary);
    color: var(--nsemm-primary);
    padding: 0.25rem 0.5rem;
    border-radius: 6px;
    font-weight: 700;
    margin: 0 0.25rem;
}

.nsemm-countup-inline .nsemm-countup-number {
    display: inline;
}

.nsemm-countup-inline .nsemm-countup-label {
    display: none; /* Hide labels in inline mode */
}

/* Compact Style - Minimal footprint */
.nsemm-countup-compact {
    display: inline-block;
    text-align: center;
    padding: 0.5rem;
    background: transparent;
    border-bottom: 3px solid var(--nsemm-secondary);
}

.nsemm-countup-compact .nsemm-countup-number {
    display: block;
    color: var(--nsemm-primary);
    margin-bottom: 0.25rem;
}

.nsemm-countup-compact .nsemm-countup-label {
    display: block;
    font-size: 0.75rem;
    color: var(--nsemm-dark);
    font-weight: 500;
}

/* Size Variations */
.nsemm-size-small .nsemm-countup-number {
    font-size: 1.5rem;
}

.nsemm-size-small .nsemm-countup-label {
    font-size: 0.75rem;
}

.nsemm-size-medium .nsemm-countup-number {
    font-size: 2.5rem;
}

.nsemm-size-medium .nsemm-countup-label {
    font-size: 0.875rem;
}

.nsemm-size-large .nsemm-countup-number {
    font-size: 3.5rem;
}

.nsemm-size-large .nsemm-countup-label {
    font-size: 1rem;
}

.nsemm-size-xlarge .nsemm-countup-number {
    font-size: 4.5rem;
}

.nsemm-size-xlarge .nsemm-countup-label {
    font-size: 1.125rem;
}

/* Alignment */
.nsemm-align-left {
    text-align: left;
}

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

.nsemm-align-right {
    text-align: right;
}

/* Countup Value Animation */
.nsemm-countup-value {
    display: inline-block;
    transition: all 0.3s ease;
    color: inherit;
}

.nsemm-countup-value.nsemm-animated {
    color: var(--nsemm-secondary);
}

.nsemm-countup-value.nsemm-complete {
    animation: nsemm-pulse-once 0.5s ease;
}

/* Inline Counter - Minimal style for use within text */
.nsemm-inline-counter {
    display: inline;
    font-weight: 700;
    color: var(--nsemm-primary);
    background: var(--nsemm-green);
    padding: 0.125rem 0.375rem;
    border-radius: 4px;
    font-size: 1em;
}

/* Inline Stat Styles */
.nsemm-inline-stat {
    display: inline-block;
    font-family: 'Sora', sans-serif;
    margin: 0.25rem;
}

.nsemm-stat-minimal {
    font-weight: 700;
    color: var(--nsemm-primary);
}

.nsemm-stat-card {
    background: white;
    padding: 1rem;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(28, 59, 112, 0.08);
    border-left: 4px solid var(--nsemm-secondary);
}

.nsemm-stat-highlight {
    background: var(--nsemm-secondary);
    color: var(--nsemm-primary);
    padding: 0.5rem 1rem;
    border-radius: 25px;
    font-weight: 700;
}

.nsemm-stat-value {
    font-weight: 700;
    font-size: 1.2em;
}

.nsemm-stat-label {
    font-size: 0.875rem;
    color: var(--nsemm-dark);
    font-weight: 500;
    margin-left: 0.5rem;
}

/* Hero Section Updates */
.nsemm-hero-section {
    background: linear-gradient(135deg, #ffffff 0%, var(--nsemm-green) 100%);
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    margin: 2rem 0;
    padding: 3rem 0;
}

.nsemm-height-small {
    min-height: 300px;
    padding: 2rem 0;
}

.nsemm-height-medium {
    min-height: 500px;
    padding: 3rem 0;
}

.nsemm-height-large {
    min-height: 700px;
    padding: 4rem 0;
}

.nsemm-height-full {
    min-height: 100vh;
    padding: 4rem 0;
}

.nsemm-hero-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    align-items: center;
    position: relative;
    z-index: 2;
}

.nsemm-hero-title {
    font-family: 'Sora', sans-serif;
    font-size: clamp(2rem, 5vw, 3.5rem);
    font-weight: 800;
    color: var(--nsemm-dark);
    margin-bottom: 1.5rem;
    line-height: 1.2;
}

.nsemm-hero-subtitle {
    font-size: clamp(1rem, 2.5vw, 1.2rem);
    color: var(--nsemm-primary);
    margin-bottom: 2rem;
    font-weight: 500;
    line-height: 1.6;
}

.nsemm-hero-star {
    display: inline-block;
    margin-left: 1rem;
    position: relative;
    width: 30px;
    height: 30px;
    vertical-align: middle;
    transform: translateY(-3px);
    animation: nsemm-twinkle 2s ease-in-out infinite;
    filter: drop-shadow(0 0 8px rgba(250, 205, 0, 0.4));
    cursor: pointer;
    transition: all 0.3s ease;
}

.nsemm-hero-star:hover {
    transform: translateY(-3px) scale(1.2);
    filter: drop-shadow(0 0 12px rgba(250, 205, 0, 0.6));
}

/* Button Styles */
.nsemm-btn {
    display: inline-block;
    padding: 0.875rem 2rem;
    border-radius: 25px;
    font-family: 'Sora', sans-serif;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s ease;
    border: 2px solid transparent;
    cursor: pointer;
    font-size: 1rem;
    margin: 0.25rem;
}

.nsemm-btn-primary {
    background: var(--nsemm-secondary);
    color: var(--nsemm-primary);
}

.nsemm-btn-primary:hover {
    background: var(--nsemm-primary);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(28, 59, 112, 0.3);
}

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

.nsemm-btn-secondary:hover {
    background: var(--nsemm-primary);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(28, 59, 112, 0.3);
}

/* Stats Section Updates */
.nsemm-stats-section {
    background: white;
    padding: 3rem 0;
    margin: 2rem 0;
}

.nsemm-stats-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

.nsemm-stats-header {
    text-align: center;
    margin-bottom: 3rem;
}

.nsemm-stats-title {
    font-family: 'Sora', sans-serif;
    font-size: clamp(1.8rem, 4vw, 2.5rem);
    font-weight: 700;
    color: var(--nsemm-dark);
    margin-bottom: 1rem;
}

.nsemm-stats-subtitle {
    color: var(--nsemm-primary);
    font-size: clamp(1rem, 2vw, 1.1rem);
    font-weight: 500;
}

/* Layout Options */
.nsemm-layout-grid .nsemm-stats-grid {
    display: grid;
    gap: 2rem;
}

.nsemm-layout-row .nsemm-stats-grid {
    display: flex;
    gap: 2rem;
    overflow-x: auto;
}

.nsemm-layout-column .nsemm-stats-grid {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

/* Column Controls */
.nsemm-columns-1 .nsemm-stats-grid {
    grid-template-columns: 1fr;
}

.nsemm-columns-2 .nsemm-stats-grid {
    grid-template-columns: repeat(2, 1fr);
}

.nsemm-columns-3 .nsemm-stats-grid {
    grid-template-columns: repeat(3, 1fr);
}

.nsemm-columns-4 .nsemm-stats-grid {
    grid-template-columns: repeat(4, 1fr);
}

.nsemm-columns-auto .nsemm-stats-grid {
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
}

/* Stat Card Styles */
.nsemm-stat-card {
    background: white;
    padding: 2rem 1.5rem;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(28, 59, 112, 0.08);
    border: 2px solid var(--nsemm-secondary);
    transition: all 0.3s ease;
    text-align: center;
    opacity: 0;
    transform: translateY(30px);
}

.nsemm-stat-card.nsemm-revealed {
    opacity: 1;
    transform: translateY(0);
}

.nsemm-stat-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 30px rgba(28, 59, 112, 0.12);
}

.nsemm-stat-number {
    font-family: 'Sora', sans-serif;
    font-size: clamp(2rem, 4vw, 3rem);
    font-weight: 800;
    color: var(--nsemm-primary);
    display: block;
    margin-bottom: 0.75rem;
}

.nsemm-stat-label {
    font-size: 0.875rem;
    color: var(--nsemm-dark);
    font-weight: 600;
}

/* Style Variations */
.nsemm-style-minimal .nsemm-stat-card {
    background: transparent;
    box-shadow: none;
    border: none;
    border-bottom: 3px solid var(--nsemm-secondary);
    border-radius: 0;
    padding: 1rem 0.5rem;
}

.nsemm-style-highlight .nsemm-stat-card {
    background: var(--nsemm-green);
    border-color: var(--nsemm-accent);
}

/* Services Section Updates */
.nsemm-services-section {
    background: var(--nsemm-green);
    padding: 4rem 0;
    position: relative;
    overflow: hidden;
    margin: 2rem 0;
}

.nsemm-services-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
    position: relative;
    z-index: 2;
}

.nsemm-services-header {
    text-align: center;
    margin-bottom: 3rem;
}

.nsemm-services-title {
    font-family: 'Sora', sans-serif;
    font-size: clamp(1.8rem, 4vw, 2.5rem);
    font-weight: 700;
    color: var(--nsemm-dark);
    margin-bottom: 1rem;
}

.nsemm-services-subtitle {
    color: var(--nsemm-primary);
    font-size: clamp(1rem, 2vw, 1.2rem);
    font-weight: 500;
}

.nsemm-services-grid {
    display: grid;
    gap: 2rem;
}

/* Services Layout Options */
.nsemm-layout-grid.nsemm-columns-auto .nsemm-services-grid {
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}

.nsemm-layout-carousel .nsemm-services-grid {
    display: flex;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    gap: 1.5rem;
    padding-bottom: 1rem;
}

.nsemm-layout-carousel .nsemm-service-card {
    flex: 0 0 300px;
    scroll-snap-align: start;
}

.nsemm-layout-list .nsemm-services-grid {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

/* Service Card Styles */
.nsemm-service-card {
    background: white;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 6px 25px rgba(28, 59, 112, 0.1);
    transition: all 0.3s ease;
    position: relative;
    opacity: 0;
    transform: translateY(50px);
    cursor: pointer;
}

.nsemm-service-card.nsemm-revealed {
    opacity: 1;
    transform: translateY(0);
}

.nsemm-service-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 35px rgba(28, 59, 112, 0.15);
}

/* Card Style Variations */
.nsemm-card-minimal .nsemm-service-card {
    background: transparent;
    box-shadow: none;
    border: 2px solid var(--nsemm-accent);
    border-radius: 8px;
}

.nsemm-card-compact .nsemm-service-card {
    border-radius: 8px;
}

.nsemm-card-compact .nsemm-service-image {
    height: 120px;
}

.nsemm-card-compact .nsemm-service-content {
    padding: 1rem;
}

/* Animations */
@keyframes nsemm-twinkle {
    0%, 100% {
        opacity: 1;
        transform: scale(1);
    }
    50% {
        opacity: 0.7;
        transform: scale(1.2);
    }
}

@keyframes nsemm-pulse-once {
    0% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.1);
    }
    100% {
        transform: scale(1);
    }
}

/* Responsive Design */
@media (max-width: 768px) {
    .nsemm-hero-container {
        grid-template-columns: 1fr;
        gap: 2rem;
        text-align: center;
    }

    .nsemm-countup-block {
        padding: 1rem 0.75rem;
        margin: 0.5rem 0;
    }

    .nsemm-layout-grid .nsemm-stats-grid,
    .nsemm-layout-grid .nsemm-services-grid {
        grid-template-columns: 1fr;
    }

    .nsemm-layout-row .nsemm-stats-grid {
        flex-direction: column;
    }

    .nsemm-size-large .nsemm-countup-number,
    .nsemm-size-xlarge .nsemm-countup-number {
        font-size: 2.5rem;
    }
}

@media (max-width: 480px) {
    .nsemm-hero-section,
    .nsemm-stats-section,
    .nsemm-services-section {
        padding: 2rem 0;
    }

    .nsemm-stats-container,
    .nsemm-services-container,
    .nsemm-hero-container {
        padding: 0 1rem;
    }

    .nsemm-countup-block {
        padding: 0.75rem 0.5rem;
    }

    .nsemm-btn {
        padding: 0.75rem 1.5rem;
        font-size: 0.875rem;
    }
}

/* Accessibility */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* High contrast mode */
@media (prefers-contrast: high) {
    .nsemm-countup-block,
    .nsemm-stat-card,
    .nsemm-service-card {
        border-width: 3px;
    }

    .nsemm-btn {
        border-width: 3px;
    }
}

/* Dark mode support */
