/**
* License: MIT
* Author: Marcos Núñez
*
* File version: 2024-04-04_1
* File name: style.css 
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
* 
* The above copyright notice and this permission notice shall be included in all
* copies or substantial portions of the Software.
* 
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
* SOFTWARE.
* 
* Copyright (c) <2024> <Marcos Núñez>
*/

/* Debe crearse un único css que asocie el sitio web completo. Este deberá estar debidamente
enlazado de forma independiente de las páginas xhtml. */ 

/*
* General
*/

body {
    font-family: Arial, sans-serif;
    margin: 0;
    padding: 0;
    background-image: url("../images/background.jpg");
    background-size: cover;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

header {
    background-color: #333;
    color: #fff;
    padding: 20px;
}

nav ul {
    list-style-type: none;
    margin: 0;
    padding: 0;
}

nav ul li {
    display: inline;
    margin-right: 20px;
}

nav ul li a {
    color: #fff;
    text-decoration: none;
}
/* Dropdown */
nav ul li.dropdown {
    position: relative;
}

nav ul li.dropdown .dropdown-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    background-color: #f9f9f9;
    min-width: 160px;
    z-index: 1;
    border-radius: 5px;
    padding: 10px 0;
}

nav ul li.dropdown:hover .dropdown-menu {
    display: block;
}

nav ul li.dropdown .dropdown-menu li {
    display: block;
    padding: 10px;
}

nav ul li.dropdown .dropdown-menu li a {
    color: black;
    text-decoration: none;
}

nav ul li.dropdown .dropdown-menu li a:hover {
    background-color: #ddd;
}
/* ... */

main {
    padding: 20px;
    flex-grow: 1;
}

footer {
    background-color: #333;
    color: #fff;
    padding: 20px;
    text-align: center;
    flex-shrink: 0;
}

.page-logo {
    height: 125px;
    margin: 0 auto;
    display: block;
    padding: 25px;
}

.section-text-container {
    padding-bottom: 20px;
    padding-right: 50px;
    padding-left: 50px;
    padding-top: 50px;
    text-align: center;
}

.section-text-container p {
    font-size: 1.2em;
    text-align: center;
}

.section-text-container h2 {
    padding-bottom: 20px;
}

.hidden {
    display: none;
}

/*
* Home
*/
body {
    font-family: Arial, sans-serif;
    margin: 0;
    padding: 0;
}

header {
    background-color: #333;
    color: #fff;
    padding: 20px 0;
    text-align: center;
}

header img {
    max-width: 200px;
    height: auto;
}

nav ul {
    list-style-type: none;
    padding: 0;
    margin: 0;
}

nav ul li {
    display: inline;
    margin-right: 20px;
}

nav ul li a {
    color: #fff;
    text-decoration: none;
    font-size: 1.2em;
}

.hero-section {
    /* Imágenes empleadas como fondo. */ 
    /* Empleo de márgenes-rellenos, bordes y fondos. */
    background-image: url("../images/hero-background.jpg");
    background-size: cover;
    background-position: center;
    height: 600px;
    display: flex;
    justify-content: center;
    align-items: center;
    text-align: center;
    color: #fff;
}

.hero-content {
    max-width: 800px;
    margin: auto;
    padding: 20px;
}

.hero-content h1 {
    font-size: 3em;
    margin-bottom: 20px;
}

.hero-content p {
    font-size: 1.2em;
    margin-bottom: 20px;
}

.cta-button {
    display: inline-block;
    padding: 10px 20px;
    background-color: #FF5E14;
    color: #fff;
    text-decoration: none;
    /* Empleo de márgenes-rellenos, bordes y fondos. */
    border-radius: 5px;
    transition: background-color 0.3s ease;
}

/* Empleo de pseudoclases. */
.cta-button:hover {
    background-color: #FF7F42;
}

.intro-section {
    background-color: #f4f4f4;
    padding: 50px 0;
    text-align: center;
}

.intro-section h2 {
    font-size: 2.5em;
    margin-bottom: 20px;
}

.intro-section p {
    font-size: 1.2em;
    margin-bottom: 20px;
}

.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    grid-gap: 20px;
    justify-items: center;
    align-items: center;
    margin-top: 30px;
}

.product {
    background-color: #fff;
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0px 0px 10px rgba(0, 0, 0, 0.1);
    text-align: center;
}

.product img {
    max-width: 100%;
    height: auto;
    border-radius: 5px;
    margin-bottom: 20px;
}

.product h3 {
    margin-bottom: 10px;
}

.product p {
    color: #777;
}

.news-section {
    background-color: #fff;
    padding: 50px 150px;
    text-align: center;
}

.news-section h2 {
    font-size: 2.5em;
    margin-bottom: 20px;
}

.news-section p {
    font-size: 1.2em;
    margin-bottom: 20px;
}

.news-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    grid-gap: 50px;
    justify-items: center;
    justify-content: center;;
    align-items: center;
    margin-top: 30px;
}

.news {
    background-color: #f4f4f4;
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0px 0px 10px rgba(0, 0, 0, 0.1);
    text-align: left;
}

.news img {
    display: block;
    margin-left: auto;
    margin-right: auto;
    min-width: 300px;
    max-width: 550px;
    width: 22vw;
    height: auto;
    border-radius: 5px;
    margin-bottom: 20px;
}

.news h3 {
    margin-bottom: 10px;
}

.news p {
    color: #777;
}

.features-section {
    padding: 50px 0;
    text-align: center;
}

.features-table {
    width: 80%;
    margin: 50px auto;
    border-collapse: collapse;
}

.features-table th, .features-table td {
    border: 1px solid #ddd;
    padding: 15px;
    text-align: left;
}

.features-table th {
    background-color: #f4f4f4;
}

.features-table td {
    background-color: #fff;
}


.back-to-top {
    position: fixed;
    bottom: 20px;
    left: 20px;
    background-color: #FF5E14;
    color: #fff;
    padding: 10px 20px;
    border-radius: 5px;
    text-decoration: none;
    transition: background-color 0.3s ease;
    display: none;
    z-index: 1000;
}

.back-to-top:hover {
    background-color: #FF7F42;
}

/**
* Calculator
*/

@media (max-width: 520px), (max-height: 929px) {
    
    .smallScreen {
        display: unset !important;
    }

    .calculator-floating {
        left: 0;
        bottom: 20px;
    }

    .footer {
        padding-bottom: 60px;
    }
    
}

.smallScreen {
    text-align: center; 
    /* posicionamiento absoluto, relativo, fijo o flotante. */
    position: absolute;
    z-index: 0;
    display: none;
}

.calculator-section {
    padding: 50px 0;
    text-align: center;
}

.calculator-section h2 {
    font-size: 2.5em;
    margin-bottom: 20px;
}

.calculator {
    background-color: #f0f0f0;
    border-radius: 10px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    width: 80%;
    margin: 0 auto;
    max-width: 450px;
    max-height: 600px;
    height: auto;
    box-sizing: border-box;
}

.calculator-content {
    padding: 35px;
}

.calculator-content-default {
    padding: 5px;
}

.calculator .collapsed {
    display: none;
}

.calculator-floating {
    /* posicionamiento absoluto, relativo, fijo o flotante. */
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 100;
}

.calculator #toggleCalculator {
    background-color: #FF5E14;
    color: #fff;
    padding: 10px 20px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    transition: background-color 0.3s ease;
    width: 100%;
}

.calculator #toggleCalculator:hover {
    background-color: #FF7F42;
}


.calculator #toggleCalculatorMode {
    background-color: #FF5E14;
    color: white;
}

.calculator #toggleCalculatorMode:hover {
    background-color: #FF7F42;
}


.display,
.calculator input#scientificDisplay,
.calculator input#resultsDisplay,
.calculator input#display {
    width: 100%;
    margin-bottom: 30px;
    padding: 20px;
    font-size: 24px;
    border: 1px solid #ccc;
    border-radius: 10px;
    box-sizing: border-box;
    height: 60px; 
    max-height: 200px;
}

.calculator .button-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 10px;
}

.calculator .button-row button,
.calculator .button-row input[type="button"] {
    width: calc(23% - 5px);
    padding: 15px;
    cursor: pointer;
    background-color: #fff;
    border: 1px solid #ccc;
    border-radius: 10px;
    font-size: 18px;
    transition: background-color 0.3s ease;
    box-sizing: border-box;
}

.calculator-content-scientific .button-row input[type="button"] {
    width: calc(20% - 5px);
    padding: 15px;
    cursor: pointer;
    background-color: #fff;
    border: 1px solid #ccc;
    border-radius: 10px;
    font-size: 18px;
    transition: background-color 0.3s ease;
    box-sizing: border-box;
}

.calculator .button-row input[type="button"]:hover {
    background-color: #e0e0e0;
}

.calculator .button-row input[type="button"]:active {
    background-color: #ccc;
}

.calculator .button-row input#equals {
    background-color: #4caf50;
    color: #fff;
}

.calculator .button-row input#clear {
    background-color: #f44336;
    color: #fff; 
}

.calculator input#minus,
.calculator input#plus,
.calculator input#dot,
.calculator input#divide,
.calculator input#multiply {
    background-color: #f8b400; 
    color: #fff;
}

/** Contact page */
.contact-section {
    padding: 50px 0;
    text-align: center;
}

.contact-form {
    max-width: 900px;
    margin: auto;
}

.contact-form label {
    display: block;
    margin-bottom: 10px;
    font-weight: bold;
}

.contact-form input[type="text"], .contact-form input[type="email"], .contact-form textarea {
    width: 100%;
    padding: 10px;
    margin-bottom: 20px;
    border-radius: 5px;
    border: 1px solid #ccc;
    box-sizing: border-box;
}

.contact-form textarea {
    height: 150px;
}

.contact-form input[type="submit"] {
    background-color: #FF5E14;
    color: #fff;
    padding: 10px 20px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.contact-form input[type="submit"]:hover {
    background-color: #FF7F42;
}

.contact-additional-info {
    text-align: center;
}

.contact-additional-info p {
    margin-bottom: 20px;
}

.contact-additional-info iframe {
    width: 600px;
    height: 350px;
    border: none;
}

.contact-sections-container {
    margin-top: 50px;
    display: flex;
    justify-content: center;
    gap: 250px;
    flex-wrap: wrap;
}

.contact-section {
    width: 30%; 
    margin-bottom: 20px;
}

/**
* About page
*/
.about-section {
    padding: 50px 0;
    text-align: center;
}

.about-section img {
    max-width: 100%;
    height: auto;
    border-radius: 5px;
    margin-bottom: 20px;
}