/* Global styles */
:root {
    --primary-color: #5a8f5c;     /* Green from logo */
    --primary-light: #7baf7d;     /* Lighter version of the green */
    --primary-dark: #487a4a;      /* Darker version of the green */
    --secondary-color: #e9c46a;   /* Yellow from logo */
    --secondary-light: #f2d689;   /* Lighter version of the yellow */
    --secondary-dark: #d9b44a;    /* Darker version of the yellow */
    --accent-color: #e76f51;      /* Complementary warm color for CTAs */
    --text-color: #333;
    --text-light: #666;
    --bg-color: #fff;
    --bg-light: #f9f9f9;
    --bg-accent: #f2f7f2;         /* Very light green background */
    --shadow: 0 8px 20px rgba(90, 143, 92, 0.15);  /* Shadow with primary color */
    --border-radius: 10px;
    --transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);

    /* Cool gradient */
    --cool-gradient: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
    --cool-gradient-hover: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary-color) 100%);
    --secondary-gradient: linear-gradient(135deg, var(--secondary-color) 0%, var(--secondary-dark) 100%);
    
    /* Dark mode variables */
    --dark-bg: #1e2a1e;           /* Dark green-tinted background */
    --dark-bg-light: #2e3e2e;     /* Lighter dark green background */
    --dark-text: #f5f5f5;
    --dark-text-light: #ddd;
    --dark-accent: #3a5a3a;       /* Dark accent for cards in dark mode */

    /* New background color for Instagram section */
    --bg-alt: #f9f9f9;
    --dark-bg-alt: #1e2a1e;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Montserrat', sans-serif;
    line-height: 1.6;
    color: var(--text-color);
    background-color: var(--bg-color);
    transition: var(--transition);
    overflow-x: hidden;
}

body.dark-mode {
    --bg-color: var(--dark-bg);
    --bg-light: var(--dark-bg-light);
    --text-color: var(--dark-text);
    --text-light: var(--dark-text-light);
}

/* Common styles for all pages */
main {
    min-height: 80vh;
    padding-top: 80px; /* Match the navbar height */
}

/* Further adjustments for specific pages if needed */
body.home main {
    padding-top: 80px; /* Specific for home page */
}

h1, h2, h3 {
    margin-bottom: 1rem;
    font-weight: 600;
    line-height: 1.3;
}

h1 {
    font-size: 2.5rem;
}

h2 {
    font-size: 2.2rem;
    margin-bottom: 2.5rem;
    position: relative;
    display: inline-block;
    color: var(--text-color);
    text-shadow: none;
}

h2:after {
    content: '';
    position: absolute;
    width: 100%;
    height: 4px;
    background: var(--secondary-gradient);
    bottom: -12px;
    left: 0;
    border-radius: 2px;
}

h3 {
    font-size: 1.5rem;
}

p {
    margin-bottom: 1rem;
    color: var(--text-light);
}

a {
    text-decoration: none;
    color: var(--primary-color);
    transition: var(--transition);
}

a:hover {
    color: var(--secondary-color);
}

section {
    padding: 5rem 2rem;
    max-width: 1200px;
    margin: 0 auto;
}

/* Button styles */
.btn-primary, .btn-secondary {
    display: inline-block;
    padding: 14px 28px;
    border-radius: 30px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: var(--transition);
    cursor: pointer;
    position: relative;
    overflow: hidden;
    z-index: 1;
}

.btn-primary {
    background: var(--cool-gradient);
    color: white;
    border: none;
}

.btn-primary::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--cool-gradient-hover);
    z-index: -1;
    transition: opacity 0.5s ease;
    opacity: 0;
}

.btn-primary:hover::before {
    opacity: 1;
}

.btn-primary:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0,0,0,0.1);
}

.btn-secondary {
    background-color: transparent;
    color: var(--primary-color);
    border: 2px solid var(--primary-color);
}

.btn-secondary:hover {
    background-color: var(--primary-color);
    color: white;
    transform: translateY(-3px);
    box-shadow: var(--shadow);
}

/* Hero section */
.hero {
    position: relative;
    min-height: 90vh;
    background: var(--bg-color);
    overflow: hidden;
    display: flex;
    align-items: center;
    padding: 0;
}

.hero::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -20%;
    width: 80%;
    height: 200%;
    background: var(--cool-gradient);
    opacity: 0.8;
    transform: rotate(-10deg);
    z-index: 0;
    border-radius: 30% 70% 70% 30% / 30% 30% 70% 70%;
    box-shadow: var(--shadow);
}

.hero-content {
    position: relative;
    z-index: 1;
    padding: 4rem;
    max-width: 600px;
    background-color: rgba(255, 255, 255, 0.9);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
}

.hero-content h1 {
    margin-bottom: 1.5rem;
    color: var(--primary-color);
}

.hero-content p {
    font-size: 1.2rem;
    margin-bottom: 2rem;
}

.hero-image {
    position: relative;
    z-index: 1;
    margin-left: auto;
    margin-right: 4rem;
}

.hero-image img {
    border-radius: 30% 70% 70% 30% / 30% 30% 70% 70%;
    box-shadow: var(--shadow);
    transform: translateY(-8px);
    transition: transform 0.5s ease;
    animation: float 6s ease-in-out infinite;
}

@keyframes float {
    0% {
        transform: translateY(0px);
    }
    50% {
        transform: translateY(-15px);
    }
    100% {
        transform: translateY(0px);
    }
}

/* About preview section */
.about-preview {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 2rem;
}

.about-image {
    flex: 1 1 400px;
    max-width: 500px;
}

.about-image img {
    width: 100%;
    height: auto;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
}

.about-content {
    flex: 1 1 400px;
}

/* Services preview section */
.services-preview {
    text-align: center;
    background-color: var(--bg-light);
    border-radius: var(--border-radius);
    padding: 5rem 2rem;
}

.services-container {
    display: flex;
    flex-wrap: wrap;
    gap: 2rem;
    justify-content: center;
    max-width: 1200px;
    margin: 0 auto;
}

/* Service card layout - RESPONSIVE VERSION */
.service-card {
    background-color: var(--bg-color);
    padding: 2.5rem;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    transition: var(--transition);
    position: relative;
    overflow: visible; /* Allow content to be fully visible */
    display: flex;
    flex-direction: column;
    text-align: center;
    flex: 1 1 300px;
    max-width: 350px;
    min-height: 550px; /* Minimum height instead of fixed height */
    z-index: 1;
    margin-bottom: 2rem;
}

.service-card::before {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 0;
    background-color: var(--primary-color);
    opacity: 0.05;
    transition: var(--transition);
    z-index: -1;
}

.service-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 30px rgba(90, 143, 92, 0.2);
}

.service-card:hover::before {
    height: 100%;
    opacity: 0.1;
}

/* Service card top content */
.service-card-top {
    flex-grow: 0;
    margin-bottom: 2rem;
}

/* Service card bottom content - explicitly push to bottom */
.service-card-bottom {
    margin-top: auto;
    border-top: 1px solid rgba(90, 143, 92, 0.2);
    padding-top: 1.5rem;
    width: 100%;
}

/* Service image */
.service-image {
    width: 100%;
    max-width: 220px;
    height: 160px;
    overflow: hidden;
    border-radius: var(--border-radius);
    margin: 0 auto 1.5rem;
}

.service-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Simplificar los estilos del icono SVG ya que el color está definido en el archivo */
.service-svg-icon {
    width: 4rem;
    height: 4rem;
    transition: var(--transition);
}

/* Mantener la animación al hacer hover */
.service-card:hover .service-svg-icon {
    animation: iconBounce 0.8s ease forwards;
}

/* Service detail styling */
.service-details {
    list-style-type: none;
    margin-bottom: 1.5rem;
    color: var(--text-light);
    text-align: left;
    padding-left: 0;
}

.service-details li {
    margin-bottom: 0.5rem;
    position: relative;
    padding-left: 1.5rem;
}

.service-details li:before {
    content: '✓';
    position: absolute;
    left: 0;
    color: var(--primary-color);
}

/* Price styling */
.service-price {
    font-weight: 600;
    color: var(--primary-color);
    font-size: 1.2rem;
    margin-top: 1.5rem;
    display: block;
    text-align: center;
}

/* Responsive adjustments for service cards */
@media screen and (max-width: 768px) {
    .service-card {
        min-height: auto; /* Allow flexible height on mobile */
        padding: 2rem;
    }
    
    .services-container {
        justify-content: center;
    }
    
    .service-card-bottom {
        margin-top: 2rem; /* Fixed spacing instead of auto on mobile */
    }
}

.service-icon {
    font-size: 3rem;
    color: var(--secondary-color);
    margin-bottom: 1.5rem;
    transition: var(--transition);
    display: flex;
    justify-content: center;
    align-items: center;
    height: 60px;
}

.service-icon i {
    font-size: 3rem;
}

/* Make icon bounce and rotate exactly once on hover */
.service-card:hover .service-icon {
    animation: iconBounce 0.8s ease forwards; /* 'forwards' keeps the animation in final state */
    color: var(--secondary-color);
}

/* Reset animation when hover ends to allow it to replay on next hover */
.service-card .service-icon {
    animation: none;
}

@keyframes iconBounce {
    0% {
        transform: translateY(0) rotate(0deg);
    }
    25% {
        transform: translateY(-10px) rotate(5deg);
    }
    50% {
        transform: translateY(0) rotate(0deg);
    }
    75% {
        transform: translateY(-5px) rotate(-5deg);
    }
    100% {
        transform: translateY(0) rotate(0deg);
    }
}

/* Alternative animation if the bounce is too much */
@keyframes iconWiggle {
    0%, 100% {
        transform: rotate(0deg) scale(1);
    }
    25% {
        transform: rotate(10deg) scale(1.1);
    }
    50% {
        transform: rotate(-10deg) scale(1.1);
    }
    75% {
        transform: rotate(5deg) scale(1.05);
    }
}

.service-title {
    color: var(--primary-dark);
    margin-bottom: 1rem;
}

.service-description {
    margin-bottom: 1.5rem;
}

.services-cta {
    margin-top: 2rem;
}

/* Testimonial section */
.testimonial-preview {
    position: relative;
    padding: 6rem 2rem;
    overflow: hidden;
    background-color: var(--bg-accent);
}

.testimonial-preview::before {
    content: '';
    position: absolute;
    top: -10%;
    left: -10%;
    width: 40%;
    height: 50%;
    background-color: var(--secondary-color);
    opacity: 0.05;
    border-radius: 30% 70% 70% 30% / 30% 30% 70% 70%;
}

.testimonial-preview::after {
    content: '';
    position: absolute;
    bottom: -10%;
    right: -10%;
    width: 40%;
    height: 50%;
    background-color: var(--primary-color);
    opacity: 0.05;
    border-radius: 30% 70% 70% 30% / 30% 30% 70% 70%;
}

.testimonial-card {
    max-width: 800px;
    margin: 0 auto;
    padding: 3rem;
    background-color: var(--bg-color);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    position: relative;
    z-index: 1;
}

.testimonial-card::before {
    content: "";
    position: absolute;
    top: 20px;
    left: 20px;
    font-size: 6rem;
    font-family: Georgia, serif;
    color: var(--secondary-color);
    opacity: 0.2;
    line-height: 1;
}

.testimonial-content p {
    font-style: italic;
    font-size: 1.2rem;
    margin-bottom: 1.5rem;
}

.testimonial-stars {
    color: var(--secondary-color);
    margin-bottom: 1rem;
}

.testimonial-stars i {
    margin: 0 2px;
}

/* CTA section */
.cta-section {
    text-align: center;
    position: relative;
    background: var(--cool-gradient);
    color: white;
    border-radius: var(--border-radius);
    padding: 5rem 2rem;
    margin-bottom: 5rem;
    overflow: hidden;
}

.cta-section::before {
    content: '';
    position: absolute;
    top: -30%;
    left: -10%;
    width: 60%;
    height: 160%;
    background-color: rgba(255, 255, 255, 0.1);
    transform: rotate(-30deg);
    border-radius: 30% 70% 70% 30% / 30% 30% 70% 70%;
}

.cta-section::after {
    content: '';
    position: absolute;
    bottom: -30%;
    right: -10%;
    width: 60%;
    height: 160%;
    background-color: rgba(0, 0, 0, 0.05);
    transform: rotate(-30deg);
    border-radius: 30% 70% 70% 30% / 30% 30% 70% 70%;
}

.cta-section h2, .cta-section p {
    position: relative;
    z-index: 1;
    color: white;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.cta-section .btn-primary {
    background: var(--secondary-gradient);
    color: var(--text-color);
    margin-top: 2rem;
    z-index: 2;
}

/* Form styles */
.form-group {
    margin-bottom: 1.5rem;
}

label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
}

input, textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: var(--border-radius);
    font-family: 'Montserrat', sans-serif;
    transition: var(--transition);
}

input:focus, textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 2px rgba(90, 143, 92, 0.2);
}

button {
    cursor: pointer;
}

/* Responsive styles */
@media screen and (max-width: 768px) {
    h1 {
        font-size: 2rem;
    }
    
    h2 {
        font-size: 1.8rem;
    }
    
    section {
        padding: 3rem 1.5rem;
    }
    
    .hero {
        flex-direction: column;
        padding-top: 80px;
        min-height: auto;
        padding-bottom: 2rem;
    }
    
    .hero-content {
        padding: 2rem 1.5rem;
        width: 90%;
        margin: 0 auto;
        text-align: center;
        z-index: 2;
    }
    
    .hero-content h1 {
        font-size: 1.8rem;
        margin-bottom: 1rem;
    }
    
    .hero-content p {
        font-size: 1rem;
        margin-bottom: 1.5rem;
    }
    
    .hero-image {
        margin: 1rem auto;
        width: 80%;
        max-width: 300px;
    }
    
    .hero-image img {
        width: 100%;
        height: auto;
    }
    
    .about-content, .about-image {
        flex: 1 1 100%;
        text-align: center;
    }
    
    .about-image {
        margin: 0 auto 2rem;
        max-width: 300px;
    }
    
    /* Botones más touch-friendly */
    .btn-primary, .btn-secondary {
        padding: 12px 24px;
        display: block;
        margin: 0 auto;
        width: 80%;
        text-align: center;
    }
    
    h2 {
        font-size: 1.8rem;
        margin-bottom: 2rem;
        text-align: center;
    }
}

/* Dark mode enhancements */
body.dark-mode .service-card {
    background-color: var(--dark-accent);
    box-shadow: 0 8px 15px rgba(0, 0, 0, 0.3);
}

body.dark-mode .testimonial-card {
    background-color: var(--dark-accent);
    box-shadow: 0 8px 15px rgba(0, 0, 0, 0.3);
}

body.dark-mode .service-icon {
    color: var(--secondary-light);
}

body.dark-mode .hero {
    background-image: linear-gradient(135deg, var(--dark-bg) 0%, var(--dark-bg-light) 100%);
}

body.dark-mode .hero-content {
    background-color: rgba(30, 42, 30, 0.9);
}

/* Cool scrollbar */
::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-track {
    background: var(--bg-light);
}

::-webkit-scrollbar-thumb {
    background: var(--primary-light);
    border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--primary-color);
}

/* Ensure all images are properly styled */
img {
    max-width: 100%;
    height: auto;
    display: block;
}

.about-img, .service-image img, .testimonial-image img {
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    transition: var(--transition);
}

.about-img:hover, .service-image img:hover, .testimonial-image img:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 30px rgba(90, 143, 92, 0.2);
}

/* About section */
.about-section {
    background-color: var(--bg-light);
    padding: 5rem 2rem;
    display: flex;
    flex-wrap: wrap;
    gap: 3rem;
    align-items: center;
}

/* Actualización del color de fondo para la sección Sobre Mi */
.about-section {
    background-color: var(--bg-light);
    padding: 5rem 2rem;
}

/* Ajuste en modo oscuro para la misma sección */
body.dark-mode .about-section {
    background-color: var(--dark-bg-light);
} 

.about-image, .about-content {
    flex: 1 1 45%;
}

.about-content ul {
    padding-left: 1.5rem;
    margin-bottom: 1.5rem;
    color: var(--text-light);
}

/* Services section */
.services-section {
    background-color: var(--bg-light);
    padding: 5rem 2rem;
}

.service-details {
    list-style-type: none;
    margin: 1.5rem 0;
    color: var(--text-light);
}

.service-details li {
    margin-bottom: 0.5rem;
    position: relative;
    padding-left: 1.5rem;
}

.service-details li:before {
    content: '✓';
    position: absolute;
    left: 0;
    color: var(--primary-color);
}

.service-price {
    font-weight: 600;
    color: var(--primary-color);
    font-size: 1.2rem;
}

/* Testimonial section */
.testimonial-section {
    padding: 5rem 2rem;
    text-align: center;
    position: relative;
    overflow: hidden;
    background-color: var(--bg-color);
}

.testimonial-section::before {
    content: '';
    position: absolute;
    top: -150px;
    left: -150px;
    width: 300px;
    height: 300px;
    background-color: var(--secondary-color);
    opacity: 0.05;
    border-radius: 50%;
    z-index: 0;
}

.testimonial-section::after {
    content: '';
    position: absolute;
    bottom: -150px;
    right: -150px;
    width: 300px;
    height: 300px;
    background-color: var(--primary-color);
    opacity: 0.05;
    border-radius: 50%;
    z-index: 0;
}

.testimonials-container {
    display: flex;
    flex-wrap: wrap;
    gap: 2.5rem;
    justify-content: center;
    position: relative;
    z-index: 1;
}

.testimonial-card {
    flex: 1 1 400px;
    max-width: 500px;
    background-color: var(--bg-color);
    border-radius: var(--border-radius);
    padding: 2.5rem;
    box-shadow: var(--shadow);
    position: relative;
    transition: var(--transition);
    display: flex;
    flex-direction: column;
    text-align: left;
    border-top: 4px solid var(--secondary-color);
}

.testimonial-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 30px rgba(90, 143, 92, 0.2);
}

.testimonial-content {
    position: relative;
    padding-top: 2rem;
    margin-bottom: 1.5rem;
}

.testimonial-content::before {
    content: '"';
    position: absolute;
    top: -30px;
    left: -10px;
    font-size: 6rem;
    color: var(--secondary-color);
    font-family: Georgia, serif;
    opacity: 0.3;
    line-height: 1;
}

.testimonial-content p {
    font-style: italic;
    font-size: 1.1rem;
    line-height: 1.7;
    margin-bottom: 1.5rem;
    color: var(--text-color);
}

.testimonial-stars {
    margin-bottom: 1rem;
    color: var(--secondary-color);
}

.testimonial-info {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.testimonial-image {
    width: 70px;
    height: 70px;
    border-radius: 50%;
    overflow: hidden;
    flex-shrink: 0;
    border: 3px solid var(--secondary-light);
}

.testimonial-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.testimonial-card h4 {
    font-size: 1.2rem;
    margin-bottom: 0.3rem;
    color: var(--primary-color);
}

.testimonial-card .client-title {
    font-size: 0.9rem;
    color: var(--text-light);
    margin-top: 0;
}

@media screen and (max-width: 768px) {
    .testimonial-card {
        flex: 1 1 100%;
        max-width: 100%;
    }
}

/* KFG-inspired Contact Section */
.contact-section {
    background-color: var(--bg-light);
    padding: 5rem 2rem;
    position: relative;
    overflow: hidden;
}

.section-header {
    text-align: center;
    margin-bottom: 3rem;
}

.section-header p {
    max-width: 600px;
    margin: 0 auto;
    color: var(--text-light);
}

.accent-text {
    color: var(--primary-color);
}

.contact-container {
    display: grid;
    grid-template-columns: 1fr;
    gap: 3rem;
    max-width: 1200px;
    margin: 0 auto;
}

/* Fix Contact Methods Layout - Balance minimum width */
.contact-methods {
    grid-column: 1 / -1;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 1rem;
}

/* Info cards 3-column by default */
.contact-info {
    grid-column: 1 / -1;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
    margin: 2rem 0;
}

/* Map container always full width */
.map-container {
    grid-column: 1 / -1;
    position: relative;
    height: 450px;
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--shadow);
}

/* Contact Methods */
.contact-method-card {
    background-color: var(--bg-color);
    border-radius: var(--border-radius);
    padding: 2.5rem;
    text-align: center;
    box-shadow: var(--shadow);
    transition: var(--transition);
    position: relative;
    overflow: hidden;
    min-width: 350px; /* Reduced from 380px to 300px */
    max-width: 400px; /* Add maximum width */
    margin: 0 auto; /* Center the cards */
    width: 100%;
}

.contact-method-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 30px rgba(90, 143, 92, 0.2);
}

.contact-method-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 5px;
    background: var(--primary-light);
    transition: var(--transition);
}

.contact-method-card:hover::before {
    height: 10px;
}

.contact-method-card.phone::before {
    background: var(--primary-color);
}

.contact-method-card.email::before {
    background: var(--secondary-color);
}

.contact-method-card.instagram::before {
    background: linear-gradient(45deg, #f09433, #e6683c, #dc2743, #cc2366, #bc1888);
}

.method-icon {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.5rem;
    background-color: var(--bg-accent);
    position: relative;
    z-index: 1;
}

.method-icon i {
    font-size: 36px;
    color: var(--primary-color);
}

.contact-method-card.phone .method-icon i {
    color: var(--primary-color);
}

.contact-method-card.email .method-icon i {
    color: var(--secondary-color);
}

.contact-method-card.instagram .method-icon i {
    background: linear-gradient(45deg, #f09433, #e6683c, #dc2743, #cc2366, #bc1888);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.contact-method-card h3 {
    margin-bottom: 1rem;
    font-size: 1.5rem;
}

.contact-method-card p {
    height: 80px;
    color: var(--text-light);
}

.method-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.8rem 1.5rem;
    border-radius: 30px;
    background-color: var(--primary-light);
    color: white;
    font-weight: 600;
    transition: var(--transition);
}

.method-button:hover {
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(90, 143, 92, 0.3);
    color: white;
}

.contact-method-card.phone .method-button {
    background-color: var(--primary-color);
}

.contact-method-card.email .method-button {
    background-color: var(--secondary-color);
}

.contact-method-card.instagram .method-button {
    background: linear-gradient(45deg, #f09433, #e6683c, #dc2743, #cc2366, #bc1888);
}

/* Improved Contact Info Cards */
.contact-info {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
    margin: 2rem 0;
}

.info-card {
    background-color: var(--bg-color);
    border-radius: var(--border-radius);
    padding: 2rem 1.5rem;
    box-shadow: var(--shadow);
    transition: var(--transition);
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.info-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(90, 143, 92, 0.15);
}

.info-icon {
    margin-bottom: 1.2rem;
}

.info-icon .icon-circle {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background-color: var(--bg-accent);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto;
}

.info-icon i {
    font-size: 24px;
    color: var(--primary-color);
}

.info-content {
    text-align: center;
}

.info-content h4 {
    margin-bottom: 0.8rem;
    font-size: 1.2rem;
    color: var(--text-color);
}

.info-content p {
    color: var(--text-light);
    font-size: 1rem;
    line-height: 1.6;
}

/* Map Container */
.map-container iframe {
    width: 100%;
    height: 100%;
    border: none;
}

.map-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(rgba(90, 143, 92, 0.1), rgba(90, 143, 92, 0.2));
    pointer-events: none;
}

/* Animations for elements */
.animate {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.8s ease-out;
}

.fade-up {
    transform: translateY(30px);
}

.delay-1 {
    transition-delay: 0.2s;
}

.delay-2 {
    transition-delay: 0.4s;
}

/* Updated media queries */
@media (max-width: 992px) {
    /* Removed redundant code */
}

@media (min-width: 993px) {
    .contact-info {
        display: flex;
        flex-wrap: wrap;
        justify-content: center;
    }
    
    .info-card {
        flex: 0 1 calc(33.333% - 1.5rem);
        max-width: 350px;
    }
}

@media (min-width: 577px) and (max-width: 992px) {
    .contact-info {
        display: flex;
        flex-wrap: wrap;
        justify-content: center;
    }
    
    .info-card {
        flex: 0 1 calc(50% - 1.5rem);
        max-width: 350px;
    }
}

@media (max-width: 576px) {
    .contact-info {
        display: flex;
        flex-wrap: wrap;
        justify-content: center;
    }
    
    .info-card {
        flex: 0 1 100%;
        max-width: 350px;
    }
}

/* Smooth scroll for anchor links */
html {
    scroll-behavior: smooth;
    scroll-padding-top: 80px; /* Height of fixed navbar */
}

/* Add Media Queries for Contact Method Cards */
@media (min-width: 993px) {
    .contact-methods {
        display: flex;
        flex-wrap: wrap;
        justify-content: center;
    }
    
    .contact-method-card {
        flex: 0 1 calc(33.333% - 1rem);
        max-width: 350px;
    }
}

@media (min-width: 577px) and (max-width: 992px) {
    .contact-methods {
        display: flex;
        flex-wrap: wrap;
        justify-content: center;
    }
    
    .contact-method-card {
        flex: 0 1 calc(50% - 1rem);
        max-width: 350px;
    }
}

@media (max-width: 576px) {
    .contact-methods {
        display: flex;
        flex-wrap: wrap;
        justify-content: center;
    }
    
    .contact-method-card {
        flex: 0 1 100%;
        max-width: 350px;
    }
}

/* Corrigiendo problemas específicos de alineación en dispositivos móviles pequeños */
@media screen and (max-width: 576px) {
    /* 1. Corrección para los contenedores flexibles */
    .contact-methods,
    .contact-info,
    .testimonials-container,
    .services-container {
        width: 100% !important;
        padding: 0 !important;
        margin: 0 auto !important;
        justify-content: center !important;
        gap: 20px !important; /* Gap uniforme */
    }
    
    /* 2. Asegurar que las tarjetas tengan margen uniforme */
    .contact-method-card,
    .info-card,
    .testimonial-card,
    .service-card {
        margin: 0 auto 20px auto !important; /* Margen automático en ambos lados */
        width: 100% !important; /* Ancho completo */
        max-width: 300px !important; /* Limitar ancho máximo */
        box-sizing: border-box !important;
    }
    
    /* 3. Alinear contenedor del mapa */
    .map-container {
        margin: 0 auto !important;
        width: 100% !important;
        max-width: 300px !important;
    }
    
    /* 4. Eliminar padding extra que podría causar asimetría */
    .contact-section,
    .services-section,
    .testimonial-section {
        padding-left: 10px !important;
        padding-right: 10px !important;
    }
    
    /* 5. Ajustar padding interno de las tarjetas */
    .contact-method-card,
    .info-card {
        padding: 15px !important;
    }
}

/* Ajustes adicionales para dispositivos muy pequeños */
@media screen and (max-width: 350px) {
    /* Reducir aún más el padding en dispositivos muy pequeños */
    .contact-section,
    .services-section,
    .testimonial-section {
        padding-left: 5px !important;
        padding-right: 5px !important;
    }
    
    /* Asegurar que no haya desbordamiento */
    .contact-container,
    .services-container,
    .testimonials-container {
        overflow-x: hidden !important;
    }
    
    /* Garantizar que las tarjetas sean completamente responsivas */
    .contact-method-card,
    .info-card,
    .testimonial-card,
    .service-card {
        width: calc(100% - 10px) !important;
        min-width: 0 !important; /* Eliminar cualquier ancho mínimo */
    }
}

/* Instagram Feed Section - Versión final optimizada */
.instagram-section {
    background-color: var(--bg-color);
    padding: 5rem 2rem;
    position: relative;
    overflow: hidden;
}

.instagram-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    max-width: 1200px;
    margin: 3rem auto;
    justify-items: center;
}

/* Estilos para el post principal */
.instagram-post {
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: var(--transition);
    display: flex;
    justify-content: center;
    position: relative;
    cursor: auto;
    max-height: 670px;
    box-sizing: border-box;
}

.instagram-post:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 30px rgba(90, 143, 92, 0.2);
}

/* Estilos para el blockquote de Instagram */
.instagram-media {
    background: #FFF;
    border: 0;
    border-radius: 3px;
    box-shadow: 0 0 1px 0 rgba(0,0,0,0.5), 0 1px 10px 0 rgba(0,0,0,0.15);
    margin: 1px;
    max-width: 540px;
    min-width: 326px;
    padding: 0;
    width: 99.375%;
    width: calc(100% - 2px);
}

/* Estilos para sobrescribir los estilos predeterminados de Instagram */
.instagram-post .instagram-media {
    width: 100% !important;
    max-width: 540px !important;
    margin: 0 !important;
}

.instagram-post iframe {
    border: none !important;
    overflow: hidden !important;
    max-height: 640px !important;
}

/* Overlay para el efecto de desvanecimiento */
.instagram-post-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 40px;
    background: linear-gradient(to top, var(--bg-color) 0%, transparent 100%);
    z-index: 5;
    pointer-events: none;
}

/* Ocultar indicador de reproducción */
.instagram-play-indicator {
    display: none;
}

/* Ajustes para modo oscuro */
body.dark-mode .instagram-post {
    background-color: var(--dark-bg);
    padding: 0;
}

body.dark-mode .instagram-media {
    background: var(--dark-bg);
    box-shadow: 0 0 1px 0 rgba(255,255,255,0.2), 0 1px 10px 0 rgba(255,255,255,0.05);
}

body.dark-mode .instagram-post-overlay {
    background: linear-gradient(to top, var(--dark-bg) 0%, transparent 100%);
}

/* CTA de Instagram */
.instagram-cta {
    text-align: center;
    margin-top: 3rem;
}

.instagram-cta .btn-primary {
    display: inline-flex;
    align-items: center;
    gap: 0.8rem;
}

.instagram-cta .btn-primary i {
    font-size: 1.2rem;
}

/* Responsive ajustado para centrar la última tarjeta */
@media (min-width: 769px) and (max-width: 1100px) {
    .instagram-container {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .instagram-container .instagram-post:last-child:nth-child(2n+1) {
        grid-column: 1 / span 2;
        max-width: 400px;
        margin: 0 auto;
    }
}

/* Ajustes para pantallas pequeñas - permitir tarjetas más altas */
@media (max-width: 768px) {
    .instagram-container {
        grid-template-columns: 1fr;
    }
    
    .instagram-post {
        max-width: 400px;
        margin: 0 auto;
        max-height: none; /* Eliminar restricción de altura */
    }
    
    .instagram-post iframe {
        max-height: none !important; /* Permitir altura natural */
    }
    
    /* Ocultar el overlay de desvanecimiento en móviles */
    .instagram-post-overlay {
        display: none;
    }
}

/* Asegurarse de que la animación se aplique a todos los tipos de iconos */

/* Para el icono de Font Awesome (El corredor y la báscula) */
.service-card:hover .service-icon i {
    animation: iconBounce 0.8s ease forwards;
}

/* Para el icono SVG de piña (ya existente) */
.service-card:hover .service-svg-icon {
    animation: iconBounce 0.8s ease forwards;
}

/* Restaurar la animación cuando termina el hover para todos los iconos */
.service-card .service-icon i,
.service-card .service-svg-icon {
    animation: none;
}
