/* ATR Energy Solutions - Custom Styles */

/* CSS Custom Properties - Updated with PDF colors (Green + Yellow/Gold) */
:root {
    --primary-green: #2D5016;
    --primary-green-light: #3D6B1E;
    --primary-green-dark: #1E3A0F;
    --accent-yellow: #D4A017;
    --accent-yellow-light: #E8B923;
    --text-dark: #1a1a1a;
    --text-gray: #4a4a4a;
    --text-light: #6b7280;
    --bg-light: #f8f9fa;
    --bg-gray: #e5e7eb;
    --white: #ffffff;
    --border-color: #d1d5db;
}

/* Base Styles */
html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
    color: var(--text-dark);
    line-height: 1.6;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    font-weight: 700;
    line-height: 1.2;
    color: var(--text-dark);
}

/* Ensure headings in dark sections stay white */
.hero-section h1,
.hero-section h2,
.bg-primary h1,
.bg-primary h2,
.bg-primary-dark h1,
.bg-primary-dark h2,
.footer h1,
.footer h2,
.footer h3 {
    color: var(--white);
}

/* Navigation */
.nav-link {
    position: relative;
    transition: color 0.2s ease;
}

.nav-link:hover {
    color: var(--primary-green);
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--primary-green);
    transition: width 0.3s ease;
}

.nav-link:hover::after {
    width: 100%;
}

/* Dropdown Menu */
.dropdown-menu {
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: all 0.2s ease;
}

.dropdown:hover .dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

/* Nested submenu fix - creates hover bridge area */
.group\/gen > div[class*="absolute"] {
    margin-left: 0 !important;
    padding-left: 8px;
    left: 100%;
    background: transparent;
}

.group\/gen > div[class*="absolute"] > a,
.group\/gen > div[class*="absolute"] > div {
    background: white;
}

.group\/gen > div[class*="absolute"]::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 8px;
    background: transparent;
}

/* Smooth transition for nested submenu */
.group\/gen > div[class*="absolute"] {
    transition: opacity 0.15s ease, visibility 0.15s ease;
}

/* Mobile Menu */
.mobile-menu {
    transform: translateX(-100%);
    transition: transform 0.3s ease;
}

.mobile-menu.active {
    transform: translateX(0);
}

/* ===========================================
   BUTTONS - Fixed styling (no Tailwind overrides)
   RULE: Never add Tailwind color classes to these buttons in HTML
   =========================================== */

/* Primary Button - Green background, white text */
.btn-primary {
    background-color: var(--primary-green) !important;
    color: var(--white) !important;
    padding: 0.75rem 1.5rem;
    border-radius: 0.375rem;
    font-weight: 600;
    transition: all 0.2s ease;
    display: inline-block;
    text-decoration: none;
    text-align: center;
    border: 2px solid var(--primary-green);
}

.btn-primary:hover {
    background-color: var(--primary-green-light) !important;
    border-color: var(--primary-green-light);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(45, 80, 22, 0.3);
}

/* Secondary Button - Yellow/Gold background, dark text */
.btn-secondary {
    background-color: var(--accent-yellow) !important;
    color: var(--primary-green-dark) !important;
    padding: 0.75rem 1.5rem;
    border-radius: 0.375rem;
    font-weight: 600;
    transition: all 0.2s ease;
    display: inline-block;
    text-decoration: none;
    text-align: center;
    border: 2px solid var(--accent-yellow);
}

.btn-secondary:hover {
    background-color: var(--accent-yellow-light) !important;
    border-color: var(--accent-yellow-light);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(212, 160, 23, 0.3);
}

/* Outline Button - Transparent with yellow border */
.btn-outline {
    background-color: transparent !important;
    color: var(--primary-green-dark) !important;
    padding: 0.75rem 1.5rem;
    border-radius: 0.375rem;
    font-weight: 600;
    transition: all 0.2s ease;
    display: inline-block;
    text-decoration: none;
    text-align: center;
    border: 2px solid var(--accent-yellow);
}

.btn-outline:hover {
    background-color: var(--accent-yellow) !important;
    color: var(--primary-green-dark) !important;
    transform: translateY(-1px);
}

/* Outline button on dark/green backgrounds - use white text */
.hero-section .btn-outline,
.bg-primary .btn-outline,
.bg-primary-dark .btn-outline {
    color: var(--white) !important;
}

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

.product-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.15);
}

.product-card img {
    transition: transform 0.3s ease;
}

.product-card:hover img {
    transform: scale(1.05);
}

/* Hero Section */
.hero-section {
    background: linear-gradient(135deg, var(--primary-green-dark) 0%, var(--primary-green) 100%);
    position: relative;
    overflow: hidden;
}

.hero-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.05'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
    opacity: 0.5;
}

/* Section Styles */
.section-title {
    font-size: 2.25rem;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 1rem;
}

.section-subtitle {
    font-size: 1.125rem;
    color: var(--text-gray);
    max-width: 600px;
}

/* Trust Badges */
.trust-badge {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem;
    background: var(--bg-light);
    border-radius: 0.5rem;
}

.trust-badge-icon {
    width: 48px;
    height: 48px;
    background: var(--primary-green);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--white);
    flex-shrink: 0;
}

/* Yellow accent border for trust badges */
.trust-badge-accent {
    border-left: 4px solid var(--accent-yellow);
}

/* Brand Logos Bar */
.brand-logo {
    filter: grayscale(100%);
    opacity: 0.6;
    transition: all 0.3s ease;
}

.brand-logo:hover {
    filter: grayscale(0%);
    opacity: 1;
    color: var(--primary-green);
}

/* Tables */
.spec-table {
    width: 100%;
    border-collapse: collapse;
}

.spec-table th,
.spec-table td {
    padding: 0.75rem 1rem;
    text-align: left;
    border-bottom: 1px solid var(--border-color);
}

.spec-table th {
    background-color: var(--primary-green);
    color: var(--white);
    font-weight: 600;
}

.spec-table tr:nth-child(even) {
    background-color: var(--bg-light);
}

.spec-table tr:hover {
    background-color: rgba(45, 80, 22, 0.05);
}

/* Forms */
.form-input {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 1px solid var(--border-color);
    border-radius: 0.375rem;
    font-size: 1rem;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.form-input:focus {
    outline: none;
    border-color: var(--primary-green);
    box-shadow: 0 0 0 3px rgba(45, 80, 22, 0.1);
}

.form-label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: var(--text-dark);
}

/* Footer */
.footer {
    background-color: var(--primary-green-dark);
    color: var(--white);
}

.footer a {
    color: rgba(255, 255, 255, 0.8);
    transition: color 0.2s ease;
}

.footer a:hover {
    color: var(--accent-yellow);
}

/* Utility Classes */
.text-primary {
    color: var(--primary-green);
}

.text-accent {
    color: var(--accent-yellow);
}

.bg-primary {
    background-color: var(--primary-green);
}

.bg-primary-dark {
    background-color: var(--primary-green-dark);
}

.bg-accent {
    background-color: var(--accent-yellow);
}

/* Yellow accent line */
.accent-line {
    width: 60px;
    height: 4px;
    background-color: var(--accent-yellow);
}

/* Loading Spinner */
.spinner {
    width: 20px;
    height: 20px;
    border: 2px solid var(--white);
    border-top-color: transparent;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* Alert Messages */
.alert {
    padding: 1rem;
    border-radius: 0.375rem;
    margin-bottom: 1rem;
}

.alert-success {
    background-color: #d1fae5;
    color: #065f46;
    border: 1px solid #a7f3d0;
}

.alert-error {
    background-color: #fee2e2;
    color: #991b1b;
    border: 1px solid #fecaca;
}

/* Scroll to Top Button */
.scroll-top {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    width: 48px;
    height: 48px;
    background: var(--primary-green);
    color: var(--white);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    z-index: 1000;
    border: none;
}

.scroll-top.visible {
    opacity: 1;
    visibility: visible;
}

.scroll-top:hover {
    background: var(--accent-yellow);
    color: var(--primary-green-dark);
    transform: translateY(-2px);
}

/* Yellow highlight boxes */
.highlight-box {
    background: linear-gradient(135deg, var(--accent-yellow) 0%, var(--accent-yellow-light) 100%);
    color: var(--primary-green-dark);
    padding: 1.5rem;
    border-radius: 0.5rem;
}

/* Stats with yellow accent */
.stat-number {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--primary-green);
}

.stat-label {
    color: var(--text-gray);
    font-size: 0.875rem;
}

/* Responsive Adjustments */
@media (max-width: 768px) {
    .section-title {
        font-size: 1.75rem;
    }

    .hero-section {
        padding-top: 4rem;
        padding-bottom: 4rem;
    }
}

/* Print Styles */
@media print {
    .no-print {
        display: none !important;
    }
}
