/* Reset and base styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: #f0f2f5;
    color: #333;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

/* Navigation */
.main-nav {
    background-color: #2c3e50;
    padding: 1rem 0;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

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

.nav-logo img {
    height: 50px;
    border-radius: 4px;
}

.nav-links {
    display: flex;
    gap: 1.5rem;
}

.nav-link {
    color: #fff;
    text-decoration: none;
    font-weight: 500;
    padding: 0.5rem 1rem;
    border-radius: 4px;
    transition: background-color 0.3s;
}

.nav-link:hover,
.nav-link.active {
    background-color: rgba(255, 255, 255, 0.1);
}

/* Calculator Container */
.calculator-container {
    max-width: 600px;
    margin: 2rem auto;
    padding: 2rem;
}

.calculator {
    background-color: #fff;
    padding: 2rem;
    border-radius: 12px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

h1 {
    color: #2c3e50;
    text-align: center;
    margin-bottom: 1rem;
    font-size: 2.5rem;
}

.calculator-intro {
    text-align: center;
    color: #666;
    margin-bottom: 2rem;
}

/* Input Styles */
.input-group {
    margin-bottom: 2rem;
}

label {
    display: block;
    margin-bottom: 0.5rem;
    color: #2c3e50;
    font-weight: 500;
}

input[type="number"] {
    width: 100%;
    padding: 1rem;
    border: 2px solid #e1e1e1;
    border-radius: 8px;
    font-size: 1.1rem;
    transition: border-color 0.3s;
}

input[type="number"]:focus {
    border-color: #3498db;
    outline: none;
}

/* Tip Options */
.tip-options {
    margin-bottom: 2rem;
}

.tip-options h2 {
    color: #2c3e50;
    margin-bottom: 1rem;
    font-size: 1.2rem;
}

.tip-buttons {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
    margin-bottom: 1rem;
}

.tip-btn {
    background-color: #3498db;
    color: white;
    border: none;
    padding: 1rem;
    border-radius: 8px;
    font-size: 1.1rem;
    cursor: pointer;
    transition: all 0.3s;
}

.tip-btn:hover {
    background-color: #2980b9;
    transform: translateY(-2px);
}

.tip-btn.active {
    background-color: #2c3e50;
    transform: translateY(1px);
}

.custom-tip {
    grid-column: 1 / -1;
    display: flex;
    gap: 1rem;
}

.custom-tip input {
    flex: 2;
}

.tip-btn.custom {
    flex: 1;
}

/* Results */
.results {
    background-color: #f8f9fa;
    padding: 1.5rem;
    border-radius: 8px;
    margin-top: 2rem;
    opacity: 0;
    transform: translateY(10px);
    transition: all 0.3s;
}

.results.fade-in {
    opacity: 1;
    transform: translateY(0);
}

.result-item {
    display: flex;
    justify-content: space-between;
    margin-bottom: 1rem;
    font-size: 1.1rem;
}

.result-item.total {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 2px solid #e1e1e1;
    font-weight: bold;
    font-size: 1.3rem;
    color: #2c3e50;
}

/* Tipping Guide */
.tipping-guide {
    background-color: #fff;
    padding: 2rem;
    border-radius: 12px;
    margin-top: 2rem;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.tipping-guide h2 {
    color: #2c3e50;
    margin-bottom: 1.5rem;
    font-size: 1.5rem;
}

.guide-item {
    margin-bottom: 1rem;
    padding: 1rem;
    background-color: #f8f9fa;
    border-radius: 8px;
}

.guide-item strong {
    color: #2c3e50;
}

.guide-note {
    color: #666;
    font-size: 0.9rem;
    margin-top: 1rem;
    font-style: italic;
}

.read-more-link {
    display: inline-block;
    margin-top: 1rem;
    color: #3498db;
    text-decoration: none;
    font-weight: 500;
}

.read-more-link:hover {
    text-decoration: underline;
}

/* Affiliate CTA Styles */
.affiliate-cta {
    text-align: center;
    margin: 20px 0;
    padding: 15px;
}

.cta-button {
    display: inline-block;
    padding: 12px 24px;
    background-color: #f8f9fa;
    color: #333;
    text-decoration: none;
    border: 2px solid #ddd;
    border-radius: 6px;
    font-size: 16px;
    transition: all 0.3s ease;
}

.cta-button:hover {
    background-color: #e9ecef;
    border-color: #adb5bd;
    transform: translateY(-2px);
}

/* Footer */
.site-footer {
    background-color: #2c3e50;
    color: #fff;
    padding: 2rem 0;
    margin-top: 4rem;
}

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

.footer-links a {
    color: #fff;
    text-decoration: none;
    opacity: 0.8;
    transition: opacity 0.3s;
}

.footer-links a:hover {
    opacity: 1;
}

.copyright {
    text-align: center;
    opacity: 0.8;
    font-size: 0.9rem;
}

/* Responsive Design */
@media (max-width: 768px) {
    .calculator-container {
        padding: 1rem;
    }

    .tip-buttons {
        grid-template-columns: 1fr;
    }

    h1 {
        font-size: 2rem;
    }

    .footer-links {
        flex-direction: column;
        align-items: center;
        gap: 1rem;
    }

    .nav-logo img {
        height: 40px;
    }
}

/* Legal Pages Styles */
.legal-container {
    max-width: 800px;
    margin: 40px auto;
    padding: 20px;
    background-color: white;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.legal-content {
    line-height: 1.6;
    color: #444;
}

.legal-content h2 {
    color: #2c3e50;
    margin: 25px 0 15px;
}

.legal-content p {
    margin-bottom: 15px;
}

.back-link {
    display: inline-block;
    margin-top: 20px;
    padding: 10px 20px;
    background-color: #4CAF50;
    color: white;
    text-decoration: none;
    border-radius: 4px;
    transition: background-color 0.3s;
}

.back-link:hover {
    background-color: #45a049;
}

/* Blog Styles */
.blog-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.blog-header {
    text-align: center;
    margin-bottom: 50px;
}

.blog-description {
    color: #666;
    font-size: 1.1em;
    max-width: 600px;
    margin: 20px auto;
}

.blog-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 30px;
    margin-bottom: 50px;
}

.blog-card {
    background: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    transition: transform 0.3s;
}

.blog-card:hover {
    transform: translateY(-5px);
}

.blog-card-image {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

.blog-card-content {
    padding: 20px;
}

.blog-card h2 {
    color: #2c3e50;
    margin-bottom: 10px;
    font-size: 1.4em;
}

.blog-card-meta {
    color: #666;
    font-size: 0.9em;
    margin-bottom: 15px;
}

.blog-card-excerpt {
    color: #444;
    line-height: 1.6;
    margin-bottom: 15px;
}

.read-more {
    color: #4CAF50;
    text-decoration: none;
    font-weight: bold;
}

.read-more:hover {
    text-decoration: underline;
}

/* Blog Post Styles */
.blog-post {
    max-width: 800px;
    margin: 0 auto;
    padding: 20px;
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.blog-post-header {
    margin-bottom: 30px;
}

.blog-post-header h1 {
    color: #2c3e50;
    font-size: 2.5em;
    margin-bottom: 15px;
}

.post-meta {
    color: #666;
    font-size: 0.9em;
}

.reading-time {
    margin-left: 15px;
}

.blog-post-content {
    line-height: 1.8;
    color: #444;
}

.blog-post-content p {
    margin-bottom: 20px;
}

.blog-post-content h2 {
    color: #2c3e50;
    margin: 30px 0 15px;
}

.blog-post-navigation {
    margin-top: 40px;
    padding-top: 20px;
    border-top: 1px solid #eee;
}

.back-to-blog {
    color: #4CAF50;
    text-decoration: none;
    font-weight: bold;
}

.back-to-blog:hover {
    text-decoration: underline;
}

.blog-placeholder {
    grid-column: 1 / -1;
    text-align: center;
    padding: 50px 20px;
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    color: #666;
}

/* Product Recommendations Styles */
.product-recommendations {
    background-color: #f8f9fa;
    padding: 40px 20px;
    margin-top: 40px;
    border-top: 1px solid #e9ecef;
}

.product-recommendations h2 {
    text-align: center;
    margin-bottom: 30px;
    color: #2c3e50;
}

.product-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 30px;
    max-width: 1200px;
    margin: 0 auto;
}

.product-item {
    background: white;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
    width: 300px;
    text-align: center;
    transition: transform 0.3s ease;
}

.product-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

.product-item h3 {
    color: #2c3e50;
    margin-bottom: 15px;
    font-size: 1.2em;
}

.product-item p {
    color: #666;
    margin-bottom: 20px;
    line-height: 1.5;
}

.product-link {
    display: inline-block;
    color: #2c3e50;
    text-decoration: none;
    padding: 10px 25px;
    border: 2px solid #2c3e50;
    border-radius: 6px;
    transition: all 0.3s ease;
    font-weight: 600;
}

.product-link:hover {
    background-color: #2c3e50;
    color: white;
}

/* Expert Badge Styles */
.expert-badge {
    display: inline-block;
    color: #ffd700;
    margin-right: 8px;
    font-size: 1.2em;
    text-shadow: 0 1px 2px rgba(0,0,0,0.1);
    animation: shine 2s infinite;
}

@keyframes shine {
    0% { opacity: 1; }
    50% { opacity: 0.6; }
    100% { opacity: 1; }
}

/* New Sidebar Styles */
.main-content {
    display: flex;
    gap: 40px;
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

.calculator-section {
    flex: 1;
    max-width: 800px;
}

.sidebar {
    width: 300px;
    margin-top: 20px;
}

.sidebar-widget {
    background: #fff;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 30px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.sidebar-widget h3 {
    color: #2c3e50;
    font-size: 1.2em;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 2px solid #f0f2f5;
}

.quick-tip-item {
    display: flex;
    justify-content: space-between;
    margin-bottom: 10px;
    color: #555;
    font-size: 0.95em;
}

.popular-articles {
    list-style: none;
    padding: 0;
}

.popular-articles li {
    margin-bottom: 12px;
}

.popular-articles a {
    color: #2c3e50;
    text-decoration: none;
    font-size: 0.95em;
    display: block;
    padding: 5px 0;
    transition: color 0.3s ease;
}

.popular-articles a:hover {
    color: #3498db;
}

.pro-tools-item {
    display: flex;
    align-items: center;
    padding: 10px 0;
    border-bottom: 1px solid #f0f2f5;
    text-decoration: none;
    color: #2c3e50;
    transition: transform 0.2s ease;
}

.pro-tools-item:last-child {
    border-bottom: none;
}

.pro-tools-item:hover {
    transform: translateX(5px);
}

.pro-tools-icon {
    margin-right: 10px;
    color: #3498db;
}

/* Responsive Design */
@media (max-width: 1024px) {
    .main-content {
        flex-direction: column;
    }
    
    .sidebar {
        width: 100%;
        max-width: 800px;
        margin: 20px auto;
    }
}
