/* Animation keyframes */
@keyframes slideInFromLeft {
    from {
        opacity: 0;
        transform: translateX(-100px) scale(0.7);
    }
    to {
        opacity: 1;
        transform: translateX(0) scale(1);
    }
}

@keyframes slideInFromRight {
    from {
        opacity: 0;
        transform: translateX(100px) scale(0.7);
    }
    to {
        opacity: 1;
        transform: translateX(0) scale(1);
    }
}


/* ==========================================================================
   REPETITIVE OBJECT STYLES
   ========================================================================== */

.section-content {
    text-align: left;
    z-index: 2;
    position: relative;
    width: 80%;
    height: 80vh;
    padding: 3rem;
    border-radius: 10px;
    background-color: rgba(15, 16, 15, 0.7);
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    display: flex;
    flex-direction: column;
    justify-content: center;
    opacity: 0;
    transform: scale(0.7);
}

/* Dark overlay on background images */
.section-content::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border-radius: 10px;
    z-index: 1;
}

/* Animate class triggers the animation */
.section-content.animate {
    animation-duration: 1.2s;
    animation-fill-mode: forwards;
    animation-timing-function: ease-out;
}

/* Text content wrapper for positioning */
.text-content {
    max-width: 40%;
    z-index: 3;
    position: relative;
    padding: 1.5rem;
    border-radius: 10px;
    background-color: rgba(0, 0, 0, 0.7);
    text-align: left;
}

.text-content h2 {
    font-size: 2.5rem;
    font-weight: 700;
}

.text-content h3 {
    font-size: 1.3rem;
    font-weight: 600;
    margin-bottom: 1rem;
    font-style: italic;
}

.text-content p {
    font-size: 1rem;
    line-height: 1.2;
    margin-bottom: 1rem;
}

.text-content ul li {
    margin-left: 0.8rem;
    font-size: 0.9rem;
}

.cta-button {
    padding: 1.2rem;
    color: var(--off-white);
    background-color: var(--deep-tech-blue);
    text-decoration: none;
    border-radius: 10px;
    font-weight: 600;
    font-size: 1.4rem;
}

.cta-button:hover {
    background-color: var(--warm-ochre);
    color: var(--deep-charcoal-grey);
    scale: 1.1;
    transition: all 0.3s ease;
}

/* ==========================================================================
   AGENTS PAGE SPECIFIC STYLES
   ========================================================================== */

/* Section 1: Hero Section */
#agents-hero {
    background-image: url('../images/agents-home.jpeg');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

.page-title {
    background-color: rgba(15, 16, 15, 0.7);
    padding: 1.5rem;
    border-radius: 10px;
    max-width: 580px;
    position: absolute;
    bottom: 9rem;
    left: 5%;
}

.page-title h1 {
    font-size: 2.5rem;
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 0.9rem;
}

.page-title p {
    font-size: 1.2rem;
    line-height: 1.2;
    padding-bottom: 0.5rem;
}

/* Section 2 */

#agents-section-2 .section-content {
    background-image: url('../images/experience-agent.jpg');
}

#agents-section-2 .section-content.animate {
    animation-name: slideInFromLeft;
}

#agents-section-2 .text-content {
    margin-right: auto;
}

/* Section 3 */

#agents-section-3 .section-content {
    background-image: url('../images/impact-agent-flipped.jpg');
}

#agents-section-3 .section-content.animate {
    animation-name: slideInFromRight;
}

#agents-section-3 .text-content {
    margin-left: auto;
    text-align: left;
}

/* Section 4 */

#agents-section-4 .section-content {
    background-image: url('../images/finance-agent.jpg');
}

#agents-section-4 .section-content.animate {
    animation-name: slideInFromLeft;
}

#agents-section-4 .text-content {
    margin-right: auto;
}

/* Section 5 */

#agents-section-5 .section-content {
    background-image: url('../images/insight-agent.jpg');
}

#agents-section-5 .section-content.animate {
    animation-name: slideInFromRight;
}

#agents-section-5 .text-content {
    margin-left: auto;
    text-align: left;
}

/* Section 6 */

#agents-section-6 .section-content {
    background-image: url('../images/world-agent-2.jpg');
}

#agents-section-6 .section-content.animate {
    animation-name: slideInFromLeft;
}

#agents-section-6 .text-content {
    margin-right: auto;
}

.subtitle {
    font-weight: 700;
    font-size: 1.2rem;
}

/* Section 7 */
#agents-section-7 {
    height: 30vh;
    width: 100%;
    align-items: center;
    text-align: center;
    margin-bottom: 5rem;
}

.cta-section {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
}

.cta-section h2 {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 2rem;
}

.cta-buttons {
    display: flex;
    flex-direction: row;
    gap: 4.5rem
}


/* ==========================================================================
   RESPONSIVE DESIGN (MEDIA QUERIES)
   ========================================================================== */

/* Tablet (max-width: 1024px) */
@media (max-width: 1024px) {
    .page-title {
        max-width: 480px;
        bottom: 7rem;
    }

    .page-title h1 {
        font-size: 2rem;
    }

    .page-title p {
        font-size: 1rem;
    }

    .section-content {
        width: 90%;
        height: 90vh;
        padding: 2rem;
    }

    .text-content {
        max-width: 50%;
        padding: 1.25rem;
    }

    .text-content h2 {
        font-size: 2rem;
    }

    .text-content h3 {
        font-size: 1.1rem;
    }

    .text-content p {
        font-size: 0.9rem;
    }

    .text-content ul li {
        font-size: 0.85rem;
    }

    .cta-section h2 {
        font-size: 2rem;
    }

    .cta-buttons {
        gap: 2rem;
    }

    .cta-button {
        font-size: 1.2rem;
        padding: 1rem;
    }
}

/* Smartphone (max-width: 768px) */
@media (max-width: 768px) {

    #agents-hero {
        background-image: url(../images/agents-bgr-por.jpg);
    }

    #agents-section-2 .section-content {
        background-image: url(../images/experience-agent-por.jpg);
    }
    #agents-section-3 .section-content {
        background-image: url(../images/impact-agent-por.jpg);
    }
    #agents-section-4 .section-content {
        background-image: url(../images/finance-agent-por.jpg);
    }
    #agents-section-5 .section-content {
        background-image: url(../images/insight-agent-por.jpg);
    }
    #agents-section-6 .section-content {
        background-image: url(../images/world-agent-por.jpg);
    }
    
    .page-title {
        max-width: 90%;
        left: 5%;
        bottom: 5rem;
        padding: 1rem;
    }

    .page-title h1 {
        font-size: 1.5rem;
        margin-bottom: 0.5rem;
    }

    .page-title p {
        font-size: 0.9rem;
        padding-bottom: 0.3rem;
    }

    .section-content {
        width: 95%;
        height: 90vh;
        min-height: 70vh;
        padding: 1.5rem;
    }

    .text-content {
        max-width: 100%;
        padding: 1rem;
    }

    /* All text-content centered on mobile */
    #agents-section-2 .text-content,
    #agents-section-3 .text-content,
    #agents-section-4 .text-content,
    #agents-section-5 .text-content,
    #agents-section-6 .text-content {
        margin-left: auto;
        margin-right: auto;
        text-align: left;
    }

    .text-content h2 {
        font-size: 1.75rem;
    }

    .text-content h3 {
        font-size: 1rem;
        margin-bottom: 0.75rem;
    }

    .text-content p {
        font-size: 0.85rem;
        line-height: 1.3;
        margin-bottom: 0.75rem;
    }

    .text-content ul li {
        font-size: 0.8rem;
        margin-left: 0.5rem;
    }

    .subtitle {
        font-size: 1rem;
    }

    #agents-section-7 {
        height: auto;
        min-height: 30vh;
        padding: 2rem 1rem;
        margin-bottom: 3rem;
    }

    .cta-section {
        display: flex;
        flex-direction: column;
        justify-content: center;
        align-items: center;
    }

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

    .cta-buttons {
        flex-direction: column;
        gap: 1.5rem;
        width: 100%;
        padding: 0 1rem;
        justify-content: center;
        align-items: center;
    }

    .cta-button {
        font-size: 1.1rem;
        padding: 1rem;
        width: 100%;
        max-width: 300px;
    }

    /* Disable animations on mobile for better performance */
    .section-content {
        animation: none !important;
        opacity: 1 !important;
        transform: scale(1) !important;
    }
}

/* Small Smartphone (max-width: 480px) */
@media (max-width: 480px) {
    
    #agents-hero {
        background-image: url(../images/agents-bgr-por.jpg);
    }

    #agents-section-2 .section-content {
        background-image: url(../images/experience-agent-por.jpg);
    }
    #agents-section-3 .section-content {
        background-image: url(../images/impact-agent-por.jpg);
    }
    #agents-section-4 .section-content {
        background-image: url(../images/finance-agent-por.jpg);
    }
    #agents-section-5 .section-content {
        background-image: url(../images/insight-agent-por.jpg);
    }
    #agents-section-6 .section-content {
        background-image: url(../images/world-agent-por.jpg);
    }


    .page-title {
        position: absolute;
        top: 50%;
        left: auto;
        max-width: 330px;
        max-height: 220px;
        padding: 2rem; /* equal padding all around */
        box-sizing: border-box;
        z-index: 3;
    }
    
    .page-title h1 {
        font-size: 1.15rem;
    }

    .page-title p {
        font-size: 0.95rem;
    }

    .section-content {
        width: 85%;
        height: 90vh;
    }

    .text-content {
        margin-top: 10rem;
    }

    .text-content h2 {
        font-size: 1.3rem;
    }

    .text-content h3 {
        font-size: 0.7rem;
    }

    .text-content p {
        font-size: 0.65rem;
    }

    .text-content ul li {
        font-size: 0.65rem;
        margin-left: 0.8rem;
    }

    .cta-section h2 {
        font-size: 1.5rem;
    }

    .cta-button {
        font-size: 1rem;
        padding: 0.85rem;
    }
}