:root {
    --primary-color: #2c3e50;
    --secondary-color: #3498db;
    --accent-color: #e74c3c;
    --text-color: #333;
    --light-bg: #f5f6fa;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Arial', sans-serif;
    line-height: 1.6;
    color: var(--text-color);
}

/* Header y Navegación */
header {
    position: fixed;
    width: 100%;
    z-index: 1000;
    background: white;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 5%;
    max-width: 1200px;
    margin: 0 auto;
}

.logo {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.logo img {
    width: 50px;
    height: 50px;
    object-fit: contain;
}

.logo .default-logo {
    display: none; /* Hide by default */
}

.logo img:not([src]), /* If src is empty */
.logo img[src=""],    /* If src is empty string */
.logo img.error {     /* If image fails to load */
    display: none;
}

.logo img:not([src]) ~ .default-logo,
.logo img[src=""] ~ .default-logo,
.logo img.error ~ .default-logo {
    display: block;
}

.logo span {
    font-size: 1.5rem;
    font-weight: bold;
    color: var(--primary-color);
}

.nav-links {
    display: flex;
    gap: 2rem;
    list-style: none;
}

.nav-links a {
    text-decoration: none;
    color: var(--text-color);
    font-weight: 500;
    transition: color 0.3s;
}

.nav-links a:hover {
    color: var(--secondary-color);
}

.burger {
    display: none;
    cursor: pointer;
}

.burger div {
    width: 25px;
    height: 3px;
    background-color: var(--primary-color);
    margin: 5px;
    transition: all 0.3s ease;
}

/* Hero Section */
#hero {
    height: 100vh;
    background: linear-gradient(rgba(44, 62, 80, 0.8), rgba(44, 62, 80, 0.8)),
                url('https://images.unsplash.com/photo-1450101499163-c8848c66ca85?auto=format&fit=crop&w=1500');
    background-size: cover;
    background-position: center;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: white;
    padding: 0 1rem;
}

.hero-content h1 {
    font-size: 3.5rem;
    margin-bottom: 1rem;
}

.hero-content p {
    font-size: 1.2rem;
    margin-bottom: 2rem;
}

.cta-button {
    display: inline-block;
    padding: 1rem 2rem;
    background-color: var(--secondary-color);
    color: white;
    text-decoration: none;
    border-radius: 5px;
    transition: background-color 0.3s;
}

.cta-button:hover {
    background-color: #2980b9;
}

/* Secciones Generales */
section {
    padding: 5rem 1rem;
}

section h2 {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 3rem;
    color: var(--primary-color);
}

.content-wrapper {
    max-width: 1200px;
    margin: 0 auto;
}

/* Quiénes Somos */
#quienes-somos {
    background-color: var(--light-bg);
}

.text-content {
    max-width: 800px;
    margin: 0 auto;
    text-align: center;
}

.text-content > p {
    margin-bottom: 2.5rem;
    line-height: 1.8;
}

.mission-vision {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    margin: 2.5rem 0;
}

.mission, .vision {
    padding: 1.5rem;
    background: white;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.mission h3, .vision h3, .valores-container h3 {
    color: var(--primary-color);
    margin-bottom: 1rem;
    font-size: 1.3rem;
}

.valores-container {
    margin-top: 2.5rem;
}

.valores {
    list-style: none;
    display: flex;
    justify-content: center;
    gap: 2rem;
    margin-top: 1.5rem;
    flex-wrap: wrap;
}

.valores li {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: white;
    padding: 0.8rem 1.5rem;
    border-radius: 25px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.valores i {
    color: var(--secondary-color);
}

/* Nuestros Seguros */
.seguros-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);  
    gap: 2rem;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
}

.seguro-card {
    background: white;
    padding: 2rem;
    border-radius: 10px;
    text-align: left;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    transition: transform 0.3s;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.seguro-card:hover {
    transform: translateY(-10px);
}

.seguro-card i {
    font-size: 2.5rem;
    color: var(--secondary-color);
    margin-bottom: 1rem;
}

.seguro-card h3 {
    color: var(--primary-color);
    margin-bottom: 1rem;
    font-size: 1.5rem;
}

.seguro-card p {
    margin-bottom: 1.5rem;
    line-height: 1.6;
    flex-grow: 1;
}

.seguro-features {
    list-style: none;
    margin-bottom: 0;
}

.seguro-features li {
    margin-bottom: 0.5rem;
    padding-left: 1.5rem;
    position: relative;
}

.seguro-features li:before {
    content: "•";
    color: var(--secondary-color);
    position: absolute;
    left: 0;
}

/* FAQ */
.faq-container {
    max-width: 800px;
    margin: 0 auto;
}

.faq-item {
    margin-bottom: 1rem;
    border: 1px solid #ddd;
    border-radius: 5px;
}

.faq-question {
    padding: 1rem;
    background-color: white;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-weight: bold;
}

.faq-answer {
    padding: 0;
    max-height: 0;
    overflow: hidden;
    transition: all 0.3s ease;
    background-color: var(--light-bg);
}

.faq-item.active .faq-answer {
    padding: 1rem;
    max-height: 200px;
}

/* Contacto */
.contacto-container {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 2rem;
    max-width: 1200px;
    margin: 0 auto;
}

.contacto-info {
    padding: 2rem;
    background-color: var(--primary-color);
    color: white;
    border-radius: 10px;
}

.contacto-info h3 {
    margin-bottom: 1rem;
}

.contacto-info p {
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 1rem;
}

.contacto-form {
    display: grid;
    gap: 1rem;
}

.form-group {
    position: relative;
}

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 1rem;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 1rem;
}

.form-group label {
    position: absolute;
    left: 1rem;
    top: 1rem;
    transition: all 0.3s;
    pointer-events: none;
    color: #666;
}

.form-group input:focus + label,
.form-group input:valid + label,
.form-group textarea:focus + label,
.form-group textarea:valid + label {
    top: -0.5rem;
    left: 0.5rem;
    font-size: 0.8rem;
    background: white;
    padding: 0 0.5rem;
    color: var(--secondary-color);
}

button[type="submit"] {
    padding: 1rem 2rem;
    background-color: var(--secondary-color);
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    transition: background-color 0.3s;
}

button[type="submit"]:hover {
    background-color: #2980b9;
}

/* Testimonios Section */
#testimonios {
  background-color: var(--light-bg);
  padding: 5rem 1rem;
}

.testimonios-container {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.testimonio-card {
  background: white;
  padding: 2rem;
  border-radius: 10px;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  position: relative;
}

.testimonio-content {
  position: relative;
  padding-left: 2rem;
}

.testimonio-content::before {
  content: '"';
  position: absolute;
  left: -1rem;
  top: -1rem;
  font-size: 4rem;
  color: var(--secondary-color);
  opacity: 0.3;
  font-family: Georgia, serif;
}

.testimonio-text {
  margin-bottom: 1.5rem;
  line-height: 1.8;
  color: var(--text-color);
}

.testimonio-autor {
  font-weight: bold;
  color: var(--primary-color);
  font-style: italic;
  text-align: right;
}

/* Footer */
footer {
    background-color: var(--primary-color);
    color: white;
    padding: 3rem 1rem 1rem;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    max-width: 1200px;
    margin: 0 auto;
}

.footer-section h4 {
    margin-bottom: 1rem;
}

.footer-section ul {
    list-style: none;
}

.footer-section a {
    color: white;
    text-decoration: none;
    transition: color 0.3s;
}

.footer-section a:hover {
    color: var(--secondary-color);
}

.social-links {
    display: flex;
    gap: 1rem;
}

.social-links a {
    font-size: 1.5rem;
}

.footer-bottom {
    text-align: center;
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 1px solid rgba(255,255,255,0.1);
}

/* Enhanced Responsive Design */
@media screen and (max-width: 768px) {
    .nav-links {
        position: fixed;
        right: -100%;
        top: 70px;
        height: calc(100vh - 70px);
        background-color: white;
        flex-direction: column;
        width: 100%;
        text-align: center;
        transition: right 0.3s ease;
        padding: 2rem;
        box-shadow: -2px 0 5px rgba(0,0,0,0.1);
        z-index: 1000;
    }

    .nav-links.active {
        right: 0;
    }

    .burger {
        display: block;
        z-index: 1001;
    }

    .burger.toggle .line1 {
        transform: rotate(-45deg) translate(-5px, 6px);
    }

    .burger.toggle .line2 {
        opacity: 0;
    }

    .burger.toggle .line3 {
        transform: rotate(45deg) translate(-5px, -6px);
    }

    .contacto-container {
        grid-template-columns: 1fr;
    }

    .valores {
        flex-direction: column;
        align-items: center;
    }

    .valores li {
        width: 100%;
        max-width: 250px;
        justify-content: center;
    }

    .mission-vision {
        grid-template-columns: 1fr;
    }

    .hero-content h1 {
        font-size: 2.5rem;
    }

    .hero-content p {
        font-size: 1rem;
        padding: 0 1rem;
    }

    section {
        padding: 3rem 1rem;
    }

    section h2 {
        font-size: 2rem;
        margin-bottom: 2rem;
    }

    .seguros-grid {
        grid-template-columns: 1fr;  
        padding: 0 1rem;
    }

    .seguro-card {
        margin: 0 auto;
        max-width: 350px;
        height: auto;
    }

    .faq-container {
        padding: 0 1rem;
    }

    .faq-question {
        padding: 0.75rem;
        font-size: 0.9rem;
    }

    .contacto-info {
        padding: 1.5rem;
    }

    .form-group input,
    .form-group textarea,
    .form-group select {
        padding: 0.75rem;
        font-size: 16px; /* Prevents iOS zoom on focus */
    }

    .footer-content {
        grid-template-columns: 1fr;
        text-align: center;
        padding: 0 1rem;
    }

    .social-links {
        justify-content: center;
    }

    .footer-section ul {
        margin-bottom: 1rem;
    }

    .footer-section li {
        margin-bottom: 0.5rem;
    }

    .testimonio-card {
        padding: 1.5rem;
        margin: 0 1rem;
    }
    
    .testimonio-content {
        padding-left: 1rem;
    }

    /* Improve touch targets */
    .nav-links a,
    .footer-section a,
    .social-links a {
        padding: 0.5rem;
        display: inline-block;
    }
}

@media screen and (max-width: 480px) {
    .hero-content h1 {
        font-size: 2rem;
        padding: 0 1rem;
    }

    .hero-content p {
        padding: 0 1.5rem;
    }

    .valores li {
        font-size: 0.9rem;
    }

    .contacto-form {
        padding: 0 1rem;
    }

    .logo span {
        font-size: 1.2rem;
    }

    .logo img,
    .logo .default-logo {
        width: 40px;
        height: 40px;
    }

    .cta-button {
        padding: 0.8rem 1.5rem;
        font-size: 0.9rem;
    }

    .testimonio-card {
        margin: 0 0.5rem;
    }

    .testimonio-text {
        font-size: 0.9rem;
    }
}

/* Improve touch interactions */
@media (hover: none) {
    .nav-links a,
    .footer-section a,
    .social-links a,
    .cta-button,
    .seguro-card,
    .faq-question {
        cursor: pointer;
        -webkit-tap-highlight-color: transparent;
    }
}

/* Fix iOS input styling */
@supports (-webkit-touch-callout: none) {
    input,
    textarea,
    select {
        font-size: 16px !important;
    }
}