/*
Theme Name: AsarSong Studio
Theme URI: https://asarsong.com
Author: AsarSong Studio
Author URI: https://asarsong.com
Description: A modern, professional WordPress theme for AsarSong Studio - Mobile App Development Studio. Dark premium design with purple accents.
Version: 1.0.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: asarsong-studio
*/

/* ===================================
   CSS CUSTOM PROPERTIES
   =================================== */
:root {
    /* Colors */
    --color-bg-dark: #0A0B0F;
    --color-bg-mid: #0F1117;
    --color-purple-400: #A78BFA;
    --color-purple-500: #8B5CF6;
    --color-purple-600: #7C3AED;
    --color-white: #FFFFFF;
    --color-gray-300: #D1D5DB;
    --color-gray-400: #9CA3AF;
    --color-gray-500: #6B7280;
    --color-card-bg: rgba(255, 255, 255, 0.05);
    --color-card-border: rgba(255, 255, 255, 0.1);
    --color-card-hover: rgba(139, 92, 246, 0.5);

    /* Typography */
    --font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;

    /* Spacing */
    --container-max: 1280px;
    --container-padding: 1.5rem;

    /* Transitions */
    --transition-base: all 0.3s ease;
}

/* ===================================
   RESET & BASE
   =================================== */
*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    font-family: var(--font-family);
    background: linear-gradient(180deg, var(--color-bg-dark) 0%, var(--color-bg-mid) 50%, var(--color-bg-dark) 100%);
    background-attachment: fixed;
    color: var(--color-white);
    line-height: 1.6;
    min-height: 100vh;
}

a {
    color: inherit;
    text-decoration: none;
    transition: var(--transition-base);
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

ul,
ol {
    list-style: none;
}

/* ===================================
   TYPOGRAPHY
   =================================== */
h1,
h2,
h3,
h4,
h5,
h6 {
    font-weight: 500;
    line-height: 1.2;
    color: var(--color-white);
}

h1 {
    font-size: clamp(2.5rem, 8vw, 5rem);
}

h2 {
    font-size: clamp(2rem, 5vw, 3.5rem);
}

h3 {
    font-size: 1.5rem;
}

h4 {
    font-size: 1.25rem;
}

p {
    color: var(--color-gray-300);
}

/* ===================================
   LAYOUT
   =================================== */
.container {
    max-width: var(--container-max);
    width: 100%;
    margin: 0 auto;
    padding: 0 var(--container-padding);
}

.section {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 6rem var(--container-padding);
}

.section-centered {
    text-align: center;
}

/* ===================================
   HEADER
   =================================== */
.site-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: rgba(10, 11, 15, 0.8);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.25rem 0;
}

.site-logo {
    font-size: 1.25rem;
    font-weight: 500;
    color: var(--color-white);
    letter-spacing: -0.02em;
}

.site-logo:hover {
    color: var(--color-purple-400);
}

/* Navigation */
.main-nav {
    display: flex;
    align-items: center;
    gap: 2rem;
}

.nav-link {
    color: var(--color-gray-300);
    font-size: 0.9375rem;
    font-weight: 400;
    padding: 0.5rem 0;
    position: relative;
}

.nav-link:hover {
    color: var(--color-white);
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--color-purple-500);
    transition: width 0.3s ease;
}

.nav-link:hover::after {
    width: 100%;
}

/* Mobile Menu Toggle */
.menu-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
}

.menu-toggle span {
    display: block;
    width: 24px;
    height: 2px;
    background: var(--color-white);
    transition: var(--transition-base);
}

/* ===================================
   HERO SECTION
   =================================== */
.hero-section {
    padding-top: 8rem;
}

.hero-content {
    max-width: 56rem;
    margin: 0 auto;
}

.hero-title {
    margin-bottom: 1.5rem;
    letter-spacing: -0.02em;
}

.hero-subtitle {
    font-size: clamp(1.25rem, 3vw, 1.875rem);
    color: var(--color-purple-400);
    margin-bottom: 2rem;
    font-weight: 400;
}

.hero-description {
    font-size: clamp(1rem, 2vw, 1.25rem);
    color: var(--color-gray-300);
    max-width: 40rem;
    margin: 0 auto 3rem;
    line-height: 1.7;
}

/* ===================================
   BUTTONS
   =================================== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 1rem 2rem;
    font-size: 1rem;
    font-weight: 500;
    border-radius: 0.5rem;
    border: none;
    cursor: pointer;
    transition: var(--transition-base);
}

.btn-primary {
    background: var(--color-purple-600);
    color: var(--color-white);
    box-shadow: 0 4px 20px rgba(124, 58, 237, 0.3);
}

.btn-primary:hover {
    background: var(--color-purple-500);
    transform: translateY(-2px);
    box-shadow: 0 6px 25px rgba(124, 58, 237, 0.4);
}

.btn-secondary {
    background: var(--color-card-bg);
    color: var(--color-gray-300);
    border: 1px solid var(--color-card-border);
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.1);
    color: var(--color-white);
}

.btn-sm {
    padding: 0.625rem 1rem;
    font-size: 0.875rem;
}

/* ===================================
   ABOUT SECTION
   =================================== */
.about-section .section-description {
    font-size: 1.25rem;
    max-width: 48rem;
    margin: 0 auto 4rem;
    line-height: 1.7;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    max-width: 72rem;
    margin: 0 auto;
}

.feature-card {
    padding: 1.5rem;
    background: var(--color-card-bg);
    border: 1px solid var(--color-card-border);
    border-radius: 0.75rem;
    transition: var(--transition-base);
}

.feature-card:hover {
    border-color: var(--color-card-hover);
    transform: translateY(-4px);
}

.feature-card h3 {
    margin-bottom: 0.75rem;
    font-size: 1.25rem;
}

.feature-card p {
    color: var(--color-gray-400);
    line-height: 1.6;
}

/* ===================================
   APPS SECTION
   =================================== */
.apps-section {
    padding: 6rem var(--container-padding);
}

.apps-section h2 {
    text-align: center;
    margin-bottom: 3rem;
}

.apps-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 2rem;
    max-width: 80rem;
    margin: 0 auto;
}

.app-card {
    padding: 2rem;
    background: var(--color-card-bg);
    border: 1px solid var(--color-card-border);
    border-radius: 1rem;
    transition: var(--transition-base);
}

.app-card:hover {
    border-color: var(--color-card-hover);
    transform: scale(1.02);
}

.app-card-header {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    margin-bottom: 1rem;
}

.app-icon {
    width: 64px;
    height: 64px;
    border-radius: 1rem;
    object-fit: cover;
    background: var(--color-card-bg);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    flex-shrink: 0;
}

.app-icon img {
    width: 100%;
    height: 100%;
    border-radius: 1rem;
    object-fit: cover;
}

.app-card h3 {
    font-size: 1.375rem;
    margin-bottom: 0.25rem;
}

.app-description {
    color: var(--color-gray-400);
    margin-bottom: 1.5rem;
    line-height: 1.6;
}

.app-buttons {
    display: flex;
    gap: 0.75rem;
}

.app-buttons .btn {
    flex: 0 1 auto;
    padding: 0.625rem 1.25rem;
    font-size: 0.875rem;
}

.app-buttons .btn-secondary {
    flex: 0 0 auto;
}

/* ===================================
   CONTACT SECTION
   =================================== */
.contact-section {
    min-height: auto;
    padding: 8rem var(--container-padding);
}

.contact-content {
    max-width: 48rem;
    margin: 0 auto;
}

.contact-section h2 {
    margin-bottom: 1.5rem;
}

.contact-section .section-description {
    font-size: 1.25rem;
    margin-bottom: 3rem;
    color: var(--color-gray-300);
}

.contact-box {
    display: inline-flex;
    align-items: center;
    gap: 1rem;
    padding: 2rem;
    background: var(--color-card-bg);
    border: 1px solid var(--color-card-border);
    border-radius: 1rem;
}

.contact-icon {
    color: var(--color-purple-400);
}

.contact-email {
    font-size: 1.5rem;
    color: var(--color-white);
}

.contact-email:hover {
    color: var(--color-purple-400);
}

/* ===================================
   FOOTER
   =================================== */
.site-footer {
    border-top: 1px solid var(--color-card-border);
    background: var(--color-bg-dark);
    padding: 3rem 0;
}

.footer-inner {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2rem;
}

@media (min-width: 768px) {
    .footer-inner {
        flex-direction: row;
        justify-content: space-between;
    }
}

.footer-brand {
    text-align: center;
}

@media (min-width: 768px) {
    .footer-brand {
        text-align: left;
    }
}

.footer-brand h4 {
    font-size: 1.25rem;
    margin-bottom: 0.5rem;
}

.footer-brand p {
    color: var(--color-gray-400);
}

.footer-nav {
    display: flex;
    gap: 2rem;
}

.footer-nav a {
    color: var(--color-gray-400);
}

.footer-nav a:hover {
    color: var(--color-white);
}

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    margin-top: 2rem;
    padding-top: 2rem;
    text-align: center;
    color: var(--color-gray-500);
    font-size: 0.875rem;
}

/* ===================================
   SINGLE APP PAGE
   =================================== */
.single-app {
    padding-top: 8rem;
    padding-bottom: 4rem;
}

.back-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--color-gray-400);
    margin-bottom: 3rem;
}

.back-link:hover {
    color: var(--color-white);
}

.app-detail-header {
    text-align: center;
    margin-bottom: 4rem;
}

.app-detail-icon {
    width: 128px;
    height: 128px;
    margin: 0 auto 1.5rem;
    border-radius: 1.5rem;
    overflow: hidden;
    background: var(--color-card-bg);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 4rem;
}

.app-detail-icon img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.app-detail-header h1 {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.app-detail-header .app-tagline {
    font-size: 1.25rem;
    color: var(--color-gray-400);
}

.app-description-full {
    font-size: 1.125rem;
    line-height: 1.8;
    color: var(--color-gray-300);
    max-width: 60rem;
    margin: 0 auto 4rem;
}

/* App Screenshots Gallery - Images Side by Side */
.app-description-full {
    text-align: center;
}

.app-description-full p {
    text-align: left;
}

/* Make all direct images in content display in a grid */
.app-screenshots {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
    margin: 2rem 0;
}

.app-screenshots img {
    width: 100%;
    height: auto;
    border-radius: 1rem;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

/* WordPress Content Images - Side by Side */
.app-description-full img {
    border-radius: 1rem;
    max-width: 280px;
    height: auto;
    display: inline-block;
    margin: 0.5rem;
    vertical-align: top;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

/* WordPress figure and gallery blocks */
.app-description-full figure {
    display: inline-block;
    margin: 0.5rem;
    max-width: 280px;
}

.app-description-full figure img {
    margin: 0;
    max-width: 100%;
}

.app-description-full .wp-block-gallery {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    justify-content: center;
}

.app-description-full .wp-block-gallery .wp-block-image {
    flex: 0 1 280px;
    max-width: 280px;
}

.app-description-full .wp-block-gallery .wp-block-image img {
    width: 100%;
    height: auto;
    border-radius: 1rem;
    margin: 0;
    max-width: 100%;
}

/* Mobile - smaller images but still side by side */
@media (max-width: 768px) {
    .app-description-full img {
        max-width: 140px;
        margin: 0.25rem;
    }

    .app-description-full figure {
        max-width: 140px;
        margin: 0.25rem;
    }

    .app-description-full .wp-block-gallery .wp-block-image {
        flex: 0 1 140px;
        max-width: 140px;
    }
}

.app-features {
    margin-bottom: 4rem;
}

.app-features h2 {
    font-size: 1.875rem;
    margin-bottom: 1.5rem;
}

.features-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.feature-item {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    padding: 1rem;
    background: var(--color-card-bg);
    border: 1px solid var(--color-card-border);
    border-radius: 0.5rem;
}

.feature-bullet {
    color: var(--color-purple-400);
}

.feature-item span:last-child {
    color: var(--color-gray-300);
}

.app-store-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    justify-content: center;
    margin-bottom: 3rem;
}

.app-privacy-link {
    text-align: center;
}

.app-privacy-link a {
    color: var(--color-gray-400);
    text-decoration: underline;
}

.app-privacy-link a:hover {
    color: var(--color-white);
}

/* ===================================
   PRIVACY POLICY PAGE
   =================================== */
.privacy-page {
    padding-top: 8rem;
    padding-bottom: 4rem;
    max-width: 56rem;
    margin: 0 auto;
}

.privacy-page h1 {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.privacy-date {
    color: var(--color-gray-400);
    font-size: 1.125rem;
    margin-bottom: 3rem;
}

.privacy-section {
    margin-bottom: 3rem;
}

.privacy-section h2 {
    font-size: 1.875rem;
    margin-bottom: 1rem;
}

.privacy-section p {
    color: var(--color-gray-300);
    line-height: 1.8;
    margin-bottom: 1rem;
}

.privacy-section ul {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.privacy-section li {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    color: var(--color-gray-300);
}

.privacy-section li .bullet {
    color: var(--color-purple-400);
    margin-top: 0.25rem;
}

.privacy-section li strong {
    color: var(--color-white);
}

/* ===================================
   MOBILE RESPONSIVE
   =================================== */
@media (max-width: 768px) {
    .main-nav {
        position: fixed;
        top: 0;
        right: -100%;
        width: 280px;
        height: 100vh;
        background: var(--color-bg-dark);
        flex-direction: column;
        padding: 5rem 2rem;
        gap: 1.5rem;
        transition: right 0.3s ease;
        border-left: 1px solid var(--color-card-border);
    }

    .main-nav.is-open {
        right: 0;
    }

    .menu-toggle {
        display: flex;
        z-index: 1001;
    }

    .menu-toggle.is-open span:nth-child(1) {
        transform: rotate(45deg) translate(5px, 5px);
    }

    .menu-toggle.is-open span:nth-child(2) {
        opacity: 0;
    }

    .menu-toggle.is-open span:nth-child(3) {
        transform: rotate(-45deg) translate(5px, -5px);
    }

    .hero-section {
        padding-top: 6rem;
    }

    .section {
        min-height: auto;
        padding: 4rem var(--container-padding);
    }

    .apps-grid {
        grid-template-columns: 1fr;
    }

    .features-grid {
        grid-template-columns: 1fr;
    }

    .app-buttons {
        flex-direction: column;
    }

    .app-buttons .btn {
        width: 100%;
    }

    .app-store-buttons {
        flex-direction: column;
    }
}

/* ===================================
   UTILITIES
   =================================== */
.text-center {
    text-align: center;
}

.mb-1 {
    margin-bottom: 0.5rem;
}

.mb-2 {
    margin-bottom: 1rem;
}

.mb-3 {
    margin-bottom: 1.5rem;
}

.mb-4 {
    margin-bottom: 2rem;
}

.mb-5 {
    margin-bottom: 3rem;
}

/* Screen Reader Only */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* ===================================
   LIGHTBOX
   =================================== */
.lightbox {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.lightbox.is-open {
    opacity: 1;
    visibility: visible;
}

.lightbox-backdrop {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.95);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.lightbox-content {
    position: relative;
    z-index: 1;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
}

.lightbox-image-container {
    width: 100%;
    height: calc(100vh - 80px);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.lightbox-image {
    max-width: 95vw;
    max-height: 90vh;
    object-fit: contain;
    border-radius: 0.5rem;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
    transition: transform 0.1s ease;
    user-select: none;
    -webkit-user-drag: none;
}

.lightbox-close {
    position: fixed;
    top: 1.5rem;
    right: 1.5rem;
    width: 48px;
    height: 48px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    color: white;
    font-size: 2rem;
    line-height: 1;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    z-index: 10;
}

.lightbox-close:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: scale(1.1);
}

/* Zoom Controls */
.lightbox-zoom-controls {
    position: fixed;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 2rem;
    padding: 0.5rem 1rem;
    z-index: 10;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.lightbox-zoom-btn {
    width: 36px;
    height: 36px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    color: white;
    font-size: 1.25rem;
    font-weight: bold;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.lightbox-zoom-btn:hover {
    background: var(--color-purple-600);
    border-color: var(--color-purple-600);
}

.lightbox-zoom-level {
    color: white;
    font-size: 0.875rem;
    font-weight: 500;
    min-width: 50px;
    text-align: center;
}

.lightbox-reset {
    margin-left: 0.5rem;
}

/* Clickable image cursor hint */
.app-description-full img,
.entry-content img {
    cursor: zoom-in;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.app-description-full img:hover,
.entry-content img:hover {
    transform: scale(1.02);
    box-shadow: 0 8px 30px rgba(139, 92, 246, 0.3);
}