/**
 * Custom Styles
 * Naomi Wendot Writer & Ministry Website
 * Benchmarked against BCH for seamless navigation experience
 */

/* Google Fonts Import */
@import url('https://fonts.googleapis.com/css2?family=Montserrat:ital,wght@0,400;0,500;0,600;0,700;0,800;1,400;1,600;1,700&display=swap');

/* CSS Custom Properties */
:root {
    --color-plum: #4A1942;
    --color-gold: #D4A017;
    --color-cream: #FFFDF5;
    --color-rose: #FDEAEA;
    --color-charcoal: #1C1C1C;
    --font-heading: 'Montserrat', sans-serif;
    --font-body: 'Century Gothic', 'CenturyGothic', 'AppleGothic', sans-serif;
}

/* Base Styles */
html {
    scroll-behavior: smooth;
    overflow-x: hidden;
    max-width: 100vw;
}

body {
    font-family: var(--font-body);
    background-color: var(--color-cream);
    color: var(--color-charcoal);
    overflow-x: hidden;
    max-width: 100vw;
    position: relative;
}

/* Prevent horizontal overflow on all containers */
* {
    box-sizing: border-box;
}

section, div, main, article, aside {
    max-width: 100%;
}

/* Container overflow prevention */
.max-w-7xl, .max-w-4xl, .max-w-2xl, .max-w-xl, .max-w-lg, .max-w-md {
    max-width: 100%;
    width: 100%;
}

@media (min-width: 640px) {
    .max-w-md { max-width: 28rem; }
}

@media (min-width: 768px) {
    .max-w-lg { max-width: 32rem; }
    .max-w-xl { max-width: 36rem; }
    .max-w-2xl { max-width: 42rem; }
}

@media (min-width: 1024px) {
    .max-w-4xl { max-width: 56rem; }
    .max-w-7xl { max-width: 80rem; }
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
}

/* Font utility classes */
.font-montserrat {
    font-family: var(--font-heading);
}

.font-century {
    font-family: var(--font-body);
}

/* Tailwind Shortcuts for Brand Colors */
.text-plum { color: var(--color-plum); }
.text-gold { color: var(--color-gold); }
.text-cream { color: var(--color-cream); }
.text-rose { color: var(--color-rose); }
.text-charcoal { color: var(--color-charcoal); }

.bg-plum { background-color: var(--color-plum); }
.bg-gold { background-color: var(--color-gold); }
.bg-cream { background-color: var(--color-cream); }
.bg-rose { background-color: var(--color-rose); }
.bg-charcoal { background-color: var(--color-charcoal); }

.border-plum { border-color: var(--color-plum); }
.border-gold { border-color: var(--color-gold); }
.border-cream { border-color: var(--color-cream); }
.border-rose { border-color: var(--color-rose); }

.hover\:text-plum:hover { color: var(--color-plum); }
.hover\:text-gold:hover { color: var(--color-gold); }
.hover\:text-cream:hover { color: var(--color-cream); }

.hover\:bg-plum:hover { background-color: var(--color-plum); }
.hover\:bg-gold:hover { background-color: var(--color-gold); }
.hover\:bg-rose:hover { background-color: var(--color-rose); }

/* Fade In Up Animation */
.fade-in-up {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.fade-in-up.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Navbar Scroll State */
#main-nav {
    transition: background-color 0.3s ease, box-shadow 0.3s ease;
}

#main-nav.nav-scrolled {
    background-color: var(--color-plum);
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

/* Nav link color changes on scroll */
#main-nav.nav-scrolled .nav-link {
    color: var(--color-cream);
}

#main-nav.nav-scrolled .nav-link:hover {
    color: var(--color-gold);
}

#main-nav.nav-scrolled .brand-name {
    color: var(--color-cream);
}

/* Hamburger lines on scroll */
#main-nav.nav-scrolled .hamburger-line {
    background-color: var(--color-cream);
}

/* Hamburger Animation */
#mobile-menu-btn.active .hamburger-line:nth-child(1) {
    transform: rotate(45deg) translate(6px, 6px);
}

#mobile-menu-btn.active .hamburger-line:nth-child(2) {
    opacity: 0;
}

#mobile-menu-btn.active .hamburger-line:nth-child(3) {
    transform: rotate(-45deg) translate(6px, -6px);
}

/* Mobile Accordion Chevron Rotation */
.mobile-accordion-btn svg.rotate-180 {
    transform: rotate(180deg);
}

/* Gold Underline Accent */
.gold-underline {
    width: 60px;
    height: 3px;
    background-color: var(--color-gold);
    border-radius: 999px;
    margin: 0 auto;
}

/* Verse Card */
.verse-card {
    position: relative;
    background-color: var(--color-rose);
    border-left: 4px solid var(--color-gold);
    border-radius: 0.75rem;
    padding: 1.5rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.verse-card::before {
    content: '"';
    position: absolute;
    top: 0.5rem;
    left: 0.75rem;
    font-size: 3rem;
    font-family: var(--font-heading);
    color: var(--color-gold);
    opacity: 0.15;
    line-height: 1;
}

.verse-card .verse-text {
    font-family: var(--font-heading);
    font-style: italic;
    color: var(--color-plum);
    font-size: 1.125rem;
    line-height: 1.75;
    position: relative;
    z-index: 1;
}

.verse-card .verse-reference {
    color: var(--color-gold);
    font-weight: 600;
    font-size: 0.875rem;
    margin-top: 0.75rem;
}

/* Declaration Card */
.declaration-card {
    background-color: var(--color-gold);
    border-radius: 1rem;
    padding: 2rem;
    text-align: center;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.15);
}

.declaration-card .declaration-text {
    font-family: var(--font-heading);
    font-style: italic;
    color: var(--color-plum);
    font-size: 1.5rem;
    font-weight: 600;
    line-height: 1.6;
}

/* Category Pills */
.category-pill {
    display: inline-block;
    padding: 0.375rem 0.875rem;
    border-radius: 999px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.025em;
}

.category-pill.children {
    background-color: #FEF3C7;
    color: #92400E;
}

.category-pill.teens {
    background-color: #DBEAFE;
    color: #1E3A8A;
}

.category-pill.adults {
    background-color: #D1FAE5;
    color: #065F46;
}

.category-pill.aged {
    background-color: #E9D5FF;
    color: #6B21A8;
}

.category-pill.all {
    background-color: rgba(201, 162, 39, 0.1);
    color: var(--color-gold);
    border: 1px solid var(--color-gold);
}

/* Card Hover Lift Effect */
.hover-lift {
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.hover-lift:hover {
    transform: translateY(-4px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: var(--color-cream);
}

::-webkit-scrollbar-thumb {
    background: var(--color-gold);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #B8911F;
}

/* Hide Scrollbar (for horizontal carousels) */
.scrollbar-hide {
    -ms-overflow-style: none;
    scrollbar-width: none;
}

.scrollbar-hide::-webkit-scrollbar {
    display: none;
}

/* Horizontal Scroll Snap */
.snap-x {
    scroll-snap-type: x mandatory;
}

.snap-center {
    scroll-snap-align: center;
}

/* Toast Notifications */
.toast {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    min-width: 300px;
    padding: 1rem 1.5rem;
    border-radius: 0.5rem;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    animation: slideInRight 0.3s ease;
    z-index: 9999;
}

.toast.success {
    background-color: var(--color-gold);
    color: var(--color-plum);
}

.toast.info {
    background-color: var(--color-plum);
    color: var(--color-cream);
}

.toast.error {
    background-color: #DC2626;
    color: white;
}

.toast.warning {
    background-color: #F59E0B;
    color: white;
}

@keyframes slideInRight {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

.toast.fade-out {
    animation: fadeOut 0.3s ease forwards;
}

@keyframes fadeOut {
    to {
        opacity: 0;
        transform: translateY(-10px);
    }
}

/* Flash Message */
.flash-message {
    padding: 1rem 1.5rem;
    border-radius: 0.5rem;
    margin-bottom: 1.5rem;
    animation: slideInDown 0.3s ease;
}

@keyframes slideInDown {
    from {
        transform: translateY(-20px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

/* Line Clamp Utilities */
.line-clamp-3 {
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.line-clamp-4 {
    display: -webkit-box;
    -webkit-line-clamp: 4;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Hero Parallax Effect (Desktop Only) */
.hero-parallax {
    background-attachment: fixed;
    background-size: cover;
    background-position: center;
}

@media (max-width: 768px) {
    .hero-parallax {
        background-attachment: scroll;
    }
}

/* Hero Overlay */
.hero-overlay {
    position: absolute;
    inset: 0;
    z-index: 10;
}

/* Float Card Animation */
@keyframes float {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-8px);
    }
}

.float-card {
    animation: float 3s ease-in-out infinite;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

/* Tilt Card (Desktop Only) */
@media (min-width: 768px) {
    .tilt-card {
        transform: rotate(-3deg);
    }
}

@media (max-width: 767px) {
    .tilt-card {
        transform: rotate(0);
    }
}

/* Reduced Motion */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
    
    .fade-in-up {
        opacity: 1;
        transform: none;
    }
    
    .float-card {
        animation: none;
    }
}

/* Responsive Typography */
@media (max-width: 640px) {
    .verse-card .verse-text {
        font-size: 1rem;
    }
    
    .declaration-card .declaration-text {
        font-size: 1.25rem;
    }
}
