/* AnnDoodles Custom Ghost Theme Styles - Matching anndoodles.com */

/* Import Google Fonts */
@import url('https://fonts.googleapis.com/css2?family=Schoolbell&family=Amatic+SC:wght@400;600;700&family=Abel:wght@400&display=swap');

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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    line-height: 1.6;
    color: #666;
    background-color: #fff;
    font-size: 16px;
}

.container {
    max-width: 70%;
    margin: 0 auto;
    padding: 0 40px;
}

/* Header styles - matching anndoodles.com with left-aligned logo */
.site-header {
    background: #fff;
    padding: 20px 0;
}

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

.site-logo {
    flex-shrink: 0;
}

.site-logo img {
    height: 101px;
    width: auto;
}

.site-title {
    margin: 0;
}

.site-title a {
    text-decoration: none;
    color: #666;
    font-size: 1.8rem;
    font-weight: normal;
}

.site-nav {
    flex-shrink: 0;
}

.nav-list {
    display: flex;
    list-style: none;
    gap: 0;
    margin: 0;
    font-family: 'Amatic SC', cursive;
}

.nav-list li {
    position: relative;
}

.nav-list li:not(:last-child)::after {
    content: ' | ';
    color: #666;
    margin: 0 8px;
}

.nav-list a {
    text-decoration: none;
    color: #666;
    font-size: 24px;
    font-weight: 600;
    transition: color 0.3s ease;
}

.nav-list a:hover {
    color: #f489bd;
    text-decoration: underline;
}

/* Gray full-screen divider */
.gray-divider {
    width: 100%;
    height: 0.5px;
    background-color: #ddd;
    margin: 10px 0;
}

/* Banner section */
.banner-section {
    max-width: 70%;
    text-align: center;
    margin: 10px auto;
}

.banner-section img {
    width: 100%;
    height: auto;
    display: block;
    margin: 0 auto;
}

/* Main content - matching anndoodles.com */
.site-main {
    padding: 40px 0;
}

/* Publication cover */
.publication-cover {
    margin-bottom: 40px;
}

.publication-cover img {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

/* Navigation layout variants */
.header-center .site-header-content {
    flex-direction: column;
    text-align: center;
}

.header-stacked .site-header-content {
    flex-direction: column;
    align-items: flex-start;
}

.header-stacked .nav-list {
    margin-top: 15px;
}

/* Hello section - matching anndoodles.com */
.hello-section {
    padding: 60px 0;
    text-align: center;
}

/* Section divider spacing */
.section-divider {
    height: 40px;
    margin: 40px 0;
}

/* Gray dividers around game designs - changed from sky-blue for uniformity */
.sky-blue-divider {
    height: 0.5px;
    background-color: #ddd;
    margin: 30px auto;
    width: 70%;
}

/* Extra spacing for bottom divider - reduced gap */
.sky-blue-divider-bottom {
    margin: 30px auto 30px auto;
}

/* Page content styling to match site design */
.page-article {
    padding: 40px 0;
}

.page-header {
    text-align: center;
    margin-bottom: 40px;
}

.page-title {
    font-family: 'Abel', sans-serif;
    font-size: 2rem;
    font-weight: bold;
    color: #f489bd;
    margin-bottom: 20px;
}

.page-content {
    font-family: 'Schoolbell', cursive;
    font-size: 20px;
    line-height: 1.6;
    color: #666;
}

.page-content h1,
.page-content h2,
.page-content h3 {
    font-family: 'Abel', sans-serif;
    color: #f489bd;
    margin: 30px 0 20px 0;
}

.page-content h1 {
    font-size: 2rem;
}

.page-content h2 {
    font-size: 1.5rem;
}

.page-content h3 {
    font-size: 1.2rem;
}

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

.page-content a {
    color: #f489bd;
    text-decoration: none;
}

.page-content a:hover {
    text-decoration: underline;
}

.hello-heading {
    font-family: 'Abel', sans-serif;
    font-size: 2rem;
    font-weight: bold;
    margin-bottom: 20px;
    color: #f489bd;
}

.intro-text {
    font-family: 'Schoolbell', cursive;
    font-size: 20px;
    font-weight: 500;
    line-height: 1.6;
    margin-bottom: 15px;
    color: #666;
}

/* Add extra spacing for specific intro text paragraphs */
.intro-text.featured-spacing {
    margin-bottom: 40px;
}

.intro-text.consulting-spacing {
    margin-top: 60px;
}

.intro-text a {
    color: #f489bd;
    text-decoration: none;
}

.intro-text a:hover {
    text-decoration: underline;
}

/* Featured logos in hello section */
.featured-logos {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 40px;
    margin: 60px auto;
    max-width: 100%;
}

.featured-logos .portfolio-item {
    width: 250px;
    height: 180px;
}

/* Portfolio sections - matching anndoodles.com */
.portfolio-section {
    padding: 30px 0;
}

/* Game designs section */
.game-designs-section {
    text-align: center;
}

/* Removed specific margin - using general .section-heading margin: 30px 0 for perfect centering */

.section-heading {
    font-family: 'Abel', sans-serif;
    font-size: 2rem;
    font-weight: bold;
    text-align: center;
    margin: 30px 0;
    color: #f489bd;
}

/* Game designs heading should be pink */
.portfolio-section:last-of-type .section-heading {
    color: #f489bd;
    font-weight: bold;
}

.portfolio-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 40px;
    margin-bottom: 60px;
    justify-items: center;
}

.portfolio-item {
    background: white;
    text-align: center;
    position: relative;
    cursor: pointer;
    width: 250px;
    height: 180px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.portfolio-item img {
    width: 100%;
    height: 100%;
    border: none;
    transition: all 0.3s ease;
    display: block;
    object-fit: cover;
}

.portfolio-item:hover img {
    opacity: 0.7;
    transform: scale(1.05);
}

.portfolio-item::after {
    content: '+';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 2rem;
    color: #f489bd;
    background: rgba(255, 255, 255, 0.9);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
}

.portfolio-item:hover::after {
    opacity: 1;
}

/* Lightbox Modal */
.lightbox {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.9);
    animation: fadeIn 0.3s ease;
}

.lightbox.active {
    display: flex;
    align-items: center;
    justify-content: center;
}

.lightbox-content {
    position: relative;
    max-width: 90%;
    max-height: 90%;
    margin: auto;
}

.lightbox-image {
    width: 100%;
    height: auto;
    max-width: 100%;
    max-height: 90vh;
    object-fit: contain;
}

.lightbox-close {
    position: absolute;
    top: -40px;
    right: 0;
    color: white;
    font-size: 2rem;
    font-weight: bold;
    cursor: pointer;
    background: none;
    border: none;
    padding: 0;
    line-height: 1;
}

.lightbox-close:hover {
    opacity: 0.7;
}

.lightbox-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0, 0, 0, 0.5);
    color: white;
    border: none;
    font-size: 2rem;
    padding: 10px 15px;
    cursor: pointer;
    transition: background 0.3s ease;
}

.lightbox-nav:hover {
    background: rgba(0, 0, 0, 0.8);
}

.lightbox-prev {
    left: -60px;
}

.lightbox-next {
    right: -60px;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* Post styles */
.post-article {
    max-width: 800px;
    margin: 0 auto;
    padding: 2rem 0;
}

/* Page styles */
.page-article {
    max-width: 800px;
    margin: 0 auto;
    padding: 2rem 0;
}

.page-header {
    margin-bottom: 2rem;
}

.page-title {
    font-size: 2rem;
    margin-bottom: 1rem;
    color: #f489bd;
}

.page-feature-image {
    margin: 2rem 0;
}

.page-feature-image img {
    width: 100%;
    height: auto;
    border-radius: 8px;
}

.page-content {
    line-height: 1.8;
    color: #666;
}

/* Tag and Author pages */
.tag-header,
.author-header {
    padding: 3rem 0;
    text-align: center;
    border-bottom: 1px solid #eee;
    margin-bottom: 3rem;
}

.tag-title,
.author-name {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    color: #666;
}

.tag-description,
.author-bio {
    font-size: 1.1rem;
    color: #666;
    max-width: 600px;
    margin: 0 auto;
}

.author-avatar-large {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    margin-bottom: 1rem;
    object-fit: cover;
}

.posts-section {
    padding: 2rem 0;
}

/* Error page styles */
.error-section {
    padding: 4rem 0;
    text-align: center;
    min-height: 60vh;
    display: flex;
    align-items: center;
}

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

.error-title {
    font-size: 4rem;
    color: #666;
    margin-bottom: 1rem;
}

.error-message {
    font-size: 1.5rem;
    color: #666;
    margin-bottom: 2rem;
}

.error-description {
    font-size: 1.1rem;
    color: #666;
    margin-bottom: 2rem;
    line-height: 1.6;
}

.error-home-link {
    display: inline-block;
    padding: 12px 24px;
    background: #0066cc;
    color: white;
    text-decoration: none;
    border-radius: 4px;
    transition: background 0.3s ease;
}

.error-home-link:hover {
    background: #0052a3;
}

.post-header {
    margin-bottom: 2rem;
}

.post-title {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    color: #666;
}

.post-feature-image {
    margin: 2rem 0;
}

.post-feature-image img {
    width: 100%;
    height: auto;
    border-radius: 10px;
}

.post-meta {
    display: flex;
    gap: 1rem;
    align-items: center;
    color: #666;
    font-size: 0.9rem;
}

.post-tags {
    display: flex;
    gap: 0.5rem;
}

.post-tag {
    background: #f0f0f0;
    padding: 0.2rem 0.5rem;
    border-radius: 15px;
    text-decoration: none;
    color: #666;
    font-size: 0.8rem;
}

.post-tag:hover {
    background: #667eea;
    color: white;
}

.post-content {
    font-size: 1.1rem;
    line-height: 1.8;
    margin-bottom: 2rem;
}

.post-content p {
    margin-bottom: 1rem;
}

.post-content img {
    max-width: 100%;
    height: auto;
    border-radius: 5px;
    margin: 1rem 0;
}

/* Related posts */
.related-posts {
    background: #f8f9fa;
    padding: 3rem 0;
}

.related-title {
    text-align: center;
    margin-bottom: 2rem;
    font-size: 2rem;
}

.related-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
}

.related-item {
    background: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.related-image img {
    width: 100%;
    height: 150px;
    object-fit: cover;
}

.related-content {
    padding: 1rem;
}

.related-item-title a {
    text-decoration: none;
    color: #666;
    font-weight: bold;
}

.related-item-title a:hover {
    color: #667eea;
}

.related-date {
    color: #666;
    font-size: 0.9rem;
}

/* Footer - matching anndoodles.com */
.site-footer {
    background: #000;
    color: #fff;
    text-align: center;
    padding: 24px 0;
    margin-top: 30px;
}

.footer-text {
    font-size: 14px;
    color: #fff;
}

.footer-text a {
    color: #f489bd;
    text-decoration: none;
}

.footer-text a:hover {
    text-decoration: underline;
}

/* Ghost editor content width classes */
.kg-width-wide {
    position: relative;
    width: 85vw;
    min-width: 100%;
    margin: auto calc(50% - 50vw);
    transform: translateX(calc(50vw - 50%));
}

.kg-width-full {
    position: relative;
    width: 100vw;
    left: 50%;
    right: 50%;
    margin-left: -50vw;
    margin-right: -50vw;
}

/* Responsive design - Phones only */
@media (max-width: 599px) {
    /* AGGRESSIVE MOBILE FIXES - FORCE CENTERING */
    * {
        box-sizing: border-box !important;
    }
    .site-header-content {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }
    
    .nav-list {
        justify-content: center;
    }
    
    .nav-list li:not(:last-child)::after {
        content: ' | ';
        color: #666;
        margin: 0 8px;
    }
    
    .featured-logos {
        display: grid !important;
        grid-template-columns: 1fr 1fr !important;
        gap: 20px !important;
        justify-items: center !important;
        align-items: center !important;
        padding: 0 20px !important;
        margin: 0 !important;
        width: 100% !important;
        max-width: none !important;
    }
    
    .featured-logos .portfolio-item {
        width: 100% !important;
        max-width: 150px !important;
        height: 106px !important;
        margin: 0 auto !important;
        text-align: center !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
    }
    
    .banner-section img {
        width: 100%;
        height: auto;
    }
    
    .hello-section,
    .game-designs-section {
        text-align: center;
        padding: 0;
    }
    
    .portfolio-grid {
        display: grid !important;
        grid-template-columns: 1fr 1fr !important;
        gap: 20px !important;
        justify-items: center !important;
        align-items: center !important;
        padding: 0 20px !important;
        margin: 0 !important;
        width: 100% !important;
        max-width: none !important;
    }
    
    .portfolio-item {
        width: 100% !important;
        max-width: 150px !important;
        height: 106px !important;
        margin: 0 auto !important;
        text-align: center !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
    }
    
    .post-grid {
        grid-template-columns: 1fr;
    }
    
    .related-grid {
        grid-template-columns: 1fr;
    }
    
    .post-title {
        font-size: 2rem;
    }
    
    /* Align text content with banner positioning - MUST come before generic .container */
    .hello-section .container {
        max-width: 70% !important;
        margin: 0 auto !important;
        padding: 0 20px !important;
        text-align: center !important;
    }
    
    /* Game designs section - match portfolio section layout */
    .game-designs-section .container {
        padding: 0 10px;
    }
    
    /* Game designs heading container - keep centered like hello section */
    .game-designs-section .container .section-heading {
        margin: 30px auto !important;
        max-width: 70% !important;
        text-align: center !important;
    }
    
    .portfolio-section .container {
        padding: 0 10px;
    }
    
    /* Generic container - comes AFTER specific rules */
    .container {
        max-width: 100%;
        padding: 0 20px;
    }

    .kg-width-wide,
    .kg-width-full {
        position: relative;
        width: 100vw;
        left: 50%;
        right: 50%;
        margin-left: -50vw;
        margin-right: -50vw;
        transform: none;
    }
    
    /* Lightbox responsive */
    .lightbox-nav {
        font-size: 1.5rem;
        padding: 8px 12px;
    }
    
    .lightbox-prev {
        left: -50px;
    }
    
    .lightbox-next {
        right: -50px;
    }
    
    .lightbox-close {
        font-size: 1.5rem;
        top: -35px;
    }
    
    .portfolio-item::after {
        font-size: 1.5rem;
        width: 35px;
        height: 35px;
    }
}

/* Tablet/iPad Responsive Design (600px - 1366px) - Includes iPad Mini and Landscape iPads */
@media (min-width: 600px) and (max-width: 1366px) {
    /* Expand container to use 80% of screen (90% container - 10px padding = ~80%) */
    .container {
        max-width: 90% !important;
        padding: 0 10px !important;
    }
    
    .portfolio-grid {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 30px !important;
        justify-items: stretch !important; /* Ensure items fill grid cells */
    }
    
    .portfolio-item {
        width: 100% !important;
        max-width: none !important; /* Override base 250px constraint */
        aspect-ratio: 1 / 1 !important; /* Force perfect square */
        height: auto !important; /* Let aspect-ratio control height */
        margin: 0 !important;
        box-sizing: border-box !important;
    }
    
    .portfolio-item img {
        width: 100% !important;
        height: 100% !important;
        object-fit: cover !important; /* Crop to fit square */
        object-position: center !important; /* Center the cropped image */
    }
    
    .featured-logos {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 30px !important;
        justify-items: stretch !important;
    }
    
    .featured-logos .portfolio-item {
        width: 100% !important;
        max-width: none !important; /* Override base constraints */
        aspect-ratio: 1 / 1 !important; /* Force perfect square */
        height: auto !important; /* Let aspect-ratio control height */
        margin: 0 !important;
        box-sizing: border-box !important;
    }
}


