/**
 * Site-wide extras that used to be printed inline on every page (moved here so browsers cache them):
 * container width, light and dark primary colours for the older Tailwind classes, the homepage
 * newsletter card, pagination and post text spacing.
 *
 * @package AngeloseGlobal
 */

/* Container fix - ensure full width */
.container {
    width: 100%;
    margin-left: auto;
    margin-right: auto;
    padding-left: 1.5rem;
    padding-right: 1.5rem;
}
@media (min-width: 1400px) {
    .container {
        max-width: 1400px;
    }
}

/* ========================================
   LIGHT MODE — Dark Navy Primary (#18183f)
   ======================================== */
.light .btn-hero,
.light button.btn-hero,
.light a.btn-hero {
    background-color: #18183f !important;
    color: #ffffff !important;
    border: none !important;
}
.light .btn-hero:hover,
.light button.btn-hero:hover,
.light a.btn-hero:hover {
    background-color: #141432 !important;
}
.light .bg-primary {
    background-color: #18183f !important;
}
.light .bg-primary:hover,
.light .hover\:bg-primary-hover:hover {
    background-color: #141432 !important;
}
.light .text-primary {
    color: #18183f !important;
}
.light .text-gradient-primary {
    background: linear-gradient(135deg, #18183f 0%, #2a2a6e 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}
.light svg.text-primary {
    fill: #18183f !important;
    stroke: #18183f !important;
}

/* ========================================
   DARK MODE — Bright Blue Primary (#5B8DEF)
   Visible on dark backgrounds, matches brand.
   :not(.light) keeps these from overriding the light mode navy above.
   ======================================== */
:root:not(.light) .btn-hero,
:root:not(.light) button.btn-hero,
:root:not(.light) a.btn-hero {
    background-color: #4A7AE5 !important;
    color: #ffffff !important;
    border: none !important;
}
:root:not(.light) .btn-hero:hover,
:root:not(.light) button.btn-hero:hover,
:root:not(.light) a.btn-hero:hover {
    background-color: #3D6AD4 !important;
}
:root:not(.light) .bg-primary {
    background-color: #4A7AE5 !important;
}
:root:not(.light) .bg-primary:hover,
:root:not(.light) .hover\:bg-primary-hover:hover {
    background-color: #3D6AD4 !important;
}
:root:not(.light) .text-primary {
    color: #8fb4ff !important;  /* same light blue as post links and .ag-emph */
}
:root:not(.light) .text-gradient-primary {
    background: linear-gradient(135deg, #5B8DEF 0%, #7BA4FF 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}
:root:not(.light) svg.text-primary {
    fill: #8fb4ff !important;
    stroke: #8fb4ff !important;
}

/* ========================================
   NEWSLETTER FORM STYLES (Extracted from PWA)
   ======================================== */

/* Newsletter Section Container */
section.py-24.bg-gradient-card {
    padding-top: 6rem;
    padding-bottom: 6rem;
    background: hsl(var(--muted) / 0.35);  /* was a fixed near-black, which showed as a dark band in light mode */
}

/* Newsletter Card Container */
.card-professional {
    background-color: hsl(var(--card));
    border: 1px solid hsl(var(--border));
    border-radius: var(--radius);
    box-shadow: 0 2px 8px -2px hsl(225 12% 4% / 0.1);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.card-professional:hover {
    box-shadow: 0 4px 16px -4px hsl(240 45% 17% / 0.15);
    border-color: hsl(var(--primary) / 0.3);
}

/* Background Pattern (Blur Effects) */
.card-professional .absolute.inset-0.opacity-5 {
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    opacity: 0.05;
    pointer-events: none;
}

.card-professional .absolute.inset-0.opacity-5 .bg-primary.rounded-full.blur-3xl {
    position: absolute;
    background-color: hsl(var(--primary));
    border-radius: 9999px;
    filter: blur(64px);
}

.card-professional .absolute.inset-0.opacity-5 .bg-accent.rounded-full.blur-3xl {
    position: absolute;
    background-color: hsl(var(--accent));
    border-radius: 9999px;
    filter: blur(64px);
}

/* Newsletter Header Icon Container */
.card-professional .p-4.bg-primary\/10.rounded-2xl {
    padding: 1rem;
    background-color: hsl(var(--primary) / 0.1);
    border-radius: 1rem;
}

.card-professional .p-4.bg-primary\/10.rounded-2xl svg {
    height: 2rem;
    width: 2rem;
    color: hsl(var(--primary));
}

/* Newsletter Title */
.card-professional h2.text-3xl,
.card-professional h2.md\:text-4xl {
    font-size: 2.25rem;
    font-weight: 700;
    margin-bottom: 1rem;
}

@media (min-width: 768px) {
    .card-professional h2.md\:text-4xl {
        font-size: 2.75rem;
    }
}

/* Newsletter Description */
.card-professional .text-lg.text-muted-foreground {
    font-size: 1.25rem;
    color: hsl(var(--muted-foreground));
}

/* Newsletter Form Container */
.card-professional form.space-y-4 {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

/* Form Input Grid (First Name / Last Name) */
.card-professional form .grid.grid-cols-1.sm\:grid-cols-2 {
    display: grid;
    grid-template-columns: repeat(1, minmax(0, 1fr));
    gap: 0.75rem;
}

@media (min-width: 640px) {
    .card-professional form .grid.grid-cols-1.sm\:grid-cols-2 {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

/* Form Input Fields */
.card-professional form input[type="text"],
.card-professional form input[type="email"] {
    background-color: hsl(var(--input));
    border: 1px solid hsl(var(--border));
    border-radius: calc(var(--radius) - 2px);
    padding: 0.5rem 1rem;
    width: 100%;
    color: hsl(var(--foreground));
    font-size: 1rem;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    outline: none;
}

.card-professional form input[type="text"]:focus,
.card-professional form input[type="email"]:focus {
    border-color: hsl(var(--primary));
    box-shadow: 0 0 0 1px hsl(var(--primary));
}

.card-professional form input[type="text"]::placeholder,
.card-professional form input[type="email"]::placeholder {
    color: hsl(var(--muted-foreground));
}

/* Submit Button */
.card-professional form button.btn-hero.w-full,
.card-professional form .btn-hero.w-full {
    width: 100%;
    padding: 1rem 2rem;
    font-weight: 600;
    border-radius: 0;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Privacy Text */
.card-professional .text-xs.text-muted-foreground.text-center {
    font-size: 0.875rem;
    color: hsl(var(--muted-foreground));
    text-align: center;
    margin-top: 0.75rem;
}

/* Benefits Grid */
.card-professional .grid.grid-cols-1.md\:grid-cols-2 {
    display: grid;
    grid-template-columns: repeat(1, minmax(0, 1fr));
    gap: 1.5rem;
    max-width: 48rem;
    margin-left: auto;
    margin-right: auto;
}

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

/* Benefit Item */
.card-professional .flex.items-start.space-x-4 {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    padding: 1rem;
    border-radius: var(--radius);
    background-color: hsl(var(--background) / 0.5);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.card-professional .flex.items-start.space-x-4:hover {
    background-color: hsl(var(--background) / 0.7);
}

/* Benefit Icon Container */
.card-professional .flex-shrink-0.p-2.bg-primary\/10.rounded-lg {
    flex-shrink: 0;
    padding: 0.5rem;
    background-color: hsl(var(--primary) / 0.1);
    border-radius: var(--radius);
    color: hsl(var(--primary));
}

.card-professional .flex-shrink-0.p-2.bg-primary\/10.rounded-lg svg {
    height: 1.25rem;
    width: 1.25rem;
}

/* Benefit Title */
.card-professional .font-semibold.text-foreground {
    font-weight: 600;
    color: hsl(var(--foreground));
    margin-bottom: 0.25rem;
}

/* Benefit Description */
.card-professional .text-sm.text-muted-foreground {
    font-size: 1rem;
    color: hsl(var(--muted-foreground));
}

/* Trust Indicators Section */
.card-professional .text-center.pt-4.border-t.border-border\/50 {
    text-align: center;
    padding-top: 1rem;
    border-top: 1px solid hsl(var(--border) / 0.5);
}

/* Trust Badges Container */
.card-professional .flex.flex-wrap.items-center.justify-center.gap-4 {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 1rem;
}

/* Trust Badge */
.card-professional .bg-success\/10.text-success.border.border-success\/20,
.card-professional .bg-primary\/10.text-primary.border.border-primary\/20,
.card-professional .bg-accent\/10.text-accent.border.border-accent\/20 {
    padding: 0.25rem 0.75rem;
    border-radius: calc(var(--radius) - 2px);
    font-size: 0.875rem;
    border-width: 1px;
}

.card-professional .bg-success\/10.text-success.border.border-success\/20 {
    background-color: hsl(var(--success) / 0.1);
    color: hsl(var(--success));
    border-color: hsl(var(--success) / 0.2);
}

.card-professional .bg-primary\/10.text-primary.border.border-primary\/20 {
    background-color: hsl(var(--primary) / 0.1);
    color: hsl(var(--primary));
    border-color: hsl(var(--primary) / 0.2);
}

.card-professional .bg-accent\/10.text-accent.border.border-accent\/20 {
    background-color: hsl(var(--accent) / 0.1);
    color: hsl(var(--accent));
    border-color: hsl(var(--accent) / 0.2);
}

/* Success/Error Messages */
.card-professional .bg-green-50.dark\:bg-green-900\/20,
.card-professional .bg-red-50.dark\:bg-red-900\/20 {
    padding: 1rem;
    border-radius: calc(var(--radius) - 2px);
    margin-bottom: 1rem;
    text-align: center;
}

.card-professional .bg-green-50.dark\:bg-green-900\/20 {
    background-color: rgba(34, 197, 94, 0.1);
    border: 1px solid rgba(34, 197, 94, 0.2);
    color: rgb(22, 163, 74);
}

.card-professional .bg-red-50.dark\:bg-red-900\/20 {
    background-color: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.2);
    color: rgb(220, 38, 38);
}

/* Responsive Adjustments */
@media (max-width: 640px) {
    section.py-24.bg-gradient-card {
        padding-top: 3rem;
        padding-bottom: 3rem;
    }
    
    .card-professional h2.text-3xl {
        font-size: 1.875rem;
    }
    
    .card-professional .text-lg.text-muted-foreground {
        font-size: 1rem;
    }
}

/* ========================================
   BLOG STYLES
   ======================================== */

/* Pagination */
.page-numbers {
    list-style: none;
    display: flex;
    gap: 0.5rem;
    justify-content: center;
    align-items: center;
    padding: 0;
    flex-wrap: wrap;
}
.page-numbers li {
    list-style: none;
}
.page-numbers a,
.page-numbers span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 2.5rem;
    height: 2.5rem;
    padding: 0 0.75rem;
    border: 1px solid hsl(var(--border));
    border-radius: calc(var(--radius) - 2px);
    font-size: 0.875rem;
    font-weight: 500;
    transition: all 0.2s;
    color: hsl(var(--foreground));
    text-decoration: none;
}
.page-numbers a:hover {
    background-color: hsl(var(--primary) / 0.1);
    border-color: hsl(var(--primary) / 0.3);
    color: hsl(var(--primary));
}
.page-numbers .current {
    background-color: hsl(var(--primary));
    border-color: hsl(var(--primary));
    color: #ffffff;
}

/* Prose (blog post content) */
.prose { line-height: 1.8; }
.prose h2 { font-size: 1.75rem; margin-top: 2.5rem; margin-bottom: 1rem; }
.prose h3 { font-size: 1.375rem; margin-top: 2rem; margin-bottom: 0.75rem; }
.prose p { margin-bottom: 1.25rem; }
.prose ul, .prose ol { margin-bottom: 1.25rem; padding-left: 1.5rem; }
.prose li { margin-bottom: 0.5rem; }
.prose blockquote { padding: 1rem 1.5rem; margin: 1.5rem 0; border-left-width: 4px; font-style: italic; }
.prose img { border-radius: 0.75rem; margin: 1.5rem 0; }
.prose pre { padding: 1rem; border-radius: 0.5rem; overflow-x: auto; margin: 1.5rem 0; }
.line-clamp-2 { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
