/* Shared Styles for PainterAdam Website */

:root {
    /* Light Mode Variables */
    --bg-primary: #ffffff;
    --bg-secondary: #f8f9fa;
    --bg-hero: linear-gradient(135deg, #87CEEB 0%, #B8E0F5 100%);
    --text-primary: #000000;
    --text-secondary: #333333;
    --text-muted: #666666;
    --accent-blue: #3899EC;
    --accent-blue-hover: #2680D1;
    --card-bg: #ffffff;
    --shadow: rgba(0,0,0,0.1);
    --border: #e1e5e9;
}

[data-theme="dark"] {
    /* Dark Mode Variables */
    --bg-primary: #1a1a1a;
    --bg-secondary: #2d2d2d;
    --bg-hero: linear-gradient(135deg, #1e3a8a 0%, #3b82f6 100%);
    --text-primary: #ffffff;
    --text-secondary: #e5e5e5;
    --text-muted: #a0a0a0;
    --accent-blue: #60a5fa;
    --accent-blue-hover: #3b82f6;
    --card-bg: #2d2d2d;
    --shadow: rgba(255,255,255,0.1);
    --border: #404040;
}

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

body {
    font-family: 'Poppins', sans-serif;
    line-height: 1.6;
    color: var(--text-primary);
    background-color: var(--bg-primary);
    transition: all 0.3s ease;
}

/* Header Styles */
.header {
    background: var(--bg-primary);
    padding: 20px 0;
    box-shadow: 0 2px 10px var(--shadow);
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
    border-bottom: 1px solid var(--border);
    transition: all 0.3s ease;
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 20px;
}

.logo {
    text-decoration: none;
    transition: all 0.3s ease;
    display: inline-block;
}

.logo img {
    height: 40px;
    width: auto;
    object-fit: contain;
    transition: all 0.3s ease;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 40px;
}

.nav-link {
    text-decoration: none;
    color: var(--text-secondary);
    font-weight: 300;
    transition: color 0.3s;
    position: relative;
}

.nav-link:hover,
.nav-link.active {
    color: var(--accent-blue);
}

.nav-link.active::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 100%;
    height: 2px;
    background: var(--accent-blue);
}

.cta-button {
    background: var(--accent-blue);
    color: white;
    padding: 12px 24px;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 400;
    transition: all 0.3s;
}

.cta-button:hover {
    background: var(--accent-blue-hover);
    transform: translateY(-2px);
}

/* Theme Toggle */
.theme-toggle {
    background: none;
    border: 2px solid var(--border);
    border-radius: 50px;
    padding: 8px 12px;
    cursor: pointer;
    color: var(--text-primary);
    transition: all 0.3s ease;
    margin-left: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
}

.theme-toggle:hover {
    border-color: var(--accent-blue);
    color: var(--accent-blue);
}

.theme-toggle i {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
}

/* Mobile Menu */
.mobile-menu-btn {
    display: none;
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: var(--text-primary);
}

/* Page Content */
.page-content {
    padding-top: 100px;
    min-height: 100vh;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Section Styles */
.section {
    padding: 80px 0;
}

.section-title {
    font-size: 48px;
    font-weight: 200;
    text-align: center;
    margin-bottom: 60px;
    color: var(--text-primary);
}

.section-subtitle {
    font-size: 20px;
    text-align: center;
    color: var(--text-muted);
    margin-bottom: 60px;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

/* Card Styles */
.card {
    background: var(--card-bg);
    border-radius: 20px;
    padding: 30px;
    box-shadow: 0 10px 30px var(--shadow);
    transition: all 0.3s ease;
    border: 1px solid var(--border);
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 40px var(--shadow);
}

/* Button Styles */
.btn {
    display: inline-block;
    padding: 15px 30px;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 400;
    text-align: center;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
    font-family: inherit;
}

.btn-primary {
    background: var(--accent-blue);
    color: white;
}

.btn-primary:hover {
    background: var(--accent-blue-hover);
    transform: translateY(-2px);
}

.btn-outline {
    background: transparent;
    color: var(--accent-blue);
    border: 2px solid var(--accent-blue);
}

.btn-outline:hover {
    background: var(--accent-blue);
    color: white;
}

/* Grid Layouts */
.grid {
    display: grid;
    gap: 30px;
}

.grid-2 {
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
}

.grid-3 {
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
}

.grid-4 {
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
}

/* Footer */
.footer {
    background: var(--bg-primary);
    color: var(--text-primary);
    padding: 60px 0;
    border-top: 1px solid var(--border);
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 40px;
}

.footer-section h3 {
    font-size: 20px;
    margin-bottom: 20px;
    color: var(--text-primary);
}

.footer-section p,
.footer-section a {
    color: var(--text-muted);
    text-decoration: none;
    margin-bottom: 10px;
    display: block;
    transition: color 0.3s ease;
}

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

/* Form Styles */
.form-group {
    margin-bottom: 20px;
}

.form-label {
    display: block;
    margin-bottom: 5px;
    color: var(--text-secondary);
    font-weight: 500;
}

.form-input {
    width: 100%;
    padding: 15px;
    border: 2px solid var(--border);
    border-radius: 10px;
    background: var(--bg-primary);
    color: var(--text-primary);
    font-family: inherit;
    transition: border-color 0.3s ease;
}

.form-input:focus {
    outline: none;
    border-color: var(--accent-blue);
}

.form-textarea {
    resize: vertical;
    min-height: 120px;
}

/* Scroll to Top Button */
.scroll-to-top {
    position: fixed;
    bottom: 40px;
    right: 60px;
    width: 56px;
    height: 56px;
    background: var(--accent-blue);
    color: white;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    box-shadow: 
        0 8px 25px rgba(56, 153, 236, 0.25),
        0 4px 10px rgba(0, 0, 0, 0.1),
        0 1px 3px rgba(0, 0, 0, 0.1);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px) scale(0.8);
    z-index: 1000;
    backdrop-filter: blur(10px);
}

[data-theme="dark"] .scroll-to-top {
    box-shadow: 
        0 8px 25px rgba(96, 165, 250, 0.3),
        0 4px 10px rgba(0, 0, 0, 0.3),
        0 1px 3px rgba(0, 0, 0, 0.2);
}

.scroll-to-top.visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0) scale(1);
}

.scroll-to-top:hover {
    background: var(--accent-blue-hover);
    transform: translateY(-6px) scale(1.05);
    box-shadow: 
        0 12px 35px rgba(56, 153, 236, 0.35),
        0 8px 15px rgba(0, 0, 0, 0.15),
        0 2px 5px rgba(0, 0, 0, 0.1);
}

[data-theme="dark"] .scroll-to-top:hover {
    box-shadow: 
        0 12px 35px rgba(96, 165, 250, 0.4),
        0 8px 15px rgba(0, 0, 0, 0.4),
        0 2px 5px rgba(0, 0, 0, 0.3);
}

.scroll-to-top:focus {
    outline: none;
    box-shadow: 
        0 0 0 3px rgba(56, 153, 236, 0.5),
        0 8px 25px rgba(56, 153, 236, 0.25),
        0 4px 10px rgba(0, 0, 0, 0.1);
}

.scroll-to-top:active {
    transform: translateY(-4px) scale(0.98);
    transition: all 0.1s ease;
}

.scroll-to-top i {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 26px;
    height: 26px;
    transition: transform 0.3s ease;
}

.scroll-to-top:hover i {
    transform: translateY(-1px);
}

/* Respect reduced motion preferences */
@media (prefers-reduced-motion: reduce) {
    .scroll-to-top {
        transition: opacity 0.3s ease, visibility 0.3s ease;
        transform: none;
    }
    
    .scroll-to-top.visible {
        transform: none;
    }
    
    .scroll-to-top:hover {
        transform: none;
    }
    
    .scroll-to-top:active {
        transform: none;
    }
}

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

.animate-fade-in-up {
    animation: fadeInUp 0.6s ease forwards;
}

/* Responsive Design */
@media (max-width: 768px) {
    .nav-menu {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background: var(--bg-primary);
        flex-direction: column;
        padding: 20px;
        box-shadow: 0 5px 15px var(--shadow);
    }

    .nav-menu.active {
        display: flex;
    }

    .mobile-menu-btn {
        display: block;
    }

    .section-title {
        font-size: 36px;
    }

    .grid-2,
    .grid-3,
    .grid-4 {
        grid-template-columns: 1fr;
    }

    .nav-container {
        padding: 0 15px;
    }

    .theme-toggle {
        margin-left: 10px;
        margin-right: 10px;
    }

    .scroll-to-top {
        bottom: 25px;
        right: 25px;
        width: 52px;
        height: 52px;
        font-size: 20px;
    }
    
    .scroll-to-top i {
        width: 24px;
        height: 24px;
    }
}

/* Tablet adjustments */
@media (max-width: 1024px) and (min-width: 769px) {
    .scroll-to-top {
        bottom: 35px;
        right: 45px;
        width: 54px;
        height: 54px;
    }
}

@media (max-width: 480px) {
    .section-title {
        font-size: 28px;
    }

    .logo img {
        height: 32px;
    }

    .nav-menu {
        gap: 20px;
    }
    
    .scroll-to-top {
        bottom: 20px;
        right: 20px;
        width: 48px;
        height: 48px;
        font-size: 18px;
        /* Ensure minimum touch target size for accessibility */
        min-width: 48px;
        min-height: 48px;
    }
    
    .scroll-to-top i {
        width: 22px;
        height: 22px;
    }
}