/* Reset & Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    /* CTM-COM Firmenfarben */
    --primary-color: #F26C00; /* CTM-COM Orange */
    --primary-dark: #D45D00;
    --secondary-color: #1a1a2e; /* Dunkles Navy */
    --accent-color: #FF8C33; /* Helles Orange Accent */
    --dark-bg: #0f172a; /* Deep Navy */
    --dark-card: #1e293b;
    --light-bg: #f8fafc;
    --text-dark: #0f172a;
    --text-light: #64748b;
    --white: #ffffff;
    --gradient-primary: linear-gradient(135deg, #F26C00 0%, #FF8C33 100%);
    --gradient-secondary: linear-gradient(135deg, #F26C00 0%, #D45D00 100%);
    --gradient-dark: linear-gradient(135deg, #1a1a2e 0%, #2d1b4e 100%);
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    line-height: 1.6;
    color: var(--text-dark);
    overflow-x: hidden;
}

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

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

/* ==================== Header / Navigation ==================== */
header {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    box-shadow: 0 2px 20px rgba(0,0,0,0.08);
    position: sticky;
    top: 0;
    z-index: 100;
}

.navbar {
    padding: 1rem 0;
}

.navbar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo h1 {
    color: var(--primary-color);
    font-size: 1.8rem;
    font-weight: 700;
}

.logo .tagline {
    color: var(--text-light);
    font-size: 0.9rem;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 2rem;
}

.nav-menu a {
    text-decoration: none;
    color: var(--text-dark);
    font-weight: 500;
    transition: all 0.3s;
    padding: 0.5rem 1rem;
    border-radius: 8px;
}

.nav-menu a:hover,
.nav-menu a.active {
    color: var(--primary-color);
    background: rgba(242, 108, 0, 0.1);
}

/* Hamburger Menu */
.hamburger {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 5px;
    z-index: 110;
}

.hamburger span {
    display: block;
    width: 28px;
    height: 3px;
    background: var(--text-dark);
    border-radius: 3px;
    transition: all 0.3s;
}

.hamburger.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 6px);
}

.hamburger.active span:nth-child(2) {
    opacity: 0;
}

.hamburger.active span:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -6px);
}

/* ==================== Hero Section ==================== */
.hero {
    background: var(--dark-bg);
    color: var(--white);
    padding: 6rem 0;
    display: flex;
    align-items: center;
    min-height: 700px;
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--gradient-primary);
    opacity: 0.1;
    z-index: 0;
}

.hero .container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    align-items: center;
    position: relative;
    z-index: 1;
}

.hero-content {
    padding-left: 5%;
}

.hero-content h1 {
    font-size: 3.5rem;
    margin-bottom: 1.5rem;
    line-height: 1.1;
    font-weight: 800;
    background: linear-gradient(135deg, #ffffff 0%, #FFB366 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-content p {
    font-size: 1.4rem;
    margin-bottom: 2.5rem;
    opacity: 0.9;
    color: #cbd5e1;
}

.btn-primary {
    display: inline-block;
    background: var(--gradient-primary);
    color: var(--white);
    padding: 1rem 2.5rem;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 600;
    transition: transform 0.3s, box-shadow 0.3s;
    box-shadow: 0 10px 30px rgba(242, 108, 0, 0.3);
    position: relative;
    overflow: hidden;
}

.btn-primary::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;
}

.btn-primary:hover::before {
    left: 100%;
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 15px 40px rgba(242, 108, 0, 0.4);
}

.animated-svg {
    width: 100%;
    height: auto;
    max-width: 500px;
    filter: drop-shadow(0 10px 30px rgba(242, 108, 0, 0.3));
    transition: transform 0.3s;
}

.animated-svg:hover {
    transform: scale(1.05);
}

.hero-image {
    display: flex;
    align-items: center;
    justify-content: center;
}

.about-image {
    display: flex;
    align-items: center;
    justify-content: center;
}

.image-placeholder {
    background: rgba(255,255,255,0.05);
    backdrop-filter: blur(10px);
    border: 2px dashed rgba(242, 108, 0, 0.5);
    border-radius: 20px;
    padding: 4rem 2rem;
    text-align: center;
    font-size: 1.5rem;
    color: var(--white);
    min-height: 400px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
}

/* ==================== Services Section ==================== */
.services {
    padding: 5rem 0;
    background: var(--light-bg);
}

.services h2 {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 3rem;
    color: var(--text-dark);
}

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

.service-card {
    background: var(--white);
    padding: 2.5rem;
    border-radius: 20px;
    text-align: center;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
    border: 1px solid rgba(242, 108, 0, 0.1);
    position: relative;
    overflow: hidden;
    cursor: pointer;
}

.service-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--gradient-primary);
    transform: scaleX(0);
    transition: transform 0.4s;
}

.service-card:hover::before {
    transform: scaleX(1);
}

.service-card:hover {
    transform: translateY(-10px) scale(1.02);
    box-shadow: 0 20px 40px rgba(242, 108, 0, 0.15);
    border-color: var(--primary-color);
}

.service-icon {
    font-size: 3.5rem;
    margin-bottom: 1.5rem;
    filter: drop-shadow(0 4px 12px rgba(242, 108, 0, 0.3));
    transition: transform 0.3s;
}

.service-card:hover .service-icon {
    transform: scale(1.1) rotate(5deg);
}

.service-card h3 {
    color: var(--primary-color);
    margin-bottom: 1rem;
    font-size: 1.3rem;
}

.service-card p {
    color: var(--text-light);
    line-height: 1.6;
}

/* Learn More Link */
.learn-more {
    display: inline-block;
    margin-top: 1rem;
    color: var(--primary-color);
    font-weight: 600;
    font-size: 0.95rem;
    transition: all 0.3s;
}

.service-card:hover .learn-more {
    transform: translateX(5px);
}

/* ==================== About Section ==================== */
.about {
    padding: 5rem 0;
}

.about-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
}

.about h2 {
    font-size: 2.5rem;
    margin-bottom: 1.5rem;
    color: var(--text-dark);
}

.about p {
    color: var(--text-light);
    margin-bottom: 1.5rem;
    font-size: 1.1rem;
}

.stats {
    display: flex;
    gap: 2rem;
    margin-top: 2rem;
}

.stat {
    text-align: center;
}

.stat h3 {
    font-size: 3rem;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 0.5rem;
    font-weight: 800;
}

.stat p {
    color: var(--text-light);
    font-size: 0.9rem;
}

.about-image .animated-svg {
    filter: drop-shadow(0 8px 25px rgba(242, 108, 0, 0.2));
}

.about-image .image-placeholder {
    background: linear-gradient(135deg, rgba(242, 108, 0, 0.1), rgba(255, 140, 51, 0.1));
    border-color: var(--primary-color);
    color: var(--primary-color);
    backdrop-filter: blur(0);
}

/* ==================== Contact Section ==================== */
.contact {
    padding: 5rem 0;
    background: var(--light-bg);
}

.contact h2 {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 3rem;
    color: var(--text-dark);
}

.contact-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
}

.contact-info h3 {
    font-size: 1.5rem;
    margin-bottom: 2rem;
    color: var(--primary-color);
}

.contact-item {
    display: flex;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.contact-item .icon {
    font-size: 1.5rem;
}

.contact-item strong {
    display: block;
    color: var(--text-dark);
    margin-bottom: 0.3rem;
}

.contact-item p {
    color: var(--text-light);
}

.contact-item a {
    color: var(--primary-color);
    text-decoration: none;
}

.contact-item a:hover {
    text-decoration: underline;
}

/* Contact Form */
.contact-form form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.form-group {
    display: flex;
    flex-direction: column;
}

.contact-form input,
.contact-form textarea {
    padding: 1rem;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    font-size: 1rem;
    font-family: inherit;
    transition: border-color 0.3s, box-shadow 0.3s;
}

.contact-form input:focus,
.contact-form textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(242, 108, 0, 0.15);
}

.contact-form input.error,
.contact-form textarea.error {
    border-color: var(--accent-color);
}

.form-error {
    color: var(--accent-color);
    font-size: 0.85rem;
    margin-top: 0.3rem;
    min-height: 1.2em;
}

.form-success {
    background: rgba(34, 197, 94, 0.1);
    color: #16a34a;
    padding: 1rem;
    border-radius: 8px;
    text-align: center;
    font-weight: 500;
    margin-top: 0.5rem;
}

.contact-form button {
    cursor: pointer;
    border: none;
    font-size: 1rem;
}

/* ==================== Footer ==================== */
footer {
    background: var(--dark-bg);
    color: var(--white);
    padding: 3rem 0;
    text-align: center;
    position: relative;
}

footer::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: var(--gradient-primary);
}

footer .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.footer-links {
    display: flex;
    gap: 2rem;
}

.footer-links a {
    color: var(--white);
    text-decoration: none;
    opacity: 0.8;
    transition: opacity 0.3s;
}

.footer-links a:hover {
    opacity: 1;
}

/* ==================== Scroll to Top Button ==================== */
.scroll-top-btn {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: var(--gradient-primary);
    color: var(--white);
    border: none;
    font-size: 1.4rem;
    cursor: pointer;
    z-index: 90;
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px);
    transition: all 0.3s;
    box-shadow: 0 4px 15px rgba(242, 108, 0, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
}

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

.scroll-top-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(242, 108, 0, 0.4);
}

/* ==================== Section Animations ==================== */
.fade-in {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

/* ==================== Responsive Design ==================== */
/* ==========================================
   TABLET (768px - 1024px)
   ========================================== */
@media (max-width: 1024px) and (min-width: 769px) {
    .container {
        padding: 0 2rem;
    }

    /* Hero */
    .hero .container {
        grid-template-columns: 1fr 1fr;
        gap: 2rem;
    }

    .hero-content {
        padding-left: 2%;
    }

    .hero-content h1 {
        font-size: 2.5rem;
    }

    /* Service Grid - 2 Spalten auf Tablet */
    .service-grid {
        grid-template-columns: 1fr 1fr;
        gap: 1.5rem;
    }

    .service-card {
        padding: 2rem 1.5rem;
    }

    /* About */
    .about-content {
        grid-template-columns: 1fr 1fr;
        gap: 2rem;
    }

    .about-text h2 {
        font-size: 2rem;
    }

    /* Stats */
    .stats {
        gap: 1.5rem;
    }

    .stat h3 {
        font-size: 2.5rem;
    }

    /* Contact */
    .contact-content {
        grid-template-columns: 1fr 1fr;
        gap: 2rem;
    }

    /* Section titles */
    .services h2,
    .about h2,
    .contact h2 {
        font-size: 2.2rem;
    }
}

/* ==========================================
   MOBILE (max-width: 768px)
   ========================================== */
@media (max-width: 768px) {
    /* Hamburger visible */
    .hamburger {
        display: flex;
    }

    .nav-menu {
        position: fixed;
        top: 0;
        right: -100%;
        width: 280px;
        height: 100vh;
        background: var(--white);
        flex-direction: column;
        padding: 5rem 2rem 2rem;
        gap: 0.5rem;
        box-shadow: -5px 0 30px rgba(0,0,0,0.15);
        transition: right 0.3s ease;
        z-index: 105;
    }

    .nav-menu.active {
        right: 0;
    }

    .nav-menu a {
        display: block;
        padding: 1rem 1.2rem;
        font-size: 1.1rem;
        border-bottom: 1px solid rgba(0,0,0,0.05);
    }

    .nav-menu a:hover,
    .nav-menu a.active {
        color: var(--primary-color);
        background: rgba(242, 108, 0, 0.05);
        border-radius: 8px;
    }

    /* Container */
    .container {
        padding: 0 1.2rem;
    }

    /* Hero */
    .hero {
        min-height: auto;
        padding: 3rem 0 4rem;
    }

    .hero::before {
        opacity: 0.05;
    }

    .hero .container {
        grid-template-columns: 1fr;
        text-align: center;
        gap: 2rem;
    }

    .hero-content {
        padding-left: 0;
        order: 1;
    }

    .hero-image {
        order: 2;
        max-width: 300px;
        margin: 0 auto;
    }

    .hero-content h1 {
        font-size: 2rem;
        line-height: 1.2;
    }

    .hero-content p {
        font-size: 1.05rem;
        margin-bottom: 1.5rem;
    }

    .btn-primary {
        display: inline-block;
        padding: 0.9rem 2rem;
        font-size: 1rem;
        width: auto;
    }

    /* Section titles */
    .services h2,
    .about h2,
    .contact h2 {
        font-size: 1.8rem;
        margin-bottom: 2rem;
    }

    /* Service Grid - 1 Spalte */
    .service-grid {
        grid-template-columns: 1fr;
        gap: 1.2rem;
    }

    .service-card {
        padding: 1.8rem 1.5rem;
    }

    .service-card h3 {
        font-size: 1.2rem;
    }

    .service-icon {
        font-size: 2.5rem;
    }

    .learn-more {
        font-size: 0.85rem;
    }

    /* About */
    .about {
        padding: 4rem 0;
    }

    .about-content {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .about-image {
        order: -1;
        max-width: 250px;
        margin: 0 auto;
    }

    .about-text h2 {
        font-size: 1.8rem;
        text-align: center;
    }

    .about-text p {
        text-align: center;
    }

    /* Stats */
    .stats {
        flex-direction: row;
        flex-wrap: wrap;
        justify-content: center;
        gap: 1.2rem;
    }

    .stat {
        min-width: 120px;
        text-align: center;
    }

    .stat h3 {
        font-size: 2.2rem;
    }

    .stat p {
        font-size: 0.85rem;
    }

    /* Contact */
    .contact {
        padding: 4rem 0;
    }

    .contact-content {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .contact-info {
        text-align: center;
    }

    .contact-item {
        justify-content: center;
    }

    .contact-form form {
        padding: 0;
    }

    .contact-form input,
    .contact-form textarea {
        font-size: 1rem;
        padding: 0.9rem 1rem;
    }

    .contact-form button {
        width: 100%;
        padding: 1rem;
        font-size: 1.05rem;
    }

    /* Footer */
    footer {
        padding: 2rem 0;
    }

    footer .container {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }

    .footer-links {
        justify-content: center;
    }

    /* Scroll to top */
    .scroll-top {
        bottom: 20px;
        right: 20px;
        width: 44px;
        height: 44px;
    }

    /* Sections padding */
    .services,
    .about,
    .contact {
        padding: 4rem 0;
    }
}

/* ==========================================
   SMALL MOBILE (max-width: 480px)
   ========================================== */
@media (max-width: 480px) {
    .hero {
        padding: 2.5rem 0 3rem;
    }

    .hero-content h1 {
        font-size: 1.6rem;
    }

    .hero-content p {
        font-size: 0.95rem;
    }

    .services h2,
    .about h2,
    .contact h2 {
        font-size: 1.5rem;
    }

    .stat h3 {
        font-size: 1.8rem;
    }

    .stats {
        flex-direction: column;
        align-items: center;
    }

    .service-card {
        padding: 1.5rem 1.2rem;
    }

    .service-icon {
        font-size: 2rem;
    }

    .service-card h3 {
        font-size: 1.1rem;
    }

    .service-card p {
        font-size: 0.9rem;
    }

    /* Logo */
    .logo h1 {
        font-size: 1.3rem;
    }

    .tagline {
        font-size: 0.7rem;
    }

    /* Navbar */
    .navbar {
        padding: 0.8rem 0;
    }

    /* Contact items stacked */
    .contact-item {
        flex-direction: column;
        text-align: center;
        gap: 0.3rem;
    }

    /* Hero image smaller */
    .hero-image {
        max-width: 220px;
    }

    /* About image smaller */
    .about-image {
        max-width: 200px;
    }

    .btn-primary {
        padding: 0.8rem 1.5rem;
        font-size: 0.95rem;
    }
}

/* ==========================================
   LANDSCAPE MOBILE
   ========================================== */
@media (max-height: 500px) and (orientation: landscape) {
    .hero {
        min-height: auto;
        padding: 2rem 0;
    }

    .hero .container {
        grid-template-columns: 1fr 1fr;
    }

    .hero-content h1 {
        font-size: 1.5rem;
    }

    .hero-image {
        max-width: 200px;
    }
}
