/* ============================================== */
/* ===       CSS for Proyectos Page           === */
/* ============================================== */

/* --- Intro Section --- */
.projects-intro {
    background-color: #f98930; /* Use main orange color */
    color: white;
    padding: 60px 20px; /* More padding */
    text-align: center;
}

.projects-intro h1 {
    font-size: 2.8em;
    margin-bottom: 20px;
    font-weight: 700;
}

.projects-intro p {
    max-width: 900px;
    margin: 0 auto;
    font-size: 1.1em; /* Slightly smaller */
    line-height: 1.7;
    opacity: 0.9; /* Slightly transparent text */
}

/* --- Project Card Grid Section --- */
.projects-grid-section {
    padding: 60px 20px;
    background-color: #f7f7f7; /* Light grey background */
}

.projects-container {
    display: grid;
    /* Responsive grid: 1 col on small, 2 on medium, 3 on large */
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); /* Slightly larger min width */
    gap: 30px; /* Space between cards */
    max-width: 1200px; /* Limit overall width */
    margin: 0 auto; /* Center the grid */
}

/* --- Individual Project Card (New Style) --- */
.project-card-new {
    background-color: #ffffff;
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.08);
    overflow: hidden; /* Ensure content stays within bounds */
    transition: transform 0.3s ease, box-shadow 0.3s ease; /* Hover effect */
    display: flex;
    flex-direction: column; /* Stack image and content */
    border: 1px solid #eee; /* Subtle border */
}

.project-card-new:hover {
    transform: translateY(-8px); /* Lift card on hover */
    box-shadow: 0 10px 25px rgba(0,0,0,0.12);
}

.card-new-image-wrapper {
    height: 220px; /* Fixed height for image area */
    overflow: hidden; /* Hide overflow for zoom effect */
}

.card-new-image {
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    transition: transform 0.4s ease; /* Zoom effect on hover */
}

.project-card-new:hover .card-new-image {
    transform: scale(1.05); /* Zoom image slightly on card hover */
}


.card-new-content {
    padding: 25px; /* More padding */
    flex-grow: 1; /* Allow content to take remaining space */
    display: flex;
    flex-direction: column; /* Stack title, text, button */
    justify-content: space-between; /* Push button to bottom */
}

.card-new-title {
    font-size: 1.4rem; /* Slightly larger title */
    font-weight: 600;
    color: #333;
    margin-bottom: 15px;
    line-height: 1.3;
    /* Limit title lines and add ellipsis */
    display: -webkit-box;
    -webkit-line-clamp: 2; /* Show max 2 lines */
    -webkit-box-orient: vertical;
    overflow: hidden;
    min-height: calc(1.4rem * 1.3 * 2); /* Reserve space for 2 lines */
}

.card-new-text {
    font-size: 0.95rem;
    line-height: 1.6;
    color: #555;
    margin-bottom: 20px; /* Space before button */
    /* Limit description lines */
    display: -webkit-box;
    -webkit-line-clamp: 4; /* Show max 4 lines */
    -webkit-box-orient: vertical;
    overflow: hidden;
    flex-grow: 1; /* Allow text to take available space before button */
    min-height: calc(0.95rem * 1.6 * 4); /* Reserve space for 4 lines */
}

/* Button style within card */
.card-new-content .card-button {
    margin-top: auto; /* Ensure button stays at bottom */
    padding: 8px 15px;
    font-size: 0.9rem;
    align-self: flex-start; /* Align button to the left */
    background-color: #f98930; /* Orange background */
    color: white; /* White text */
    border-color: #f98930; /* Orange border */
}

.card-new-content .card-button:hover {
    background-color: #e07828; /* Darker orange on hover */
    border-color: #e07828;
    color: white;
}

/* Accessibility class */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}


/* --- Responsive Adjustments --- */
@media (max-width: 768px) {
    .projects-intro h1 {
        font-size: 2.2em;
    }
    .projects-intro p {
        font-size: 1em;
    }
    .projects-grid-section {
        padding: 40px 15px;
    }
    .projects-container {
        grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); /* Adjust min size */
        gap: 20px;
    }
    .card-new-image-wrapper {
        height: 200px; /* Slightly smaller image */
    }
     .card-new-title {
        font-size: 1.2rem;
         min-height: calc(1.2rem * 1.3 * 2);
    }
     .card-new-text {
        font-size: 0.9rem;
         min-height: calc(0.9rem * 1.6 * 4);
    }
}

@media (max-width: 480px) {
     .projects-intro h1 {
        font-size: 1.8em;
    }
     .projects-intro p {
        font-size: 0.9em;
    }
    .projects-container {
        /* Already 1 column due to auto-fit */
         gap: 15px;
    }
     .card-new-image-wrapper {
        height: 180px;
    }
     .card-new-title {
        font-size: 1.1rem;
         min-height: calc(1.1rem * 1.3 * 2);
    }
     .card-new-text {
         -webkit-line-clamp: 3; /* Show fewer lines on smallest screens */
          min-height: calc(0.9rem * 1.6 * 3);
     }
}

/* --- REMOVED OLD STYLES --- */
/* .proyectos-section, .proyectos-menu, .proyectos-contenido, */
/* .proyecto-imagen, .proyecto-descripcion, .btn-contacto styles removed */
/* .social-icons-bar styles removed (Handled in style.css or qs.css now) */