/* Rice Purity Test - Main Stylesheet */

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f8fafc;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    color: #1a202c;
    margin-bottom: 0.5em;
    font-weight: 600;
}

h1 { font-size: 2.5rem; }
h2 { font-size: 2rem; }
h3 { font-size: 1.5rem; }
h4 { font-size: 1.25rem; }

p {
    margin-bottom: 1rem;
    color: #4a5568;
}

a {
    color: #3182ce;
    text-decoration: none;
    transition: color 0.3s ease;
}

a:hover {
    color: #2c5aa0;
}

/* Container and Layout */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Header and Navigation */
header {
    background: #fff;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    position: sticky;
    top: 0;
    z-index: 1000;
}

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

.logo h2 {
    color: #3182ce;
    margin: 0;
    font-size: 1.5rem;
}

.hero h1 {
    color: white;
    font-size: 3rem;
    margin-bottom: 1rem;
}

.logo a {
    color: inherit;
    text-decoration: none;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 2rem;
}

.nav-menu a {
    color: #4a5568;
    font-weight: 500;
    padding: 0.5rem 1rem;
    border-radius: 6px;
    transition: all 0.3s ease;
}

.nav-menu a:hover,
.nav-menu a.active {
    color: #3182ce;
    background-color: #e6f3ff;
}

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

.hamburger span {
    width: 25px;
    height: 3px;
    background: #333;
    transition: 0.3s;
}

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

.hamburger.active span:nth-child(2) {
    opacity: 0;
}

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

/* Hero Section */
.hero {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 4rem 0;
    text-align: center;
}



.hero p {
    font-size: 1.2rem;
    margin-bottom: 2rem;
    color: rgba(255,255,255,0.9);
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.page-hero {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 3rem 0;
    text-align: center;
}

.page-hero h1 {
    color: white;
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.page-hero p {
    color: rgba(255,255,255,0.9);
    font-size: 1.1rem;
}

/* Buttons */
.cta-btn {
    background: #f56565;
    color: white;
    border: none;
    padding: 1rem 2rem;
    font-size: 1.1rem;
    font-weight: 600;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-block;
}

.cta-btn:hover {
    background: #e53e3e;
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(245, 101, 101, 0.4);
}

.share-btn {
    background: #48bb78;
    color: white;
    border: none;
    padding: 0.8rem 1.5rem;
    font-size: 1rem;
    font-weight: 500;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-left: 1rem;
}

.share-btn:hover {
    background: #38a169;
}

/* AdSense Ad Containers */
.ad-container {
    display: flex;
    justify-content: center;
    margin: 2rem 0;
    min-height: 90px;
}

.ad-placeholder {
    background: #f7fafc;
    border: 2px dashed #cbd5e0;
    padding: 2rem;
    text-align: center;
    color: #718096;
    font-size: 0.9rem;
    border-radius: 8px;
    width: 100%;
    max-width: 728px;
}

.ad-top {
    margin-top: 1rem;
}

.ad-middle {
    margin: 3rem 0;
}

.ad-bottom {
    margin-bottom: 1rem;
}

.ad-question-top {
    margin: 1rem 0;
}

.ad-question-bottom {
    margin: 1rem 0;
}

/* Test Section */
.test-container {
    padding: 3rem 0;
    background: white;
    margin: 2rem 0;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
}

.progress-bar {
    width: 100%;
    height: 8px;
    background: #e2e8f0;
    border-radius: 4px;
    margin-bottom: 2rem;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #48bb78, #38a169);
    width: 0%;
    transition: width 0.3s ease;
    border-radius: 4px;
}

.question-counter {
    text-align: center;
    font-size: 1.1rem;
    color: #718096;
    margin-bottom: 2rem;
}

.question-card {
    background: #f7fafc;
    padding: 2rem;
    border-radius: 12px;
    margin-bottom: 2rem;
    text-align: center;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

.question-card h3 {
    font-size: 1.3rem;
    margin-bottom: 2rem;
    color: #2d3748;
    line-height: 1.5;
}

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

.answer-btn {
    padding: 1rem 2rem;
    border: 2px solid transparent;
    border-radius: 8px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    min-width: 120px;
}

.answer-btn.yes {
    background: #f56565;
    color: white;
}

.answer-btn.yes:hover {
    background: #e53e3e;
    transform: translateY(-2px);
}

.answer-btn.no {
    background: #48bb78;
    color: white;
}

.answer-btn.no:hover {
    background: #38a169;
    transform: translateY(-2px);
}

.answer-btn.selected {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
}

.navigation-buttons {
    display: flex;
    justify-content: space-between;
    margin-top: 2rem;
}

.nav-btn {
    background: #cbd5e0;
    color: #4a5568;
    border: none;
    padding: 0.8rem 1.5rem;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 500;
}

.nav-btn:hover:not(:disabled) {
    background: #a0aec0;
}

.nav-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Result Section */
.result-container {
    padding: 3rem 0;
    text-align: center;
}

.result-card {
    background: white;
    padding: 3rem;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
    max-width: 600px;
    margin: 0 auto;
}

.score-display {
    font-size: 4rem;
    font-weight: 700;
    color: #3182ce;
    margin: 2rem 0;
}

.score-total {
    font-size: 2rem;
    color: #718096;
}

.score-meaning {
    font-size: 1.2rem;
    margin: 2rem 0;
    padding: 1rem;
    background: #f0fff4;
    border-left: 4px solid #48bb78;
    border-radius: 4px;
}

.disclaimer {
    color: #718096;
    font-style: italic;
    margin: 2rem 0;
}

/* Info Section */
.info-section {
    padding: 4rem 0;
    background: white;
}

.info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.info-card {
    padding: 2rem;
    background: #f7fafc;
    border-radius: 12px;
    text-align: center;
    transition: transform 0.3s ease;
}

.info-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0,0,0,0.1);
}

.info-card h3 {
    color: #3182ce;
    margin-bottom: 1rem;
}

/* Content Pages */
.content-section {
    padding: 3rem 0;
    background: white;
}

.content-grid {
    display: grid;
    grid-template-columns: 1fr 300px;
    gap: 3rem;
}

.content-main {
    line-height: 1.8;
}

.content-main h2 {
    color: #2d3748;
    margin-top: 2rem;
    margin-bottom: 1rem;
}

.content-main h3 {
    color: #4a5568;
    margin-top: 1.5rem;
    margin-bottom: 0.5rem;
}

.content-main ul {
    margin: 1rem 0;
    padding-left: 2rem;
}

.content-main li {
    margin-bottom: 0.5rem;
    color: #4a5568;
}

.sidebar-card {
    background: #f7fafc;
    padding: 1.5rem;
    border-radius: 8px;
    margin-bottom: 2rem;
}

.sidebar-card h4 {
    color: #3182ce;
    margin-bottom: 1rem;
}

.fact-list {
    list-style: none;
    padding: 0;
}

.fact-list li {
    padding: 0.5rem 0;
    border-bottom: 1px solid #e2e8f0;
}

.fact-list li:last-child {
    border-bottom: none;
}

.score-ranges {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.score-range {
    display: flex;
    justify-content: space-between;
    padding: 0.5rem;
    background: white;
    border-radius: 4px;
}

.range {
    font-weight: 600;
    color: #3182ce;
}

.label {
    color: #4a5568;
}

.cta-section {
    background: #f0fff4;
    padding: 2rem;
    border-radius: 8px;
    text-align: center;
    margin: 2rem 0;
}

/* Contact Page */
.contact-section {
    padding: 3rem 0;
    background: white;
}

.contact-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
}

.contact-info h2 {
    color: #2d3748;
    margin-bottom: 1rem;
}

.contact-methods {
    margin: 2rem 0;
}

.contact-method {
    background: #f7fafc;
    padding: 1.5rem;
    border-radius: 8px;
    margin-bottom: 1rem;
}

.contact-method h3 {
    color: #3182ce;
    margin-bottom: 0.5rem;
}

.contact-method a {
    font-weight: 600;
    color: #3182ce;
}

.response-time {
    background: #fff5d6;
    padding: 1rem;
    border-radius: 6px;
    border-left: 4px solid #f6ad55;
}

.contact-form {
    background: #f7fafc;
    padding: 2rem;
    border-radius: 12px;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: #2d3748;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 0.8rem;
    border: 2px solid #e2e8f0;
    border-radius: 6px;
    font-size: 1rem;
    transition: border-color 0.3s ease;
    font-family: inherit;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #3182ce;
    box-shadow: 0 0 0 3px rgba(49, 130, 206, 0.1);
}

.checkbox-group {
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
}

.checkbox-label {
    display: flex;
    align-items: center;
    cursor: pointer;
    font-size: 0.9rem;
}

.checkbox-label input[type="checkbox"] {
    margin-right: 0.5rem;
    width: auto;
}

.submit-btn {
    background: #3182ce;
    color: white;
    border: none;
    padding: 1rem 2rem;
    border-radius: 6px;
    cursor: pointer;
    font-size: 1rem;
    font-weight: 600;
    transition: all 0.3s ease;
    width: 100%;
}

.submit-btn:hover {
    background: #2c5aa0;
}

.submit-btn:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

.error-message {
    color: #e53e3e;
    font-size: 0.9rem;
    margin-top: 0.5rem;
    display: block;
}

.success-message {
    background: #f0fff4;
    border: 1px solid #9ae6b4;
    color: #276749;
    padding: 1rem;
    border-radius: 6px;
    margin-top: 1rem;
}

.error-message-general {
    background: #fed7d7;
    border: 1px solid #feb2b2;
    color: #c53030;
    padding: 1rem;
    border-radius: 6px;
    margin-top: 1rem;
}

.faq-section {
    padding: 3rem 0;
    background: #f7fafc;
}

.faq-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.faq-item {
    background: white;
    padding: 1.5rem;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

.faq-item h3 {
    color: #3182ce;
    margin-bottom: 1rem;
}

/* Privacy Page */
.privacy-content {
    padding: 3rem 0;
    background: white;
}

.privacy-text {
    max-width: 800px;
    margin: 0 auto;
    line-height: 1.8;
}

.privacy-text h2 {
    color: #2d3748;
    margin-top: 2rem;
    margin-bottom: 1rem;
}

.privacy-text h3 {
    color: #4a5568;
    margin-top: 1.5rem;
    margin-bottom: 0.5rem;
}

.privacy-text h4 {
    color: #4a5568;
    margin-top: 1rem;
    margin-bottom: 0.5rem;
}

.privacy-text ul {
    margin: 1rem 0;
    padding-left: 2rem;
}

.privacy-text li {
    margin-bottom: 0.5rem;
    color: #4a5568;
}

.privacy-summary {
    background: #f0f9ff;
    padding: 2rem;
    border-radius: 8px;
    margin: 2rem 0;
}

.summary-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin-top: 1rem;
}

.summary-item {
    text-align: center;
    padding: 1rem;
}

.summary-item h4 {
    color: #3182ce;
    margin-bottom: 0.5rem;
}

.summary-item p {
    font-size: 0.9rem;
    color: #4a5568;
}

/* Footer */
footer {
    background: #2d3748;
    color: white;
    padding: 3rem 0 1rem;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

.footer-section h4 {
    color: white;
    margin-bottom: 1rem;
}

.footer-section p {
    color: #a0aec0;
    margin-bottom: 0.5rem;
}

.footer-section ul {
    list-style: none;
}

.footer-section ul li {
    margin-bottom: 0.5rem;
}

.footer-section ul li a {
    color: #a0aec0;
    transition: color 0.3s ease;
}

.footer-section ul li a:hover {
    color: white;
}

.footer-bottom {
    border-top: 1px solid #4a5568;
    padding-top: 1rem;
    text-align: center;
}

.footer-bottom p {
    color: #a0aec0;
    margin: 0;
}

/* Responsive Design */
@media (max-width: 768px) {
    .hamburger {
        display: flex;
    }
    
    .nav-menu {
        position: fixed;
        left: -100%;
        top: 70px;
        flex-direction: column;
        background-color: white;
        width: 100%;
        text-align: center;
        transition: 0.3s;
        box-shadow: 0 10px 27px rgba(0,0,0,0.05);
        padding: 2rem 0;
    }
    
    .nav-menu.active {
        left: 0;
    }
    
    .nav-menu li {
        margin: 0.5rem 0;
    }
    
    .hero h2 {
        font-size: 2rem;
    }
    
    .page-hero h1 {
        font-size: 2rem;
    }
    
    .answer-buttons {
        flex-direction: column;
        align-items: center;
    }
    
    .answer-btn {
        width: 100%;
        max-width: 200px;
    }
    
    .navigation-buttons {
        flex-direction: column;
        gap: 1rem;
    }
    
    .nav-btn {
        width: 100%;
    }
    
    .content-grid {
        grid-template-columns: 1fr;
    }
    
    .contact-grid {
        grid-template-columns: 1fr;
    }
    
    .score-display {
        font-size: 3rem;
    }
    
    .info-grid {
        grid-template-columns: 1fr;
    }
    
    .faq-grid {
        grid-template-columns: 1fr;
    }
    
    .summary-grid {
        grid-template-columns: 1fr;
    }
    
    .footer-content {
        grid-template-columns: 1fr;
        text-align: center;
    }
    
    .ad-placeholder {
        padding: 1rem;
        font-size: 0.8rem;
    }
    
    h1 { font-size: 2rem; }
    h2 { font-size: 1.75rem; }
    h3 { font-size: 1.25rem; }
}

@media (max-width: 480px) {
    .container {
        padding: 0 15px;
    }
    
    .hero,
    .page-hero {
        padding: 2rem 0;
    }
    
    .hero h2 {
        font-size: 1.75rem;
    }
    
    .page-hero h1 {
        font-size: 1.75rem;
    }
    
    .test-container,
    .result-card {
        padding: 1.5rem;
    }
    
    .question-card {
        padding: 1.5rem;
    }
    
    .contact-form {
        padding: 1.5rem;
    }
    
    .score-display {
        font-size: 2.5rem;
    }
}

/* Loading States */
.btn-loading {
    display: inline-block;
}

.loading {
    opacity: 0.7;
    pointer-events: none;
}

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

/* Focus states for accessibility */
button:focus,
input:focus,
select:focus,
textarea:focus,
a:focus {
    outline: 2px solid #3182ce;
    outline-offset: 2px;
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .answer-btn,
    .cta-btn,
    .submit-btn {
        border: 2px solid currentColor;
    }
}
