/* ====================================
   CUSTOM STYLES FOR SPIRITUAL WEBSITE
   ==================================== */

/* Root Variables */
:root {
    --color-primary: #7C3AED;
    --color-secondary: #A78BFA;
    --color-accent: #FCD34D;
    --color-bg: #F9F7FF;
    --color-text: #2D1B4E;
    --color-border: #E9D5FF;
    --color-success: #34D399;
    --color-error: #F87171;
    
    --transition-smooth: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
}

/* Typography */
html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    font-family: 'Lato', sans-serif;
    color: var(--color-text);
    background-color: #FFFFFF;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

h1, h2, h3, h4, h5, h6 {
    font-family: 'Playfair Display', serif;
    font-weight: 600;
    letter-spacing: -0.02em;
}

h1 {
    font-size: clamp(2.25rem, 5vw, 4.5rem);
    line-height: 1.2;
}

h2 {
    font-size: clamp(1.875rem, 4vw, 3rem);
    line-height: 1.3;
}

h3 {
    font-size: clamp(1.5rem, 3vw, 2.25rem);
}

p {
    font-size: 1rem;
    margin-bottom: 1rem;
}

a {
    color: var(--color-primary);
    text-decoration: none;
    transition: var(--transition-smooth);
}

a:hover {
    opacity: 0.8;
}

/* Buttons */
.btn-primary {
    background-color: var(--color-primary);
    color: white;
    padding: 0.75rem 1.5rem;
    border-radius: 0.5rem;
    font-weight: 600;
    border: none;
    cursor: pointer;
    transition: var(--transition-smooth);
    display: inline-block;
}

.btn-primary:hover {
    background-color: var(--color-secondary);
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(124, 58, 237, 0.2);
}

.btn-primary:active {
    transform: translateY(0);
}

/* Forms */
input,
textarea,
select {
    font-family: inherit;
    font-size: 1rem;
    transition: var(--transition-smooth);
}

input:focus,
textarea:focus,
select:focus {
    outline: none;
    border-color: var(--color-primary) !important;
    box-shadow: 0 0 0 3px rgba(124, 58, 237, 0.1);
}

input::placeholder,
textarea::placeholder {
    color: #9CA3AF;
}

/* Cards */
.card {
    background: white;
    border-radius: 0.5rem;
    padding: 1.5rem;
    box-shadow: var(--shadow-md);
    transition: var(--transition-smooth);
}

.card:hover {
    box-shadow: var(--shadow-lg);
    transform: translateY(-4px);
}

/* Navigation */
nav {
    background: white;
    box-shadow: var(--shadow-md);
}

nav a {
    color: var(--color-text);
    font-weight: 500;
}

nav a:hover {
    color: var(--color-primary);
}

/* Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.5;
    }
}

@keyframes shimmer {
    0% {
        background-position: -1000px 0;
    }
    100% {
        background-position: 1000px 0;
    }
}

[data-reveal] {
    animation: fadeInUp 0.6s ease-out forwards;
    opacity: 0;
}

/* Sections */
section {
    scroll-margin-top: 64px; /* Height of fixed nav */
}

/* Responsive */
@media (max-width: 768px) {
    h1 {
        font-size: 2rem;
    }
    
    h2 {
        font-size: 1.5rem;
    }
    
    h3 {
        font-size: 1.25rem;
    }
    
    .container {
        padding: 1rem;
    }
}

/* Utilities */
.text-truncate {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.line-clamp-2 {
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.line-clamp-3 {
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
}

/* Scrollbar Styling */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: var(--color-bg);
}

::-webkit-scrollbar-thumb {
    background: var(--color-primary);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--color-secondary);
}

/* Print Styles */
@media print {
    nav,
    footer,
    .no-print {
        display: none !important;
    }
    
    body {
        background: white;
    }
    
    a {
        text-decoration: underline;
    }
}

/* Accessibility */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* Dark Mode Support */
@media (prefers-color-scheme: dark) {
    body {
        background-color: #1F1F2E;
        color: #E5E5E5;
    }
    
    .card {
        background: #2D2D3D;
    }
    
    input,
    textarea {
        background-color: #3D3D4D;
        color: #E5E5E5;
        border-color: #4D4D5D;
    }
}

/* Loading State */
.loading {
    pointer-events: none;
    opacity: 0.6;
}

.spinner {
    display: inline-block;
    width: 1rem;
    height: 1rem;
    border: 2px solid rgba(124, 58, 237, 0.3);
    border-top-color: var(--color-primary);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* Parallax Effect */
.parallax {
    background-attachment: fixed;
    background-position: center;
    background-repeat: no-repeat;
    background-size: cover;
}

@media (max-width: 768px) {
    .parallax {
        background-attachment: scroll;
    }
}

/* Success/Error Messages */
.alert-success {
    background-color: rgba(52, 211, 153, 0.1);
    border: 1px solid var(--color-success);
    color: var(--color-success);
    padding: 1rem;
    border-radius: 0.5rem;
}

.alert-error {
    background-color: rgba(248, 113, 113, 0.1);
    border: 1px solid var(--color-error);
    color: var(--color-error);
    padding: 1rem;
    border-radius: 0.5rem;
}

/* Smooth Transitions */
* {
    transition: background-color 0.2s ease, color 0.2s ease;
}

button,
a {
    transition: var(--transition-smooth);
}
