/*
 * Block-specific styles for Home Services - Lead Gen Theme
 * 
 * @package Home_Services_LeadGen
 * @since 1.0.0
 */

/* ==========================================================================
   Hero Section Styles
   ========================================================================== */

.hero-section {
    position: relative;
    min-height: 600px;
    display: flex;
    align-items: center;
    background-size: cover;
    background-position: center;
    background-color: var(--wp--preset--color--primary);
    color: var(--wp--preset--color--light);
    padding: 80px 0;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: #000;
    z-index: 1;
}

.hero-section .container {
    position: relative;
    z-index: 2;
    max-width: var(--wp--preset--layout--content-size);
    margin: 0 auto;
    padding: 0 20px;
}

.hero-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    align-items: center;
}

.hero-headline {
    font-size: var(--wp--preset--font-size--gigantic);
    margin-bottom: 20px;
    line-height: 1.2;
    font-weight: 700;
}

.hero-subheadline {
    font-size: var(--wp--preset--font-size--large);
    margin-bottom: 30px;
    opacity: 0.9;
    line-height: 1.6;
}

.hero-cta-button {
    display: inline-block;
    padding: 15px 30px;
    background: var(--wp--preset--color--secondary);
    color: var(--wp--preset--color--light);
    text-decoration: none;
    border-radius: 6px;
    font-weight: 600;
    font-size: var(--wp--preset--font-size--medium);
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
}

.hero-cta-button:hover {
    background: var(--wp--preset--color--accent);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
}

.hero-form {
    background: rgba(255, 255, 255, 0.95);
    padding: 30px;
    border-radius: 10px;
    color: var(--wp--preset--color--body-text);
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
}

.form-wrapper {
    max-width: 100%;
}

/* ==========================================================================
   Layout & Container Styles
   ========================================================================== */

.container {
    max-width: var(--wp--preset--layout--content-size);
    margin: 0 auto;
    padding: 0 20px;
}

.section-header {
    text-align: center;
    margin-bottom: 50px;
}

.section-title {
    font-size: var(--wp--preset--font-size--huge);
    color: var(--wp--preset--color--heading);
    margin-bottom: 15px;
    font-weight: 600;
}

.section-description {
    font-size: var(--wp--preset--font-size--large);
    color: var(--wp--preset--color--body-text);
    max-width: 600px;
    margin: 0 auto;
    line-height: 1.6;
}

/* ==========================================================================
   Partners/Trust Section Styles
   ========================================================================== */

.partners-section {
    padding: 40px 0;
    background: var(--wp--preset--color--background-alt);
}

.partners-grid {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 40px;
    flex-wrap: wrap;
    margin-top: 30px;
}

.partner-logo {
    opacity: 0.7;
    transition: opacity 0.3s ease;
    filter: grayscale(100%);
}

.partner-logo:hover {
    opacity: 1;
    filter: grayscale(0%);
}

.partner-logo img {
    max-height: 60px;
    width: auto;
    max-width: 150px;
}

.partner-name {
    font-size: var(--wp--preset--font-size--small);
    color: var(--wp--preset--color--body-text);
    text-align: center;
    padding: 10px;
}

/* ==========================================================================
   Services Section Styles
   ========================================================================== */

.services-section {
    padding: 80px 0;
    background: var(--wp--preset--color--background);
}

.services-grid {
    display: grid;
    gap: 30px;
}

.services-grid.columns-3 {
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
}

.services-grid.columns-4 {
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
}

.service-card {
    background: var(--wp--preset--color--background);
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    transition: all 0.3s ease;
    border: 1px solid var(--wp--preset--color--border);
}

.service-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0,0,0,0.15);
    border-color: var(--wp--preset--color--primary);
}

.service-link {
    text-decoration: none;
    color: inherit;
    display: block;
}

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

.service-image img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    transition: transform 0.3s ease;
}

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

.service-content {
    padding: 25px;
}

.service-title {
    font-size: var(--wp--preset--font-size--x-large);
    margin-bottom: 10px;
    color: var(--wp--preset--color--heading);
    font-weight: 600;
}

.service-excerpt {
    color: var(--wp--preset--color--body-text);
    margin-bottom: 15px;
    line-height: 1.6;
}

.service-learn-more {
    color: var(--wp--preset--color--primary);
    font-weight: 600;
    font-size: var(--wp--preset--font-size--small);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* ==========================================================================
   Testimonials Section Styles
   ========================================================================== */

.testimonials-section {
    padding: 80px 0;
    background: var(--wp--preset--color--background-alt);
}

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

.testimonials-slider {
    /* Slider styles would go here when implementing */
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

.testimonial-card {
    background: var(--wp--preset--color--background);
    padding: 30px;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    position: relative;
}

.testimonial-card::before {
    content: '"';
    position: absolute;
    top: -10px;
    left: 20px;
    font-size: 60px;
    color: var(--wp--preset--color--primary);
    opacity: 0.3;
    font-family: serif;
}

.testimonial-rating {
    margin-bottom: 15px;
    display: flex;
    gap: 2px;
}

.star {
    color: #FFC107;
    font-size: 16px;
}

.star.empty {
    opacity: 0.3;
}

.testimonial-content {
    font-style: italic;
    margin-bottom: 20px;
    line-height: 1.6;
    font-size: var(--wp--preset--font-size--medium);
}

.testimonial-content p {
    margin: 0;
}

.testimonial-author {
    display: flex;
    align-items: center;
    gap: 15px;
}

.author-photo {
    flex-shrink: 0;
}

.author-photo img {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    object-fit: cover;
}

.author-name {
    font-weight: 600;
    font-style: normal;
    color: var(--wp--preset--color--heading);
    font-size: var(--wp--preset--font-size--medium);
}

/* ==========================================================================
   Final CTA Section Styles
   ========================================================================== */

.final-cta-section {
    background: var(--wp--preset--color--primary);
    color: var(--wp--preset--color--light);
    padding: 80px 0;
    text-align: center;
    position: relative;
}

.final-cta-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, var(--wp--preset--color--primary) 0%, var(--wp--preset--color--accent) 100%);
    opacity: 0.9;
}

.cta-content {
    position: relative;
    z-index: 1;
}

.cta-headline {
    font-size: var(--wp--preset--font-size--x-large);
    margin-bottom: 20px;
    font-weight: 700;
}

.cta-description {
    font-size: var(--wp--preset--font-size--medium);
    margin-bottom: 30px;
    opacity: 0.9;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
    line-height: 1.6;
}

.cta-button {
    display: inline-block;
    padding: 12px 24px;
    background: var(--wp--preset--color--secondary);
    color: var(--wp--preset--color--light);
    text-decoration: none;
    border-radius: 6px;
    font-weight: 600;
    font-size: var(--wp--preset--font-size--small);
    transition: all 0.3s ease;
    border: 2px solid var(--wp--preset--color--secondary);
}

.cta-button:hover {
    background: transparent;
    color: var(--wp--preset--color--secondary);
    border-color: var(--wp--preset--color--secondary);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0,0,0,0.2);
}

/* ==========================================================================
   Responsive Design
   ========================================================================== */

/* Tablet styles */
@media (max-width: 1024px) {
    .services-grid.columns-4 {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .partners-grid {
        gap: 30px;
    }
    
    .hero-content {
        gap: 30px;
    }
}

/* Mobile styles */
@media (max-width: 768px) {
    .hero-content {
        grid-template-columns: 1fr;
        text-align: center;
    }
    
    .hero-headline {
        font-size: var(--wp--preset--font-size--xx-large);
    }
    
    .hero-subheadline {
        font-size: var(--wp--preset--font-size--medium);
    }
    
    .services-grid.columns-3,
    .services-grid.columns-4 {
        grid-template-columns: 1fr;
    }
    
    .testimonials-grid {
        grid-template-columns: 1fr;
    }
    
    .partners-grid {
        gap: 20px;
    }
    
    .section-title {
        font-size: var(--wp--preset--font-size--xx-large);
    }
    
    .services-section,
    .testimonials-section {
        padding: 60px 0;
    }
    
    .final-cta-section {
        padding: 60px 0;
    }
    
    .cta-headline {
        font-size: var(--wp--preset--font-size--xx-large);
    }
    
    .container {
        padding: 0 15px;
    }
}

/* Small mobile */
@media (max-width: 480px) {
    .hero-section {
        min-height: 500px;
        padding: 60px 0;
    }
    
    .hero-form {
        padding: 20px;
    }
    
    .service-content {
        padding: 20px;
    }
    
    .testimonial-card {
        padding: 20px;
    }
    
    .cta-button {
        padding: 15px 30px;
        font-size: var(--wp--preset--font-size--medium);
    }
}

/* ==========================================================================
   Single Service Page Styles
   ========================================================================== */

/* Service Hero Section */
.service-hero-section {
    position: relative;
    min-height: 600px;
    display: flex;
    align-items: center;
    background-size: cover;
    background-position: center;
    background-color: var(--wp--preset--color--primary);
    color: var(--wp--preset--color--light);
    padding: 80px 0;
}

.service-hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.6);
    z-index: 1;
}

.service-hero-section .container {
    position: relative;
    z-index: 2;
}

.service-hero-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 50px;
    align-items: center;
}

.service-hero-title {
    font-size: var(--wp--preset--font-size--xx-large);
    color: var(--wp--preset--color--light);
    margin-bottom: 20px;
    font-weight: 700;
    line-height: 1.2;
}

.service-hero-excerpt {
    font-size: var(--wp--preset--font-size--medium);
    color: var(--wp--preset--color--light);
    margin-bottom: 30px;
    line-height: 1.6;
    opacity: 0.9;
}

.service-hero-cta {
    display: flex;
    align-items: center;
    gap: 20px;
    flex-wrap: wrap;
}

.hero-phone {
    color: var(--wp--preset--color--light);
    font-size: var(--wp--preset--font-size--small);
    opacity: 0.9;
}

.service-hero-form {
    background: rgba(255, 255, 255, 0.95);
    padding: 0;
    border-radius: 10px;
    color: var(--wp--preset--color--body-text);
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
    overflow: hidden;
}

.contact-fallback {
    padding: 30px;
}

.contact-fallback h3 {
    color: var(--wp--preset--color--heading);
    margin-bottom: 10px;
    font-size: var(--wp--preset--font-size--large);
}

.contact-fallback p {
    color: var(--wp--preset--color--body-text);
    margin-bottom: 20px;
    font-size: var(--wp--preset--font-size--small);
}

/* Service Content Section */
.service-content-section {
    padding: 80px 0;
}

.service-content-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 50px;
}

.service-main-content {
    max-width: none;
}

.service-content {
    font-size: var(--wp--preset--font-size--small);
    line-height: 1.8;
    margin-bottom: 50px;
}

.service-content h2,
.service-content h3 {
    color: var(--wp--preset--color--heading);
    margin-top: 40px;
    margin-bottom: 20px;
}

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

/* Benefits Section */
.service-benefits {
    margin-bottom: 50px;
}

.service-benefits h2 {
    color: var(--wp--preset--color--heading);
    font-size: var(--wp--preset--font-size--x-large);
    margin-bottom: 30px;
    text-align: center;
}

.benefits-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
}

.benefit-item {
    text-align: center;
    padding: 30px 20px;
    background: var(--wp--preset--color--background);
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    border: 1px solid var(--wp--preset--color--border);
}

.benefit-icon {
    font-size: 48px;
    margin-bottom: 15px;
    display: block;
}

.benefit-item h3 {
    color: var(--wp--preset--color--heading);
    font-size: var(--wp--preset--font-size--medium);
    margin-bottom: 10px;
}

.benefit-item p {
    color: var(--wp--preset--color--body-text);
    line-height: 1.6;
    margin: 0;
    font-size: var(--wp--preset--font-size--small);
}

/* Process Section */
.service-process {
    margin-bottom: 50px;
}

.service-process h2 {
    color: var(--wp--preset--color--heading);
    font-size: var(--wp--preset--font-size--x-large);
    margin-bottom: 30px;
    text-align: center;
}

.process-steps {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
}

.process-step {
    text-align: center;
    position: relative;
}

.step-number {
    width: 60px;
    height: 60px;
    background: var(--wp--preset--color--primary);
    color: var(--wp--preset--color--light);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: var(--wp--preset--font-size--large);
    font-weight: 700;
    margin: 0 auto 20px;
}

.process-step h3 {
    color: var(--wp--preset--color--heading);
    margin-bottom: 15px;
    font-size: var(--wp--preset--font-size--medium);
}

.process-step p {
    color: var(--wp--preset--color--body-text);
    line-height: 1.6;
    margin: 0;
    font-size: var(--wp--preset--font-size--small);
}

/* Service Sidebar */
.service-sidebar {
    position: sticky;
    top: 20px;
    height: fit-content;
}

.service-contact-widget,
.service-areas-widget,
.service-stats-widget {
    background: var(--wp--preset--color--background);
    padding: 30px;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    border: 1px solid var(--wp--preset--color--border);
    margin-bottom: 30px;
}

.service-contact-widget h3,
.service-areas-widget h3,
.service-stats-widget h3 {
    color: var(--wp--preset--color--heading);
    margin-bottom: 15px;
    font-size: var(--wp--preset--font-size--large);
}

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

.phone-link {
    font-size: var(--wp--preset--font-size--large);
    font-weight: 700;
    color: var(--wp--preset--color--primary);
    text-decoration: none;
}

.service-areas-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.service-areas-list li {
    padding: 8px 0;
    border-bottom: 1px solid var(--wp--preset--color--border);
    color: var(--wp--preset--color--body-text);
}

.service-areas-list li:last-child {
    border-bottom: none;
}

.stats-list {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.stat-item {
    text-align: center;
}

.stat-number {
    display: block;
    font-size: var(--wp--preset--font-size--x-large);
    font-weight: 700;
    color: var(--wp--preset--color--primary);
    line-height: 1;
}

.stat-label {
    font-size: var(--wp--preset--font-size--small);
    color: var(--wp--preset--color--body-text);
}

/* Related Services Section */
.related-services-section {
    padding: 80px 0;
    background: var(--wp--preset--color--background-alt);
}

.related-services-section h2 {
    text-align: center;
    color: var(--wp--preset--color--heading);
    font-size: var(--wp--preset--font-size--x-large);
    margin-bottom: 50px;
}

.related-services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

.related-service-card {
    background: var(--wp--preset--color--background);
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    transition: all 0.3s ease;
    border: 1px solid var(--wp--preset--color--border);
}

.related-service-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0,0,0,0.15);
}

.related-service-link {
    text-decoration: none;
    color: inherit;
    display: block;
}

.related-service-image img {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

.related-service-content {
    padding: 25px;
}

.related-service-content h3 {
    color: var(--wp--preset--color--heading);
    margin-bottom: 10px;
    font-size: var(--wp--preset--font-size--large);
}

.related-service-content p {
    color: var(--wp--preset--color--body-text);
    margin-bottom: 15px;
    line-height: 1.6;
    font-size: var(--wp--preset--font-size--small);
}

.related-service-cta {
    color: var(--wp--preset--color--primary);
    font-weight: 600;
    font-size: var(--wp--preset--font-size--small);
}

/* Service Final CTA */
.service-final-cta {
    background: var(--wp--preset--color--primary);
    color: var(--wp--preset--color--light);
    padding: 80px 0;
    text-align: center;
}

.final-cta-content h2 {
    color: var(--wp--preset--color--light);
    font-size: var(--wp--preset--font-size--x-large);
    margin-bottom: 20px;
}

.final-cta-content p {
    font-size: var(--wp--preset--font-size--medium);
    margin-bottom: 30px;
    opacity: 0.9;
}

.final-cta-buttons {
    display: flex;
    justify-content: center;
    gap: 20px;
    flex-wrap: wrap;
}

.cta-button.secondary {
    background: transparent;
    border: 2px solid var(--wp--preset--color--light);
    color: var(--wp--preset--color--light);
    font-size: var(--wp--preset--font-size--small);
}

.cta-button.secondary:hover {
    background: var(--wp--preset--color--light);
    color: var(--wp--preset--color--primary);
}

/* Responsive Design for Service Pages */
@media (max-width: 1024px) {
    .service-content-grid {
        grid-template-columns: 1fr;
        gap: 40px;
    }
    
    .service-hero-content {
        gap: 40px;
    }
    
    .stats-list {
        grid-template-columns: repeat(4, 1fr);
        gap: 15px;
    }
}

/* When form is hidden, center the content */
.service-hero-content:has(.service-hero-text:only-child) {
    grid-template-columns: 1fr;
    text-align: center;
    max-width: 800px;
    margin: 0 auto;
}

@media (max-width: 768px) {
    .service-hero-content {
        grid-template-columns: 1fr;
        text-align: center;
        gap: 30px;
    }
    
    .service-hero-title {
        font-size: var(--wp--preset--font-size--x-large);
    }
    
    .benefits-grid,
    .process-steps {
        grid-template-columns: 1fr;
    }
    
    .related-services-grid {
        grid-template-columns: 1fr;
    }
    
    .service-hero-cta {
        justify-content: center;
    }
    
    .final-cta-buttons {
        flex-direction: column;
        align-items: center;
    }
    
    .stats-list {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 480px) {
    .service-hero-section,
    .service-content-section,
    .related-services-section,
    .service-final-cta {
        padding: 60px 0;
    }
    
    .service-contact-widget,
    .service-areas-widget,
    .service-stats-widget {
        padding: 20px;
    }
}

/* ==========================================================================
   JavaScript Enhancement Styles
   ========================================================================== */

/* Loading button states */
.hero-cta-button.loading,
.cta-button.loading {
    position: relative;
    color: transparent !important;
}

.hero-cta-button.loading::after,
.cta-button.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 16px;
    height: 16px;
    border: 2px solid currentColor;
    border-radius: 50%;
    border-top-color: transparent;
    animation: button-spin 0.8s linear infinite;
}

@keyframes button-spin {
    to {
        transform: translate(-50%, -50%) rotate(360deg);
    }
}

/* Animation utilities */
.fade-in {
    animation: fadeIn 0.6s ease forwards;
}

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

/* Focus states for accessibility */
.hero-cta-button:focus,
.cta-button:focus,
.service-link:focus {
    outline: 2px solid var(--wp--preset--color--accent);
    outline-offset: 2px;
}

/* Print styles */
@media print {
    .hero-section,
    .final-cta-section {
        background: white !important;
        color: black !important;
    }
    
    .hero-form,
    .cta-button,
    .hero-cta-button {
        display: none;
    }
}