/* Custom Styles for CSAgent Website */

/* Global Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Noto Sans JP', 'Inter', sans-serif;
    overflow-x: hidden;
}

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

/* Hero Section Background */
.hero-section {
    position: relative;
    background: linear-gradient(135deg, #047857 0%, #065f46 50%, #059669 100%);
    min-height: 100vh;
    display: flex;
    align-items: center;
}

.hero-bg-overlay {
    background: linear-gradient(135deg, rgba(4, 120, 87, 0.75) 0%, rgba(6, 95, 70, 0.75) 50%, rgba(5, 150, 105, 0.75) 100%);
    backdrop-filter: blur(1px);
}

/* Hero Text Styles for Better Visibility */
.hero-title {
    text-shadow: 2px 2px 8px rgba(0, 0, 0, 0.5), 0 0 20px rgba(0, 0, 0, 0.3);
}

.hero-subtitle {
    text-shadow: 2px 2px 8px rgba(0, 0, 0, 0.5), 0 0 20px rgba(0, 0, 0, 0.3);
}

.hero-description {
    text-shadow: 1px 1px 6px rgba(0, 0, 0, 0.5), 0 0 15px rgba(0, 0, 0, 0.3);
    font-weight: 500;
}

@keyframes gradientShift {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.8;
    }
}

/* Header Scroll Effect */
#header.scrolled {
    padding: 0.75rem 0;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

/* Navigation Links */
.nav-link {
    position: relative;
    font-weight: 500;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 2px;
    background-color: #10b981;
    transition: width 0.3s ease;
}

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

/* Header Logo Size Control */
header img[alt*="Logo"],
header .custom-logo {
    height: 32px !important;
    width: auto !important;
}

@media (min-width: 768px) {
    header img[alt*="Logo"],
    header .custom-logo {
        height: 40px !important;
    }
}

/* Fade In Up Animation */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in-up {
    animation: fadeInUp 0.8s ease forwards;
    opacity: 0;
}

/* Service Cards Hover Effect */
.service-card {
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.service-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s ease;
}

.service-card:hover::before {
    left: 100%;
}

/* Feature Cards */
.feature-card {
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

.feature-card:hover {
    border-color: #00a3e0;
}

/* Process Step Animation */
.process-step {
    transition: all 0.3s ease;
}

.process-step:hover {
    transform: scale(1.05);
}

/* Button Animations */
.btn-primary,
.btn-secondary {
    transition: all 0.3s ease;
    display: inline-block;
}

.btn-primary:hover,
.btn-secondary:hover {
    box-shadow: 0 10px 20px rgba(0, 102, 204, 0.3);
}

/* Scroll to Top Button */
#scroll-to-top {
    transition: all 0.3s ease;
}

#scroll-to-top.show {
    opacity: 1;
    pointer-events: auto;
}

/* Form Styles */
input[type="text"],
input[type="email"],
select,
textarea {
    transition: all 0.3s ease;
}

input[type="text"]:focus,
input[type="email"]:focus,
select:focus,
textarea:focus {
    box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.1);
}

/* Success/Error Messages */
.success-message {
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
    padding: 1rem;
    border-radius: 0.5rem;
    animation: slideDown 0.5s ease;
}

.error-message {
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
    padding: 1rem;
    border-radius: 0.5rem;
    animation: slideDown 0.5s ease;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Loading Animation */
.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: #fff;
    animation: spin 1s ease-in-out infinite;
}

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

/* Responsive Design Enhancements */
@media (max-width: 768px) {
    .hero-section {
        min-height: 100vh;
        padding-top: 5rem;
    }
    
    .service-card,
    .feature-card {
        margin-bottom: 1rem;
    }
}

/* Intersection Observer Animation Classes */
.fade-in-up.observed {
    animation: fadeInUp 0.8s ease forwards;
}

/* Parallax Effect for Hero */
@media (min-width: 768px) {
    .hero-section {
        background-attachment: fixed;
    }
}

/* Gradient Text */
.gradient-text {
    background: linear-gradient(135deg, #10b981, #34d399);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Card Hover Glow Effect */
.card-glow {
    position: relative;
    overflow: hidden;
}

.card-glow::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(52, 211, 153, 0.2);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.card-glow:hover::after {
    width: 300px;
    height: 300px;
}

/* Pulse Animation for CTA Buttons */
@keyframes pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7);
    }
    70% {
        box-shadow: 0 0 0 10px rgba(16, 185, 129, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(16, 185, 129, 0);
    }
}

.btn-pulse {
    animation: pulse 2s infinite;
}

/* Mobile Menu Animation */
#mobile-menu {
    animation: slideDown 0.3s ease;
}

/* Section Divider */
.section-divider {
    height: 4px;
    background: linear-gradient(90deg, transparent, #10b981, transparent);
    margin: 4rem auto;
    max-width: 200px;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, #10b981, #34d399);
    border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(180deg, #059669, #10b981);
}

/* Selection Color */
::selection {
    background-color: #34d399;
    color: white;
}

::-moz-selection {
    background-color: #34d399;
    color: white;
}

/* Focus Visible for Accessibility */
*:focus-visible {
    outline: 2px solid #34d399;
    outline-offset: 2px;
}

/* Print Styles */
@media print {
    header,
    footer,
    #scroll-to-top,
    .btn-primary,
    .btn-secondary {
        display: none;
    }
    
    body {
        color: black;
        background: white;
    }
}

/* High Contrast Mode Support */
@media (prefers-contrast: high) {
    .hero-section {
        background: #047857;
    }
    
    .btn-primary {
        border: 2px solid currentColor;
    }
}

/* Reduced Motion for Accessibility */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    
    html {
        scroll-behavior: auto;
    }
}

/* Dark Mode Support (Future Enhancement) */
@media (prefers-color-scheme: dark) {
    /* Dark mode styles can be added here in the future */
}

/* Loading Overlay */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.loading-overlay.active {
    opacity: 1;
    pointer-events: auto;
}

/* Tooltip Styles */
.tooltip {
    position: relative;
    display: inline-block;
}

.tooltip .tooltiptext {
    visibility: hidden;
    width: 200px;
    background-color: #1a1a1a;
    color: #fff;
    text-align: center;
    border-radius: 6px;
    padding: 8px;
    position: absolute;
    z-index: 1;
    bottom: 125%;
    left: 50%;
    margin-left: -100px;
    opacity: 0;
    transition: opacity 0.3s;
    font-size: 14px;
}

.tooltip:hover .tooltiptext {
    visibility: visible;
    opacity: 1;
}

/* Badge Styles */
.badge {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    font-size: 0.875rem;
    font-weight: 600;
    line-height: 1;
    text-align: center;
    white-space: nowrap;
    vertical-align: baseline;
    border-radius: 9999px;
}

.badge-primary {
    background-color: #10b981;
    color: white;
}

.badge-accent {
    background-color: #34d399;
    color: white;
}

/* Skeleton Loading */
.skeleton {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: loading 1.5s infinite;
}

@keyframes loading {
    0% {
        background-position: 200% 0;
    }
    100% {
        background-position: -200% 0;
    }
}