/* AutoCode generated style.css for Marketing Automation Website - Iteration 2 */

/* --- CSS Variables --- */
:root {
    --primary-color: #2980b9; /* A professional blue for accents */
    --secondary-color: #34495e; /* Darker blue/gray for main text/headings */
    --text-color: #333;
    --background-color: #f4f7f6;
    --light-gray: #ecf0f1;
    --border-color: #ddd;
    --spacing-unit: 16px; /* Base spacing unit */
    --font-family-base: 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    --font-size-base: 16px;

    /* Card-like block specific variables */
    --card-bg: #ffffff;
    --card-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    --card-border-radius: 8px;
    --max-content-width: 900px;
}

/* --- Global Reset & Base Styles --- */
*,
*::before,
*::after {
    box-sizing: border-box;
}

body {
    margin: 0;
    padding: var(--spacing-unit);
    font-family: var(--font-family-base);
    font-size: var(--font-size-base);
    line-height: 1.6;
    color: var(--text-color);
    background-color: var(--background-color);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
}

/* Common styling for main content blocks (header, static main, footer, dynamic app) */
header,
main, /* Refers to the main from index.html */
footer,
#app { /* Refers to the dynamically created app container */
    background-color: var(--card-bg);
    border-radius: var(--card-border-radius);
    box-shadow: var(--card-shadow);
    padding: var(--spacing-unit) calc(var(--spacing-unit) * 1.5);
    margin-bottom: var(--spacing-unit);
    max-width: var(--max-content-width);
    width: 100%;
    text-align: left; /* Default for content within these blocks */
}

/* Header specific adjustments */
header {
    text-align: center;
    padding-top: calc(var(--spacing-unit) * 1.5);
    padding-bottom: calc(var(--spacing-unit) * 1.5);
}

header h1 {
    font-size: 2.5em;
    line-height: 1.2;
    color: var(--secondary-color);
    margin-top: 0;
    margin-bottom: 0; /* The paragraph below h1 is removed by JS */
}

/* General paragraph styling */
p {
    margin-top: 0;
    margin-bottom: var(--spacing-unit);
}

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

a:hover {
    color: #216fa3; /* A darker shade of primary-color */
}

h2 {
    font-size: 2em;
    color: var(--secondary-color);
    margin-top: calc(var(--spacing-unit) * 1.5);
    margin-bottom: var(--spacing-unit);
    border-bottom: 2px solid var(--border-color);
    padding-bottom: 8px;
}

h3 {
    font-size: 1.5em;
    color: var(--primary-color);
    margin-top: var(--spacing-unit);
    margin-bottom: calc(var(--spacing-unit) / 2);
}

ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

li {
    margin-bottom: calc(var(--spacing-unit) / 2);
}

strong {
    color: var(--secondary-color);
}

/* Static sections from index.html main */
main section {
    padding: var(--spacing-unit) 0; /* Adjust padding within the main content block */
    margin-bottom: var(--spacing-unit);
    border-top: 1px solid var(--light-gray); /* Separator for sections */
}

main section:first-child {
    border-top: none;
}

.feature-group,
.consideration-group {
    background-color: var(--light-gray);
    border-left: 5px solid var(--primary-color);
    padding: var(--spacing-unit);
    margin-bottom: var(--spacing-unit);
    border-radius: 4px;
}

.feature-group ul,
.consideration-group ul {
    list-style: disc;
    margin-left: var(--spacing-unit);
    padding-left: 0;
}

/* Footer specific styles */
footer p {
    text-align: center;
    margin: 0;
}

/* --- Application Specific Styles (#app) --- */
#app {
    display: flex;
    flex-direction: column;
    padding: 0; /* App will manage its own internal padding */
    margin-top: var(--spacing-unit);
}

/* Navigation Bar */
#main-nav {
    background-color: var(--secondary-color);
    border-top-left-radius: var(--card-border-radius);
    border-top-right-radius: var(--card-border-radius);
    padding: calc(var(--spacing-unit) / 2) var(--spacing-unit);
}

#main-nav ul {
    display: flex;
    justify-content: center;
    list-style: none;
    padding: 0;
    margin: 0;
}

#main-nav li a {
    display: block;
    padding: 10px 20px;
    color: var(--light-gray);
    text-decoration: none;
    transition: background-color 0.3s ease, color 0.3s ease;
    border-radius: 4px;
    font-weight: bold;
}

#main-nav li a:hover {
    background-color: var(--primary-color);
    color: white;
}

#main-nav li a.active-nav-link { /* Style for active navigation item (if script.js applies this class) */
    background-color: var(--primary-color);
    color: white;
}

/* Main App Content Area */
#app-content {
    padding: var(--spacing-unit) calc(var(--spacing-unit) * 1.5); /* Padding for the content inside app */
    border-bottom-left-radius: var(--card-border-radius);
    border-bottom-right-radius: var(--card-border-radius);
    flex-grow: 1; /* Allow content to grow */
}

/* Individual App Sections */
.app-section {
    padding: var(--spacing-unit) 0;
    margin-bottom: var(--spacing-unit);
    border-top: 1px solid var(--light-gray);
}

.app-section:first-child {
    border-top: none;
}

.app-section.hidden {
    display: none;
}

/* Dashboard Section */
.metrics {
    display: flex;
    flex-wrap: wrap;
    gap: var(--spacing-unit);
    justify-content: center;
    margin-top: var(--spacing-unit);
    margin-bottom: calc(var(--spacing-unit) * 1.5);
}

.metric-card {
    flex: 1 1 calc(33% - var(--spacing-unit)); /* 3 cards per row, adjusted for gap */
    min-width: 200px;
    background-color: var(--light-gray);
    padding: var(--spacing-unit);
    border-radius: 6px;
    text-align: center;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.metric-card span {
    font-weight: bold;
    display: block;
    margin-bottom: 5px;
    color: var(--secondary-color);
    font-size: 1.1em;
}

.metric-card:last-child {
    margin-bottom: 0;
}

.status {
    display: inline-block;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 0.85em;
    font-weight: bold;
    color: white; /* Default text color for statuses */
}

.status.active {
    background-color: #27ae60; /* Green */
}

.status.scheduled {
    background-color: #f39c12; /* Orange */
}

.status.draft {
    background-color: #7f8c8d; /* Gray */
}

/* AI Content Generator Section */
.content-generator {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-unit);
    margin-top: var(--spacing-unit);
}

.content-generator label {
    font-weight: bold;
    color: var(--secondary-color);
    margin-bottom: -8px; /* Pull label closer to input */
}

.content-generator select,
.content-generator textarea,
.content-generator button {
    width: 100%;
    padding: 10px;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    font-family: var(--font-family-base);
    font-size: var(--font-size-base);
}

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

#generate-content-btn,
#create-campaign-btn {
    background-color: var(--primary-color);
    color: white;
    border: none;
    cursor: pointer;
    font-weight: bold;
    transition: background-color 0.3s ease;
    margin-top: calc(var(--spacing-unit) / 2); /* Space above button */
}

#generate-content-btn:hover,
#create-campaign-btn:hover {
    background-color: #216fa3;
}

.output-area {
    background-color: var(--light-gray);
    border: 1px dashed var(--border-color);
    padding: var(--spacing-unit);
    border-radius: 4px;
    min-height: 150px;
    overflow-y: auto;
    font-size: 0.95em;
    color: var(--text-color);
}

.output-area p {
    margin: 0; /* Reset margin for paragraphs inside output */
}

/* Campaigns Section */
#campaigns ul {
    list-style: disc;
    margin-left: var(--spacing-unit);
    padding-left: 0;
}

#campaigns li {
    margin-bottom: 5px;
}


/* --- Responsive Design --- */
@media (max-width: 960px) {
    :root {
        --max-content-width: 760px;
    }
}

@media (max-width: 768px) {
    :root {
        --font-size-base: 15px;
        --spacing-unit: 12px;
    }

    body {
        padding: var(--spacing-unit);
    }

    header h1 {
        font-size: 2em;
    }

    h2 {
        font-size: 1.8em;
    }

    h3 {
        font-size: 1.3em;
    }

    #main-nav li a {
        padding: 8px 15px;
    }

    .metric-card {
        flex: 1 1 calc(50% - var(--spacing-unit)); /* 2 cards per row */
    }
}

@media (max-width: 480px) {
    :root {
        --font-size-base: 14px;
        --spacing-unit: 8px;
        --card-shadow: 0 2px 4px rgba(0, 0, 0, 0.05); /* Lighter shadow on small screens */
    }

    header h1 {
        font-size: 1.8em;
        margin-bottom: 0;
    }

    h2 {
        font-size: 1.5em;
    }

    h3 {
        font-size: 1.2em;
    }

    header, main, footer, #app {
        padding: var(--spacing-unit);
        margin-bottom: var(--spacing-unit);
        border-radius: 6px;
    }

    #main-nav {
        padding: calc(var(--spacing-unit) / 2);
    }

    #main-nav ul {
        flex-wrap: wrap;
        gap: 5px;
    }

    #main-nav li {
        width: 100%; /* Each nav item takes full width */
        text-align: center;
    }

    #main-nav li a {
        padding: 8px 10px;
        font-size: 0.9em;
    }

    #app-content {
        padding: var(--spacing-unit);
    }

    .metric-card {
        flex: 1 1 100%; /* 1 card per row */
    }

    .content-generator label {
        margin-bottom: 0;
    }
}