/*
Theme Name: Loans4All
Theme URI: https://loans4all.co.za
Description: Professional short-term loan business theme
Version: 1.0
Author: Loans4All
Author URI: https://loans4all.co.za
License: GPL v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: loans4all
Domain Path: /languages
*/

/* ===== ROOT & GENERAL STYLES ===== */
:root {
    --primary: #2E7D32;
    --primary-dark: #1B5E20;
    --primary-light: #4CAF50;
    --accent: #FF6F00;
    --danger: #D32F2F;
    --warning: #FBC02D;
    --success: #388E3C;
    --info: #1976D2;
    --gray-100: #F5F5F5;
    --gray-200: #EEEEEE;
    --gray-300: #E0E0E0;
    --gray-400: #BDBDBD;
    --gray-600: #757575;
    --gray-800: #424242;
    --gray-900: #212121;
    --text: #212121;
    --text-light: #757575;
    --white: #FFFFFF;
    --shadow: 0 2px 8px rgba(0,0,0,0.1);
    --shadow-lg: 0 8px 24px rgba(0,0,0,0.15);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    color: var(--text);
    background: var(--white);
    line-height: 1.6;
}

/* ===== TYPOGRAPHY ===== */
h1, h2, h3, h4, h5, h6 {
    font-weight: 600;
    line-height: 1.2;
    margin-bottom: 1rem;
    color: var(--gray-900);
}

h1 { font-size: 3rem; }
h2 { font-size: 2.2rem; }
h3 { font-size: 1.8rem; }
h4 { font-size: 1.4rem; }
h5 { font-size: 1.2rem; }
h6 { font-size: 1rem; }

p {
    margin-bottom: 1rem;
    line-height: 1.8;
}

a {
    color: var(--primary);
    text-decoration: none;
    transition: color 0.3s ease;
}

a:hover {
    color: var(--primary-dark);
}

/* ===== CONTAINER & LAYOUT ===== */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.col-2 { grid-template-columns: repeat(2, 1fr); }
.col-3 { grid-template-columns: repeat(3, 1fr); }

@media (max-width: 768px) {
    h1 { font-size: 2rem; }
    h2 { font-size: 1.6rem; }
    h3 { font-size: 1.4rem; }
    .col-2, .col-3 { grid-template-columns: 1fr; }
}

/* ===== BUTTONS ===== */
.btn {
    display: inline-block;
    padding: 12px 28px;
    border-radius: 6px;
    font-size: 1rem;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
    text-align: center;
}

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

.btn-primary:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

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

.btn-accent:hover {
    background: #E65100;
    transform: translateY(-2px);
}

.btn-lg {
    padding: 16px 40px;
    font-size: 1.1rem;
}

.btn-block {
    width: 100%;
    display: block;
}

/* ===== HEADER & NAVIGATION ===== */
header {
    background: var(--white);
    box-shadow: var(--shadow);
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 0;
}

.logo {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--primary);
}

nav {
    display: flex;
    gap: 2rem;
    list-style: none;
}

nav a {
    color: var(--gray-800);
    font-weight: 500;
    padding: 8px 0;
    border-bottom: 3px solid transparent;
    transition: all 0.3s ease;
}

nav a:hover,
nav a.active {
    color: var(--primary);
    border-bottom-color: var(--primary);
}

.mobile-menu-toggle {
    display: none;
    background: var(--primary);
    color: var(--white);
    border: none;
    padding: 10px 15px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 1.2rem;
}

@media (max-width: 768px) {
    nav {
        display: none;
        flex-direction: column;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: var(--white);
        padding: 1rem;
        gap: 1rem;
    }
    
    nav.active {
        display: flex;
    }
    
    .mobile-menu-toggle {
        display: block;
    }
}

/* ===== HERO SECTION ===== */
.hero {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: var(--white);
    padding: 6rem 0;
    text-align: center;
}

.hero h1 {
    color: var(--white);
    margin-bottom: 1.5rem;
}

.hero p {
    font-size: 1.3rem;
    max-width: 700px;
    margin: 0 auto 2rem;
    opacity: 0.95;
}

.hero-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

/* ===== CARD STYLES ===== */
.card {
    background: var(--white);
    border-radius: 8px;
    padding: 2rem;
    box-shadow: var(--shadow);
    transition: all 0.3s ease;
    border-top: 4px solid var(--primary);
}

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

.card-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.card h3 {
    margin-bottom: 1rem;
    color: var(--primary);
}

/* ===== FORMS ===== */
.form-group {
    margin-bottom: 1.5rem;
}

label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: var(--gray-800);
}

input, textarea, select {
    width: 100%;
    padding: 12px;
    border: 1px solid var(--gray-300);
    border-radius: 6px;
    font-size: 1rem;
    font-family: inherit;
    transition: border-color 0.3s ease;
}

input:focus, textarea:focus, select:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(46, 125, 50, 0.1);
}

textarea {
    resize: vertical;
    min-height: 120px;
}

/* ===== CALCULATOR ===== */
.calculator {
    background: var(--gray-100);
    padding: 2rem;
    border-radius: 8px;
    margin: 2rem 0;
}

.calculator h3 {
    color: var(--primary);
    margin-bottom: 1.5rem;
}

.calculator-control {
    margin-bottom: 1.5rem;
}

.calculator-control label {
    display: flex;
    justify-content: space-between;
    margin-bottom: 0.5rem;
}

input[type="range"] {
    width: 100%;
    height: 8px;
    border-radius: 4px;
    background: var(--gray-300);
    outline: none;
    -webkit-appearance: none;
}

input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: var(--primary);
    cursor: pointer;
}

input[type="range"]::-moz-range-thumb {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: var(--primary);
    cursor: pointer;
    border: none;
}

.calculator-result {
    background: var(--white);
    padding: 1.5rem;
    border-radius: 6px;
    margin-top: 1.5rem;
}

.result-row {
    display: flex;
    justify-content: space-between;
    padding: 0.75rem 0;
    border-bottom: 1px solid var(--gray-200);
}

.result-row:last-child {
    border-bottom: none;
    font-weight: 600;
    font-size: 1.1rem;
    color: var(--primary);
}

/* ===== WHATSAPP BUTTON ===== */
.whatsapp-btn {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background: #25D366;
    color: var(--white);
    padding: 15px 20px;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 600;
    box-shadow: 0 4px 12px rgba(0,0,0,0.3);
    z-index: 999;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.whatsapp-btn:hover {
    background: #1ebe5d;
    transform: scale(1.1);
}

/* ===== FAQ SECTION ===== */
.faq-item {
    background: var(--white);
    border: 1px solid var(--gray-300);
    border-radius: 8px;
    margin-bottom: 1rem;
    overflow: hidden;
}

.faq-question {
    background: var(--gray-100);
    padding: 1.5rem;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-weight: 600;
    transition: background 0.3s ease;
}

.faq-question:hover {
    background: var(--gray-200);
}

.faq-question.active {
    background: var(--primary-light);
    color: var(--white);
}

.faq-answer {
    padding: 1.5rem;
    display: none;
    color: var(--text-light);
}

.faq-answer.active {
    display: block;
}

/* ===== TESTIMONIALS ===== */
.testimonial {
    background: var(--white);
    border-left: 4px solid var(--primary);
    padding: 1.5rem;
    border-radius: 4px;
    box-shadow: var(--shadow);
    margin-bottom: 1.5rem;
}

.testimonial-author {
    font-weight: 600;
    margin-top: 1rem;
    color: var(--primary);
}

/* ===== FOOTER ===== */
footer {
    background: var(--gray-900);
    color: var(--white);
    padding: 3rem 0 1rem;
    margin-top: 4rem;
}

footer h4 {
    color: var(--white);
    margin-bottom: 1rem;
}

footer a {
    color: var(--gray-200);
}

footer a:hover {
    color: var(--primary-light);
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

.footer-section ul {
    list-style: none;
}

.footer-section li {
    margin-bottom: 0.5rem;
}

.footer-bottom {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid var(--gray-700);
    color: var(--gray-400);
}

/* ===== SECTIONS ===== */
section {
    padding: 4rem 0;
}

section.alt {
    background: var(--gray-100);
}

.section-title {
    text-align: center;
    margin-bottom: 3rem;
}

.section-title h2 {
    color: var(--primary);
    margin-bottom: 0.5rem;
}

.section-title p {
    color: var(--text-light);
    font-size: 1.1rem;
}

/* ===== REQUIREMENTS LIST ===== */
.requirements-list {
    list-style: none;
}

.requirements-list li {
    padding: 1rem;
    margin-bottom: 1rem;
    background: var(--gray-100);
    border-left: 4px solid var(--primary);
    border-radius: 4px;
    display: flex;
    align-items: center;
    gap: 1rem;
}

.requirements-list li:before {
    content: "✓";
    background: var(--primary);
    color: var(--white);
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    flex-shrink: 0;
}

/* ===== STEPS ===== */
.steps {
    counter-reset: step-counter;
}

.step {
    counter-increment: step-counter;
    padding: 2rem;
    background: var(--gray-100);
    margin-bottom: 1.5rem;
    border-radius: 8px;
    display: grid;
    grid-template-columns: 60px 1fr;
    gap: 1.5rem;
    align-items: start;
}

.step-number {
    background: var(--primary);
    color: var(--white);
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    font-weight: 700;
}

.step h4 {
    margin-bottom: 0.5rem;
}

/* ===== ALERTS & NOTICES ===== */
.alert {
    padding: 1.5rem;
    border-radius: 6px;
    margin-bottom: 1.5rem;
    border-left: 4px solid;
}

.alert-danger {
    background: #FFEBEE;
    border-color: var(--danger);
    color: #C62828;
}

.alert-warning {
    background: #FFF8E1;
    border-color: var(--warning);
    color: #F57F17;
}

.alert-success {
    background: #E8F5E9;
    border-color: var(--success);
    color: #2E7D32;
}

.alert-info {
    background: #E3F2FD;
    border-color: var(--info);
    color: #1565C0;
}

/* ===== UTILITY CLASSES ===== */
.text-center { text-align: center; }
.text-right { text-align: right; }
.mt-1 { margin-top: 1rem; }
.mt-2 { margin-top: 2rem; }
.mt-3 { margin-top: 3rem; }
.mb-1 { margin-bottom: 1rem; }
.mb-2 { margin-bottom: 2rem; }
.mb-3 { margin-bottom: 3rem; }
.p-1 { padding: 1rem; }
.p-2 { padding: 2rem; }
.hidden { display: none; }
.visible { display: block; }
