/* ChurchHubPro.com - Luxury Church Listing Platform */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=Playfair+Display:ital,wght@0,400;0,700;1,400&display=swap');

:root {
    /* Light Mode (Default) */
    --bg-primary: #ffffff;
    --bg-secondary: #f8f9fa;
    --bg-tertiary: #f1f3f5;
    --text-primary: #1a1a1a;
    --text-secondary: #4a4a4a;
    --text-muted: #6c757d;
    --accent-color: #0056b3;
    /* Professional Blue */
    --accent-gold: #d4af37;
    /* Luxury Gold */
    --border-color: #e9ecef;
    --nav-bg: rgba(255, 255, 255, 0.8);
    --card-bg: #ffffff;
    --shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
    --transition: all 0.3s ease;
    --hero-overlay: rgba(0, 0, 0, 0.2);
    /* Alert Colors */
    --alert-success-bg: #d3f9d8;
    --alert-success-text: #2b8a3e;
    --alert-error-bg: #fff5f5;
    --alert-error-text: #c92a2a;
}

[data-theme="dark"] {
    --bg-primary: #0a0a0a;
    --bg-secondary: #121212;
    --bg-tertiary: #1e1e1e;
    --text-primary: #f8f9fa;
    --text-secondary: #ced4da;
    --text-muted: #adb5bd;
    --accent-color: #3b82f6;
    --accent-gold: #fcc419;
    --border-color: #2a2a2a;
    --nav-bg: rgba(10, 10, 10, 0.8);
    --card-bg: #1a1a1a;
    --shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    --hero-overlay: rgba(0, 0, 0, 0.3);
    /* Alert Colors */
    --alert-success-bg: #1a4d2e;
    --alert-success-text: #51cf66;
    --alert-error-bg: #4a1a1a;
    --alert-error-text: #ff6b6b;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    transition: var(--transition);
}

h1,
h2,
h3,
h4,
.luxury-text {
    font-family: 'Playfair Display', serif;
}

a {
    text-decoration: none;
    color: inherit;
    transition: var(--transition);
}

ul {
    list-style: none;
}

img {
    max-width: 100%;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Navbar */
header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    background: var(--nav-bg);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border-color);
    transition: var(--transition);
}

.navbar {
    height: 80px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
}

.logo img {
    height: 50px;
    width: auto;
    transition: var(--transition);
    flex-shrink: 0;
}

.logo .logo-dark {
    display: none;
}

[data-theme="dark"] .logo .logo-light {
    display: none;
}

[data-theme="dark"] .logo .logo-dark {
    display: block;
}

/* Auth page logo switching */
.auth-card .logo-light {
    display: block !important;
    height: 100px;
    margin: 0 auto;
}

.auth-card .logo-dark {
    display: none !important;
    height: 100px;
    margin: 0 auto;
}

[data-theme="dark"] .auth-card .logo-light {
    display: none !important;
}

[data-theme="dark"] .auth-card .logo-dark {
    display: block !important;
}

.brand-name {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}

.brand-text {
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--text-primary);
    font-family: 'Playfair Display', serif;
    white-space: nowrap;
}

.beta-badge {
    background: var(--accent-gold);
    color: #000;
    padding: 3px 8px;
    border-radius: 12px;
    font-size: 0.65rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    white-space: nowrap;
}

.nav-links {
    display: flex;
    gap: 30px;
    align-items: center;
}

.nav-links a {
    font-weight: 500;
    font-size: 0.95rem;
    color: var(--text-primary);
}

.nav-links a:hover {
    color: var(--accent-gold);
}

.btn-premium {
    background: var(--accent-gold) !important;
    color: #000 !important;
    padding: 10px 20px;
    border-radius: 5px;
    font-weight: 600;
    text-decoration: none;
    display: inline-block;
    border: none;
}

.theme-toggle {
    cursor: pointer;
    background: none;
    border: none;
    color: var(--text-primary);
    font-size: 1.2rem;
    padding: 5px;
}

/* Hero Section */
.hero {
    position: relative;
    height: 80vh;
    min-height: 600px;
    max-height: 900px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: #fff;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    background-attachment: fixed;
    margin-top: 0;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--hero-overlay);
    z-index: 0;
}

.hero::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(180deg, rgba(0,0,0,0.05) 0%, rgba(0,0,0,0.15) 100%);
    z-index: 0;
}

/* Premier Section Image */
.premier-section-image {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.premier-section-image:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.15);
}

.hero-content {
    position: relative;
    z-index: 1;
    max-width: 800px;
}

.hero-content h1 {
    font-size: 4rem;
    margin-bottom: 20px;
    font-weight: 700;
}

.hero-content p {
    font-size: 1.2rem;
    margin-bottom: 40px;
    opacity: 0.9;
}

/* Search Bar */
.search-container {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(20px);
    padding: 15px;
    border-radius: 12px;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.2);
    max-width: 900px;
    margin: 0 auto;
}

.search-input {
    flex: 1;
    min-width: 200px;
    background: var(--card-bg);
    border: 1px solid rgba(0, 0, 0, 0.2);
    padding: 12px 15px;
    border-radius: 8px;
    font-size: 0.95rem;
    color: var(--text-primary);
}

[data-theme="dark"] .search-input {
    border: 1px solid rgba(255, 255, 255, 0.5);
}

.search-select {
    flex: 0 1 180px;
    background: var(--card-bg);
    border: 1px solid rgba(0, 0, 0, 0.2);
    padding: 12px 15px;
    border-radius: 8px;
    font-size: 0.95rem;
    color: var(--text-primary);
    cursor: pointer;
}

[data-theme="dark"] .search-select {
    border: 1px solid rgba(255, 255, 255, 0.5);
}

.search-btn {
    background: var(--accent-gold);
    color: #000;
    border: none;
    padding: 12px 30px;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    white-space: nowrap;
}

.search-btn:hover {
    background: #c19b2e;
}

/* Sections */
.section {
    padding: 100px 0;
}

.section-title {
    text-align: center;
    margin-bottom: 60px;
}

.section-title h2 {
    font-size: 2.5rem;
    margin-bottom: 15px;
}

.section-title p {
    color: var(--text-muted);
}

/* Grid */
.grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 30px;
}

.card {
    background: var(--card-bg);
    border-radius: 15px;
    overflow: hidden;
    box-shadow: var(--shadow);
    border: 1px solid var(--border-color);
    transition: var(--transition);
}

/* Home page cards with themed border */
.featured-categories .card {
    border: 1px solid var(--border-color);
}

/* Listing page cards with themed border */
.listing-results .card,
.church-profile-content .card {
    border: 1px solid var(--border-color);
}

/* Auth form links */
.auth-link {
    color: var(--accent-color);
}

.card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
}

/* Contact Page Cards */
.contact-section .card {
    border: 1px solid var(--border-color);
}

.card-img {
    position: relative;
    height: 200px;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

.card-content {
    padding: 25px;
}

.card-content h3 {
    margin-bottom: 10px;
}

/* Footer */
footer {
    background: var(--bg-secondary);
    padding: 80px 0 30px;
    border-top: 1px solid var(--border-color);
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 40px;
    margin-bottom: 50px;
}

.footer-col h4 {
    margin-bottom: 25px;
    font-size: 1.2rem;
    color: var(--text-primary);
}

.footer-col ul li {
    margin-bottom: 12px;
}

.footer-col ul li a {
    color: var(--text-muted);
}

.footer-col ul li a:hover {
    color: var(--accent-gold);
}

.footer-bottom {
    text-align: center;
    border-top: 1px solid var(--border-color);
    padding-top: 30px;
    color: var(--text-muted);
    font-size: 0.9rem;
}

.footer-bottom p {
    color: var(--text-primary) !important;
}

/* Footer text white in dark mode */
[data-theme="dark"] footer,
[data-theme="dark"] footer .footer-col h4,
[data-theme="dark"] footer .footer-col p,
[data-theme="dark"] footer .footer-col ul li a,
[data-theme="dark"] footer .footer-bottom,
[data-theme="dark"] footer .footer-bottom p {
    color: #ffffff !important;
}

/* Auth Pages */
.auth-wrapper {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-primary);
}

.auth-container {
    display: flex;
    width: 100%;
    max-width: 900px;
    background: var(--card-bg);
    border-radius: 20px;
    box-shadow: var(--shadow);
    border: 2px solid #fff;
    overflow: hidden;
}

[data-theme="dark"] .auth-container {
    border: 2px solid #fff;
}

.auth-image {
    flex: 1;
    min-height: 500px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.auth-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    transition: transform 0.3s ease;
}

.auth-image:hover img {
    transform: scale(1.02);
}

.auth-card {
    flex: 1;
    padding: 50px;
    background: var(--card-bg);
    border-left: 1px solid var(--border-color);
    animation: fadeInUp 0.6s ease-out;
}


.auth-card h2 {
    margin-bottom: 30px;
    text-align: center;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
}

.form-control {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid #000;
    border-radius: 8px;
    background: var(--bg-tertiary);
    color: var(--text-primary);
}

[data-theme="dark"] .form-control {
    border: 1px solid #fff;
}

.password-input-container {
    position: relative;
    display: flex;
    align-items: center;
}

.password-input-container .form-control {
    padding-right: 50px;
}

.password-toggle {
    position: absolute;
    right: 10px;
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    padding: 5px;
    font-size: 1rem;
    transition: var(--transition);
}

.password-toggle:hover {
    color: var(--accent-color);
}

.btn-block {
    width: 100%;
    padding: 12px;
    background: var(--accent-color);
    color: #fff;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
}

/* Gold buttons should have black text */
.btn-block[style*="var(--accent-gold)"],
.btn-block[style*="--accent-gold"],
button.btn-block[style*="gold"],
.btn-block.btn-gold {
    background: var(--accent-gold) !important;
    color: #000 !important;
}

/* Cookie Banner */
.cookie-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    background: var(--bg-primary);
    border: 2px solid #000;
    padding: 20px 0;
    z-index: 9999;
    transition: transform 0.5s ease-in-out;
    transform: translateY(100%);
    display: none;
    box-shadow: 0 -5px 20px rgba(0, 0, 0, 0.2);
}

.cookie-banner.visible {
    display: block;
    transform: translateY(0);
}

.cookie-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 30px;
}

.cookie-text {
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.cookie-btns {
    display: flex;
    gap: 15px;
    white-space: nowrap;
}

.btn-cookie {
    padding: 8px 25px;
    border-radius: 5px;
    font-weight: 600;
    cursor: pointer;
    font-size: 0.85rem;
    border: 1px solid var(--border-color);
    background: var(--bg-secondary);
    color: var(--text-primary);
}

.btn-cookie.accept {
    background: var(--accent-color);
    color: #fff;
    border-color: var(--accent-color);
}

/* Mobile Responsive */
.mobile-toggle {
    display: none;
    font-size: 1.5rem;
    cursor: pointer;
    z-index: 1001;
}

@media (max-width: 992px) {
    .hero {
        background-attachment: scroll;
        height: 70vh;
        min-height: 500px;
    }
    
    .hero-content h1 {
        font-size: 3rem;
    }

    .footer-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .grid {
        grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)) !important;
    }
}

@media (max-width: 768px) {
    .nav-links {
        position: fixed;
        right: -100%;
        top: 80px;
        flex-direction: column;
        background: var(--bg-primary);
        width: 100%;
        height: calc(100vh - 80px);
        padding: 40px;
        transition: right 0.3s ease-in-out;
        gap: 20px;
        overflow-y: auto;
        box-shadow: -5px 0 20px rgba(0, 0, 0, 0.1);
    }

    .nav-links.active {
        right: 0;
    }

    .mobile-toggle {
        display: block;
    }

    .search-container {
        flex-direction: column;
        padding: 15px;
    }

    .search-input,
    .search-select {
        width: 100%;
        flex: 1 1 100% !important;
    }

    .search-btn {
        width: 100%;
        padding: 15px;
    }

    .footer-grid {
        grid-template-columns: 1fr;
    }

    .hero {
        background-attachment: scroll;
        height: 60vh;
        min-height: 400px;
    }
    
    .hero-content h1 {
        font-size: 2.5rem;
    }
    
    .hero-content p {
        font-size: 1rem;
    }
    
    /* Church Profile Page - Mobile */
    .church-profile .profile-hero {
        height: 300px !important;
    }
    
    .church-profile .profile-hero h1 {
        font-size: 2rem !important;
    }
    
    .church-profile .profile-hero .church-logo {
        width: 100px !important;
        height: 100px !important;
    }
    
    .church-profile-content .grid[style*="2fr 1fr"],
    .church-profile-content .grid[style*="grid-template-columns: 2fr 1fr"] {
        grid-template-columns: 1fr !important;
    }
    
    .church-profile-content .sidebar {
        order: 2;
    }
    
    .church-profile-content .sidebar .card {
        position: static !important;
    }
    
    /* Contact Page - Mobile */
    .contact-section .grid[style*="1fr 1fr"],
    .contact-section .grid[style*="grid-template-columns: 1fr 1fr"] {
        grid-template-columns: 1fr !important;
    }
    
    /* Add Listing Page - Mobile */
    .form-group .grid[style*="1fr 1fr"],
    .grid[style*="grid-template-columns: 1fr 1fr"] {
        grid-template-columns: 1fr !important;
    }
    
    .grid[style*="grid-template-columns: 1fr 1fr 1fr"] {
        grid-template-columns: 1fr !important;
    }
    
    /* Checkout Page - Mobile */
    .checkout .grid,
    section .grid[style*="grid-template-columns: 1fr 1fr"] {
        grid-template-columns: 1fr !important;
    }
    
    /* Dashboard Header - Mobile */
    .section > .container > div[style*="display: flex"] {
        flex-direction: column !important;
        align-items: flex-start !important;
        gap: 20px;
    }
    
    /* Policy Pages - Mobile */
    .section .container[style*="max-width: 800px"] {
        max-width: 100% !important;
        padding: 30px !important;
        margin: 20px;
    }
    
    /* Success/Error Icons - Mobile */
    div[style*="width: 100px; height: 100px"],
    div[style*="width: 80px; height: 80px"] {
        width: 80px !important;
        height: 80px !important;
    }
    
    /* Dashboard Tables - Mobile Improvements */
    .card table {
        min-width: 600px;
    }
    
    .card > div[style*="overflow-x"] {
        -webkit-overflow-scrolling: touch;
        border-radius: 0 0 15px 15px;
    }
    
    table th,
    table td {
        white-space: nowrap;
    }

    .cookie-content {
        flex-direction: column;
        text-align: center;
        gap: 15px;
    }
    
    .cookie-btns {
        flex-direction: column;
        width: 100%;
    }
    
    .btn-cookie {
        width: 100%;
    }
    
    /* Auth Cards */
    .auth-card {
        padding: 30px;
        margin: 20px;
    }

    /* Auth Container Mobile */
    .auth-container {
        flex-direction: column;
        max-width: 450px;
    }

    .auth-image {
        min-height: 250px;
        order: -1;
    }
    
    .auth-image img {
        border-radius: 20px 20px 0 0;
    }

    .auth-card {
        border-left: none;
        border-top: 1px solid var(--border-color);
    }
    
    /* Dashboard Tables */
    table {
        font-size: 0.85rem;
    }
    
    table th, table td {
        padding: 10px 15px;
    }
    
    /* Checkout Grid */
    .checkout .grid {
        grid-template-columns: 1fr !important;
    }
    
    /* Premier Section Grid */
    .section .grid[style*="grid-template-columns: 1fr 1fr"] {
        grid-template-columns: 1fr !important;
    }
    
    .premier-section-image {
        max-width: 100%;
        margin-top: 30px;
    }
}

@media (max-width: 480px) {
    .hero {
        background-attachment: scroll;
        height: 55vh;
        min-height: 350px;
    }
    
    .hero-content h1 {
        font-size: 2rem;
    }
    
    .section-title h2 {
        font-size: 2rem;
    }
    
    .container {
        padding: 0 15px;
    }
    
    .card {
        padding: 20px;
    }
    
    .btn-premium {
        padding: 10px 15px;
        font-size: 0.9rem;
    }
    
    /* Ultra-small screens */
    .hero-content h1 {
        font-size: 1.75rem !important;
    }
    
    .church-profile .profile-hero h1 {
        font-size: 1.5rem !important;
    }
    
    .navbar {
        height: 70px;
    }
    
    header {
        height: 70px;
    }
    
    .nav-links {
        top: 70px;
        height: calc(100vh - 70px);
    }
    
    main {
        padding-top: 70px;
    }
    
    .section[style*="padding-top: 140px"] {
        padding-top: 100px !important;
    }
    
    .logo img {
        height: 40px;
    }
    
    .brand-text {
        font-size: 1.1rem;
    }
    
    /* Responsive Typography */
    h1 {
        font-size: 1.75rem;
        line-height: 1.3;
    }
    
    h2 {
        font-size: 1.5rem;
        line-height: 1.4;
    }
    
    h3 {
        font-size: 1.25rem;
        line-height: 1.4;
    }
    
    p {
        font-size: 0.95rem;
        line-height: 1.6;
    }
    
    /* Better mobile card spacing */
    .card-content {
        padding: 20px;
    }
    
    /* Improve mobile form inputs */
    .form-control {
        font-size: 16px !important;
    }
    
    /* Prevent zoom on input focus in iOS */
    input[type="text"],
    input[type="email"],
    input[type="tel"],
    input[type="url"],
    input[type="password"],
    textarea,
    select {
        font-size: 16px !important;
    }
}

/* Loading States */
.btn-loading {
    display: none;
}

button:disabled .btn-loading {
    display: inline;
}

button:disabled .btn-text {
    display: none;
}

button:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

/* Alert Messages */
.alert {
    animation: slideIn 0.3s ease-out;
    padding: 15px;
    border-radius: 8px;
    margin-top: 20px;
}

/* Success Alert Styles */
.alert-success,
[style*="background: #d3f9d8"],
[style*="background: var(--alert-success-bg)"] {
    background: var(--alert-success-bg) !important;
    color: var(--alert-success-text) !important;
}

/* Error Alert Styles */
.alert-error,
[style*="background: #fff5f5"],
[style*="background: var(--alert-error-bg)"] {
    background: var(--alert-error-bg) !important;
    color: var(--alert-error-text) !important;
}

/* Status Badges - Success/Active */
[data-theme="dark"] [style*="background: #d3f9d8"] {
    background: var(--alert-success-bg) !important;
    color: var(--alert-success-text) !important;
}

/* Status Badges - Error/Inactive */
[data-theme="dark"] [style*="background: #fff5f5"] {
    background: var(--alert-error-bg) !important;
    color: var(--alert-error-text) !important;
}

/* Policy Pages - Ensure lists are styled */
ul li {
    color: var(--text-secondary);
}

/* Inline code blocks */
code {
    background: var(--bg-secondary);
    padding: 2px 6px;
    border-radius: 4px;
    font-family: monospace;
    font-size: 0.9em;
    color: var(--accent-color);
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Focus States for Accessibility */
input:focus,
textarea:focus,
select:focus {
    outline: 2px solid var(--accent-gold);
    outline-offset: 2px;
}

/* Smooth Scrolling */
html {
    scroll-behavior: smooth;
}

/* Mobile-First Base Styles */
@media (max-width: 1024px) {
    /* Tablet adjustments */
    .container {
        padding: 0 30px;
    }
    
    .section {
        padding: 80px 0;
    }
}

/* Touch-friendly buttons on mobile */
@media (hover: none) and (pointer: coarse) {
    button,
    .btn-premium,
    .btn-block,
    a[class*="btn"] {
        min-height: 44px;
        min-width: 44px;
    }
    
    .theme-toggle {
        min-width: 44px;
        min-height: 44px;
        display: flex;
        align-items: center;
        justify-content: center;
    }
}

/* Landscape Mobile Orientation */
@media (max-width: 896px) and (orientation: landscape) {
    .hero {
        height: 90vh;
        min-height: 500px;
    }
    
    .nav-links {
        padding: 20px;
    }
    
    .church-profile .profile-hero {
        height: 250px !important;
    }
}

/* Wide Screens */
@media (min-width: 1400px) {
    .container {
        max-width: 1400px;
    }
    
    .hero-content h1 {
        font-size: 4.5rem;
    }
}

@media (min-width: 1920px) {
    .container {
        max-width: 1600px;
    }
}

/* Print Styles */
@media print {
    header,
    footer,
    .cookie-banner,
    .mobile-toggle {
        display: none;
    }
    
    .section {
        padding: 20px 0;
    }
}