/* Import Google Fonts */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&family=Poppins:wght@600;700;800&family=Patrick+Hand&family=Quicksand:wght@500;600&display=swap');

/* CSS Variables - Design System */
:root {
    --primary-bg: #f8f9fa;
    --secondary-bg: #e9ecef;
    --content-bg: #ffffff;
    --text-primary: #212529;
    --text-secondary: #6c757d;
    --accent-primary: #4a90e2;
    --accent-secondary: #5dade2;
    --accent-tertiary: #3498db;
    --accent-hover: #357abd;
    --accent-light: #74b9ff;
    --accent-dark: #2c5aa0;
    --shadow-light: rgba(0, 0, 0, 0.06);
    --shadow-medium: rgba(0, 0, 0, 0.1);
    --shadow-strong: rgba(0, 0, 0, 0.15);
    --border-radius: 12px;
    --border-radius-sm: 8px;
    --max-width: 1200px;

    /* Fonts */
    --font-primary: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --font-headings: 'Poppins', 'Inter', sans-serif;
    --font-handwriting: 'Patrick Hand', cursive;
    --font-playful: 'Quicksand', 'Inter', sans-serif;
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-primary);
    line-height: 1.7;
    color: var(--text-primary);
    background-color: var(--primary-bg);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    position: relative;
}

/* Decorative background elements */
body::before {
    content: '';
    position: fixed;
    top: -50%;
    right: -10%;
    width: 800px;
    height: 800px;
    background: radial-gradient(circle, var(--accent-secondary) 0%, transparent 70%);
    opacity: 0.15;
    z-index: -1;
    pointer-events: none;
}

body::after {
    content: '';
    position: fixed;
    bottom: -30%;
    left: -10%;
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, var(--accent-primary) 0%, transparent 70%);
    opacity: 0.12;
    z-index: -1;
    pointer-events: none;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-headings);
}

h1 {
    font-size: 3em;
    margin-bottom: 0.5em;
    color: var(--text-primary);
    font-weight: 700;
    line-height: 1.2;
}

h2 {
    font-size: 2.5em;
    margin-bottom: 0.5em;
    color: var(--text-primary);
    font-weight: 700;
}

h3 {
    font-size: 1.8em;
    margin-bottom: 0.5em;
    color: var(--text-primary);
    font-weight: 600;
}

p {
    margin-bottom: 1em;
    font-size: 1.1em;
}

.social-links-section {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 20px;
    margin: 30px 0 40px;
}

.social-link-large {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 18px 16px;
    border-radius: var(--border-radius-sm);
    background: var(--primary-bg);
    color: var(--text-primary);
    border: 1px solid var(--secondary-bg);
    box-shadow: 0 4px 15px var(--shadow-light);
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.3s ease;
    text-align: center;
    font-weight: 600;
}

.social-link-large svg {
    width: 32px;
    height: 32px;
    color: var(--accent-primary);
    transition: transform 0.2s ease, color 0.3s ease;
}

.social-link-large span {
    font-size: 0.95em;
    color: inherit;
}

.social-link-large:hover {
    transform: translateY(-4px);
    box-shadow: 0 10px 25px rgba(74, 144, 226, 0.18);
    background: rgba(74, 144, 226, 0.08);
    color: var(--accent-dark);
}

.social-link-large:hover svg {
    transform: scale(1.08);
    color: var(--accent-dark);
}

.social-links-section .social-link-large:focus-visible {
    outline: 3px solid var(--accent-primary);
    outline-offset: 4px;
}

@media (max-width: 640px) {
    .social-links-section {
        grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
        gap: 16px;
    }

    .social-link-large {
        padding: 16px 12px;
    }
}

a {
    color: var(--accent-primary);
    text-decoration: none;
    transition: color 0.3s ease;
}

a:hover {
    color: var(--accent-hover);
}

/* Container */
.container {
    width: 100%;
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 40px 20px;
    flex: 1;
}

/* Content Card */
.content-card {
    background: var(--content-bg);
    border-radius: var(--border-radius);
    padding: 40px;
    margin-bottom: 30px;
    box-shadow: 0 4px 20px var(--shadow-light);
    border: 1px solid var(--secondary-bg);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.content-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 30px var(--shadow-medium);
}

/* Hero Section (Homepage) */
.hero {
    text-align: center;
    padding: 80px 20px;
    position: relative;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.95) 0%, rgba(74, 144, 226, 0.05) 100%);
    border-radius: var(--border-radius);
    margin: 20px auto;
    max-width: var(--max-width);
    box-shadow: 0 8px 30px var(--shadow-light);
}


/* Hero Content Layout */
.hero-content {
    display: flex;
    align-items: center;
    gap: 50px;
    flex-wrap: wrap;
}

.hero-image {
    flex: 0 0 auto;
    animation: fadeInLeft 0.8s ease;
}

.hero-image img {
    width: 250px;
    height: 250px;
    object-fit: cover;
    border-radius: 50%;
    border: 5px solid var(--accent-primary);
    box-shadow: 0 8px 30px var(--shadow-medium);
    transition: transform 0.3s ease;
}

.hero-image img:hover {
    transform: scale(1.05) rotate(3deg);
}

.hero-text {
    flex: 1;
    min-width: 300px;
}

.hero h1 {
    font-size: 3.5em;
    margin-bottom: 20px;
    animation: fadeInUp 0.6s ease;
    background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero .lead {
    font-size: 1.5em;
    color: var(--text-secondary);
    margin-bottom: 22px;
    animation: fadeInUp 0.6s ease 0.2s both;
    font-family: var(--font-playful);
    font-weight: 600;
}

.intro-text {
    animation: fadeInUp 0.6s ease 0.4s both;
    background: rgba(255, 255, 255, 0.92);
    padding: 30px;
    border-radius: var(--border-radius-sm);
    margin-bottom: 40px;
}

.intro-text p {
    font-size: 1.2em;
    margin-bottom: 0.8em;
}

/* CTA Buttons */
.cta-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    justify-content: center;
    margin-top: 40px;
    animation: fadeInUp 0.6s ease 0.6s both;
}

.btn {
    display: inline-block;
    padding: 12px 30px;
    border-radius: 5px;
    font-size: 1.1em;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s ease;
    cursor: pointer;
    border: none;
}

.btn-primary {
    background: linear-gradient(135deg, var(--accent-primary), var(--accent-hover));
    color: white;
}

.btn-primary:hover {
    background: linear-gradient(135deg, var(--accent-hover), var(--accent-primary));
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(74, 144, 226, 0.4);
}

.btn-secondary {
    background: var(--content-bg);
    color: var(--accent-primary);
    border: 2px solid var(--accent-primary);
}

.btn-secondary:hover {
    background: var(--accent-primary);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(74, 144, 226, 0.3);
}

/* Footer */
.main-footer {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.95) 0%, rgba(74, 144, 226, 0.05) 100%);
    text-align: center;
    padding: 40px 20px;
    margin-top: auto;
    box-shadow: 0 -4px 20px var(--shadow-light);
    border-top: 3px solid var(--secondary-bg);
}

.footer-content {
    max-width: var(--max-width);
    margin: 0 auto;
}

.footer-social {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-bottom: 20px;
}

.social-link {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 45px;
    height: 45px;
    border-radius: 50%;
    background: var(--content-bg);
    color: var(--text-primary);
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px var(--shadow-light);
}

.social-link:hover {
    background: var(--accent-primary);
    color: white;
    transform: translateY(-3px);
    box-shadow: 0 4px 15px rgba(74, 144, 226, 0.3);
}

.main-footer p {
    color: var(--text-secondary);
    margin: 0;
    font-size: 0.95em;
}

/* Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInLeft {
    from {
        opacity: 0;
        transform: translateX(-30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* Responsive Design */
@media (max-width: 768px) {
    h1 {
        font-size: 2.2em;
    }

    h2 {
        font-size: 1.8em;
    }

    h3 {
        font-size: 1.4em;
    }

    .hero h1 {
        font-size: 2.5em;
    }

    .hero .lead {
        font-size: 1.2em;
    }

    .intro-text p {
        font-size: 1.05em;
    }

    .content-card {
        padding: 25px;
    }

    .cta-buttons {
        flex-direction: column;
        align-items: stretch;
    }

    .btn {
        text-align: center;
    }

    .hero-content {
        flex-direction: column;
        text-align: center;
    }

    .hero-image img {
        width: 200px;
        height: 200px;
    }
}

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

    h1 {
        font-size: 1.8em;
    }

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

    .hero {
        padding: 40px 15px;
    }
}

/* About Page Styles */
.about-card {
    max-width: 900px;
    margin: 0 auto;
}

.about-header {
    display: flex;
    align-items: center;
    gap: 40px;
    margin-bottom: 40px;
    padding-bottom: 30px;
    border-bottom: 3px solid var(--secondary-bg);
}

.about-image {
    flex-shrink: 0;
}

.about-image img {
    width: 200px;
    height: 200px;
    object-fit: cover;
    border-radius: 50%;
    border: 5px solid var(--accent-primary);
    box-shadow: 0 8px 25px var(--shadow-medium);
    transition: transform 0.3s ease;
}

.about-image img:hover {
    transform: scale(1.05) rotate(3deg);
}

.about-intro h1 {
    margin-bottom: 15px;
}

.about-tagline {
    font-size: 1.3em;
    color: var(--text-secondary);
    font-family: var(--font-playful);
    font-weight: 600;
    margin: 0;
}

.about-content p {
    font-size: 1.15em;
    line-height: 1.8;
    margin-bottom: 1.5em;
}

.about-content p:last-child {
    margin-bottom: 0;
}

/* PB Author Tools pages */
.pb-hero {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
    align-items: start;
    margin-top: 20px;
}

.pb-hero img {
    width: 100%;
    border-radius: var(--border-radius-sm);
    box-shadow: 0 8px 24px var(--shadow-light);
}

.pb-cta-group {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    margin-top: 20px;
}

.pb-button-group {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 24px;
}

.pb-button-group .btn {
    flex: 1 1 200px;
    text-align: center;
}

.step-list {
    margin-left: 1.5rem;
    margin-top: 20px;
}

.step-list li {
    margin-bottom: 24px;
}

.step-list img {
    margin-top: 16px;
    width: 100%;
    border-radius: var(--border-radius-sm);
    box-shadow: 0 10px 24px var(--shadow-light);
}

.pb-note {
    font-size: 1em;
    color: var(--text-secondary);
    font-style: italic;
    margin: 0 auto 1.5rem;
    text-align: center;
    max-width: 580px;
}

@media (max-width: 640px) {
    .pb-button-group .btn,
    .pb-cta-group .btn {
        width: 100%;
    }
}

@media (max-width: 768px) {
    .about-header {
        flex-direction: column;
        text-align: center;
        gap: 20px;
    }

    .about-image img {
        width: 150px;
        height: 150px;
    }
}

/* Photo Modal */
.photo-modal {
    display: none;
    position: fixed;
    z-index: 9999;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.9);
    cursor: pointer;
}

.photo-modal-content {
    margin: auto;
    display: block;
    max-width: 90%;
    max-height: 90%;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    animation: zoomIn 0.3s;
    cursor: default;
}

.photo-modal-close {
    position: absolute;
    top: 20px;
    right: 40px;
    color: #f1f1f1;
    font-size: 40px;
    font-weight: bold;
    cursor: pointer;
    z-index: 10000;
}

.photo-modal-close:hover,
.photo-modal-close:focus {
    color: #bbb;
}

@keyframes zoomIn {
    from {
        transform: translate(-50%, -50%) scale(0.7);
        opacity: 0;
    }
    to {
        transform: translate(-50%, -50%) scale(1);
        opacity: 1;
    }
}

/* Utility Classes */
.text-center {
    text-align: center;
}

.mb-0 { margin-bottom: 0; }
.mb-1 { margin-bottom: 1rem; }
.mb-2 { margin-bottom: 2rem; }
.mb-3 { margin-bottom: 3rem; }

.mt-0 { margin-top: 0; }
.mt-1 { margin-top: 1rem; }
.mt-2 { margin-top: 2rem; }
.mt-3 { margin-top: 3rem; }

/* Newsletter Popover */
.newsletter-popover {
    position: fixed;
    right: 1.5rem;
    bottom: 1.5rem;
    width: min(320px, calc(100% - 2rem));
    padding: 1.5rem;
    background: #ffffff;
    border-radius: 18px;
    border: 1px solid rgba(17, 24, 39, 0.08);
    box-shadow: 0 20px 45px rgba(17, 24, 39, 0.18);
    color: var(--text-primary);
    transform: translateY(125%);
    opacity: 0;
    transition: transform 0.32s ease, opacity 0.32s ease;
    z-index: 1200;
}

.newsletter-popover--visible {
    transform: translateY(0);
    opacity: 1;
}

.newsletter-popover--hiding {
    transform: translateY(125%);
    opacity: 0;
}

.newsletter-popover__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.newsletter-popover__title {
    margin: 0;
    font-size: 1.25rem;
    font-weight: 700;
}

.newsletter-popover__close {
    appearance: none;
    border: none;
    background: none;
    color: #6b7280;
    font-size: 1.25rem;
    cursor: pointer;
    padding: 0.25rem;
    line-height: 1;
}

.newsletter-popover__close:hover,
.newsletter-popover__close:focus {
    color: var(--accent-primary);
}

.newsletter-popover__body {
    margin-top: 0.75rem;
    font-size: 0.95rem;
    line-height: 1.5;
}

.newsletter-popover__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-top: 1.25rem;
}

.newsletter-popover__dismiss {
    appearance: none;
    border: none;
    background: none;
    color: #6b7280;
    font-weight: 600;
    cursor: pointer;
    padding: 0.35rem 0.75rem;
    border-radius: 999px;
    transition: color 0.2s ease, background-color 0.2s ease;
}

.newsletter-popover__dismiss:hover,
.newsletter-popover__dismiss:focus {
    color: var(--accent-primary);
    background-color: rgba(74, 144, 226, 0.1);
}

@media (max-width: 640px) {
    .newsletter-popover {
        left: 1rem;
        right: 1rem;
        bottom: 1rem;
        width: auto;
        padding: 1.25rem;
    }
}
