:root {
    --primary-color: #26C6DA; /* Cyan */
    --secondary-color: #FF7043; /* Deep Orange */
    --dark-color: #263238; /* Blue Grey */
    --light-color: #ECEFF1; /* Blue Grey Lighten-5 */
    --button-color: #F9F6F3;
    --text-color: #37474F;
}

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

body {
    font-family: 'Poppins', sans-serif;
    background-color: var(--light-color);
    color: var(--text-color);
    line-height: 1.5;
    font-size: 0.85rem; /* Global text size reduction */
}

.container {
    max-width: 1200px; /* Reduced from 1200px */
    margin: 0 auto;
    padding: 0 3rem; /* Increased horizontal padding from 2rem */
}

header {
    background-color: #fff;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    padding: 1.25rem 0; /* Increased vertical padding */
    position: sticky;
    top: 0;
    z-index: 100;
}

header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--primary-color);
    text-decoration: none;
}

nav ul {
    list-style: none;
    display: flex;
    flex-wrap: wrap; /* Allows menu items to wrap to a new line */
    justify-content: flex-end; /* Align items to the right */
    gap: 1rem; /* Reduced gap for less space between wrapped lines */
}

nav a {
    text-decoration: none;
    color: var(--text-color);
    font-weight: 600;
    padding-bottom: 5px;
    border-bottom: 2px solid transparent;
    transition: all 0.3s ease;
    font-size: 0.85rem; /* Reduced font size further */
}

nav a:hover {
    color: var(--secondary-color);
    border-bottom-color: var(--secondary-color);
}

nav a.active {
    color: var(--primary-color);
    border-bottom-color: var(--primary-color);
}

main {
    padding: 0.5rem 0;
}

.content-section {
    padding: 0.5rem 0.5rem 0.5rem 0.5rem;
}

/* New hero banner for index page */
.hero-banner {
    width: 100%;
    height: 90px; /* Reduced from 180px */
    overflow: hidden;
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: 1rem;
    background-color: var(--dark-color);
}



.hero-banner img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}


.hero-bannerp {
    width: 100%;
    height: 30px; /* Reduced from 180px */
    overflow: hidden;
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: 1rem;
    background-color: var(--dark-color);
}

.hero-bannerp img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* The .main-content now takes full width within its container */
.main-content {
    width: 100%;
}

/* Tab Styles */
.tabs {
    display: flex;
    margin-bottom: 2rem;
    border-bottom: 2px solid #ddd;
}

.tab-button {
    padding: 1rem 1.5rem;
    cursor: pointer;
    border: none;
    background-color: transparent;
    font-size: 1rem; /* Reduced from 1.1rem */
    font-weight: 600;
    color: var(--text-color);
    position: relative;
    top: 2px;
    border-bottom: 2px solid transparent;
    transition: all 0.3s ease;
}

.tab-button:hover {
    color: var(--primary-color);
}

.tab-button.active {
    color: var(--secondary-color);
    border-bottom-color: var(--secondary-color);
}

.tab-panel {
    display: none;
    background-color: #fff;
    padding: 1.5rem;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.08);
}

.tab-panel.active {
    display: block;
}

.tab-panel h2 {
    font-size: 1.3rem; /* Reduced from 1.4rem */
    color: var(--primary-color);
    margin-bottom: 0.75rem; /* Reduced from 1rem */
}

.tab-panel h3 {
    font-size: 1.2rem; /* Reduced from 1.3rem */
    color: var(--text-color);
    margin-top: 1rem;
    margin-bottom: 0.5rem;
    border-bottom: 1px solid var(--light-color);
    padding-bottom: 0.5rem;
}

.tab-panel ul {
    list-style-position: inside;
    padding-left: 1rem;
}

.tab-panel ul li {
    margin-bottom: 0.5rem;
    line-height: 1.5;
}

.tab-panel p {
    margin-bottom: 0.25rem;
}

.tab-panel a {
    color: var(--secondary-color);
    text-decoration: none;
    font-weight: 600;
}

.tab-panel a:hover {
    text-decoration: underline;
}

.tab-panel .note {
    margin-top: 1.5rem;
    font-style: italic;
    color: #666;
}

.hero {
    text-align: center;
    padding: 3rem 0;
    background: linear-gradient(to right, var(--primary-color), var(--secondary-color));
    color: #fff;
}

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

.hero p {
    font-size: 1.2rem;
}

.gallery {
    padding: 2rem 0;
    text-align: center;
}

.gallery img {
    max-width: 100%;
    height: auto;
    border-radius: 10px;
    box-shadow: 0 10px 20px rgba(0,0,0,0.15);
}

.contact-section {
    text-align: center;
    padding: 3rem 0;
    background-color: #fff;
}

.contact-section h2 {
    color: var(--primary-color);
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.cta-button {
    display: inline-block;
    background-color: var(--secondary-color);
    color: #fff;
    padding: 1rem 2.5rem;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 600;
    font-size: 1.1rem;
    transition: background-color 0.3s ease, transform 0.3s ease;
    margin-top: 1rem;
}

.cta-button:hover {
    background-color: #ff5722; /* Darker orange */
    transform: translateY(-3px);
}

.page-content {
    padding: 1.0rem 0;
    min-height: 60vh;
}

.page-content h1 {
    font-size: 1.3rem; /* Reduced from 1.6rem */
    color: var(--primary-color);
    margin-bottom: 0.5rem; /* Reduced from 0.75rem */
}

.page-content p {
    font-size: 0.85rem; /* Reduced from 1.1rem */
    color: var(--text-color);
    margin-bottom: 0.5rem;
}

/* Content Blocks for secondary pages */
.content-block-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem;
}

.content-block {
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.08);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.content-block:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.12);
}

.content-block-image {
    padding: 2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #f7f9fa;
}

.content-block-image img {
    max-width: 150px;
    height: auto;
}

.content-block-text {
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
}

.content-block-text h2 {
    font-size: 1.3rem; /* Reduced from 1.4rem */
    color: var(--primary-color);
    margin: 0 0 0.5rem 0;
}

.content-block-text p {
    font-size: 0.85rem;
    margin-bottom: 1rem;
    flex-grow: 1;
}

.content-block-text a {
    color: var(--secondary-color);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease;
}

.content-block-text a:hover {
    color: var(--secondary-color);
    text-decoration: underline;
}


.cta-button-small {
    display: inline-block;
    background-color: var(--button-color);
    color: var(--secondary-color);
    padding: 0.7rem 1.4rem; /* Slightly larger padding for better appearance */
    border-radius: 50px;
    border: none; /* Added for consistency with other buttons */
    text-decoration: none;
    font-weight: 600;
    font-size: 0.85rem; /* Slightly larger font size */
    transition: background-color 0.3s ease, transform 0.3s ease;
    align-self: flex-start;
    cursor: pointer; /* Added for buttons */
}

.cta-button-small:hover {
    background-color: var(--light-color);
    transform: translateY(-2px);
}

@media (min-width: 768px) {
    .content-block {
        flex-direction: row;
    }

    .content-block-image {
        flex-basis: 250px;
        flex-shrink: 0;
    }

    .content-block-text {
        flex-grow: 1;
    }
}

footer {
    background-color: var(--dark-color);
    color: var(--light-color);
    text-align: center;
    padding: 2rem 0;
    margin-top: 2rem;
}

.scroll-to-top {
    display: none; /* Replaced by new scroll controls */
}

/* New Scroll Controls */
.scroll-controls {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 1000;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.scroll-button {
    background-color: var(--secondary-color);
    color: white;
    border: none;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    font-size: 24px;
    cursor: pointer;
    display: none; /* Hidden by default, JS will show them */
    box-shadow: 0 4px 10px rgba(0,0,0,0.2);
    transition: background-color 0.3s, transform 0.3s;
    line-height: 50px; /* Center icon vertically */
}

.scroll-button:hover {
    background-color: #ff5722;
    transform: translateY(-3px);
}

/* Styles for Applets page (pagina4.html) */
.applet-category {
    margin-bottom: 1rem;
    padding: 1rem;
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.08);
}

.applet-category-header { /* New class for the clickable header */
    font-size: 1rem; /* Reduced from 1.4rem */
    color: var(--primary-color);
    margin-bottom: 1rem;
    border-bottom: 2px solid var(--light-color);
    padding-bottom: 0.5rem;
    cursor: pointer; /* Indicate it's clickable */
    display: flex; /* To align text and icon */
    justify-content: space-between; /* Push icon to the right */
    align-items: center;
    transition: color 0.3s ease;
}

.applet-category-header:hover {
    color: var(--secondary-color);
}

.collapse-icon {
    font-size: 1.2rem; /* Adjust size as needed */
    transition: transform 0.3s ease; /* Smooth rotation, though not used with innerHTML change */
    margin-left: 10px; /* Space between text and icon */
}

/* Default for mobile: stack pairs of image+text */
.applet-row-4-col {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 1rem;
    align-items: center;
    margin-bottom: 0.3rem;
    padding: 0.3rem 0;
    border-bottom: 1px dotted var(--light-color);
}

.applet-row-4-col:last-child {
    border-bottom: none;
}

@media (min-width: 768px) {
    .applet-row-4-col {
        grid-template-columns: auto 1fr auto 1fr; /* 4-column layout for desktop */
        gap: 1.5rem;
    }
}

.applet-image-cell {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 5px;
    flex-shrink: 0;
}

.applet-image-cell img {
    max-width: 80px;
    height: auto;
    border: 1px solid #eee;
    border-radius: 4px;
}

.applet-text-cell {
    font-size: 0.85rem; /* Reduced from 1rem */
    line-height: 1.3;
}

.applet-text-cell a {
    color: var(--secondary-color);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease;
}

.applet-text-cell a:hover {
    color: var(--secondary-color);
    text-decoration: underline;
}

.video-button {
    display: inline-flex;
    align-items: center;
    background-color: var(--light-color);
    color: white;
    padding: 0.3rem 0.6rem;
    border-radius: 5px;
    text-decoration: none;
    font-size: 0.85rem;
    margin-left: 10px;
    transition: background-color 0.3s ease;
    vertical-align: middle;
}

.video-button:hover {
    background-color: #1aacc0;
    text-decoration: none;
}

.video-button img {
    margin-right: 5px;
}

/* New styles for pagina5.html (Estalmat) */
.estalmat-grid {
    display: grid;
    grid-template-columns: 1fr; /* Default to single column on small screens */
    gap: 1.5rem;
    margin-top: 1.5rem; /* Add some space above the grid */
}

@media (min-width: 768px) {
    .estalmat-grid {
        grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); /* 2 or 3 columns, responsive */
    }
}

.estalmat-section {
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.08);
    padding: 1.5rem;
    height: 100%; /* Ensure all items in the grid stretch to the same height */
    display: flex; /* Use flexbox for content within the section */
    flex-direction: column;
}

.estalmat-section h2 {
    font-size: 1.3rem; /* Reduced from 1.4rem */
    color: var(--primary-color);
    margin-bottom: 0.75rem;
    border-bottom: 1px solid var(--light-color);
    padding-bottom: 0.5rem;
}

.estalmat-section p {
    margin-bottom: 0.75rem;
}

.estalmat-section ul {
    list-style: none; /* Remove default bullets */
    padding-left: 0; /* Remove default padding */
}

.estalmat-section ul li {
    margin-bottom: 0.5rem;
    display: flex; /* Align icon and text */
    align-items: center;
}

.estalmat-section ul li:last-child {
    margin-bottom: 0;
}

.info-block {
    display: flex;
    align-items: center;
    background-color: #f7f9fa;
    border-radius: 8px;
    padding: 1rem;
    margin: 1rem 0; /* Reduced from 1.5rem */
    gap: 1rem;
}

.info-block img {
    max-width: 80px;
    height: auto;
    flex-shrink: 0;
}

.info-block p {
    margin: 0; /* Reset paragraph margin inside info-block */
    font-size: 0.85rem;
}

.inline-icon {
    width: 24px; /* Small icon size */
    height: 24px;
    margin-right: 8px; /* Space between icon and text */
    vertical-align: middle; /* Align with text baseline */
    border: 1px solid #eee; /* Add a subtle border like applet images */
    border-radius: 4px;
}

.estalmat-section a {
    color: var(--secondary-color);
    text-decoration: none;
    font-weight: 600;
}

.estalmat-section a:hover {
    text-decoration: underline;
}

/* Responsive adjustments */
@media (max-width: 767px) { /* Tablet and below */
    .container {
        padding: 0 1.5rem; /* Reduced padding for mobile */
    }
    .logo {
        font-size: 1.5rem; /* Make logo smaller on mobile */
    }
    header .container {
         flex-direction: column; /* Stack logo and nav vertically */
         gap: 1rem; /* Space between logo and nav */
         text-align: center;
    }
    nav ul {
        justify-content: center; /* Center nav items when stacked */
        gap: 0.75rem; /* Reduce gap between nav items */
    }
    nav a {
        font-size: 0.8rem; /* Further reduce nav link font size */
        padding: 0.25rem 0.5rem; /* Adjust padding for smaller links */
    }
    .tabs {
        flex-wrap: wrap; /* Ensure tabs wrap if they don't fit */
        justify-content: center; /* Center tabs if they wrap */
        margin-bottom: 1rem; /* Less space below tabs on mobile */
    }
    .tab-button {
        padding: 0.8rem 1rem; /* Smaller tab buttons */
        font-size: 0.9rem; /* Smaller tab button text */
    }
    .tab-panel {
        padding: 1rem; /* Smaller padding inside tab panels */
    }
    .page-content {
        padding: 1rem 0; /* Less padding around page content */
    }
    .estalmat-section {
        padding: 1rem; /* Smaller padding inside estalmat sections */
    }
    .info-block {
        flex-direction: column; /* Stack image and text in info block */
        text-align: center;
    }
    .info-block img {
        margin-bottom: 0.5rem; /* Space below image in stacked info block */
    }
    .content-block-text {
        padding: 1rem; /* Adjust padding for content block text on mobile */
    }
    .content-block-image {
        padding: 1rem; /* Adjust padding for content block image on mobile */
    }
}

@media (max-width: 480px) { /* Smaller mobile screens */
    .logo {
        font-size: 1.3rem; /* Even smaller logo */
    }
    nav a {
        font-size: 0.7rem; /* Even smaller nav links */
        padding: 0.2rem 0.4rem;
    }
    .tab-button {
        font-size: 0.8rem;
        padding: 0.6rem 0.8rem;
    }
    .applet-text-cell {
        font-size: 0.85rem; /* Smaller font for applet text */
    }
    .video-button {
        font-size: 0.75rem; /* Smaller font for video button */
        padding: 0.2rem 0.4rem;
        margin-left: 5px;
    }
    .applet-image-cell img {
        max-width: 60px; /* Smaller image icons for applets */
    }
    .inline-icon {
        width: 20px;
        height: 20px;
        margin-right: 5px;
    }
    .cta-button-small {
        padding: 0.6rem 1.2rem;
        font-size: 0.8rem;
    }
}



table {
  margin-left: auto;
  margin-right: auto;
  border-collapse: collapse;
}
table, th, td {
  border: 0px solid black;
  padding: 8px;
}