/* ============================================
   OPAS Website - Custom Styles
   ============================================ */

:root {
    --primary-color: #00b464;
    --primary-dark: #009852;
    --primary-light: #1cd989;
    
    /* Light Mode Colors */
    --light-bg-primary: #ffffff;
    --light-bg-secondary: #f9fafb;
    --light-text-primary: #1f2937;
    --light-text-secondary: #6b7280;
    --light-border: #e5e7eb;
    
    /* Dark Mode Colors */
    --dark-bg-primary: #111827;
    --dark-bg-secondary: #1f2937;
    --dark-text-primary: #f3f4f6;
    --dark-text-secondary: #d1d5db;
    --dark-border: #374151;
}

/* ============================================
   Global Styles
   ============================================ */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    line-height: 1.6;
    transition: background-color 0.3s ease, color 0.3s ease;
}

/* ============================================
   Typography
   ============================================ */

h1, h2, h3, h4, h5, h6 {
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 1rem;
}

h1 {
    font-size: 3.75rem;
}

h2 {
    font-size: 2.25rem;
}

h3 {
    font-size: 1.875rem;
}

h4 {
    font-size: 1.5rem;
}

p {
    margin-bottom: 1rem;
}

a {
    color: var(--primary-color);
    text-decoration: none;
    transition: color 0.3s ease;
}

a:hover {
    color: var(--primary-dark);
}

/* ============================================
   Buttons
   ============================================ */

.btn {
    padding: 0.75rem 1.5rem;
    border-radius: 0.5rem;
    font-weight: 600;
    transition: all 0.3s ease;
    cursor: pointer;
    display: inline-block;
    text-align: center;
    border: none;
}

.btn-primary {
    background-color: var(--primary-color);
    color: white;
}

.btn-primary:hover {
    background-color: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(0, 180, 100, 0.2);
}

.btn-secondary {
    border: 2px solid var(--primary-color);
    color: var(--primary-color);
    background-color: transparent;
}

.btn-secondary:hover {
    background-color: var(--primary-color);
    color: white;
}

/* ============================================
   Cards
   ============================================ */

.card {
    background: white;
    border-radius: 1rem;
    padding: 2rem;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.07);
    transition: all 0.3s ease;
}

.card:hover {
    box-shadow: 0 20px 25px rgba(0, 0, 0, 0.1);
    transform: translateY(-4px);
}

.dark .card {
    background: #1f2937;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.3);
}

.dark .card:hover {
    box-shadow: 0 20px 25px rgba(0, 0, 0, 0.5);
}

/* ============================================
   Navigation
   ============================================ */

nav {
    backdrop-filter: blur(10px);
}

nav a {
    position: relative;
}

nav a::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--primary-color);
    transition: width 0.3s ease;
}

nav a:hover::after {
    width: 100%;
}

/* Prevent underline on logo */
.logo {
    position: relative;
}

.logo::before,
.logo::after,
.logo *::before,
.logo *::after {
    display: none !important;
}

.logo:hover::after,
.logo:hover::before {
    display: none !important;
    width: 0 !important;
}

/* ============================================
   Hero Section
   ============================================ */

.hero {
    min-height: 600px;
    display: flex;
    align-items: center;
    margin-top: 4rem;
}

.hero-content {
    animation: slideInLeft 0.8s ease-out;
}

.hero-image {
    animation: slideInRight 0.8s ease-out;
}

@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-50px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(50px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* ============================================
   Features Section
   ============================================ */

.feature-card {
    padding: 2rem;
    background: #f9fafb;
    border-radius: 1rem;
    transition: all 0.3s ease;
}

.dark .feature-card {
    background: #1f2937;
}

.feature-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 25px rgba(0, 180, 100, 0.1);
}

.feature-icon {
    width: 3rem;
    height: 3rem;
    background: rgba(0, 180, 100, 0.1);
    border-radius: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1rem;
    transition: all 0.3s ease;
}

.feature-card:hover .feature-icon {
    background: rgba(0, 180, 100, 0.2);
    transform: scale(1.1);
}

/* ============================================
   Screenshots Gallery
   ============================================ */

.screenshot-card {
    border-radius: 1rem;
    overflow: hidden;
    transition: all 0.3s ease;
}

.screenshot-card:hover {
    box-shadow: 0 20px 40px rgba(0, 180, 100, 0.15);
    transform: translateY(-4px);
}

.screenshot-placeholder {
    width: 100%;
    aspect-ratio: 16 / 9;
    background: linear-gradient(135deg, #e5e7eb 0%, #f3f4f6 100%);
    display: flex;
    align-items: center;
    justify-content: center;
}

.dark .screenshot-placeholder {
    background: linear-gradient(135deg, #374151 0%, #4b5563 100%);
}

/* ============================================
   CTA Section
   ============================================ */

.cta-section {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
    position: relative;
    overflow: hidden;
}

.cta-section::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -10%;
    width: 400px;
    height: 400px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    animation: float 6s ease-in-out infinite;
}

.cta-section::after {
    content: '';
    position: absolute;
    bottom: -50%;
    left: -10%;
    width: 300px;
    height: 300px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    animation: float 8s ease-in-out infinite reverse;
}

@keyframes float {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(20px);
    }
}

.cta-content {
    position: relative;
    z-index: 1;
}

/* ============================================
   Footer
   ============================================ */

footer {
    border-top: 1px solid rgba(0, 180, 100, 0.1);
}

footer a {
    color: #9ca3af;
    transition: color 0.3s ease;
}

footer a:hover {
    color: var(--primary-color);
}

/* ============================================
   Animations & Keyframes
   ============================================ */

/* Section fade-in animation */
.observe-fade {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.observe-fade.animated {
    opacity: 1;
    transform: translateY(0);
}

/* Mobile menu slide animation */
@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideUp {
    from {
        opacity: 1;
        transform: translateY(0);
    }
    to {
        opacity: 0;
        transform: translateY(-20px);
    }
}

#mobile-menu {
    transition: all 0.15s ease;
}

#mobile-menu.animate-in {
    animation: slideDown 0.2s ease-out forwards;
}

/* Link underline animation */
@keyframes underlineExpand {
    from {
        width: 0;
    }
    to {
        width: 100%;
    }
}

nav a::after {
    transition: width 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* Smooth active state transition */
nav a {
    transition: color 0.3s ease, font-weight 0.2s ease;
}

/* ============================================
   Responsive Design
   ============================================ */

@media (max-width: 768px) {
    h1 {
        font-size: 2.25rem;
    }

    h2 {
        font-size: 1.875rem;
    }

    h3 {
        font-size: 1.5rem;
    }

    .hero {
        min-height: 400px;
        margin-top: 5rem;
    }

    .feature-card {
        padding: 1.5rem;
    }
}

@media (max-width: 480px) {
    h1 {
        font-size: 1.875rem;
    }

    h2 {
        font-size: 1.5rem;
    }

    h3 {
        font-size: 1.25rem;
    }

    .hero {
        min-height: 300px;
    }

    nav {
        padding: 0.5rem 0;
    }
}

/* ============================================
   Accessibility
   ============================================ */

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* ============================================
   Focus Styles
   ============================================ */

:focus-visible {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

button:focus-visible,
a:focus-visible {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
    border-radius: 0.25rem;
}

/* ============================================
   Utility Classes
   ============================================ */

.text-primary {
    color: var(--primary-color);
}

.text-primary-dark {
    color: var(--primary-dark);
}

.bg-primary {
    background-color: var(--primary-color);
}

.border-primary {
    border-color: var(--primary-color);
}

.shadow-lg {
    box-shadow: 0 20px 25px rgba(0, 0, 0, 0.1);
}

.shadow-2xl {
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.25);
}

/* Container max-width */
.container {
    max-width: 1280px;
    margin: 0 auto;
}

/* ============================================
   Animations
   ============================================ */

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.5;
    }
}

@keyframes bounce {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-10px);
    }
}

/* Animation classes */
.observe-fade {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.observe-fade.animated {
    opacity: 1;
    transform: translateY(0);
}

.animate-pulse {
    animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

.animate-bounce {
    animation: bounce 1s infinite;
}

.animate-fade-in-up {
    animation: fadeInUp 0.6s ease-out;
}

.animate-fade-in {
    animation: fadeIn 0.6s ease-out;
}

.animate-slide-in-left {
    animation: slideInLeft 0.6s ease-out;
}

.animate-slide-in-right {
    animation: slideInRight 0.6s ease-out;
}

.animate-float {
    animation: float 6s ease-in-out infinite;
}

@keyframes float {
    0%, 100% {
        transform: translateY(0px);
    }
    50% {
        transform: translateY(-20px);
    }
}

/* ============================================
   Print Styles
   ============================================ */

@media print {
    body {
        background: white;
        color: black;
    }

    nav,
    footer {
        display: none;
    }
}
