/*
Theme Name: Code Republic - BERNATZ Edition
Theme URI: https://coderepublic.dev
Author: Code Republic
Author URI: https://coderepublic.dev
Description: Bold, customizable WordPress theme with Advanced Theme Options Panel
Version: 2.0.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: coderepublic
Tags: portfolio, dark, responsive, custom-colors, custom-menu, featured-images, theme-options
*/

:root {
    --bg-primary: #EDF6F9;
    --bg-dark: #0a0a0a;
    --accent: #00D9FF;
    --text: #1a1a1a;
    --white: #ffffff;
    --text-light: #6B7280;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Helvetica Neue', sans-serif;
    line-height: 1.6;
    color: var(--text);
    background: var(--bg-primary);
    overflow-x: hidden;
}

.container {
    max-width: 1600px;
    margin: 0 auto;
    padding: 0 60px;
}

/* Header / Navigation */
.site-header {
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
    padding: 2rem 0;
    transition: all 0.4s ease;
    background: transparent;
}

.site-header.scrolled {
    background: rgba(10, 10, 10, 0.95);
    backdrop-filter: blur(20px);
    padding: 1.2rem 0;
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.3);
}

.site-header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.site-logo img,
.site-logo .custom-logo-link img {
    height: 45px;
    width: auto;
    transition: height 0.3s ease;
}

.site-header.scrolled .site-logo img {
    height: 40px;
}

.main-navigation ul {
    list-style: none;
    display: flex;
    gap: 3rem;
    margin: 0;
}

.main-navigation li {
    position: relative;
}

.main-navigation a {
    color: var(--white);
    text-decoration: none;
    font-weight: 500;
    font-size: 0.95rem;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    transition: all 0.3s ease;
    position: relative;
}

.main-navigation a::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--accent);
    transition: width 0.3s ease;
}

.main-navigation a:hover::after,
.main-navigation .current-menu-item > a::after {
    width: 100%;
}

/* Dropdown Menu */
.main-navigation ul ul {
    position: absolute;
    top: 100%;
    left: 0;
    background: var(--bg-dark);
    min-width: 220px;
    padding: 1rem 0;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s ease;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.main-navigation li:hover > ul {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.main-navigation ul ul li {
    display: block;
}

.main-navigation ul ul a {
    display: block;
    padding: 0.8rem 1.5rem;
    font-size: 0.9rem;
}

.main-navigation ul ul a:hover {
    background: rgba(0, 217, 255, 0.1);
    padding-left: 2rem;
}

/* Hero Slider */
.hero-slider {
    position: relative;
    height: 100vh;
    overflow: hidden;
    background: var(--bg-dark);
}

.hero-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 1.5s ease;
}

.hero-slide.active {
    opacity: 1;
    z-index: 1;
}

.hero-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.4;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(10, 10, 10, 0.8) 0%, rgba(10, 10, 10, 0.4) 100%);
    z-index: 2;
}

.hero-content {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 3;
    text-align: center;
    color: var(--white);
    max-width: 1200px;
    padding: 0 40px;
    width: 100%;
}

.hero-content h1 {
    font-size: clamp(3rem, 8vw, 8rem);
    font-weight: 900;
    line-height: 1;
    margin-bottom: 2rem;
    letter-spacing: -2px;
    text-transform: uppercase;
    animation: fadeInUp 1s ease;
}

.hero-content .highlight {
    color: var(--accent);
    display: block;
}

.hero-content p {
    font-size: clamp(1.2rem, 2vw, 1.8rem);
    margin-bottom: 3rem;
    font-weight: 300;
    letter-spacing: 1px;
    opacity: 0.9;
    animation: fadeInUp 1s ease 0.2s backwards;
}

.hero-cta {
    display: inline-flex;
    align-items: center;
    gap: 15px;
    padding: 20px 50px;
    background: var(--accent);
    color: var(--bg-dark);
    text-decoration: none;
    font-weight: 700;
    font-size: 1.1rem;
    letter-spacing: 1px;
    text-transform: uppercase;
    transition: all 0.4s ease;
    border: 2px solid var(--accent);
    animation: fadeInUp 1s ease 0.4s backwards;
}

.hero-cta:hover {
    background: transparent;
    color: var(--accent);
    transform: translateY(-3px);
    box-shadow: 0 10px 40px rgba(0, 217, 255, 0.3);
}

.slider-controls {
    position: absolute;
    bottom: 40px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 4;
    display: flex;
    gap: 15px;
}

.slider-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    border: 2px solid var(--white);
    cursor: pointer;
    transition: all 0.3s ease;
}

.slider-dot.active {
    background: var(--accent);
    border-color: var(--accent);
    transform: scale(1.2);
}

/* Sections */
.section {
    padding: 140px 60px;
    position: relative;
}

.section-dark {
    background: var(--bg-dark);
    color: var(--white);
}

.section-light {
    background: var(--bg-primary);
    color: var(--text);
}

.section-header {
    text-align: center;
    margin-bottom: 6rem;
}

.section-label {
    color: var(--accent);
    font-size: 0.9rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 3px;
    margin-bottom: 1.5rem;
}

.section-title {
    font-size: clamp(2.5rem, 5vw, 5rem);
    font-weight: 900;
    line-height: 1.1;
    margin-bottom: 2rem;
    letter-spacing: -1px;
}

.section-subtitle {
    font-size: 1.3rem;
    font-weight: 300;
    max-width: 800px;
    margin: 0 auto;
    opacity: 0.8;
}

/* Stats Grid */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 4rem;
    text-align: center;
}

.stat-item {
    padding: 3rem 2rem;
}

.stat-number {
    font-size: 5rem;
    font-weight: 900;
    color: var(--accent);
    line-height: 1;
    margin-bottom: 1rem;
}

.stat-label {
    font-size: 1.2rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    opacity: 0.8;
}

/* Services / Cards Grid */
.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(380px, 1fr));
    gap: 4rem;
}

.service-card {
    position: relative;
    padding: 4rem 3rem;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: all 0.4s ease;
    overflow: hidden;
}

.section-light .service-card {
    background: var(--white);
    border-color: rgba(0, 0, 0, 0.1);
}

.service-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: var(--accent);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.4s ease;
}

.service-card:hover::before {
    transform: scaleX(1);
}

.service-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.3);
}

.section-dark .service-card:hover {
    background: rgba(255, 255, 255, 0.05);
}

.section-light .service-card:hover {
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.1);
}

.service-number {
    font-size: 5rem;
    font-weight: 900;
    color: var(--accent);
    opacity: 0.2;
    line-height: 1;
    margin-bottom: 2rem;
}

.service-card h3 {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
}

.section-dark .service-card h3 {
    color: var(--white);
}

.section-light .service-card h3 {
    color: var(--text);
}

.service-card p {
    font-size: 1.1rem;
    line-height: 1.8;
    opacity: 0.8;
}

.service-link {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    margin-top: 1.5rem;
    color: var(--accent);
    text-decoration: none;
    font-weight: 600;
    transition: gap 0.3s ease;
}

.service-link:hover {
    gap: 15px;
}

/* Portfolio Grid */
.portfolio-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(500px, 1fr));
    gap: 3rem;
}

.portfolio-grid.columns-2 {
    grid-template-columns: repeat(2, 1fr);
}

.portfolio-grid.columns-3 {
    grid-template-columns: repeat(3, 1fr);
}

.portfolio-item {
    position: relative;
    height: 600px;
    overflow: hidden;
    cursor: pointer;
    background: var(--bg-dark);
}

.portfolio-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: all 0.6s ease;
}

.portfolio-item:hover .portfolio-image {
    transform: scale(1.1);
}

.portfolio-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to top, rgba(10, 10, 10, 0.9) 0%, transparent 60%);
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: 3rem;
    opacity: 0;
    transition: opacity 0.4s ease;
}

.portfolio-item:hover .portfolio-overlay {
    opacity: 1;
}

.portfolio-category {
    color: var(--accent);
    font-size: 0.85rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 2px;
    margin-bottom: 1rem;
}

.portfolio-overlay h3 {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--white);
    margin-bottom: 1rem;
}

.portfolio-overlay p {
    color: var(--white);
    opacity: 0.8;
    font-size: 1.1rem;
}

/* Plugin Cards */
.plugin-card {
    background: var(--white);
    border: 1px solid rgba(0, 0, 0, 0.1);
    overflow: hidden;
    transition: all 0.4s ease;
}

.plugin-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.1);
}

.plugin-image {
    width: 100%;
    height: 300px;
    object-fit: cover;
}

.plugin-content {
    padding: 2.5rem;
}

.plugin-content h3 {
    font-size: 2rem;
    margin-bottom: 1rem;
    color: var(--text);
}

.plugin-price {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--accent);
    margin: 1.5rem 0;
}

.plugin-features {
    list-style: none;
    margin: 1.5rem 0;
}

.plugin-features li {
    padding: 0.5rem 0;
    padding-left: 1.5rem;
    position: relative;
}

.plugin-features li::before {
    content: '✓';
    position: absolute;
    left: 0;
    color: var(--accent);
    font-weight: 700;
}

.plugin-buttons {
    display: flex;
    gap: 1rem;
    margin-top: 2rem;
}

.btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 15px 30px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
    text-transform: uppercase;
    font-size: 0.9rem;
}

.btn-primary {
    background: var(--accent);
    color: var(--bg-dark);
    border: 2px solid var(--accent);
}

.btn-primary:hover {
    background: transparent;
    color: var(--accent);
}

.btn-secondary {
    background: transparent;
    color: var(--text);
    border: 2px solid rgba(0, 0, 0, 0.2);
}

.btn-secondary:hover {
    border-color: var(--accent);
    color: var(--accent);
}

/* Contact Form */
.contact-form {
    max-width: 900px;
    margin: 4rem auto 0;
}

.form-group {
    margin-bottom: 2.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 1rem;
    font-weight: 700;
    font-size: 1rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 20px;
    border: 2px solid rgba(255, 255, 255, 0.1);
    font-size: 1rem;
    transition: all 0.3s;
    font-family: inherit;
}

.section-dark .form-group input,
.section-dark .form-group textarea {
    background: rgba(255, 255, 255, 0.05);
    color: var(--white);
}

.section-light .form-group input,
.section-light .form-group textarea {
    background: var(--white);
    border-color: rgba(0, 0, 0, 0.1);
    color: var(--text);
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--accent);
}

.form-group textarea {
    resize: vertical;
    min-height: 150px;
}

.submit-button {
    background: var(--accent);
    color: var(--bg-dark);
    padding: 20px 60px;
    border: 2px solid var(--accent);
    font-size: 1.1rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.4s;
    text-transform: uppercase;
    letter-spacing: 1px;
    width: 100%;
}

.submit-button:hover {
    background: transparent;
    color: var(--accent);
    transform: translateY(-3px);
}

.form-message {
    margin-top: 1.5rem;
    padding: 1rem;
    border-radius: 4px;
    display: none;
}

.form-message.success {
    background: rgba(0, 217, 255, 0.1);
    border: 2px solid var(--accent);
    color: var(--accent);
}

.form-message.error {
    background: rgba(255, 0, 0, 0.1);
    border: 2px solid #ff0000;
    color: #ff0000;
}

/* Footer */
.site-footer {
    background: var(--bg-dark);
    color: var(--white);
    padding: 4rem 60px 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-content {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 4rem;
    margin-bottom: 3rem;
}

.footer-about h3 {
    margin-bottom: 1rem;
    font-size: 1.5rem;
}

.footer-about p {
    opacity: 0.7;
    line-height: 1.8;
}

.footer-links h4,
.footer-social h4 {
    margin-bottom: 1.5rem;
    font-size: 1.2rem;
}

.footer-links ul {
    list-style: none;
}

.footer-links a {
    color: var(--white);
    text-decoration: none;
    opacity: 0.7;
    transition: all 0.3s;
    display: block;
    margin-bottom: 0.8rem;
}

.footer-links a:hover {
    opacity: 1;
    color: var(--accent);
    padding-left: 5px;
}

.social-icons {
    display: flex;
    gap: 1.5rem;
}

.social-icons a {
    color: var(--white);
    font-size: 1.5rem;
    opacity: 0.7;
    transition: all 0.3s;
    text-decoration: none;
}

.social-icons a:hover {
    opacity: 1;
    color: var(--accent);
    transform: translateY(-3px);
}

.footer-bottom {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    opacity: 0.6;
    font-size: 0.9rem;
}

/* Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(40px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in {
    opacity: 0;
    transition: opacity 0.8s ease, transform 0.8s ease;
}

.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Maintenance Mode */
.maintenance-mode {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    background: var(--bg-dark);
    color: var(--white);
    text-align: center;
    padding: 40px;
}

.maintenance-content h1 {
    font-size: 4rem;
    margin-bottom: 2rem;
    color: var(--accent);
}

.maintenance-content p {
    font-size: 1.5rem;
    opacity: 0.8;
}

/* Responsive */
@media (max-width: 1200px) {
    .portfolio-grid,
    .portfolio-grid.columns-2,
    .portfolio-grid.columns-3 {
        grid-template-columns: 1fr;
    }
    
    .services-grid {
        grid-template-columns: 1fr;
    }
    
    .footer-content {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .container,
    .section {
        padding-left: 30px;
        padding-right: 30px;
    }

    .main-navigation ul {
        gap: 1.5rem;
        font-size: 0.8rem;
    }

    .hero-content h1 {
        font-size: 3rem;
    }

    .section-title {
        font-size: 2.5rem;
    }

    .portfolio-item {
        height: 400px;
    }

    .service-card h3 {
        font-size: 2rem;
    }
    
    .stat-number {
        font-size: 3.5rem;
    }
    
    .plugin-buttons {
        flex-direction: column;
    }
}