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

body {
    font-family: Georgia, serif;
    line-height: 1.6;
    color: #2c1810;
    background: #f4e6d4;
    /* Papyrus-style background */
    background-image: 
        radial-gradient(circle at 25% 25%, #e8d5b7 2px, transparent 2px),
        radial-gradient(circle at 75% 75%, #e0c9a6 1px, transparent 1px),
        linear-gradient(45deg, #f4e6d4 25%, transparent 25%),
        linear-gradient(-45deg, #f0e0d0 25%, transparent 25%);
    background-size: 60px 60px, 40px 40px, 20px 20px, 20px 20px;
    min-height: 100vh;
}

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

/* Header */
.header {
    background: rgba(255, 140, 0, 0.9);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    position: sticky;
    top: 0;
    z-index: 100;
    border-bottom: 3px solid #d2691e;
}

.header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
}

.logo img {
    height: 50px;
    width: auto;
}

.nav {
    display: flex;
    gap: 30px;
}

.nav-link {
    color: white;
    text-decoration: none;
    font-weight: bold;
    font-size: 18px;
    padding: 10px 20px;
    border-radius: 25px;
    transition: all 0.3s ease;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.3);
}

.nav-link:hover,
.nav-link.active {
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-2px);
}

/* Main content */
.main {
    padding: 40px 0;
    min-height: calc(100vh - 120px);
}

/* Hero section */
.hero {
    text-align: center;
    margin-bottom: 60px;
    padding: 40px 0;
    background: rgba(255, 140, 0, 0.1);
    border-radius: 15px;
    border: 2px solid rgba(255, 140, 0, 0.3);
}

.hero h1 {
    font-size: 3rem;
    color: #d2691e;
    margin-bottom: 20px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.1);
}

.hero p {
    font-size: 1.3rem;
    color: #8b4513;
}

/* Topics grid */
.topics-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
    margin-bottom: 40px;
}

.topic-card {
    background: rgba(255, 255, 255, 0.9);
    border-radius: 15px;
    padding: 25px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    border: 2px solid rgba(255, 140, 0, 0.2);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.topic-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.2);
    border-color: #ff8c00;
}

.topic-image {
    width: 100%;
    height: 200px;
    margin-bottom: 20px;
    border-radius: 10px;
    overflow: hidden;
    border: 2px solid rgba(255, 140, 0, 0.3);
}

.topic-image img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    transition: transform 0.3s ease;
}

.topic-card:hover .topic-image img {
    transform: scale(1.05);
}

.topic-card h3 {
    color: #d2691e;
    font-size: 1.4rem;
    font-weight: bold;
    margin: 0;
}

/* Topic detail pages */
.topic-detail {
    max-width: 800px;
    margin: 0 auto;
}

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

.topic-hero-image {
    width: 100%;
    max-width: 400px;
    height: 250px;
    object-fit: contain;
    border-radius: 15px;
    margin-bottom: 30px;
    border: 3px solid #ff8c00;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
    background: rgba(255, 255, 255, 0.9);
}

.topic-header h1 {
    font-size: 2.5rem;
    color: #d2691e;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.1);
}

.resources-grid {
    display: grid;
    gap: 30px;
    margin-bottom: 40px;
}

.resource-category {
    background: rgba(255, 255, 255, 0.9);
    padding: 30px;
    border-radius: 15px;
    border: 2px solid rgba(255, 140, 0, 0.3);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.resource-category h3 {
    color: #d2691e;
    font-size: 1.5rem;
    margin-bottom: 20px;
    border-bottom: 2px solid #ff8c00;
    padding-bottom: 10px;
}

.resource-list {
    list-style: none;
}

.resource-list li {
    margin-bottom: 12px;
}

.resource-list a {
    color: #8b4513;
    text-decoration: none;
    font-size: 1.1rem;
    padding: 8px 0;
    border-left: 4px solid #ff8c00;
    padding-left: 15px;
    display: block;
    transition: all 0.3s ease;
    border-radius: 0 5px 5px 0;
}

.resource-list a:hover {
    background: rgba(255, 140, 0, 0.1);
    color: #d2691e;
    transform: translateX(5px);
}

/* Back button */
.back-to-home {
    text-align: center;
    margin-top: 40px;
}

.back-btn {
    display: inline-block;
    background: #ff8c00;
    color: white;
    padding: 12px 30px;
    text-decoration: none;
    border-radius: 25px;
    font-weight: bold;
    transition: all 0.3s ease;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.3);
}

.back-btn:hover {
    background: #d2691e;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

/* Contact page */
.contact-section {
    max-width: 600px;
    margin: 0 auto;
    text-align: center;
}

.contact-section h1 {
    font-size: 2.5rem;
    color: #d2691e;
    margin-bottom: 30px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.1);
}

.contact-content {
    background: rgba(255, 255, 255, 0.9);
    padding: 40px;
    border-radius: 15px;
    border: 2px solid rgba(255, 140, 0, 0.3);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.contact-info {
    margin-bottom: 40px;
    text-align: left;
}

.contact-info h3 {
    color: #d2691e;
    margin-bottom: 15px;
}

.contact-form {
    text-align: left;
}

.contact-form h3 {
    color: #d2691e;
    margin-bottom: 20px;
    text-align: center;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 5px;
    color: #8b4513;
    font-weight: bold;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 12px;
    border: 2px solid rgba(255, 140, 0, 0.3);
    border-radius: 8px;
    font-size: 16px;
    font-family: Georgia, serif;
    background: rgba(255, 255, 255, 0.9);
    transition: border-color 0.3s ease;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #ff8c00;
}

.submit-btn {
    background: #ff8c00;
    color: white;
    padding: 12px 30px;
    border: none;
    border-radius: 25px;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.3);
    display: block;
    margin: 20px auto 0;
}

.submit-btn:hover {
    background: #d2691e;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

/* Advertisement section */
.ad-section {
    text-align: center;
    margin: 40px 0;
    padding: 20px;
    background: rgba(255, 255, 255, 0.5);
    border-radius: 10px;
    border: 1px solid rgba(255, 140, 0, 0.2);
    position: relative;
}

/* Development placeholder for ads */
.ad-section::before {
    content: "📱 Advertisement will appear here when live on grammarlane.com";
    display: block;
    background: rgba(255, 140, 0, 0.1);
    border: 2px dashed #ff8c00;
    padding: 20px;
    border-radius: 8px;
    color: #d2691e;
    font-style: italic;
    margin-bottom: 10px;
    font-size: 14px;
}

/* Footer */
.footer {
    background: rgba(255, 140, 0, 0.9);
    border-top: 3px solid #d2691e;
    padding: 20px 0;
    margin-top: auto;
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
}

.footer-logo img {
    height: 40px;
    width: auto;
}

.footer-stats {
    display: flex;
    gap: 30px;
    color: white;
    font-weight: bold;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.3);
}

/* Responsive design */
@media (max-width: 768px) {
    .header .container {
        flex-direction: column;
        gap: 20px;
    }

    .nav {
        gap: 15px;
    }

    .nav-link {
        padding: 8px 15px;
        font-size: 16px;
    }

    .hero h1 {
        font-size: 2rem;
    }

    .hero p {
        font-size: 1.1rem;
    }

    .topics-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .topic-card {
        padding: 20px;
    }

    .topic-image {
        height: 180px;
    }

    .topic-header h1 {
        font-size: 2rem;
    }

    .topic-hero-image {
        max-width: 100%;
        height: 200px;
    }

    .resource-category {
        padding: 20px;
    }

    .contact-content {
        padding: 25px;
    }

    .footer-content {
        flex-direction: column;
        gap: 15px;
        text-align: center;
    }

    .footer-stats {
        gap: 20px;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 15px;
    }

    .main {
        padding: 20px 0;
    }

    .hero {
        padding: 25px 0;
        margin-bottom: 40px;
    }

    .hero h1 {
        font-size: 1.8rem;
    }

    .topic-card h3 {
        font-size: 1.2rem;
    }

    .resource-list a {
        font-size: 1rem;
    }

    .footer-stats {
        flex-direction: column;
        gap: 10px;
    }
}

/* Verb Patterns Page Specific Styles */
.verb-patterns-content {
    max-width: 800px;
    margin: 0 auto;
}

.concept-section, .patterns-section, .rules-section, .exercise-section, .summary-section {
    background: white;
    margin: 30px 0;
    padding: 30px;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.explanation-box {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 8px;
    border-left: 4px solid #FF8C00;
}

.examples ul {
    list-style: none;
    padding: 15px 0 0 0;
}

.examples li {
    padding: 8px 0;
    font-size: 1.1rem;
    border-bottom: 1px solid #eee;
}

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

.pattern-cards {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin: 20px 0;
}

.pattern-card {
    background: #e8f4fd;
    padding: 20px;
    border-radius: 8px;
    border: 2px solid #FF8C00;
}

.pattern-card h3 {
    color: #FF8C00;
    margin-bottom: 15px;
}

.pattern-examples p {
    margin: 10px 0;
    font-size: 1.1rem;
}

.rule-card {
    background: #fff8e1;
    padding: 25px;
    border-radius: 8px;
    margin: 20px 0;
    border: 1px solid #FFB84D;
}

.rule-card h3 {
    color: #FF8C00;
    margin-bottom: 10px;
}

.rule-examples ul {
    list-style: none;
    padding: 10px 0;
}

.rule-examples li {
    padding: 8px 0;
    border-bottom: 1px solid #f0f0f0;
}

.rule-examples li:last-child {
    border-bottom: none;
}

.difference-examples {
    margin: 20px 0;
}

.comparison-pair {
    background: #f5f5f5;
    padding: 20px;
    margin: 15px 0;
    border-radius: 8px;
    border: 1px solid #ddd;
}

.sentence-pair {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 15px;
}

.sentence-a, .sentence-b {
    background: white;
    padding: 15px;
    border-radius: 6px;
    text-align: center;
    font-weight: bold;
    border: 2px solid #FF8C00;
}

.explanation {
    background: #e8f4fd;
    padding: 15px;
    border-radius: 6px;
    border-left: 4px solid #FF8C00;
}

.explanation p {
    margin: 5px 0;
}

.toggle-btn {
    background: #FF8C00;
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 1rem;
    font-weight: bold;
    transition: background 0.3s ease;
}

.toggle-btn:hover {
    background: #e67700;
}

.summary-boxes {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 25px;
    margin: 20px 0;
}

.summary-box {
    background: linear-gradient(135deg, #FF8C00, #FFA500);
    color: white;
    padding: 25px;
    border-radius: 10px;
    text-align: center;
}

.summary-box h3 {
    margin-bottom: 15px;
    font-size: 1.3rem;
}

.summary-examples p {
    margin: 8px 0;
    font-style: italic;
}

/* Quick Test Section Styles */
.quick-test-section {
    background: white;
    margin: 30px 0;
    padding: 30px;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.test-questions {
    margin: 20px 0;
}

.question-item {
    background: #f8f9fa;
    padding: 20px;
    margin: 15px 0;
    border-radius: 8px;
    border-left: 4px solid #FF8C00;
}

.question-item p {
    font-size: 1.1rem;
    margin-bottom: 10px;
    font-weight: bold;
}

.answer {
    background: #e8f4fd;
    padding: 15px;
    border-radius: 6px;
    margin-top: 10px;
    border: 1px solid #FF8C00;
}

.answer p {
    margin: 0;
    font-weight: bold;
    color: #FF8C00;
}

@media (max-width: 768px) {
    .pattern-cards {
        grid-template-columns: 1fr;
    }
    
    .sentence-pair {
        grid-template-columns: 1fr;
        gap: 10px;
    }
    
    .summary-boxes {
        grid-template-columns: 1fr;
    }
    
    .quick-test-section {
        padding: 20px;
    }
    
    .question-item {
        padding: 15px;
    }
}
