/* Alignment Fixes for TheDeciding.com */
/* This file addresses all alignment and layout issues across the website */

/* Global Alignment Fixes */
* {
    box-sizing: border-box;
}

/* Header Alignment Fixes */
.site-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
}

.header-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
    height: 70px;
}

.header-left {
    display: flex;
    align-items: center;
}

.header-right {
    display: flex;
    align-items: center;
    gap: 2rem;
}

.nav-menu {
    display: flex;
    align-items: center;
    gap: 2rem;
}

.header-buttons {
    display: flex;
    align-items: center;
    gap: 1rem;
}

/* Main Content Alignment */
body {
    padding-top: 70px;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.container, main {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem 1rem;
    width: 100%;
    flex: 1;
}

/* Hero Section Alignment */
.hero, .about-hero, .tools-header {
    text-align: center;
    margin-bottom: 3rem;
}

.hero h1, .about-hero h1, .tools-header h1 {
    margin: 0 auto 1rem;
    max-width: 800px;
}

.hero p, .about-hero p, .tools-header p {
    margin: 0 auto;
    max-width: 600px;
}

/* Tools Grid Alignment */
.tools-grid {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 1.5rem;
    justify-content: center;
    max-width: 1200px;
    margin: 0 auto;
}

.tool-card {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    width: 100%;
    height: 120px;
    padding: 1rem;
}

.tool-icon {
    margin-bottom: 0.8rem;
    display: block;
}

.tool-card h3 {
    margin: 0;
    text-align: center;
    line-height: 1.2;
}

/* Category Grid Alignment */
.category-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 1.5rem;
    justify-content: center;
}

/* Form Elements Alignment */
.input-section {
    display: flex;
    flex-direction: row;
    align-items: end;
    gap: 2rem;
    margin-bottom: 2rem;
    justify-content: center;
}

.input-group {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.5rem;
}

.input-group label {
    display: block;
    text-align: left;
    margin-bottom: 0.5rem;
}

.input-group input,
.input-group select,
.input-group textarea {
    width: 100%;
    text-align: left;
}

/* Button Alignment */
button, .btn, .generate-btn, .calculate-btn, .shuffle-btn, .pick-btn, .cosmic-btn, .draw-button, .ask-btn, .flip-btn, .convert-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    margin: 0 auto;
}

.buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
}

/* Result Display Alignment */
.result-card, .result-display, .bmi-result {
    text-align: center;
    margin: 2rem auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.result-number {
    display: block;
    text-align: center;
    margin: 1rem 0;
}

/* Stats Grid Alignment */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1rem;
    margin: 2rem auto;
    max-width: 800px;
}

.stat-card {
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 1.5rem 1rem;
}

.stat-number {
    display: block;
    text-align: center;
    margin-bottom: 0.5rem;
}

.stat-label {
    display: block;
    text-align: center;
}

/* About Page Alignment */
.about-content {
    max-width: 900px;
    margin: 0 auto;
    padding: 2rem 1rem;
}

.about-section {
    margin-bottom: 2rem;
    text-align: left;
}

.about-section h2 {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
}

.feature-grid, .team-values {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
    margin: 2rem 0;
}

.feature-card, .value-card {
    text-align: left;
    display: flex;
    flex-direction: column;
}

.value-card {
    text-align: center;
}

.value-icon {
    display: block;
    text-align: center;
    margin-bottom: 1rem;
}

.stats-highlight {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1rem;
    margin: 2rem 0;
}

.stat-item {
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 1.5rem 0.8rem;
}

/* Timeline Alignment */
.timeline {
    position: relative;
    padding-left: 2rem;
    margin: 2rem 0;
}

.timeline-item {
    position: relative;
    margin-bottom: 2rem;
    margin-left: 1rem;
    text-align: left;
}

/* CTA Section Alignment */
.cta-section {
    text-align: center;
    margin: 3rem auto;
    padding: 3rem 2rem;
}

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

/* FAQ Alignment */
.faq-content, .quick-faq {
    max-width: 800px;
    margin: 0 auto;
    text-align: left;
}

.quick-faq {
    text-align: center;
}

.quick-faq-item {
    text-align: left;
}

/* Blog Alignment */
.blog-content {
    max-width: 800px;
    margin: 0 auto;
}

.blog-post-card {
    text-align: left;
    margin-bottom: 2rem;
}

.blog-preview {
    text-align: center;
    max-width: 800px;
    margin: 3rem auto;
}

.blog-preview-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
}

.blog-preview-card {
    text-align: left;
}

/* Footer Alignment */
.new-footer, .site-footer {
    margin-top: auto;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.footer-brand {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    justify-content: center;
}

.footer-links {
    display: flex;
    justify-content: center;
    gap: 2rem;
    flex-wrap: wrap;
}

.footer-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 1rem;
}

.legal-links {
    display: flex;
    gap: 1rem;
}

.security-info {
    display: flex;
    gap: 1rem;
}

/* Bottom Navigation Alignment */
.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 1000;
}

.bottom-nav-container {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    max-width: 500px;
    margin: 0 auto;
}

.bottom-nav-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 8px 4px;
    min-height: 50px;
}

.bottom-nav-icon {
    margin-bottom: 2px;
}

/* Contact Form Alignment */
.contact-content {
    max-width: 800px;
    margin: 0 auto;
}

.contact-intro {
    text-align: center;
    margin-bottom: 2rem;
}

.contact-info {
    text-align: center;
}

/* Mobile Responsive Alignment */
@media (max-width: 1024px) {
    .tools-grid {
        grid-template-columns: repeat(3, 1fr);
    }
    
    .stats-highlight, .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    body {
        padding-top: 60px;
        padding-bottom: 60px;
    }
    
    .header-container {
        height: 60px;
        padding: 0 1rem;
    }
    
    .container, main {
        padding: 1rem;
    }
    
    .hero, .about-hero, .tools-header {
        margin-bottom: 2rem;
        padding: 1.5rem 1rem;
    }
    
    .tools-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1rem;
    }
    
    .category-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1rem;
    }
    
    .input-section {
        flex-direction: column;
        gap: 1.5rem;
        align-items: stretch;
    }
    
    .input-group {
        width: 100%;
        align-items: stretch;
    }
    
    .buttons {
        flex-direction: column;
        align-items: center;
    }
    
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1rem;
    }
    
    .feature-grid, .team-values {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .stats-highlight {
        grid-template-columns: repeat(2, 1fr);
        gap: 1rem;
    }
    
    .timeline {
        padding-left: 1.5rem;
    }
    
    .timeline-item {
        margin-left: 0.5rem;
    }
    
    .cta-buttons {
        flex-direction: column;
        align-items: center;
    }
    
    .footer-meta {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }
    
    .legal-links {
        display: grid;
        grid-template-columns: repeat(3, 1fr);
        gap: 0.8rem;
        max-width: 300px;
        margin: 0 auto;
    }
    
    .security-info {
        justify-content: center;
    }
    
    .footer-links {
        display: grid;
        grid-template-columns: repeat(3, 1fr);
        gap: 0.8rem;
        max-width: 300px;
        margin: 0 auto;
        text-align: center;
    }
}

@media (max-width: 480px) {
    .tools-grid {
        grid-template-columns: 1fr;
        gap: 0.8rem;
    }
    
    .category-grid {
        grid-template-columns: 1fr;
        gap: 0.8rem;
    }
    
    .stats-grid, .stats-highlight {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .timeline {
        padding-left: 1rem;
    }
    
    .timeline-item {
        margin-left: 0.2rem;
    }
    
    .footer-links {
        flex-direction: column;
        align-items: center;
        gap: 1rem;
    }
    
    .legal-links {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .security-info {
        flex-direction: column;
        gap: 0.5rem;
    }
}

/* Text Alignment Fixes */
.text-left { text-align: left !important; }
.text-center { text-align: center !important; }
.text-right { text-align: right !important; }

/* Flexbox Alignment Utilities */
.d-flex { display: flex !important; }
.flex-column { flex-direction: column !important; }
.flex-row { flex-direction: row !important; }
.align-items-center { align-items: center !important; }
.align-items-start { align-items: flex-start !important; }
.align-items-end { align-items: flex-end !important; }
.justify-content-center { justify-content: center !important; }
.justify-content-start { justify-content: flex-start !important; }
.justify-content-end { justify-content: flex-end !important; }
.justify-content-between { justify-content: space-between !important; }

/* Grid Alignment Utilities */
.d-grid { display: grid !important; }
.place-items-center { place-items: center !important; }
.place-content-center { place-content: center !important; }

/* Margin and Padding Alignment */
.mx-auto { margin-left: auto !important; margin-right: auto !important; }
.text-center { text-align: center !important; }

/* Fix for specific tool pages */
.tool-header {
    text-align: center;
    margin-bottom: 2rem;
    padding: 0 1rem;
}

.tool-content {
    max-width: 800px;
    margin: 0 auto;
    padding: 0 1rem;
}

/* Fix for list items alignment */
ul, ol {
    text-align: left;
}

li {
    text-align: left;
}

/* Fix for table alignment if any */
table {
    margin: 0 auto;
    text-align: left;
}

th, td {
    text-align: left;
    vertical-align: middle;
}

/* Fix for image alignment */
img {
    display: block;
    margin: 0 auto;
    max-width: 100%;
    height: auto;
}

/* Logo specific alignment */
.logo {
    display: block;
}

/* Fix for any misaligned icons */
.tool-icon, .section-icon, .value-icon, .bottom-nav-icon {
    display: inline-block;
    text-align: center;
}

/* Ensure proper alignment for dark mode */
[data-theme="dark"] .tool-card,
[data-theme="dark"] .result-card,
[data-theme="dark"] .stat-card {
    text-align: center;
}

body.dark-mode .tool-card,
body.dark-mode .result-card,
body.dark-mode .stat-card {
    text-align: center;
}