/* OmniCalculator Frontend Design - Custom Styles */
/* Based on frontend-guide design requirements */

/* ============================================ */
/* GLOBAL STYLES */
/* ============================================ */

:root {
    /* Color Palette */
    --omni-primary: #3B68FC;
    --omni-secondary: #BE05C1;
    --omni-background: #F7F9FF;
    --omni-text: #0A0A0A;
    --omni-border: #E3E4ED;
    --omni-muted: #646464;
    --omni-white: #FFFFFF;
    
    /* Typography */
    --omni-font-family: 'Poppins', Verdana, sans-serif;
    --omni-font-size: 15px;
    --omni-line-height: 141%;
}

html {
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    box-sizing: border-box;
}

*, *::before, *::after {
    box-sizing: inherit;
}

body {
    margin: 0;
    color: var(--omni-text);
    font-family: var(--omni-font-family);
    font-size: var(--omni-font-size);
    font-weight: 400;
    line-height: var(--omni-line-height);
    background-color: var(--omni-background);
}

/* ============================================ */
/* HEADER STYLES */
/* ============================================ */

.omni-header {
    z-index: 1202;
    top: 0;
    background: var(--omni-white);
    width: 100%;
    box-shadow: 0 6px 16px 0 rgba(59, 104, 252, 0.1), 0px 1px 2.8px 1px rgba(41, 76, 194, 0.06);
    padding: 8px 16px;
    position: fixed;
}

.omni-header .navbar-brand {
    color: var(--omni-primary);
    font-weight: 600;
    font-size: 18px;
}

.omni-header .nav-link {
    color: var(--omni-text);
    font-weight: 500;
    padding: 8px 16px;
    transition: color 0.2s ease;
}

.omni-header .nav-link:hover {
    color: var(--omni-primary);
}

/* ============================================ */
/* TYPOGRAPHY */
/* ============================================ */

h1, h2, h3, h4, h5, h6 {
    font-family: var(--omni-font-family);
    font-weight: 600;
    line-height: 1.3;
    color: var(--omni-text);
    margin-top: 0;
}

h1 {
    font-size: 32px;
}

h2 {
    font-size: 28px;
}

h3 {
    font-size: 24px;
}

h4 {
    font-size: 20px;
}

p {
    margin: 16px 0;
    line-height: var(--omni-line-height);
}

/* ============================================ */
/* LINKS */
/* ============================================ */

a {
    color: var(--omni-secondary);
    text-decoration: underline;
    text-decoration-color: rgba(190, 5, 193, 0.4);
    transition: text-decoration-color 0.2s ease;
}

a:hover {
    text-decoration-color: inherit;
}

/* ============================================ */
/* BUTTONS */
/* ============================================ */

.btn-omni-primary {
    background-color: var(--omni-primary);
    border: none;
    border-radius: 8px;
    color: white;
    padding: 10px 20px;
    font-weight: 500;
    transition: background-color 0.2s ease;
}

.btn-omni-primary:hover {
    background-color: #2952E8;
    color: white;
}

.btn-omni-secondary {
    background-color: var(--omni-secondary);
    border: none;
    border-radius: 8px;
    color: white;
    padding: 10px 20px;
    font-weight: 500;
    transition: background-color 0.2s ease;
}

.btn-omni-secondary:hover {
    background-color: #A304A5;
    color: white;
}

/* ============================================ */
/* CARDS */
/* ============================================ */

.omni-card {
    background-color: var(--omni-white);
    border-radius: 20px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    overflow: hidden;
    padding: 24px;
    margin-bottom: 24px;
}

.omni-card-small {
    border-radius: 16px;
    padding: 16px;
}

.omni-card-header {
    font-size: 24px;
    font-weight: 600;
    margin-bottom: 16px;
    color: var(--omni-text);
}

/* ============================================ */
/* BACKGROUND */
/* ============================================ */

.omni-background {
    background-color: var(--omni-background);
    min-height: 100vh;
    padding-top: 80px; /* Account for fixed header */
}

/* Background patterns for different screen sizes */
@media (min-width: 584px) {
    .omni-background {
        background-image: url('../images/background/bg-tablet.svg');
        background-repeat: no-repeat;
        background-position: top center;
        background-size: 100% auto;
    }
}

@media (min-width: 1006px) {
    .omni-background {
        background-image: url('../images/background/bg-desktop.svg');
    }
}

/* ============================================ */
/* LAYOUT - RESPONSIVE GRID */
/* ============================================ */

.omni-container {
    max-width: 984px;
    margin: 0 auto;
    padding: 0 16px;
}

.omni-container-wide {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 16px;
}

/* ============================================ */
/* CALCULATOR PAGE SPECIFIC */
/* ============================================ */

.calculator-container {
    display: grid;
    grid-template-columns: 1fr;
    gap: 24px;
    max-width: 984px;
    margin: 0 auto;
}

@media (min-width: 1006px) {
    .calculator-container {
        grid-template-columns: 1fr 308px;
        max-width: 1292px;
    }
}

@media (min-width: 1570px) {
    .calculator-container {
        grid-template-columns: 308px 1fr 308px;
        max-width: 1600px;
    }
}

.calculator-main {
    background: var(--omni-white);
    border-radius: 20px;
    padding: 32px;
}

.calculator-sidebar {
    background: var(--omni-white);
    border-radius: 20px;
    padding: 16px;
}

/* ============================================ */
/* BREADCRUMBS / CATEGORY BADGE */
/* ============================================ */

.omni-breadcrumb {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 12px;
    background-color: rgba(59, 104, 252, 0.1);
    border-radius: 8px;
    font-size: 14px;
    color: var(--omni-primary);
    margin-bottom: 16px;
}

.omni-breadcrumb:hover {
    background-color: rgba(59, 104, 252, 0.15);
    text-decoration: none;
}

/* ============================================ */
/* FAQ ACCORDION */
/* ============================================ */

.omni-faq-section {
    margin-top: 48px;
}

.omni-faq-title {
    font-size: 28px;
    font-weight: 600;
    margin-bottom: 24px;
}

.omni-accordion-item {
    background: var(--omni-white);
    border: 1px solid var(--omni-border);
    border-radius: 12px;
    margin-bottom: 12px;
    overflow: hidden;
}

.omni-accordion-button {
    background: var(--omni-white);
    border: none;
    width: 100%;
    text-align: left;
    padding: 16px 20px;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: background-color 0.2s ease;
}

.omni-accordion-button:hover {
    background-color: var(--omni-background);
}

.omni-accordion-content {
    padding: 0 20px 16px;
    line-height: 1.6;
}

/* ============================================ */
/* AUTHOR PAGE SPECIFIC */
/* ============================================ */

.author-profile {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 32px;
    background: var(--omni-white);
    border-radius: 20px;
    margin-bottom: 24px;
}

.author-avatar {
    width: 168px;
    height: 168px;
    border-radius: 50%;
    object-fit: cover;
    margin-bottom: 16px;
    border: 4px solid var(--omni-background);
}

.author-name {
    font-size: 32px;
    font-weight: 600;
    margin: 8px 0;
}

.author-title {
    font-size: 18px;
    color: var(--omni-muted);
    margin-bottom: 16px;
}

.author-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 24px;
    width: 100%;
    margin-top: 24px;
    padding-top: 24px;
    border-top: 1px solid var(--omni-border);
}

.author-stat {
    text-align: center;
}

.author-stat-number {
    font-size: 28px;
    font-weight: 600;
    color: var(--omni-primary);
    display: block;
}

.author-stat-label {
    font-size: 14px;
    color: var(--omni-muted);
    margin-top: 4px;
}

.author-bio {
    background: var(--omni-white);
    border-radius: 16px;
    padding: 24px;
    margin-bottom: 24px;
}

.author-info-card {
    background: var(--omni-white);
    border-radius: 16px;
    padding: 24px;
    margin-bottom: 24px;
}

.author-info-title {
    font-size: 20px;
    font-weight: 600;
    margin-bottom: 16px;
}

.author-info-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.author-info-list li {
    padding: 8px 0;
    border-bottom: 1px solid var(--omni-border);
}

.author-info-list li:last-child {
    border-bottom: none;
}

/* ============================================ */
/* HOME PAGE SPECIFIC */
/* ============================================ */

.hero-section {
    text-align: center;
    padding: 60px 20px 40px;
}

.hero-title {
    font-size: 48px;
    font-weight: 700;
    margin-bottom: 16px;
    color: var(--omni-text);
}

.hero-subtitle {
    font-size: 20px;
    color: var(--omni-muted);
    margin-bottom: 32px;
}

.search-bar-container {
    max-width: 600px;
    margin: 0 auto 48px;
}

.omni-search-input {
    width: 100%;
    padding: 16px 24px;
    font-size: 16px;
    border: 2px solid var(--omni-border);
    border-radius: 12px;
    outline: none;
    transition: border-color 0.2s ease;
}

.omni-search-input:focus {
    border-color: var(--omni-primary);
}

/* Featured Calculators Grid */
.calculators-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 24px;
    margin-bottom: 48px;
}

@media (min-width: 584px) {
    .calculators-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 1006px) {
    .calculators-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

.calculator-card {
    background: var(--omni-white);
    border-radius: 16px;
    padding: 24px;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    cursor: pointer;
    text-decoration: none;
    display: block;
}

.calculator-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(59, 104, 252, 0.15);
    text-decoration: none;
}

.calculator-card-icon {
    font-size: 32px;
    color: var(--omni-primary);
    margin-bottom: 12px;
}

.calculator-card-title {
    font-size: 18px;
    font-weight: 600;
    color: var(--omni-text);
    margin-bottom: 8px;
}

.calculator-card-description {
    font-size: 14px;
    color: var(--omni-muted);
    line-height: 1.5;
}

/* Category Tags */
.category-tag {
    display: inline-block;
    padding: 6px 12px;
    background-color: rgba(59, 104, 252, 0.1);
    color: var(--omni-primary);
    border-radius: 8px;
    font-size: 13px;
    font-weight: 500;
    text-decoration: none;
    margin: 4px;
    transition: background-color 0.2s ease;
}

.category-tag:hover {
    background-color: rgba(59, 104, 252, 0.2);
    text-decoration: none;
}

/* ============================================ */
/* FORM ELEMENTS */
/* ============================================ */

.omni-form-group {
    margin-bottom: 20px;
}

.omni-form-label {
    display: block;
    font-weight: 500;
    margin-bottom: 8px;
    color: var(--omni-text);
}

.omni-form-input,
.omni-form-select,
.omni-form-textarea {
    width: 100%;
    padding: 12px 16px;
    font-size: 15px;
    border: 2px solid var(--omni-border);
    border-radius: 8px;
    outline: none;
    transition: border-color 0.2s ease;
    font-family: var(--omni-font-family);
}

.omni-form-input:focus,
.omni-form-select:focus,
.omni-form-textarea:focus {
    border-color: var(--omni-primary);
}

/* ============================================ */
/* UTILITIES */
/* ============================================ */

.text-center {
    text-align: center;
}

.text-muted {
    color: var(--omni-muted);
}

.mt-1 { margin-top: 8px; }
.mt-2 { margin-top: 16px; }
.mt-3 { margin-top: 24px; }
.mt-4 { margin-top: 32px; }
.mt-5 { margin-top: 48px; }

.mb-1 { margin-bottom: 8px; }
.mb-2 { margin-bottom: 16px; }
.mb-3 { margin-bottom: 24px; }
.mb-4 { margin-bottom: 32px; }
.mb-5 { margin-bottom: 48px; }

.p-1 { padding: 8px; }
.p-2 { padding: 16px; }
.p-3 { padding: 24px; }
.p-4 { padding: 32px; }
.p-5 { padding: 48px; }

/* ============================================ */
/* RESPONSIVE BREAKPOINTS */
/* ============================================ */

/* Mobile: < 584px */
/* Tablet: 584px - 1005px */
/* Desktop: 1006px - 1569px */
/* Large: 1570px+ */

@media (max-width: 583px) {
    .hero-title {
        font-size: 32px;
    }
    
    .hero-subtitle {
        font-size: 16px;
    }
    
    h1 {
        font-size: 28px;
    }
    
    h2 {
        font-size: 24px;
    }
}

/* ============================================ */
/* PRINT STYLES */
/* ============================================ */

@media print {
    .omni-header,
    .calculator-sidebar {
        display: none;
    }
    
    .omni-background {
        background: white;
    }
}
