/* Custom CSS for Novena Chart Generator */

:root {
    --primary-color: #007bff;
    --secondary-color: #6c757d;
    --success-color: #28a745;
    --warning-color: #ffc107;
    --danger-color: #dc3545;
    --light-color: #f8f9fa;
    --dark-color: #343a40;
    --spiritual-gold: #d4af37;
    --spiritual-purple: #663399;
    --spiritual-blue: #4169e1;
}

/* Kumara Creations Header Styling */
.kumara-logo-img {
    height: 100px;
    width: auto;
    max-width: 200px;
    object-fit: contain;
    transition: opacity 0.3s ease;
}

.kumara-logo-img:hover {
    opacity: 0.8;
}

/* Navigation styling to match Kumara Creations */
.navbar {
    padding: 1rem 0;
    background-color: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid #e9ecef;
}

.navbar-brand {
    margin-right: 3rem;
}

.navbar-nav .nav-link {
    font-size: 12px;
    font-weight: 500;
    letter-spacing: 1px;
    text-transform: uppercase;
    padding: 0.75rem 1rem;
    color: #7f8c8d !important;
    transition: color 0.3s ease;
}

.navbar-nav .nav-link:hover {
    color: #2c3e50 !important;
}

.navbar-nav .nav-link i {
    font-size: 14px;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    min-height: 100vh;
}

/* Hero Section */
.hero-section {
    background: url('/static/images/star-background.svg') center/cover;
    color: white;
    position: relative;
    overflow: hidden;
    min-height: 400px;
    display: flex;
    align-items: center;
}

.hero-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.1);
}

.hero-section .container {
    position: relative;
    z-index: 1;
}

/* Hero Icon Styling */
.hero-icon {
    filter: drop-shadow(0 8px 16px rgba(0,0,0,0.2));
    animation: float 3s ease-in-out infinite;
}

@keyframes float {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-10px); }
}

.hero-banner {
    animation: fadeInUp 1s ease-out;
}

/* Cards */
.card {
    border-radius: 15px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 35px rgba(0,0,0,0.1);
}

.card-header {
    border-radius: 15px 15px 0 0 !important;
    border-bottom: none;
}

/* Form Styling */
.form-control, .form-select {
    border-radius: 10px;
    border: 2px solid #e9ecef;
    padding: 12px 16px;
    transition: all 0.3s ease;
}

/* Textarea specific styling */
textarea.form-control {
    line-height: 1.5;
    resize: vertical;
    min-height: 80px;
}

.form-control:focus, .form-select:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.25);
    transform: translateY(-2px);
}

.form-label {
    color: var(--dark-color);
    margin-bottom: 8px;
}

.form-text {
    font-size: 0.875rem;
    color: var(--secondary-color);
}

/* Buttons */
.btn {
    border-radius: 25px;
    padding: 12px 24px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    transition: all 0.3s ease;
}

.btn-lg {
    padding: 15px 30px;
    font-size: 1.1rem;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--spiritual-blue) 100%);
    border: none;
    box-shadow: 0 4px 15px rgba(0, 123, 255, 0.3);
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(0, 123, 255, 0.4);
}

.btn-outline-secondary {
    border: 2px solid var(--secondary-color);
    color: var(--secondary-color);
}

.btn-outline-secondary:hover {
    background-color: var(--secondary-color);
    border-color: var(--secondary-color);
    transform: translateY(-3px);
}

/* Feature Cards */
.card h-100 {
    transition: all 0.3s ease;
}

.card h-100:hover {
    transform: translateY(-10px);
}

.card h-100 .fas {
    transition: all 0.3s ease;
}

.card h-100:hover .fas {
    transform: scale(1.2);
    color: var(--spiritual-gold) !important;
}

/* Character Counter */
#charCount {
    font-weight: bold;
    color: var(--primary-color);
}

/* Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.card {
    animation: fadeInUp 0.6s ease-out;
}

/* Navbar */
.navbar-brand {
    font-size: 1.5rem;
    font-weight: bold;
}

.navbar {
    backdrop-filter: blur(10px);
    background-color: rgba(248, 249, 250, 0.95) !important;
}

/* Footer */
footer {
    background: linear-gradient(135deg, var(--light-color) 0%, #e9ecef 100%);
    border-top: 1px solid #dee2e6;
}

/* Loading Animation */
.btn-primary:disabled {
    background: linear-gradient(135deg, #6c757d 0%, #495057 100%);
    cursor: not-allowed;
}

.loading {
    position: relative;
    overflow: hidden;
}

.loading::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.4), transparent);
    animation: loading 1.5s infinite;
}

@keyframes loading {
    0% { left: -100%; }
    100% { left: 100%; }
}

/* Responsive Design */
@media (max-width: 768px) {
    .hero-section h1 {
        font-size: 2.5rem;
    }
    
    .card-body {
        padding: 2rem 1.5rem;
    }
    
    .btn-lg {
        width: 100%;
        margin-bottom: 1rem;
    }
    
    /* Fix text fields for mobile - no scrollbars */
    .form-control, .form-select {
        font-size: 16px; /* Prevents zoom on iOS */
        padding: 12px;
        width: 100%;
        max-width: 100%;
        box-sizing: border-box;
        word-wrap: break-word;
        overflow-wrap: break-word;
    }
    
    textarea.form-control {
        min-height: 100px;
        height: auto;
        overflow-y: auto;
        resize: vertical;
    }
    
    /* Specific adjustments for purpose field */
    #purpose {
        min-height: 100px;
        line-height: 1.4;
    }
    
    /* Specific adjustments for commitment field */
    #daily_prayer {
        min-height: 150px;
    }
    
    /* Specific adjustments for bookmark commitment field */
    #bookmark_commitment {
        min-height: 120px;
    }
    
    /* Ensure placeholder text wraps */
    input::placeholder,
    textarea::placeholder {
        white-space: normal;
        word-wrap: break-word;
    }
}

/* Accessibility */
.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;
}

.form-control:invalid {
    border-color: var(--danger-color);
}

.form-control:valid {
    border-color: var(--success-color);
}

/* Loading Overlay Styles */
#loadingOverlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(10px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    opacity: 0;
    transition: opacity 0.3s ease;
}

#loadingOverlay.show {
    opacity: 1;
}

.loading-content {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 20px;
    padding: 3rem;
    text-align: center;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    max-width: 500px;
    width: 90%;
    backdrop-filter: blur(20px);
}

.spinner-container {
    margin-bottom: 2rem;
}

.custom-spinner {
    position: relative;
    width: 80px;
    height: 80px;
    margin: 0 auto;
}

.spinner-ring {
    position: absolute;
    width: 100%;
    height: 100%;
    border: 4px solid transparent;
    border-radius: 50%;
    animation: spin 1.5s linear infinite;
}

.spinner-ring:nth-child(1) {
    border-top-color: #007bff;
    animation-delay: 0s;
}

.spinner-ring:nth-child(2) {
    border-right-color: #6f42c1;
    animation-delay: 0.2s;
}

.spinner-ring:nth-child(3) {
    border-bottom-color: #28a745;
    animation-delay: 0.4s;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.loading-text h4 {
    color: #2c3e50;
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 1rem;
}

.loading-text p {
    color: #6c757d;
    font-size: 1rem;
    margin-bottom: 1.5rem;
    line-height: 1.5;
}

.loading-dots {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    margin-bottom: 2rem;
}

.loading-dots span {
    width: 8px;
    height: 8px;
    background-color: #007bff;
    border-radius: 50%;
    animation: pulse 1.4s ease-in-out infinite both;
}

.loading-dots span:nth-child(1) { animation-delay: -0.32s; }
.loading-dots span:nth-child(2) { animation-delay: -0.16s; }
.loading-dots span:nth-child(3) { animation-delay: 0s; }

@keyframes pulse {
    0%, 80%, 100% {
        transform: scale(0.8);
        opacity: 0.5;
    }
    40% {
        transform: scale(1);
        opacity: 1;
    }
}

/* Progress Bar Styles */
.progress-container {
    width: 100%;
    background-color: #e9ecef;
    border-radius: 10px;
    overflow: hidden;
    margin-bottom: 1rem;
    height: 8px;
}

.progress-bar {
    height: 100%;
    background: linear-gradient(90deg, #007bff 0%, #6f42c1 50%, #28a745 100%);
    border-radius: 10px;
    width: 0%;
    transition: width 0.3s ease;
    animation: progress-shimmer 2s ease-in-out infinite;
}

@keyframes progress-shimmer {
    0% { background-position: -200% 0; }
    100% { background-position: 200% 0; }
}

.progress-text {
    font-size: 0.9rem;
    color: #6c757d;
    margin-bottom: 1rem;
}

.large-novena-notice {
    background: linear-gradient(135deg, #fff3cd 0%, #ffeaa7 100%);
    border: 1px solid #ffc107;
    border-radius: 10px;
    padding: 1rem;
    margin-top: 1rem;
    font-size: 0.9rem;
    color: #856404;
}

.large-novena-notice i {
    color: #ffc107;
    margin-right: 0.5rem;
}

/* Print Styles */
@media print {
    .navbar, footer, .btn, .form-text {
        display: none !important;
    }
    
    .card {
        border: none !important;
        box-shadow: none !important;
    }
}

/* About Page Styles */
.about-hero {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    min-height: 300px;
    display: flex;
    align-items: center;
}

.about-icon {
    filter: drop-shadow(0 8px 16px rgba(0,0,0,0.2));
    animation: float 3s ease-in-out infinite;
}

.about-content {
    font-size: 1.1rem;
    line-height: 1.8;
    color: #2c3e50;
}

.kumara-link {
    color: var(--spiritual-purple);
    text-decoration: none;
    font-weight: 600;
    transition: color 0.3s ease;
}

.kumara-link:hover {
    color: var(--spiritual-gold);
    text-decoration: underline;
}

.companion-tool {
    transition: all 0.3s ease;
}

.companion-tool:hover {
    transform: translateX(10px);
}

.tool-icon {
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    border-radius: 15px;
}

.tool-link {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 600;
    transition: color 0.3s ease;
}

.tool-link:hover {
    color: var(--spiritual-gold);
    text-decoration: underline;
}

.mission-card {
    background: linear-gradient(135deg, #fff5f5 0%, #ffe0e0 100%);
    border: none !important;
}

.contact-box, .support-box {
    padding: 1rem;
}

.contact-box i, .support-box i {
    display: block;
}

/* Responsive adjustments for About page */
@media (max-width: 768px) {
    .about-hero h1 {
        font-size: 2rem;
    }
    
    .about-content {
        font-size: 1rem;
    }
    
    .companion-tool {
        margin-bottom: 2rem !important;
    }
    
    .tool-icon {
        width: 50px;
        height: 50px;
    }
}

/* ========================================
   Zen Minimalist Design for About Page
   ======================================== */

.about-hero-zen {
    background: #fafafa;
    padding: 6rem 0 4rem;
}

.zen-logo-container {
    margin: 0 auto;
    position: relative;
    animation: zen-pulse 3s ease-in-out infinite;
}

@keyframes zen-pulse {
    0%, 100% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.02); opacity: 0.95; }
}

.zen-logo {
    width: 250px;
    height: auto;
    display: block;
    margin: 0 auto;
}

.zen-title {
    font-size: 3.5rem;
    font-weight: 300;
    letter-spacing: 0.5rem;
    color: #2c3e50;
    margin-bottom: 0.5rem;
    text-transform: uppercase;
}

.zen-subtitle {
    font-size: 1.2rem;
    color: #7f8c8d;
    font-weight: 300;
    letter-spacing: 0.1rem;
}

.container-zen {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

.zen-section {
    padding: 5rem 0;
}

.zen-content {
    font-family: 'Georgia', serif;
}

.zen-lead {
    font-size: 1.6rem;
    line-height: 1.8;
    color: #2c3e50;
    margin-bottom: 2rem;
    font-weight: 400;
}

.zen-text {
    font-size: 1.15rem;
    line-height: 2;
    color: #5a6c7d;
    margin-bottom: 1.5rem;
}

.zen-link {
    color: #2c3e50;
    text-decoration: none;
    border-bottom: 1px solid #2c3e50;
    transition: all 0.3s ease;
}

.zen-link:hover {
    color: #667eea;
    border-color: #667eea;
}

.zen-divider {
    text-align: center;
    padding: 3rem 0;
}

.zen-ornament {
    font-size: 1.5rem;
    color: #d4af37;
}

.zen-heading {
    font-size: 2rem;
    font-weight: 300;
    letter-spacing: 0.3rem;
    text-transform: uppercase;
    color: #2c3e50;
}

.zen-tool-item {
    display: flex;
    gap: 2rem;
    align-items: flex-start;
    margin-bottom: 3rem;
    padding-bottom: 3rem;
    border-bottom: 1px solid #ecf0f1;
    transition: all 0.3s ease;
}

.zen-tool-item:last-child {
    border-bottom: none;
}

.zen-tool-item:hover {
    transform: translateX(10px);
}

.zen-tool-icon {
    font-size: 3rem;
    min-width: 80px;
    text-align: center;
}

.zen-tool-content {
    flex: 1;
}

.zen-tool-title {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    font-weight: 400;
}

.zen-tool-title a {
    color: #2c3e50;
    text-decoration: none;
    transition: color 0.3s ease;
}

.zen-tool-title a:hover {
    color: #667eea;
}

.zen-tool-desc {
    color: #7f8c8d;
    line-height: 1.8;
    font-size: 1rem;
}

.zen-mission {
    background: #fafafa;
    margin: 3rem -2rem;
    padding: 5rem 2rem !important;
}

.zen-mission-icon {
    font-size: 3rem;
    color: #e74c3c;
}

.zen-mission-text {
    font-size: 1.3rem;
    line-height: 1.8;
    color: #2c3e50;
    font-weight: 400;
}

.zen-contact-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    margin-top: 3rem;
}

.zen-contact-item {
    text-align: center;
    transition: all 0.3s ease;
}

.zen-contact-item:hover {
    transform: translateY(-5px);
}

.zen-contact-icon {
    font-size: 3rem;
    color: #d4af37;
    margin-bottom: 1rem;
}

.zen-contact-label {
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.2rem;
    color: #2c3e50;
    margin-bottom: 0.5rem;
    font-weight: 600;
}

.zen-contact-description {
    font-size: 0.95rem;
    color: #7f8c8d;
    margin-bottom: 1rem;
}

.zen-contact-value {
    font-size: 1.1rem;
    color: #2c3e50;
    text-decoration: none;
    transition: color 0.3s ease;
    display: inline-block;
    border-bottom: 1px solid transparent;
}

.zen-contact-value:hover {
    color: #667eea;
    border-bottom: 1px solid #667eea;
}

.zen-return-link {
    display: inline-block;
    color: #7f8c8d;
    text-decoration: none;
    font-size: 1rem;
    letter-spacing: 0.1rem;
    transition: all 0.3s ease;
    padding: 1rem 2rem;
    border: 1px solid #ecf0f1;
    border-radius: 50px;
}

.zen-return-link:hover {
    color: #2c3e50;
    border-color: #2c3e50;
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

/* Responsive adjustments for Zen Design */
@media (max-width: 768px) {
    .zen-logo {
        width: 180px;
    }
    
    .zen-title {
        font-size: 2.5rem;
        letter-spacing: 0.3rem;
    }
    
    .zen-heading {
        font-size: 1.5rem;
        letter-spacing: 0.2rem;
    }
    
    .zen-contact-grid {
        grid-template-columns: 1fr;
        gap: 3rem;
    }
    
    .zen-tool-item {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }
    
    .zen-tool-icon {
        min-width: auto;
    }
    
    .zen-tool-item:hover {
        transform: none;
    }
    
    .zen-lead {
        font-size: 1.3rem;
    }
    
    .zen-text {
        font-size: 1rem;
    }
}

/* Additional offerings section */
.zen-offerings-section {
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 1px solid #ecf0f1;
    text-align: center;
}

.zen-offerings-text {
    font-size: 0.95rem;
    color: #7f8c8d;
    line-height: 1.8;
    margin-bottom: 0.5rem;
}

/* Sponsor section */
.zen-sponsor {
    background: #fafafa;
    margin: 0 -2rem;
    padding: 5rem 2rem !important;
}

.zen-sponsor-box {
    background: transparent;
    padding: 2.5rem;
    border-radius: 15px;
    box-shadow: none;
    transition: all 0.3s ease;
}

.zen-sponsor-box:hover {
    transform: translateY(-5px);
}

.zen-sponsor-heading {
    font-size: 1.5rem;
    color: #2c3e50;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.1rem;
}

.zen-sponsor-btn {
    display: inline-block;
    padding: 0.9rem 2rem;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    text-decoration: none;
    border-radius: 50px;
    font-size: 1rem;
    font-weight: 500;
    transition: all 0.3s ease;
}

.zen-sponsor-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(102, 126, 234, 0.4);
    color: white;
}

/* Responsive adjustments for sponsor section */
@media (max-width: 768px) {
    .zen-sponsor {
        margin: 0;
        padding: 3rem 1rem !important;
    }
    
    .zen-sponsor-box {
        padding: 1.5rem;
    }
    
    .zen-offerings-text {
        font-size: 0.9rem;
    }
}

/* Decree information display */
.decree-info {
    margin-top: 15px;
    animation: slideDown 0.3s ease-out;
}

.decree-info-card {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border: 2px solid #007bff;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 4px 12px rgba(0, 123, 255, 0.15);
    transition: all 0.3s ease;
}

.decree-info-card.clickable-decree {
    cursor: pointer;
}

.decree-info-card.clickable-decree:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(0, 123, 255, 0.25);
    border-color: #0056b3;
    background: linear-gradient(135deg, #e3f2fd 0%, #bbdefb 100%);
}

.decree-info-card.clickable-decree:active {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 123, 255, 0.2);
}

.decree-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 12px;
}

.decree-found-label {
    color: #28a745;
    font-weight: 600;
    font-size: 0.9rem;
    text-transform: uppercase;
}

.decree-number {
    font-size: 1.1rem;
    color: #007bff;
    margin-bottom: 6px;
}

.decree-title {
    font-size: 1rem;
    color: #495057;
    line-height: 1.5;
    margin-bottom: 12px;
}

.decree-meta {
    display: flex;
    gap: 20px;
    font-size: 0.85rem;
    color: #6c757d;
    padding-top: 12px;
    border-top: 1px solid #dee2e6;
}

.decree-page {
    display: flex;
    align-items: center;
    gap: 5px;
}

.decree-section {
    font-style: italic;
}

/* Decree selection animation */
.decree-selected {
    animation: pulseGreen 0.6s ease-out;
    border-color: #28a745 !important;
}

@keyframes pulseGreen {
    0%, 100% {
        box-shadow: 0 0 0 0 rgba(40, 167, 69, 0.4);
    }
    50% {
        box-shadow: 0 0 0 10px rgba(40, 167, 69, 0);
    }
}

/* Decree selection toast notification */
.decree-selection-toast {
    position: relative;
    background: linear-gradient(135deg, #d4edda 0%, #c3e6cb 100%);
    color: #155724;
    border: 1px solid #c3e6cb;
    border-radius: 8px;
    padding: 12px 15px;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    font-size: 0.9rem;
    opacity: 0;
    transform: translateY(-10px);
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(40, 167, 69, 0.15);
}

.decree-selection-toast.show {
    opacity: 1;
    transform: translateY(0);
}

.decree-selection-toast strong {
    margin-right: 5px;
}

@media (max-width: 768px) {
    .decree-info-card {
        padding: 15px;
    }
    
    .decree-meta {
        flex-direction: column;
        gap: 8px;
    }
    
    .decree-selection-toast {
        font-size: 0.85rem;
        padding: 10px 12px;
    }
}
