/**
 * TagCompanion Landing Page - Custom Styles
 * Professional Blue Color Scheme for SaaS
 */

/* ================================
   Color Palette - CSS Variables
   ================================ */
:root {
    /* Single Primary Blue - Used Everywhere */
    --primary-blue: #6792f3;
    --primary-blue-hover: #5578d9;
    --light-blue-accent: #f0f4ff;

    /* Dark Text Colors */
    --text-dark: #1f2937;
    --text-secondary: #6b7280;

    /* Background Colors */
    --bg-white: #ffffff;
    --bg-light: #f9fafb;

    /* Success Green (keep for checkmarks) */
    --success-green: #10b981;

    /* Border Colors */
    --border-light: #e5e7eb;
    --border-medium: #d1d5db;
}

/* ================================
   Button Styles - Blue Theme
   ================================ */

/* Primary CTA Buttons (Get Started, Register, Choose Plan) */
.btn-primary {
    background: var(--primary-blue) !important;
    border-color: var(--primary-blue) !important;
    color: #ffffff !important;
    transition: all 0.2s ease;
    box-shadow: 0 1px 3px rgba(37, 99, 235, 0.2);
}

.btn-primary:hover,
.btn-primary:focus {
    background: var(--primary-blue-hover) !important;
    border-color: var(--primary-blue-hover) !important;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.3) !important;
}

/* Secondary Buttons (outlined style) */
.btn-outline-primary {
    border-color: var(--primary-blue) !important;
    color: var(--primary-blue) !important;
    background: transparent !important;
}

.btn-outline-primary:hover,
.btn-outline-primary:focus {
    background: var(--light-blue-accent) !important;
    border-color: var(--primary-blue-hover) !important;
    color: var(--primary-blue-hover) !important;
}

/* Dark/Black buttons converted to blue */
.btn-dark {
    background: var(--primary-blue) !important;
    border-color: var(--primary-blue) !important;
    color: #ffffff !important;
}

.btn-dark:hover,
.btn-dark:focus {
    background: var(--primary-blue-hover) !important;
    border-color: var(--primary-blue-hover) !important;
}

/* Outline dark buttons converted to blue outline */
.btn-outline-dark {
    border-color: var(--primary-blue) !important;
    color: var(--primary-blue) !important;
    background: transparent !important;
}

.btn-outline-dark:hover,
.btn-outline-dark:focus {
    background: var(--light-blue-accent) !important;
    border-color: var(--primary-blue-hover) !important;
    color: var(--primary-blue-hover) !important;
}

/* Outline light buttons (on dark backgrounds) */
.btn-outline-light {
    border-color: rgba(255, 255, 255, 0.8) !important;
    color: #ffffff !important;
}

.btn-outline-light:hover,
.btn-outline-light:focus {
    background: rgba(255, 255, 255, 0.1) !important;
    border-color: #ffffff !important;
    color: #ffffff !important;
}

/* Light buttons (on dark backgrounds) */
.btn-light {
    background: #ffffff !important;
    border-color: #ffffff !important;
    color: var(--primary-blue) !important;
}

.btn-light:hover,
.btn-light:focus {
    background: var(--light-blue-accent) !important;
    border-color: var(--light-blue-accent) !important;
    color: var(--primary-blue-hover) !important;
    transform: translateY(-1px);
}

/* ================================
   Navigation
   ================================ */

/* Active navigation link */
.navbar-nav .nav-link.active {
    color: var(--primary-blue) !important;
    font-weight: 600 !important;
}

/* Navigation hover state */
.navbar-nav .nav-link:hover {
    color: var(--primary-blue) !important;
}

/* Navbar brand/logo hover */
.navbar-brand:hover {
    color: var(--primary-blue) !important;
}

/* ================================
   Pricing Cards & Badges
   ================================ */

/* Popular pricing card border */
.border-primary {
    border-color: var(--primary-blue) !important;
}

/* Popular badge */
.badge.bg-primary,
.bg-primary {
    background-color: var(--primary-blue) !important;
}

/* Dark badges converted to blue */
.badge.bg-dark {
    background-color: var(--primary-blue) !important;
}

/* Popular badge on pricing cards */
.position-absolute.top-0.start-50.translate-middle {
    background: var(--primary-blue) !important;
}

/* ================================
   Icons & Accents
   ================================ */

/* Checkmarks and success icons */
.text-success,
.bi-check-circle-fill,
.bi-check2-circle {
    color: var(--success-green) !important;
}

/* Blue icon accents */
.bi-lightning-charge-fill,
.bi-shield-check,
.bi-graph-up-arrow,
.bi-cursor-fill,
.bi-speedometer2,
.bi-code-slash {
    color: var(--primary-blue) !important;
}

/* ================================
   Links & Text
   ================================ */

/* Text links */
a:not(.btn):not(.nav-link):not(.navbar-brand) {
    color: var(--primary-blue);
    transition: color 0.2s ease;
}

a:not(.btn):not(.nav-link):not(.navbar-brand):hover {
    color: var(--primary-blue-hover);
}

/* Primary text color */
.text-primary {
    color: var(--primary-blue) !important;
}

/* ================================
   FAQ Accordion
   ================================ */

/* Accordion button active/focus state */
.accordion-button:not(.collapsed) {
    background-color: var(--light-blue-accent) !important;
    color: var(--primary-blue) !important;
}

.accordion-button:focus {
    border-color: var(--primary-blue) !important;
    box-shadow: 0 0 0 0.25rem rgba(59, 130, 246, 0.15) !important;
}

.accordion-button:hover {
    background-color: var(--light-blue-accent);
}

/* ================================
   Section Borders & Dividers
   ================================ */

/* Subtle blue tinted borders */
.border,
.border-top,
.border-bottom {
    border-color: var(--border-light) !important;
}

/* Dark borders converted to primary blue */
.border-dark {
    border-color: var(--primary-blue) !important;
}

/* Core Workflow cards - make consistent with other cards */
.border-start.border-dark.border-5 {
    border-width: 1px !important; /* Override border-5, make all borders normal */
    border-left-color: var(--primary-blue) !important;
}

/* Card borders with subtle blue hover */
.card {
    transition: all 0.3s ease;
}

.card:hover {
    box-shadow: 0 4px 12px rgba(30, 64, 175, 0.08);
}

/* SDK Cards - Enhanced hover effects */
.sdk-card {
    border: 1px solid var(--border-light) !important;
    cursor: default;
}

.sdk-card:hover {
    transform: translateY(-4px);
    border-color: var(--primary-blue) !important;
    box-shadow: 0 8px 24px rgba(37, 99, 235, 0.15) !important;
}

.sdk-card .bi {
    transition: all 0.3s ease;
}

.sdk-card:hover .bi {
    transform: scale(1.1);
}

/* ================================
   Typography & Headings
   ================================ */

/* Main headings - use dark blue-gray instead of pure black */
h1, h2, .h1, .h2, .display-4 {
    color: #1e293b !important; /* Dark blue-gray */
}

/* Section headings can be primary blue for emphasis */
section h2 {
    color: var(--primary-blue) !important;
}

/* Smaller headings stay darker */
h3, h4, h5, h6, .h3, .h4, .h5, .h6 {
    color: var(--text-dark) !important;
}

/* Lead text and subtitles - lighter for hierarchy */
.lead, .text-muted {
    color: var(--text-secondary) !important;
}

/* Card titles can have slight blue tint */
.card-body h3 {
    color: #334155 !important; /* Slightly blue-tinted dark gray */
}

/* SDK card titles get blue on hover */
.sdk-card:hover h3 {
    color: var(--primary-blue) !important;
}

/* ================================
   Utility Overrides
   ================================ */

/* Screenshot placeholders with blue tint */
.screenshot-placeholder {
    background: #f8f9fa;
    border: 2px dashed var(--border-medium);
    border-radius: 8px;
    padding: 3rem;
    text-align: center;
}

/* Smooth scroll behavior */
html {
    scroll-behavior: smooth;
}

/* ================================
   Pain Points Section Animations
   ================================ */

/* Pain card base styles */
.pain-card {
    transition: all 0.3s ease;
    cursor: pointer;
    opacity: 0;
    transform: translateY(30px);
}

/* Fade in animation when visible */
.pain-card.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Stagger animation delays */
.pain-card:nth-child(1) { transition-delay: 0.1s; }
.pain-card:nth-child(2) { transition-delay: 0.2s; }
.pain-card:nth-child(3) { transition-delay: 0.3s; }
.pain-card:nth-child(4) { transition-delay: 0.4s; }
.pain-card:nth-child(5) { transition-delay: 0.5s; }
.pain-card:nth-child(6) { transition-delay: 0.6s; }

/* Hover effects */
.pain-card:hover {
    transform: translateY(-8px);
    border-color: #dc3545 !important;
    box-shadow: 0 8px 24px rgba(220, 53, 69, 0.25) !important;
}

/* Pain icon shake animation */
.pain-icon {
    display: inline-block;
    transition: all 0.3s ease;
}

.pain-card:hover .pain-icon {
    animation: shake 0.5s ease-in-out;
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    10%, 30%, 50%, 70%, 90% { transform: translateX(-3px) rotate(-5deg); }
    20%, 40%, 60%, 80% { transform: translateX(3px) rotate(5deg); }
}

/* Ensure proper spacing for fixed header */
body {
    padding-top: 0;
    color: var(--text-dark);
}

/* Toast notification custom styling */
#disclaimer-toast {
    max-width: 600px;
}

/* Mobile alert styling */
#disclaimer-alert {
    border-radius: 0 !important;
}

/* ================================
   Step Numbers (How It Works)
   ================================ */

.rounded-circle.bg-dark {
    background-color: var(--primary-blue) !important;
}

/* ================================
   Dark Background Sections
   ================================ */

/* CTA sections with dark background - add subtle blue tint */
section.bg-dark,
.bg-dark {
    background-color: #0f172a !important; /* Deep blue-black instead of pure black */
}

/* Exception: keep step circles and badges as primary blue */
.rounded-circle.bg-dark,
.badge.bg-dark {
    background-color: var(--primary-blue) !important;
}

/* ================================
   How It Works Section - Alignment Fix
   ================================ */

/* Ensure images align on tablets and desktops by giving text equal height */
@media (min-width: 768px) {
    /* Fixed height for text content to ensure GIF alignment */
    #how-it-works .col-md-4 p.text-muted {
        min-height: 140px;
    }
}

/* ================================
   Responsive Adjustments
   ================================ */

@media (max-width: 768px) {
    .display-4 {
        font-size: 2rem;
    }

    .lead {
        font-size: 1rem;
    }
}

/* ================================
   Image Modal/Lightbox
   ================================ */

.image-modal {
    display: none;
    position: fixed;
    z-index: 9999;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.9);
    animation: fadeIn 0.3s;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.modal-content {
    margin: auto;
    display: block;
    max-width: 90%;
    max-height: 90%;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    animation: zoomIn 0.3s;
}

@keyframes zoomIn {
    from { transform: translate(-50%, -50%) scale(0.8); }
    to { transform: translate(-50%, -50%) scale(1); }
}

.close-button {
    position: absolute;
    top: 20px;
    right: 35px;
    color: #fff;
    font-size: 40px;
    font-weight: bold;
    cursor: pointer;
    z-index: 10000;
    transition: 0.3s;
}

.close-button:hover,
.close-button:focus {
    color: #bbb;
}

/* ================================
   Centralized Hover Effects
   ================================ */

/* General card hover effect - consistent across all pages */
.card {
    transition: all 0.3s ease;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 0.5rem 1.5rem rgba(0, 0, 0, 0.2) !important;
}

/* Pricing cards specific hover (index.php and pricing.php) */
.col-lg-3 .card:hover,
.col-md-6 .card:hover {
    transform: translateY(-5px);
    box-shadow: 0 0.5rem 1.5rem rgba(0, 0, 0, 0.2) !important;
}

/* Most popular pricing card enhanced hover */
.card.border-primary:hover {
    box-shadow: 0 0.5rem 1.5rem rgba(103, 146, 243, 0.35) !important;
}

/* Cost comparison cards (index.php) */
.col-lg-6 .card:hover {
    transform: translateY(-5px);
    box-shadow: 0 0.5rem 1.5rem rgba(0, 0, 0, 0.2) !important;
}

/* Template ownership card with green border (index.php) */
.card.border-success:hover {
    transform: translateY(-5px);
    box-shadow: 0 0.5rem 1.5rem rgba(40, 167, 69, 0.25) !important;
}

/* Cards with dark border (technical.php eCommerce cards) */
.card.border-dark:hover {
    transform: translateY(-5px);
    box-shadow: 0 0.5rem 1.5rem rgba(103, 146, 243, 0.3) !important;
}

/* Cards with danger border (technical.php compatibility) */
.card.border-danger:hover {
    transform: translateY(-5px);
    box-shadow: 0 0.5rem 1.5rem rgba(220, 53, 69, 0.2) !important;
}

/* How it works section cards (index.php) */
#how-it-works .col-md-4 > div {
    transition: all 0.3s ease;
}

#how-it-works .col-md-4:hover > div {
    transform: translateY(-5px);
}

/* FAQ accordion items hover */
.accordion-button {
    transition: all 0.3s ease;
}

.accordion-button:not(.collapsed) {
    background-color: var(--light-blue-accent) !important;
}

.accordion-button:hover {
    background-color: #f8f9fa !important;
}

/* Feature comparison table rows hover (pricing.php) */
.table-hover tbody tr {
    transition: all 0.2s ease;
}

.table-hover tbody tr:hover {
    background-color: #f8f9fa !important;
    transform: scale(1.01);
}

/* Section headers in tables - no hover effect */
.table-hover tbody tr.table-light:hover {
    transform: none;
    background-color: #f8f9fa !important;
}

/* Technical page: Core Workflow cards */
.border-start.border-dark.border-5:hover {
    transform: translateY(-3px);
    box-shadow: 0 0.5rem 1rem rgba(103, 146, 243, 0.2) !important;
}

/* Technical page: Compatibility cards */
.col-md-6 .card.h-100:hover {
    transform: translateY(-5px);
}

/* List group items hover (technical.php GTM template section) */
.list-group-item {
    transition: all 0.2s ease;
}

.list-group-item:hover {
    background-color: #f8f9fa !important;
    transform: translateX(5px);
}
