/* Vhembe Business Registry - Landing Page Styles */
/* Mobile-First Design */

/* CSS Variables */
:root {
    --primary-color: #2c3e50;
    --secondary-color: #3498db;
    --accent-color: #e74c3c;
    --success-color: #27ae60;
    --warning-color: #f39c12;
    --error-color: #e74c3c;
    --text-color: #333;
    --text-light: #666;
    --text-lighter: #999;
    --bg-light: #f8f9fa;
    --bg-white: #ffffff;
    --border-color: #dee2e6;
    --shadow: 0 2px 10px rgba(0,0,0,0.1);
    --shadow-lg: 0 10px 30px rgba(0,0,0,0.15);
}

/* Base Styles */
* {
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    line-height: 1.6;
    color: var(--text-color);
    margin: 0;
    padding: 0;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Hero Section */
.hero {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    color: white;
    padding: 60px 0;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.hero::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"><defs><pattern id="grain" width="100" height="100" patternUnits="userSpaceOnUse"><circle cx="50" cy="50" r="1" fill="rgba(255,255,255,0.03)"/></pattern></defs><rect width="100" height="100" fill="url(%23grain)"/></svg>');
    opacity: 0.5;
}

.hero-content {
    position: relative;
    z-index: 1;
    max-width: 800px;
    margin: 0 auto;
    padding: 0 20px;
}

.hero-title {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 20px;
    line-height: 1.2;
}

.hero-subtitle {
    font-size: 1.3rem;
    margin-bottom: 15px;
    opacity: 0.9;
}

.hero-description {
    font-size: 1.1rem;
    margin-bottom: 40px;
    opacity: 0.8;
}

/* Login Form in Hero */
.hero-login,
.hero-register {
    max-width: 400px;
    margin: 0 auto;
    background: rgba(255, 255, 255, 0.95);
    border-radius: 12px;
    padding: 30px;
    box-shadow: var(--shadow-lg);
    color: var(--text-color);
}

.hero-welcome {
    max-width: 500px;
    margin: 0 auto;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 30px;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.hero-welcome h3 {
    margin-bottom: 20px;
    font-size: 1.5rem;
}

.hero-actions {
    display: flex;
    gap: 15px;
    justify-content: center;
    flex-wrap: wrap;
}

/* Registration Form Styles */
.register-form-container {
    text-align: left;
}

.register-form-header {
    text-align: center;
    margin-bottom: 25px;
}

.register-form-header h3 {
    margin-bottom: 10px;
    color: var(--primary-color);
}

.register-form-header p {
    color: var(--text-light);
    font-size: 0.9rem;
}

/* Features Section */
.features {
    padding: 80px 0;
    background: var(--bg-light);
}

.features h2 {
    text-align: center;
    font-size: 2rem;
    margin-bottom: 50px;
    color: var(--primary-color);
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
    margin-top: 40px;
}

.feature-card {
    background: var(--bg-white);
    padding: 30px;
    border-radius: 12px;
    text-align: center;
    box-shadow: var(--shadow);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.feature-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.feature-icon {
    font-size: 3rem;
    margin-bottom: 20px;
}

.feature-card h3 {
    font-size: 1.3rem;
    margin-bottom: 15px;
    color: var(--primary-color);
}

.feature-card p {
    color: var(--text-light);
    line-height: 1.6;
}

/* Business Preview Section */
.business-preview {
    padding: 80px 0;
    background: var(--bg-white);
}

.business-preview h2 {
    text-align: center;
    font-size: 2rem;
    margin-bottom: 30px;
    color: var(--primary-color);
}

/* Search Container */
.search-container {
    max-width: 600px;
    margin: 0 auto 40px;
}

.search-form {
    display: flex;
    align-items: center;
    background: var(--bg-light);
    border-radius: 50px;
    padding: 8px;
    box-shadow: var(--shadow);
    transition: box-shadow 0.3s ease;
}

.search-form:focus-within {
    box-shadow: var(--shadow-lg);
}

.search-input-group {
    display: flex;
    align-items: center;
    width: 100%;
}

.search-input {
    flex: 1;
    padding: 12px 20px;
    border: none;
    background: transparent;
    font-size: 1rem;
    outline: none;
    color: var(--text-color);
}

.search-input::placeholder {
    color: var(--text-lighter);
}

.search-btn {
    border-radius: 50px;
    padding: 12px 24px;
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: auto;
}

.search-icon {
    font-size: 1.1rem;
}

.business-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 25px;
    margin-bottom: 40px;
}

.business-card {
    background: var(--bg-light);
    padding: 25px;
    border-radius: 12px;
    border-left: 4px solid var(--secondary-color);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.business-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow);
}

.business-card h3 {
    margin-bottom: 10px;
    color: var(--primary-color);
}

.business-category {
    color: var(--secondary-color);
    font-weight: 600;
    margin-bottom: 8px;
}

.business-location,
.business-contact {
    color: var(--text-light);
    font-size: 0.9rem;
    margin-bottom: 5px;
}

.no-results {
    text-align: center;
    padding: 40px 20px;
    background: var(--bg-light);
    border-radius: 12px;
    color: var(--text-light);
    font-size: 1.1rem;
}

.preview-actions {
    text-align: center;
    display: flex;
    gap: 20px;
    justify-content: center;
    flex-wrap: wrap;
}

/* Call to Action Section */
.cta {
    padding: 80px 0;
    background: linear-gradient(135deg, var(--secondary-color) 0%, var(--primary-color) 100%);
    color: white;
    text-align: center;
}

.cta h2 {
    font-size: 2rem;
    margin-bottom: 20px;
}

.cta p {
    font-size: 1.1rem;
    margin-bottom: 40px;
    opacity: 0.9;
}

.cta-actions {
    display: flex;
    gap: 20px;
    justify-content: center;
    flex-wrap: wrap;
}

/* Form Styles */
.login-form-container {
    text-align: left;
}

.login-form-header {
    text-align: center;
    margin-bottom: 25px;
}

.login-form-header h3 {
    margin-bottom: 10px;
    color: var(--primary-color);
}

.login-form-header p {
    color: var(--text-light);
    font-size: 0.9rem;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: var(--text-color);
}

.form-control {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    font-size: 1rem;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
    background: var(--bg-white);
}

.form-control:focus {
    outline: none;
    border-color: var(--secondary-color);
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.1);
}

.form-error {
    color: var(--error-color);
    font-size: 0.85rem;
    margin-top: 5px;
    display: block;
}

.form-actions {
    margin-bottom: 20px;
}

.login-form-footer {
    text-align: center;
    font-size: 0.9rem;
}

.login-form-footer p {
    margin-bottom: 10px;
}

.link-primary {
    color: var(--secondary-color);
    text-decoration: none;
    font-weight: 600;
}

.link-primary:hover {
    text-decoration: underline;
}

.link-secondary {
    color: var(--text-light);
    text-decoration: none;
}

.link-secondary:hover {
    text-decoration: underline;
}

/* Button Styles */
.btn {
    display: inline-block;
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
    min-width: 120px;
}

.btn-primary {
    background: var(--secondary-color);
    color: white;
}

.btn-primary:hover {
    background: #2980b9;
    transform: translateY(-2px);
}

.btn-secondary {
    background: transparent;
    color: white;
    border: 2px solid white;
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.1);
}

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

.btn-outline:hover {
    background: var(--primary-color);
    color: white;
}

.btn-full {
    width: 100%;
}

.btn-large {
    padding: 16px 32px;
    font-size: 1.1rem;
}

.btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

/* Login Status Messages */
.login-status,
.register-status {
    margin-top: 20px;
    padding: 12px;
    border-radius: 8px;
    text-align: center;
}

.login-status.success,
.register-status.success {
    background: rgba(39, 174, 96, 0.1);
    color: var(--success-color);
    border: 1px solid var(--success-color);
}

.login-status.error,
.register-status.error {
    background: rgba(231, 76, 60, 0.1);
    color: var(--error-color);
    border: 1px solid var(--error-color);
}

/* Responsive Design */
@media (max-width: 768px) {
    .hero {
        padding: 40px 0;
    }
    
    .hero-title {
        font-size: 2rem;
    }
    
    .hero-subtitle {
        font-size: 1.1rem;
    }
    
    .hero-description {
        font-size: 1rem;
        margin-bottom: 30px;
    }
    
    .hero-login,
    .hero-register {
        margin: 0 20px;
        padding: 25px 20px;
    }
    
    .hero-actions {
        flex-direction: column;
        align-items: center;
    }
    
    .features {
        padding: 60px 0;
    }
    
    .features h2 {
        font-size: 1.8rem;
    }
    
    .features-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .business-preview {
        padding: 60px 0;
    }
    
    .business-preview h2 {
        font-size: 1.8rem;
    }
    
    .search-container {
        margin: 0 auto 30px;
        padding: 0 20px;
    }
    
    .search-form {
        flex-direction: column;
        background: var(--bg-white);
        border-radius: 12px;
        padding: 12px;
        box-shadow: var(--shadow);
    }
    
    .search-input-group {
        width: 100%;
        margin-bottom: 12px;
    }
    
    .search-input {
        padding: 16px;
        background: var(--bg-light);
        border-radius: 8px;
    }
    
    .search-btn {
        width: 100%;
        justify-content: center;
        padding: 16px;
    }
    
    .business-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .preview-actions,
    .cta-actions {
        flex-direction: column;
        align-items: center;
    }
    
    .cta {
        padding: 60px 0;
    }
    
    .cta h2 {
        font-size: 1.8rem;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 15px;
    }
    
    .hero {
        padding: 30px 0;
    }
    
    .hero-title {
        font-size: 1.8rem;
    }
    
    .hero-subtitle {
        font-size: 1rem;
    }
    
    .hero-login {
        margin: 0 15px;
        padding: 20px 15px;
    }
    
    .features,
    .business-preview,
    .cta {
        padding: 40px 0;
    }
    
    .features h2,
    .business-preview h2,
    .cta h2 {
        font-size: 1.6rem;
    }
    
    .btn {
        padding: 10px 20px;
        font-size: 0.9rem;
        min-width: 100px;
    }
    
    .btn-large {
        padding: 14px 28px;
        font-size: 1rem;
    }
}

/* Loading States */
.btn-loading {
    display: inline-block;
    width: 16px;
    height: 16px;
    border: 2px solid transparent;
    border-top: 2px solid currentColor;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

/* Accessibility */
.btn:focus,
.form-control:focus {
    outline: 2px solid var(--secondary-color);
    outline-offset: 2px;
}

/* Print Styles */
@media print {
    .hero,
    .cta {
        background: none !important;
        color: var(--text-color) !important;
    }
    
    .btn {
        display: none;
    }
}
