/* Custom Styles for Tridata Website */

:root {
    --primary-color: #2563eb;
    --secondary-color: #1e40af;
    --accent-color: #3b82f6;
    --text-dark: #1f2937;
    --text-light: #6b7280;
    --bg-light: #f9fafb;
}

/* Logo Styles */
nav img[alt*="Logo"] {
    transition: transform 0.3s ease;
}

nav img[alt*="Logo"]:hover {
    transform: scale(1.05);
}

* {
    box-sizing: border-box;
}

body {
    font-family: 'Noto Sans JP', 'Inter', sans-serif;
    line-height: 1.6;
    color: var(--text-dark);
}

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

/* Navigation Link Hover Effect */
.nav-link {
    position: relative;
    color: #4b5563;
    transition: color 0.3s ease;
}

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

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

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

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.animate-fade-in {
    animation: fadeIn 1s ease-out;
}

.animate-fade-in-delay {
    animation: fadeIn 1s ease-out 0.3s backwards;
}

.animate-fade-in-delay-2 {
    animation: fadeIn 1s ease-out 0.6s backwards;
}

.animate-fade-in-delay-3 {
    animation: fadeIn 1s ease-out 0.9s backwards;
}

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

.btn-primary:hover {
    transform: translateY(-2px);
}

.btn-secondary {
    display: inline-block;
    transition: all 0.3s ease;
}

.btn-secondary:hover {
    transform: translateY(-2px);
}

/* Card Hover Effects */
.card-hover {
    transition: all 0.3s ease;
}

.card-hover:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
}

/* Navbar Scroll Effect */
.navbar-scrolled {
    padding: 0.5rem 0;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

/* Back to Top Button */
#back-to-top {
    transition: opacity 0.3s ease, transform 0.3s ease;
}

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

#back-to-top:hover {
    transform: translateY(-5px);
}

/* Mobile Menu Transition */
#mobile-menu {
    transition: max-height 0.3s ease-in-out;
    overflow: hidden;
}

/* Loading Animation */
@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

.loading-spinner {
    border: 3px solid rgba(37, 99, 235, 0.1);
    border-top-color: var(--primary-color);
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 0.6s linear infinite;
}

/* Form Focus States */
input:focus,
textarea:focus,
select:focus {
    outline: none;
    ring: 2px;
    ring-color: var(--primary-color);
}

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

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

::-webkit-scrollbar-thumb {
    background: var(--primary-color);
    border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--secondary-color);
}

/* Section Divider */
.section-divider {
    width: 80px;
    height: 4px;
    background: linear-gradient(to right, var(--primary-color), var(--accent-color));
    margin: 0 auto;
}

/* Responsive Typography */
@media (max-width: 768px) {
    h1 {
        font-size: 2rem;
    }
    
    h2 {
        font-size: 1.75rem;
    }
    
    h3 {
        font-size: 1.5rem;
    }
}

/* Print Styles */
@media print {
    .no-print {
        display: none !important;
    }
    
    body {
        font-size: 12pt;
    }
    
    a {
        text-decoration: underline;
        color: #000;
    }
}

/* Accessibility */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border-width: 0;
}

/* Focus Visible for Accessibility */
*:focus-visible {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

/* Smooth transitions for interactive elements */
a, button, input, textarea, select {
    transition: all 0.3s ease;
}

/* Hero Background Pattern */
.hero-pattern {
    background-image: 
        linear-gradient(30deg, rgba(37, 99, 235, 0.1) 12%, transparent 12.5%, transparent 87%, rgba(37, 99, 235, 0.1) 87.5%, rgba(37, 99, 235, 0.1)),
        linear-gradient(150deg, rgba(37, 99, 235, 0.1) 12%, transparent 12.5%, transparent 87%, rgba(37, 99, 235, 0.1) 87.5%, rgba(37, 99, 235, 0.1)),
        linear-gradient(30deg, rgba(37, 99, 235, 0.1) 12%, transparent 12.5%, transparent 87%, rgba(37, 99, 235, 0.1) 87.5%, rgba(37, 99, 235, 0.1)),
        linear-gradient(150deg, rgba(37, 99, 235, 0.1) 12%, transparent 12.5%, transparent 87%, rgba(37, 99, 235, 0.1) 87.5%, rgba(37, 99, 235, 0.1));
    background-size: 80px 140px;
    background-position: 0 0, 0 0, 40px 70px, 40px 70px;
}