/* CSS Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* CSS Variables */
:root {
    --primary-blue: #1e3a8a;
    --secondary-blue: #3b82f6;
    --dark-blue: #1e40af;
    --light-blue: #dbeafe;
    --white: #ffffff;
    --black: #000000;
    --gray-100: #f3f4f6;
    --gray-200: #e5e7eb;
    --gray-300: #d1d5db;
    --gray-600: #4b5563;
    --gray-800: #1f2937;
    --gray-900: #111827;
    --font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

/* Base Typography */
body {
    font-family: var(--font-family);
    line-height: 1.6;
    color: var(--gray-800);
    background-color: var(--white);
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 10px;
}

/* Header Styles */
.header {
    background-color: var(--primary-blue);
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    
}
.header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: o.5rem 20px;
}

.nav-brand h1 {
    color: var(--white);
    font-size: 1.8rem;
    font-weight: 700;
    letter-spacing: 1px;
}

.nav-list {
    display: flex;
    list-style: none;
    gap: margin-right;
}

.nav-link {
    color: var(--white);
    text-decoration: none;
    font-weight: 500;
    font-size: 0.9rem;
    padding: 0.5rem 1rem;
    border-radius: 4px;
    transition: all 0.3s ease;
}

.nav-link:hover,
.nav-link.active {
    background-color: var(--secondary-blue);
    color: var(--white);
}

/* Dropdown Menu Styles */
.nav-dropdown {
    position: relative;
}

.dropdown-content {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    background-color:var(--primary-blue);
    min-width: 280px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
    border-radius: 8px;
    z-index: 1000;
    padding: 0.1rem 0;
    border: 1px solid var(--gray-200);
}

.dropdown-content a {
    color: var(--gray-800);
    padding: 0.75rem 1.5rem;
    text-decoration: none;
    display: block;
    font-size: 0.1rem;
    font-weight: 300;
    transition: all 0.3s ease;
    border-bottom: 1px solid var(--gray-100);
}

.dropdown-content a:last-child {
    border-bottom: none;
}

.dropdown-content a:hover {
    background-color: var(--light-blue);
    color: var(--primary-blue);
    padding-left: 2rem;
}

.nav-dropdown:hover .dropdown-content {
    display: block;
    animation: fadeInDown 0.3s ease;
}

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

/* Mobile Dropdown Styles */
.mobile-dropdown-toggle {
    display: none;
    background: none;
    border: none;
    color: var(--white);
    font-size: 0.8rem;
    padding: 0.3rem;
    cursor: pointer;
    margin-left: 0.5rem;
}

.dropdown-content.mobile-open {
    display: block;
    position: static;
    box-shadow: none;
    background-color: var(--dark-blue);
    border: none;
    border-radius: 0;
    margin-top: 0.5rem;
}

.dropdown-content.mobile-open a {
    color: var(--white);
    padding: 0.5rem 1rem;
    font-size: 0.8rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.dropdown-content.mobile-open a:hover {
    background-color: var(--secondary-blue);
    color: var(--white);
    padding-left: 1.5rem;
}

/* Hero Section */
.hero {
    height: 100vh;
    background-image: url('../principal.jpg');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding-top: 200px; /* Account for fixed header */
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(30, 58, 138, 0.8), rgba(30, 64, 175, 0.6));
}

.hero-content {
    position: relative;
    z-index: 2;
    max-width: 800px;
    padding: 0 20px;
}

.hero-title {
    font-size: 3.5rem;
    font-weight: 700;
    color: var(--white);
    margin-bottom: 1.5rem;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

.hero-subtitle {
    font-size: 1.3rem;
    color: var(--white);
    font-weight: 300;
    line-height: 1.8;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.3);
}

/* About Section */
.about {
    padding: 6rem 0;
    background-color: var(--white);
}

.about-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
}

.about-text h3 {
    font-size: 2.5rem;
    font-weight: 600;
    color: var(--primary-blue);
    margin-bottom: 2rem;
}

.about-text p {
    font-size: 1.1rem;
    line-height: 1.8;
    margin-bottom: 1.5rem;
    color: var(--gray-600);
}

.about-image img {
    width: 100%;
    height: 400px;
    object-fit: cover;
    border-radius: 8px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

/* Services Section */
.services {
    padding: 6rem 0;
    background-color: var(--gray-100);
}

.section-title {
    font-size: 2.5rem;
    font-weight: 600;
    color: var(--primary-blue);
    text-align: center;
    margin-bottom: 4rem;
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 2rem;
}

.service-card {
    background: var(--white);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
}

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

.service-image {
    height: 200px;
    overflow: hidden;
}

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

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

.service-content {
    padding: 2rem;
}
.service-card a{
    text-decoration: none; /* Quita el subrayado */
    color: inherit;        /* Hereda el color del texto del padre */
    display: block;        /* Hace que el enlace abarque todo el contenido */
}

.service-content h4 {
    font-size: 1.3rem;
    font-weight: 600;
    color: var(--primary-blue);
    margin-bottom: 1rem;
}

.service-content p {
    color: var(--gray-600);
    line-height: 1.6;
}

/* Values Section */
.values {
    padding: 6rem 0;
    background-color: var(--white);
}

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

.value-item {
    padding: 2rem;
    background: var(--gray-100);
    border-radius: 8px;
    border-left: 4px solid var(--secondary-blue);
}

.value-item h4 {
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--primary-blue);
    margin-bottom: 1rem;
}

.value-item p {
    color: var(--gray-600);
    line-height: 1.6;
}

/* Contact Section */
.contact {
    padding: 6rem 0;
    background-color: var(--primary-blue);
    color: var(--white);
}

.contact-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
}

.contact-info h3 {
    font-size: 2.5rem;
    font-weight: 600;
    margin-bottom: 2rem;
    color: white;
}

.contact-details {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.contact-item h4 {
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: var(--light-blue);
}

.contact-item p {
    font-size: 1rem;
    line-height: 1.6;
    color:white;
}

/* Contact Form */
.contact-form {
    background: var(--white);
    padding: 2rem;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: var(--gray-800);
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 0.75rem;
    border: 2px solid var(--gray-200);
    border-radius: 6px;
    font-size: 1rem;
    transition: border-color 0.3s ease;
    font-family: var(--font-family);
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--secondary-blue);
}

.form-group input.error,
.form-group textarea.error {
    border-color: #ef4444;
}

.error-message {
    display: block;
    color: #ef4444;
    font-size: 0.875rem;
    margin-top: 0.25rem;
}

.submit-btn {
    width: 100%;
    padding: 1rem;
    background-color: var(--secondary-blue);
    color: var(--white);
    border: none;
    border-radius: 6px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.submit-btn:hover {
    background-color: var(--primary-blue);
}

.success-message {
    background: #10b981;
    color: var(--white);
    padding: 1rem;
    border-radius: 6px;
    text-align: center;
    margin-top: 1rem;
}

/* Footer */
.footer {
    background-color: var(--gray-900);
    color: var(--white);
    padding: 2rem 0;
    text-align: center;
}

.footer p {
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
}

/* Responsive Design */

/* Large tablets and small desktops */
@media (max-width: 1024px) {
    .container {
        padding: 0 30px;
    }
    
    .hero-title {
        font-size: 3rem;
    }
    
    .hero-subtitle {
        font-size: 1.2rem;
    }
    
    .services-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1.5rem;
    }
    
    .values-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Tablets */
@media (max-width: 768px) {
    .container {
        padding: 0 20px;
    }
    
    /* Header adjustments */
    .header .container {
        flex-direction: column;
        gap: 1rem;
        padding: 1rem 20px;
    }
    
    .nav-brand h1 {
        font-size: 1.6rem;
    }
    
    .nav-list {
        gap: 1.5rem;
        flex-wrap: wrap;
        justify-content: center;
    }
    
    .nav-link {
        font-size: 0.85rem;
        padding: 0.4rem 0.8rem;
    }
    
    /* Mobile Dropdown Adjustments */
    .nav-dropdown:hover .dropdown-content {
        display: none;
    }
    
    .dropdown-content {
        position: static;
        display: none;
        background-color: var(--dark-blue);
        box-shadow: none;
        border: none;
        border-radius: 0;
        min-width: auto;
        width: 100%;
        margin-top: 0.5rem;
    }
    
    .dropdown-content a {
        color: var(--white);
        padding: 0.5rem 1rem;
        font-size: 0.8rem;
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    }
    
    .dropdown-content a:hover {
        background-color: var(--secondary-blue);
        color: var(--white);
        padding-left: 1.5rem;
    }
    
    .mobile-dropdown-toggle {
        display: inline-block;
    }
    
    /* Hero section */
    .hero {
        height: 100vh;
        background-attachment: scroll;
        padding-top: 120px; /* Increased padding for mobile header */
    }
    
    .hero-title {
        font-size: 2.5rem;
        margin-bottom: 1rem;
    }
    
    .hero-subtitle {
        font-size: 1.1rem;
        line-height: 1.6;
    }
    
    /* About section */
    .about {
        padding: 4rem 0;
    }
    
    .about-content {
        grid-template-columns: 1fr;
        gap: 2rem;
        text-align: center;
    }
    
    .about-text h3 {
        font-size: 2rem;
        margin-bottom: 1.5rem;
    }
    
    .about-image img {
        height: 300px;
    }
    
    /* Services section */
    .services {
        padding: 4rem 0;
    }
    
    .services-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .service-card {
        max-width: 500px;
        margin: 0 auto;
    }
    
    /* Values section */
    .values {
        padding: 4rem 0;
    }
    
    .values-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    /* Contact section */
    .contact {
        padding: 4rem 0;
    }
    
    .contact-content {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    .contact-info h3 {
        font-size: 2rem;
        text-align: center;
        margin-bottom: 1.5rem;
    }
    
    .contact-details {
        text-align: center;
        gap: 1.5rem;
    }
    
    .section-title {
        font-size: 2rem;
    }
}

/* Mobile phones (large) */
@media (max-width: 480px) {
    .container {
        padding: 0 15px;
        
    }
    
    /* Header */
    .header .container {
        padding: 0.8rem 15px;
    }
    
    .nav-brand h1 {
        font-size: 1.4rem;
    }
    
    .nav-list {
        gap: 1rem;
    }
    
    .nav-link {
        font-size: 0.8rem;
        padding: 0.3rem 0.6rem;
    }
    
    /* Hero section */
    .hero {
        height: 100vh;
        padding: 140px 10px 0 10px; /* Increased top padding for smaller mobile */
    }
    
    .hero-content {
        padding: 0 10px;
    }
    
    .hero-title {
        font-size: 2rem;
        line-height: 1.2;
        margin-bottom: 1rem;
    }
    
    .hero-subtitle {
        font-size: 1rem;
        line-height: 1.5;
    }
    
    /* Sections padding */
    .about,
    .services,
    .values,
    .contact {
        padding: 3rem 0;
    }
    
    /* About section */
    .about-text h3 {
        font-size: 1.8rem;
    }
    
    .about-text p {
        font-size: 1rem;
    }
    
    .about-image img {
        height: 250px;
    }
    
    /* Services */
    .section-title {
        font-size: 1.8rem;
        margin-bottom: 2rem;
    }
    
    .services-grid {
        gap: 1rem;
    }
    
    .service-card {
        margin: 0;
    }
    
    .service-content {
        padding: 1.5rem;
    }
    
    .service-content h4 {
        font-size: 1.1rem;
    }
    
    .service-content p {
        font-size: 0.9rem;
    }
    
    /* Values */
    .value-item {
        padding: 1.5rem;
    }
    
    .value-item h4 {
        font-size: 1.1rem;
    }
    
    .value-item p {
        font-size: 0.9rem;
    }
    
    /* Contact */
    .contact-info h3 {
        font-size: 1.8rem;
    }
    
    .contact-item h4 {
        font-size: 1.1rem;
    }
    
    .contact-item p {
        font-size: 0.9rem;
    }
    
    .contact-form {
        padding: 1.5rem;
    }
    
    .form-group label {
        font-size: 0.9rem;
    }
    
    .form-group input,
    .form-group textarea {
        padding: 0.6rem;
        font-size: 0.9rem;
    }
    
    .submit-btn {
        padding: 0.8rem;
        font-size: 1rem;
    }
    
    /* Footer */
    .footer {
        padding: 1.5rem 0;
    }
    
    .footer p {
        font-size: 0.8rem;
        line-height: 1.4;
    }
}

/* Mobile phones (small) */
@media (max-width: 360px) {
    .container {
        padding: 0 10px;
    }
    
    .hero {
        padding-top: 160px; /* Extra padding for very small screens */
    }
    
    .hero-title {
        font-size: 1.8rem;
    }
    
    .hero-subtitle {
        font-size: 0.9rem;
    }
    
    .nav-brand h1 {
        font-size: 1.2rem;
    }
    
    .nav-list {
        gap: 0.5rem;
    }
    
    .nav-link {
        font-size: 0.75rem;
        padding: 0.25rem 0.5rem;
    }
    
    .section-title {
        font-size: 1.6rem;
    }
    
    .about-text h3,
    .contact-info h3 {
        font-size: 1.6rem;
    }
    
    .service-content {
        padding: 1rem;
    }
    
    .value-item {
        padding: 1rem;
    }
    
    .contact-form {
        padding: 1rem;
    }
}

/* Landscape orientation for mobile */
@media (max-width: 768px) and (orientation: landscape) {
    .hero {
        height: 100vh;
        padding-top: 100px; /* Adjust for landscape mode */
    }
    
    .hero-title {
        font-size: 2.2rem;
    }
    
    .hero-subtitle {
        font-size: 1rem;
    }
}

/* Touch device optimizations */
@media (hover: none) and (pointer: coarse) {
    .nav-link {
        padding: 0.6rem 1rem;
        min-height: 44px;
        display: flex;
        align-items: center;
        justify-content: center;
    }
    
    .submit-btn {
        min-height: 48px;
        font-size: 1.1rem;
    }
    
    .service-card:hover {
        transform: none;
    }
    
    .service-card:active {
        transform: scale(0.98);
    }
}

/* High DPI displays */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
    .hero {
        background-image: url('../principal.jpg');
    }
}

/* Smooth Scrolling */
html {
    scroll-behavior: smooth;
}

/* Loading Animation */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.service-card,
.value-item {
    animation: fadeInUp 0.6s ease-out;
}
