/* ============================================
   Page Builder Default CSS Framework
   Professional styling for all page builder content
   ============================================ */

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

body {
    margin: 0;
    padding: 0;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    line-height: 1.6;
    color: #1f2937;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Typography */

/* ===========================================
   .pb-content = Page Builder Content
   Uses inline styles from typography controls
   Children inherit everything from parent
   =========================================== */

/* All elements inside .pb-content inherit typography from parent .pb-content div */
.pb-content *,
.pb-content h1,
.pb-content h2,
.pb-content h3,
.pb-content h4,
.pb-content h5,
.pb-content h6,
.pb-content p,
.pb-content a,
.pb-content li,
.pb-content span,
.pb-content div {
    color: inherit;
    font-family: inherit;
    font-weight: inherit;
    font-style: inherit;
    text-decoration: inherit;
    line-height: inherit;
    letter-spacing: inherit;
    text-transform: inherit;
}

/* Headings inside .pb-content keep reasonable default sizes */
.pb-content h1 { font-size: 3rem; }
.pb-content h2 { font-size: 2.25rem; }
.pb-content h3 { font-size: 1.875rem; }
.pb-content h4 { font-size: 1.5rem; }
.pb-content h5 { font-size: 1.25rem; }
.pb-content h6 { font-size: 1rem; }
.pb-content p { font-size: 1rem; }

/* Preserve margins for structure */
.pb-content h1,
.pb-content h2,
.pb-content h3,
.pb-content h4,
.pb-content h5,
.pb-content h6,
.pb-content p {
    margin-top: 0;
    margin-bottom: 1rem;
}

/* ===========================================
   Default Typography (NON page-builder content)
   =========================================== */

/* Default typography for regular content */
h1, h2, h3, h4, h5, h6 {
    margin-top: 0;
    margin-bottom: 1rem;
    font-weight: 700;
    line-height: 1.2;
    color: #111827;
}

h1 { font-size: 3rem; }
h2 { font-size: 2.25rem; }
h3 { font-size: 1.875rem; }
h4 { font-size: 1.5rem; }
h5 { font-size: 1.25rem; }
h6 { font-size: 1rem; }

p {
    margin-top: 0;
    margin-bottom: 1rem;
    color: #4b5563;
}

a {
    color: #16a34a;
    text-decoration: none;
    transition: color 0.2s ease;
}

/* Only apply hover color to links that aren't styled as buttons */
a:hover:not(.btn):not([role="button"]):not(.block):not(.inline-block) {
    color: #15803d;
}

/* Ensure button-styled links stay white */
a.btn,
a[role="button"],
a.block,
a.inline-block {
    color: white !important;
}

a.btn:hover,
a[role="button"]:hover,
a.block:hover,
a.inline-block:hover {
    color: white !important;
}

/* Container and Layout */
.container {
    width: 100%;
    max-width: 1200px;
    margin-left: auto;
    margin-right: auto;
    padding-left: 1rem;
    padding-right: 1rem;
}

@media (min-width: 640px) {
    .container {
        padding-left: 1.5rem;
        padding-right: 1.5rem;
    }
}

@media (min-width: 1024px) {
    .container {
        padding-left: 2rem;
        padding-right: 2rem;
    }
}

/* Sections */
section {
    position: relative;
    padding: 4rem 0;
}

@media (max-width: 768px) {
    section {
        padding: 2.5rem 0;
    }
}

/* Grid System */
.grid {
    display: grid;
    gap: 2rem;
}

.grid-cols-1 { grid-template-columns: repeat(1, minmax(0, 1fr)); }
.grid-cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }

@media (min-width: 768px) {
    .md\:grid-cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .md\:grid-cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .md\:grid-cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

@media (max-width: 767px) {
    .grid-cols-2,
    .grid-cols-3,
    .grid-cols-4,
    .md\:grid-cols-2,
    .md\:grid-cols-3,
    .md\:grid-cols-4 {
        grid-template-columns: 1fr;
    }
}

/* Buttons */
button,
a[role="button"],
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.75rem 1.5rem;
    font-size: 1rem;
    font-weight: 600;
    line-height: 1.5;
    text-align: center;
    white-space: nowrap;
    vertical-align: middle;
    cursor: pointer;
    user-select: none;
    border: none;
    border-radius: 0.5rem;
    transition: all 0.2s ease;
    text-decoration: none;
    color: white !important; /* Force white text on buttons */
}

button:hover,
a[role="button"]:hover,
.btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    color: white !important; /* Keep white on hover */
}

button:active,
a[role="button"]:active,
.btn:active {
    transform: translateY(0);
}

/* Button Variants */
.btn-primary {
    background-color: #16a34a;
    color: white;
}

.btn-primary:hover {
    background-color: #15803d;
    color: white;
}

.btn-secondary {
    background-color: #6b7280;
    color: white;
}

.btn-secondary:hover {
    background-color: #4b5563;
    color: white;
}

.btn-outline {
    background-color: transparent;
    border: 2px solid #16a34a;
    color: #16a34a;
}

.btn-outline:hover {
    background-color: #16a34a;
    color: white;
}

/* Cards */
.card {
    background: white;
    border-radius: 0.75rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1), 0 1px 2px rgba(0, 0, 0, 0.06);
    overflow: hidden;
    transition: all 0.3s ease;
}

.card:hover {
    box-shadow: 0 10px 15px rgba(0, 0, 0, 0.1), 0 4px 6px rgba(0, 0, 0, 0.05);
    transform: translateY(-2px);
}

.card-header {
    padding: 1.5rem;
    border-bottom: 1px solid #e5e7eb;
}

.card-body {
    padding: 1.5rem;
}

.card-footer {
    padding: 1.5rem;
    border-top: 1px solid #e5e7eb;
    background-color: #f9fafb;
}

/* Course/Product Listing Module */
.course-listing-module {
    width: 100%;
}

.course-listing-container {
    width: 100%;
}

.course-listing-grid {
    display: grid;
    gap: 1.5rem;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
}

@media (max-width: 640px) {
    .course-listing-grid {
        grid-template-columns: 1fr;
    }
}

.course-card {
    background: white;
    border-radius: 0.75rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1), 0 1px 2px rgba(0, 0, 0, 0.06);
    overflow: hidden;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.course-card:hover {
    box-shadow: 0 10px 15px rgba(0, 0, 0, 0.1), 0 4px 6px rgba(0, 0, 0, 0.05);
    transform: translateY(-4px);
}

.course-card-content {
    padding: 1.5rem;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.course-title {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 0.75rem;
    color: #111827;
}

.course-description {
    color: #6b7280;
    font-size: 0.875rem;
    line-height: 1.6;
    margin-bottom: 1rem;
    flex: 1;
}

.course-price {
    font-size: 1.5rem;
    font-weight: 700;
    color: #16a34a;
    margin-bottom: 1rem;
}

.course-type {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    background-color: #eff6ff;
    color: #1e40af;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 1rem;
}

.course-button {
    width: 100%;
    margin-top: auto;
}

/* Forms */
input[type="text"],
input[type="email"],
input[type="tel"],
input[type="url"],
input[type="password"],
textarea,
select {
    width: 100%;
    padding: 0.75rem;
    font-size: 1rem;
    line-height: 1.5;
    color: #111827;
    background-color: white;
    border: 1px solid #d1d5db;
    border-radius: 0.5rem;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

input:focus,
textarea:focus,
select:focus {
    outline: none;
    border-color: #16a34a;
    box-shadow: 0 0 0 3px rgba(22, 163, 74, 0.1);
}

label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: #374151;
}

/* Images */
img {
    max-width: 100%;
    height: auto;
    border-radius: 0.5rem;
}

/* Spacing Utilities */
.py-8 { padding-top: 2rem; padding-bottom: 2rem; }
.py-12 { padding-top: 3rem; padding-bottom: 3rem; }
.py-16 { padding-top: 4rem; padding-bottom: 4rem; }
.py-20 { padding-top: 5rem; padding-bottom: 5rem; }

.px-4 { padding-left: 1rem; padding-right: 1rem; }
.px-6 { padding-left: 1.5rem; padding-right: 1.5rem; }

.mb-4 { margin-bottom: 1rem; }
.mb-6 { margin-bottom: 1.5rem; }
.mb-8 { margin-bottom: 2rem; }
.mb-12 { margin-bottom: 3rem; }

.mt-4 { margin-top: 1rem; }
.mt-6 { margin-top: 1.5rem; }
.mt-8 { margin-top: 2rem; }

/* Text Utilities */
.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }

.text-sm { font-size: 0.875rem; }
.text-base { font-size: 1rem; }
.text-lg { font-size: 1.125rem; }
.text-xl { font-size: 1.25rem; }
.text-2xl { font-size: 1.5rem; }
.text-3xl { font-size: 1.875rem; }
.text-4xl { font-size: 2.25rem; }
.text-5xl { font-size: 3rem; }

.font-bold { font-weight: 700; }
.font-semibold { font-weight: 600; }
.font-medium { font-weight: 500; }

.text-gray-600 { color: #4b5563; }
.text-gray-700 { color: #374151; }
.text-gray-900 { color: #111827; }

/* Background Colors */
.bg-white { background-color: white; }
.bg-gray-50 { background-color: #f9fafb; }
.bg-gray-100 { background-color: #f3f4f6; }
.bg-blue-50 { background-color: #eff6ff; }
.bg-blue-600 { background-color: #16a34a; }

/* Responsive Typography */
@media (max-width: 768px) {
    /* Only apply mobile sizing to regular content, NOT .pb-content */
    h1:not(.pb-content h1):not(.pb-content *) { font-size: 2.25rem; }
    h2:not(.pb-content h2):not(.pb-content *) { font-size: 1.875rem; }
    h3:not(.pb-content h3):not(.pb-content *) { font-size: 1.5rem; }
    h4:not(.pb-content h4):not(.pb-content *) { font-size: 1.25rem; }
    
    section {
        padding: 2rem 0;
    }
}

/* Smooth Scrolling */
html {
    scroll-behavior: smooth;
}

/* Focus Visible */
*:focus-visible {
    outline: 2px solid #16a34a;
    outline-offset: 2px;
}

