/* ==========================================================================
   Pipeline & Processing Engineering - Main Styles
   Professional website for Oil & Gas Engineers
   ========================================================================== */

/* Root Variables */
:root {
    /* Colors */
    --primary: #2196F3;
    --primary-dark: #1976D2;
    --primary-light: #BBDEFB;
    --secondary: #00BCD4;
    --success: #4CAF50;
    --warning: #FF9800;
    --danger: #F44336;
    --dark: #0A1929;
    --dark-800: #1E2A3A;
    --dark-700: #2D3E50;
    --dark-600: #3D4F61;
    --light: #F5F7FA;
    --white: #FFFFFF;

    /* Typography */
    --font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    --font-size-base: 16px;
    --line-height-base: 1.6;

    /* Spacing */
    --spacing-xs: 0.5rem;
    --spacing-sm: 1rem;
    --spacing-md: 1.5rem;
    --spacing-lg: 2rem;
    --spacing-xl: 3rem;
    --spacing-2xl: 4rem;
    --spacing-3xl: 6rem;

    /* Border Radius */
    --radius-sm: 0.375rem;
    --radius-md: 0.5rem;
    --radius-lg: 0.75rem;
    --radius-xl: 1rem;
    --radius-2xl: 1.5rem;

    /* Shadows */
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
    --shadow-2xl: 0 25px 50px -12px rgba(0, 0, 0, 0.25);

    /* Transitions */
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

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

body {
    font-family: var(--font-family);
    font-size: var(--font-size-base);
    line-height: var(--line-height-base);
    color: var(--dark);
    background-color: var(--white);
    overflow-x: hidden;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 var(--spacing-lg);
}

/* ==========================================================================
   Navigation
   ========================================================================== */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    box-shadow: var(--shadow-sm);
    z-index: 1000;
    transition: var(--transition);
}

.navbar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: var(--spacing-md);
    padding-bottom: var(--spacing-md);
}

.nav-brand .logo {
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
    color: var(--dark);
    text-decoration: none;
}

.nav-brand .logo svg {
    color: var(--primary);
}

.brand-name {
    font-size: 1.5rem;
    font-weight: 700;
}

.brand-midstream {
    color: var(--primary);
}

.brand-calculator {
    color: var(--secondary);
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: var(--spacing-lg);
    align-items: center;
}

.nav-menu a {
    color: var(--dark-700);
    text-decoration: none;
    font-weight: 500;
    transition: var(--transition);
    position: relative;
}

.nav-menu a:hover {
    color: var(--primary);
}

.nav-menu a::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--primary);
    transition: var(--transition);
}

.nav-menu a:hover::after {
    width: 100%;
}

.mobile-menu-toggle {
    display: none;
    flex-direction: column;
    gap: 4px;
    cursor: pointer;
}

.mobile-menu-toggle span {
    width: 24px;
    height: 2px;
    background: var(--dark);
    transition: var(--transition);
}

/* ==========================================================================
   Hero Section - Compact
   ========================================================================== */
.hero {
    position: relative;
    min-height: auto;
    display: flex;
    align-items: center;
    padding-top: 80px;
    overflow: hidden;
}

.hero-background {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 0;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

/* Blueprint image overlay - set via JS */
.hero-background::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.85) 0%, rgba(255, 255, 255, 0.80) 50%, rgba(249, 250, 251, 0.82) 100%);
    z-index: 1;
}

.grid-overlay {
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(33, 150, 243, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(33, 150, 243, 0.03) 1px, transparent 1px);
    background-size: 50px 50px;
    z-index: 2;
}

.gradient-overlay {
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at 20% 50%, rgba(33, 150, 243, 0.1) 0%, transparent 50%),
                radial-gradient(circle at 80% 80%, rgba(0, 188, 212, 0.1) 0%, transparent 50%);
    z-index: 3;
}

.hero-content {
    position: relative;
    z-index: 10;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    align-items: center;
    padding-top: 2rem;
    padding-bottom: 2rem;
}

.badge {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    padding: 0.375rem 0.875rem;
    background: var(--primary-light);
    color: var(--primary-dark);
    border-radius: 9999px;
    font-size: 0.8125rem;
    font-weight: 600;
    margin-bottom: 0.75rem;
}

.badge-icon {
    font-size: 1.125rem;
}

.hero-title {
    font-size: 2.5rem;
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 0.875rem;
    color: var(--dark);
}

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

.hero-subtitle {
    font-size: 1rem;
    line-height: 1.6;
    color: var(--dark-600);
    margin-bottom: 1.25rem;
    max-width: 600px;
}

.hero-cta {
    display: flex;
    gap: 0.75rem;
    margin-bottom: 1.5rem;
}

.btn-primary, .btn-secondary, .btn-primary-small {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    border-radius: var(--radius-lg);
    font-weight: 600;
    text-decoration: none;
    transition: var(--transition);
    cursor: pointer;
    border: none;
    font-size: 0.9375rem;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: var(--white);
    box-shadow: var(--shadow-lg);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-xl);
}

.btn-secondary {
    background: var(--white);
    color: var(--dark);
    border: 2px solid var(--dark-700);
}

.btn-secondary:hover {
    background: var(--dark);
    color: var(--white);
    border-color: var(--dark);
}

.btn-primary-small {
    padding: 0.5rem 1.5rem;
    background: var(--primary);
    color: var(--white);
}

.btn-primary-small:hover {
    background: var(--primary-dark);
}

.hero-stats {
    display: flex;
    gap: 1.5rem;
}

.stat {
    text-align: left;
}

.stat-number {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--primary);
    line-height: 1;
    margin-bottom: 0.25rem;
}

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

/* App Preview */
.app-preview {
    perspective: 1000px;
}

.app-window {
    background: var(--white);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-2xl);
    overflow: hidden;
    transform: rotateY(-5deg) rotateX(5deg);
    transition: var(--transition);
}

.app-window:hover {
    transform: rotateY(0deg) rotateX(0deg);
}

.window-header {
    background: var(--dark-800);
    padding: var(--spacing-md);
    display: flex;
    align-items: center;
    gap: var(--spacing-md);
}

.window-controls {
    display: flex;
    gap: var(--spacing-xs);
}

.control {
    width: 12px;
    height: 12px;
    border-radius: 50%;
}

.control.red { background: #FF5F56; }
.control.yellow { background: #FFBD2E; }
.control.green { background: #27C93F; }

.window-title {
    color: var(--light);
    font-size: 0.875rem;
    font-weight: 500;
}

.window-content {
    padding: var(--spacing-xl);
    background: linear-gradient(to bottom, var(--light), var(--white));
}

.calculator-preview {
    background: var(--white);
    border-radius: var(--radius-lg);
    padding: var(--spacing-lg);
    box-shadow: var(--shadow-md);
}

.calc-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: var(--spacing-lg);
}

.calc-header h3 {
    font-size: 1.25rem;
    color: var(--dark);
}

.calc-badge {
    padding: 0.25rem 0.75rem;
    background: var(--primary-light);
    color: var(--primary-dark);
    border-radius: var(--radius-md);
    font-size: 0.75rem;
    font-weight: 600;
}

.calc-inputs {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-md);
    margin-bottom: var(--spacing-lg);
}

.input-row {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-xs);
}

.input-row label {
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--dark-600);
}

.input-row input {
    padding: 0.75rem;
    border: 2px solid var(--light);
    border-radius: var(--radius-md);
    font-size: 1rem;
    font-family: 'Courier New', monospace;
    background: var(--light);
}

.calc-result {
    padding: var(--spacing-lg);
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    border-radius: var(--radius-lg);
    color: var(--white);
}

.result-label {
    font-size: 0.875rem;
    opacity: 0.9;
    margin-bottom: var(--spacing-xs);
}

.result-value {
    font-size: 2rem;
    font-weight: 700;
}

/* ==========================================================================
   Features Section - Compact
   ========================================================================== */
.features {
    padding: 2rem 0;
    background:
        linear-gradient(rgba(255, 255, 255, 0.85), rgba(255, 255, 255, 0.87)),
        url('../images/piping/5.jpg');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
}

.section-header {
    text-align: center;
    margin-bottom: 1.5rem;
}

.section-title {
    font-size: 1.75rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    color: var(--dark);
}

.section-subtitle {
    font-size: 0.9375rem;
    color: var(--dark-600);
    max-width: 700px;
    margin: 0 auto;
}

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

.feature-card {
    background: var(--white);
    border: 2px solid var(--light);
    border-radius: var(--radius-lg);
    padding: 1.25rem;
    transition: var(--transition);
}

.feature-card:hover {
    border-color: var(--primary);
    transform: translateY(-4px);
    box-shadow: var(--shadow-xl);
}

.feature-icon {
    width: 48px;
    height: 48px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 0.875rem;
}

.feature-icon.blue { background: linear-gradient(135deg, #2196F3, #1976D2); color: white; }
.feature-icon.green { background: linear-gradient(135deg, #4CAF50, #388E3C); color: white; }
.feature-icon.orange { background: linear-gradient(135deg, #FF9800, #F57C00); color: white; }
.feature-icon.red { background: linear-gradient(135deg, #F44336, #D32F2F); color: white; }
.feature-icon.purple { background: linear-gradient(135deg, #9C27B0, #7B1FA2); color: white; }
.feature-icon.teal { background: linear-gradient(135deg, #00BCD4, #0097A7); color: white; }

.feature-card h3 {
    font-size: 1.125rem;
    font-weight: 700;
    margin-bottom: 0.625rem;
    color: var(--dark);
}

.feature-card > p {
    color: var(--dark-600);
    margin-bottom: 0.875rem;
    line-height: 1.6;
    font-size: 0.9375rem;
}

.feature-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.feature-list li {
    color: var(--dark-700);
    padding-left: 1.25rem;
    position: relative;
    font-size: 0.875rem;
}

.feature-list li::before {
    content: '✓';
    position: absolute;
    left: 0;
    color: var(--success);
    font-weight: 700;
}

/* ==========================================================================
   Calculator Categories - Compact
   ========================================================================== */
.calculators {
    padding: 2rem 0;
    background: var(--light);
}

.calculator-categories {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1rem;
}

.category-card {
    background: var(--white);
    border-radius: var(--radius-lg);
    padding: 1.25rem;
    text-align: center;
    transition: var(--transition);
    border: 2px solid transparent;
}

.category-card:hover {
    border-color: var(--primary);
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

.category-number {
    font-size: 2rem;
    font-weight: 700;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 0.625rem;
}

.category-card h3 {
    font-size: 1.125rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    color: var(--dark);
}

.category-card p {
    color: var(--dark-600);
    line-height: 1.6;
    font-size: 0.875rem;
}

/* ==========================================================================
   Why Choose Section - Compact
   ========================================================================== */
.why-choose {
    padding: 2rem 0;
    background: var(--white);
}

.why-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    align-items: center;
}

.why-features {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-top: 1.25rem;
}

.why-item {
    display: flex;
    gap: 0.875rem;
}

.why-icon {
    flex-shrink: 0;
    width: 28px;
    height: 28px;
    background: var(--primary);
    color: var(--white);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.875rem;
}

.why-item h4 {
    font-size: 1rem;
    font-weight: 700;
    margin-bottom: 0.25rem;
    color: var(--dark);
}

.why-item p {
    color: var(--dark-600);
    line-height: 1.6;
    font-size: 0.875rem;
}

.device-mockup {
    position: relative;
}

.device-screen {
    background: var(--dark-800);
    border-radius: var(--radius-2xl);
    padding: var(--spacing-lg);
    box-shadow: var(--shadow-2xl);
}

.screen-content {
    background: var(--white);
    border-radius: var(--radius-lg);
    padding: var(--spacing-lg);
}

.app-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: var(--spacing-lg);
    padding-bottom: var(--spacing-md);
    border-bottom: 2px solid var(--light);
}

.app-header h4 {
    font-size: 1.25rem;
    color: var(--dark);
}

.calc-count {
    font-size: 0.875rem;
    color: var(--dark-600);
    font-weight: 500;
}

.calc-list {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-md);
}

.calc-item {
    display: flex;
    gap: var(--spacing-md);
    padding: var(--spacing-md);
    background: var(--light);
    border-radius: var(--radius-md);
    transition: var(--transition);
    cursor: pointer;
}

.calc-item:hover {
    background: var(--primary-light);
    transform: translateX(4px);
}

.calc-icon {
    font-size: 1.5rem;
}

.calc-name {
    font-weight: 600;
    color: var(--dark);
    margin-bottom: 0.25rem;
}

.calc-meta {
    font-size: 0.875rem;
    color: var(--dark-600);
}

/* ==========================================================================
   CTA Section - Compact App Download
   ========================================================================== */
.cta {
    padding: 2rem 0;
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: var(--white);
}

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

.cta-content h2 {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.cta-content p {
    font-size: 0.9375rem;
    opacity: 0.9;
    margin-bottom: 1.25rem;
}

.cta-buttons {
    display: flex;
    gap: 0.75rem;
    justify-content: center;
    flex-wrap: wrap;
}

.cta .btn-primary,
.cta .btn-secondary {
    display: inline-flex;
    align-items: center;
    padding: 0.75rem 1.5rem;
    font-size: 0.9375rem;
    border-radius: var(--radius-lg);
}

.cta .btn-primary {
    background: var(--white);
    color: var(--primary);
}

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

.cta .btn-secondary:hover {
    background: var(--white);
    color: var(--primary);
}

/* ==========================================================================
   Footer - Compact Card-Based Layout
   ========================================================================== */
.footer {
    background:
        linear-gradient(rgba(10, 25, 41, 0.88), rgba(10, 25, 41, 0.90)),
        url('../images/piping/15.jpg');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    color: #E3E8EF;
    padding: var(--spacing-xl) 0 var(--spacing-md) 0;
}

.footer-content {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-lg);
}

.footer-brand {
    display: flex;
    align-items: center;
    gap: var(--spacing-md);
    padding-bottom: var(--spacing-md);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-brand .logo {
    margin-bottom: 0;
}

.footer-brand .logo svg {
    color: var(--primary);
}

.footer-brand p {
    color: #9CA3AF;
    line-height: 1.5;
    font-size: 0.875rem;
    margin: 0;
}

.footer-links {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: var(--spacing-md);
}

.footer-column {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: var(--radius-lg);
    padding: var(--spacing-md);
    display: flex;
    flex-direction: column;
}

.footer-column h4 {
    font-size: 0.75rem;
    font-weight: 700;
    margin-bottom: var(--spacing-xs);
    color: var(--primary);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.footer-column a {
    color: #D1D5DB;
    text-decoration: none;
    transition: var(--transition);
    font-size: 0.875rem;
    padding: 0.25rem 0;
    border-bottom: 1px solid transparent;
}

.footer-column a:hover {
    color: var(--primary);
    border-bottom-color: var(--primary);
}

.footer-bottom {
    padding-top: var(--spacing-md);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    text-align: center;
    margin-top: var(--spacing-sm);
}

.footer-bottom p {
    color: #9CA3AF;
    font-size: 0.75rem;
    margin: 0;
}

/* Footer social links removed - simplified footer */

/* ==========================================================================
   Responsive Design
   ========================================================================== */
@media (max-width: 1024px) {
    .hero-content {
        grid-template-columns: 1fr;
    }

    .hero-visual {
        order: -1;
    }

    .why-content {
        grid-template-columns: 1fr;
    }

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

@media (max-width: 768px) {
    .nav-menu {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: var(--white);
        flex-direction: column;
        padding: var(--spacing-md) 0;
        box-shadow: var(--shadow-lg);
        border-top: 1px solid var(--light);
    }

    .nav-menu.active {
        display: flex;
    }

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

    .nav-menu a {
        display: block;
        padding: var(--spacing-sm) var(--spacing-lg);
        border-bottom: 1px solid var(--light);
    }

    .nav-menu a:hover {
        background: var(--primary-light);
    }

    .mobile-menu-toggle {
        display: flex;
    }

    .mobile-menu-toggle.active span:nth-child(1) {
        transform: rotate(45deg) translate(5px, 5px);
    }

    .mobile-menu-toggle.active span:nth-child(2) {
        opacity: 0;
    }

    .mobile-menu-toggle.active span:nth-child(3) {
        transform: rotate(-45deg) translate(5px, -5px);
    }

    .hero-title {
        font-size: 2.5rem;
    }

    .section-title {
        font-size: 2rem;
    }

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

    .calculator-categories {
        grid-template-columns: 1fr;
    }

    .hero-cta {
        flex-direction: column;
    }

    .cta-buttons {
        flex-direction: column;
        width: 100%;
    }

    .cta .btn-primary,
    .cta .btn-secondary {
        width: 100%;
        justify-content: center;
    }

    .cta-content h2 {
        font-size: 1.25rem;
    }

    .cta-content p {
        font-size: 0.875rem;
    }

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

@media (max-width: 480px) {
    .hero-title {
        font-size: 2rem;
    }

    .hero-stats {
        flex-direction: column;
        gap: var(--spacing-lg);
    }
}

/* ==========================================================================
   Dynamic Calculators Section
   ========================================================================== */
.dynamic-calculators {
    padding: var(--spacing-3xl) 0;
    position: relative;
    background:
        linear-gradient(rgba(255, 255, 255, 0.82), rgba(249, 250, 251, 0.85)),
        url('../images/piping/1.jpg');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
}

.featured-calculator-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--spacing-lg);
    margin-bottom: var(--spacing-xl);
}

.random-calculators-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: var(--spacing-lg);
}

.dynamic-calc-card {
    position: relative;
    display: flex;
    flex-direction: column;
    padding: var(--spacing-xl);
    background: rgba(255, 255, 255, 0.92);
    border: 2px solid #e5e7eb;
    border-radius: var(--radius-xl);
    text-decoration: none;
    color: inherit;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    overflow: hidden;
    backdrop-filter: blur(8px);
}

.dynamic-calc-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #3b82f6 0%, #2563eb 100%);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.dynamic-calc-card:hover {
    border-color: #3b82f6;
    box-shadow: 0 20px 25px -5px rgba(59, 130, 246, 0.1), 0 10px 10px -5px rgba(59, 130, 246, 0.04);
    transform: translateY(-4px);
}

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

/* Featured Calculator Specific Styles */
.dynamic-calc-card.featured {
    flex-direction: row;
    gap: var(--spacing-lg);
    align-items: center;
}

.calc-icon-large {
    font-size: 4rem;
    line-height: 1;
    flex-shrink: 0;
}

.calc-content {
    flex: 1;
}

.calc-content h3 {
    margin: 0 0 var(--spacing-sm) 0;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--navy);
}

.calc-description {
    margin: 0 0 var(--spacing-md) 0;
    font-size: 1rem;
    line-height: 1.6;
    color: #4b5563;
}

.calc-link {
    display: inline-flex;
    align-items: center;
    font-weight: 600;
    color: #3b82f6;
    font-size: 1rem;
}

/* Compact Calculator Card Styles */
.dynamic-calc-card.compact {
    flex-direction: row;
    gap: var(--spacing-md);
    padding: var(--spacing-lg);
}

.calc-icon-compact {
    font-size: 2rem;
    line-height: 1;
    flex-shrink: 0;
}

.calc-content-compact {
    flex: 1;
}

.calc-content-compact h4 {
    margin: 0 0 var(--spacing-xs) 0;
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--navy);
}

.calc-description-short {
    margin: 0 0 var(--spacing-sm) 0;
    font-size: 0.875rem;
    line-height: 1.5;
    color: #6b7280;
}

.calc-category-tag {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    background: #e0f2fe;
    color: #0369a1;
    border-radius: 999px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.025em;
}

.calc-category {
    font-size: 0.875rem;
    font-weight: 600;
    color: #3b82f6;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: var(--spacing-md);
}

.calc-description {
    font-size: 1rem;
    color: #6b7280;
    line-height: 1.6;
    margin-bottom: var(--spacing-md);
    flex-grow: 1;
}

.calc-arrow {
    font-size: 1.5rem;
    color: #3b82f6;
    font-weight: 700;
    opacity: 0;
    transform: translateX(-10px);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.dynamic-calc-card:hover .calc-arrow {
    opacity: 1;
    transform: translateX(0);
}

/* Featured calculator - larger on desktop */
@media (min-width: 768px) {
    .featured-calculator-grid .dynamic-calc-card {
        padding: var(--spacing-2xl);
    }
    
    .featured-calculator-grid .calc-icon-large {
        font-size: 4rem;
    }
    
    .featured-calculator-grid h3 {
        font-size: 2rem;
    }
    
    .featured-calculator-grid .calc-description {
        font-size: 1.125rem;
    }
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .random-calculators-grid {
        grid-template-columns: 1fr;
    }

    .dynamic-calc-card {
        padding: var(--spacing-lg);
    }

    .dynamic-calc-card.featured {
        flex-direction: column;
        text-align: center;
    }

    .dynamic-calc-card.compact {
        flex-direction: column;
        text-align: center;
    }

    .calc-icon-large {
        font-size: 2.5rem;
        margin: 0 auto var(--spacing-md) auto;
    }

    .calc-icon-compact {
        margin: 0 auto var(--spacing-sm) auto;
    }

    .calc-content h3 {
        font-size: 1.25rem;
    }

    .calc-content-compact h4 {
        font-size: 1rem;
    }
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 15px -3px rgba(59, 130, 246, 0.3);
}
