/* Custom styles for Michelle Stella website - Moonlit/Vampire Theme */

/* Color palette inspired by Blooded Bonds book cover */
:root {
    --moonlight-gold: #E6B85C;       /* Rich gold from title text */
    --deep-teal: #2C4A4A;            /* Dark teal night sky */
    --midnight-teal: #1A3333;        /* Deeper midnight teal */
    --bronze-accent: #CD9A2B;        /* Bronze accent color */
    --moonlight-cream: #F5F3E7;      /* Pale moonlight cream */
    --shadow-black: #1C1C1C;         /* Deep shadow black */
    --dark-bronze: #A67C1A;          /* Darker bronze */
    --slate-gray: #4A5A5A;           /* Slate gray for cards */
    --text-dark: #2A2A2A;            /* Dark text */
    --muted-text: #666666;           /* Muted text color */
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: var(--text-dark);
    background-color: var(--moonlight-cream);
    overflow-x: hidden;
}

/* Enhanced accessibility for skip link */
.visually-hidden-focusable:focus {
    position: absolute;
    top: 10px;
    left: 10px;
    z-index: 9999;
    padding: 8px 16px;
    background: var(--deep-teal);
    color: white;
    text-decoration: none;
    border-radius: 4px;
}

/* Header styling */
.navbar-brand {
    font-size: 1.5rem;
    color: var(--text-dark) !important;
    letter-spacing: 0.5px;
    font-weight: 600;
}

.bg-light {
    background-color: var(--moonlight-cream) !important;
}

/* Hero section with moonlit gradient */
.hero-section {
    background: linear-gradient(135deg, var(--deep-teal) 0%, var(--midnight-teal) 50%, var(--shadow-black) 100%);
    min-height: 70vh;
    display: flex;
    align-items: center;
    position: relative;
    width: 100vw;
    margin-left: calc(-50vw + 50%);
    margin-right: calc(-50vw + 50%);
}

.hero-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><circle cx="20" cy="20" r="2" fill="rgba(255,255,255,0.1)"/><circle cx="80" cy="40" r="1" fill="rgba(255,255,255,0.1)"/><circle cx="40" cy="80" r="1.5" fill="rgba(255,255,255,0.1)"/></svg>');
    opacity: 0.3;
}

.hero-section > .container {
    position: relative;
    z-index: 1;
    max-width: 100%;
    margin: 0 auto;
}

.hero-section h1 {
    font-weight: 700;
    letter-spacing: 1px;
    margin-bottom: 1rem;
    color: white !important;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
}

.hero-section .lead {
    font-size: 1.25rem;
    opacity: 0.95;
    color: white !important;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.2);
}

/* Book cover styling */
.book-cover-container {
    position: relative;
}

.book-cover-image {
    max-width: 100%;
    max-height: 80vh;
    height: auto;
    border-radius: 12px !important;
    transition: all 0.3s ease;
    border: 3px solid var(--moonlight-gold);
}

.book-cover-image:hover {
    transform: translateY(-5px) scale(1.02);
    box-shadow: 0 15px 30px rgba(0,0,0,0.2) !important;
}

/* Buttons with moonlit theme */
.btn {
    font-weight: 600;
    letter-spacing: 0.5px;
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    transition: all 0.3s ease;
    text-decoration: none;
    border: 2px solid transparent;
}

.btn-primary {
    background: linear-gradient(45deg, var(--moonlight-gold), var(--bronze-accent));
    border-color: var(--moonlight-gold);
    color: var(--shadow-black);
    font-weight: 600;
}

.btn-primary:hover {
    background: linear-gradient(45deg, var(--bronze-accent), var(--dark-bronze));
    border-color: var(--bronze-accent);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(230, 184, 92, 0.4);
}

.btn-light {
    background-color: var(--moonlight-cream);
    border-color: var(--moonlight-gold);
    color: var(--text-dark);
}

.btn-light:hover {
    background-color: var(--moonlight-gold);
    border-color: var(--bronze-accent);
    color: var(--shadow-black);
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(230, 184, 92, 0.4);
}

.btn-outline-secondary {
    border-color: var(--slate-gray);
    color: var(--slate-gray);
}

.btn-outline-secondary:disabled {
    border-color: var(--muted-text);
    color: var(--muted-text);
}

/* Cards with moonlit theme */
.card {
    border-radius: 12px;
    transition: all 0.3s ease;
    border: 1px solid var(--slate-gray);
    background-color: var(--moonlight-cream);
}

.card:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 25px rgba(44, 74, 74, 0.15) !important;
    border-color: var(--moonlight-gold);
}

.card-title {
    color: var(--text-dark);
    font-weight: 600;
}

.card-text.text-muted {
    color: var(--muted-text) !important;
}

/* Sections */
section {
    padding: 4rem 0;
}

.bg-light {
    background: linear-gradient(180deg, var(--moonlight-cream) 0%, #F0F2F2 100%) !important;
}

/* Text enhancements */
.lead {
    font-size: 1.2rem;
    font-weight: 400;
    color: var(--text-dark);
}

h1, h2, h3 {
    color: var(--text-dark);
    font-weight: 600;
}

.text-muted {
    color: var(--muted-text) !important;
}

/* Hero section call-to-action */
.bg-primary {
    background: linear-gradient(135deg, var(--deep-teal) 0%, var(--midnight-teal) 100%) !important;
}

.bg-primary h2,
.bg-primary .lead {
    color: white !important;
}

/* Footer with moonlit theme */
footer {
    background: linear-gradient(135deg, var(--midnight-teal) 0%, var(--shadow-black) 100%) !important;
}

footer a {
    transition: color 0.3s ease;
}

footer a:hover {
    color: var(--moonlight-gold) !important;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .hero-section {
        min-height: 80vh;
        text-align: center;
        width: 100vw;
        margin-left: calc(-50vw + 50%);
        margin-right: calc(-50vw + 50%);
        padding-left: 15px;
        padding-right: 15px;
    }
    
    .hero-section h1 {
        font-size: 2.5rem;
    }
    
    section {
        padding: 3rem 0;
    }
    
    .book-cover-image {
        max-width: 280px;
        max-height: 45vh;
        margin: 0 auto;
    }
    
    /* Center footer content on mobile */
    footer .col-md-6 {
        text-align: center !important;
    }
}

/* Comprehensive border removal for any element that might be causing the line */
*:focus,
*:active,
*:focus-visible {
    outline: none !important;
}

/* Specifically target any pseudo-elements */
*:focus::before,
*:focus::after,
*:active::before,
*:active::after {
    border: none !important;
    outline: none !important;
    display: none !important;
}

/* Icon styling */
.bi {
    font-size: 1.1em;
}

/* Smooth scroll behavior */
html {
    scroll-behavior: smooth;
    overflow-x: hidden;
}

/* Enhanced contrast for better readability */
.text-white-50 {
    color: rgba(255, 255, 255, 0.7) !important;
}

/* Call-to-action emphasis */
.btn-lg {
    font-size: 1.1rem;
    padding: 1rem 2rem;
}

/* Link styling with moonlit theme */
a {
    color: var(--moonlight-gold);
}

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

/* Additional spacing utilities */
.py-6 {
    padding-top: 5rem !important;
    padding-bottom: 5rem !important;
}

/* View All button styling - teal outline theme */
.btn-view-all {
    background-color: transparent !important;
    border-color: var(--deep-teal) !important;
    color: var(--deep-teal) !important;
}

.btn-view-all:hover {
    background-color: var(--deep-teal) !important;
    border-color: var(--deep-teal) !important;
    color: white !important;
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(44, 74, 74, 0.3);
}

.btn-view-all:focus,
.btn-view-all:active {
    outline: 3px solid var(--deep-teal) !important;
    outline-offset: 2px !important;
    box-shadow: 0 0 0 0.2rem rgba(44, 74, 74, 0.25) !important;
}

/* Disabled platform button styling - bronze outline theme */
.btn-outline-secondary:disabled {
    border-color: var(--bronze-accent) !important;
    color: var(--bronze-accent) !important;
    background-color: transparent !important;
    opacity: 0.7;
}

/* SVG icon styling for platform buttons */
.btn-primary img {
    filter: brightness(0) saturate(100%) invert(100%);
}

/* Green outline button icon - green initially, white on hover */
.btn-view-all img {
    filter: brightness(0) saturate(100%) invert(28%) sepia(14%) saturate(1465%) hue-rotate(71deg) brightness(95%) contrast(88%);
}

.btn-view-all:hover img {
    filter: brightness(0) saturate(100%) invert(100%);
}

/* Disabled button icons - darker orange tint */
.btn-outline-secondary:disabled img {
    filter: brightness(0) saturate(100%) invert(35%) sepia(95%) saturate(1500%) hue-rotate(10deg) brightness(85%) contrast(95%);
    opacity: 0.9;
}


/* Custom shadow for moonlit feel */
.shadow-lg {
    box-shadow: 0 1rem 3rem rgba(44, 74, 74, 0.175) !important;
}

.shadow-sm {
    box-shadow: 0 0.125rem 0.25rem rgba(44, 74, 74, 0.075) !important;
}

/* Moonlit-themed section dividers */
section:nth-child(even) {
    background: linear-gradient(180deg, #F0F2F2 0%, var(--moonlight-cream) 100%);
}

/* Loading state for book cover (if needed) */
@keyframes moonlight-shimmer {
    0% { background-position: -200px 0; }
    100% { background-position: calc(200px + 100%) 0; }
}

.book-cover-image.loading {
    background: linear-gradient(90deg, var(--moonlight-cream) 0px, var(--moonlight-gold) 50px, var(--moonlight-cream) 100px);
    background-size: 200px 100%;
    animation: moonlight-shimmer 1.5s infinite;
}

/* Center "More Platforms" card when it appears alone on larger screens */
@media (min-width: 992px) {
    #available-formats .row.g-4 {
        justify-content: center;
    }
    #available-formats .row.g-4 .col-lg-4:nth-child(7) {
        flex: 0 0 auto;
        width: 33.333333%;
        max-width: 350px;
    }
}

/* Fix for Safari white bars on iPhone X+ in landscape - very narrow scope */
@supports(padding: env(safe-area-inset-left)) {
    @media only screen 
    and (device-width: 375px) and (device-height: 812px) and (-webkit-device-pixel-ratio: 3) and (orientation: landscape),
    only screen 
    and (device-width: 414px) and (device-height: 896px) and (-webkit-device-pixel-ratio: 2) and (orientation: landscape),
    only screen 
    and (device-width: 414px) and (device-height: 896px) and (-webkit-device-pixel-ratio: 3) and (orientation: landscape),
    only screen 
    and (device-width: 390px) and (device-height: 844px) and (-webkit-device-pixel-ratio: 3) and (orientation: landscape),
    only screen 
    and (device-width: 428px) and (device-height: 926px) and (-webkit-device-pixel-ratio: 3) and (orientation: landscape) {
        
        body {
            padding-left: env(safe-area-inset-left);
            padding-right: env(safe-area-inset-right);
        }
        
        .hero-section,
        .bg-primary,
        footer {
            margin-left: calc(-1 * env(safe-area-inset-left, 0px));
            margin-right: calc(-1 * env(safe-area-inset-right, 0px));
            padding-left: max(15px, env(safe-area-inset-left));
            padding-right: max(15px, env(safe-area-inset-right));
        }
    }
}