/* Paleta extraída del logo:
- Azul oscuro: #00587A
- Azul medio: #0088B9
- Azul claro: #00B4D8
- Amarillo suave: #FFD180
- Fondo claro: #F7FAFC
*/

/* =================== BASE STYLES =================== */
* {
    box-sizing: border-box;
}

body {
    font-family: 'Montserrat', Arial, sans-serif;
    background: #F7FAFC;
    color: #1A2A36;
    margin: 0;
    padding: 0;
    line-height: 1.6;
}

/* =================== HERO SECTION =================== */
header.hero {
    background-image: url(img/hero.jpg);
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    color: #fff;
    text-align: center;
    padding: 1.5rem 1rem;
    position: relative;
    min-height: 50vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.logo {
    width: 120px;
    height: 120px;
    margin-bottom: 1rem;
    filter: drop-shadow(0 2px 8px rgba(0,88,122,0.10));
    border-radius: 50%;
    background: #fff;
    border: 4px solid #00B4D8;
    box-shadow: 0 4px 24px rgba(0,88,122,0.10);
    padding: 12px;
    display: block;
    object-fit: contain;
}

.hero h1 {
    font-size: 1.8rem;
    margin: 0.5rem 0 0.7rem 0;
    font-weight: 700;
    letter-spacing: 0.5px;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.hero-text {
    font-size: 1rem;
    max-width: 90%;
    margin: 0 auto;
    color: #F7FAFC;
    opacity: 0.95;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

/* =================== MAIN CONTENT =================== */
main {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 0 1rem;
    margin-top: -1.5rem;
}

.form-section {
    background: #fff;
    border-radius: 20px;
    box-shadow: 0 4px 24px rgba(0,88,122,0.08);
    padding: 1.5rem;
    width: 100%;
    max-width: 400px;
    margin: 2rem 0;
    position: relative;
    z-index: 1;
}

.form-section h2 {
    color: #00587A;
    margin-bottom: 1.2rem;
    font-size: 1.2rem;
    font-weight: 600;
    text-align: center;
}

/* =================== FORM STYLES =================== */
.form-group {
    margin-bottom: 1rem;
    display: flex;
    flex-direction: column;
}

.form-group label {
    font-weight: 500;
    margin-bottom: 0.3rem;
    color: #0088B9;
    font-size: 0.9rem;
}

.form-group label span {
    color: #FFD180;
    font-size: 1.1em;
}

input[type="text"],
input[type="email"],
input[type="tel"],
select {
    padding: 0.6rem 0.8rem;
    border: 1px solid #B2DFEE;
    border-radius: 6px;
    font-size: 1rem;
    background: #F7FAFC;
    color: #1A2A36;
    transition: border 0.2s;
    width: 100%;
}

input[type="text"]:focus,
input[type="email"]:focus,
input[type="tel"]:focus,
select:focus {
    border-color: #00B4D8;
    outline: none;
    box-shadow: 0 0 0 3px rgba(0, 180, 216, 0.1);
}

input[type="file"] {
    margin-top: 0.3rem;
    color: #00587A;
    padding: 0.4rem;
    font-size: 0.9rem;
}

.file-info {
    display: block;
    font-size: 0.8rem;
    color: #0088B9;
    margin-bottom: 0.3rem;
    opacity: 0.8;
}

.submit-btn {
    background: linear-gradient(90deg, #0088B9 0%, #00B4D8 100%);
    color: #fff;
    border: none;
    border-radius: 6px;
    padding: 0.8rem 1.5rem;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    margin-top: 1rem;
    box-shadow: 0 2px 8px rgba(0,88,122,0.08);
    transition: all 0.2s;
    width: 100%;
}

.submit-btn:hover {
    background: linear-gradient(90deg, #00587A 0%, #0088B9 100%);
    box-shadow: 0 4px 16px rgba(0,88,122,0.13);
    transform: translateY(-1px);
}

.submit-btn:active {
    transform: translateY(0);
}

.icon-send {
    vertical-align: middle;
    fill: #FFD180;
    flex-shrink: 0;
}

.message {
    margin-top: 1rem;
    font-size: 0.9rem;
    min-height: 1.2em;
    color: #00587A;
    text-align: center;
}

/* =================== FOOTER =================== */
footer {
    text-align: center;
    padding: 1.5rem 1rem;
    color: #0088B9;
    background: none;
    font-size: 0.9rem;
}

/* =================== RESPONSIVE BREAKPOINTS =================== */

/* Small devices (landscape phones, 576px and up) */
@media (min-width: 576px) {
    .hero {
        padding: 2rem 1rem;
    }

    .logo {
        width: 140px;
        height: 140px;
        padding: 14px;
        border: 5px solid #00B4D8;
    }

    .hero h1 {
        font-size: 2rem;
        letter-spacing: 0.8px;
    }

    .hero-text {
        font-size: 1.1rem;
        max-width: 500px;
    }

    .form-section {
        padding: 2rem;
        border-radius: 24px;
        max-width: 450px;
    }

    .form-section h2 {
        font-size: 1.3rem;
    }

    .form-group label {
        font-size: 1rem;
    }

    input[type="file"] {
        font-size: 1rem;
    }

    .submit-btn {
        font-size: 1.1rem;
        padding: 0.8rem 2rem;
    }

    .message {
        font-size: 1rem;
    }

    footer {
        font-size: 1rem;
    }
}

/* Medium devices (tablets, 768px and up) */
@media (min-width: 768px) {
    .hero {
        padding: 3rem 2rem;
        min-height: 60vh;
    }

    .logo {
        width: 180px;
        height: 180px;
        padding: 16px;
        border: 6px solid #00B4D8;
    }

    .hero h1 {
        font-size: 2.4rem;
        letter-spacing: 1px;
    }

    .hero-text {
        font-size: 1.2rem;
        max-width: 600px;
    }

    main {
        padding: 0 2rem;
    }

    .form-section {
        padding: 2.5rem;
        border-radius: 28px;
        max-width: 500px;
        margin: 3rem 0;
    }

    .form-section h2 {
        font-size: 1.4rem;
    }

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

    input[type="text"],
    input[type="email"],
    input[type="tel"],
    select {
        padding: 0.7rem 1rem;
        font-size: 1.1rem;
    }

    .submit-btn {
        font-size: 1.1rem;
        padding: 0.9rem 2.5rem;
        margin-top: 1.5rem;
    }
}

/* Large devices (desktops, 992px and up) */
@media (min-width: 992px) {
    .hero {
        padding: 4rem 2rem;
        min-height: 65vh;
    }

    .logo {
        width: 220px;
        height: 220px;
        padding: 18px;
    }

    .hero h1 {
        font-size: 2.6rem;
        margin: 1rem 0;
    }

    .hero-text {
        font-size: 1.25rem;
        max-width: 700px;
    }

    .form-section {
        padding: 3rem;
        border-radius: 32px;
        max-width: 550px;
        margin: 4rem 0;
    }

    .form-section h2 {
        font-size: 1.5rem;
        margin-bottom: 1.5rem;
    }

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

    .form-group label {
        font-size: 1.1rem;
    }

    input[type="text"],
    input[type="email"],
    input[type="tel"],
    select {
        padding: 0.8rem 1.2rem;
        font-size: 1.1rem;
    }

    .submit-btn {
        font-size: 1.2rem;
        padding: 1rem 3rem;
        margin-top: 2rem;
    }

    footer {
        padding: 2rem 1rem;
        font-size: 1.1rem;
    }
}

/* Extra large devices (large desktops, 1200px and up) */
@media (min-width: 1200px) {
    .hero {
        padding: 5rem 2rem;
        min-height: 70vh;
    }

    .logo {
        width: 240px;
        height: 240px;
        padding: 20px;
    }

    .hero h1 {
        font-size: 2.8rem;
        margin: 1.2rem 0;
    }

    .hero-text {
        font-size: 1.3rem;
        max-width: 800px;
    }

    .form-section {
        max-width: 600px;
        padding: 3.5rem;
    }

    .form-section h2 {
        font-size: 1.6rem;
    }

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

    input[type="text"],
    input[type="email"],
    input[type="tel"],
    select {
        padding: 0.9rem 1.3rem;
        font-size: 1.15rem;
    }

    .submit-btn {
        font-size: 1.25rem;
        padding: 1.1rem 3.5rem;
    }
}

/* =================== ULTRA WIDE SCREENS =================== */
@media (min-width: 1400px) {
    .hero {
        min-height: 75vh;
    }

    .hero h1 {
        font-size: 3rem;
    }

    .hero-text {
        font-size: 1.4rem;
        max-width: 900px;
    }

    .form-section {
        max-width: 650px;
        padding: 4rem;
    }
}

/* =================== ACCESSIBILITY & TOUCH IMPROVEMENTS =================== */

/* Phone input group styling */
.phone-input-group {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.phone-input-group select {
    flex: 0 0 auto;
    min-width: 120px;
}

.phone-input-group input {
    flex: 1;
}

/* Checkbox group styling */
.checkbox-group {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 0.5rem;
    margin-top: 0.5rem;
}

.checkbox-label {
    display: flex;
    align-items: center;
    font-size: 0.9rem;
    color: #1A2A36;
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 4px;
    transition: background-color 0.2s;
}

.checkbox-label:hover {
    background-color: #F7FAFC;
}

.checkbox-label input[type="checkbox"] {
    margin-right: 0.5rem;
    width: 16px;
    height: 16px;
    accent-color: #00B4D8;
    cursor: pointer;
}

/* Phone format hint styling */
.phone-format {
    font-style: italic;
    min-height: 1.2em;
}

/* Error message styling for phone validation */
.phone-error {
    color: #ff6b6b !important;
    font-weight: 500;
}

.phone-success {
    color: #28a745 !important;
    font-weight: 500;
}

/* Responsive adjustments for new elements */
@media (max-width: 768px) {
    .phone-input-group {
        flex-direction: column;
        gap: 0.5rem;
    }

    .phone-input-group select,
    .phone-input-group input {
        width: 100%;
    }

    .checkbox-group {
        grid-template-columns: 1fr;
    }
}

@media (hover: none) and (pointer: coarse) {
    /* Touch devices */
    input[type="text"],
    input[type="email"],
    input[type="tel"],
    select {
        min-height: 44px; /* Minimum touch target size */
    }

    .submit-btn {
        min-height: 48px;
        padding: 1rem 2rem;
    }

    .checkbox-label {
        min-height: 44px;
        padding: 0.75rem;
    }
}

/* High DPI screens */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
    .logo {
        image-rendering: -webkit-optimize-contrast;
        image-rendering: crisp-edges;
    }
}

/* Reduced motion preference */
@media (prefers-reduced-motion: reduce) {
    .submit-btn {
        transition: none;
    }

    .submit-btn:hover {
        transform: none;
    }

    input[type="text"]:focus,
    input[type="email"]:focus,
    input[type="tel"]:focus,
    select:focus {
        transition: none;
    }
}
