/*
Theme Name: APM Electronic
Theme URI: https://apm-electronic.de/
Description: Custom WordPress theme for APM Electronic - A professional corporate theme for an electronic engineering company with 30 years of experience.
Version: 1.0.0
Author: APM Electronic
Author URI: https://apm-electronic.de/
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: apm-electronic
Tags: custom-logo, custom-menu, featured-images, threaded-comments, translation-ready

Different-Personal-Together - APM Electronic Corporate Theme
*/

/* ============================================
   CSS Variables & Root Styles
   ============================================ */
:root {
    --apm-primary: #0055aa;
    --apm-primary-dark: #003d7a;
    --apm-secondary: #00a3e0;
    --apm-accent: #f7941d;
    --apm-dark: #1a1a2e;
    --apm-gray: #6c757d;
    --apm-light-gray: #f8f9fa;
    --apm-white: #ffffff;
    --apm-text: #333333;
    --apm-text-light: #666666;
    --apm-border: #dee2e6;
    --apm-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    --apm-shadow-hover: 0 5px 20px rgba(0, 0, 0, 0.15);
    --apm-transition: all 0.3s ease;
    --apm-font-primary: 'Roboto', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --apm-font-heading: 'Montserrat', 'Roboto', sans-serif;
    --apm-container: 1200px;
    --apm-spacing: 20px;
    --apm-radius: 8px;
}

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

html {
    font-size: 16px;
    scroll-behavior: smooth;
}

body {
    font-family: var(--apm-font-primary);
    font-size: 1rem;
    line-height: 1.6;
    color: var(--apm-text);
    background-color: var(--apm-white);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

a {
    color: var(--apm-primary);
    text-decoration: none;
    transition: var(--apm-transition);
}

a:hover {
    color: var(--apm-secondary);
}

ul, ol {
    list-style: none;
}

button, input, textarea, select {
    font-family: inherit;
    font-size: inherit;
}

/* ============================================
   Typography
   ============================================ */
h1, h2, h3, h4, h5, h6 {
    font-family: var(--apm-font-heading);
    font-weight: 700;
    line-height: 1.2;
    color: var(--apm-dark);
    margin-bottom: var(--apm-spacing);
}

h1 { font-size: 2.5rem; }
h2 { font-size: 2rem; }
h3 { font-size: 1.5rem; }
h4 { font-size: 1.25rem; }
h5 { font-size: 1.1rem; }
h6 { font-size: 1rem; }

p {
    margin-bottom: var(--apm-spacing);
}

/* ============================================
   Layout Components
   ============================================ */
.apm-container {
    max-width: var(--apm-container);
    margin: 0 auto;
    padding: 0 var(--apm-spacing);
}

.apm-section {
    padding: 80px 0;
}

.apm-section-alt {
    background-color: var(--apm-light-gray);
}

.apm-section-dark {
    background-color: var(--apm-dark);
    color: var(--apm-white);
}

.apm-section-dark h2,
.apm-section-dark h3 {
    color: var(--apm-white);
}

/* ============================================
   Header & Navigation
   ============================================ */
.apm-header {
    background-color: var(--apm-white);
    box-shadow: var(--apm-shadow);
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
}

.apm-header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 15px 0;
}

.apm-logo {
    display: flex;
    align-items: center;
    gap: 10px;
}

.apm-logo img {
    height: 50px;
    width: auto;
}

.apm-logo-text {
    font-family: var(--apm-font-heading);
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--apm-primary);
}

.apm-logo-tagline {
    font-size: 0.7rem;
    color: var(--apm-gray);
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* Desktop Navigation */
.apm-nav-desktop {
    display: flex;
    align-items: center;
    gap: 30px;
}

.apm-nav-menu {
    display: flex;
    gap: 25px;
}

.apm-nav-menu li {
    position: relative;
}

.apm-nav-menu a {
    font-size: 0.95rem;
    font-weight: 500;
    color: var(--apm-text);
    padding: 10px 0;
    display: block;
    position: relative;
}

.apm-nav-menu a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--apm-primary);
    transition: var(--apm-transition);
}

.apm-nav-menu a:hover::after,
.apm-nav-menu .current-menu-item a::after {
    width: 100%;
}

.apm-nav-menu a:hover,
.apm-nav-menu .current-menu-item a {
    color: var(--apm-primary);
}

/* Dropdown Menu */
.apm-nav-menu .sub-menu {
    position: absolute;
    top: 100%;
    left: 0;
    background: var(--apm-white);
    box-shadow: var(--apm-shadow-hover);
    min-width: 200px;
    padding: 10px 0;
    display: none;
}

.apm-nav-menu li:hover > .sub-menu {
    display: block;
}

.apm-nav-menu .sub-menu li a {
    padding: 8px 20px;
}

.apm-nav-menu .sub-menu a::after {
    display: none;
}

/* Language Switcher */
.apm-lang-switch {
    display: flex;
    gap: 8px;
    padding: 5px 15px;
    border-left: 1px solid var(--apm-border);
}

.apm-lang-switch a {
    font-size: 0.85rem;
    color: var(--apm-gray);
    padding: 4px 8px;
    border-radius: 3px;
}

.apm-lang-switch a:hover,
.apm-lang-switch a.active {
    background-color: var(--apm-primary);
    color: var(--apm-white);
}

/* Mobile Navigation */
.apm-nav-mobile {
    display: none;
    flex-direction: column;
    gap: 0;
    background: var(--apm-white);
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    box-shadow: var(--apm-shadow-hover);
}

.apm-nav-mobile.active {
    display: flex;
}

.apm-nav-mobile a {
    padding: 15px 20px;
    border-bottom: 1px solid var(--apm-border);
    color: var(--apm-text);
}

.apm-nav-mobile a:hover {
    background: var(--apm-light-gray);
}

.apm-menu-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 10px;
}

.apm-menu-toggle span {
    width: 25px;
    height: 3px;
    background: var(--apm-primary);
    transition: var(--apm-transition);
}

/* ============================================
   Hero Section
   ============================================ */
.apm-hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    background: linear-gradient(135deg, var(--apm-primary) 0%, var(--apm-secondary) 100%);
    color: var(--apm-white);
    position: relative;
    padding-top: 80px;
}

.apm-hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><circle cx="50" cy="50" r="1" fill="rgba(255,255,255,0.1)"/></svg>');
    background-size: 50px 50px;
    opacity: 0.5;
}

.apm-hero-content {
    position: relative;
    z-index: 1;
    max-width: 800px;
}

.apm-hero h1 {
    font-size: 3.5rem;
    color: var(--apm-white);
    margin-bottom: 20px;
    animation: fadeInUp 1s ease;
}

.apm-hero-tagline {
    font-size: 1.8rem;
    font-weight: 300;
    margin-bottom: 30px;
    opacity: 0.9;
    animation: fadeInUp 1s ease 0.2s both;
}

.apm-hero-text {
    font-size: 1.1rem;
    line-height: 1.8;
    margin-bottom: 40px;
    opacity: 0.85;
    animation: fadeInUp 1s ease 0.4s both;
}

.apm-hero-buttons {
    display: flex;
    gap: 15px;
    animation: fadeInUp 1s ease 0.6s both;
}

/* ============================================
   Buttons
   ============================================ */
.apm-btn {
    display: inline-block;
    padding: 14px 32px;
    font-size: 1rem;
    font-weight: 600;
    text-align: center;
    border-radius: var(--apm-radius);
    cursor: pointer;
    transition: var(--apm-transition);
    border: 2px solid transparent;
}

.apm-btn-primary {
    background-color: var(--apm-primary);
    color: var(--apm-white);
    border-color: var(--apm-primary);
}

.apm-btn-primary:hover {
    background-color: var(--apm-primary-dark);
    border-color: var(--apm-primary-dark);
    color: var(--apm-white);
    transform: translateY(-2px);
}

.apm-btn-secondary {
    background-color: transparent;
    color: var(--apm-white);
    border-color: var(--apm-white);
}

.apm-btn-secondary:hover {
    background-color: var(--apm-white);
    color: var(--apm-primary);
}

.apm-btn-outline {
    background-color: transparent;
    color: var(--apm-primary);
    border-color: var(--apm-primary);
}

.apm-btn-outline:hover {
    background-color: var(--apm-primary);
    color: var(--apm-white);
}

/* ============================================
   About Section
   ============================================ */
.apm-about-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: center;
}

.apm-about-image {
    border-radius: var(--apm-radius);
    overflow: hidden;
    box-shadow: var(--apm-shadow-hover);
}

.apm-about-image img {
    width: 100%;
    height: auto;
}

.apm-about-stats {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 30px;
    margin-top: 40px;
}

.apm-stat-item {
    text-align: center;
    padding: 25px;
    background: var(--apm-white);
    border-radius: var(--apm-radius);
    box-shadow: var(--apm-shadow);
}

.apm-stat-number {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--apm-primary);
    display: block;
}

.apm-stat-label {
    font-size: 0.95rem;
    color: var(--apm-text-light);
    margin-top: 5px;
}

/* ============================================
   Services Section
   ============================================ */
.apm-services-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 30px;
    margin-top: 50px;
}

.apm-service-card {
    background: var(--apm-white);
    padding: 40px 30px;
    border-radius: var(--apm-radius);
    text-align: center;
    box-shadow: var(--apm-shadow);
    transition: var(--apm-transition);
}

.apm-service-card:hover {
    transform: translateY(-10px);
    box-shadow: var(--apm-shadow-hover);
}

.apm-service-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 25px;
    background: linear-gradient(135deg, var(--apm-primary) 0%, var(--apm-secondary) 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
}

.apm-service-card h3 {
    font-size: 1.2rem;
    margin-bottom: 15px;
}

.apm-service-card p {
    font-size: 0.95rem;
    color: var(--apm-text-light);
    line-height: 1.6;
}

/* ============================================
   Team Section
   ============================================ */
.apm-team-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 30px;
    margin-top: 50px;
}

.apm-team-member {
    text-align: center;
    background: var(--apm-white);
    border-radius: var(--apm-radius);
    overflow: hidden;
    box-shadow: var(--apm-shadow);
    transition: var(--apm-transition);
}

.apm-team-member:hover {
    transform: translateY(-5px);
    box-shadow: var(--apm-shadow-hover);
}

.apm-team-photo {
    width: 100%;
    height: 250px;
    object-fit: cover;
    background: linear-gradient(135deg, var(--apm-primary) 0%, var(--apm-secondary) 100%);
}

.apm-team-info {
    padding: 25px 20px;
}

.apm-team-name {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--apm-dark);
    margin-bottom: 5px;
}

.apm-team-role {
    font-size: 0.9rem;
    color: var(--apm-primary);
    margin-bottom: 10px;
}

.apm-team-contact {
    font-size: 0.85rem;
    color: var(--apm-text-light);
}

/* ============================================
   Timeline Section
   ============================================ */
.apm-timeline {
    position: relative;
    max-width: 800px;
    margin: 50px auto 0;
    padding-left: 40px;
}

.apm-timeline::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 4px;
    background: linear-gradient(to bottom, var(--apm-primary), var(--apm-secondary));
    border-radius: 2px;
}

.apm-timeline-item {
    position: relative;
    padding-bottom: 40px;
}

.apm-timeline-item::before {
    content: '';
    position: absolute;
    left: -48px;
    top: 0;
    width: 20px;
    height: 20px;
    background: var(--apm-primary);
    border-radius: 50%;
    border: 4px solid var(--apm-white);
    box-shadow: var(--apm-shadow);
}

.apm-timeline-year {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--apm-primary);
    margin-bottom: 10px;
}

.apm-timeline-item h3 {
    font-size: 1.2rem;
    margin-bottom: 10px;
}

.apm-timeline-item p {
    color: var(--apm-text-light);
    margin-bottom: 0;
}

/* ============================================
   Contact Section
   ============================================ */
.apm-contact-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    margin-top: 50px;
}

.apm-contact-info h3 {
    margin-bottom: 20px;
}

.apm-contact-item {
    display: flex;
    align-items: flex-start;
    gap: 15px;
    margin-bottom: 25px;
}

.apm-contact-icon {
    width: 50px;
    height: 50px;
    background: var(--apm-primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--apm-white);
    font-size: 1.2rem;
    flex-shrink: 0;
}

.apm-contact-text h4 {
    font-size: 1rem;
    margin-bottom: 5px;
}

.apm-contact-text p {
    font-size: 0.95rem;
    color: var(--apm-text-light);
    margin-bottom: 0;
}

.apm-contact-form {
    background: var(--apm-white);
    padding: 40px;
    border-radius: var(--apm-radius);
    box-shadow: var(--apm-shadow);
}

.apm-form-group {
    margin-bottom: 20px;
}

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

.apm-form-group input,
.apm-form-group textarea {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid var(--apm-border);
    border-radius: var(--apm-radius);
    transition: var(--apm-transition);
}

.apm-form-group input:focus,
.apm-form-group textarea:focus {
    outline: none;
    border-color: var(--apm-primary);
    box-shadow: 0 0 0 3px rgba(0, 85, 170, 0.1);
}

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

/* ============================================
   Enhanced Contact Form Styles
   ============================================ */
.apm-contact-form-wrapper {
    max-width: 700px;
    margin: 0 auto;
}

.apm-form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 20px;
}

@media (max-width: 768px) {
    .apm-form-row {
        grid-template-columns: 1fr;
    }
}

.apm-form-group {
    margin-bottom: 20px;
}

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

.apm-form-group label a {
    color: var(--apm-primary);
    text-decoration: underline;
}

.apm-form-group input[type="text"],
.apm-form-group input[type="email"],
.apm-form-group input[type="tel"],
.apm-form-group textarea {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid var(--apm-border);
    border-radius: var(--apm-radius);
    font-size: 1rem;
    transition: var(--apm-transition);
    background-color: var(--apm-white);
}

.apm-form-group input[type="text"]:focus,
.apm-form-group input[type="email"]:focus,
.apm-form-group input[type="tel"]:focus,
.apm-form-group textarea:focus {
    outline: none;
    border-color: var(--apm-primary);
    box-shadow: 0 0 0 3px rgba(0, 85, 170, 0.1);
}

.apm-form-group input.apm-input-error,
.apm-form-group textarea.apm-input-error {
    border-color: #dc3545;
    background-color: #fff8f8;
}

.apm-form-group input.apm-input-error:focus,
.apm-form-group textarea.apm-input-error:focus {
    box-shadow: 0 0 0 3px rgba(220, 53, 69, 0.1);
}

.apm-field-error {
    display: block;
    color: #dc3545;
    font-size: 0.85rem;
    margin-top: 5px;
    min-height: 20px;
}

.apm-field-error.visible {
    color: #dc3545;
}

/* Form Messages */
.apm-form-message {
    padding: 15px 20px;
    border-radius: var(--apm-radius);
    margin-top: 20px;
    font-weight: 500;
    display: none;
}

.apm-form-message i {
    margin-right: 10px;
}

.apm-success-message {
    background-color: #d4edda;
    border: 1px solid #c3e6cb;
    color: #155724;
}

.apm-error-message {
    background-color: #f8d7da;
    border: 1px solid #f5c6cb;
    color: #721c24;
}

/* Submit Button */
.apm-btn {
    position: relative;
    overflow: hidden;
}

.apm-btn-loading i {
    margin-right: 8px;
}

#apm-submit-btn:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

/* Checkbox styling */
.apm-form-group input[type="checkbox"] {
    width: 18px;
    height: 18px;
    margin-right: 8px;
    vertical-align: middle;
    cursor: pointer;
}

.apm-form-group input[type="checkbox"].apm-input-error {
    outline: 2px solid #dc3545;
    outline-offset: 2px;
}

/* Captcha styles */
.apm-captcha-group {
    background-color: #f9fafb;
    padding: 15px;
    border-radius: var(--apm-radius);
    border: 1px solid #e5e7eb;
}

.apm-captcha-question {
    display: flex;
    align-items: center;
    font-size: 1.1rem;
    font-weight: 500;
    margin-bottom: 8px;
}

.apm-captcha-hint {
    color: #6b7280;
    font-size: 0.85rem;
    display: block;
    margin-top: 5px;
}

/* ============================================
   Footer
   ============================================ */
.apm-footer {
    background-color: var(--apm-dark);
    color: var(--apm-white);
    padding-top: 60px;
}

.apm-footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 40px;
    padding-bottom: 40px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.apm-footer-about h3 {
    color: var(--apm-white);
    margin-bottom: 20px;
}

.apm-footer-about p {
    color: rgba(255, 255, 255, 0.7);
    line-height: 1.8;
}

.apm-footer h4 {
    color: var(--apm-white);
    font-size: 1.1rem;
    margin-bottom: 20px;
}

.apm-footer-links li {
    margin-bottom: 10px;
}

.apm-footer-links a {
    color: rgba(255, 255, 255, 0.7);
    transition: var(--apm-transition);
}

.apm-footer-links a:hover {
    color: var(--apm-white);
    padding-left: 5px;
}

.apm-footer-contact p {
    color: rgba(255, 255, 255, 0.7);
    margin-bottom: 10px;
    font-size: 0.95rem;
}

.apm-footer-bottom {
    padding: 20px 0;
    text-align: center;
}

.apm-footer-legal {
    display: flex;
    justify-content: center;
    gap: 30px;
    margin-bottom: 15px;
}

.apm-footer-legal a {
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.9rem;
}

.apm-footer-legal a:hover {
    color: var(--apm-white);
}

.apm-footer-copyright {
    color: rgba(255, 255, 255, 0.5);
    font-size: 0.85rem;
}

/* ============================================
   Blog & Archive Styles
   ============================================ */
.apm-posts-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 30px;
    margin-top: 40px;
}

.apm-post-card {
    background: var(--apm-white);
    border-radius: var(--apm-radius);
    overflow: hidden;
    box-shadow: var(--apm-shadow);
    transition: var(--apm-transition);
}

.apm-post-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--apm-shadow-hover);
}

.apm-post-thumbnail {
    width: 100%;
    height: 200px;
    object-fit: cover;
    background: linear-gradient(135deg, var(--apm-primary) 0%, var(--apm-secondary) 100%);
}

.apm-post-content {
    padding: 25px;
}

.apm-post-meta {
    font-size: 0.85rem;
    color: var(--apm-text-light);
    margin-bottom: 10px;
}

.apm-post-title {
    font-size: 1.3rem;
    margin-bottom: 15px;
}

.apm-post-title a {
    color: var(--apm-dark);
}

.apm-post-title a:hover {
    color: var(--apm-primary);
}

.apm-post-excerpt {
    font-size: 0.95rem;
    color: var(--apm-text-light);
    line-height: 1.6;
}

/* ============================================
   Sidebar
   ============================================ */
.apm-sidebar {
    background: var(--apm-white);
    padding: 30px;
    border-radius: var(--apm-radius);
    box-shadow: var(--apm-shadow);
}

.apm-sidebar h3 {
    font-size: 1.1rem;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--apm-primary);
}

.apm-sidebar ul li {
    padding: 10px 0;
    border-bottom: 1px solid var(--apm-border);
}

.apm-sidebar ul li:last-child {
    border-bottom: none;
}

.apm-sidebar a {
    color: var(--apm-text);
}

.apm-sidebar a:hover {
    color: var(--apm-primary);
}

/* ============================================
   Single Post
   ============================================ */
.apm-single-post {
    max-width: 800px;
    margin: 0 auto;
}

.apm-single-header {
    text-align: center;
    padding: 60px 0 40px;
}

.apm-single-title {
    font-size: 2.5rem;
    margin-bottom: 20px;
}

.apm-single-meta {
    color: var(--apm-text-light);
    font-size: 0.95rem;
}

.apm-single-content {
    line-height: 1.8;
    font-size: 1.05rem;
}

.apm-single-content h2,
.apm-single-content h3,
.apm-single-content h4 {
    margin-top: 40px;
}

.apm-single-content p {
    margin-bottom: 20px;
}

.apm-single-content ul,
.apm-single-content ol {
    margin-bottom: 20px;
    padding-left: 25px;
}

.apm-single-content li {
    margin-bottom: 10px;
    list-style: disc;
}

.apm-single-content ol li {
    list-style: decimal;
}

/* ============================================
   404 Page
   ============================================ */
.apm-404 {
    text-align: center;
    padding: 100px 20px;
}

.apm-404-number {
    font-size: 8rem;
    font-weight: 700;
    color: var(--apm-primary);
    line-height: 1;
    margin-bottom: 20px;
}

.apm-404 h1 {
    font-size: 2rem;
    margin-bottom: 15px;
}

.apm-404 p {
    color: var(--apm-text-light);
    margin-bottom: 30px;
}

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

/* ============================================
   Responsive Design
   ============================================ */
@media (max-width: 1024px) {
    .apm-services-grid,
    .apm-team-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .apm-footer-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .apm-menu-toggle {
        display: flex;
    }

    .apm-nav-desktop {
        display: none;
    }

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

    .apm-hero-tagline {
        font-size: 1.4rem;
    }

    .apm-hero-buttons {
        flex-direction: column;
    }

    .apm-about-grid,
    .apm-contact-grid,
    .apm-posts-grid {
        grid-template-columns: 1fr;
    }

    .apm-services-grid,
    .apm-team-grid {
        grid-template-columns: 1fr;
    }

    .apm-footer-grid {
        grid-template-columns: 1fr;
        text-align: center;
    }

    h1 { font-size: 2rem; }
    h2 { font-size: 1.75rem; }

    .apm-section {
        padding: 60px 0;
    }
}

@media (max-width: 480px) {
    .apm-hero h1 {
        font-size: 2rem;
    }

    .apm-hero-tagline {
        font-size: 1.2rem;
    }

    .apm-about-stats {
        grid-template-columns: 1fr;
    }

    .apm-contact-form {
        padding: 25px;
    }
}

/* ============================================
   WordPress Specific
   ============================================ */
.alignleft {
    float: left;
    margin-right: 20px;
    margin-bottom: 20px;
}

.alignright {
    float: right;
    margin-left: 20px;
    margin-bottom: 20px;
}

.aligncenter {
    display: block;
    margin-left: auto;
    margin-right: auto;
}

.wp-caption {
    max-width: 100%;
}

.wp-caption-text {
    font-size: 0.85rem;
    color: var(--apm-text-light);
    text-align: center;
    margin-top: 10px;
}

/* Screen Reader Text */
.screen-reader-text {
    border: 0;
    clip: rect(1px, 1px, 1px, 1px);
    clip-path: inset(50%);
    height: 1px;
    margin: -1px;
    overflow: hidden;
    padding: 0;
    position: absolute !important;
    width: 1px;
    word-wrap: normal !important;
}

/* Clearfix */
.clearfix::after {
    content: "";
    display: table;
    clear: both;
}

/* Main content area */
.apm-main-content {
    padding-top: 80px;
    min-height: calc(100vh - 200px);
}

.apm-content-grid {
    display: grid;
    grid-template-columns: 1fr 350px;
    gap: 40px;
    margin-top: 40px;
}

@media (max-width: 1024px) {
    .apm-content-grid {
        grid-template-columns: 1fr;
    }
}

/* Pagination */
.apm-pagination {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-top: 50px;
}

.apm-pagination a,
.apm-pagination span {
    padding: 10px 20px;
    background: var(--apm-white);
    border: 1px solid var(--apm-border);
    border-radius: var(--apm-radius);
    color: var(--apm-text);
    transition: var(--apm-transition);
}

.apm-pagination a:hover,
.apm-pagination .current {
    background: var(--apm-primary);
    border-color: var(--apm-primary);
    color: var(--apm-white);
}

/* Comments */
.apm-comments {
    margin-top: 60px;
    padding-top: 40px;
    border-top: 1px solid var(--apm-border);
}

.apm-comments h2 {
    margin-bottom: 30px;
}

/* ============================================
   Dark Mode Styles
   ============================================ */
[data-theme="dark"] {
    --apm-primary: #00a3e0;
    --apm-primary-dark: #007bb8;
    --apm-secondary: #0055aa;
    --apm-dark: #0d0d1a;
    --apm-gray: #a0a0a0;
    --apm-light-gray: #1a1a2e;
    --apm-white: #12121f;
    --apm-text: #e0e0e0;
    --apm-text-light: #a0a0a0;
    --apm-border: #2a2a3e;
    --apm-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
    --apm-shadow-hover: 0 5px 20px rgba(0, 0, 0, 0.4);
}

[data-theme="dark"] body {
    background-color: var(--apm-white);
    color: var(--apm-text);
}

[data-theme="dark"] .apm-header {
    background-color: var(--apm-white);
    box-shadow: var(--apm-shadow);
}

[data-theme="dark"] .apm-section-alt {
    background-color: var(--apm-dark);
}

[data-theme="dark"] .apm-footer {
    background-color: var(--apm-dark);
}

[data-theme="dark"] .apm-logo-text {
    color: var(--apm-primary);
}

[data-theme="dark"] .apm-nav-menu a {
    color: var(--apm-text);
}

[data-theme="dark"] .apm-service-card,
[data-theme="dark"] .apm-team-member,
[data-theme="dark"] .apm-stat-item,
[data-theme="dark"] .apm-post-card,
[data-theme="dark"] .apm-sidebar,
[data-theme="dark"] .apm-contact-form {
    background-color: var(--apm-white);
    box-shadow: var(--apm-shadow);
}

[data-theme="dark"] h1,
[data-theme="dark"] h2,
[data-theme="dark"] h3,
[data-theme="dark"] h4,
[data-theme="dark"] .apm-post-title a,
[data-theme="dark"] .apm-team-name {
    color: var(--apm-text);
}

/* Theme Toggle Button */
.apm-theme-toggle {
    background: none;
    border: 2px solid var(--apm-border);
    border-radius: 50%;
    width: 40px;
    height: 40px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--apm-transition);
    margin-left: 10px;
}

.apm-theme-toggle:hover {
    border-color: var(--apm-primary);
    background: var(--apm-light-gray);
}

.apm-theme-toggle:focus {
    outline: 3px solid var(--apm-primary);
    outline-offset: 2px;
}

.apm-theme-toggle i {
    color: var(--apm-text);
    font-size: 1rem;
}

[data-theme="dark"] .apm-theme-toggle {
    border-color: var(--apm-gray);
}

[data-theme="dark"] .apm-theme-toggle i {
    color: var(--apm-text);
}

/* ============================================
   Theme Switcher Script Styles
   ============================================ */
.theme-toggle-transitioning * {
    transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease !important;
}

/* ============================================
   Enhanced Focus States
   ============================================ */
.keyboard-navigation *:focus {
    outline: 3px solid var(--apm-primary) !important;
    outline-offset: 2px !important;
}

/* ============================================
   Skeleton Loading
   ============================================ */
.apm-skeleton {
    background: linear-gradient(90deg, var(--apm-light-gray) 25%, var(--apm-border) 50%, var(--apm-light-gray) 75%);
    background-size: 200% 100%;
    animation: skeleton-loading 1.5s infinite;
    border-radius: var(--apm-radius);
}

@keyframes skeleton-loading {
    0% {
        background-position: 200% 0;
    }
    100% {
        background-position: -200% 0;
    }
}

.apm-skeleton-text {
    height: 1em;
    margin-bottom: 0.5em;
}

.apm-skeleton-title {
    height: 2em;
    width: 60%;
    margin-bottom: 1em;
}

.apm-skeleton-image {
    height: 200px;
    margin-bottom: 1em;
}

/* ============================================
   Related Posts
   ============================================ */
.apm-related-posts {
    margin-top: 60px;
    padding-top: 40px;
    border-top: 2px solid var(--apm-border);
}

.apm-related-posts h3 {
    margin-bottom: 30px;
}

.apm-related-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
}

.apm-related-item {
    background: var(--apm-white);
    border-radius: var(--apm-radius);
    overflow: hidden;
    box-shadow: var(--apm-shadow);
    transition: var(--apm-transition);
}

.apm-related-item:hover {
    transform: translateY(-5px);
    box-shadow: var(--apm-shadow-hover);
}

.apm-related-item img {
    width: 100%;
    height: 150px;
    object-fit: cover;
}

.apm-related-item-content {
    padding: 20px;
}

.apm-related-item h4 {
    font-size: 1rem;
    margin-bottom: 10px;
}

.apm-related-item h4 a {
    color: var(--apm-dark);
}

.apm-related-item h4 a:hover {
    color: var(--apm-primary);
}

.apm-related-date {
    font-size: 0.85rem;
    color: var(--apm-text-light);
}

@media (max-width: 768px) {
    .apm-related-grid {
        grid-template-columns: 1fr;
    }
}

/* ============================================
   Print Styles
   ============================================ */
@media print {
    .apm-header,
    .apm-footer,
    .apm-sidebar,
    .apm-back-to-top,
    .apm-cookie-banner,
    .apm-reading-progress,
    .apm-related-posts {
        display: none !important;
    }

    .apm-main-content {
        margin: 0;
        padding: 0;
    }

    body {
        background: white;
        color: black;
        font-size: 12pt;
        line-height: 1.5;
    }

    a {
        color: black;
        text-decoration: underline;
    }

    h1, h2, h3 {
        page-break-after: avoid;
    }

    img {
        max-width: 100%;
        page-break-inside: avoid;
    }
}