/* Hand-drawn CSS Styles for Personal Finance Course Website */

/* CSS Variables for Hand-drawn Theme */
:root {
    --primary-color: #2C5AA0;
    --secondary-color: #FFC107;
    --accent-color: #E91E63;
    --text-dark: #2C3E50;
    --text-light: #7F8C8D;
    --white: #FFFFFF;
    --light-gray: #F8F9FA;
    --border-color: #E9ECEF;
    --success: #28A745;
    --warning: #FFC107;
    --danger: #DC3545;
    
    /* Hand-drawn style variables */
    --sketchy-border: 2px solid var(--text-dark);
    --shadow-hand: 3px 3px 0px rgba(0,0,0,0.1);
    --border-radius: 15px;
}

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

body {
    font-family: 'Comic Sans MS', cursive, sans-serif;
    line-height: 1.6;
    color: var(--text-dark);
    background: var(--white);
    overflow-x: hidden;
}

/* Hand-drawn decorative elements */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Hand-drawn borders and shapes */
.sketchy-border {
    border: var(--sketchy-border);
    border-radius: var(--border-radius);
    position: relative;
}

.sketchy-border::before {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    border: 2px solid var(--primary-color);
    border-radius: var(--border-radius);
    transform: rotate(-1deg);
    z-index: -1;
}

/* Typography with hand-drawn feel */
h1, h2, h3, h4, h5, h6 {
    font-family: 'Comic Sans MS', cursive, sans-serif;
    font-weight: bold;
    margin-bottom: 1rem;
    transform: rotate(-0.5deg);
}

h1 {
    font-size: 2.5rem;
    color: var(--primary-color);
    text-shadow: 2px 2px 0px var(--secondary-color);
}

h2 {
    font-size: 2rem;
    color: var(--text-dark);
    border-bottom: 3px wavy var(--secondary-color);
    padding-bottom: 0.5rem;
}

h3 {
    font-size: 1.5rem;
    color: var(--primary-color);
}

p {
    margin-bottom: 1rem;
    transform: rotate(0.2deg);
}

/* Buttons with hand-drawn style */
.btn {
    display: inline-block;
    padding: 12px 24px;
    border: var(--sketchy-border);
    border-radius: var(--border-radius);
    background: var(--white);
    color: var(--text-dark);
    text-decoration: none;
    font-family: inherit;
    font-size: 1rem;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    transform: rotate(-1deg);
    box-shadow: var(--shadow-hand);
}

.btn:hover {
    transform: rotate(1deg) translateY(-2px);
    box-shadow: 5px 5px 0px rgba(0,0,0,0.2);
}

.btn-primary {
    background: var(--primary-color);
    color: var(--white);
    border-color: var(--primary-color);
}

.btn-secondary {
    background: var(--secondary-color);
    color: var(--text-dark);
    border-color: var(--secondary-color);
}

.btn-outline {
    background: transparent;
    color: var(--primary-color);
    border-color: var(--primary-color);
}

.btn-outline:hover {
    background: var(--primary-color);
    color: var(--white);
}

/* Header with hand-drawn navigation */
.header {
    background: var(--white);
    border-bottom: 3px solid var(--primary-color);
    padding: 1rem 0;
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

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

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1.2rem;
    font-weight: bold;
    color: var(--primary-color);
}

.logo img {
    width: 40px;
    height: 40px;
}

.nav {
    display: flex;
    gap: 2rem;
}

.nav a {
    text-decoration: none;
    color: var(--text-dark);
    font-weight: bold;
    padding: 0.5rem 1rem;
    border-radius: var(--border-radius);
    transition: all 0.3s ease;
    position: relative;
}

.nav a:hover {
    background: var(--secondary-color);
    transform: rotate(-2deg);
    box-shadow: var(--shadow-hand);
}

.mobile-menu-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
}

.mobile-nav {
    display: none;
    position: fixed;
    top: 80px;
    left: 0;
    right: 0;
    background: var(--white);
    border-bottom: 3px solid var(--primary-color);
    padding: 1rem;
    z-index: 999;
}

.mobile-nav a {
    display: block;
    padding: 1rem;
    text-decoration: none;
    color: var(--text-dark);
    border-bottom: 1px dashed var(--border-color);
}

/* Hero Section with hand-drawn graphics */
.hero {
    padding: 120px 0 80px;
    background: linear-gradient(135deg, var(--light-gray) 0%, var(--white) 100%);
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: 
        radial-gradient(circle at 20% 50%, var(--secondary-color) 2px, transparent 2px),
        radial-gradient(circle at 80% 30%, var(--primary-color) 1px, transparent 1px);
    background-size: 60px 60px, 40px 40px;
    opacity: 0.1;
    z-index: 0;
}

.hero-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    align-items: center;
    position: relative;
    z-index: 1;
}

.hero-text h1 {
    font-size: 3rem;
    margin-bottom: 1.5rem;
    transform: rotate(-1deg);
}

.hero-text p {
    font-size: 1.2rem;
    margin-bottom: 2rem;
    color: var(--text-light);
}

.hero-buttons {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.hero-graphic img {
    width: 100%;
    max-width: 500px;
    height: auto;
    transform: rotate(2deg);
    filter: drop-shadow(var(--shadow-hand));
}

/* Sections with hand-drawn styling */
section {
    padding: 80px 0;
    position: relative;
}

.section-header {
    text-align: center;
    margin-bottom: 3rem;
}

.section-header h2 {
    margin-bottom: 1rem;
}

.section-header p {
    font-size: 1.1rem;
    color: var(--text-light);
    max-width: 600px;
    margin: 0 auto;
}

/* About Section */
.about {
    background: var(--white);
}

.about-content {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 3rem;
    align-items: center;
}

.about-text h3 {
    margin-bottom: 1.5rem;
}

.about-text ul {
    list-style: none;
    margin-bottom: 2rem;
}

.about-text li {
    padding: 0.5rem 0;
    position: relative;
    padding-left: 2rem;
}

.about-text li::before {
    content: '✓';
    position: absolute;
    left: 0;
    color: var(--success);
    font-weight: bold;
    font-size: 1.2rem;
}

.about-graphic img {
    width: 100%;
    transform: rotate(-3deg);
    filter: drop-shadow(var(--shadow-hand));
}

/* Services Section */
.services {
    background: var(--light-gray);
    position: relative;
}

.services::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: repeating-linear-gradient(
        90deg,
        var(--primary-color) 0px,
        var(--primary-color) 10px,
        transparent 10px,
        transparent 20px
    );
}

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

.service-card {
    background: var(--white);
    padding: 2rem;
    border-radius: var(--border-radius);
    text-align: center;
    position: relative;
    transform: rotate(-1deg);
    box-shadow: var(--shadow-hand);
    border: 2px solid var(--primary-color);
}

.service-card:nth-child(even) {
    transform: rotate(1deg);
}

.service-card img {
    width: 80px;
    height: 80px;
    margin-bottom: 1.5rem;
    filter: drop-shadow(2px 2px 0px var(--secondary-color));
}

.service-card h3 {
    margin-bottom: 1rem;
    color: var(--primary-color);
}

/* Testimonials Section */
.testimonials {
    background: var(--white);
}

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

.testimonial-card {
    background: var(--light-gray);
    padding: 2rem;
    border-radius: var(--border-radius);
    position: relative;
    transform: rotate(1deg);
    border-left: 4px solid var(--secondary-color);
    box-shadow: var(--shadow-hand);
}

.testimonial-card:nth-child(even) {
    transform: rotate(-1deg);
    border-left-color: var(--primary-color);
}

.testimonial-content {
    margin-bottom: 1.5rem;
    font-style: italic;
}

.testimonial-author strong {
    display: block;
    color: var(--primary-color);
    margin-bottom: 0.25rem;
}

.testimonial-author span {
    color: var(--text-light);
    font-size: 0.9rem;
}

/* Blog Section */
.blog {
    background: var(--light-gray);
}

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

.blog-card {
    background: var(--white);
    border-radius: var(--border-radius);
    overflow: hidden;
    position: relative;
    transform: rotate(-0.5deg);
    box-shadow: var(--shadow-hand);
    border: 2px solid var(--primary-color);
    transition: all 0.3s ease;
}

.blog-card:hover {
    transform: rotate(0.5deg) translateY(-5px);
    box-shadow: 6px 6px 0px rgba(0,0,0,0.2);
}

.blog-card:nth-child(even) {
    transform: rotate(0.5deg);
}

.blog-card:nth-child(even):hover {
    transform: rotate(-0.5deg) translateY(-5px);
}

.blog-card img {
    width: 100%;
    height: 150px;
    object-fit: cover;
    border-bottom: 2px solid var(--primary-color);
}

.blog-content {
    padding: 1.5rem;
}

.blog-content h3 a {
    color: var(--primary-color);
    text-decoration: none;
    transition: color 0.3s ease;
}

.blog-content h3 a:hover {
    color: var(--accent-color);
}

.blog-date {
    color: var(--text-light);
    font-size: 0.9rem;
}

/* Blog Article Sections */
.blog-article {
    padding: 120px 0 80px;
    background: var(--white);
}

.blog-article.hidden {
    display: none;
}

/* Subscription Section */
.subscription {
    background: var(--primary-color);
    color: var(--white);
    position: relative;
}

.subscription::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: 
        radial-gradient(circle at 30% 70%, var(--secondary-color) 2px, transparent 2px);
    background-size: 50px 50px;
    opacity: 0.1;
}

.subscription-content {
    text-align: center;
    max-width: 600px;
    margin: 0 auto;
    position: relative;
    z-index: 1;
}

.subscription-content h2 {
    color: var(--white);
    margin-bottom: 1rem;
}

.subscription-content p {
    font-size: 1.1rem;
    margin-bottom: 2rem;
    opacity: 0.9;
}

.subscription-form {
    display: grid;
    gap: 1.5rem;
}

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

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: bold;
}

.form-group input {
    width: 100%;
    padding: 12px;
    border: 2px solid var(--white);
    border-radius: var(--border-radius);
    font-family: inherit;
    font-size: 1rem;
    background: var(--white);
    color: var(--text-dark);
}

.form-group input:focus {
    outline: none;
    border-color: var(--secondary-color);
    box-shadow: 0 0 0 3px rgba(255, 193, 7, 0.3);
}

/* Legal Section */
.legal {
    background: var(--light-gray);
    text-align: center;
}

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

.legal-link {
    color: var(--primary-color);
    text-decoration: none;
    padding: 0.5rem 1rem;
    border: 2px solid var(--primary-color);
    border-radius: var(--border-radius);
    transition: all 0.3s ease;
    transform: rotate(-1deg);
}

.legal-link:hover {
    background: var(--primary-color);
    color: var(--white);
    transform: rotate(1deg);
}

/* Modals */
.legal-modal, .cookie-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 2000;
}

.legal-modal.hidden, .cookie-modal.hidden {
    display: none;
}

.legal-modal-content, .cookie-modal-content {
    background: var(--white);
    padding: 2rem;
    border-radius: var(--border-radius);
    max-width: 800px;
    max-height: 85vh;
    overflow-y: auto;
    position: relative;
    border: 3px solid var(--primary-color);
    box-shadow: var(--shadow-hand);
    margin: 1rem;
}

/* Legal document styling */
.legal-modal-content h4 {
    color: var(--primary-color);
    margin-top: 1.5rem;
    margin-bottom: 1rem;
    font-size: 1.2rem;
    border-bottom: 2px solid var(--secondary-color);
    padding-bottom: 0.5rem;
}

.legal-modal-content h5 {
    color: var(--text-dark);
    margin-top: 1rem;
    margin-bottom: 0.5rem;
    font-size: 1rem;
}

.legal-modal-content ul {
    margin-bottom: 1rem;
    padding-left: 1.5rem;
}

.legal-modal-content li {
    margin-bottom: 0.5rem;
    line-height: 1.5;
}

.legal-modal-content strong {
    color: var(--primary-color);
}

.legal-modal-content em {
    color: var(--text-light);
    font-style: italic;
}

.legal-modal-content a {
    color: var(--primary-color);
    text-decoration: underline;
}

.legal-modal-content a:hover {
    color: var(--accent-color);
}

/* Cookie Banner */
.cookie-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: var(--white);
    border-top: 3px solid var(--primary-color);
    padding: 1.5rem;
    z-index: 1500;
    box-shadow: 0 -2px 10px rgba(0,0,0,0.1);
}

.cookie-banner.hidden {
    display: none;
}

.cookie-content h3 {
    margin-bottom: 1rem;
    color: var(--primary-color);
}

.cookie-buttons {
    display: flex;
    gap: 1rem;
    margin-top: 1rem;
    flex-wrap: wrap;
}

.cookie-category {
    margin-bottom: 1.5rem;
    padding: 1rem;
    border: 2px dashed var(--border-color);
    border-radius: var(--border-radius);
}

.cookie-toggle {
    display: flex;
    align-items: center;
    gap: 1rem;
    cursor: pointer;
    font-weight: bold;
}

.cookie-toggle input[type="checkbox"] {
    display: none;
}

.slider {
    width: 50px;
    height: 25px;
    background: var(--border-color);
    border-radius: 25px;
    position: relative;
    transition: background 0.3s ease;
}

.slider::before {
    content: '';
    position: absolute;
    top: 2px;
    left: 2px;
    width: 21px;
    height: 21px;
    background: var(--white);
    border-radius: 50%;
    transition: transform 0.3s ease;
}

.cookie-toggle input[type="checkbox"]:checked + .slider {
    background: var(--primary-color);
}

.cookie-toggle input[type="checkbox"]:checked + .slider::before {
    transform: translateX(25px);
}

.cookie-modal-buttons {
    display: flex;
    gap: 1rem;
    margin-top: 2rem;
    justify-content: center;
}

/* Footer */
.footer {
    background: var(--text-dark);
    color: var(--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 h3 {
    color: var(--secondary-color);
    margin-bottom: 1rem;
}

.contact-info p {
    margin-bottom: 1rem;
    line-height: 1.5;
}

.footer-links {
    list-style: none;
}

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

.footer-links a {
    color: var(--white);
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer-links a:hover {
    color: var(--secondary-color);
}

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

.social-links a {
    display: inline-block;
    width: 40px;
    height: 40px;
    background: var(--primary-color);
    color: var(--white);
    text-align: center;
    line-height: 40px;
    border-radius: 50%;
    text-decoration: none;
    font-size: 1.2rem;
    transition: all 0.3s ease;
}

.social-links a:hover {
    background: var(--secondary-color);
    transform: rotate(-5deg) scale(1.1);
}

.footer-bottom {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid rgba(255,255,255,0.1);
    color: var(--text-light);
}

/* Thanks Page */
.thanks-page {
    padding: 120px 0 80px;
    text-align: center;
}

.thanks-content {
    max-width: 600px;
    margin: 0 auto;
}

.thanks-info {
    background: var(--light-gray);
    padding: 2rem;
    border-radius: var(--border-radius);
    margin: 2rem 0;
    text-align: left;
    border: 2px solid var(--primary-color);
    transform: rotate(-1deg);
    box-shadow: var(--shadow-hand);
}

.thanks-info ul {
    list-style: none;
    margin-top: 1rem;
}

.thanks-info li {
    padding: 0.5rem 0;
    position: relative;
    padding-left: 2rem;
}

.thanks-info li::before {
    content: '→';
    position: absolute;
    left: 0;
    color: var(--primary-color);
    font-weight: bold;
}

.thanks-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

/* Responsive Design */
@media (max-width: 768px) {
    .mobile-menu-toggle {
        display: block;
    }
    
    .nav {
        display: none;
    }
    
    .mobile-nav {
        display: block;
    }
    
    .mobile-nav.hidden {
        display: none;
    }
    
    .hero-content {
        grid-template-columns: 1fr;
        text-align: center;
    }
    
    .hero-text h1 {
        font-size: 2rem;
    }
    
    .about-content {
        grid-template-columns: 1fr;
    }
    
    .services-grid {
        grid-template-columns: 1fr;
    }
    
    .testimonials-grid {
        grid-template-columns: 1fr;
    }
    
    .blog-grid {
        grid-template-columns: 1fr;
    }
    
    .legal-links {
        flex-direction: column;
        align-items: center;
    }
    
    .cookie-buttons {
        flex-direction: column;
    }
    
    .footer-content {
        grid-template-columns: 1fr;
        text-align: center;
    }
    
    .thanks-actions {
        flex-direction: column;
        align-items: center;
    }
    
    .hero-buttons {
        justify-content: center;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 15px;
    }
    
    .hero {
        padding: 100px 0 60px;
    }
    
    section {
        padding: 60px 0;
    }
    
    .hero-text h1 {
        font-size: 1.8rem;
    }
    
    .service-card,
    .testimonial-card,
    .blog-card {
        padding: 1.5rem;
    }
    
    .legal-modal-content,
    .cookie-modal-content {
        margin: 1rem;
        padding: 1.5rem;
    }
}

/* Utility Classes */
.hidden {
    display: none !important;
}

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

.mb-2 {
    margin-bottom: 2rem;
}

.mt-2 {
    margin-top: 2rem;
}

/* Animations */
@keyframes wiggle {
    0%, 100% { transform: rotate(-1deg); }
    50% { transform: rotate(1deg); }
}

.wiggle:hover {
    animation: wiggle 0.5s ease-in-out;
}

/* Smooth scrolling */
html {
    scroll-behavior: smooth;
}

/* Focus styles for accessibility */
button:focus,
input:focus,
a:focus {
    outline: 2px solid var(--secondary-color);
    outline-offset: 2px;
}
