
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-green: #2d7d32;
    --light-green: #4caf50;
    --dark-green: #1b5e20;
    --soft-gray: #f5f5f5;
    --medium-gray: #666;
    --dark-gray: #333;
    --white: #ffffff;
    --shadow: rgba(0, 0, 0, 0.1);
}

body {
    font-family: 'Poppins', sans-serif;
    line-height: 1.6;
    color: var(--dark-gray);
    overflow-x: hidden;
    padding-top: 80px;
}

/* Header */
.header {
    position: fixed;
    top: 0;
    width: 100%;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);    /* Contact form responsive */
    .contact-content {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .contact-form {
        padding: 2rem 1rem;
        margin: 0;
        width: 100%;
        max-width: 100%;
        box-sizing: border-box;
    }

    .form-row {
        flex-direction: column;
        gap: 1rem;
    }

    .input-group {
        width: 100%;
        max-width: 100%;
    }

    .input-group input,
    .input-group select,
    .input-group textarea {
        width: 100%;
        max-width: 100%;
        box-sizing: border-box;
    } z-index: 1000;
    padding: 1rem 0;
    box-shadow: 0 2px 20px var(--shadow);
}

.nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

.logo {
    display: flex;
    align-items: center;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-green);
    text-decoration: none;
    transition: transform 0.3s ease;
}

.logo:hover {
    transform: scale(1.1);
}

.logo img {
    transition: transform 0.3s ease;
}

.logo:hover img {
    transform: scale(1.05);
}

.logo i {
    margin-right: 0.5rem;
    font-size: 2rem;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 2rem;
}

.nav-menu a {
    text-decoration: none;
    color: var(--dark-gray);
    font-weight: 500;
    transition: color 0.3s ease;
}

.nav-menu a:hover,
.nav-menu a.active {
    color: var(--primary-green);
}

.mobile-toggle {
    display: none;
    flex-direction: column;
    cursor: pointer;
}

.mobile-toggle span {
    width: 25px;
    height: 3px;
    background: var(--primary-green);
    margin: 3px 0;
    transition: 0.3s;
}

/* Page Header */
.page-header {
    height: 100vh;
    background-image: url('https://images.unsplash.com/photo-1423666639041-f56000c27a9a?ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D&auto=format&fit=crop&w=2074&q=80');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    background-repeat: no-repeat;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: white;
    position: relative;
    overflow: hidden;
}

.page-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1;
}

.page-header .container {
    position: relative;
    z-index: 2;
    max-width: 800px;
    padding: 0 2rem;
}

.page-header h1 {
    font-size: 3.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

.page-header p {
    font-size: 1.3rem;
    opacity: 0.95;
    font-weight: 300;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.3);
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

/* Contact Section */
.contact {
    padding: 6rem 0;
    background: var(--white);
}

.contact-intro {
    text-align: center;
    margin-bottom: 4rem;
}

.contact-intro h2 {
    font-size: 2.5rem;
    color: var(--primary-green);
    margin-bottom: 1rem;
}

.contact-intro p {
    font-size: 1.1rem;
    color: var(--medium-gray);
    max-width: 700px;
    margin: 0 auto;
}

.contact-content {
    display: block;
    margin-bottom: 4rem;
}

/* Contact Form */
.contact-form {
    background: var(--soft-gray);
    padding: 3rem;
    border-radius: 20px;
    box-shadow: 0 10px 30px var(--shadow);
}

.form-title {
    font-size: 1.8rem;
    color: var(--primary-green);
    margin-bottom: 2rem;
    font-weight: 600;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

/* Modern Form Styles */
.modern-form .input-group {
    position: relative;
    margin-bottom: 2rem;
}

.modern-form .input-group input,
.modern-form .input-group select,
.modern-form .input-group textarea {
    width: 100%;
    padding: 1rem 0.5rem 0.5rem 0.5rem;
    border: none;
    border-bottom: 2px solid #e0e0e0;
    background: transparent;
    font-size: 1rem;
    color: var(--dark-gray);
    transition: all 0.3s ease;
    outline: none;
}

/* Eliminar apariencia por defecto de los select */
.modern-form .input-group select {
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    border-radius: 0;
    border: none;
    border-bottom: 2px solid #e0e0e0;
    background-image: url("data:image/svg+xml;charset=US-ASCII,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 4 5'><path fill='%23666' d='M2 0L0 2h4zm0 5L0 3h4z'/></svg>");
    background-repeat: no-repeat;
    background-position: right 0.5rem center;
    background-size: 12px;
    padding-right: 2rem;
}

.modern-form .input-group label {
    position: absolute;
    top: 1rem;
    left: 0.5rem;
    font-size: 1rem;
    color: var(--medium-gray);
    transition: all 0.3s ease;
    pointer-events: none;
    background: transparent;
}

.modern-form .input-group input:focus,
.modern-form .input-group select:focus,
.modern-form .input-group textarea:focus,
.modern-form .input-group input:not(:placeholder-shown),
.modern-form .input-group select:not([value=""]),
.modern-form .input-group textarea:not(:placeholder-shown) {
    border-bottom-color: var(--primary-green);
}

.modern-form .input-group input:focus + label,
.modern-form .input-group select:focus + label,
.modern-form .input-group textarea:focus + label,
.modern-form .input-group input:not(:placeholder-shown) + label,
.modern-form .input-group select:not([value=""]) + label,
.modern-form .input-group textarea:not(:placeholder-shown) + label {
    transform: translateY(-1.5rem) scale(0.8);
    color: var(--primary-green);
    font-weight: 500;
}

.modern-form .input-highlight {
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 0;
    height: 2px;
    background: var(--primary-green);
    transition: all 0.3s ease;
}

.modern-form .input-group input:focus ~ .input-highlight,
.modern-form .input-group select:focus ~ .input-highlight,
.modern-form .input-group textarea:focus ~ .input-highlight {
    width: 100%;
    left: 0;
}

.modern-form .submit-btn {
    position: relative;
    width: 100%;
    padding: 1rem 2rem;
    background: var(--primary-green);
    color: white;
    border: none;
    border-radius: 50px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    overflow: hidden;
    margin-top: 1rem;
}

.modern-form .submit-btn:hover {
    background: var(--dark-green);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(45, 125, 50, 0.3);
}

.modern-form .submit-btn:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none;
}

.modern-form .btn-text {
    position: relative;
    z-index: 2;
}

/* Success Message Styles */
.success-message {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    animation: fadeIn 0.3s ease;
}

.success-content {
    background: white;
    padding: 40px;
    border-radius: 15px;
    text-align: center;
    max-width: 500px;
    margin: 20px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
    animation: slideIn 0.3s ease;
}

.success-content i {
    font-size: 60px;
    color: #28a745;
    margin-bottom: 20px;
    display: block;
}

.success-content h3 {
    color: #333;
    margin-bottom: 15px;
    font-size: 24px;
}

.success-content p {
    color: #666;
    margin-bottom: 25px;
    line-height: 1.6;
}

.close-success {
    background: #28a745;
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.3s ease;
}

.close-success:hover {
    background: #218838;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slideIn {
    from { 
        transform: translateY(-50px);
        opacity: 0;
    }
    to { 
        transform: translateY(0);
        opacity: 1;
    }
}

/* Error Message Styles */
.error-message {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    animation: fadeIn 0.3s ease;
}

.error-content {
    background: white;
    padding: 40px;
    border-radius: 15px;
    text-align: center;
    max-width: 500px;
    margin: 20px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
    animation: slideIn 0.3s ease;
}

.error-content i {
    font-size: 60px;
    color: #dc3545;
    margin-bottom: 20px;
    display: block;
}

.error-content h3 {
    color: #333;
    margin-bottom: 15px;
    font-size: 24px;
}

.error-content p {
    color: #666;
    margin-bottom: 25px;
    line-height: 1.6;
}

.close-error {
    background: #dc3545;
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.3s ease;
}

.close-error:hover {
    background: #c82333;
}

.modern-form .btn-ripple {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transition: all 0.5s ease;
}

.modern-form .submit-btn:active .btn-ripple {
    width: 300px;
    height: 300px;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: var(--dark-gray);
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 1rem;
    border: 2px solid transparent;
    border-radius: 10px;
    background: var(--white);
    font-family: inherit;
    font-size: 1rem;
    transition: all 0.3s ease;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary-green);
    box-shadow: 0 0 0 3px rgba(45, 125, 50, 0.1);
}

.form-group textarea {
    resize: vertical;
    min-height: 120px;
}

.submit-btn {
    background: var(--primary-green);
    color: white;
    padding: 1rem 2rem;
    border: none;
    border-radius: 50px;
    cursor: pointer;
    font-size: 1.1rem;
    font-weight: 600;
    transition: all 0.3s ease;
    width: 100%;
}

.submit-btn:hover {
    background: var(--dark-green);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(45, 125, 50, 0.3);
}

/* Contact Info */
.contact-info {
    padding: 1rem;
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
}

.contact-info h3 {
    font-size: 1.8rem;
    color: var(--primary-green);
    margin-bottom: 2rem;
    font-weight: 600;
    text-align: center;
}

/* Grid container for horizontal layout */
.contact-items-grid {
    display: grid;
    grid-template-columns: 1fr 1fr 0.8fr;
    grid-template-rows: auto auto;
    gap: 2rem;
    margin-top: 2rem;
    width: 100%;
}

/* Make the office card span all columns */
.contact-item-wide {
    grid-column: 1 / -1;
    max-width: 600px;
    margin: 0 auto;
}

/* Responsive grid adjustments */
@media (max-width: 1024px) and (min-width: 769px) {
    .contact-items-grid {
        grid-template-columns: repeat(2, 1fr);
        grid-template-rows: auto auto;
    }
    
    .contact-item-wide {
        grid-column: 1 / -1;
    }
}

.contact-item {
    display: flex;
    align-items: flex-start;
    padding: 1.5rem;
    background: var(--white);
    border-radius: 15px;
    box-shadow: 0 5px 15px var(--shadow);
    transition: transform 0.3s ease;
    margin-bottom: 0;
}

.contact-item:hover {
    transform: translateY(-3px);
}

.contact-icon {
    width: 60px;
    height: 60px;
    background: var(--primary-green);
    color: white;
    border-radius: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 1.5rem;
    flex-shrink: 0;
}

.contact-icon i {
    font-size: 1.5rem;
}

.contact-details h4 {
    color: var(--dark-gray);
    margin-bottom: 0.5rem;
    font-weight: 600;
    font-size: 1.1rem;
}

.contact-details p {
    color: var(--medium-gray);
    line-height: 1.6;
}

.contact-details a {
    color: var(--primary-green);
    text-decoration: none;
    font-weight: 500;
}

.contact-details a:hover {
    text-decoration: underline;
}

.contact-note {
    font-size: 0.9rem;
    color: #666;
    margin-top: 0.5rem;
    font-style: italic;
}

/* Map Section */
.map-section {
    background: var(--soft-gray);
    padding: 4rem 0;
}

.map-container {
    background: var(--white);
    padding: 2rem;
    border-radius: 20px;
    box-shadow: 0 10px 30px var(--shadow);
    display: grid;
    gap: 2rem;
    grid-template-columns: 1fr;
}

.map-info {
    text-align: center;
}

.map-info h3 {
    font-size: 1.5rem;
    color: var(--primary-green);
    margin-bottom: 1rem;
}

.map-info p {
    color: var(--text-gray);
    line-height: 1.6;
}

.google-map {
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.google-map iframe {
    width: 100%;
    height: 400px;
    border: none;
}

.map-placeholder p {
    color: var(--medium-gray);
    max-width: 400px;
}

/* Emergency Contact */
.emergency-section {
    background: var(--primary-green);
    color: white;
    padding: 3rem 0;
    text-align: center;
}

.emergency-content h2 {
    font-size: 2rem;
    margin-bottom: 1rem;
}

.emergency-content p {
    font-size: 1.1rem;
    margin-bottom: 2rem;
    opacity: 0.9;
}

.emergency-phones {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 2rem;
    max-width: 600px;
    margin: 0 auto;
}

.emergency-phone {
    background: rgba(255, 255, 255, 0.1);
    padding: 1.5rem;
    border-radius: 15px;
    backdrop-filter: blur(10px);
}

.emergency-phone i {
    font-size: 2rem;
    margin-bottom: 1rem;
}

.emergency-phone h4 {
    font-size: 1.2rem;
    margin-bottom: 0.5rem;
}

.emergency-phone p {
    font-size: 1.1rem;
    font-weight: 600;
}

/* Footer */
.footer {
    background: var(--dark-gray);
    color: white;
    padding: 2rem 0;
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
}

.footer-left {
    flex: 0 0 auto;
}

.footer-right {
    flex: 1;
    text-align: right;
}

@media (max-width: 768px) {
    .footer-content {
        flex-direction: column;
        text-align: center;
        gap: 1rem;
    }
    
    .footer-right {
        text-align: center;
        order: 1;
    }

    .footer-left {
        order: 2;
    }

    /* Header fix for mobile */
    .header {
        position: fixed !important;
        top: 0 !important;
        transform: none !important;
        transition: none !important;
    }

    /* Page header responsive */
    .page-header {
        height: 70vh;
        padding-top: 10vh;
    }

    .page-header h1 {
        font-size: 2.5rem;
    }

    .page-header p {
        font-size: 1rem;
    }

    /* Contact content responsive */
    .contact-content {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .form-row {
        grid-template-columns: 1fr;
    }

    /* Map responsive */
    .map-container {
        padding: 1rem;
        width: 100%;
        max-width: 100%;
        overflow: hidden;
    }

    .google-map {
        width: 100%;
        max-width: 100%;
    }

    .google-map iframe {
        height: 300px;
        width: 100%;
        max-width: 100%;
    }

    /* Mobile menu fixes */
    .nav-menu {
        position: fixed;
        top: 80px;
        left: -100%;
        width: 100%;
        height: calc(100vh - 80px);
        background: var(--white);
        flex-direction: column;
        justify-content: flex-start;
        align-items: center;
        padding-top: 2rem;
        transition: left 0.3s ease;
        z-index: 999;
        box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    }

    .nav-menu.active {
        left: 0;
    }

    .nav-menu li {
        margin: 1rem 0;
    }

    .nav-menu a {
        font-size: 1.2rem;
        color: var(--dark-gray);
    }
}

/* WhatsApp Button */
.whatsapp-float {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background: #25d366;
    color: white;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    z-index: 1000;
    transition: all 0.3s ease;
    box-shadow: 0 5px 15px rgba(37, 211, 102, 0.3);
    text-decoration: none;
}

.whatsapp-float:hover {
    transform: scale(1.1);
    box-shadow: 0 8px 25px rgba(37, 211, 102, 0.5);
}

/* Success Message */
.success-message {
    background: #d4edda;
    border: 1px solid #c3e6cb;
    color: #155724;
    padding: 1rem;
    border-radius: 10px;
    margin-bottom: 1.5rem;
    display: none;
}

/* Responsive Design */
@media (max-width: 768px) {
    body {
        overflow-x: hidden;
        width: 100%;
        max-width: 100vw;
    }

    .container {
        padding: 0 1rem;
        margin: 0 auto;
        max-width: 100%;
        overflow: hidden;
    }

    .mobile-toggle {
        display: flex;
    }

    .nav-menu {
        position: fixed;
        top: 100px;
        left: -100%;
        width: 100%;
        height: calc(100vh - 100px);
        background: white;
        flex-direction: column;
        justify-content: flex-start;
        align-items: center;
        padding-top: 2rem;
        transition: left 0.3s ease;
    }

    .nav-menu.active {
        left: 0;
    }

    .page-header h1 {
        font-size: 2.5rem;
    }

    .page-header p {
        font-size: 1.1rem;
    }

    .contact-intro h2 {
        font-size: 2rem;
    }

    .contact-content {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .contact-form {
        padding: 2rem;
    }

    .form-row {
        grid-template-columns: 1fr;
    }

    .emergency-phones {
        grid-template-columns: 1fr;
    }

    /* Responsive grid for tablets */
    .contact-items-grid {
        grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
        gap: 1rem;
    }
}

@media (max-width: 480px) {
    body {
        padding-top: 70px;
    }

    .nav {
        padding: 0 1rem;
    }

    .container {
        padding: 0 1rem;
    }

    .page-header {
        padding: 3rem 0 1.5rem;
    }

    .page-header h1 {
        font-size: 2rem;
    }

    .contact {
        padding: 4rem 0;
    }

    .contact-form {
        padding: 1.5rem;
    }

    .form-title {
        font-size: 1.5rem;
    }

    .map-section {
        padding: 3rem 0;
    }

    .emergency-section {
        padding: 2rem 0;
    }

    /* Mobile responsive for contact grid */
    .contact-items-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .contact-item {
        padding: 1rem;
    }

    .contact-icon {
        width: 50px;
        height: 50px;
        margin-right: 1rem;
    }

    .contact-icon i {
        font-size: 1.2rem;
    }

    .emergency-content h2 {
        font-size: 1.5rem;
    }
}

/* Contact Form Section */
.contact-form-section {
    background: var(--white);
    padding: 3rem;
    border-radius: 15px;
    box-shadow: 0 10px 30px var(--shadow);
    margin-top: 3rem;
    border: 1px solid #e0e0e0;
}

.contact-form-section h3 {
    color: var(--primary-green);
    font-size: 1.8rem;
    margin-bottom: 0.5rem;
    text-align: center;
}

.contact-form-section p {
    text-align: center;
    color: var(--medium-gray);
    margin-bottom: 2rem;
}

.contact-form {
    max-width: 800px;
    margin: 0 auto;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
    margin-bottom: 1.5rem;
}

.form-group {
    display: flex;
    flex-direction: column;
}

.form-group label {
    font-weight: 500;
    color: var(--dark-gray);
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
}

.form-group input,
.form-group select,
.form-group textarea {
    padding: 1rem;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 1rem;
    font-family: 'Poppins', sans-serif;
    transition: all 0.3s ease;
    background: var(--white);
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary-green);
    box-shadow: 0 0 0 3px rgba(45, 125, 50, 0.1);
}

.form-group textarea {
    resize: vertical;
    min-height: 120px;
}

.submit-btn {
    background: linear-gradient(135deg, var(--primary-green), var(--light-green));
    color: var(--white);
    border: none;
    padding: 1rem 2rem;
    border-radius: 8px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    margin: 2rem auto 0;
    min-width: 200px;
}

.submit-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(45, 125, 50, 0.3);
}

.submit-btn:active {
    transform: translateY(0);
}

.submit-btn i {
    font-size: 1rem;
}

/* Form responsive styles */
@media (max-width: 768px) {
    .contact-form-section {
        padding: 2rem 1rem;
        margin-top: 2rem;
    }

    .form-row {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .contact-form-section h3 {
        font-size: 1.5rem;
    }

    .submit-btn {
        width: 100%;
        min-width: auto;
    }
}
