/*
Theme Name: B-Pro Australia
Description: Professional printing theme for photographers. A clean, modern WordPress theme designed for B-Pro Australia's printing services.
Author: B-Pro Australia
Version: 1.0.0
License: GPL v2 or later
Text Domain: bpro-theme
*/

/* Custom Tailwind Config & Styles */
.gradient-text {
    background: linear-gradient(135deg, #c09853 0%, #a17c42 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.group:hover .group-hover-translate-y-0 { 
    transform: translateY(0); 
}

.group:hover .group-hover-opacity-100 { 
    opacity: 1; 
}

.loaded { 
    transition: opacity 0.5s ease-in-out; 
}

.fade-in-up {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

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

/* Product gallery styles */
.thumbnail.active {
    border-color: #c09853 !important;
    opacity: 1;
}

.thumbnail {
    transition: all 0.3s ease;
}

.thumbnail:hover {
    opacity: 0.8;
    border-color: #c09853 !important;
}

/* Responsive video embed styles */
.video-embed-container {
    position: relative;
    padding-bottom: 56.25%; /* 16:9 aspect ratio */
    height: 0;
    overflow: hidden;
}

.video-embed-container iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border-radius: 0.5rem;
}

@media (max-width: 768px) {
    .video-embed-container {
        padding-bottom: 75%; /* Adjust for mobile if needed */
    }
}

/* Product page specific styles */
.product-title {
    font-weight: 300;
    letter-spacing: -0.02em;
    line-height: 1.1;
}

.product-prose {
    font-size: 1.125rem;
    line-height: 1.75;
}

@media (min-width: 768px) {
    .product-prose {
        font-size: 1.25rem;
    }
}

/* Clean section dividers */
.section-divider {
    border-top: 1px solid #e5e7eb;
}

/* Enhanced hover effects */
.image-hover {
    transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

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

/* Typography improvements */
.font-light {
    font-weight: 300;
}

/* Spacing utilities for product pages */
.space-y-20 > * + * {
    margin-top: 5rem;
}

/* Clean grid layouts */
.product-grid {
    display: grid;
    gap: 2rem;
}

@media (min-width: 768px) {
    .product-grid {
        gap: 3rem;
    }
}

/* WordPress specific styles */
.alignleft {
    float: left;
    margin-right: 1.5em;
}

.alignright {
    float: right;
    margin-left: 1.5em;
}

.aligncenter {
    display: block;
    margin: 0 auto;
}

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

.wp-caption-text {
    text-align: center;
    margin-top: 0.5em;
    font-size: 0.875em;
    color: #666;
}

/* Screen reader text */
.screen-reader-text {
    clip: rect(1px, 1px, 1px, 1px);
    position: absolute !important;
    height: 1px;
    width: 1px;
    overflow: hidden;
}

.screen-reader-text:focus {
    background-color: #f1f1f1;
    border-radius: 3px;
    box-shadow: 0 0 2px 2px rgba(0, 0, 0, 0.6);
    clip: auto !important;
    color: #21759b;
    display: block;
    font-size: 14px;
    font-size: 0.875rem;
    font-weight: bold;
    height: auto;
    left: 5px;
    line-height: normal;
    padding: 15px 23px 14px;
    text-decoration: none;
    top: 5px;
    width: auto;
    z-index: 100000;
}

/* Reviews Page Specific Styles */
.reviews-hero-rating {
    font-size: 2.5rem;
    font-weight: 700;
    color: #c09853;
}

.review-card {
    transition: all 0.3s ease;
    border: 1px solid transparent;
}

.review-card:hover {
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
    border-color: rgba(192, 152, 83, 0.2);
    transform: translateY(-2px);
}

.review-stars {
    color: #fbbf24;
}

.review-avatar {
    background: linear-gradient(135deg, #c09853 0%, #a17c42 100%);
}

.review-tag {
    background-color: #f7fafc;
    color: #1a202c;
    font-size: 0.75rem;
    padding: 0.25rem 0.5rem;
    border-radius: 9999px;
    transition: all 0.2s ease;
}

.review-tag:hover {
    background-color: #c09853;
    color: white;
}

.review-filter-select {
    border: 1px solid #d1d5db;
    border-radius: 0.375rem;
    padding: 0.5rem 0.75rem;
    font-size: 0.875rem;
    transition: all 0.2s ease;
}

.review-filter-select:focus {
    outline: none;
    border-color: #c09853;
    box-shadow: 0 0 0 3px rgba(192, 152, 83, 0.1);
}

.review-cta-section {
    background: linear-gradient(135deg, #1a202c 0%, #2d3748 100%);
}

.load-more-button {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.load-more-button:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.review-count-badge {
    background: linear-gradient(135deg, #c09853 0%, #a17c42 100%);
    color: white;
    font-weight: 600;
    padding: 0.5rem 1rem;
    border-radius: 9999px;
    font-size: 0.875rem;
}

/* Review grid masonry-like layout */
@media (min-width: 768px) {
    .reviews-masonry {
        column-count: 2;
        column-gap: 1.5rem;
    }
}

@media (min-width: 1024px) {
    .reviews-masonry {
        column-count: 3;
    }
}

.reviews-masonry .review-card {
    break-inside: avoid;
    margin-bottom: 1.5rem;
}

/* Trust indicator animations */
.trust-indicator {
    transition: all 0.3s ease;
}

.trust-indicator:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
}

/* Loading spinner animation */
@keyframes spin {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

.animate-spin {
    animation: spin 1s linear infinite;
}

/* Google logo colors */
.google-logo-blue { fill: #4285F4; }
.google-logo-green { fill: #34A853; }
.google-logo-yellow { fill: #FBBC05; }
.google-logo-red { fill: #EA4335; }

/* Responsive improvements */
@media (max-width: 640px) {
    .reviews-hero-rating {
        font-size: 2rem;
    }
    
    .review-card {
        padding: 1rem;
    }
    
    .review-filter-controls {
        flex-direction: column;
        gap: 1rem;
    }
}

/* Schema markup hidden */
script[type="application/ld+json"] {
    display: none;
}

/* Conversion-focused enhancements */
.pulse-glow {
    animation: pulse-glow 2s infinite;
}

@keyframes pulse-glow {
    0%, 100% {
        box-shadow: 0 0 0 0 rgba(192, 152, 83, 0.7);
    }
    50% {
        box-shadow: 0 0 0 10px rgba(192, 152, 83, 0);
    }
}



/* Contact Page Styles */
.contact-page .aspect-video iframe {
    width: 100%;
    height: 100%;
    border: 0;
    border-radius: 0 0 1rem 1rem;
}

.contact-page form input:focus,
.contact-page form textarea:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(192, 152, 83, 0.1);
    border-color: #c09853;
}

.contact-page form input,
.contact-page form textarea {
    border: 2px solid #e5e7eb;
    transition: all 0.2s ease-in-out;
}

.contact-page form input:hover,
.contact-page form textarea:hover {
    border-color: #d1d5db;
}

.contact-page .success-message {
    animation: slideInDown 0.5s ease-out;
}

.contact-page .error-message {
    animation: shake 0.5s ease-in-out;
}

@keyframes slideInDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes shake {
    0%, 20%, 50%, 80%, 100% {
        transform: translateX(0);
    }
    10%, 30%, 70%, 90% {
        transform: translateX(-5px);
    }
    40%, 60% {
        transform: translateX(5px);
    }
}

/* Form validation styles */
.contact-page form input:invalid:not(:focus):not(:placeholder-shown),
.contact-page form textarea:invalid:not(:focus):not(:placeholder-shown) {
    border-color: #ef4444;
    background-color: #fef2f2;
}

.contact-page form input:valid:not(:focus):not(:placeholder-shown),
.contact-page form textarea:valid:not(:focus):not(:placeholder-shown) {
    border-color: #10b981;
    background-color: #f0fdf4;
}

/* Contact info card hover effects */
.contact-page .contact-info-card {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.contact-page .contact-info-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

/* Mobile Menu Responsive Styles */
#mobile-menu {
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
}

@media (max-width: 640px) {
    /* Ensure hamburger menu is always accessible */
    #mobile-menu-button {
        min-width: 44px;
        min-height: 44px;
        flex-shrink: 0;
        margin-left: 0;
    }
    
    /* Reduce header padding on smallest screens */
    header .container {
        padding-left: 0.75rem;
        padding-right: 0.75rem;
    }
    
    /* Ensure header nav has proper spacing */
    header nav {
        gap: 0.5rem;
    }
    
    /* Logo container - prevent overflow */
    .custom-logo {
        flex-shrink: 1;
        min-width: 0;
        overflow: hidden;
    }
    
    /* Ensure logo doesn't overflow */
    .custom-logo img {
        max-height: 36px;
        width: auto;
        max-width: 100%;
    }
    
    /* Site title - prevent overflow on very small screens */
    header .text-2xl {
        font-size: 1.25rem;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        max-width: calc(100vw - 120px); /* Reserve space for hamburger menu */
    }
    
    /* Mobile header elements container */
    .lg\\:hidden {
        margin-left: auto;
        flex-shrink: 0;
    }
    
    /* Mobile menu items touch-friendly */
    .mobile-menu a {
        min-height: 44px;
        display: flex;
        align-items: center;
    }
}

/* Tablet responsive adjustments */
@media (min-width: 641px) and (max-width: 1023px) {
    /* Optimize spacing for tablet */
    header .container {
        padding-left: 1.5rem;
        padding-right: 1.5rem;
    }
    
    /* Adjust logo size for tablet */
    .custom-logo img {
        max-height: 45px;
        width: auto;
    }
}

/* Hero Section Mobile Optimizations */
@media (max-width: 768px) {
    .hero-section h1 {
        font-size: 2rem;
        line-height: 1.2;
    }
    
    .hero-section .flex-col,
    .hero-section .sm\\:flex-row {
        flex-direction: column;
        gap: 1rem;
    }
    
    .hero-section .grid-cols-1 {
        gap: 1.5rem;
    }
    
    .hero-section .grid {
        gap: 2rem;
    }
}

@media (max-width: 640px) {
    .hero-section h1 {
        font-size: 1.875rem;
        line-height: 1.1;
        margin-bottom: 1rem;
    }
    
    .hero-section p {
        font-size: 1rem;
        margin-bottom: 1.5rem;
    }
}

/* Button Mobile Optimizations */
@media (max-width: 640px) {
    .hero-section a,
    .cta-section a,
    .products-section a {
        padding: 12px 24px;
        font-size: 0.95rem;
        font-weight: 600;
    }
}

/* Container responsive improvements */
.container {
    max-width: 100%;
    margin-left: auto;
    margin-right: auto;
}

@media (min-width: 640px) {
    .container {
        max-width: 640px;
    }
}

@media (min-width: 768px) {
    .container {
        max-width: 768px;
    }
}

@media (min-width: 1024px) {
    .container {
        max-width: 1024px;
    }
}

@media (min-width: 1280px) {
    .container {
        max-width: 1280px;
    }
}

/* Story Section Mobile Optimizations */
@media (max-width: 1023px) {
    .story-section .relative {
        height: 300px;
    }
    
    .story-section .grid {
        gap: 2rem;
    }
}

/* Testimonials Mobile Grid Fix */
@media (max-width: 1023px) {
    .testimonials-section .lg\\:grid-cols-3 {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .testimonials-section .flex-wrap {
        flex-direction: column;
        align-items: center;
        gap: 1.5rem;
    }
}

/* Products Section Mobile Optimization */
@media (max-width: 768px) {
    .products-section .grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .products-section .group {
        margin-bottom: 1rem;
    }
}

/* Touch-friendly interactive elements */
@media (max-width: 1023px) {
    button, a, .clickable {
        min-height: 44px;
        min-width: 44px;
    }
    
    /* Increase tap targets */
    .mobile-menu a,
    #mobile-menu button,
    #mobile-menu a {
        padding: 12px 16px;
        margin: 2px 0;
    }
}

/* Prevent horizontal scroll */
body, html {
    overflow-x: hidden;
    width: 100%;
}

.container {
    width: 100%;
    box-sizing: border-box;
}

/* Ensure header never overflows */
header {
    width: 100%;
    box-sizing: border-box;
}

header nav {
    width: 100%;
    min-width: 0;
    box-sizing: border-box;
}

/* Force proper flexbox behavior */
@media (max-width: 640px) {
    header nav > div:first-child {
        flex: 1 1 0;
        min-width: 0;
    }
    
    header nav > div:last-child {
        flex: 0 0 auto;
    }
}

/* Map container responsive adjustments */
.contact-page .map-container {
    position: relative;
    overflow: hidden;
}

.contact-page .map-container iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

/* Mobile optimizations */
@media (max-width: 768px) {
    .contact-page .grid.lg\\:grid-cols-2 {
        gap: 2rem;
    }
    
    .contact-page form .grid.md\\:grid-cols-2 {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
}

/* Enhanced CTA buttons */
.cta-primary {
    position: relative;
    overflow: hidden;
}

.cta-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.6s;
}

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

/* Trust signals styling */
.trust-signal {
    transition: all 0.3s ease;
    border: 1px solid transparent;
}

.trust-signal:hover {
    transform: translateY(-2px);
    border-color: rgba(192, 152, 83, 0.3);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

/* Pricing anchor styling */
.pricing-anchor {
    background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
    border: 1px solid #e2e8f0;
    transition: all 0.3s ease;
}

.pricing-anchor:hover {
    background: linear-gradient(135deg, #e2e8f0 0%, #cbd5e0 100%);
    transform: translateY(-1px);
}

/* Star ratings animation */
.star-rating {
    display: inline-flex;
    animation: fadeInScale 0.6s ease-out;
}

@keyframes fadeInScale {
    0% {
        opacity: 0;
        transform: scale(0.8);
    }
    100% {
        opacity: 1;
        transform: scale(1);
    }
}

/* Mobile-first responsive enhancements */
@media (max-width: 768px) {
    /* Hero section mobile optimization */
    .hero-cta-buttons {
        flex-direction: column;
        gap: 1rem;
    }
    
    .hero-cta-buttons a,
    .hero-cta-buttons button {
        width: 100%;
        padding: 1rem 2rem;
        font-size: 1.125rem;
    }
    
    /* Trust signals mobile stacking */
    .trust-signals-grid {
        grid-template-columns: 1fr;
        gap: 0.75rem;
    }
    
    /* Product cards mobile spacing */
    .product-card {
        margin-bottom: 2rem;
    }
    
    .product-card .pricing-anchor {
        margin: 0.75rem 0;
        padding: 0.75rem;
    }
    
    /* Testimonials mobile stacking */
    .testimonials-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    /* CTA section mobile optimization */
    .cta-main-button {
        width: 100%;
        padding: 1.25rem 2rem;
        font-size: 1.25rem;
    }
    
    .cta-features-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
        text-align: center;
    }
}

/* High contrast focus states for accessibility */
.focus-visible:focus {
    outline: 3px solid #c09853;
    outline-offset: 2px;
}

/* Urgency indicators */
.urgency-pulse {
    animation: urgencyPulse 1.5s infinite;
}

@keyframes urgencyPulse {
    0%, 100% {
        opacity: 1;
        transform: scale(1);
    }
    50% {
        opacity: 0.8;
        transform: scale(1.05);
    }
}

/* Conversion tracking visual feedback */
.conversion-success {
    animation: conversionSuccess 0.6s ease-out;
}

@keyframes conversionSuccess {
    0% {
        transform: scale(0.8);
        opacity: 0;
    }
    50% {
        transform: scale(1.1);
    }
    100% {
        transform: scale(1);
        opacity: 1;
    }
}