/*
Theme Name: Astra Child
Description: Child theme for Astra theme with homepage-baukasten.info styling
Author: Your Name
Template: astra
Version: 1.0.0
*/

/* Import parent theme styles */
@import url("../astra/style.css");

/* Homepage Baukasten Color Scheme */
:root {
    --primary-color: #0097b2;
    --secondary-color: #0F172A;
    --accent-color: #454F5E;
    --text-color: #333333;
    --background-color: #ffffff;
    --border-color: #e2e8f0;
    --hover-color: #007d96;
}

/* Primary Color Applications */
a {
    color: var(--primary-color);
}

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

/* Navigation Styling */
.main-navigation a {
    color: var(--secondary-color);
    font-weight: 500;
}

.main-navigation a:hover {
    color: var(--primary-color);
}

/* Button Styling with Gradient Hover */
.ast-button,
.button,
input[type="submit"],
input[type="button"] {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
    color: white;
    border-radius: 4px;
    padding: 12px 24px;
    font-weight: 500;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

/* Primary buttons (blue background) get dark gradient */
.ast-button::before,
.button::before,
input[type="submit"]::before,
input[type="button"]::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, var(--primary-color), var(--hover-color), #004d5c);
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: -1;
}

.ast-button:hover,
.button:hover,
input[type="submit"]:hover,
input[type="button"]:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(0, 151, 178, 0.3);
}

.ast-button:hover::before,
.button:hover::before,
input[type="submit"]:hover::before,
input[type="button"]:hover::before {
    opacity: 1;
}

/* White buttons (in hero section) get light gradient */
.ast-button[style*="background-color: white"],
.ast-button[style*="background-color:white"] {
    background-color: white !important;
    color: var(--primary-color) !important;
}

.ast-button[style*="background-color: white"]::before,
.ast-button[style*="background-color:white"]::before {
    background: linear-gradient(135deg, #ffffff, #f0f9ff, #e0f2fe) !important;
}

.ast-button[style*="background-color: white"]:hover,
.ast-button[style*="background-color:white"]:hover {
    box-shadow: 0 8px 20px rgba(255, 255, 255, 0.4) !important;
    color: var(--primary-color) !important;
}

/* Header Styling */
.site-header {
    background-color: var(--background-color);
    border-bottom: 1px solid var(--border-color);
}

.site-title a {
    color: var(--secondary-color);
    font-weight: 700;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    color: var(--secondary-color);
    font-weight: 600;
}

body {
    color: var(--text-color);
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    line-height: 1.65;
}

/* Homepage Specific Styling */
.home .entry-content {
    background-color: var(--background-color);
}

/* Widget Styling */
.widget {
    border: 1px solid var(--border-color);
    border-radius: 6px;
    padding: 20px;
    margin-bottom: 20px;
}

.widget-title {
    color: var(--secondary-color);
    border-bottom: 2px solid var(--primary-color);
    padding-bottom: 10px;
    margin-bottom: 15px;
}

/* Form Styling */
input[type="text"],
input[type="email"],
input[type="search"],
textarea,
select {
    border: 1px solid var(--border-color);
    border-radius: 4px;
    padding: 10px;
    background-color: var(--background-color);
}

input[type="text"]:focus,
input[type="email"]:focus,
input[type="search"]:focus,
textarea:focus {
    border-color: var(--primary-color);
    outline: none;
    box-shadow: 0 0 0 2px rgba(0, 151, 178, 0.2);
}

/* Search Form Styling */
.search-form {
    display: flex;
    gap: 10px;
}

.search-form input[type="search"] {
    flex: 1;
}

/* Footer Styling */
.site-footer {
    background-color: var(--secondary-color);
    color: white;
    padding: 40px 0;
}

.site-footer a {
    color: var(--primary-color);
}

.site-footer a:hover {
    color: var(--primary-color);
}

/* Animated Header Slider */
@keyframes slide {
    0% {
        transform: translateX(0);
    }
    100% {
        transform: translateX(-100%);
    }
}

.hero-slider {
    pointer-events: none;
}

.slider-track {
    will-change: transform;
}

/* Slider background patterns - more visible */
.slide-1 {
    background: radial-gradient(circle at 20% 20%, rgba(255, 255, 255, 0.3) 3px, transparent 3px),
                radial-gradient(circle at 80% 80%, rgba(255, 255, 255, 0.3) 3px, transparent 3px),
                radial-gradient(circle at 40% 60%, rgba(255, 255, 255, 0.2) 2px, transparent 2px),
                radial-gradient(circle at 60% 30%, rgba(255, 255, 255, 0.2) 2px, transparent 2px),
                radial-gradient(circle at 30% 80%, rgba(255, 255, 255, 0.15) 1.5px, transparent 1.5px),
                radial-gradient(circle at 70% 50%, rgba(255, 255, 255, 0.15) 1.5px, transparent 1.5px);
    background-size: 150px 150px;
}

.slide-2 {
    background: radial-gradient(circle at 30% 30%, rgba(255, 255, 255, 0.3) 3px, transparent 3px),
                radial-gradient(circle at 70% 70%, rgba(255, 255, 255, 0.3) 3px, transparent 3px),
                radial-gradient(circle at 50% 50%, rgba(255, 255, 255, 0.2) 2px, transparent 2px),
                radial-gradient(circle at 80% 20%, rgba(255, 255, 255, 0.2) 2px, transparent 2px),
                radial-gradient(circle at 20% 70%, rgba(255, 255, 255, 0.15) 1.5px, transparent 1.5px),
                radial-gradient(circle at 60% 40%, rgba(255, 255, 255, 0.15) 1.5px, transparent 1.5px);
    background-size: 150px 150px;
}

.slide-3 {
    background: radial-gradient(circle at 40% 40%, rgba(255, 255, 255, 0.3) 3px, transparent 3px),
                radial-gradient(circle at 60% 60%, rgba(255, 255, 255, 0.3) 3px, transparent 3px),
                radial-gradient(circle at 20% 50%, rgba(255, 255, 255, 0.2) 2px, transparent 2px),
                radial-gradient(circle at 80% 30%, rgba(255, 255, 255, 0.2) 2px, transparent 2px),
                radial-gradient(circle at 30% 20%, rgba(255, 255, 255, 0.15) 1.5px, transparent 1.5px),
                radial-gradient(circle at 70% 80%, rgba(255, 255, 255, 0.15) 1.5px, transparent 1.5px);
    background-size: 150px 150px;
}

/* Animated Cards */
.animated-card {
    cursor: pointer;
    transform-origin: center;
    will-change: transform;
}

.animated-card:hover {
    transform: translateY(-10px) !important;
    box-shadow: 0 15px 30px rgba(0, 151, 178, 0.2) !important;
    border-color: var(--primary-color) !important;
}

.animated-card:hover .service-icon {
    transform: scale(1.1) rotate(5deg) !important;
    box-shadow: 0 5px 15px rgba(0, 151, 178, 0.3) !important;
}

.animated-card:hover h3 {
    color: var(--primary-color) !important;
}

/* Floating animation for cards */
.animated-card:nth-child(1) {
    animation: float1 6s ease-in-out infinite;
}

.animated-card:nth-child(2) {
    animation: float2 8s ease-in-out infinite;
}

.animated-card:nth-child(3) {
    animation: float3 7s ease-in-out infinite;
}

@keyframes float1 {
    0%, 100% {
        transform: translateY(0px);
    }
    50% {
        transform: translateY(-5px);
    }
}

@keyframes float2 {
    0%, 100% {
        transform: translateY(0px);
    }
    50% {
        transform: translateY(-8px);
    }
}

@keyframes float3 {
    0%, 100% {
        transform: translateY(0px);
    }
    50% {
        transform: translateY(-6px);
    }
}

/* Pulse animation for icons */
.service-icon {
    animation: pulse-icon 3s ease-in-out infinite;
}

@keyframes pulse-icon {
    0%, 100% {
        box-shadow: 0 0 0 0 rgba(0, 151, 178, 0.4);
    }
    50% {
        box-shadow: 0 0 0 10px rgba(0, 151, 178, 0);
    }
}

/* Enhanced hero section */
.homepage-hero {
    position: relative;
    animation: hero-glow 4s ease-in-out infinite alternate;
}

@keyframes hero-glow {
    0% {
        box-shadow: 0 5px 20px rgba(0, 151, 178, 0.3);
    }
    100% {
        box-shadow: 0 5px 30px rgba(0, 151, 178, 0.5);
    }
}

/* Rocket Animation */
.rocket-container {
    animation: rocket-float 3s ease-in-out infinite;
}

@keyframes rocket-float {
    0%, 100% {
        transform: translateY(0px);
    }
    50% {
        transform: translateY(-10px);
    }
}

.rocket-container:hover {
    transform: translateY(-15px) scale(1.1) !important;
    box-shadow: 0 20px 40px rgba(0, 151, 178, 0.4) !important;
}

.rocket-container:hover .rocket-icon {
    transform: translateX(10px) translateY(-5px) rotate(15deg) !important;
    animation: rocket-shake 0.5s ease-in-out infinite !important;
}

.rocket-container:hover .rocket-trail {
    opacity: 1 !important;
    animation: rocket-trail-animation 0.8s ease-out infinite !important;
}

@keyframes rocket-shake {
    0%, 100% {
        transform: translateX(10px) translateY(-5px) rotate(15deg);
    }
    25% {
        transform: translateX(8px) translateY(-3px) rotate(12deg);
    }
    75% {
        transform: translateX(12px) translateY(-7px) rotate(18deg);
    }
}

@keyframes rocket-trail-animation {
    0% {
        transform: translateX(-20px) translateY(10px) scale(0.5);
        opacity: 0.8;
    }
    50% {
        transform: translateX(-40px) translateY(20px) scale(1);
        opacity: 0.6;
    }
    100% {
        transform: translateX(-60px) translateY(30px) scale(1.5);
        opacity: 0;
    }
}

/* Multiple trail effects */
.rocket-container:hover::before {
    content: '';
    position: absolute;
    width: 20px;
    height: 20px;
    background: radial-gradient(circle, rgba(255,255,255,0.6) 0%, transparent 70%);
    border-radius: 50%;
    animation: rocket-trail-animation 1s ease-out infinite 0.2s;
}

.rocket-container:hover::after {
    content: '';
    position: absolute;
    width: 15px;
    height: 15px;
    background: radial-gradient(circle, rgba(255,255,255,0.4) 0%, transparent 70%);
    border-radius: 50%;
    animation: rocket-trail-animation 1.2s ease-out infinite 0.4s;
}

/* Responsive Design */
@media (max-width: 768px) {
    .site-header {
        padding: 15px 0;
    }
    
    .main-navigation a {
        padding: 10px 15px;
    }
    
    .animated-card:hover {
        transform: translateY(-5px) !important;
    }
    
    .slider-track {
        animation-duration: 10s;
    }
    
    .rocket-container {
        width: 150px !important;
        height: 150px !important;
    }
    
    .rocket-icon {
        font-size: 40px !important;
    }
}

/* Enhanced Features Section */
.features-section {
    position: relative;
}

.feature-item {
    transition: all 0.3s ease;
    padding: 20px;
    border-radius: 12px;
    border: 2px solid transparent;
}

.feature-item:hover {
    background: rgba(0, 151, 178, 0.05);
    border-color: rgba(0, 151, 178, 0.2);
    transform: translateY(-5px);
}

.feature-icon-container {
    animation: feature-icon-pulse 2s ease-in-out infinite;
    box-shadow: 0 4px 12px rgba(0, 151, 178, 0.3);
}

@keyframes feature-icon-pulse {
    0%, 100% {
        box-shadow: 0 4px 12px rgba(0, 151, 178, 0.3);
    }
    50% {
        box-shadow: 0 4px 20px rgba(0, 151, 178, 0.5);
    }
}

.feature-icon-container:hover {
    transform: scale(1.1) rotate(5deg);
    animation: feature-icon-bounce 0.6s ease-in-out;
}

@keyframes feature-icon-bounce {
    0%, 100% {
        transform: scale(1.1) rotate(5deg);
    }
    50% {
        transform: scale(1.2) rotate(10deg);
    }
}

.feature-icon {
    animation: feature-icon-float 3s ease-in-out infinite;
}

@keyframes feature-icon-float {
    0%, 100% {
        transform: translateY(0px);
    }
    50% {
        transform: translateY(-3px);
    }
}

/* Progressive Reveal Animation */
.reveal-item {
    opacity: 1;
    transform: translateX(0);
    transition: all 0.6s ease;
}

.reveal-item.js-enabled {
    opacity: 0;
    transform: translateX(-50px);
}

.reveal-item.revealed {
    opacity: 1;
    transform: translateX(0);
}

/* Intersection Observer fallback for older browsers */
.no-js .reveal-item {
    opacity: 1;
    transform: translateX(0);
}

/* Enhanced gradient effect on hover */
.feature-icon-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(255,255,255,0.2) 0%, transparent 100%);
    border-radius: 50%;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.feature-icon-container:hover::before {
    opacity: 1;
}

/* Responsive improvements */
@media (max-width: 768px) {
    .features-section {
        padding: 30px 20px !important;
    }
    
    .features-list {
        grid-template-columns: 1fr !important;
        gap: 25px !important;
    }
    
    .feature-item {
        padding: 15px !important;
    }
    
    .feature-icon-container {
        width: 35px !important;
        height: 35px !important;
    }
    
    .feature-icon {
        font-size: 16px !important;
    }
}

/* Single Post Featured Image Styling */
.single-post .wp-post-image,
.single .wp-post-image {
    width: 100%;
    height: auto;
    border-radius: 8px;
    margin-bottom: 30px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

.single-post .wp-post-image:hover,
.single .wp-post-image:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

/* Featured image container */
.ast-single-post-featured-image {
    margin-bottom: 30px;
}

/* Responsive featured image */
@media (max-width: 768px) {
    .single-post .wp-post-image,
    .single .wp-post-image {
        margin-bottom: 20px;
        border-radius: 6px;
    }
}

/* Latest Posts Section */
.latest-posts-section {
    position: relative;
}

.post-card {
    cursor: pointer;
    transition: all 0.3s ease;
}

.post-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 30px rgba(0, 151, 178, 0.15);
}

.post-card:hover .post-image img {
    transform: scale(1.05);
}

.post-card:hover .post-overlay {
    opacity: 1;
}

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

.post-card:hover .post-read-more {
    color: var(--hover-color);
    transform: translateX(5px);
}

.post-image {
    position: relative;
    overflow: hidden;
}

.post-category span {
    display: inline-block;
    animation: category-pulse 2s ease-in-out infinite;
}

@keyframes category-pulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
}

.post-meta svg {
    flex-shrink: 0;
}

.post-read-more:hover {
    color: var(--hover-color);
}

.post-read-more svg {
    transition: transform 0.3s ease;
}

.post-read-more:hover svg {
    transform: translateX(3px);
}

/* Grid responsive behavior */
@media (max-width: 1200px) {
    .posts-grid {
        grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)) !important;
        gap: 25px !important;
    }
}

@media (max-width: 768px) {
    .latest-posts-section {
        padding: 30px 20px !important;
    }
    
    .posts-grid {
        grid-template-columns: 1fr !important;
        gap: 20px !important;
    }
    
    .post-card {
        margin-bottom: 20px;
    }
    
    .post-image {
        height: 180px !important;
    }
    
    .post-content {
        padding: 20px !important;
    }
    
    .post-meta {
        flex-direction: column !important;
        align-items: flex-start !important;
        gap: 8px !important;
    }
}